@promodev/form-builder-vue3 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form-builder-vue3.js +991 -959
- package/dist/form-builder-vue3.umd.cjs +17 -17
- package/dist/widget/form-builder-vue3.iife.js +18 -18
- package/package.json +1 -1
|
@@ -23,9 +23,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
23
23
|
`,EI="\u2028",$I="\u2029";function SI(e){const t=e;let n=0,r=1,o=1,i=0;const s=v=>t[v]===bI&&t[v+1]===ln,l=v=>t[v]===ln,c=v=>t[v]===$I,d=v=>t[v]===EI,f=v=>s(v)||l(v)||c(v)||d(v),u=()=>n,p=()=>r,m=()=>o,_=()=>i,b=v=>s(v)||c(v)||d(v)?ln:t[v],g=()=>b(n),h=()=>b(n+i);function y(){return i=0,f(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}function E(){return s(n+i)&&i++,i++,t[n+i]}function $(){n=0,r=1,o=1,i=0}function O(v=0){i=v}function N(){const v=n+i;for(;v!==n;)y();i=0}return{index:u,line:p,column:m,peekOffset:_,charAt:b,currentChar:g,currentPeek:h,next:y,peek:E,reset:$,resetPeek:O,skipToPeek:N}}const Rr=void 0,vI=".",o2="'",TI="tokenizer";function wI(e,t={}){const n=t.location!==!1,r=SI(e),o=()=>r.index(),i=()=>pI(r.line(),r.column(),r.index()),s=i(),l=o(),c={currentType:13,offset:l,startLoc:s,endLoc:s,lastType:13,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},d=()=>c,{onError:f}=t;function u(w,T,k,...q){const ee=d();if(T.column+=k,T.offset+=k,f){const le=n?qf(ee.startLoc,T):null,ce=Oi(w,le,{domain:TI,args:q});f(ce)}}function p(w,T,k){w.endLoc=i(),w.currentType=T;const q={type:T};return n&&(q.loc=qf(w.startLoc,w.endLoc)),k!=null&&(q.value=k),q}const m=w=>p(w,13);function _(w,T){return w.currentChar()===T?(w.next(),T):(u(Ce.EXPECTED_TOKEN,i(),0,T),"")}function b(w){let T="";for(;w.currentPeek()===hr||w.currentPeek()===ln;)T+=w.currentPeek(),w.peek();return T}function g(w){const T=b(w);return w.skipToPeek(),T}function h(w){if(w===Rr)return!1;const T=w.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T===95}function y(w){if(w===Rr)return!1;const T=w.charCodeAt(0);return T>=48&&T<=57}function E(w,T){const{currentType:k}=T;if(k!==2)return!1;b(w);const q=h(w.currentPeek());return w.resetPeek(),q}function $(w,T){const{currentType:k}=T;if(k!==2)return!1;b(w);const q=w.currentPeek()==="-"?w.peek():w.currentPeek(),ee=y(q);return w.resetPeek(),ee}function O(w,T){const{currentType:k}=T;if(k!==2)return!1;b(w);const q=w.currentPeek()===o2;return w.resetPeek(),q}function N(w,T){const{currentType:k}=T;if(k!==7)return!1;b(w);const q=w.currentPeek()===".";return w.resetPeek(),q}function v(w,T){const{currentType:k}=T;if(k!==8)return!1;b(w);const q=h(w.currentPeek());return w.resetPeek(),q}function B(w,T){const{currentType:k}=T;if(!(k===7||k===11))return!1;b(w);const q=w.currentPeek()===":";return w.resetPeek(),q}function H(w,T){const{currentType:k}=T;if(k!==9)return!1;const q=()=>{const le=w.currentPeek();return le==="{"?h(w.peek()):le==="@"||le==="|"||le===":"||le==="."||le===hr||!le?!1:le===ln?(w.peek(),q()):C(w,!1)},ee=q();return w.resetPeek(),ee}function U(w){b(w);const T=w.currentPeek()==="|";return w.resetPeek(),T}function C(w,T=!0){const k=(ee=!1,le="")=>{const ce=w.currentPeek();return ce==="{"||ce==="@"||!ce?ee:ce==="|"?!(le===hr||le===ln):ce===hr?(w.peek(),k(!0,hr)):ce===ln?(w.peek(),k(!0,ln)):!0},q=k();return T&&w.resetPeek(),q}function A(w,T){const k=w.currentChar();return k===Rr?Rr:T(k)?(w.next(),k):null}function R(w){const T=w.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===95||T===36}function I(w){return A(w,R)}function V(w){const T=w.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===95||T===36||T===45}function j(w){return A(w,V)}function F(w){const T=w.charCodeAt(0);return T>=48&&T<=57}function M(w){return A(w,F)}function Y(w){const T=w.charCodeAt(0);return T>=48&&T<=57||T>=65&&T<=70||T>=97&&T<=102}function W(w){return A(w,Y)}function K(w){let T="",k="";for(;T=M(w);)k+=T;return k}function te(w){let T="";for(;;){const k=w.currentChar();if(k==="\\"){const q=w.peek();q==="{"||q==="}"||q==="@"||q==="|"||q==="\\"?(T+=k+q,w.next(),w.next()):(w.resetPeek(),T+=k,w.next())}else{if(k==="{"||k==="}"||k==="@"||k==="|"||!k)break;if(k===hr||k===ln)if(C(w))T+=k,w.next();else{if(U(w))break;T+=k,w.next()}else T+=k,w.next()}}return T}function X(w){g(w);let T="",k="";for(;T=j(w);)k+=T;const q=w.currentChar();if(q&&q!=="}"&&q!==Rr&&q!==hr&&q!==ln&&q!==" "){const ee=Ie(w);return u(Ce.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,k+ee),k+ee}return w.currentChar()===Rr&&u(Ce.UNTERMINATED_CLOSING_BRACE,i(),0),k}function oe(w){g(w);let T="";return w.currentChar()==="-"?(w.next(),T+=`-${K(w)}`):T+=K(w),w.currentChar()===Rr&&u(Ce.UNTERMINATED_CLOSING_BRACE,i(),0),T}function fe(w){return w!==o2&&w!==ln}function J(w){g(w),_(w,"'");let T="",k="";for(;T=A(w,fe);)T==="\\"?k+=ae(w):k+=T;const q=w.currentChar();return q===ln||q===Rr?(u(Ce.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),q===ln&&(w.next(),_(w,"'")),k):(_(w,"'"),k)}function ae(w){const T=w.currentChar();switch(T){case"\\":case"'":return w.next(),`\\${T}`;case"u":return ye(w,T,4);case"U":return ye(w,T,6);default:return u(Ce.UNKNOWN_ESCAPE_SEQUENCE,i(),0,T),""}}function ye(w,T,k){_(w,T);let q="";for(let ee=0;ee<k;ee++){const le=W(w);if(!le){u(Ce.INVALID_UNICODE_ESCAPE_SEQUENCE,i(),0,`\\${T}${q}${w.currentChar()}`);break}q+=le}return`\\${T}${q}`}function $e(w){return w!=="{"&&w!=="}"&&w!==hr&&w!==ln}function Ie(w){g(w);let T="",k="";for(;T=A(w,$e);)k+=T;return k}function je(w){let T="",k="";for(;T=I(w);)k+=T;return k}function we(w){const T=k=>{const q=w.currentChar();return q==="{"||q==="@"||q==="|"||q==="("||q===")"||!q||q===hr?k:(k+=q,w.next(),T(k))};return T("")}function Le(w){g(w);const T=_(w,"|");return g(w),T}function Fe(w,T){let k=null;switch(w.currentChar()){case"{":return T.braceNest>=1&&u(Ce.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),w.next(),k=p(T,2,"{"),g(w),T.braceNest++,k;case"}":return T.braceNest>0&&T.currentType===2&&u(Ce.EMPTY_PLACEHOLDER,i(),0),w.next(),k=p(T,3,"}"),T.braceNest--,T.braceNest>0&&g(w),T.inLinked&&T.braceNest===0&&(T.inLinked=!1),k;case"@":return T.braceNest>0&&u(Ce.UNTERMINATED_CLOSING_BRACE,i(),0),k=Ye(w,T)||m(T),T.braceNest=0,k;default:{let ee=!0,le=!0,ce=!0;if(U(w))return T.braceNest>0&&u(Ce.UNTERMINATED_CLOSING_BRACE,i(),0),k=p(T,1,Le(w)),T.braceNest=0,T.inLinked=!1,k;if(T.braceNest>0&&(T.currentType===4||T.currentType===5||T.currentType===6))return u(Ce.UNTERMINATED_CLOSING_BRACE,i(),0),T.braceNest=0,ke(w,T);if(ee=E(w,T))return k=p(T,4,X(w)),g(w),k;if(le=$(w,T))return k=p(T,5,oe(w)),g(w),k;if(ce=O(w,T))return k=p(T,6,J(w)),g(w),k;if(!ee&&!le&&!ce)return k=p(T,12,Ie(w)),u(Ce.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,k.value),g(w),k;break}}return k}function Ye(w,T){const{currentType:k}=T;let q=null;const ee=w.currentChar();switch((k===7||k===8||k===11||k===9)&&(ee===ln||ee===hr)&&u(Ce.INVALID_LINKED_FORMAT,i(),0),ee){case"@":return w.next(),q=p(T,7,"@"),T.inLinked=!0,q;case".":return g(w),w.next(),p(T,8,".");case":":return g(w),w.next(),p(T,9,":");default:return U(w)?(q=p(T,1,Le(w)),T.braceNest=0,T.inLinked=!1,q):N(w,T)||B(w,T)?(g(w),Ye(w,T)):v(w,T)?(g(w),p(T,11,je(w))):H(w,T)?(g(w),ee==="{"?Fe(w,T)||q:p(T,10,we(w))):(k===7&&u(Ce.INVALID_LINKED_FORMAT,i(),0),T.braceNest=0,T.inLinked=!1,ke(w,T))}}function ke(w,T){let k={type:13};if(T.braceNest>0)return Fe(w,T)||m(T);if(T.inLinked)return Ye(w,T)||m(T);switch(w.currentChar()){case"{":return Fe(w,T)||m(T);case"}":return u(Ce.UNBALANCED_CLOSING_BRACE,i(),0),w.next(),p(T,3,"}");case"@":return Ye(w,T)||m(T);default:{if(U(w))return k=p(T,1,Le(w)),T.braceNest=0,T.inLinked=!1,k;if(C(w))return p(T,0,te(w));break}}return k}function Ze(){const{currentType:w,offset:T,startLoc:k,endLoc:q}=c;return c.lastType=w,c.lastOffset=T,c.lastStartLoc=k,c.lastEndLoc=q,c.offset=o(),c.startLoc=i(),r.currentChar()===Rr?p(c,13):ke(r,c)}return{nextToken:Ze,currentOffset:o,currentPosition:i,context:d}}const kI="parser",AI=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,NI=/\\([\\@{}|])/g;function II(e,t){return t}function CI(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(t||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function xI(e={}){const t=e.location!==!1,{onError:n}=e;function r(h,y,E,$,...O){const N=h.currentPosition();if(N.offset+=$,N.column+=$,n){const v=t?qf(E,N):null,B=Oi(y,v,{domain:kI,args:O});n(B)}}function o(h,y,E){const $={type:h};return t&&($.start=y,$.end=y,$.loc={start:E,end:E}),$}function i(h,y,E,$){t&&(h.end=y,h.loc&&(h.loc.end=E))}function s(h,y){const E=h.context(),$=o(3,E.offset,E.startLoc);return $.value=y.replace(NI,II),i($,h.currentOffset(),h.currentPosition()),$}function l(h,y){const E=h.context(),{lastOffset:$,lastStartLoc:O}=E,N=o(5,$,O);return N.index=parseInt(y,10),h.nextToken(),i(N,h.currentOffset(),h.currentPosition()),N}function c(h,y){const E=h.context(),{lastOffset:$,lastStartLoc:O}=E,N=o(4,$,O);return N.key=y,h.nextToken(),i(N,h.currentOffset(),h.currentPosition()),N}function d(h,y){const E=h.context(),{lastOffset:$,lastStartLoc:O}=E,N=o(9,$,O);return N.value=y.replace(AI,CI),h.nextToken(),i(N,h.currentOffset(),h.currentPosition()),N}function f(h){const y=h.nextToken(),E=h.context(),{lastOffset:$,lastStartLoc:O}=E,N=o(8,$,O);return y.type!==11?(r(h,Ce.UNEXPECTED_EMPTY_LINKED_MODIFIER,E.lastStartLoc,0),N.value="",i(N,$,O),{nextConsumeToken:y,node:N}):(y.value==null&&r(h,Ce.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,gr(y)),N.value=y.value||"",i(N,h.currentOffset(),h.currentPosition()),{node:N})}function u(h,y){const E=h.context(),$=o(7,E.offset,E.startLoc);return $.value=y,i($,h.currentOffset(),h.currentPosition()),$}function p(h){const y=h.context(),E=o(6,y.offset,y.startLoc);let $=h.nextToken();if($.type===8){const O=f(h);E.modifier=O.node,$=O.nextConsumeToken||h.nextToken()}switch($.type!==9&&r(h,Ce.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,gr($)),$=h.nextToken(),$.type===2&&($=h.nextToken()),$.type){case 10:$.value==null&&r(h,Ce.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,gr($)),E.key=u(h,$.value||"");break;case 4:$.value==null&&r(h,Ce.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,gr($)),E.key=c(h,$.value||"");break;case 5:$.value==null&&r(h,Ce.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,gr($)),E.key=l(h,$.value||"");break;case 6:$.value==null&&r(h,Ce.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,gr($)),E.key=d(h,$.value||"");break;default:{r(h,Ce.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const O=h.context(),N=o(7,O.offset,O.startLoc);return N.value="",i(N,O.offset,O.startLoc),E.key=N,i(E,O.offset,O.startLoc),{nextConsumeToken:$,node:E}}}return i(E,h.currentOffset(),h.currentPosition()),{node:E}}function m(h){const y=h.context(),E=y.currentType===1?h.currentOffset():y.offset,$=y.currentType===1?y.endLoc:y.startLoc,O=o(2,E,$);O.items=[];let N=null;do{const H=N||h.nextToken();switch(N=null,H.type){case 0:H.value==null&&r(h,Ce.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,gr(H)),O.items.push(s(h,H.value||""));break;case 5:H.value==null&&r(h,Ce.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,gr(H)),O.items.push(l(h,H.value||""));break;case 4:H.value==null&&r(h,Ce.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,gr(H)),O.items.push(c(h,H.value||""));break;case 6:H.value==null&&r(h,Ce.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,gr(H)),O.items.push(d(h,H.value||""));break;case 7:{const U=p(h);O.items.push(U.node),N=U.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const v=y.currentType===1?y.lastOffset:h.currentOffset(),B=y.currentType===1?y.lastEndLoc:h.currentPosition();return i(O,v,B),O}function _(h,y,E,$){const O=h.context();let N=$.items.length===0;const v=o(1,y,E);v.cases=[],v.cases.push($);do{const B=m(h);N||(N=B.items.length===0),v.cases.push(B)}while(O.currentType!==13);return N&&r(h,Ce.MUST_HAVE_MESSAGES_IN_PLURAL,E,0),i(v,h.currentOffset(),h.currentPosition()),v}function b(h){const y=h.context(),{offset:E,startLoc:$}=y,O=m(h);return y.currentType===13?O:_(h,E,$,O)}function g(h){const y=wI(h,Ot({},e)),E=y.context(),$=o(0,E.offset,E.startLoc);return t&&$.loc&&($.loc.source=h),$.body=b(y),e.onCacheKey&&($.cacheKey=e.onCacheKey(h)),E.currentType!==13&&r(y,Ce.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,h[E.offset]||""),i($,y.currentOffset(),y.currentPosition()),$}return{parse:g}}function gr(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function OI(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function i2(e,t){for(let n=0;n<e.length;n++)Hf(e[n],t)}function Hf(e,t){switch(e.type){case 1:i2(e.cases,t),t.helper("plural");break;case 2:i2(e.items,t);break;case 6:{Hf(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function RI(e,t={}){const n=OI(e);n.helper("normalize"),e.body&&Hf(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function PI(e){const t=e.body;return t.type===2?s2(t):t.cases.forEach(n=>s2(n)),e}function s2(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=jf(t);for(let n=0;n<e.items.length;n++){const r=e.items[n];(r.type===3||r.type===9)&&delete r.value}}}}const MI="minifier";function Ri(e){switch(e.t=e.type,e.type){case 0:{const t=e;Ri(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let r=0;r<n.length;r++)Ri(n[r]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let r=0;r<n.length;r++)Ri(n[r]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Ri(t.key),t.k=t.key,delete t.key,t.modifier&&(Ri(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}default:if(process.env.NODE_ENV!=="production")throw Oi(Ce.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:MI,args:[e.type]})}delete e.type}const DI="parser";function LI(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,i=t.location!==!1,s={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};i&&e.loc&&(s.source=e.loc.source);const l=()=>s;function c(b,g){s.code+=b}function d(b,g=!0){const h=g?r:"";c(o?h+" ".repeat(b):h)}function f(b=!0){const g=++s.indentLevel;b&&d(g)}function u(b=!0){const g=--s.indentLevel;b&&d(g)}function p(){d(s.indentLevel)}return{context:l,push:c,indent:f,deindent:u,newline:p,helper:b=>`_${b}`,needIndent:()=>s.needIndent}}function FI(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Pi(e,t.key),t.modifier?(e.push(", "),Pi(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function BI(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let i=0;i<o&&(Pi(e,t.items[i]),i!==o-1);i++)e.push(", ");e.deindent(r()),e.push("])")}function UI(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let i=0;i<o&&(Pi(e,t.cases[i]),i!==o-1);i++)e.push(", ");e.deindent(r()),e.push("])")}}function VI(e,t){t.body?Pi(e,t.body):e.push("null")}function Pi(e,t){const{helper:n}=e;switch(t.type){case 0:VI(e,t);break;case 1:UI(e,t);break;case 2:BI(e,t);break;case 6:FI(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:if(process.env.NODE_ENV!=="production")throw Oi(Ce.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:DI,args:[t.type]})}}const jI=(e,t={})=>{const n=he(t.mode)?t.mode:"normal",r=he(t.filename)?t.filename:"message.intl";t.sourceMap;const o=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":`
|
|
24
24
|
`,i=t.needIndent?t.needIndent:n!=="arrow",s=e.helpers||[],l=LI(e,{filename:r,breakLineCode:o,needIndent:i});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(i),s.length>0&&(l.push(`const { ${jf(s.map(f=>`${f}: _${f}`),", ")} } = ctx`),l.newline()),l.push("return "),Pi(l,e),l.deindent(i),l.push("}"),delete e.helpers;const{code:c,map:d}=l.context();return{ast:e,code:c,map:d?d.toJSON():void 0}};function zI(e,t={}){const n=Ot({},t),r=!!n.jit,o=!!n.minify,i=n.optimize==null?!0:n.optimize,l=xI(n).parse(e);return r?(i&&PI(l),o&&Ri(l),{ast:l,code:""}):(RI(l,n),jI(l,n))}function qI(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(co().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(co().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function uo(e){return He(e)&&Wf(e)===0&&(jn(e,"b")||jn(e,"body"))}const a2=["b","body"];function HI(e){return fo(e,a2)}const l2=["c","cases"];function WI(e){return fo(e,l2,[])}const c2=["s","static"];function GI(e){return fo(e,c2)}const d2=["i","items"];function YI(e){return fo(e,d2,[])}const u2=["t","type"];function Wf(e){return fo(e,u2)}const f2=["v","value"];function Tc(e,t){const n=fo(e,f2);if(n!=null)return n;throw va(t)}const p2=["m","modifier"];function KI(e){return fo(e,p2)}const m2=["k","key"];function XI(e){const t=fo(e,m2);if(t)return t;throw va(6)}function fo(e,t,n){for(let r=0;r<t.length;r++){const o=t[r];if(jn(e,o)&&e[o]!=null)return e[o]}return n}const _2=[...a2,...l2,...c2,...d2,...m2,...p2,...f2,...u2];function va(e){return new Error(`unhandled node type: ${e}`)}function Gf(e){return n=>JI(n,e)}function JI(e,t){const n=HI(t);if(n==null)throw va(0);if(Wf(n)===1){const i=WI(n);return e.plural(i.reduce((s,l)=>[...s,h2(e,l)],[]))}else return h2(e,n)}function h2(e,t){const n=GI(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const r=YI(t).reduce((o,i)=>[...o,Yf(e,i)],[]);return e.normalize(r)}}function Yf(e,t){const n=Wf(t);switch(n){case 3:return Tc(t,n);case 9:return Tc(t,n);case 4:{const r=t;if(jn(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(jn(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw va(n)}case 5:{const r=t;if(jn(r,"i")&&xt(r.i))return e.interpolate(e.list(r.i));if(jn(r,"index")&&xt(r.index))return e.interpolate(e.list(r.index));throw va(n)}case 6:{const r=t,o=KI(r),i=XI(r);return e.linked(Yf(e,i),o?Yf(e,o):void 0,e.type)}case 7:return Tc(t,n);case 8:return Tc(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const ZI="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function QI(e,t){t&&yI(e)&&Tn(Ec(ZI,{source:e}))}const eC=e=>e;let wc=nt();function tC(e,t={}){let n=!1;const r=t.onError||hI;return t.onError=o=>{n=!0,r(o)},{...zI(e,t),detectError:n}}function nC(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&he(e)){const n=rt(t.warnHtmlMessage)?t.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&QI(e,n);const o=(t.onCacheKey||eC)(e),i=wc[o];if(i)return i;const{ast:s,detectError:l}=tC(e,{...t,location:process.env.NODE_ENV!=="production",jit:!0}),c=Gf(s);return l?c:wc[o]=c}else{if(!uo(e))return process.env.NODE_ENV!=="production"&&Tn(`Cannot compile the message of '${t.key}' key, because the message compiler is not included in this build. Pre-compile the message. So translate function returns the message as is.`),(()=>e);const n=e.cacheKey;if(n){const r=wc[n];return r||(wc[n]=Gf(e))}else return Gf(e)}}let Ta=null;function rC(e){Ta=e}function oC(e,t,n){Ta&&Ta.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const iC=sC("function:translate");function sC(e){return t=>Ta&&Ta.emit(e,t)}const cn={INVALID_ARGUMENT:mI,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},aC=24;function Pr(e){return Oi(e,null,process.env.NODE_ENV!=="production"?{messages:lC}:void 0)}const lC={[cn.INVALID_ARGUMENT]:"Invalid arguments",[cn.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[cn.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[cn.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[cn.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[cn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[cn.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function Kf(e,t){return t.locale!=null?g2(t.locale):g2(e.locale)}let Xf;function g2(e){if(he(e))return e;if(ct(e)){if(e.resolvedOnce&&Xf!=null)return Xf;if(e.constructor.name==="Function"){const t=e();if(GN(t))throw Pr(cn.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Xf=t}else throw Pr(cn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Pr(cn.NOT_SUPPORT_LOCALE_TYPE)}function cC(e,t,n){return[...new Set([n,...ht(t)?t:He(t)?Object.keys(t).filter(r=>r!=="default"):he(t)?[t]:[n]])]}function dC(e,t,n){const r=he(n)?n:wa,o=e;let i;He(t)?(o.__localeChainObjectCache||(o.__localeChainObjectCache=new WeakMap),i=o.__localeChainObjectCache.get(t),i||(i=new Map,o.__localeChainObjectCache.set(t,i))):(o.__localeChainCache||(o.__localeChainCache=new Map),i=o.__localeChainCache.get(t),i||(i=new Map,o.__localeChainCache.set(t,i)));const s=i.get(r);if(s)return s;const l=[];let c=[n];for(;ht(c);)c=y2(l,c,t);const d=ht(t)||!dt(t)?t:t.default?t.default:null;return c=he(d)?[d]:d,ht(c)&&y2(l,c,!1),i.set(r,l),l}function y2(e,t,n){let r=!0;for(let o=0;o<t.length&&rt(r);o++){const i=t[o];he(i)&&(r=uC(e,t[o],n))}return r}function uC(e,t,n){let r;const o=t.split("-");do{const i=o.join("-");r=fC(e,i,n),o.splice(-1,1)}while(o.length&&r===!0);return r}function fC(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const o=t.replace(/!/g,"");e.push(o),(ht(n)||dt(n))&&n[o]&&(r=n[o])}return r}const po=[];po[0]={w:[0],i:[3,0],"[":[4],o:[7]},po[1]={w:[1],".":[2],"[":[4],o:[7]},po[2]={w:[2],i:[3,0],0:[3,0]},po[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},po[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},po[5]={"'":[4,0],o:8,l:[5,0]},po[6]={'"':[4,0],o:8,l:[6,0]};const pC=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function mC(e){return pC.test(e)}function _C(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function hC(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function gC(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:mC(t)?_C(t):"*"+t}function yC(e){const t=[];let n=-1,r=0,o=0,i,s,l,c,d,f,u;const p=[];p[0]=()=>{s===void 0?s=l:s+=l},p[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},p[2]=()=>{p[0](),o++},p[3]=()=>{if(o>0)o--,r=4,p[0]();else{if(o=0,s===void 0||(s=gC(s),s===!1))return!1;p[1]()}};function m(){const _=e[n+1];if(r===5&&_==="'"||r===6&&_==='"')return n++,l="\\"+_,p[0](),!0}for(;r!==null;)if(n++,i=e[n],!(i==="\\"&&m())){if(c=hC(i),u=po[r],d=u[c]||u.l||8,d===8||(r=d[0],d[1]!==void 0&&(f=p[d[1]],f&&(l=i,f()===!1))))return;if(r===7)return t}}const b2=new Map;function bC(e,t){return He(e)?Yt(e,t):null}function EC(e,t){if(!He(e))return null;let n=b2.get(t);if(n||(n=yC(t),n&&b2.set(t,n)),!n)return null;const r=n.length;let o=e,i=0;for(;i<r;){const s=n[i];if(_2.includes(s)&&uo(o)||!He(o)||!jn(o,s))return null;const l=o[s];if(l===void 0||ct(o))return null;o=l,i++}return o}const Kt={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,INVALID_NUMBER_ARGUMENT:8,INVALID_DATE_ARGUMENT:9},Yo=10,$C={[Kt.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale {resource}.",[Kt.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Kt.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Kt.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Kt.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Kt.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Kt.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.",[Kt.INVALID_NUMBER_ARGUMENT]:"Invalid argument for number formatting: expected a number but received '{value}'.",[Kt.INVALID_DATE_ARGUMENT]:"Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'."};function mo(e,...t){return Ec($C[e],...t)}const SC="11.4.17",kc=-1,wa="en-US",Mi="",E2=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function vC(){return{upper:(e,t)=>t==="text"&&he(e)?e.toUpperCase():t==="vnode"&&He(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&he(e)?e.toLowerCase():t==="vnode"&&He(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&he(e)?E2(e):t==="vnode"&&He(e)&&"__v_isVNode"in e?E2(e.children):e}}let $2;function TC(e){$2=e}let S2;function wC(e){S2=e}let v2;function kC(e){v2=e}let T2=null;const AC=e=>{T2=e},NC=()=>T2;let w2=null;const k2=e=>{w2=e},IC=()=>w2;let A2=0;function CC(e={}){const t=ct(e.onWarn)?e.onWarn:Tn,n=he(e.version)?e.version:SC,r=he(e.locale)||ct(e.locale)?e.locale:wa,o=ct(r)?wa:r,i=ht(e.fallbackLocale)||dt(e.fallbackLocale)||he(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:o,s=dt(e.messages)?e.messages:Jf(o),l=dt(e.datetimeFormats)?e.datetimeFormats:Jf(o),c=dt(e.numberFormats)?e.numberFormats:Jf(o),d=Ot(nt(),e.modifiers,vC()),f=e.pluralRules||nt(),u=ct(e.missing)?e.missing:null,p=rt(e.missingWarn)||Go(e.missingWarn)?e.missingWarn:!0,m=rt(e.fallbackWarn)||Go(e.fallbackWarn)?e.fallbackWarn:!0,_=!!e.fallbackFormat,b=!!e.unresolving,g=ct(e.postTranslation)?e.postTranslation:null,h=dt(e.processor)?e.processor:null,y=rt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,E=!!e.escapeParameter,$=ct(e.messageCompiler)?e.messageCompiler:$2;process.env.NODE_ENV!=="production"&&ct(e.messageCompiler)&&$c(mo(Kt.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const O=ct(e.messageResolver)?e.messageResolver:S2||bC,N=ct(e.localeFallbacker)?e.localeFallbacker:v2||cC,v=He(e.fallbackContext)?e.fallbackContext:void 0,B=e,H=He(B.__datetimeFormatters)?B.__datetimeFormatters:new Map,U=He(B.__numberFormatters)?B.__numberFormatters:new Map,C=He(B.__meta)?B.__meta:{};A2++;const A={version:n,cid:A2,locale:r,fallbackLocale:i,messages:s,modifiers:d,pluralRules:f,missing:u,missingWarn:p,fallbackWarn:m,fallbackFormat:_,unresolving:b,postTranslation:g,processor:h,warnHtmlMessage:y,escapeParameter:E,messageCompiler:$,messageResolver:O,localeFallbacker:N,fallbackContext:v,onWarn:t,__meta:C};return A.datetimeFormats=l,A.numberFormats=c,A.__datetimeFormatters=H,A.__numberFormatters=U,process.env.NODE_ENV!=="production"&&(A.__v_emitter=B.__v_emitter!=null?B.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&oC(A,n,C),A}const Jf=e=>({[e]:nt()});function Zf(e,t){return e instanceof RegExp?e.test(t):e}function N2(e,t){return e instanceof RegExp?e.test(t):e}function I2(e,t,n,r,o){const{missing:i,onWarn:s}=e;if(process.env.NODE_ENV!=="production"){const l=e.__v_emitter;l&&l.emit("missing",{locale:n,key:t,type:o,groupId:lo(o,t)})}if(i!==null){const l=i(e,n,t,o);return he(l)?l:t}else return process.env.NODE_ENV!=="production"&&N2(r,t)&&s(mo(Kt.NOT_FOUND_KEY,{key:t,locale:n,resource:o==="datetime format"?"datetime formats":o==="number format"?"number formats":"messages"})),t}function C2(e,t){const n=e;He(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function Ac(e,t,n){C2(e,n),e.fallbackContext&&C2(e.fallbackContext,n),e.localeFallbacker(e,n,t)}function x2(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function xC(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(x2(e,t[r]))return!0;return!1}function O2(e,t,n,r,o,i,s){const{fallbackLocale:l,localeFallbacker:c,onWarn:d}=e,f=c(e,l,n);let u=n;for(let p=0;p<f.length;p++){const m=f[p];if(process.env.NODE_ENV!=="production"&&n!==m&&Zf(i,t)&&d(mo(s==="datetime format"?Kt.FALLBACK_TO_DATE_FORMAT:Kt.FALLBACK_TO_NUMBER_FORMAT,{key:t,target:m})),process.env.NODE_ENV!=="production"&&n!==m){const b=e.__v_emitter;b&&b.emit("fallback",{type:s,key:t,from:u,to:m,groupId:lo(s,t)})}const _=Yt(Yt(r,m)||{},t);if(dt(_)&&he(m))return m;I2(e,t,m,o,s),u=m}return null}function R2(e,t,n){let r=`${e}__${t}`;return dt(n)&&!Uf(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function P2(e,t,n){for(const r in n){const o=`${t}__${r}`;for(const i of e.keys())(i===o||i.startsWith(`${o}__`))&&e.delete(i)}}function M2(e,t,n,r){const[,o,i,s]=e;let l=n;return he(o)?t.key=o:dt(o)&&Object.keys(o).forEach(c=>{r.includes(c)?l[c]=o[c]:t[c]=o[c]}),he(i)?t.locale=i:dt(i)&&(l=i),dt(s)&&(l=s),l}const D2=typeof Intl<"u",L2={dateTimeFormat:D2&&typeof Intl.DateTimeFormat<"u",numberFormat:D2&&typeof Intl.NumberFormat<"u"};function F2(e,...t){const{datetimeFormats:n,unresolving:r,onWarn:o}=e,{__datetimeFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!L2.dateTimeFormat)return o(mo(Kt.CANNOT_FORMAT_DATE)),Mi;if(!he(t[0])&&!Kg(t[0])&&!xt(t[0]))return process.env.NODE_ENV!=="production"&&o(mo(Kt.INVALID_DATE_ARGUMENT,{value:String(t[0])})),Mi;const[s,l,c,d]=Qf(...t),f=rt(c.missingWarn)?c.missingWarn:e.missingWarn,u=rt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,p=!!c.part,m=Kf(e,c);if(!he(s)||s===""){const y=new Intl.DateTimeFormat(m.replace(/!/g,""),d);return p?y.formatToParts(l):y.format(l)}const _=O2(e,s,m,n,f,u,"datetime format");if(!he(_))return r?kc:s;const b=n[_][s],g=R2(_,s,d);let h=i.get(g);return h||(h=new Intl.DateTimeFormat(_,Ot({},b,d)),i.set(g,h)),p?h.formatToParts(l):h.format(l)}const B2=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Qf(...e){const[t]=e,n=nt(),r=nt();let o;if(he(t)){const s=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!s)throw Pr(cn.INVALID_ISO_DATE_ARGUMENT);const l=s[3]?s[3].trim().startsWith("T")?`${s[1].trim()}${s[3].trim()}`:`${s[1].trim()}T${s[3].trim()}`:s[1].trim();o=new Date(l);try{o.toISOString()}catch{throw Pr(cn.INVALID_ISO_DATE_ARGUMENT)}}else if(Kg(t)){if(isNaN(t.getTime()))throw Pr(cn.INVALID_DATE_ARGUMENT);o=t}else if(xt(t))o=t;else throw Pr(cn.INVALID_ARGUMENT);const i=M2(e,n,r,B2);return[n.key||"",o,n,i]}function U2(e,t,n){P2(e.__datetimeFormatters,t,n)}function V2(e,...t){const{numberFormats:n,unresolving:r,onWarn:o}=e,{__numberFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!L2.numberFormat)return o(mo(Kt.CANNOT_FORMAT_NUMBER)),Mi;if(!xt(t[0]))return process.env.NODE_ENV!=="production"&&o(mo(Kt.INVALID_NUMBER_ARGUMENT,{value:String(t[0])})),Mi;const[s,l,c,d]=ep(...t),f=rt(c.missingWarn)?c.missingWarn:e.missingWarn,u=rt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,p=!!c.part,m=Kf(e,c);if(!he(s)||s===""){const y=new Intl.NumberFormat(m.replace(/!/g,""),d);return p?y.formatToParts(l):y.format(l)}const _=O2(e,s,m,n,f,u,"number format");if(!he(_))return r?kc:s;const b=n[_][s],g=R2(_,s,d);let h=i.get(g);return h||(h=new Intl.NumberFormat(_,Ot({},b,d)),i.set(g,h)),p?h.formatToParts(l):h.format(l)}const j2=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ep(...e){const[t]=e,n=nt(),r=nt();if(!xt(t))throw Pr(cn.INVALID_ARGUMENT);const o=t,i=M2(e,n,r,j2);return[n.key||"",o,n,i]}function z2(e,t,n){P2(e.__numberFormatters,t,n)}const OC=e=>e,RC=e=>"",PC="text",MC=e=>e.length===0?"":jf(e),DC=YN;function tp(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function LC(e){const t=xt(e.pluralIndex)?e.pluralIndex:-1;return xt(e.named?.count)?e.named.count:xt(e.named?.n)?e.named.n:t}function FC(e={}){const t=e.locale,n=LC(e),r=he(t)&&e.pluralRules&&ct(Yt(e.pluralRules,t))?e.pluralRules[t]:tp,o=r===tp?void 0:tp,i=y=>y[r(n,y.length,o)],s=e.list||[],l=y=>s[y],c=e.named||nt(),d=xt(e.pluralIndex),f=y=>{const E=Jg(y)?Yt(c,y):c[y];return d&&!E&&(y==="count"||y==="n")?e.pluralIndex:E};function u(y,E){const $=ct(e.messages)?e.messages(y,!!E):He(e.messages)?e.messages[y]:!1;return $||(e.parent?e.parent.message(y):RC)}const p=y=>e.modifiers?Yt(e.modifiers,y):OC,m=ct(e.processor?.normalize)?e.processor.normalize:MC,_=ct(e.processor?.interpolate)?e.processor.interpolate:DC,b=he(e.processor?.type)?e.processor.type:PC,h={list:l,named:f,plural:i,linked:(y,...E)=>{const[$,O]=E;let N="text",v="";E.length===1?He($)?(v=$.modifier||v,N=$.type||N):he($)&&(v=$||v):E.length===2&&(he($)&&(v=$||v),he(O)&&(N=O||N));const B=u(y,!0)(h),H=B===""||B===void 0?y:B,U=N==="vnode"&&ht(H)&&v?H[0]:H;if(!v)return U;const C=p(v);return ct(C)?C(U,N):(process.env.NODE_ENV!=="production"&&$c(`Not found '${v}' modifier for the linked message of '${y}' key. Use a built-in modifier, or set a custom modifier with 'modifiers' option. So the linked message is used as is.`),U)},message:u,type:b,interpolate:_,normalize:m,values:Ot(nt(),s,c,d?{count:f("count"),n:f("n")}:{})};return h}const q2=()=>"",Mr=e=>ct(e),Nc=e=>he(e)||uo(e)||Mr(e);function H2(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:o,messageCompiler:i,fallbackLocale:s,messages:l}=e,[c,d]=np(...t),f=rt(d.missingWarn)?d.missingWarn:e.missingWarn,u=rt(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,p=rt(d.escapeParameter)?d.escapeParameter:e.escapeParameter,m=!!d.resolvedMessage,_=he(d.default)||rt(d.default)?rt(d.default)?i?c:()=>c:d.default:n?i?c:()=>c:null,b=n||_!=null&&(he(_)||ct(_)),g=Kf(e,d);p&&BC(d);let[h,y,E]=m?[c,g,Yt(l,g)||nt()]:W2(e,c,g,s,u,f),$=h,O=c;if(!m&&!Nc($)&&b&&($=_,O=$),!m&&(!Nc($)||!he(y)))return o?kc:c;process.env.NODE_ENV!=="production"&&he($)&&e.messageCompiler==null&&Tn("The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function returns the message as is.");let N=!1;const v=()=>{N=!0},B=Mr($)?$:G2(e,c,y,$,O,v);if(N)return $;const H=zC(e,y,E,d),U=FC(H),C=UC(e,B,U);let A=r?r(C,c):C;if(p&&he(A)&&(A=fI(A)),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const R={timestamp:Date.now(),key:he(c)?c:Mr($)?$.key:"",locale:y||(Mr($)?$.locale:""),format:he($)?$:Mr($)?$.source:"",message:A};R.meta=Ot({},e.__meta,NC()||{}),iC(R)}return A}function BC(e){if(ht(e.list)&&(e.list=e.list.map(t=>he(t)?t2(t):t)),He(e.named)){const t=e.named,n=nt();for(const r of Object.keys(t)){const o=t[r];n[r]=he(o)?t2(o):o}e.named=n}}function W2(e,t,n,r,o,i){const{messages:s,onWarn:l,messageResolver:c,localeFallbacker:d}=e,f=d(e,r,n);let u=nt(),p,m=null,_=n,b=null;const g="translate";for(let h=0;h<f.length;h++){p=b=f[h],process.env.NODE_ENV!=="production"&&n!==p&&!x2(n,p)&&Zf(o,t)&&l(mo(Kt.FALLBACK_TO_TRANSLATE,{key:t,target:p}));const y=process.env.NODE_ENV!=="production"?e.__v_emitter:void 0;process.env.NODE_ENV!=="production"&&n!==p&&y&&y.emit("fallback",{type:g,key:t,from:_,to:b,groupId:lo(g,t)}),u=Yt(s,p)||nt();let E=null,$,O;if(process.env.NODE_ENV!=="production"&&tr&&y&&(E=window.performance.now(),$="intlify-message-resolve-start",O="intlify-message-resolve-end",On&&On($)),(m=c(u,t))===null&&(m=Yt(u,t)),process.env.NODE_ENV!=="production"&&tr&&y){const N=window.performance.now();y&&E&&m&&y.emit("message-resolve",{type:"message-resolve",key:t,message:m,time:N-E,groupId:lo(g,t)}),$&&O&&On&&Wo&&(On(O),Wo("intlify message resolve",$,O))}if(Nc(m))break;if(!xC(p,f)){const N=I2(e,t,p,i,g);N!==t&&(m=N)}_=b}return[m,p,u]}function G2(e,t,n,r,o,i){const{messageCompiler:s,warnHtmlMessage:l}=e;if(Mr(r)){const m=r;return m.locale=m.locale||n,m.key=m.key||t,m}if(s==null){const m=(()=>r);return m.locale=n,m.key=t,m}const c=process.env.NODE_ENV!=="production"?e.__v_emitter:void 0;let d=null,f,u;process.env.NODE_ENV!=="production"&&tr&&c&&(d=window.performance.now(),f="intlify-message-compilation-start",u="intlify-message-compilation-end",On&&On(f));const p=s(r,VC(e,n,o,r,l,i));if(process.env.NODE_ENV!=="production"&&tr&&c){const m=window.performance.now();c&&d&&c.emit("message-compilation",{type:"message-compilation",message:r,time:m-d,groupId:lo("translate",t)}),f&&u&&On&&Wo&&(On(u),Wo("intlify message compilation",f,u))}return p.locale=n,p.key=t,p.source=r,p}function UC(e,t,n){const r=process.env.NODE_ENV!=="production"?e.__v_emitter:void 0;let o=null,i,s;process.env.NODE_ENV!=="production"&&tr&&r&&(o=window.performance.now(),i="intlify-message-evaluation-start",s="intlify-message-evaluation-end",On&&On(i));const l=t(n);if(process.env.NODE_ENV!=="production"&&tr&&r){const c=window.performance.now();r&&o&&r.emit("message-evaluation",{type:"message-evaluation",value:l,time:c-o,groupId:lo("translate",t.key)}),i&&s&&On&&Wo&&(On(s),Wo("intlify message evaluation",i,s))}return l}function np(...e){const[t,n,r]=e,o=nt();if(!he(t)&&!xt(t)&&!Mr(t)&&!uo(t))throw Pr(cn.INVALID_ARGUMENT);const i=xt(t)?String(t):(Mr(t),t);return xt(n)?o.plural=n:he(n)?o.default=n:dt(n)&&!Uf(n)?o.named=n:ht(n)&&(o.list=n),xt(r)?o.plural=r:he(r)?o.default=r:dt(r)&&Ot(o,r),[i,o]}function VC(e,t,n,r,o,i){return{locale:t,key:n,warnHtmlMessage:o,onError:s=>{if(i&&i(s),process.env.NODE_ENV!=="production"){const l=jC(r),c=s.location&&l&&KN(l,s.location.start.offset,s.location.end.offset),d=e.__v_emitter;d&&l&&d.emit("compile-error",{message:l,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:lo("translate",n)});const f=`Message compilation error: ${s.message}`;throw new SyntaxError(c?`${f}
|
|
25
25
|
${c}`:f)}throw s},onCacheKey:s=>zN(t,n,s)}}function jC(e){if(he(e))return e;if(e.loc&&e.loc.source)return e.loc.source}function zC(e,t,n,r){const{modifiers:o,pluralRules:i,messageResolver:s,fallbackLocale:l,fallbackWarn:c,missingWarn:d,fallbackContext:f}=e,p={locale:t,modifiers:o,pluralRules:i,messages:(m,_)=>{let b=s(n,m);if(b==null&&(f||_)){const[g,,h]=W2(f||e,m,t,l,c,d);b=g??s(h,m)}if(he(b)||uo(b)){let g=!1;const y=G2(e,m,t,b,m,()=>{g=!0});return g?q2:y}else return Mr(b)?b:q2}};return e.processor&&(p.processor=e.processor),r.list&&(p.list=r.list),r.named&&(p.named=r.named),xt(r.plural)&&(p.pluralIndex=r.plural),p}qI();function qC(){return Y2().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Y2(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const HC=typeof Proxy=="function",WC="devtools-plugin:setup",GC="plugin:settings:set";let Di,rp;function YC(){var e;return Di!==void 0||(typeof window<"u"&&window.performance?(Di=!0,rp=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Di=!0,rp=globalThis.perf_hooks.performance):Di=!1),Di}function KC(){return YC()?rp.now():Date.now()}class XC{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const s in t.settings){const l=t.settings[s];r[s]=l.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let i=Object.assign({},r);try{const s=localStorage.getItem(o),l=JSON.parse(s);Object.assign(i,l)}catch{}this.fallbacks={getSettings(){return i},setSettings(s){try{localStorage.setItem(o,JSON.stringify(s))}catch{}i=s},now(){return KC()}},n&&n.on(GC,(s,l)=>{s===this.plugin.id&&this.fallbacks.setSettings(l)}),this.proxiedOn=new Proxy({},{get:(s,l)=>this.target?this.target.on[l]:(...c)=>{this.onQueue.push({method:l,args:c})}}),this.proxiedTarget=new Proxy({},{get:(s,l)=>this.target?this.target[l]:l==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(l)?(...c)=>(this.targetQueue.push({method:l,args:c,resolve:()=>{}}),this.fallbacks[l](...c)):(...c)=>new Promise(d=>{this.targetQueue.push({method:l,args:c,resolve:d})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function JC(e,t){const n=e,r=Y2(),o=qC(),i=HC&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!i))o.emit(WC,e,t);else{const s=i?new XC(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}}const ZC="11.4.17";function QC(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(co().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(co().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(co().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(co().__INTLIFY_PROD_DEVTOOLS__=!1)}const at={UNEXPECTED_RETURN_TYPE:aC,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function mn(e,...t){return Oi(e,null,process.env.NODE_ENV!=="production"?{messages:K2,args:t}:void 0)}const K2={[at.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[at.INVALID_ARGUMENT]:"Invalid argument",[at.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[at.NOT_INSTALLED]:"Need to install with `app.use` function",[at.UNEXPECTED_ERROR]:"Unexpected error",[at.REQUIRED_VALUE]:"Required in value: {0}",[at.INVALID_VALUE]:"Invalid value",[at.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[at.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[at.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[at.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},op=_r("__translateVNode"),ip=_r("__datetimeParts"),sp=_r("__numberParts"),Dr=_r("__enableEmitter"),Ko=_r("__disableEmitter"),X2=_r("__setPluralRules"),J2=_r("__injectWithOption"),Li=_r("__dispose"),wn={FALLBACK_TO_ROOT:Yo,NOT_FOUND_PARENT_SCOPE:Yo+1,IGNORE_OBJ_FLATTEN:Yo+2,DEPRECATE_LEGACY_MODE:Yo+3,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:Yo+4,DUPLICATE_USE_I18N_CALLING:Yo+5,IGNORE_UNSAFE_LOCALE:Yo+6},ex={[wn.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[wn.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[wn.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[wn.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
26
|
-
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[wn.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[wn.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component.",[wn.IGNORE_UNSAFE_LOCALE]:"Ignore '{locale}' locale: it is a property name of Object.prototype"};function Xo(e,...t){return Ec(ex[e],...t)}let Z2=null;{const e=co().__VUE_INSTANCE_SETTERS__;ht(e)&&e.push(t=>{Z2=t})}function _o(e){return Jg(e)?(process.env.NODE_ENV!=="production"&&Tn(Xo(wn.IGNORE_UNSAFE_LOCALE,{locale:e})),!0):!1}function ka(e){if(!He(e)||uo(e))return e;for(const t in e)if(jn(e,t))if(!t.includes("."))He(e[t])&&ka(e[t]);else{const n=t.split("."),r=n.length-1;let o=e,i=!1;for(let l=0;l<r;l++){if(n[l]==="__proto__")throw new Error(`unsafe key: ${n[l]}`);if(n[l]in o||(o[n[l]]=nt()),!He(o[n[l]])){process.env.NODE_ENV!=="production"&&Tn(Xo(wn.IGNORE_OBJ_FLATTEN,{key:n[l]})),i=!0;break}if(uo(o[n[l]])&&(_2.includes(n[l+1])||n[l+1]==="cacheKey")){i=!0;break}o=o[n[l]]}i||(o[n[r]]=e[t],delete e[t]);const s=o[n[r]];He(s)&&ka(s)}return e}function ap(e,t){const{messages:n,__i18n:r,messageResolver:o,flatJson:i}=t,s=dt(n)?n:ht(r)?nt():{[e]:nt()};if(ht(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:c,resource:d}=l;if(c){if(_o(c))return;s[c]=Yt(s,c)||nt(),vc(d,s[c])}else vc(d,s)}else he(l)&&vc(JSON.parse(l),s)}),o==null&&i)for(const l in s)jn(s,l)&&ka(s[l]);return s}function Q2(e){return e.type}function ey(e,t,n){let r=He(t.messages)?t.messages:nt();"__i18nGlobal"in n&&(r=ap(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(i=>{e.mergeLocaleMessage(i,r[i])});{if(He(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(He(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function ty(e){return a.createVNode(a.Text,null,e,0)}function Fi(){return Z2??a.getCurrentInstance()}const ny="__INTLIFY_META__",ry=()=>[],tx=()=>!1;let oy=0;function iy(e){return((t,n,r,o)=>e(n,r,Fi()||void 0,o))}const nx=()=>{const e=Fi();let t=null;return e&&(t=Q2(e)[ny])?{[ny]:t}:null};function Ic(e={}){const{__root:t,__injectWithOption:n}=e,r=t===void 0,o=e.flatJson,i=tr?a.ref:a.shallowRef;let s=rt(e.inheritLocale)?e.inheritLocale:!0;const l=i(t&&s?t.locale.value:he(e.locale)?e.locale:wa),c=i(t&&s?t.fallbackLocale.value:he(e.fallbackLocale)||ht(e.fallbackLocale)||dt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),d=i(ap(l.value,e)),f=i(dt(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),u=i(dt(e.numberFormats)?e.numberFormats:{[l.value]:{}});let p=t?t.missingWarn:rt(e.missingWarn)||Go(e.missingWarn)?e.missingWarn:!0,m=t?t.fallbackWarn:rt(e.fallbackWarn)||Go(e.fallbackWarn)?e.fallbackWarn:!0,_=t?t.fallbackRoot:rt(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,g=ct(e.missing)?e.missing:null,h=ct(e.missing)?iy(e.missing):null,y=ct(e.postTranslation)?e.postTranslation:null,E=t?t.warnHtmlMessage:rt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,$=!!e.escapeParameter;const O=t?t.modifiers:dt(e.modifiers)?e.modifiers:{};let N=e.pluralRules||t&&t.pluralRules,v;v=(()=>{r&&k2(null);const G={version:ZC,locale:l.value,fallbackLocale:c.value,messages:d.value,modifiers:O,pluralRules:N,missing:h===null?void 0:h,missingWarn:p,fallbackWarn:m,fallbackFormat:b,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:E,escapeParameter:$,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};G.datetimeFormats=f.value,G.numberFormats=u.value;const re=CC(G);return r&&k2(re),re})(),Ac(v,l.value,c.value);function H(){return[l.value,c.value,d.value,f.value,u.value]}const U=a.computed({get:()=>l.value,set:G=>{v.locale=G,l.value=G}});function C(G){r||(v.fallbackContext=IC());try{return G()}finally{r||(v.fallbackContext=void 0)}}function A(G){C(()=>Ac(v,l.value,G))}const R=a.computed({get:()=>c.value,set:G=>{c.value=G,v.fallbackLocale=c.value,A(c.value)}}),I=a.computed(()=>d.value),V=a.computed(()=>f.value),j=a.computed(()=>u.value);function F(){return ct(y)?y:null}function M(G){y=G,v.postTranslation=G}function Y(){return g}function W(G){G!==null&&(h=iy(G)),g=G,v.missing=h}function K(G,re){return G!=="translate"||!re.resolvedMessage}const te=(G,re,ze,L,z,ne)=>{H();let pe;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,pe=C(()=>G(v))}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__}if(ze!=="translate exists"&&xt(pe)&&pe===kc||ze==="translate exists"&&!pe){const[Ee,Oe]=re();if(process.env.NODE_ENV!=="production"&&t&&he(Ee)&&K(ze,Oe)&&(_&&(Zf(m,Ee)||N2(p,Ee))&&Tn(Xo(wn.FALLBACK_TO_ROOT,{key:Ee,type:ze})),process.env.NODE_ENV!=="production")){const{__v_emitter:Se}=v;Se&&_&&Se.emit("fallback",{type:ze,key:Ee,to:"global",groupId:lo(ze,Ee)})}return t&&_?L(t):z(Ee)}else{if(ne(pe))return pe;throw mn(at.UNEXPECTED_RETURN_TYPE)}};function X(...G){return te(re=>Reflect.apply(H2,null,[re,...G]),()=>np(...G),"translate",re=>Reflect.apply(re.t,re,[...G]),re=>re,re=>he(re))}function oe(...G){const[re,ze,L]=G;if(L&&!He(L))throw mn(at.INVALID_ARGUMENT);return X(re,ze,Ot({resolvedMessage:!0},L||{}))}function fe(...G){return te(re=>Reflect.apply(F2,null,[re,...G]),()=>Qf(...G),"datetime format",re=>Reflect.apply(re.d,re,[...G]),()=>Mi,re=>he(re)||ht(re))}function J(...G){return te(re=>Reflect.apply(V2,null,[re,...G]),()=>ep(...G),"number format",re=>Reflect.apply(re.n,re,[...G]),()=>Mi,re=>he(re)||ht(re))}function ae(G){return G.map(re=>he(re)||xt(re)||rt(re)?ty(String(re)):re)}const $e={normalize:ae,interpolate:G=>G,type:"vnode"};function Ie(...G){return te(re=>{let ze;const L=re;try{L.processor=$e,ze=Reflect.apply(H2,null,[L,...G])}finally{L.processor=null}return ze},()=>np(...G),"translate",re=>re[op](...G),re=>[ty(re)],re=>ht(re))}function je(...G){return te(re=>Reflect.apply(V2,null,[re,...G]),()=>ep(...G),"number format",re=>re[sp](...G),ry,re=>he(re)||ht(re))}function we(...G){return te(re=>Reflect.apply(F2,null,[re,...G]),()=>Qf(...G),"datetime format",re=>re[ip](...G),ry,re=>he(re)||ht(re))}function Le(G){N=G,v.pluralRules=N}function Fe(G,re){const ze=w(G),L=v.messageResolver(ze,re);return L===null?Yt(ze,re):L}function Ye(G,re){return te(()=>{if(!G)return!1;const ze=he(re)?re:l.value,L=he(re)?[ze]:v.localeFallbacker(v,c.value,ze);for(let z=0;z<L.length;z++)if(Nc(Fe(L[z],G)))return!0;return!1},()=>[G],"translate exists",ze=>Reflect.apply(ze.te,ze,[G,re]),tx,ze=>rt(ze))}function ke(G){let re=null;const ze=v.localeFallbacker(v,c.value,l.value);for(let L=0;L<ze.length;L++){const z=Fe(ze[L],G);if(z!=null){re=z;break}}return re}function Ze(G){const re=ke(G);return re??(t?t.tm(G)||{}:{})}function w(G){return Yt(d.value,G)||{}}function T(G,re){_o(G)||(o&&ka(re),d.value[G]=re,v.messages=d.value)}function k(G,re){_o(G)||(d.value[G]=Yt(d.value,G)||{},o&&ka(re),vc(re,d.value[G]),v.messages=d.value)}function q(G){return Yt(f.value,G)||{}}function ee(G,re){_o(G)||(f.value[G]=re,v.datetimeFormats=f.value,U2(v,G,re))}function le(G,re){_o(G)||(f.value[G]=Ot(Yt(f.value,G)||{},re),v.datetimeFormats=f.value,U2(v,G,re))}function ce(G){return Yt(u.value,G)||{}}function ot(G,re){_o(G)||(u.value[G]=re,v.numberFormats=u.value,z2(v,G,re))}function Qe(G,re){_o(G)||(u.value[G]=Ot(Yt(u.value,G)||{},re),v.numberFormats=u.value,z2(v,G,re))}oy++,a.watch(c,()=>A(c.value),{deep:!0,flush:"sync"}),t&&tr&&(a.watch(t.locale,G=>{s&&(l.value=G,v.locale=G,Ac(v,l.value,c.value))}),a.watch(t.fallbackLocale,G=>{s&&(c.value=G,v.fallbackLocale=c.value,Ac(v,l.value,c.value))}));const Ue={id:oy,locale:U,fallbackLocale:R,get inheritLocale(){return s},set inheritLocale(G){s=G,G&&t&&(U.value=t.locale.value,R.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(d.value).sort()},messages:I,get modifiers(){return O},get pluralRules(){return N||{}},get isGlobal(){return r},get missingWarn(){return p},set missingWarn(G){p=G,v.missingWarn=p},get fallbackWarn(){return m},set fallbackWarn(G){m=G,v.fallbackWarn=m},get fallbackRoot(){return _},set fallbackRoot(G){_=G},get fallbackFormat(){return b},set fallbackFormat(G){b=G,v.fallbackFormat=b},get warnHtmlMessage(){return E},set warnHtmlMessage(G){E=G,v.warnHtmlMessage=G},get escapeParameter(){return $},set escapeParameter(G){$=G,v.escapeParameter=G},t:X,getLocaleMessage:w,setLocaleMessage:T,mergeLocaleMessage:k,getPostTranslationHandler:F,setPostTranslationHandler:M,getMissingHandler:Y,setMissingHandler:W,[X2]:Le};return Ue.datetimeFormats=V,Ue.numberFormats=j,Ue.rt=oe,Ue.te=Ye,Ue.tm=Ze,Ue.d=fe,Ue.n=J,Ue.getDateTimeFormat=q,Ue.setDateTimeFormat=ee,Ue.mergeDateTimeFormat=le,Ue.getNumberFormat=ce,Ue.setNumberFormat=ot,Ue.mergeNumberFormat=Qe,Ue[J2]=n,Ue[op]=Ie,Ue[ip]=we,Ue[sp]=je,process.env.NODE_ENV!=="production"&&(Ue[Dr]=G=>{v.__v_emitter=G},Ue[Ko]=()=>{v.__v_emitter=void 0}),Ue}const sy="vue-i18n: composer properties",lp={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},rx={"vue-i18n-resource-inspector":"Search for scopes ..."},ox={"vue-i18n-timeline":16764185};let cp;async function ix(e,t){return new Promise((n,r)=>{try{JC({id:"vue-devtools-plugin-vue-i18n",label:lp["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[sy],app:e},o=>{cp=o,o.on.visitComponentTree(({componentInstance:s,treeNode:l})=>{sx(s,l,t)}),o.on.inspectComponent(({componentInstance:s,instanceData:l})=>{s.__VUE_I18N__&&l&&(t.mode==="legacy"?s.__VUE_I18N__!==t.global.__composer&&ly(l,s.__VUE_I18N__):ly(l,s.__VUE_I18N__))}),o.addInspector({id:"vue-i18n-resource-inspector",label:lp["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:rx["vue-i18n-resource-inspector"]}),o.on.getInspectorTree(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&ux(s,t)});const i=new Map;o.on.getInspectorState(async s=>{if(s.app===e&&s.inspectorId==="vue-i18n-resource-inspector")if(o.unhighlightElement(),px(s,t),s.nodeId==="global"){if(!i.has(s.app)){const[l]=await o.getComponentInstances(s.app);i.set(s.app,l)}o.highlightElement(i.get(s.app))}else{const l=fx(s.nodeId,t);l&&o.highlightElement(l)}}),o.on.editInspectorState(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&_x(s,t)}),o.addTimelineLayer({id:"vue-i18n-timeline",label:lp["vue-i18n-timeline"],color:ox["vue-i18n-timeline"]}),n(!0)})}catch(o){console.error(o),r(!1)}})}function ay(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function sx(e,t,n){const r=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.__VUE_I18N__&&e.__VUE_I18N__!==r){const o={label:`i18n (${ay(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(o)}}function ly(e,t){const n=sy;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:dp(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function dp(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];ct(r)&&"source"in r?t[n]=dx(r):uo(r)&&r.loc&&r.loc.source?t[n]=r.loc.source:He(r)?t[n]=dp(r):t[n]=r}),t}const ax={"<":"<",">":">",'"':""","&":"&"};function lx(e){return e.replace(/[<>"&]/g,cx)}function cx(e){return ax[e]||e}function dx(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${lx(e.source)}")`:"(?)"}`}}}function ux(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[r,o]of t.__instances){const i=t.mode==="composition"?o:o.__composer;n!==i&&e.rootNodes.push({id:i.id.toString(),label:`${ay(r)} Scope`})}}function fx(e,t){let n=null;if(e!=="global"){for(const[r,o]of t.__instances.entries())if(o.id.toString()===e){n=r;break}}return n}function cy(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(r=>r.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function px(e,t){const n=cy(e.nodeId,t);return n&&(e.state=mx(n)),null}function mx(e){const t={},n="Locale related info",r=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=r;const o="Locale messages info",i=[{type:o,key:"messages",editable:!1,value:dp(e.messages.value)}];t[o]=i;{const s="Datetime formats info",l=[{type:s,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[s]=l;const c="Datetime formats info",d=[{type:c,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[c]=d}return t}function Jo(e,t){if(cp){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),cp.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function _x(e,t){const n=cy(e.nodeId,t);if(n){const[r]=e.path;r==="locale"&&he(e.state.value)?n.locale.value=e.state.value:r==="fallbackLocale"&&(he(e.state.value)||ht(e.state.value)||He(e.state.value))?n.fallbackLocale.value=e.state.value:r==="inheritLocale"&&rt(e.state.value)&&(n.inheritLocale=e.state.value)}}const up=new WeakMap;function Bi(e){if(!Go(e))return!e;let t=up.get(e);return t||(t=new RegExp(`^(?![\\s\\S]*(?:${e.source}))`,e.flags.replace(/[gy]/g,"")),up.set(e,t),up.set(t,e)),t}function hx(e){const t=he(e.locale)?e.locale:wa,n=he(e.fallbackLocale)||ht(e.fallbackLocale)||dt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=ct(e.missing)?e.missing:void 0,o=rt(e.silentTranslationWarn)||Go(e.silentTranslationWarn)?Bi(e.silentTranslationWarn):!0,i=rt(e.silentFallbackWarn)||Go(e.silentFallbackWarn)?Bi(e.silentFallbackWarn):!0,s=rt(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,c=dt(e.modifiers)?e.modifiers:{},d=e.pluralizationRules,f=ct(e.postTranslation)?e.postTranslation:void 0,u=he(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,p=!!e.escapeParameterHtml,m=rt(e.sync)?e.sync:!0;let _=e.messages;if(dt(e.sharedMessages)){const O=e.sharedMessages;_=Object.keys(O).reduce((v,B)=>{if(_o(B))return v;const H=Yt(v,B)||(v[B]={});return Ot(H,O[B]),v},_||{})}const{__i18n:b,__root:g,__injectWithOption:h}=e,y=e.datetimeFormats,E=e.numberFormats,$=e.flatJson;return{locale:t,fallbackLocale:n,messages:_,flatJson:$,datetimeFormats:y,numberFormats:E,missing:r,missingWarn:o,fallbackWarn:i,fallbackRoot:s,fallbackFormat:l,modifiers:c,pluralRules:d,postTranslation:f,warnHtmlMessage:u,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:m,__i18n:b,__root:g,__injectWithOption:h}}function fp(e={}){const t=Ic(hx(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(o){t.locale.value=o},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(o){t.fallbackLocale.value=o},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(o){t.setMissingHandler(o)},get silentTranslationWarn(){return Bi(t.missingWarn)},set silentTranslationWarn(o){t.missingWarn=Bi(o)},get silentFallbackWarn(){return Bi(t.fallbackWarn)},set silentFallbackWarn(o){t.fallbackWarn=Bi(o)},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(o){t.fallbackFormat=o},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(o){t.setPostTranslationHandler(o)},get sync(){return t.inheritLocale},set sync(o){t.inheritLocale=o},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(o){t.warnHtmlMessage=o!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(o){t.escapeParameter=o},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...o){return Reflect.apply(t.t,t,[...o])},rt(...o){return Reflect.apply(t.rt,t,[...o])},te(o,i){return t.te(o,i)},tm(o){return t.tm(o)},getLocaleMessage(o){return t.getLocaleMessage(o)},setLocaleMessage(o,i){t.setLocaleMessage(o,i)},mergeLocaleMessage(o,i){t.mergeLocaleMessage(o,i)},d(...o){return Reflect.apply(t.d,t,[...o])},getDateTimeFormat(o){return t.getDateTimeFormat(o)},setDateTimeFormat(o,i){t.setDateTimeFormat(o,i)},mergeDateTimeFormat(o,i){t.mergeDateTimeFormat(o,i)},n(...o){return Reflect.apply(t.n,t,[...o])},getNumberFormat(o){return t.getNumberFormat(o)},setNumberFormat(o,i){t.setNumberFormat(o,i)},mergeNumberFormat(o,i){t.mergeNumberFormat(o,i)}};return r.__extender=n,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=o=>{const i=t;i[Dr]&&i[Dr](o)},r.__disableEmitter=()=>{const o=t;o[Ko]&&o[Ko]()}),r}function gx(e,t,n){return{beforeCreate(){const r=Fi();if(!r)throw mn(at.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const i=Ot({},o.i18n);if(o.__i18n&&(i.__i18n=o.__i18n),i.__root=t,this===this.$root)this.$i18n=dy(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=fp(i);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=dy(e,o);else{this.$i18n=fp({__i18n:o.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;o.__i18nGlobal&&ey(t,o,o),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$te=(i,s)=>this.$i18n.te(i,s),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$i18n){const r=Fi();if(!r)return;const o=this.$i18n;r.__VUE_I18N__=o.__composer;const i=this.__v_emitter=Sc();o.__enableEmitter&&o.__enableEmitter(i),i.on("*",Jo)}},unmounted(){const r=Fi();if(!r)throw mn(at.UNEXPECTED_ERROR);const o=this.$i18n;process.env.NODE_ENV!=="production"&&r.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Jo),delete this.__v_emitter),o&&(o.__disableEmitter&&o.__disableEmitter(),delete r.__VUE_I18N__)),o&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,o?.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),n.__deleteInstance(r),delete this.$i18n)}}}function dy(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[X2](t.pluralizationRules||e.pluralizationRules);const n=ap(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const pp={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function yx({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,o)=>[...r,...o.type===a.Fragment?o.children:[o]],[]):t.reduce((n,r)=>{const o=e[r];return o&&(n[r]=o()),n},nt())}function uy(){return a.Fragment}const fy=a.defineComponent({name:"i18n-t",props:Ot({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>xt(e)||!isNaN(e)}},pp),setup(e,t){const{slots:n,attrs:r}=t,o=e.i18n||mp({useScope:e.scope,__useComponent:!0});return()=>{const i=()=>{const c=Object.keys(n).filter(u=>u[0]!=="_"),d=nt();e.locale&&(d.locale=e.locale),e.plural!==void 0&&(d.plural=he(e.plural)?+e.plural:e.plural);const f=yx(t,c);return o[op](e.keypath,f,d)},s=Ot(nt(),r),l=he(e.tag)||He(e.tag)?e.tag:uy();return He(l)?a.h(l,s,{default:i}):a.h(l,s,i())}}});function bx(e){return ht(e)&&!he(e[0])}function py(e,t,n,r){const{slots:o,attrs:i}=t;return()=>{const s=()=>{const d={part:!0};let f=nt();e.locale&&(d.locale=e.locale),he(e.format)?d.key=e.format:He(e.format)&&(he(e.format.key)&&(d.key=e.format.key),f=Object.keys(e.format).reduce((m,_)=>n.includes(_)?Ot(nt(),m,{[_]:e.format[_]}):m,nt()));const u=r(e.value,d,f);let p=[d.key];return ht(u)?p=u.map((m,_)=>{const b=o[m.type],g=b?b({[m.type]:m.value,index:_,parts:u}):[m.value];return bx(g)&&(g[0].key=`${m.type}-${_}`),g}):he(u)&&(p=[u]),p},l=Ot(nt(),i),c=he(e.tag)||He(e.tag)?e.tag:uy();return He(c)?a.h(c,l,{default:s}):a.h(c,l,s())}}const my=a.defineComponent({name:"i18n-n",props:Ot({value:{type:Number,required:!0},format:{type:[String,Object]}},pp),setup(e,t){const n=e.i18n||mp({useScope:e.scope,__useComponent:!0});return py(e,t,j2,(...r)=>n[sp](...r))}});function Ex(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function $x(e){const t=s=>{process.env.NODE_ENV!=="production"&&$c(Xo(wn.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:l,value:c}=s;if(!l||!l.$)throw mn(at.UNEXPECTED_ERROR);const d=Ex(e,l.$),f=_y(c);return[Reflect.apply(d.t,d,[...hy(f)]),d]};return{created:(s,l)=>{const[c,d]=t(l);tr&&(s.__i18nWatcher=a.watch(d.locale,()=>{l.instance&&l.instance.$forceUpdate()})),s.__composer=d,s.textContent=c},unmounted:s=>{tr&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:l})=>{if(s.__composer){const c=s.__composer,d=_y(l);s.textContent=Reflect.apply(c.t,c,[...hy(d)])}},getSSRProps:s=>{const[l]=t(s);return{textContent:l}}}}function _y(e){if(he(e))return{path:e};if(dt(e)){if(!("path"in e))throw mn(at.REQUIRED_VALUE,"path");return e}else throw mn(at.INVALID_VALUE)}function hy(e){const{path:t,locale:n,args:r,choice:o,plural:i}=e,s={},l=r||{};return he(n)&&(s.locale=n),xt(o)&&(s.plural=o),xt(i)&&(s.plural=i),[t,l,s]}function Sx(e,t,...n){const r=dt(n[0])?n[0]:{};(rt(r.globalInstall)?r.globalInstall:!0)&&([fy.name,"I18nT"].forEach(i=>e.component(i,fy)),[my.name,"I18nN"].forEach(i=>e.component(i,my)),[by.name,"I18nD"].forEach(i=>e.component(i,by))),e.directive("t",$x(t))}const vx=_r("global-vue-i18n");function Tx(e={}){const t=__VUE_I18N_LEGACY_API__&&rt(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&t&&$c(Xo(wn.DEPRECATE_LEGACY_MODE));const n=rt(e.globalInjection)?e.globalInjection:!0,r=new Map,[o,i]=wx(e,t),s=_r(process.env.NODE_ENV!=="production"?"vue-i18n":"");function l(u){return r.get(u)||null}function c(u,p){r.set(u,p)}function d(u){r.delete(u)}const f={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},install(u,...p){if(process.env.NODE_ENV!=="production"&&(u.__VUE_I18N__=f),u.__VUE_I18N_SYMBOL__=s,u.provide(u.__VUE_I18N_SYMBOL__,f),dt(p[0])){const b=p[0];f.__composerExtend=b.__composerExtend,f.__vueI18nExtend=b.__vueI18nExtend}let m=null;!t&&n&&(m=Ox(u,f.global)),__VUE_I18N_FULL_INSTALL__&&Sx(u,f,...p),__VUE_I18N_LEGACY_API__&&t&&u.mixin(gx(i,i.__composer,f));const _=u.unmount;u.unmount=()=>{m&&m(),f.dispose(),_()},process.env.NODE_ENV!=="production"&&ix(u,f).then(b=>{if(!b)throw mn(at.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const g=Sc();if(t){const h=i;h.__enableEmitter&&h.__enableEmitter(g)}else{const h=i;h[Dr]&&h[Dr](g)}g.on("*",Jo)}).catch(()=>{process.env.NODE_ENV!=="production"&&Tn(K2[at.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN])})},get global(){return i},dispose(){o.stop()},__instances:r,__getInstance:l,__setInstance:c,__deleteInstance:d};return f}function mp(e={}){const t=Fi();if(t==null)throw mn(at.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw mn(at.NOT_INSTALLED);const n=kx(t),r=Nx(n),o=Q2(t),i=Ax(e,o);if(i==="global")return ey(r,e,o),r;if(i==="parent"){let c=gy(n,t,e.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&Tn(Xo(wn.NOT_FOUND_PARENT_SCOPE)),c=r),c}if(i==="isolated"){if(n.mode!=="composition")throw mn(at.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const c=n,d=Ot({},e),f=gy(n,t);d.__root=f||r;const u=Ic(d);c.__composerExtend&&(u[Li]=c.__composerExtend(u));let p=null;if(process.env.NODE_ENV!=="production"){p=Sc();const _=u;_[Dr]&&_[Dr](p),p.on("*",Jo)}return a.getCurrentScope()&&a.onScopeDispose(()=>{if(process.env.NODE_ENV!=="production"){p&&p.off("*",Jo);const b=u;b[Ko]&&b[Ko]()}const _=u[Li];_&&(_(),delete u[Li])}),u}const s=n;let l=s.__getInstance(t);if(l==null){const c=Ot({},e);"__i18n"in o&&(c.__i18n=o.__i18n),r&&(c.__root=r),l=Ic(c),s.__composerExtend&&(l[Li]=s.__composerExtend(l)),Cx(s,t,l),s.__setInstance(t,l)}else process.env.NODE_ENV!=="production"&&i==="local"&&Tn(Xo(wn.DUPLICATE_USE_I18N_CALLING));return l}function wx(e,t){const n=a.effectScope(),r=__VUE_I18N_LEGACY_API__&&t?n.run(()=>fp(e)):n.run(()=>Ic(e));if(r==null)throw mn(at.UNEXPECTED_ERROR);return[n,r]}function kx(e){const t=a.inject(e.isCE?vx:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw mn(e.isCE?at.NOT_INSTALLED_WITH_PROVIDE:at.UNEXPECTED_ERROR);return t}function Ax(e,t){return Uf(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Nx(e){return e.mode==="composition"?e.global:e.global.__composer}function gy(e,t,n=!1){let r=null;const o=t.root;let i=Ix(t,n);for(;i!=null;){const s=e;if(e.mode==="composition")r=s.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const l=s.__getInstance(i);l!=null&&(r=l.__composer,n&&r&&!r[J2]&&(r=null))}if(r!=null||o===i)break;i=i.parent}return r}function Ix(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Cx(e,t,n){let r=null;a.onMounted(()=>{if(process.env.NODE_ENV!=="production"){t.__VUE_I18N__=n,r=Sc();const o=n;o[Dr]&&o[Dr](r),r.on("*",Jo)}},t),a.onUnmounted(()=>{const o=n;process.env.NODE_ENV!=="production"&&(r&&r.off("*",Jo),o[Ko]&&o[Ko](),delete t.__VUE_I18N__),e.__deleteInstance(t);const i=o[Li];i&&(i(),delete o[Li])},t)}const xx=["locale","fallbackLocale","availableLocales"],yy=["t","rt","d","n","tm","te"];function Ox(e,t){const n=Object.create(null);return xx.forEach(o=>{const i=Object.getOwnPropertyDescriptor(t,o);if(!i)throw mn(at.UNEXPECTED_ERROR);const s=a.isRef(i.value)?{get(){return i.value.value},set(l){i.value.value=l}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,o,s)}),e.config.globalProperties.$i18n=n,yy.forEach(o=>{const i=Object.getOwnPropertyDescriptor(t,o);if(!i||!i.value)throw mn(at.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,i)}),()=>{delete e.config.globalProperties.$i18n,yy.forEach(o=>{delete e.config.globalProperties[`$${o}`]})}}const by=a.defineComponent({name:"i18n-d",props:Ot({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},pp),setup(e,t){const n=e.i18n||mp({useScope:e.scope,__useComponent:!0});return py(e,t,B2,(...r)=>n[ip](...r))}});if(QC(),TC(nC),wC(EC),kC(dC),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=co();e.__INTLIFY__=!0,rC(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Ey={fr:{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",multiselect_list_empty:"Commencez à taper",champ_obligatoire:"Champs obligatoires",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 chiffres",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 chiffres",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe.</a>",blurry_document:"Ce document nous semble flou. Si vous êtes sûr de sa netteté, vous pouvez continuer, sinon, nous vous conseillons d'envoyer une autre image.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",changez_votre_adresse:"Modifiez votre adresse",N_rue:"Adresse",compl_addresse:"Complément d'adresse",ville:"Ville",code_postal:"Code postal",pays:"Pays",Madame:"Madame",Numero_identification:"Siren ou numéro DUNS *",Monsieur:"Monsieur","Corrigez les erreurs":"Veuillez vérifier les erreurs restantes dans le formulaire.",date_fin_regule_passee:"La date limite de régularisation est dépassée. Le formulaire ne peut plus être soumis.",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",trouvepasreparateur:"Vous ne trouvez pas votre réparateur?",email_reparateur:"Email de votre réparateur *",enseigne_psa:"Nom de la société *",multiple_file_upload_en_cours:"Téléchargement en cours",multiple_file_aucun_fichier:"Aucun fichier",multiple_file_patientez:"Veuillez patienter, un ou plusieurs fichiers sont en cours de téléchargement. Ne validez pas le formulaire avant la fin de l'opération",multiple_file_add_file:"Ajouter un fichier",multiple_file_remove_file:"Retirer un fichier",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo",select_Précisez:"Veuillez préciser",prix_produit_produit:"Produit",prix_produit_reference:"Référence",prix_produit_description:"Description",prix_produit_quantite:"Quantité",prix_produit_prix:"Prix unitaire",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Sélectionnez une option",prix_produit_max_reached:"Limite de {max} produit(s) atteinte",prix_produit_error_select_ref:"Veuillez sélectionner une référence pour le produit {num}",prix_produit_error_select_refs:"Veuillez sélectionner une référence pour les produits {nums}",prix_produit_error_quantity:"Veuillez indiquer une quantité d’au moins 1 pour le produit {num}",prix_produit_error_price:"Le prix du produit {num} est requis",prix_produit_error_min_refs:"Veuillez sélectionner au moins {min} référence(s)","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :",field_required:"Ce champ est obligatoire.",date_invalid:"La date n’est pas valide.",date_after:"La date doit être postérieure au {date}.",date_before:"La date doit être antérieure au {date}.",phone_invalid:"Le numéro de téléphone n’est pas valide.",phone_country_not_accepted:"Le numéro de téléphone n’est pas accepté pour ce pays.",phone_mobile_required:"Veuillez saisir un numéro de téléphone mobile.",phone_fixed_required:"Veuillez saisir un numéro de téléphone fixe.",iban_invalid:"L’IBAN saisi n’est pas valide.",iban_country_not_accepted:"Le pays de cet IBAN n’est pas accepté pour cette opération.",postalcode_invalid:"Le code postal n’est pas valide.",unique_email_used:"Cette adresse e-mail a déjà été utilisée pour participer.",unique_phone_used:"Ce numéro de téléphone a déjà été utilisé pour participer.",unique_value_used:"Cette valeur a déjà été utilisée pour participer.",unique_check_failed:"La vérification d’unicité a échoué, veuillez réessayer.",error_title:"Erreur",error_generic:"Une erreur est survenue",prix_produit_add:"Ajouter un produit",prix_produit_remove:"Retirer",file_selected:"1 fichier sélectionné",file_upload_failed:"L’envoi du fichier a échoué.",file_format_not_accepted:"Format non accepté. Formats acceptés : {formats}",file_select_required:"Veuillez sélectionner un fichier",file_upload_button:"Télécharger",file_delete:"Supprimer le fichier",multiple_files_max:"Maximum {max} fichier(s).",multiple_files_drop:"Déposez vos fichiers ou cliquez"},en:{address_required:"The address is required",address_metropolitan_only:"This offer is only valid in mainland France and Corsica.",email_domain_not_allowed:"This email domain is not allowed for this operation.",noticetextlink:"attached notice",suivant:"Next",valider:"Submit",champ_obligatoire:"Required fields",multiselect_list_empty:"Start typing",iban_section_title:"Information on your IBAN",iban_holder:"Account holder",iban_warning:"Since 09/10/2025, the entered IBAN must match the account holder indicated. Any inconsistency may block the transfer.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 digits",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 digits",rgpd:"processes the data collected on the basis of the performance of the contract to manage your participation in this operation. To learn more about how your personal data is managed and to exercise your rights, please refer to the <a href='{link}' target='_blank' id='noticelink'>attached notice</a>.",precedent:"Previous",merci_renseigner_adresse:`Please select a suggested address or click on "I can't find my address"`,trouvepasadresse:"I can't find my address",trouvepasreparateur:"You can't find it?",email_reparateur:"E-mail of your repairer *",enseigne_psa:"Company name *",Numero_identification:"DUNS number *",votre_adresse:"Your address *",changez_votre_adresse:"Edit your address",N_rue:"Number and street name",compl_addresse:"Additional address info",ville:"City",code_postal:"ZIP code",pays:"Country","Corrigez les erreurs":"Please check the remaining errors in the form.",date_fin_regule_passee:"The regularization deadline has passed. The form can no longer be submitted.",Madame:"Mrs.",Monsieur:"Mr.",multiple_file_upload_en_cours:"Upload in progress",multiple_file_aucun_fichier:"No file",multiple_file_patientez:"Please wait, one or more files are being uploaded. Do not submit the form until the operation is complete.",multiple_file_add_file:"Add a file",multiple_file_remove_file:"Remove a file",file_max_size_error:"The file size is too large",file_heic_error:"iPhone .heic files not supported",file_max_size_info:"Maximum file size: {size} MB",select_Précisez:"Please specify",prix_produit_produit:"Product",prix_produit_reference:"Reference",prix_produit_description:"Description",prix_produit_quantite:"Quantity",prix_produit_prix:"Unit price incl. tax",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Select an option",prix_produit_max_reached:"Limit of {max} product(s) reached",prix_produit_error_select_ref:"Please select a reference for product {num}",prix_produit_error_select_refs:"Please select a reference for products {nums}",prix_produit_error_quantity:"Please enter a quantity of at least 1 for product {num}",prix_produit_error_price:"The price of product {num} is required",prix_produit_error_min_refs:"Please select at least {min} reference(s)","Erreurs de validation":"Validation errors","Champs concernés :":"Affected fields:",field_required:"This field is required.",date_invalid:"The date is not valid.",date_after:"The date must be after {date}.",date_before:"The date must be before {date}.",phone_invalid:"The phone number is not valid.",phone_country_not_accepted:"Phone numbers from this country are not accepted.",phone_mobile_required:"Please enter a mobile phone number.",phone_fixed_required:"Please enter a landline number.",iban_invalid:"The IBAN entered is not valid.",iban_country_not_accepted:"IBANs from this country are not accepted for this operation.",postalcode_invalid:"The postcode is not valid.",unique_email_used:"This email address has already been used to take part.",unique_phone_used:"This phone number has already been used to take part.",unique_value_used:"This value has already been used to take part.",unique_check_failed:"The check failed. Please try again.",error_title:"Error",error_generic:"An error has occurred",prix_produit_add:"Add a product",prix_produit_remove:"Remove",file_selected:"1 file selected",file_upload_failed:"The file upload failed.",file_format_not_accepted:"Format not accepted. Accepted formats: {formats}",file_select_required:"Please select a file",file_upload_button:"Upload",file_delete:"Delete file",multiple_files_max:"Maximum {max} file(s).",multiple_files_drop:"Drop your files here or click"},es:{address_required:"La dirección es obligatoria",address_metropolitan_only:"Esta oferta solo es válida en Francia metropolitana y Córcega.",email_domain_not_allowed:"Este dominio de correo electrónico no está permitido para esta operación.",noticetextlink:"aviso adjunto",suivant:"próximo",valider:"Validar",champ_obligatoire:"campos obligatorios",iban_section_title:"Información indicada en su IBAN",iban_holder:"Titular de la cuenta",iban_warning:"Desde el 09/10/2025, el IBAN ingresado debe corresponder al titular de la cuenta indicado. Cualquier inconsistencia puede bloquear la transferencia.",rgpd:"trata los datos recopilados sobre la base de la ejecución del contrato para gestionar su participación en esta operación. Para obtener más información sobre la gestión de sus datos personales y ejercer sus derechos, <a href='{link}' target='_blank' id='noticelink'>consulte el aviso adjunto</a>.",precedent:"anterior",merci_renseigner_adresse:'Introduzca su dirección o haga clic en "No encuentro mi dirección"',votre_adresse:"Tu dirección *",changez_votre_adresse:"Cambie tu dirección",Numero_identification:"TO_TRANSLATE_ES D.U.N.S number *",N_rue:"Número y nombre de la calle",compl_addresse:"Información de dirección adicional",ville:"Ciudad",code_postal:"Código postal",pays:"País",Madame:"Señor",Monsieur:"Señora",trouvepasadresse:"No se pudo encontrar su dirección","Corrigez les erreurs":"Compruebe si hay errores en el formulario",date_fin_regule_passee:"La fecha límite de regularización ha pasado. El formulario ya no puede ser enviado.",trouvepasreparateur:"TO_TRANSLATE_ES_REPARATOR?",enseigne_psa:"TO_TRANSLATE_ES_ENSEIGNE",email_reparateur:"TO_TRANSLATE_ES_E-mail of your repairer *",multiple_file_upload_en_cours:"Subida en curso",multiple_file_aucun_fichier:"Ningún archivo",multiple_file_patientez:"Espere, uno o más archivos se están subiendo. No envíe el formulario hasta que se complete la operación.",multiple_file_add_file:"Agregar un archivo",multiple_file_remove_file:"Eliminar un archivo",file_max_size_error:"El tamaño del archivo es demasiado grande",file_heic_error:"Archivos iPhone .heic no soportados",file_max_size_info:"Tamaño máximo del archivo: {size} MB",select_Précisez:"Por favor, especifique",prix_produit_produit:"Producto",prix_produit_reference:"Referencia",prix_produit_description:"Descripción",prix_produit_quantite:"Cantidad",prix_produit_prix:"Precio unitario con IVA",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Seleccione una opción",prix_produit_max_reached:"Límite de {max} producto(s) alcanzado",prix_produit_error_select_ref:"Seleccione una referencia para el producto {num}",prix_produit_error_select_refs:"Seleccione una referencia para los productos {nums}",prix_produit_error_quantity:"Indique una cantidad de al menos 1 para el producto {num}",prix_produit_error_price:"El precio del producto {num} es obligatorio",prix_produit_error_min_refs:"Seleccione al menos {min} referencia(s)","Erreurs de validation":"Errores de validación","Champs concernés :":"Campos afectados:",field_required:"Este campo es obligatorio.",date_invalid:"La fecha no es válida.",date_after:"La fecha debe ser posterior al {date}.",date_before:"La fecha debe ser anterior al {date}.",phone_invalid:"El número de teléfono no es válido.",phone_country_not_accepted:"No se aceptan números de teléfono de este país.",phone_mobile_required:"Introduzca un número de teléfono móvil.",phone_fixed_required:"Introduzca un número de teléfono fijo.",iban_invalid:"El IBAN introducido no es válido.",iban_country_not_accepted:"No se aceptan IBAN de este país para esta operación.",postalcode_invalid:"El código postal no es válido.",unique_email_used:"Esta dirección de correo electrónico ya se ha utilizado para participar.",unique_phone_used:"Este número de teléfono ya se ha utilizado para participar.",unique_value_used:"Este valor ya se ha utilizado para participar.",unique_check_failed:"No se ha podido realizar la comprobación. Inténtelo de nuevo.",error_title:"Error",error_generic:"Se ha producido un error",prix_produit_add:"Añadir un producto",prix_produit_remove:"Eliminar",file_selected:"1 archivo seleccionado",file_upload_failed:"No se ha podido subir el archivo.",file_format_not_accepted:"Formato no aceptado. Formatos aceptados: {formats}",file_select_required:"Seleccione un archivo",file_upload_button:"Subir",file_delete:"Eliminar el archivo",multiple_files_max:"Máximo {max} archivo(s).",multiple_files_drop:"Arrastre sus archivos aquí o haga clic"},"es-cat":{address_required:"L'adreça és obligatòria",address_metropolitan_only:"Aquesta oferta només és vàlida a França metropolitana i Còrsega.",email_domain_not_allowed:"Aquest domini de correu electrònic no està permès per a aquesta operació.",noticetextlink:"avís adjunt",suivant:"Próximo",valider:"ubmitos",champ_obligatoire:"TO_TRANSLATE_ES CHAMPOS OBLIGANDO",iban_section_title:"Informació indicada al vostre IBAN",iban_holder:"Titular del compte",iban_warning:"Des del 09/10/2025, l'IBAN introduït ha de correspondre amb el titular del compte indicat. Qualsevol inconsistència pot bloquejar la transferència.",rgpd:"tracta les dades recollides sobre la base de l’execució del contracte per gestionar la vostra participació en aquesta operació. Per obtenir més informació sobre la gestió de les vostres dades personals i exercir els vostres drets, <a href='{link}' target='_blank' id='noticelink'>consulteu l'avís adjunt</a>.",precedent:"TO_TRANSLATE_ES PRECEDENTOS",merci_renseigner_adresse:'TO_TRANSLATE_ES Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Adreça *",N_rue:"Carrer i número de casa",compl_addresse:"Informació addicional sobre l'adreça",ville:"TO_TRANSLATE_ES Ville",code_postal:"TO_TRANSLATE_ES Code postal",pays:"País",Numero_identification:"TO_TRANSLATE_ES_D.U.N.S number *",Madame:"TO_TRANSLATE_ES Madame",Monsieur:"TO_TRANSLATE_ES Monsieur",trouvepasreparateur:"TO_TRANSLATE_CAT_REPARATOR?","Corrigez les erreurs":"Compruebe si hay errores en el formulario",email_reparateur:"TO_TRANSLATE_CAT_E-mail of your repairer *",enseigne_psa:"TO_TRANSLATE_CAT_ENSEIGNE",file_max_size_error:"El tamaño del archivo es demasiado grande",file_heic_error:"Arxius iPhone .heic no compatibles",file_max_size_info:"Mida màxima del fitxer: {size} MB","Erreurs de validation":"Errors de validació","Champs concernés :":"Camps afectats:"},de:{address_required:"Die Adresse ist erforderlich",address_metropolitan_only:"Dieses Angebot gilt nur im französischen Festland und auf Korsika.",email_domain_not_allowed:"Diese E-Mail-Domain ist für diesen Vorgang nicht erlaubt.",noticetextlink:"beigefügte Mitteilung",suivant:"Weiter",valider:"validate",champ_obligatoire:"Pflichtangabe",iban_section_title:"Angaben auf Ihrer IBAN",iban_holder:"Kontoinhaber",iban_warning:"Seit dem 09.10.2025 muss die eingegebene IBAN dem angegebenen Kontoinhaber entsprechen. Jegliche Unstimmigkeit kann die Überweisung blockieren.",rgpd:"verarbeitet die erhobenen Daten auf Grundlage der Vertragserfüllung, um Ihre Teilnahme an dieser Aktion zu bearbeiten. Weitere Informationen zum Umgang mit Ihren personenbezogenen Daten und zur Ausübung Ihrer Rechte finden Sie in der <a href='{link}' target='_blank' id='noticelink'>beigefügten Mitteilung</a>.",multiselect_list_empty:"Mit der Eingabe beginnen",precedent:"zurück",blurry_document:"Dieses Dokument scheint unscharf zu sein. Wir empfehlen Ihnen, ein anderes Bild zu senden, um zu vermeiden, dass die Bewerbung abgelehnt wird.",merci_renseigner_adresse:'Bitte geben Sie Ihre Adresse ein, oder klicken Sie auf "Ich kann meine Adresse nicht finden".',votre_adresse:"Ihre Adresse *",changez_votre_adresse:"Ändern Sie Ihre Adresse",N_rue:"Strasse und Hausnummer *",compl_addresse:"Adresszusatz",Numero_identification:"Identifikationsnummer*",ville:"Ort",code_postal:"Postleitzahl",pays:"Land",Madame:"Frau",Monsieur:"Herr",trouvepasadresse:" Sie finden Ihre Adresse nicht?","Corrigez les erreurs":"Bitte überprüfen Sie Ihre eingabe.",trouvepasreparateur:"Sie finden Ihre reparatur nicht?",email_reparateur:"E-Mail Adresse *",enseigne_psa:"Firmenamme *",multiple_file_upload_en_cours:"Upload läuft",multiple_file_aucun_fichier:"Keine Datei",multiple_file_patientez:"Bitte warten Sie, eine oder mehrere Dateien werden hochgeladen. Senden Sie das Formular nicht ab, bevor der Vorgang abgeschlossen ist.",multiple_file_add_file:"Datei hinzufügen",multiple_file_remove_file:"Datei entfernen",file_max_size_error:"Die Dateigröße ist zu groß",file_heic_error:"iPhone .heic Dateien werden nicht unterstützt",file_max_size_info:"Maximale Dateigröße: {size} MB",select_Précisez:"Bitte präzisieren",prix_produit_produit:"Produkt",prix_produit_reference:"Referenz",prix_produit_description:"Beschreibung",prix_produit_quantite:"Menge",prix_produit_prix:"Stückpreis inkl. MwSt.",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Option auswählen",prix_produit_max_reached:"Limit von {max} Produkt(en) erreicht",prix_produit_error_select_ref:"Bitte wählen Sie eine Referenz für Produkt {num}",prix_produit_error_select_refs:"Bitte wählen Sie eine Referenz für die Produkte {nums}",prix_produit_error_quantity:"Bitte geben Sie für Produkt {num} eine Menge von mindestens 1 an",prix_produit_error_price:"Der Preis von Produkt {num} ist erforderlich",prix_produit_error_min_refs:"Bitte wählen Sie mindestens {min} Referenz(en)","Erreurs de validation":"Validierungsfehler","Champs concernés :":"Betroffene Felder:",date_fin_regule_passee:"Die Frist für die Nachreichung ist abgelaufen. Das Formular kann nicht mehr abgeschickt werden.",field_required:"Dies ist ein Pflichtfeld.",date_invalid:"Das Datum ist ungültig.",date_after:"Das Datum muss nach dem {date} liegen.",date_before:"Das Datum muss vor dem {date} liegen.",phone_invalid:"Die Telefonnummer ist ungültig.",phone_country_not_accepted:"Telefonnummern aus diesem Land werden nicht akzeptiert.",phone_mobile_required:"Bitte geben Sie eine Mobilfunknummer ein.",phone_fixed_required:"Bitte geben Sie eine Festnetznummer ein.",iban_invalid:"Die eingegebene IBAN ist ungültig.",iban_country_not_accepted:"IBANs aus diesem Land werden für diese Aktion nicht akzeptiert.",postalcode_invalid:"Die Postleitzahl ist ungültig.",unique_email_used:"Diese E-Mail-Adresse wurde bereits für eine Teilnahme verwendet.",unique_phone_used:"Diese Telefonnummer wurde bereits für eine Teilnahme verwendet.",unique_value_used:"Dieser Wert wurde bereits für eine Teilnahme verwendet.",unique_check_failed:"Die Überprüfung ist fehlgeschlagen. Bitte versuchen Sie es erneut.",error_title:"Fehler",error_generic:"Ein Fehler ist aufgetreten",prix_produit_add:"Produkt hinzufügen",prix_produit_remove:"Entfernen",file_selected:"1 Datei ausgewählt",file_upload_failed:"Das Hochladen der Datei ist fehlgeschlagen.",file_format_not_accepted:"Format nicht zulässig. Zulässige Formate: {formats}",file_select_required:"Bitte wählen Sie eine Datei aus",file_upload_button:"Hochladen",file_delete:"Datei löschen",multiple_files_max:"Maximal {max} Datei(en).",multiple_files_drop:"Dateien hierher ziehen oder klicken"},nl:{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",multiselect_list_empty:"Begin met typen",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"verwerkt de verzamelde gegevens op basis van de uitvoering van de overeenkomst om uw deelname aan deze actie te beheren. Voor meer informatie over het beheer van uw persoonsgegevens en om uw rechten uit te oefenen, verwijzen wij u naar de <a href='{link}' target='_blank' id='noticelink'>bijgevoegde kennisgeving</a>.",champ_obligatoire:"verplichte velden",blurry_document:"Dit document ziet er wazig uit, wij adviseren u een andere afbeelding te sturen om te voorkomen dat het bestand wordt geweigerd.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Uw adres *",changez_votre_adresse:"Uw adres wijzigen",N_rue:"Straatnaam en huisnummer",compl_addresse:"Aanvullende adresinformatie",ville:"Stad",code_postal:"Postcode",pays:"Land",Madame:"Mevr",Monsieur:"Man","Corrigez les erreurs":"Controleer de resterende fouten in het formulier.",Numero_identification:"D.U.N.S nummer * (Identificatienummer)",trouvepasadresse:"Staat uw adres er niet bij?",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",email_reparateur:"Reparateur email *",enseigne_psa:"bedrijfsnaam *",multiple_file_upload_en_cours:"Upload bezig",multiple_file_aucun_fichier:"Geen bestand",multiple_file_patientez:"Even geduld aub, één of meerdere bestanden worden geüpload. Verzend het formulier niet voordat de operatie voltooid is.",multiple_file_add_file:"Bestand toevoegen",multiple_file_remove_file:"Bestand verwijderen",file_max_size_error:"De bestandsgrootte is te groot",file_heic_error:"iPhone .heic bestanden worden niet ondersteund",file_max_size_info:"Maximale bestandsgrootte: {size} MB",select_Précisez:"Gelieve te specificeren",prix_produit_produit:"Product",prix_produit_reference:"Referentie",prix_produit_description:"Beschrijving",prix_produit_quantite:"Aantal",prix_produit_prix:"Eenheidsprijs incl. btw",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Selecteer een optie",prix_produit_max_reached:"Limiet van {max} product(en) bereikt",prix_produit_error_select_ref:"Selecteer een referentie voor product {num}",prix_produit_error_select_refs:"Selecteer een referentie voor producten {nums}",prix_produit_error_quantity:"Het aantal van product {num} is vereist",prix_produit_error_price:"De prijs van product {num} is vereist",prix_produit_error_min_refs:"Selecteer minstens {min} referentie(s)","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:"},"lu-fr":{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",champ_obligatoire:"Champ obligatoire",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe</a>.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",N_rue:"N°, rue",compl_addresse:"Complément d'adresse",ville:"Ville",Numero_identification:"Numéro D.U.N.S *",code_postal:"Code postal *",pays:"Pays",Madame:"Madame",Monsieur:"Monsieur",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",email_reparateur:"email de votre réparateur *",enseigne_psa:"Nom de la société *",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :"},"lu-nl":{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",champ_obligatoire:"verplichte velden",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"behandelt d'Donnéeën, déi op Basis vun der Ausféierung vum Kontrakt gesammelt goufen, fir Är Participatioun un dëser Aktioun ze verwalten. Fir méi Informatiounen iwwer den Ëmgank mat Ären perséinlechen Daten a fir Är Rechter auszeüben, kuckt w.e.g. <a href='{link}' target='_blank' id='noticelink'>an d'ugeschloss Notiz</a>.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Jouw adres *",N_rue:"Straat en huisnummer",compl_addresse:"Aanvullende adresgegevens",ville:"Stad",code_postal:"Postcode",pays:"Land",Madame:"Mevr",Monsieur:"Man",Numero_identification:"D.U.N.S nummer *",trouvepasadresse:"Vind je je adres niet ?",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",email_reparateur:"Reparateur e-mail*",enseigne_psa:"bedrijfsnaam *",file_max_size_error:"De bestandsgrootte is te groot",file_heic_error:"iPhone .heic bestanden worden niet ondersteund",file_max_size_info:"Maximale bestandsgrootte: {size} MB","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:"},"be-fr":{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",champ_obligatoire:"Champ obligatoire",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe</a>.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",N_rue:"N°, rue",compl_addresse:"Complément d'adresse",ville:"Ville",code_postal:"Code postal",pays:"Pays",Madame:"Madame",Monsieur:"Monsieur",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",enseigne_psa:"Nom de la société * ",Numero_identification:"numéro DUNS *",email_reparateur:"Email de votre réparateur *",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :"},"be-nl":{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",champ_obligatoire:"verplichte velden",multiselect_list_empty:"Begin met typen",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"verwerkt de verzamelde gegevens op basis van de uitvoering van de overeenkomst om uw deelname aan deze actie te beheren. Voor meer informatie over het beheer van uw persoonlijke gegevens en om uw rechten uit te oefenen, raadpleeg de <a href='{link}' target='_blank' id='noticelink'>bijgevoegde mededeling</a>.",blurry_document:"Dit document ziet er wazig uit, wij adviseren u een andere afbeelding te sturen om te voorkomen dat het bestand wordt geweigerd.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Uw adres *","modifier votre adresse":"Uw adres wijzigen",N_rue:"Straatnaam en huisnummer",compl_addresse:"Aanvullende adresgegevens",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",enseigne_psa:"bedrijfsnaam *",ville:"Plaats",code_postal:"Postcode",pays:"Land",Numero_identification:"D.U.N.S nummer *",Madame:"Mevr",Monsieur:"Man",trouvepasadresse:"Vind je je adres niet ?",email_reparateur:"Reparateur e-mail*","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:"},sl:{address_required:"Naslov je obvezen",address_metropolitan_only:"Ta ponudba velja samo za celinsko Francijo in Korziko.",noticetextlink:"priložené oznámenie",suivant:"TO_TRANSLATE_SL Suivant",valider:"TO_TRANSLATE_SL Valider",champ_obligatoire:"obvezna polja",iban_section_title:"Informacije navedene na vašem IBAN",iban_holder:"Imetnik računa",iban_warning:"Od 09/10/2025 mora vneseni IBAN ustrezati navedenemu imetniku računa. Vsaka neskladnost lahko blokira prenos.",precedent:"TO_TRANSLATE_SL Précédent",merci_renseigner_adresse:"Vnesite svoj naslov ali pa kliknite možnost »Ne najdem svojega naslova«",votre_adresse:"POŠTNI NASLOV *",N_rue:"Številka ulice",compl_addresse:"Dodatni naslov",ville:"Kraj",code_postal:"Poštna številka",pays:"Država",Madame:"Gospa",Monsieur:"Gospod",Numero_identification:"TO_TRANSLATE_SL_D.U.N.S nummer *",trouvepasadresse:"Ne najdem svojega naslova",trouvepasreparateur:"TO_TRANSLATE_SL_REPARATOR?",enseigne_psa:"TO_TRANSLATE_SL_ENSEIGNE",email_reparateur:"TO_TRANSLATE_SL_Email de votre réparateur *","Erreurs de validation":"Napake pri preverjanju","Champs concernés :":"Vplivana polja:"},bg:{address_required:"Адресът е задължителен",address_metropolitan_only:"Тази оферта е валидна само за континентална Франция и Корсика.",noticetextlink:"приложено известие",suivant:"TO_TRANSLATE_BG Suivant",valider:"TO_TRANSLATE_BG Valider",champ_obligatoire:"задължителни полета",iban_section_title:"Информация посочена във вашия IBAN",iban_holder:"Титуляр на сметката",iban_warning:"От 09/10/2025 въведеният IBAN трябва да съответства на посочения титуляр на сметката. Всяко несъответствие може да блокира превода.",precedent:"TO_TRANSLATE_BG Précédent",merci_renseigner_adresse:"Моля, попълнете адреса си или щракнете върху „Не намирам адреса си“",votre_adresse:"ПОЩЕНСКИ АДРЕС *",N_rue:"Улица, №",compl_addresse:"Други адресни данни",ville:"Град",code_postal:"Пощенски код",pays:"Държава",Madame:"Gospa",Monsieur:"Gospod",Numero_identification:"TO_TRANSLATE_BG_D.U.N.S nummer *",trouvepasadresse:"Не намирате адреса си?",trouvepasreparateur:"TO_TRANSLATE_BG_REPARATOR?",enseigne_psa:"TO_TRANSLATE_BG_ENSEIGNE",email_reparateur:"TO_TRANSLATE_BG_Email de votre réparateur *","Erreurs de validation":"Грешки при валидация","Champs concernés :":"Засегнати полета:"},ro:{address_required:"Adresa este obligatorie",address_metropolitan_only:"Această ofertă este valabilă doar în Franța metropolitană și Corsica.",noticetextlink:"notificare atasata",suivant:"TO_TRANSLATE_RO Suivant",valider:"TO_TRANSLATE_RO Valider",champ_obligatoire:"câmpuri obligatorii",iban_section_title:"Informații indicate pe IBAN-ul dvs.",iban_holder:"Titular de cont",iban_warning:"Din 09/10/2025, IBAN-ul introdus trebuie să corespundă titularului de cont indicat. Orice inconsecvență poate bloca transferul.",precedent:"TO_TRANSLATE_RO Précédent",merci_renseigner_adresse:"Vă rugăm să completați adresa dvs. sau să faceți clic pe „Nu îmi găsesc adresa”",votre_adresse:"ADRESA *",N_rue:"Număr Stradă",compl_addresse:"Alte detalii privind adresa",ville:"Oraș",code_postal:"Cod poștal",pays:"Țara",Madame:"Doamna",Monsieur:"Domnul",Numero_identification:"TO_TRANSLATE_RO_D.U.N.S nummer *",trouvepasadresse:"Nu vă puteți găsi adresa?",trouvepasreparateur:"TO_TRANSLATE_RO_REPARATOR?",enseigne_psa:"TO_TRANSLATE_RO_ENSEIGNE",email_reparateur:"TO_TRANSLATE_RO_Email de votre réparateur *","Erreurs de validation":"Erori de validare","Champs concernés :":"Câmpuri afectate:"},el:{address_required:"Η διεύθυνση είναι υποχρεωτική",address_metropolitan_only:"Η προσφορά ισχύει μόνο για τη μητροπολιτική Γαλλία και την Κορσική.",noticetextlink:"notice ci-jointe",suivant:"TO_TRANSLATE_RO Suivant",valider:"TO_TRANSLATE_RO Valider",champ_obligatoire:"Υποχρεωτικό πεδίο",iban_section_title:"Πληροφορίες που αναγράφονται στο IBAN σας",iban_holder:"Κάτοχος λογαριασμού",iban_warning:"Από τις 09/10/2025, το IBAN που εισάγεται πρέπει να αντιστοιχεί στον υποδεικνυόμενο κάτοχο λογαριασμού. Οποιαδήποτε ασυνέπεια μπορεί να μπλοκάρει τη μεταφορά.",precedent:"TO_TRANSLATE_RO Précédent",merci_renseigner_adresse:'Συμπληρώστε τη διεύθυνσή σας ή κάντε κλικ στο "Δεν μπορώ να βρω τη διεύθυνσή μου"',votre_adresse:"ΤΑΧ/ΚΗ ΔΙΕΥΘΥΝΣΗ *",N_rue:"Οδός και αριθμός",compl_addresse:"Λοιπά στοιχεία διεύθυνσης",ville:"Πόλη",code_postal:"Ταχυδρομικός κώδικας",pays:"Χώρα",Madame:"κυρία",Monsieur:"κύριος",Numero_identification:"TO_TRANSLATE_RO_D.U.N.S nummer *",trouvepasadresse:"Δεν μπορείτε να βρείτε τη διεύθυνσή σας;",trouvepasreparateur:"TO_TRANSLATE_RO_REPARATOR?",enseigne_psa:"TO_TRANSLATE_RO_ENSEIGNE",email_reparateur:"TO_TRANSLATE_RO_Email de votre réparateur *","Erreurs de validation":"Σφάλματα επικύρωσης","Champs concernés :":"Επηρεαζόμενα πεδία:"},it:{address_required:"L'indirizzo è obbligatorio",address_metropolitan_only:"Questa offerta è valida solo in Francia metropolitana e Corsica.",email_domain_not_allowed:"Questo dominio email non è consentito per questa operazione.",multiple_file_remove_file:"Rimuovere un file",multiple_file_add_file:"Aggiungere un file",changez_votre_adresse:"Modifica il tuo indirizzo",noticetextlink:"avviso allegato",suivant:"Successivo",valider:"Confermare",champ_obligatoire:"Campi obbligatori",iban_section_title:"Informazioni indicate sul vostro IBAN",iban_holder:"Titolare del conto",iban_warning:"Dal 09/10/2025, l'IBAN inserito deve corrispondere al titolare del conto indicato. Qualsiasi incoerenza può bloccare il bonifico.",precedent:"Precedente",merci_renseigner_adresse:'Si prega di inserire il proprio indirizzo o cliccare su "Non trovo il mio indirizzo"',votre_adresse:"Il tuo indirizzo",N_rue:"N°, via",compl_addresse:"Complemento d'indirizzo",ville:"Città",code_postal:"Codice di avviamento postale",pays:"Paese",Madame:"Signora",Monsieur:"Signore",Numero_identification:"Numero D.U.N.S *",trouvepasadresse:"Non trovi il tuo indirizzo?",trouvepasreparateur:"RIPARATORE?",enseigne_psa:"INSEGNA",email_reparateur:"Email del tuo riparatore *","Corrigez les erreurs":"Si prega di verificare gli errori rimanenti nel modulo.","Erreurs de validation":"Errori di convalida","Champs concernés :":"Campi interessati:",rgpd:"tratta i dati raccolti sulla base dell'esecuzione del contratto per gestire la sua partecipazione a questa operazione. Per saperne di più sulla gestione dei suoi dati personali e per esercitare i suoi diritti, consulti l'<a href='{link}' target='_blank' id='noticelink'>avviso allegato</a>.",date_fin_regule_passee:"Il termine per la regolarizzazione è scaduto. Il modulo non può più essere inviato.",multiple_file_upload_en_cours:"Caricamento in corso",multiple_file_patientez:"Attendere: uno o più file sono in fase di caricamento. Non convalidare il modulo prima del termine dell'operazione.",file_max_size_error:"Il file è troppo grande",file_heic_error:"I file iPhone .heic non sono supportati",select_Précisez:"Si prega di specificare",prix_produit_produit:"Prodotto",prix_produit_reference:"Riferimento",prix_produit_description:"Descrizione",prix_produit_quantite:"Quantità",prix_produit_prix:"Prezzo unitario IVA inclusa",prix_produit_imei:"IMEI",field_required:"Questo campo è obbligatorio.",date_invalid:"La data non è valida.",date_after:"La data deve essere successiva al {date}.",date_before:"La data deve essere precedente al {date}.",phone_invalid:"Il numero di telefono non è valido.",phone_country_not_accepted:"I numeri di telefono di questo Paese non sono accettati.",phone_mobile_required:"Si prega di inserire un numero di cellulare.",phone_fixed_required:"Si prega di inserire un numero di telefono fisso.",iban_invalid:"L'IBAN inserito non è valido.",iban_country_not_accepted:"Gli IBAN di questo Paese non sono accettati per questa operazione.",postalcode_invalid:"Il codice postale non è valido.",unique_email_used:"Questo indirizzo e-mail è già stato utilizzato per partecipare.",unique_phone_used:"Questo numero di telefono è già stato utilizzato per partecipare.",unique_value_used:"Questo valore è già stato utilizzato per partecipare.",unique_check_failed:"Verifica non riuscita. Si prega di riprovare.",error_title:"Errore",error_generic:"Si è verificato un errore",prix_produit_add:"Aggiungi un prodotto",prix_produit_remove:"Rimuovi",prix_produit_error_quantity:"Si prega di indicare una quantità di almeno 1 per il prodotto {num}",file_selected:"1 file selezionato",file_upload_failed:"Il caricamento del file non è riuscito.",file_format_not_accepted:"Formato non accettato. Formati accettati: {formats}",file_select_required:"Si prega di selezionare un file",file_upload_button:"Carica",file_delete:"Elimina il file",multiple_files_max:"Massimo {max} file.",multiple_files_drop:"Trascina qui i tuoi file o fai clic"},pl:{address_required:"Adres jest wymagany",address_metropolitan_only:"Ta oferta jest ważna tylko we Francji metropolitalnej i na Korsyce.",email_domain_not_allowed:"Ta domena e-mail nie jest dozwolona dla tej operacji.",noticetextlink:"załączoną informacją",suivant:"Następny",valider:"Zatwierdź",champ_obligatoire:"Pola Wymagane",iban_section_title:"Informacje podane na Twoim IBAN",iban_holder:"Posiadacz konta",iban_warning:"Od 09/10/2025 wprowadzony IBAN musi odpowiadać wskazanemu posiadaczowi konta. Wszelkie niezgodności mogą zablokować przelew.",rgpd:"przetwarza zebrane dane na podstawie wykonania umowy w celu zarządzania udziałem w tej akcji. Aby uzyskać więcej informacji na temat zarządzania Państwa danymi osobowymi i skorzystać ze swoich praw, prosimy zapoznać się z <a href='{link}' target='_blank' id='noticelink'>załączoną informacją</a>.",blurry_document:"Ten dokument jest niewyraźny, radzimy wysłać inny obraz, aby uniknąć odrzucenia pliku.",precedent:"Poprzedni",merci_renseigner_adresse:"Wpisz swój adres lub kliknij „Nie mogę znaleźć swojego adresuWpisz swój adres lub kliknij „Nie mogę znaleźć swojego adresu",votre_adresse:"Twój adres",N_rue:"Adres",compl_addresse:"Uzupełnienie adresu",Numero_identification:"Numer identyfikacyjny",ville:"Miasto",code_postal:"Kod pocztowy",pays:"Kraj",Madame:"Pani.",Monsieur:"Pan.",trouvepasadresse:"Nie możesz znaleźć swojego adresu?",trouvepasreparateur:"TO_TRANSLATE_PL_REPARATOR?",email_reparateur:"TO_TRANSLATE_PL_Email de votre réparateur *",enseigne_psa:"TO_TRANSLATE_PL_ENSEIGNE","Erreurs de validation":"Błędy walidacji","Champs concernés :":"Pola, których dotyczy:","Corrigez les erreurs":"Sprawdź pozostałe błędy w formularzu.",date_fin_regule_passee:"Termin na uzupełnienie zgłoszenia minął. Formularza nie można już przesłać.",multiple_file_upload_en_cours:"Przesyłanie w toku",multiple_file_patientez:"Proszę czekać, trwa przesyłanie jednego lub kilku plików. Nie zatwierdzaj formularza przed zakończeniem operacji.",multiple_file_add_file:"Dodaj plik",multiple_file_remove_file:"Usuń plik",file_max_size_error:"Plik jest za duży",file_heic_error:"Pliki iPhone .heic nie są obsługiwane",select_Précisez:"Proszę sprecyzować",prix_produit_produit:"Produkt",prix_produit_reference:"Numer referencyjny",prix_produit_description:"Opis",prix_produit_quantite:"Ilość",prix_produit_prix:"Cena jednostkowa brutto",prix_produit_imei:"IMEI",field_required:"To pole jest wymagane.",date_invalid:"Data jest nieprawidłowa.",date_after:"Data musi być późniejsza niż {date}.",date_before:"Data musi być wcześniejsza niż {date}.",phone_invalid:"Numer telefonu jest nieprawidłowy.",phone_country_not_accepted:"Numery telefonów z tego kraju nie są akceptowane.",phone_mobile_required:"Wpisz numer telefonu komórkowego.",phone_fixed_required:"Wpisz numer telefonu stacjonarnego.",iban_invalid:"Wprowadzony numer IBAN jest nieprawidłowy.",iban_country_not_accepted:"Numery IBAN z tego kraju nie są akceptowane w tej akcji.",postalcode_invalid:"Kod pocztowy jest nieprawidłowy.",unique_email_used:"Ten adres e-mail został już użyty do udziału w akcji.",unique_phone_used:"Ten numer telefonu został już użyty do udziału w akcji.",unique_value_used:"Ta wartość została już użyta do udziału w akcji.",unique_check_failed:"Weryfikacja nie powiodła się. Spróbuj ponownie.",error_title:"Błąd",error_generic:"Wystąpił błąd",prix_produit_add:"Dodaj produkt",prix_produit_remove:"Usuń",prix_produit_error_quantity:"Podaj ilość co najmniej 1 dla produktu {num}",file_selected:"Wybrano 1 plik",file_upload_failed:"Nie udało się przesłać pliku.",file_format_not_accepted:"Niedozwolony format. Dozwolone formaty: {formats}",file_select_required:"Wybierz plik",file_upload_button:"Prześlij",file_delete:"Usuń plik",multiple_files_max:"Maksymalna liczba plików: {max}.",multiple_files_drop:"Przeciągnij pliki tutaj lub kliknij"},pt:{address_required:"O endereço é obrigatório",address_metropolitan_only:"Esta oferta é válida apenas em França metropolitana e na Córsega.",email_domain_not_allowed:"Este domínio de e-mail não é permitido para esta operação.",noticetextlink:"aviso anexado",suivant:"Próximo",valider:"Validar",multiselect_list_empty:"Comece a dactilografar",champ_obligatoire:"Campo obrigatório",iban_section_title:"Informações indicadas no seu IBAN",iban_holder:"Titular da conta",iban_warning:"Desde 09/10/2025, o IBAN inserido deve corresponder ao titular da conta indicado. Qualquer inconsistência pode bloquear a transferência.",rgpd:"processa os dados recolhidos com base na execução do contrato para gerir a sua participação nesta ação. Para saber mais sobre a gestão dos seus dados pessoais e para exercer os seus direitos, consulte o <a href='{link}' target='_blank' id='noticelink'>aviso em anexo</a>.",blurry_document:"Este documento parece desfocado, aconselhamos a enviar outra imagem para evitar que o ficheiro seja recusado",precedent:"Anterior",merci_renseigner_adresse:' Introduzca su dirección o haga clic en "No encuentro mi dirección"',votre_adresse:"O seu endereço",changez_votre_adresse:"Altere o seu endereço",N_rue:"Endereço, linha 1",compl_addresse:"Endereço adicional",Numero_identification:"TO_TRANSLATE_PL_D.U.N.S nummer",ville:"Cidade",code_postal:"Código postal",pays:"País",Madame:"Senhora",Monsieur:"Senhor",trouvepasadresse:"Não consegue encontrar a sua morada?",trouvepasreparateur:"TO_TRANSLATE_PT_REPARATOR?",email_reparateur:"TO_TRANSLATE_PT_Email de votre réparateur *",enseigne_psa:"TO_TRANSLATE_PT_ENSEIGNE","Erreurs de validation":"Erros de validação","Champs concernés :":"Campos afetados:","Corrigez les erreurs":"Por favor, verifique os erros restantes no formulário.",date_fin_regule_passee:"O prazo de regularização terminou. O formulário já não pode ser submetido.",multiple_file_upload_en_cours:"Carregamento em curso",multiple_file_patientez:"Aguarde: um ou mais ficheiros estão a ser carregados. Não valide o formulário antes do fim da operação.",multiple_file_add_file:"Adicionar um ficheiro",multiple_file_remove_file:"Remover um ficheiro",file_max_size_error:"O ficheiro é demasiado grande",file_heic_error:"Ficheiros iPhone .heic não suportados",select_Précisez:"Por favor, especifique",prix_produit_produit:"Produto",prix_produit_reference:"Referência",prix_produit_description:"Descrição",prix_produit_quantite:"Quantidade",prix_produit_prix:"Preço unitário com IVA",prix_produit_imei:"IMEI",field_required:"Este campo é obrigatório.",date_invalid:"A data não é válida.",date_after:"A data deve ser posterior a {date}.",date_before:"A data deve ser anterior a {date}.",phone_invalid:"O número de telefone não é válido.",phone_country_not_accepted:"Não são aceites números de telefone deste país.",phone_mobile_required:"Introduza um número de telemóvel.",phone_fixed_required:"Introduza um número de telefone fixo.",iban_invalid:"O IBAN introduzido não é válido.",iban_country_not_accepted:"Não são aceites IBAN deste país para esta operação.",postalcode_invalid:"O código postal não é válido.",unique_email_used:"Este endereço de e-mail já foi utilizado para participar.",unique_phone_used:"Este número de telefone já foi utilizado para participar.",unique_value_used:"Este valor já foi utilizado para participar.",unique_check_failed:"Não foi possível efetuar a verificação. Tente novamente.",error_title:"Erro",error_generic:"Ocorreu um erro",prix_produit_add:"Adicionar um produto",prix_produit_remove:"Remover",prix_produit_error_quantity:"Indique uma quantidade de, pelo menos, 1 para o produto {num}",file_selected:"1 ficheiro selecionado",file_upload_failed:"Não foi possível carregar o ficheiro.",file_format_not_accepted:"Formato não aceite. Formatos aceites: {formats}",file_select_required:"Selecione um ficheiro",file_upload_button:"Carregar",file_delete:"Eliminar o ficheiro",multiple_files_max:"Máximo de {max} ficheiro(s).",multiple_files_drop:"Arraste os seus ficheiros para aqui ou clique"},no:{address_required:"The address is required",address_metropolitan_only:"This offer is only valid in mainland France and Corsica.",email_domain_not_allowed:"This email domain is not allowed for this operation.",noticetextlink:"attached notice",suivant:"Next",valider:"Submit",champ_obligatoire:"Required fields",multiselect_list_empty:"Start typing",iban_section_title:"Information on your IBAN",iban_holder:"Account holder",iban_warning:"Since 09/10/2025, the entered IBAN must match the account holder indicated. Any inconsistency may block the transfer.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 digits",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 digits",rgpd:"processes the data collected on the basis of the performance of the contract to manage your participation in this operation. To learn more about how your personal data is managed and to exercise your rights, please refer to the <a href='{link}' target='_blank' id='noticelink'>attached notice</a>.",precedent:"Previous",merci_renseigner_adresse:`Please select a suggested address or click on "I can't find my address"`,trouvepasadresse:"I can't find my address",trouvepasreparateur:"You can't find it?",email_reparateur:"E-mail of your repairer *",enseigne_psa:"Company name *",Numero_identification:"DUNS number *",votre_adresse:"Your address *",changez_votre_adresse:"Edit your address",N_rue:"Number and street name",compl_addresse:"Additional address info",ville:"City",code_postal:"ZIP code",pays:"Country","Corrigez les erreurs":"Please check the remaining errors in the form.",date_fin_regule_passee:"The regularization deadline has passed. The form can no longer be submitted.",Madame:"Mrs.",Monsieur:"Mr.",multiple_file_upload_en_cours:"Upload in progress",multiple_file_aucun_fichier:"No file",multiple_file_patientez:"Please wait, one or more files are being uploaded. Do not submit the form until the operation is complete.",multiple_file_add_file:"Add a file",multiple_file_remove_file:"Remove a file",file_max_size_error:"The file size is too large",file_heic_error:"iPhone .heic files not supported",file_max_size_info:"Maximum file size: {size} MB",select_Précisez:"Please specify",prix_produit_produit:"Product",prix_produit_reference:"Reference",prix_produit_description:"Description",prix_produit_quantite:"Quantity",prix_produit_prix:"Unit price incl. tax",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Select an option",prix_produit_max_reached:"Limit of {max} product(s) reached",prix_produit_error_select_ref:"Please select a reference for product {num}",prix_produit_error_select_refs:"Please select a reference for products {nums}",prix_produit_error_quantity:"The quantity of product {num} is required",prix_produit_error_price:"The price of product {num} is required",prix_produit_error_min_refs:"Please select at least {min} reference(s)","Erreurs de validation":"Validation errors","Champs concernés :":"Affected fields:"}},Rx={"es-cat":["es","fr"],"lu-fr":["fr"],"be-fr":["fr"],"lu-nl":["nl","fr"],"be-nl":["nl","fr"],default:["fr"]},Px={fr:"fr","fr-fr":"fr","lu-fr":"lu-fr","be-fr":"be-fr",en:"en","en-gb":"en","en-uk":"en",uk:"en",es:"es","es-es":"es","es-cat":"es-cat",de:"de",nl:"nl","lu-nl":"lu-nl","be-nl":"be-nl",it:"it",pl:"pl",sl:"sl",si:"sl",bg:"bg",ro:"ro",el:"el",gr:"el",pt:"pt","pt-pt":"pt",no:"no",nb:"no",nn:"no","nb-no":"no","nn-no":"no"};function $y(e){const t=(e||"fr").toLowerCase(),n=Px[t]||t.split("-")[0];return Ey[n]?n:"fr"}const gt=Tx({legacy:!1,locale:"fr",fallbackLocale:Rx,messages:Ey,missingWarn:!1,fallbackWarn:!1});function Lr(e){return a.watch(e,t=>{gt.global.locale.value=$y(t)},{immediate:!0}),(t,n)=>gt.global.t(t,n??{})}function Mx(e,t={}){if(e==null||e==="")return!0;const{phoneType:n="both",defaultCountry:r,acceptedCountries:o=[]}=t,i=Yg(String(e)),s=UN(i,i.trim().startsWith("+")?void 0:r);if(!s||!s.isValid())return gt.global.t("phone_invalid");if(o.length>0&&(!s.country||!o.includes(s.country)))return gt.global.t("phone_country_not_accepted");const l=s.getType(),c=l==="MOBILE"||l==="FIXED_LINE_OR_MOBILE",d=l==="FIXED_LINE"||l==="FIXED_LINE_OR_MOBILE";return n==="mobile"&&!c?gt.global.t("phone_mobile_required"):n==="fixed"&&!d?gt.global.t("phone_fixed_required"):!0}function _p(e){return(e||"").replace(/\s+/g,"").toUpperCase()}function Dx(e){return _p(e).slice(0,2)}const Lx=["AD","AT","BE","BG","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GI","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","NL","NO","PL","PT","RO","SE","SI","SK","SM","VA"],Fx={FR:27,BE:16,LU:20,DE:22,NL:18,ES:24,IT:27,PT:25,GB:22,IE:22,AT:20,PL:28,SI:19,BG:22,RO:24,GR:27,CH:21,MC:27};function Bx(e){const t=_p(e);if(!/^[A-Z]{2}\d{2}[A-Z0-9]+$/.test(t))return!1;const n=Fx[t.slice(0,2)];if(n&&t.length!==n)return!1;const r=t.slice(4)+t.slice(0,4);let o=0;for(const i of r){const s=i>="A"&&i<="Z"?(i.charCodeAt(0)-55).toString():i;for(const l of s)o=(o*10+Number(l))%97}return o===1}function Ux(e){return _p(e).replace(/(.{4})/g,"$1 ").trim()}function Vx(e){return e==null||e===""?!0:Bx(String(e))||gt.global.t("iban_invalid")}function jx(e,t=[]){if(e==null||e===""||t.length===0)return!0;const n=Dx(String(e));return t.flatMap(o=>o.toUpperCase()==="SEPA"?Lx:[o.toUpperCase()]).includes(n)||gt.global.t("iban_country_not_accepted")}function zx(e,t){if(e==null||e==="")return!0;const n=String(e).replace(/\D/g,"");return String(t||"").replace(/\D/g,"").length!==6||n.length!==8,!0}function qx(e){const n=(e||"").replace(/\s+/g,"").toUpperCase().replace("2A","19").replace("2B","18");if(!/^\d{15}$/.test(n))return!1;const r=n.slice(0,13),o=Number(n.slice(13,15));return 97-Number(r)%97===o}function Hx(e){return e==null||e===""?!0:qx(String(e))||"Le numéro de sécurité sociale n’est pas valide."}const Sy=/^(?:0[1-9]|[1-8]\d|9[0-5])\d{3}$/,Wx=/^(?:97|98)/;function hp(e){return Array.isArray(e)?e.flat(1/0).map(t=>String(t).toLowerCase()):[]}const Gx=new Set(["fr","fr-metro","gp","mq","gf","re","yt","pm","bl","mf"]);function Yx(e){const t=hp(e);return t.length>0&&t.every(n=>Gx.has(n))}function vy(e){return hp(e).includes("fr-metro")}function Kx(e){return Sy.test(String(e??"").trim())}function gp(e){return Wx.test(String(e??"").trim())}function Xx(e){return hp(e).map(t=>t==="fr-metro"?"fr":t)}const Ty={fr:/^\d{5}$/,"fr-metro":Sy,be:/^[1-9]\d{3}$/,lu:/^[1-9]\d{3}$/,at:/^[1-9]\d{3}$/,nl:/^\d{4}\s?[A-Za-z]{2}$/,de:/^[1-9]\d{4}$/,no:/^(?!0000)\d{4}$/};function Jx(e,t=[]){if(e==null||e==="")return!0;const n=String(e).trim(),o=t.map(s=>s.toLowerCase()).filter(s=>Ty[s]);return o.length===0?!0:o.some(s=>Ty[s].test(n))||gt.global.t("postalcode_invalid")}async function Zx(e,t){if(e==null||e==="")return!0;const{field:n,operationId:r,server:o}=t,i=(o||"").replace(/\/$/,"");try{const{data:s}=await et.post(`${i}/api/check/${r}`,{operationId:r,[n]:e});return s?.status==="OK"?Qx(n):!0}catch(s){return xn(s,{where:"uniqueRule",field:n,operationId:r}),gt.global.t("unique_check_failed")}}function Qx(e){return e==="email"?gt.global.t("unique_email_used"):["phone","mobile_phone","fixed_phone"].includes(e)?gt.global.t("unique_phone_used"):gt.global.t("unique_value_used")}fn.extend(L1);function Ui(e){return Array.isArray(e)?e:e==null?[]:typeof e=="object"?Object.values(e):[e]}function yp(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}let wy=!1;function ky(){if(wy)return;wy=!0;const e={required:QT,email:qT,min:H1,max:z1,min_value:W1,max_value:q1,numeric:XT,integer:HT,length:WT,digits:V1,regex:G1,one_of:$f,not_one_of:GT,confirmed:zT,size:ew,between:U1,url:tw,alpha_spaces:B1};for(const[t,n]of Object.entries(e))rn(t,n);rn("phone",(t,n)=>Mx(t,yp(n))),rn("iban",t=>Vx(t)),rn("countryiban",(t,n)=>jx(t,Ui(n).map(String))),rn("iban_uk_modulus",(t,n)=>zx(t,String(Ui(n)[0]??""))),rn("securitesocialefr",t=>Hx(t)),rn("checked",t=>t===!0?!0:gt.global.t("field_required")),rn("address_required",t=>{const n=t;return n&&typeof n=="object"&&n.address?!0:gt.global.t("address_required")}),rn("address_metropolitan",t=>{const n=t;return!n||typeof n!="object"||!n.postcode||Kx(n.postcode)?!0:gt.global.t("address_metropolitan_only")}),rn("prix_produits_quantity",t=>{const r=(Array.isArray(t)?t:[]).findIndex(o=>!(Number.isInteger(o.quantity)&&Number(o.quantity)>=1));return r===-1?!0:gt.global.t("prix_produit_error_quantity",{num:r+1})}),rn("postalcode",(t,n)=>Jx(t,Ui(n).map(String))),rn("unique",(t,n)=>{const r=yp(n);return Zx(t,{field:String(r.field??""),operationId:String(r.operationId??""),server:String(r.server??"")})}),rn("date_range",(t,n)=>{if(t==null||t==="")return!0;const r=yp(n),o=fn(String(t),["DD/MM/YYYY","YYYY-MM-DD"],!0);if(!o.isValid())return gt.global.t("date_invalid");const i=r.min?fn(String(r.min)):null,s=r.max?fn(String(r.max)):null;return i&&i.isValid()&&o.isBefore(i,"day")?gt.global.t("date_after",{date:i.format("DD/MM/YYYY")}):s&&s.isValid()&&o.isAfter(s,"day")?gt.global.t("date_before",{date:s.format("DD/MM/YYYY")}):!0}),rn("date_between",(t,n)=>{if(t==null||t==="")return!0;const[r,o]=Ui(n).map(s=>s?fn(String(s)):null),i=fn(String(t));return i.isValid()?r&&r.isValid()&&i.isBefore(r,"day")?gt.global.t("date_after",{date:r.format("DD/MM/YYYY")}):o&&o.isValid()&&i.isAfter(o,"day")?gt.global.t("date_before",{date:o.format("DD/MM/YYYY")}):!0:gt.global.t("date_invalid")}),rn("before",(t,n)=>{if(!t)return!0;const r=Ui(n)[0],o=r?fn(String(r)):null;return!o||!o.isValid()||fn(String(t)).isBefore(o,"day")?!0:gt.global.t("date_before",{date:o.format("DD/MM/YYYY")})}),rn("after",(t,n)=>{if(!t)return!0;const r=Ui(n)[0],o=r?fn(String(r)):null;return!o||!o.isValid()||fn(String(t)).isAfter(o,"day")?!0:gt.global.t("date_after",{date:o.format("DD/MM/YYYY")})}),YS({generateMessage:sw({fr:aw,en:lw,es:cw,de:dw,nl:uw,it:fw,pl:pw,sl:mw,bg:_w,ro:hw,el:gw,pt:yw}),validateOnInput:!1,validateOnBlur:!0,validateOnChange:!0,validateOnModelUpdate:!1}),Q1("fr")}function eO(e){Q1(e)}const Ay=Symbol("houston-form-context");function tO(e){a.provide(Ay,e)}function ho(){const e=a.inject(Ay);if(!e)throw new Error("useFormContext() doit être utilisé dans un champ rendu par <HoustonForm>.");return e}const Ny={included:"one_of",not_included:"not_one_of"};function Iy(e){const t={};for(const n of e.split("|").map(r=>r.trim()).filter(Boolean)){const r=n.indexOf(":"),o=r===-1?n:n.slice(0,r),i=r===-1?void 0:n.slice(r+1),s=Ny[o]||o;if(i===void 0)t[s]=!0;else{const l=i.split(",");t[s]=l.length>1?l:l[0]}}return t}function nO(e){if(!e)return{};if(typeof e=="string")return Iy(e);const t={};for(const[n,r]of Object.entries(e))t[Ny[n]||n]=r;return t}function rO(e,t={}){const n={...e.type==="email"?{email:!0}:{},...e.validation?Iy(e.validation):{},...nO(e.validationRules),...t};return e.required&&(n.required=!0),n}function Rt(e,t={}){const n=ho(),r=e.save_to||e.validationLabel||e.label||e.name||"field",o=a.computed(()=>rO(e,{...t,...e.unique&&e.save_to&&!n.testmode.value?.disableunique?{unique:{field:e.save_to,operationId:n.operationId.value,server:n.server}}:{}})),i=e.save_to&&e.save_to in n.form?n.form[e.save_to]:void 0,{value:s,errorMessage:l,meta:c,handleBlur:d,handleChange:f,validate:u,setValue:p}=Bo(r,o,{initialValue:i,label:e.validationLabel||e.label||void 0,syncVModel:!1});e.save_to&&a.watch(s,E=>{n.form[e.save_to]=E},{immediate:!0});const m=E=>E==null||E==="",_=a.computed(()=>!!l.value&&(c.touched||c.dirty||n.submitAttempted.value)),b=a.computed(()=>c.valid&&!l.value&&(c.touched||c.dirty)&&!m(s.value)),g=a.computed(()=>_.value?"error":b.value?"valid":"idle"),h=a.computed(()=>({"fb-invalid":_.value,"fb-valid":b.value})),y=a.computed({get:()=>s.value,set:E=>p(E)});return{ctx:n,validationName:r,value:s,model:y,errorMessage:l,showError:_,isValid:b,fieldState:g,controlClass:h,meta:c,handleBlur:d,handleChange:f,validate:u,setValue:p}}function Cy(e,t){if(!t)return e;const n='<span class="fb-required-star">*</span>',r=e.match(/<\/[^>]+>$/);return r&&r.index!==void 0?e.slice(0,r.index)+n+e.slice(r.index):e+n}const oO=["for","innerHTML"],Ke=a.defineComponent({__name:"FieldLabel",props:{label:{},required:{type:Boolean},forId:{}},setup(e){const t=e,n=a.computed(()=>Cy(t.label??"",t.required));return(r,o)=>(a.openBlock(),a.createElementBlock("label",{class:"fb-label",for:e.forId,innerHTML:n.value},null,8,oO))}}),iO={class:"fb-field"},sO=["id","type","name","required","inputmode","placeholder","aria-invalid"],aO={key:0,class:"fb-error",role:"alert"},lO=a.defineComponent({__name:"FieldConfirmation",props:{targetName:{},name:{},label:{},type:{},required:{type:Boolean},placeholder:{},inputmode:{}},setup(e){const t=e,n=a.ref(null),{value:r,errorMessage:o,meta:i,handleBlur:s}=Bo(t.name,{required:!!t.required,confirmed:`@${t.targetName}`},{label:t.label}),l=a.computed(()=>!!o.value&&(i.touched||i.dirty)),c=a.computed(()=>t.inputmode);return a.onMounted(()=>{n.value?.addEventListener("paste",d=>d.preventDefault())}),(d,f)=>(a.openBlock(),a.createElementBlock("div",iO,[a.createVNode(Ke,{"for-id":e.name,label:e.label,required:e.required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("input",{id:e.name,ref_key:"inputRef",ref:n,"onUpdate:modelValue":f[0]||(f[0]=u=>a.isRef(r)?r.value=u:null),class:a.normalizeClass(["fb-input",{"fb-invalid":l.value}]),type:e.type||"text",name:e.name,required:e.required,inputmode:c.value,placeholder:e.placeholder,"aria-invalid":l.value||void 0,onBlur:f[1]||(f[1]=(...u)=>a.unref(s)&&a.unref(s)(...u))},null,42,sO),[[a.vModelDynamic,a.unref(r)]]),l.value?(a.openBlock(),a.createElementBlock("span",aO,a.toDisplayString(a.unref(o)),1)):a.createCommentVNode("",!0)]))}}),cO={class:"fb-field"},dO=["id","type","name","required","autocomplete","placeholder","pattern","maxlength","inputmode","aria-invalid","aria-describedby"],uO=["innerHTML"],fO=a.defineComponent({__name:"FieldInput",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-info`,i=`${r}-error`,{model:s,showError:l,errorMessage:c,controlClass:d,validationName:f,handleBlur:u}=Rt(n),p=a.computed(()=>[n.info?o:null,l.value?i:null].filter(Boolean).join(" ")||void 0),m=a.computed(()=>n.inputmode);return(_,b)=>(a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",cO,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("input",{id:a.unref(r),"onUpdate:modelValue":b[0]||(b[0]=g=>a.isRef(s)?s.value=g:null),class:a.normalizeClass(["fb-input",a.unref(d)]),type:a.unref(n).type||"text",name:a.unref(f),required:a.unref(n).required||void 0,autocomplete:a.unref(n).autocomplete,placeholder:a.unref(n).placeholder,pattern:a.unref(n).pattern,maxlength:a.unref(n).maxlength,inputmode:m.value,"aria-invalid":a.unref(l)||void 0,"aria-describedby":p.value,onBlur:b[1]||(b[1]=(...g)=>a.unref(u)&&a.unref(u)(...g))},null,42,dO),[[a.vModelDynamic,a.unref(s)]]),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,id:o,class:"fb-info",innerHTML:a.unref(n).info},null,8,uO)):a.createCommentVNode("",!0),a.unref(l)&&!a.unref(n).hideErrorMessage?(a.openBlock(),a.createElementBlock("span",{key:1,id:i,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(c)),1)):a.createCommentVNode("",!0)]),a.unref(n).confirmation?(a.openBlock(),a.createBlock(lO,{key:0,"target-name":a.unref(f),name:`${a.unref(r)}_confirmation`,label:a.unref(n).confirmationLabel,type:a.unref(n).type||"text",required:a.unref(n).required,placeholder:a.unref(n).placeholder,inputmode:a.unref(n).inputmode},null,8,["target-name","name","label","type","required","placeholder","inputmode"])):a.createCommentVNode("",!0)]))}}),pO={class:"fb-field"},mO=["id","name","required","aria-invalid","aria-describedby"],_O=["innerHTML"],hO=["innerHTML"],gO=a.defineComponent({__name:"FieldCheckbox",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-error`,i=Cy(n.label??"",n.required),{model:s,showError:l,errorMessage:c,handleBlur:d}=Rt({...n,required:!1},n.required?{checked:!0}:{});return(f,u)=>(a.openBlock(),a.createElementBlock("div",pO,[a.createElementVNode("label",{class:a.normalizeClass(["fb-choice",{"is-checked":!!a.unref(s)}])},[a.withDirectives(a.createElementVNode("input",{id:a.unref(r),"onUpdate:modelValue":u[0]||(u[0]=p=>a.isRef(s)?s.value=p:null),type:"checkbox",name:a.unref(r),required:a.unref(n).required||void 0,"aria-invalid":a.unref(l)||void 0,"aria-describedby":a.unref(l)?o:void 0,onBlur:u[1]||(u[1]=(...p)=>a.unref(d)&&a.unref(d)(...p))},null,40,mO),[[a.vModelCheckbox,a.unref(s)]]),a.createElementVNode("span",{class:"fb-choice-label",innerHTML:a.unref(i)},null,8,_O)],2),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,class:"fb-info",innerHTML:a.unref(n).info},null,8,hO)):a.createCommentVNode("",!0),a.unref(l)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(c)),1)):a.createCommentVNode("",!0)]))}}),yO={class:"fb-field"},bO={class:"fb-label"},EO=["innerHTML"],$O={key:0,class:"fb-required-star"},SO={class:"fb-choice-list"},vO=["name","value","required"],TO=["innerHTML"],wO=["innerHTML"],kO=a.defineComponent({__name:"FieldRadio",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-error`,{model:i,showError:s,errorMessage:l,handleBlur:c}=Rt(n),d=a.computed(()=>(n.options||[]).map(f=>typeof f=="string"?{value:f.toLowerCase(),name:f}:{value:f.value,name:f.name??f.label??f.value}));return(f,u)=>(a.openBlock(),a.createElementBlock("fieldset",yO,[a.createElementVNode("legend",bO,[a.createElementVNode("span",{innerHTML:a.unref(n).label},null,8,EO),a.unref(n).required?(a.openBlock(),a.createElementBlock("span",$O,"*")):a.createCommentVNode("",!0)]),a.createElementVNode("div",SO,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,(p,m)=>(a.openBlock(),a.createElementBlock("label",{key:m,class:a.normalizeClass(["fb-choice",{"is-checked":a.unref(i)===p.value}])},[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":u[0]||(u[0]=_=>a.isRef(i)?i.value=_:null),type:"radio",name:a.unref(r),value:p.value,required:a.unref(n).required||void 0,onBlur:u[1]||(u[1]=(..._)=>a.unref(c)&&a.unref(c)(..._))},null,40,vO),[[a.vModelRadio,a.unref(i)]]),a.createElementVNode("span",{class:"fb-choice-label",innerHTML:p.name},null,8,TO)],2))),128))]),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,class:"fb-info",innerHTML:a.unref(n).info},null,8,wO)):a.createCommentVNode("",!0),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),AO={key:0,class:"fb-field fb-field--inline"},NO={class:"fb-label"},IO=["innerHTML"],CO={key:0,class:"fb-required-star"},xO={class:"fb-choice-list fb-choice-list--inline"},OO=["name","value","required"],RO={class:"fb-choice-label"},PO={key:1,class:"fb-field"},MO=["id","name","required"],DO={value:"madame"},LO={value:"monsieur"},FO=a.defineComponent({__name:"FieldCivilite",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"civilite",o=`${r}-error`,{model:i,showError:s,errorMessage:l,handleBlur:c}=Rt(n),d=a.computed(()=>!!n.type&&n.type!=="radio"),f=a.computed(()=>n.LabelMadame||"Madame"),u=a.computed(()=>n.LabelMonsieur||"Monsieur"),p=a.computed(()=>[{value:"madame",name:f.value},{value:"monsieur",name:u.value}]);return(m,_)=>d.value?(a.openBlock(),a.createElementBlock("div",PO,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("select",{id:a.unref(r),"onUpdate:modelValue":_[2]||(_[2]=b=>a.isRef(i)?i.value=b:null),class:a.normalizeClass(["fb-select",{"fb-invalid":a.unref(s)}]),name:a.unref(r),required:a.unref(n).required||void 0,onBlur:_[3]||(_[3]=(...b)=>a.unref(c)&&a.unref(c)(...b))},[_[4]||(_[4]=a.createElementVNode("option",{value:""}," ",-1)),a.createElementVNode("option",DO,a.toDisplayString(f.value),1),a.createElementVNode("option",LO,a.toDisplayString(u.value),1)],42,MO),[[a.vModelSelect,a.unref(i)]]),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:0,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(l)),1)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("fieldset",AO,[a.createElementVNode("legend",NO,[a.createElementVNode("span",{innerHTML:a.unref(n).label},null,8,IO),a.unref(n).required?(a.openBlock(),a.createElementBlock("span",CO,"*")):a.createCommentVNode("",!0)]),a.createElementVNode("div",xO,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.value,b=>(a.openBlock(),a.createElementBlock("label",{key:b.value,class:a.normalizeClass(["fb-choice",{"is-checked":a.unref(i)===b.value}])},[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":_[0]||(_[0]=g=>a.isRef(i)?i.value=g:null),type:"radio",name:a.unref(r),value:b.value,required:a.unref(n).required||void 0,onBlur:_[1]||(_[1]=(...g)=>a.unref(c)&&a.unref(c)(...g))},null,40,OO),[[a.vModelRadio,a.unref(i)]]),a.createElementVNode("span",RO,a.toDisplayString(b.name),1)],2))),128))]),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:0,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),BO={class:"fb-field"},UO=["id","name","required","autocomplete"],VO={key:0,value:""},jO=["value"],zO={key:1,class:"fb-subfield"},qO=["id","placeholder"],HO=["innerHTML"],WO=a.defineComponent({__name:"FieldSelect",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"field",o=`${r}-error`,{model:i,showError:s,errorMessage:l,handleBlur:c,ctx:d}=Rt(n),f=Lr(d.locale),u=a.computed(()=>(n.options||[]).map(g=>typeof g=="string"?{value:g.toLowerCase(),name:g,other:!1}:{value:g.value,name:g.name??g.label??g.value,other:!!g.other})),p=a.ref(""),m=a.ref("");a.onMounted(()=>{const g=typeof i.value=="string"?i.value:"",h=g.split(":")[0];if(h&&u.value.length&&!u.value.some(y=>y.value===h)){i.value="";return}if(g.includes(":")){const[y,...E]=g.split(":");p.value=y,m.value=E.join(":")}else n.defaultOptionText||(p.value=g)});const _=a.computed(()=>u.value.find(g=>g.value===p.value)),b=a.computed(()=>!!_.value?.other);return a.watch([p,m],()=>{i.value=b.value?`${p.value}:${m.value}`:p.value}),(g,h)=>(a.openBlock(),a.createElementBlock("div",BO,[a.unref(n).displayLabel!==!1?(a.openBlock(),a.createBlock(Ke,{key:0,"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("select",{id:a.unref(r),"onUpdate:modelValue":h[0]||(h[0]=y=>p.value=y),class:a.normalizeClass(["fb-select",{"fb-invalid":a.unref(s)}]),name:a.unref(r),required:a.unref(n).required||void 0,autocomplete:a.unref(n).autocomplete,onBlur:h[1]||(h[1]=(...y)=>a.unref(c)&&a.unref(c)(...y))},[a.unref(n).defaultOptionText!==void 0?(a.openBlock(),a.createElementBlock("option",VO,a.toDisplayString(a.unref(n).defaultOptionText),1)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(y,E)=>(a.openBlock(),a.createElementBlock("option",{key:E,value:y.value},a.toDisplayString(y.name),9,jO))),128))],42,UO),[[a.vModelSelect,p.value]]),b.value?(a.openBlock(),a.createElementBlock("div",zO,[a.createVNode(Ke,{"for-id":`${a.unref(r)}-other`,label:a.unref(f)("select_Précisez")},null,8,["for-id","label"]),a.withDirectives(a.createElementVNode("input",{id:`${a.unref(r)}-other`,"onUpdate:modelValue":h[2]||(h[2]=y=>m.value=y),class:"fb-input",type:"text",placeholder:a.unref(f)("select_Précisez")},null,8,qO),[[a.vModelText,m.value]])])):a.createCommentVNode("",!0),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:2,class:"fb-info",innerHTML:a.unref(n).info},null,8,HO)):a.createCommentVNode("",!0),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:3,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),GO={class:"fb-field"},YO=["id","name","required","autocomplete","placeholder","aria-invalid","aria-describedby"],KO=["innerHTML"],XO=a.defineComponent({__name:"FieldInputNumber",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-error`,i=`${r}-info`,{model:s,showError:l,errorMessage:c,controlClass:d,handleBlur:f}=Rt(n);function u(p){const m=p.target;m.value!==""&&Number(m.value)<0&&(s.value=0)}return(p,m)=>(a.openBlock(),a.createElementBlock("div",GO,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("input",{id:a.unref(r),"onUpdate:modelValue":m[0]||(m[0]=_=>a.isRef(s)?s.value=_:null),class:a.normalizeClass(["fb-input",a.unref(d)]),type:"number",inputmode:"decimal",min:"0",name:a.unref(r),required:a.unref(n).required||void 0,autocomplete:a.unref(n).autocomplete,placeholder:a.unref(n).placeholder,"aria-invalid":a.unref(l)||void 0,"aria-describedby":a.unref(n).info?i:void 0,onInput:u,onBlur:m[1]||(m[1]=(..._)=>a.unref(f)&&a.unref(f)(..._))},null,42,YO),[[a.vModelText,a.unref(s),void 0,{number:!0}]]),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,id:i,class:"fb-info",innerHTML:a.unref(n).info},null,8,KO)):a.createCommentVNode("",!0),a.unref(l)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(c)),1)):a.createCommentVNode("",!0)]))}}),JO={class:"fb-field"},ZO=["id","name","rows","required","placeholder","maxlength","aria-invalid","aria-describedby"],QO=["innerHTML"],eR=a.defineComponent({__name:"FieldTextarea",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-error`,i=`${r}-info`,{model:s,showError:l,errorMessage:c,controlClass:d,handleBlur:f}=Rt(n),u=a.computed({get:()=>s.value??"",set:p=>s.value=p});return(p,m)=>(a.openBlock(),a.createElementBlock("div",JO,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("textarea",{id:a.unref(r),"onUpdate:modelValue":m[0]||(m[0]=_=>u.value=_),class:a.normalizeClass(["fb-textarea",a.unref(d)]),name:a.unref(r),rows:a.unref(n).rows||4,required:a.unref(n).required||void 0,placeholder:a.unref(n).placeholder,maxlength:a.unref(n).maxlength,"aria-invalid":a.unref(l)||void 0,"aria-describedby":a.unref(n).info?i:void 0,onBlur:m[1]||(m[1]=(..._)=>a.unref(f)&&a.unref(f)(..._))},null,42,ZO),[[a.vModelText,u.value]]),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,id:i,class:"fb-info",innerHTML:a.unref(n).info},null,8,QO)):a.createCommentVNode("",!0),a.unref(l)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(c)),1)):a.createCommentVNode("",!0)]))}}),tR={class:"fb-field"},nR=["id","name","value","min","max","required","aria-invalid"],rR=["innerHTML"],oR=a.defineComponent({__name:"FieldDateInput",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-error`,i=n.min?fn(String(n.min)).format("YYYY-MM-DD"):void 0,s=n.dateMaxToday?fn().format("YYYY-MM-DD"):n.max?fn(String(n.max)).format("YYYY-MM-DD"):void 0,l={};i&&(l.min=i),s&&(l.max=s);const{model:c,showError:d,errorMessage:f,controlClass:u,handleBlur:p}=Rt(n,Object.keys(l).length?{date_range:l}:{}),m=a.ref("");a.watch(c,b=>{typeof b=="string"&&/^\d{2}\/\d{2}\/\d{4}$/.test(b)?m.value=b.split("/").reverse().join("-"):typeof b=="string"&&/^\d{4}-\d{2}-\d{2}/.test(b)&&(m.value=b.slice(0,10))},{immediate:!0});function _(b){const g=b.target.value;m.value=g,c.value=g?g.split("-").reverse().join("/"):""}return(b,g)=>(a.openBlock(),a.createElementBlock("div",tR,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.createElementVNode("input",{id:a.unref(r),class:a.normalizeClass(["fb-input",a.unref(u)]),type:"date",name:a.unref(r),value:m.value,min:a.unref(i),max:a.unref(s),required:a.unref(n).required||void 0,"aria-invalid":a.unref(d)||void 0,onInput:_,onBlur:g[0]||(g[0]=(...h)=>a.unref(p)&&a.unref(p)(...h))},null,42,nR),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,class:"fb-info",innerHTML:a.unref(n).info},null,8,rR)):a.createCommentVNode("",!0),a.unref(d)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(f)),1)):a.createCommentVNode("",!0)]))}});function xy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function iR(e){if(Array.isArray(e))return e}function sR(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,s,l=[],c=!0,d=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){d=!0,o=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw o}}return l}}function aR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
27
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lR(e,t){return iR(e)||sR(e,t)||cR(e,t)||aR()}function cR(e,t){if(e){if(typeof e=="string")return xy(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xy(e,t):void 0}}const Oy=Object.entries,Ry=Object.setPrototypeOf,dR=Object.isFrozen,Py=Object.getPrototypeOf,My=Object.getOwnPropertyDescriptor;let Xt=Object.freeze,Jt=Object.seal,Vi=Object.create,Dy=typeof Reflect<"u"&&Reflect,bp=Dy.apply,Ep=Dy.construct;Xt||(Xt=function(t){return t}),Jt||(Jt=function(t){return t}),bp||(bp=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return t.apply(n,o)}),Ep||(Ep=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const Fr=St(Array.prototype.forEach),uR=St(Array.prototype.lastIndexOf),Ly=St(Array.prototype.pop),Aa=St(Array.prototype.push),fR=St(Array.prototype.slice),pR=St(Array.prototype.splice),ji=Array.isArray,$p=jy(Set),Sp=St(Set.prototype.add),Na=St(Set.prototype.has),Zo=St(String.prototype.toLowerCase),vp=St(String.prototype.toString),Fy=St(String.prototype.match),Ia=St(String.prototype.replace),By=St(String.prototype.indexOf),mR=St(String.prototype.trim),_R=St(Number.prototype.toString),hR=St(Boolean.prototype.toString),Uy=typeof BigInt>"u"?null:St(BigInt.prototype.toString),Vy=typeof Symbol>"u"?null:St(Symbol.prototype.toString),kn=St(Object.prototype.hasOwnProperty),Ca=St(Object.prototype.toString),Zt=St(RegExp.prototype.test),Br=jy(TypeError);function St(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return bp(e,t,r)}}function jy(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ep(e,n)}}function Je(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zo;if(Ry&&Ry(e,null),!ji(t))return e;let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(dR(t)||(t[r]=i),o=i)}e[o]=!0}return e}function gR(e){for(let t=0;t<e.length;t++)kn(e,t)||(e[t]=null);return e}function Rn(e){const t=Vi(null);for(const r of Oy(e)){var n=lR(r,2);const o=n[0],i=n[1];kn(e,o)&&(ji(i)?t[o]=gR(i):i&&typeof i=="object"&&i.constructor===Object?t[o]=Rn(i):t[o]=i)}return t}function yR(e){switch(typeof e){case"string":return e;case"number":return _R(e);case"boolean":return hR(e);case"bigint":return Uy?Uy(e):"0";case"symbol":return Vy?Vy(e):"Symbol()";case"undefined":return Ca(e);case"function":case"object":{if(e===null)return Ca(e);const t=e,n=zn(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Ca(r)}return Ca(e)}default:return Ca(e)}}function zn(e,t){for(;e!==null;){const r=My(e,t);if(r){if(r.get)return St(r.get);if(typeof r.value=="function")return St(r.value)}e=Py(e)}function n(){return null}return n}function bR(e,t){for(;e!==null;){const n=My(e,t);if(n)return n.get?St(n.get):null;e=Py(e)}return null}function ER(e){try{return Zt(e,""),!0}catch{return!1}}const zy=Xt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Tp=Xt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wp=Xt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$R=Xt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),kp=Xt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),SR=Xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qy=Xt(["#text"]),Hy=Xt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ap=Xt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Wy=Xt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Cc=Xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vR=Jt(/{{[\w\W]*|^[\w\W]*}}/g),TR=Jt(/<%[\w\W]*|^[\w\W]*%>/g),wR=Jt(/\${[\w\W]*/g),kR=Jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),AR=Jt(/^aria-[\-\w]+$/),Gy=Jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),NR=Jt(/^(?:\w+script|data):/i),IR=Jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),CR=Jt(/^html$/i),xR=Jt(/^[a-z][.\w]*(-[.\w]+)+$/i),Np=Jt(/<[/\w!]/g),Yy=Jt(/<[/\w]/g),OR=Jt(/<\/no(script|embed|frames)/i),Ky=Jt(/\/>/i),Lt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},RR=Xt(Je({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),PR=function(){return typeof window>"u"?null:window},MR=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Xy=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},go=function(t,n,r,o){return kn(t,n)&&ji(t[n])?Je(o.base?Rn(o.base):{},t[n],o.transform):r},Ip=function(t,n,r){const o=kn(t,n)?t[n]:void 0;return o&&typeof o=="object"?Rn(o):r()};function Jy(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:PR();const t=ie=>Jy(ie);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==Lt.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,o=r.currentScript;e.DocumentFragment;const i=e.HTMLTemplateElement,s=e.Node,l=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,f=e.trustedTypes,u=l.prototype,p=zn(u,"cloneNode"),m=zn(u,"remove"),_=zn(u,"removeAttributeNode"),b=zn(u,"nextSibling"),g=zn(u,"childNodes"),h=zn(u,"parentNode"),y=zn(u,"shadowRoot"),E=zn(u,"attributes"),$=s&&s.prototype?zn(s.prototype,"nodeType"):null,O=s&&s.prototype?zn(s.prototype,"nodeName"):null,N=s&&s.prototype?zn(s.prototype,"ownerDocument"):null,v=function(S){return $?$(S):S.nodeType},B=function(S){return O?O(S):S.nodeName},H=bR(u,"namespaceURI"),U=function(S){return H?H(S):S.namespaceURI};if(typeof i=="function"){const ie=n.createElement("template");ie.content&&ie.content.ownerDocument&&(n=ie.content.ownerDocument)}let C,A="",R,I=!1,V=0;const j=function(){if(V>0)throw Br('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},F=function(S){j(),V++;try{return C.createHTML(S)}finally{V--}},M=function(S){j(),V++;try{return C.createScriptURL(S)}finally{V--}},Y=function(){return I||(R=MR(f,o),I=!0),R},W=n,K=W.implementation,te=W.createNodeIterator,X=W.createDocumentFragment,oe=W.getElementsByTagName,fe=r.importNode;let J=Xy();t.isSupported=typeof Oy=="function"&&typeof h=="function"&&K&&K.createHTMLDocument!==void 0;const ae=vR,ye=TR,$e=wR,Ie=kR,je=AR,we=NR,Le=IR,Fe=xR;let Ye=Gy,ke=null;const Ze=Je({},[...zy,...Tp,...wp,...kp,...qy]);let w=null;const T=Je({},[...Hy,...Ap,...Wy,...Cc]);let k=Object.seal(Vi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,ee=null;const le=Object.seal(Vi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ce=!0,ot=!0,Qe=!1,Ue=!0,G=!1,re=!0,ze=!1,L=!1,z=null,ne=null,pe=!1,Ee=!1,Oe=!1,Se=!1,_t=!0,At=!1;const zt="user-content-";let it=!0,Ut=!1,Ct=null,qt={},Un=null;const Us=Je({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Vs=null;const js=Je({},["audio","video","img","source","image","track"]);let zs=null;const dS=Je({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Uu="http://www.w3.org/1998/Math/MathML",Vu="http://www.w3.org/2000/svg",Nr="http://www.w3.org/1999/xhtml";let qs=Nr,K_=!1,X_=null;const fre=Je({},[Uu,Vu,Nr],vp),uS=Xt(["mi","mo","mn","ms","mtext"]);let J_=Je({},uS);const fS=Xt(["annotation-xml"]);let Z_=Je({},fS);const pre=Je({},["title","style","font","a","script"]);let jl=null;const mre=["application/xhtml+xml","text/html"],_re="text/html";let Mt=null,Hs=null;const hre=n.createElement("form"),pS=function(S){return S instanceof RegExp||S instanceof Function},Q_=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Hs&&Hs===S)return;(!S||typeof S!="object")&&(S={}),S=Rn(S),jl=mre.indexOf(S.PARSER_MEDIA_TYPE)===-1?_re:S.PARSER_MEDIA_TYPE,Mt=jl==="application/xhtml+xml"?vp:Zo,ke=go(S,"ALLOWED_TAGS",Ze,{transform:Mt}),w=go(S,"ALLOWED_ATTR",T,{transform:Mt}),X_=go(S,"ALLOWED_NAMESPACES",fre,{transform:vp}),zs=go(S,"ADD_URI_SAFE_ATTR",dS,{transform:Mt,base:dS}),Vs=go(S,"ADD_DATA_URI_TAGS",js,{transform:Mt,base:js}),Un=go(S,"FORBID_CONTENTS",Us,{transform:Mt}),q=go(S,"FORBID_TAGS",Rn({}),{transform:Mt}),ee=go(S,"FORBID_ATTR",Rn({}),{transform:Mt}),qt=kn(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?Rn(S.USE_PROFILES):S.USE_PROFILES:!1,ce=S.ALLOW_ARIA_ATTR!==!1,ot=S.ALLOW_DATA_ATTR!==!1,Qe=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Ue=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,G=S.SAFE_FOR_TEMPLATES||!1,re=S.SAFE_FOR_XML!==!1,ze=S.WHOLE_DOCUMENT||!1,Ee=S.RETURN_DOM||!1,Oe=S.RETURN_DOM_FRAGMENT||!1,Se=S.RETURN_TRUSTED_TYPE||!1,pe=S.FORCE_BODY||!1,_t=S.SANITIZE_DOM!==!1,At=S.SANITIZE_NAMED_PROPS||!1,it=S.KEEP_CONTENT!==!1,Ut=S.IN_PLACE||!1,Ye=ER(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:Gy,qs=typeof S.NAMESPACE=="string"?S.NAMESPACE:Nr,J_=Ip(S,"MATHML_TEXT_INTEGRATION_POINTS",()=>Je({},uS)),Z_=Ip(S,"HTML_INTEGRATION_POINTS",()=>Je({},fS));const D=Ip(S,"CUSTOM_ELEMENT_HANDLING",()=>Vi(null));if(k=Vi(null),kn(D,"tagNameCheck")&&pS(D.tagNameCheck)&&(k.tagNameCheck=D.tagNameCheck),kn(D,"attributeNameCheck")&&pS(D.attributeNameCheck)&&(k.attributeNameCheck=D.attributeNameCheck),kn(D,"allowCustomizedBuiltInElements")&&typeof D.allowCustomizedBuiltInElements=="boolean"&&(k.allowCustomizedBuiltInElements=D.allowCustomizedBuiltInElements),Jt(k),G&&(ot=!1),Oe&&(Ee=!0),qt&&(ke=Je({},qy),w=Vi(null),qt.html===!0&&(Je(ke,zy),Je(w,Hy)),qt.svg===!0&&(Je(ke,Tp),Je(w,Ap),Je(w,Cc)),qt.svgFilters===!0&&(Je(ke,wp),Je(w,Ap),Je(w,Cc)),qt.mathMl===!0&&(Je(ke,kp),Je(w,Wy),Je(w,Cc))),le.tagCheck=null,le.attributeCheck=null,kn(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?le.tagCheck=S.ADD_TAGS:ji(S.ADD_TAGS)&&(ke===Ze&&(ke=Rn(ke)),Je(ke,S.ADD_TAGS,Mt))),kn(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?le.attributeCheck=S.ADD_ATTR:ji(S.ADD_ATTR)&&(w===T&&(w=Rn(w)),Je(w,S.ADD_ATTR,Mt))),kn(S,"ADD_FORBID_CONTENTS")&&ji(S.ADD_FORBID_CONTENTS)&&(Un===Us&&(Un=Rn(Un)),Je(Un,S.ADD_FORBID_CONTENTS,Mt)),it&&(ke["#text"]=!0),ze&&Je(ke,["html","head","body"]),ke.table&&(Je(ke,["tbody"]),delete q.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Br('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Br('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Z=C;C=S.TRUSTED_TYPES_POLICY;try{A=F("")}catch(Q){throw C=Z,Q}}else S.TRUSTED_TYPES_POLICY===null?(C=void 0,A=""):(C===void 0&&(C=Y()),C&&typeof A=="string"&&(A=F("")));Xt&&Xt(S),Hs=S},mS=Je({},[...Tp,...wp,...$R]),_S=Je({},[...kp,...SR]),gre=function(S,D,Z){return D.namespaceURI===Nr?S==="svg":D.namespaceURI===Uu?S==="svg"&&(Z==="annotation-xml"||J_[Z]):!!mS[S]},yre=function(S,D,Z){return D.namespaceURI===Nr?S==="math":D.namespaceURI===Vu?S==="math"&&Z_[Z]:!!_S[S]},bre=function(S,D,Z){return D.namespaceURI===Vu&&!Z_[Z]||D.namespaceURI===Uu&&!J_[Z]?!1:!_S[S]&&(pre[S]||!mS[S])},Ere=function(S){const D=U(S),Z=Zo(B(S)),Q=h(S);let ve,xe;return Q&&v(Q)===Lt.element?(ve={namespaceURI:U(Q)},xe=Zo(B(Q))):(ve={namespaceURI:qs},xe="template"),X_[D]?D===Vu?gre(Z,ve,xe):D===Uu?yre(Z,ve,xe):D===Nr?bre(Z,ve,xe):!!(jl==="application/xhtml+xml"&&X_[D]):!1},Lo=function(S){Aa(t.removed,{element:S});try{h(S).removeChild(S)}catch{if(m(S),!h(S))throw Br("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},hS=function(S,D,Z){try{_(S,D)}catch{try{S.removeAttribute(Z)}catch{}}},eh=function(S){nh(S);const D=g(S);D&&Fr(fR(D),Q=>{try{m(Q)}catch{}});const Z=v(S)===Lt.element?E(S):null;if(Z)for(let Q=Z.length-1;Q>=0;--Q){const ve=Z[Q],xe=ve&&ve.name;typeof xe=="string"&&hS(S,ve,xe)}},Ws=function(S,D,Z){if(!Z)try{Z=D.getAttributeNode(S)}catch{Z=null}Aa(t.removed,{attribute:Z||null,from:D});try{Z?_(D,Z):D.removeAttribute(S)}catch{try{D.removeAttribute(S)}catch{}}if(S==="is")if(Ee||Oe)try{Lo(D)}catch{}else try{D.setAttribute(S,"")}catch{}},gS=function(S){const D=E(S);if(D)for(let Z=D.length-1;Z>=0;--Z){const Q=D[Z],ve=Q&&Q.name;typeof ve!="string"||w[Mt(ve)]||hS(S,Q,ve)}},th=function(S,D){let Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const Q=[S];for(;Q.length>0;){const ve=Q.pop();if(D(ve)===!1)continue;if(Z&&v(ve)===Lt.element){const qe=y(ve);Fo(qe)&&Q.push(qe)}const xe=g(ve);if(xe)for(let qe=xe.length-1;qe>=0;--qe)Q.push(xe[qe])}},nh=function(S){th(S,D=>{v(D)===Lt.element&&gS(D)})},rh=function(S){const D=[];return th(S,Z=>{D.push(Z)},!0),D},$re=function(S,D){const Z=$p();Fr(rh(S),Q=>{v(Q)===Lt.element&&Sp(Z,Q)}),Fr(D,Q=>{v(Q)===Lt.element&&!Na(Z,Q)&&gS(Q)})},yS=function(S,D){let Z=!1;return Fr(t.removed,Q=>{Q.element&&(Z=Z||Q.element===S,nh(Q.element))}),$re(S,D),Z},Sre=8,vre=function(S,D){const Z=Ct;let Q=null;const ve=()=>(Q||(Q=$p(),Fr(D,xe=>{Sp(Q,xe)})),Q);for(let xe=0;;xe++){const qe=rh(S),Ht=[S];let Ir=!1;if(Fr(qe,bn=>{v(bn)===Lt.documentFragment?Aa(Ht,bn):!Ir&&!Na(Z,bn)&&(Ir=Na(ve(),bn))}),!Ir)return;if(xe>=Sre)throw Br("the tree kept changing during in-place sanitization; refusing to return it");Fr(Ht,(bn,In)=>{Tre(bn,In>0,S,ve())})}},Tre=function(S,D,Z,Q){const ve=oh(S);let xe;for(;xe=ve.nextNode();)!Na(Q,xe)||Na(Ct,xe)||(D&&fr(J.uponSanitizeShadowNode,xe,null),sh(xe,Z),ah(xe,Z),Fo(xe.content)&&ql(xe.content))},wre=function(S){Ct&&Sp(Ct,S)},bS=function(S,D){return re?S==="patchsrc"?!0:S==="for"&&D!=="label"&&D!=="output":!1},kre=function(S){re&&th(S,D=>{const Z=v(D);if(Z===Lt.processingInstruction||Z===Lt.comment&&Zt(Yy,D.data)){try{m(D)}catch{}return!1}if(Z===Lt.element){const Q=D,ve=Mt(B(D));try{Q.hasAttribute&&Q.hasAttribute("patchsrc")&&Q.removeAttribute("patchsrc"),Q.hasAttribute&&Q.hasAttribute("for")&&bS("for",ve)&&Q.removeAttribute("for")}catch{}}return!0})},ES=function(S){let D=null,Z=null;if(pe)S="<remove></remove>"+S;else{const xe=Fy(S,/^[\r\n\t ]+/);Z=xe&&xe[0]}jl==="application/xhtml+xml"&&qs===Nr&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Q=C?F(S):S;if(qs===Nr)try{D=new d().parseFromString(Q,jl)}catch{}if(!D||!D.documentElement){D=K.createDocument(qs,"template",null);try{D.documentElement.innerHTML=K_?A:Q}catch{}}const ve=D.body||D.documentElement;return S&&Z&&ve.insertBefore(n.createTextNode(Z),ve.childNodes[0]||null),qs===Nr?oe.call(D,ze?"html":"body")[0]:ze?D.documentElement:ve},oh=function(S){const D=N?N(S):S.ownerDocument;return te.call(D||S,S,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ju=function(S){return S=Ia(S,ae," "),S=Ia(S,ye," "),S=Ia(S,$e," "),S},ih=function(S){var D;$S(S);const Z=(D=S.querySelectorAll)===null||D===void 0?void 0:D.call(S,"template");Z&&Fr(Z,Q=>{Fo(Q.content)&&ih(Q.content)})},$S=function(S){S.normalize();const D=N?N(S):S.ownerDocument,Z=te.call(D||S,S,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Q=Z.nextNode();for(;Q;)Q.data=ju(Q.data),Q=Z.nextNode()},zu=function(S){const D=O?O(S):null;return typeof D!="string"||Mt(D)!=="form"?!1:typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||S.attributes!==E(S)||typeof S.removeAttribute!="function"||typeof S.removeAttributeNode!="function"||typeof S.getAttributeNode!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function"||S.nodeType!==$(S)||S.childNodes!==g(S)},Fo=function(S){if(!$||typeof S!="object"||S===null)return!1;try{return $(S)===Lt.documentFragment}catch{return!1}},zl=function(S){if(!$||typeof S!="object"||S===null)return!1;try{return typeof $(S)=="number"}catch{return!1}};function fr(ie,S,D){ie.length!==0&&Fr(ie,Z=>{Z.call(t,S,D,Hs)})}const Are=function(S,D){return!!(re&&S.hasChildNodes()&&!zl(S.firstElementChild)&&Zt(Np,S.textContent)&&Zt(Np,S.innerHTML)||re&&RR[D]&&v(S)===Lt.element&&U(S)===Nr&&(zl(S.firstElementChild)||typeof S.textContent=="string"&&Zt(Np,S.textContent))||S.nodeType===Lt.processingInstruction||re&&S.nodeType===Lt.comment&&Zt(Yy,S.data))},qu=function(S,D){if(S instanceof RegExp)return Zt(S,D);if(S instanceof Function){for(var Z=arguments.length,Q=new Array(Z>2?Z-2:0),ve=2;ve<Z;ve++)Q[ve-2]=arguments[ve];return!!S(D,...Q)}return!1},Nre=function(S,D,Z){if(!q[D]&&TS(D)&&qu(k.tagNameCheck,D))return!1;if(it&&!Un[D]&&!Un[Zo(D)]){const Q=h(S),ve=g(S);if(ve&&Q){const xe=ve.length;for(let qe=xe-1;qe>=0;--qe){const Ht=S===Z?p(ve[qe],!0):ve[qe];Q.insertBefore(Ht,b(S))}}}return Lo(S),!0},SS=function(S,D,Z,Q){return S.length===0?D:D===Z||D===Q?Rn(D):D},Gs=function(S,D){return S===D||h(S)!==null?!1:(Ut&&nh(S),!0)},sh=function(S,D){if(wre(S),fr(J.beforeSanitizeElements,S,null),Gs(S,D))return!0;if(zu(S))return Lo(S),!0;const Z=Mt(B(S));if(ke=SS(J.uponSanitizeElement,ke,Ze,z),fr(J.uponSanitizeElement,S,{tagName:Z,allowedTags:ke}),Gs(S,D))return!0;if(Are(S,Z))return Lo(S),!0;if(q[Z]||!(le.tagCheck instanceof Function&&le.tagCheck(Z))&&!ke[Z]){const Q=Nre(S,Z,D);return Q===!1&&(fr(J.afterSanitizeElements,S,null),Gs(S,D))?!0:Q}if(v(S)===Lt.element&&!Ere(S)||(Z==="noscript"||Z==="noembed"||Z==="noframes")&&Zt(OR,S.innerHTML))return Lo(S),!0;if(G&&S.nodeType===Lt.text){const Q=ju(S.textContent);S.textContent!==Q&&(Aa(t.removed,{element:S.cloneNode()}),S.textContent=Q)}return fr(J.afterSanitizeElements,S,null),Gs(S,D)},vS=function(S,D,Z){if(ee[D]||bS(D,S)||_t&&(D==="id"||D==="name")&&(Z in n||Z in hre))return!1;const Q=w[D]||le.attributeCheck instanceof Function&&le.attributeCheck(D,S);return ot&&Zt(Ie,D)||ce&&Zt(je,D)?!0:Q?zs[D]||Zt(Ye,Ia(Z,Le,""))||(D==="src"||D==="xlink:href"||D==="href")&&S!=="script"&&By(Z,"data:")===0&&Vs[S]||Qe&&!Zt(we,Ia(Z,Le,""))?!0:!Z:TS(S)&&qu(k.tagNameCheck,S)&&qu(k.attributeNameCheck,D,S)||D==="is"&&k.allowCustomizedBuiltInElements&&qu(k.tagNameCheck,Z)},Ire=Je({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),TS=function(S){return!Ire[Zo(S)]&&Zt(Fe,S)},Cre=function(S,D,Z,Q){if(C&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Z)switch(f.getAttributeType(S,D)){case"TrustedHTML":return F(Q);case"TrustedScriptURL":return M(Q)}return Q},xre=function(S,D,Z,Q){try{return Z?S.setAttributeNS(Z,D,Q):S.setAttribute(D,Q),zu(S)?(Lo(S),!1):!0}catch{return Ws(D,S),!1}},wS=function(S,D){return re&&Zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,D)?!0:Zo(S)==="attributename"&&Fy(D,"href")!==null},ah=function(S,D){if(fr(J.beforeSanitizeAttributes,S,null),Gs(S,D))return;const Z=S.attributes;if(!Z||zu(S))return;w=SS(J.uponSanitizeAttribute,w,T,ne);const Q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:w,forceKeepAttr:void 0};let ve=Z.length;const xe=Mt(S.nodeName);for(;ve--;){const qe=Z[ve],Ht=qe.name,Ir=qe.namespaceURI,bn=qe.value,In=Mt(Ht),Ys=bn;let Cn=Ht==="value"?Ys:mR(Ys),kS=!1;if(Q.attrName=In,Q.attrValue=Cn,Q.keepAttr=!0,Q.forceKeepAttr=void 0,fr(J.uponSanitizeAttribute,S,Q),Cn=Q.attrValue,At&&(In==="id"||In==="name")&&By(Cn,zt)!==0&&(Ws(Ht,S,qe),Cn=zt+Cn,kS=!0),wS(Ht,Cn)){Ws(Ht,S,qe);continue}if(!Q.forceKeepAttr){if(!Q.keepAttr){Ws(Ht,S,qe);continue}if(!Ue&&Zt(Ky,Cn)){Ws(Ht,S,qe);continue}if(G&&(Cn=ju(Cn)),!vS(xe,In,Cn)){Ws(Ht,S,qe);continue}Cn=Cre(xe,In,Ir,Cn),Cn!==Ys&&xre(S,Ht,Ir,Cn)&&kS&&Ly(t.removed)}}fr(J.afterSanitizeAttributes,S,null),Gs(S,D)},ql=function(S){let D=null;const Z=oh(S);for(fr(J.beforeSanitizeShadowDOM,S,null);D=Z.nextNode();)if(fr(J.uponSanitizeShadowNode,D,null),sh(D,S),ah(D,S),Fo(D.content)&&ql(D.content),v(D)===Lt.element){const Q=y(D);Fo(Q)&&(lh(Q),ql(Q))}G&&$S(S),fr(J.afterSanitizeShadowDOM,S,null)},lh=function(S){const D=[{node:S,shadow:null}];for(;D.length>0;){const Z=D.pop();if(Z.shadow){ql(Z.shadow);continue}const Q=Z.node,ve=v(Q)===Lt.element,xe=g(Q);if(xe)for(let qe=xe.length-1;qe>=0;--qe)D.push({node:xe[qe],shadow:null});if(ve){const qe=O?O(Q):null;if(typeof qe=="string"&&Mt(qe)==="template"){const Ht=Q.content;Fo(Ht)&&D.push({node:Ht,shadow:null})}}if(ve){const qe=y(Q);Fo(qe)&&D.push({node:null,shadow:qe},{node:qe,shadow:null})}}};return t.sanitize=function(ie){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=null,Z=null,Q=null,ve=null;if(K_=!ie,K_&&(ie="<!-->"),typeof ie!="string"&&!zl(ie)&&(ie=yR(ie),typeof ie!="string"))throw Br("dirty is not a string, aborting");if(!t.isSupported)return ie;L?(ke=z,w=ne):Q_(S),(J.uponSanitizeElement.length>0||J.uponSanitizeAttribute.length>0)&&(ke=Rn(ke)),J.uponSanitizeAttribute.length>0&&(w=Rn(w)),t.removed=[];const xe=Ut&&typeof ie!="string"&&zl(ie);let qe=[];const Ht=Ct;if(xe){kre(ie);const In=B(ie);if(typeof In=="string"){const Ys=Mt(In);if(!ke[Ys]||q[Ys])throw eh(ie),Br("root node is forbidden and cannot be sanitized in-place")}if(zu(ie))throw eh(ie),Br("root node is clobbered and cannot be sanitized in-place");qe=rh(ie),Ct=$p()}else if(zl(ie))D=ES("<!---->"),Z=D.ownerDocument.importNode(ie,!0),Z.nodeType===Lt.element&&Z.nodeName==="BODY"||Z.nodeName==="HTML"?D=Z:D.appendChild(Z),lh(D);else{if(!Ee&&!G&&!ze&&ie.indexOf("<")===-1)return C&&Se?F(ie):ie;if(D=ES(ie),!D)return Ee?null:Se?A:""}D&&pe&&Lo(D.firstChild);const Ir=xe?ie:D;try{xe&&lh(ie);const In=oh(Ir);for(;Q=In.nextNode();)sh(Q,Ir),ah(Q,Ir),Fo(Q.content)&&ql(Q.content);xe&&vre(ie,qe)}catch(In){throw xe&&(eh(ie),yS(ie,qe)),In}finally{Ct=Ht}if(xe){if(yS(ie,qe))throw Br("a node selected for removal could not be safely returned; refusing to sanitize in place");return G&&ih(ie),ie}if(Ee){if(G&&ih(D),Oe)for(ve=X.call(D.ownerDocument);D.firstChild;)ve.appendChild(D.firstChild);else ve=D;return(w.shadowroot||w.shadowrootmode)&&(ve=fe.call(r,ve,!0)),ve}let bn=ze?D.outerHTML:D.innerHTML;return ze&&ke["!doctype"]&&D.ownerDocument&&D.ownerDocument.doctype&&D.ownerDocument.doctype.name&&Zt(CR,D.ownerDocument.doctype.name)&&(bn="<!DOCTYPE "+D.ownerDocument.doctype.name+`>
|
|
28
|
-
`+bn),G&&(bn=ju(bn)),C&&Se?F(bn):bn},t.setConfig=function(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};
|
|
26
|
+
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[wn.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[wn.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component.",[wn.IGNORE_UNSAFE_LOCALE]:"Ignore '{locale}' locale: it is a property name of Object.prototype"};function Xo(e,...t){return Ec(ex[e],...t)}let Z2=null;{const e=co().__VUE_INSTANCE_SETTERS__;ht(e)&&e.push(t=>{Z2=t})}function _o(e){return Jg(e)?(process.env.NODE_ENV!=="production"&&Tn(Xo(wn.IGNORE_UNSAFE_LOCALE,{locale:e})),!0):!1}function ka(e){if(!He(e)||uo(e))return e;for(const t in e)if(jn(e,t))if(!t.includes("."))He(e[t])&&ka(e[t]);else{const n=t.split("."),r=n.length-1;let o=e,i=!1;for(let l=0;l<r;l++){if(n[l]==="__proto__")throw new Error(`unsafe key: ${n[l]}`);if(n[l]in o||(o[n[l]]=nt()),!He(o[n[l]])){process.env.NODE_ENV!=="production"&&Tn(Xo(wn.IGNORE_OBJ_FLATTEN,{key:n[l]})),i=!0;break}if(uo(o[n[l]])&&(_2.includes(n[l+1])||n[l+1]==="cacheKey")){i=!0;break}o=o[n[l]]}i||(o[n[r]]=e[t],delete e[t]);const s=o[n[r]];He(s)&&ka(s)}return e}function ap(e,t){const{messages:n,__i18n:r,messageResolver:o,flatJson:i}=t,s=dt(n)?n:ht(r)?nt():{[e]:nt()};if(ht(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:c,resource:d}=l;if(c){if(_o(c))return;s[c]=Yt(s,c)||nt(),vc(d,s[c])}else vc(d,s)}else he(l)&&vc(JSON.parse(l),s)}),o==null&&i)for(const l in s)jn(s,l)&&ka(s[l]);return s}function Q2(e){return e.type}function ey(e,t,n){let r=He(t.messages)?t.messages:nt();"__i18nGlobal"in n&&(r=ap(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(i=>{e.mergeLocaleMessage(i,r[i])});{if(He(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(He(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function ty(e){return a.createVNode(a.Text,null,e,0)}function Fi(){return Z2??a.getCurrentInstance()}const ny="__INTLIFY_META__",ry=()=>[],tx=()=>!1;let oy=0;function iy(e){return((t,n,r,o)=>e(n,r,Fi()||void 0,o))}const nx=()=>{const e=Fi();let t=null;return e&&(t=Q2(e)[ny])?{[ny]:t}:null};function Ic(e={}){const{__root:t,__injectWithOption:n}=e,r=t===void 0,o=e.flatJson,i=tr?a.ref:a.shallowRef;let s=rt(e.inheritLocale)?e.inheritLocale:!0;const l=i(t&&s?t.locale.value:he(e.locale)?e.locale:wa),c=i(t&&s?t.fallbackLocale.value:he(e.fallbackLocale)||ht(e.fallbackLocale)||dt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),d=i(ap(l.value,e)),f=i(dt(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),u=i(dt(e.numberFormats)?e.numberFormats:{[l.value]:{}});let p=t?t.missingWarn:rt(e.missingWarn)||Go(e.missingWarn)?e.missingWarn:!0,m=t?t.fallbackWarn:rt(e.fallbackWarn)||Go(e.fallbackWarn)?e.fallbackWarn:!0,_=t?t.fallbackRoot:rt(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,g=ct(e.missing)?e.missing:null,h=ct(e.missing)?iy(e.missing):null,y=ct(e.postTranslation)?e.postTranslation:null,E=t?t.warnHtmlMessage:rt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,$=!!e.escapeParameter;const O=t?t.modifiers:dt(e.modifiers)?e.modifiers:{};let N=e.pluralRules||t&&t.pluralRules,v;v=(()=>{r&&k2(null);const G={version:ZC,locale:l.value,fallbackLocale:c.value,messages:d.value,modifiers:O,pluralRules:N,missing:h===null?void 0:h,missingWarn:p,fallbackWarn:m,fallbackFormat:b,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:E,escapeParameter:$,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};G.datetimeFormats=f.value,G.numberFormats=u.value;const re=CC(G);return r&&k2(re),re})(),Ac(v,l.value,c.value);function H(){return[l.value,c.value,d.value,f.value,u.value]}const U=a.computed({get:()=>l.value,set:G=>{v.locale=G,l.value=G}});function C(G){r||(v.fallbackContext=IC());try{return G()}finally{r||(v.fallbackContext=void 0)}}function A(G){C(()=>Ac(v,l.value,G))}const R=a.computed({get:()=>c.value,set:G=>{c.value=G,v.fallbackLocale=c.value,A(c.value)}}),I=a.computed(()=>d.value),V=a.computed(()=>f.value),j=a.computed(()=>u.value);function F(){return ct(y)?y:null}function M(G){y=G,v.postTranslation=G}function Y(){return g}function W(G){G!==null&&(h=iy(G)),g=G,v.missing=h}function K(G,re){return G!=="translate"||!re.resolvedMessage}const te=(G,re,ze,L,z,ne)=>{H();let pe;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,pe=C(()=>G(v))}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__}if(ze!=="translate exists"&&xt(pe)&&pe===kc||ze==="translate exists"&&!pe){const[Ee,Oe]=re();if(process.env.NODE_ENV!=="production"&&t&&he(Ee)&&K(ze,Oe)&&(_&&(Zf(m,Ee)||N2(p,Ee))&&Tn(Xo(wn.FALLBACK_TO_ROOT,{key:Ee,type:ze})),process.env.NODE_ENV!=="production")){const{__v_emitter:Se}=v;Se&&_&&Se.emit("fallback",{type:ze,key:Ee,to:"global",groupId:lo(ze,Ee)})}return t&&_?L(t):z(Ee)}else{if(ne(pe))return pe;throw mn(at.UNEXPECTED_RETURN_TYPE)}};function X(...G){return te(re=>Reflect.apply(H2,null,[re,...G]),()=>np(...G),"translate",re=>Reflect.apply(re.t,re,[...G]),re=>re,re=>he(re))}function oe(...G){const[re,ze,L]=G;if(L&&!He(L))throw mn(at.INVALID_ARGUMENT);return X(re,ze,Ot({resolvedMessage:!0},L||{}))}function fe(...G){return te(re=>Reflect.apply(F2,null,[re,...G]),()=>Qf(...G),"datetime format",re=>Reflect.apply(re.d,re,[...G]),()=>Mi,re=>he(re)||ht(re))}function J(...G){return te(re=>Reflect.apply(V2,null,[re,...G]),()=>ep(...G),"number format",re=>Reflect.apply(re.n,re,[...G]),()=>Mi,re=>he(re)||ht(re))}function ae(G){return G.map(re=>he(re)||xt(re)||rt(re)?ty(String(re)):re)}const $e={normalize:ae,interpolate:G=>G,type:"vnode"};function Ie(...G){return te(re=>{let ze;const L=re;try{L.processor=$e,ze=Reflect.apply(H2,null,[L,...G])}finally{L.processor=null}return ze},()=>np(...G),"translate",re=>re[op](...G),re=>[ty(re)],re=>ht(re))}function je(...G){return te(re=>Reflect.apply(V2,null,[re,...G]),()=>ep(...G),"number format",re=>re[sp](...G),ry,re=>he(re)||ht(re))}function we(...G){return te(re=>Reflect.apply(F2,null,[re,...G]),()=>Qf(...G),"datetime format",re=>re[ip](...G),ry,re=>he(re)||ht(re))}function Le(G){N=G,v.pluralRules=N}function Fe(G,re){const ze=w(G),L=v.messageResolver(ze,re);return L===null?Yt(ze,re):L}function Ye(G,re){return te(()=>{if(!G)return!1;const ze=he(re)?re:l.value,L=he(re)?[ze]:v.localeFallbacker(v,c.value,ze);for(let z=0;z<L.length;z++)if(Nc(Fe(L[z],G)))return!0;return!1},()=>[G],"translate exists",ze=>Reflect.apply(ze.te,ze,[G,re]),tx,ze=>rt(ze))}function ke(G){let re=null;const ze=v.localeFallbacker(v,c.value,l.value);for(let L=0;L<ze.length;L++){const z=Fe(ze[L],G);if(z!=null){re=z;break}}return re}function Ze(G){const re=ke(G);return re??(t?t.tm(G)||{}:{})}function w(G){return Yt(d.value,G)||{}}function T(G,re){_o(G)||(o&&ka(re),d.value[G]=re,v.messages=d.value)}function k(G,re){_o(G)||(d.value[G]=Yt(d.value,G)||{},o&&ka(re),vc(re,d.value[G]),v.messages=d.value)}function q(G){return Yt(f.value,G)||{}}function ee(G,re){_o(G)||(f.value[G]=re,v.datetimeFormats=f.value,U2(v,G,re))}function le(G,re){_o(G)||(f.value[G]=Ot(Yt(f.value,G)||{},re),v.datetimeFormats=f.value,U2(v,G,re))}function ce(G){return Yt(u.value,G)||{}}function ot(G,re){_o(G)||(u.value[G]=re,v.numberFormats=u.value,z2(v,G,re))}function Qe(G,re){_o(G)||(u.value[G]=Ot(Yt(u.value,G)||{},re),v.numberFormats=u.value,z2(v,G,re))}oy++,a.watch(c,()=>A(c.value),{deep:!0,flush:"sync"}),t&&tr&&(a.watch(t.locale,G=>{s&&(l.value=G,v.locale=G,Ac(v,l.value,c.value))}),a.watch(t.fallbackLocale,G=>{s&&(c.value=G,v.fallbackLocale=c.value,Ac(v,l.value,c.value))}));const Ue={id:oy,locale:U,fallbackLocale:R,get inheritLocale(){return s},set inheritLocale(G){s=G,G&&t&&(U.value=t.locale.value,R.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(d.value).sort()},messages:I,get modifiers(){return O},get pluralRules(){return N||{}},get isGlobal(){return r},get missingWarn(){return p},set missingWarn(G){p=G,v.missingWarn=p},get fallbackWarn(){return m},set fallbackWarn(G){m=G,v.fallbackWarn=m},get fallbackRoot(){return _},set fallbackRoot(G){_=G},get fallbackFormat(){return b},set fallbackFormat(G){b=G,v.fallbackFormat=b},get warnHtmlMessage(){return E},set warnHtmlMessage(G){E=G,v.warnHtmlMessage=G},get escapeParameter(){return $},set escapeParameter(G){$=G,v.escapeParameter=G},t:X,getLocaleMessage:w,setLocaleMessage:T,mergeLocaleMessage:k,getPostTranslationHandler:F,setPostTranslationHandler:M,getMissingHandler:Y,setMissingHandler:W,[X2]:Le};return Ue.datetimeFormats=V,Ue.numberFormats=j,Ue.rt=oe,Ue.te=Ye,Ue.tm=Ze,Ue.d=fe,Ue.n=J,Ue.getDateTimeFormat=q,Ue.setDateTimeFormat=ee,Ue.mergeDateTimeFormat=le,Ue.getNumberFormat=ce,Ue.setNumberFormat=ot,Ue.mergeNumberFormat=Qe,Ue[J2]=n,Ue[op]=Ie,Ue[ip]=we,Ue[sp]=je,process.env.NODE_ENV!=="production"&&(Ue[Dr]=G=>{v.__v_emitter=G},Ue[Ko]=()=>{v.__v_emitter=void 0}),Ue}const sy="vue-i18n: composer properties",lp={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},rx={"vue-i18n-resource-inspector":"Search for scopes ..."},ox={"vue-i18n-timeline":16764185};let cp;async function ix(e,t){return new Promise((n,r)=>{try{JC({id:"vue-devtools-plugin-vue-i18n",label:lp["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[sy],app:e},o=>{cp=o,o.on.visitComponentTree(({componentInstance:s,treeNode:l})=>{sx(s,l,t)}),o.on.inspectComponent(({componentInstance:s,instanceData:l})=>{s.__VUE_I18N__&&l&&(t.mode==="legacy"?s.__VUE_I18N__!==t.global.__composer&&ly(l,s.__VUE_I18N__):ly(l,s.__VUE_I18N__))}),o.addInspector({id:"vue-i18n-resource-inspector",label:lp["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:rx["vue-i18n-resource-inspector"]}),o.on.getInspectorTree(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&ux(s,t)});const i=new Map;o.on.getInspectorState(async s=>{if(s.app===e&&s.inspectorId==="vue-i18n-resource-inspector")if(o.unhighlightElement(),px(s,t),s.nodeId==="global"){if(!i.has(s.app)){const[l]=await o.getComponentInstances(s.app);i.set(s.app,l)}o.highlightElement(i.get(s.app))}else{const l=fx(s.nodeId,t);l&&o.highlightElement(l)}}),o.on.editInspectorState(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&_x(s,t)}),o.addTimelineLayer({id:"vue-i18n-timeline",label:lp["vue-i18n-timeline"],color:ox["vue-i18n-timeline"]}),n(!0)})}catch(o){console.error(o),r(!1)}})}function ay(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function sx(e,t,n){const r=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.__VUE_I18N__&&e.__VUE_I18N__!==r){const o={label:`i18n (${ay(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(o)}}function ly(e,t){const n=sy;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:dp(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function dp(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];ct(r)&&"source"in r?t[n]=dx(r):uo(r)&&r.loc&&r.loc.source?t[n]=r.loc.source:He(r)?t[n]=dp(r):t[n]=r}),t}const ax={"<":"<",">":">",'"':""","&":"&"};function lx(e){return e.replace(/[<>"&]/g,cx)}function cx(e){return ax[e]||e}function dx(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${lx(e.source)}")`:"(?)"}`}}}function ux(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[r,o]of t.__instances){const i=t.mode==="composition"?o:o.__composer;n!==i&&e.rootNodes.push({id:i.id.toString(),label:`${ay(r)} Scope`})}}function fx(e,t){let n=null;if(e!=="global"){for(const[r,o]of t.__instances.entries())if(o.id.toString()===e){n=r;break}}return n}function cy(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(r=>r.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function px(e,t){const n=cy(e.nodeId,t);return n&&(e.state=mx(n)),null}function mx(e){const t={},n="Locale related info",r=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=r;const o="Locale messages info",i=[{type:o,key:"messages",editable:!1,value:dp(e.messages.value)}];t[o]=i;{const s="Datetime formats info",l=[{type:s,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[s]=l;const c="Datetime formats info",d=[{type:c,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[c]=d}return t}function Jo(e,t){if(cp){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),cp.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function _x(e,t){const n=cy(e.nodeId,t);if(n){const[r]=e.path;r==="locale"&&he(e.state.value)?n.locale.value=e.state.value:r==="fallbackLocale"&&(he(e.state.value)||ht(e.state.value)||He(e.state.value))?n.fallbackLocale.value=e.state.value:r==="inheritLocale"&&rt(e.state.value)&&(n.inheritLocale=e.state.value)}}const up=new WeakMap;function Bi(e){if(!Go(e))return!e;let t=up.get(e);return t||(t=new RegExp(`^(?![\\s\\S]*(?:${e.source}))`,e.flags.replace(/[gy]/g,"")),up.set(e,t),up.set(t,e)),t}function hx(e){const t=he(e.locale)?e.locale:wa,n=he(e.fallbackLocale)||ht(e.fallbackLocale)||dt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=ct(e.missing)?e.missing:void 0,o=rt(e.silentTranslationWarn)||Go(e.silentTranslationWarn)?Bi(e.silentTranslationWarn):!0,i=rt(e.silentFallbackWarn)||Go(e.silentFallbackWarn)?Bi(e.silentFallbackWarn):!0,s=rt(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,c=dt(e.modifiers)?e.modifiers:{},d=e.pluralizationRules,f=ct(e.postTranslation)?e.postTranslation:void 0,u=he(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,p=!!e.escapeParameterHtml,m=rt(e.sync)?e.sync:!0;let _=e.messages;if(dt(e.sharedMessages)){const O=e.sharedMessages;_=Object.keys(O).reduce((v,B)=>{if(_o(B))return v;const H=Yt(v,B)||(v[B]={});return Ot(H,O[B]),v},_||{})}const{__i18n:b,__root:g,__injectWithOption:h}=e,y=e.datetimeFormats,E=e.numberFormats,$=e.flatJson;return{locale:t,fallbackLocale:n,messages:_,flatJson:$,datetimeFormats:y,numberFormats:E,missing:r,missingWarn:o,fallbackWarn:i,fallbackRoot:s,fallbackFormat:l,modifiers:c,pluralRules:d,postTranslation:f,warnHtmlMessage:u,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:m,__i18n:b,__root:g,__injectWithOption:h}}function fp(e={}){const t=Ic(hx(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(o){t.locale.value=o},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(o){t.fallbackLocale.value=o},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(o){t.setMissingHandler(o)},get silentTranslationWarn(){return Bi(t.missingWarn)},set silentTranslationWarn(o){t.missingWarn=Bi(o)},get silentFallbackWarn(){return Bi(t.fallbackWarn)},set silentFallbackWarn(o){t.fallbackWarn=Bi(o)},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(o){t.fallbackFormat=o},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(o){t.setPostTranslationHandler(o)},get sync(){return t.inheritLocale},set sync(o){t.inheritLocale=o},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(o){t.warnHtmlMessage=o!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(o){t.escapeParameter=o},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...o){return Reflect.apply(t.t,t,[...o])},rt(...o){return Reflect.apply(t.rt,t,[...o])},te(o,i){return t.te(o,i)},tm(o){return t.tm(o)},getLocaleMessage(o){return t.getLocaleMessage(o)},setLocaleMessage(o,i){t.setLocaleMessage(o,i)},mergeLocaleMessage(o,i){t.mergeLocaleMessage(o,i)},d(...o){return Reflect.apply(t.d,t,[...o])},getDateTimeFormat(o){return t.getDateTimeFormat(o)},setDateTimeFormat(o,i){t.setDateTimeFormat(o,i)},mergeDateTimeFormat(o,i){t.mergeDateTimeFormat(o,i)},n(...o){return Reflect.apply(t.n,t,[...o])},getNumberFormat(o){return t.getNumberFormat(o)},setNumberFormat(o,i){t.setNumberFormat(o,i)},mergeNumberFormat(o,i){t.mergeNumberFormat(o,i)}};return r.__extender=n,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=o=>{const i=t;i[Dr]&&i[Dr](o)},r.__disableEmitter=()=>{const o=t;o[Ko]&&o[Ko]()}),r}function gx(e,t,n){return{beforeCreate(){const r=Fi();if(!r)throw mn(at.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const i=Ot({},o.i18n);if(o.__i18n&&(i.__i18n=o.__i18n),i.__root=t,this===this.$root)this.$i18n=dy(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=fp(i);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=dy(e,o);else{this.$i18n=fp({__i18n:o.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;o.__i18nGlobal&&ey(t,o,o),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$te=(i,s)=>this.$i18n.te(i,s),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$i18n){const r=Fi();if(!r)return;const o=this.$i18n;r.__VUE_I18N__=o.__composer;const i=this.__v_emitter=Sc();o.__enableEmitter&&o.__enableEmitter(i),i.on("*",Jo)}},unmounted(){const r=Fi();if(!r)throw mn(at.UNEXPECTED_ERROR);const o=this.$i18n;process.env.NODE_ENV!=="production"&&r.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Jo),delete this.__v_emitter),o&&(o.__disableEmitter&&o.__disableEmitter(),delete r.__VUE_I18N__)),o&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,o?.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),n.__deleteInstance(r),delete this.$i18n)}}}function dy(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[X2](t.pluralizationRules||e.pluralizationRules);const n=ap(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const pp={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function yx({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,o)=>[...r,...o.type===a.Fragment?o.children:[o]],[]):t.reduce((n,r)=>{const o=e[r];return o&&(n[r]=o()),n},nt())}function uy(){return a.Fragment}const fy=a.defineComponent({name:"i18n-t",props:Ot({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>xt(e)||!isNaN(e)}},pp),setup(e,t){const{slots:n,attrs:r}=t,o=e.i18n||mp({useScope:e.scope,__useComponent:!0});return()=>{const i=()=>{const c=Object.keys(n).filter(u=>u[0]!=="_"),d=nt();e.locale&&(d.locale=e.locale),e.plural!==void 0&&(d.plural=he(e.plural)?+e.plural:e.plural);const f=yx(t,c);return o[op](e.keypath,f,d)},s=Ot(nt(),r),l=he(e.tag)||He(e.tag)?e.tag:uy();return He(l)?a.h(l,s,{default:i}):a.h(l,s,i())}}});function bx(e){return ht(e)&&!he(e[0])}function py(e,t,n,r){const{slots:o,attrs:i}=t;return()=>{const s=()=>{const d={part:!0};let f=nt();e.locale&&(d.locale=e.locale),he(e.format)?d.key=e.format:He(e.format)&&(he(e.format.key)&&(d.key=e.format.key),f=Object.keys(e.format).reduce((m,_)=>n.includes(_)?Ot(nt(),m,{[_]:e.format[_]}):m,nt()));const u=r(e.value,d,f);let p=[d.key];return ht(u)?p=u.map((m,_)=>{const b=o[m.type],g=b?b({[m.type]:m.value,index:_,parts:u}):[m.value];return bx(g)&&(g[0].key=`${m.type}-${_}`),g}):he(u)&&(p=[u]),p},l=Ot(nt(),i),c=he(e.tag)||He(e.tag)?e.tag:uy();return He(c)?a.h(c,l,{default:s}):a.h(c,l,s())}}const my=a.defineComponent({name:"i18n-n",props:Ot({value:{type:Number,required:!0},format:{type:[String,Object]}},pp),setup(e,t){const n=e.i18n||mp({useScope:e.scope,__useComponent:!0});return py(e,t,j2,(...r)=>n[sp](...r))}});function Ex(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function $x(e){const t=s=>{process.env.NODE_ENV!=="production"&&$c(Xo(wn.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:l,value:c}=s;if(!l||!l.$)throw mn(at.UNEXPECTED_ERROR);const d=Ex(e,l.$),f=_y(c);return[Reflect.apply(d.t,d,[...hy(f)]),d]};return{created:(s,l)=>{const[c,d]=t(l);tr&&(s.__i18nWatcher=a.watch(d.locale,()=>{l.instance&&l.instance.$forceUpdate()})),s.__composer=d,s.textContent=c},unmounted:s=>{tr&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:l})=>{if(s.__composer){const c=s.__composer,d=_y(l);s.textContent=Reflect.apply(c.t,c,[...hy(d)])}},getSSRProps:s=>{const[l]=t(s);return{textContent:l}}}}function _y(e){if(he(e))return{path:e};if(dt(e)){if(!("path"in e))throw mn(at.REQUIRED_VALUE,"path");return e}else throw mn(at.INVALID_VALUE)}function hy(e){const{path:t,locale:n,args:r,choice:o,plural:i}=e,s={},l=r||{};return he(n)&&(s.locale=n),xt(o)&&(s.plural=o),xt(i)&&(s.plural=i),[t,l,s]}function Sx(e,t,...n){const r=dt(n[0])?n[0]:{};(rt(r.globalInstall)?r.globalInstall:!0)&&([fy.name,"I18nT"].forEach(i=>e.component(i,fy)),[my.name,"I18nN"].forEach(i=>e.component(i,my)),[by.name,"I18nD"].forEach(i=>e.component(i,by))),e.directive("t",$x(t))}const vx=_r("global-vue-i18n");function Tx(e={}){const t=__VUE_I18N_LEGACY_API__&&rt(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&t&&$c(Xo(wn.DEPRECATE_LEGACY_MODE));const n=rt(e.globalInjection)?e.globalInjection:!0,r=new Map,[o,i]=wx(e,t),s=_r(process.env.NODE_ENV!=="production"?"vue-i18n":"");function l(u){return r.get(u)||null}function c(u,p){r.set(u,p)}function d(u){r.delete(u)}const f={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},install(u,...p){if(process.env.NODE_ENV!=="production"&&(u.__VUE_I18N__=f),u.__VUE_I18N_SYMBOL__=s,u.provide(u.__VUE_I18N_SYMBOL__,f),dt(p[0])){const b=p[0];f.__composerExtend=b.__composerExtend,f.__vueI18nExtend=b.__vueI18nExtend}let m=null;!t&&n&&(m=Ox(u,f.global)),__VUE_I18N_FULL_INSTALL__&&Sx(u,f,...p),__VUE_I18N_LEGACY_API__&&t&&u.mixin(gx(i,i.__composer,f));const _=u.unmount;u.unmount=()=>{m&&m(),f.dispose(),_()},process.env.NODE_ENV!=="production"&&ix(u,f).then(b=>{if(!b)throw mn(at.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const g=Sc();if(t){const h=i;h.__enableEmitter&&h.__enableEmitter(g)}else{const h=i;h[Dr]&&h[Dr](g)}g.on("*",Jo)}).catch(()=>{process.env.NODE_ENV!=="production"&&Tn(K2[at.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN])})},get global(){return i},dispose(){o.stop()},__instances:r,__getInstance:l,__setInstance:c,__deleteInstance:d};return f}function mp(e={}){const t=Fi();if(t==null)throw mn(at.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw mn(at.NOT_INSTALLED);const n=kx(t),r=Nx(n),o=Q2(t),i=Ax(e,o);if(i==="global")return ey(r,e,o),r;if(i==="parent"){let c=gy(n,t,e.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&Tn(Xo(wn.NOT_FOUND_PARENT_SCOPE)),c=r),c}if(i==="isolated"){if(n.mode!=="composition")throw mn(at.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const c=n,d=Ot({},e),f=gy(n,t);d.__root=f||r;const u=Ic(d);c.__composerExtend&&(u[Li]=c.__composerExtend(u));let p=null;if(process.env.NODE_ENV!=="production"){p=Sc();const _=u;_[Dr]&&_[Dr](p),p.on("*",Jo)}return a.getCurrentScope()&&a.onScopeDispose(()=>{if(process.env.NODE_ENV!=="production"){p&&p.off("*",Jo);const b=u;b[Ko]&&b[Ko]()}const _=u[Li];_&&(_(),delete u[Li])}),u}const s=n;let l=s.__getInstance(t);if(l==null){const c=Ot({},e);"__i18n"in o&&(c.__i18n=o.__i18n),r&&(c.__root=r),l=Ic(c),s.__composerExtend&&(l[Li]=s.__composerExtend(l)),Cx(s,t,l),s.__setInstance(t,l)}else process.env.NODE_ENV!=="production"&&i==="local"&&Tn(Xo(wn.DUPLICATE_USE_I18N_CALLING));return l}function wx(e,t){const n=a.effectScope(),r=__VUE_I18N_LEGACY_API__&&t?n.run(()=>fp(e)):n.run(()=>Ic(e));if(r==null)throw mn(at.UNEXPECTED_ERROR);return[n,r]}function kx(e){const t=a.inject(e.isCE?vx:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw mn(e.isCE?at.NOT_INSTALLED_WITH_PROVIDE:at.UNEXPECTED_ERROR);return t}function Ax(e,t){return Uf(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Nx(e){return e.mode==="composition"?e.global:e.global.__composer}function gy(e,t,n=!1){let r=null;const o=t.root;let i=Ix(t,n);for(;i!=null;){const s=e;if(e.mode==="composition")r=s.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const l=s.__getInstance(i);l!=null&&(r=l.__composer,n&&r&&!r[J2]&&(r=null))}if(r!=null||o===i)break;i=i.parent}return r}function Ix(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Cx(e,t,n){let r=null;a.onMounted(()=>{if(process.env.NODE_ENV!=="production"){t.__VUE_I18N__=n,r=Sc();const o=n;o[Dr]&&o[Dr](r),r.on("*",Jo)}},t),a.onUnmounted(()=>{const o=n;process.env.NODE_ENV!=="production"&&(r&&r.off("*",Jo),o[Ko]&&o[Ko](),delete t.__VUE_I18N__),e.__deleteInstance(t);const i=o[Li];i&&(i(),delete o[Li])},t)}const xx=["locale","fallbackLocale","availableLocales"],yy=["t","rt","d","n","tm","te"];function Ox(e,t){const n=Object.create(null);return xx.forEach(o=>{const i=Object.getOwnPropertyDescriptor(t,o);if(!i)throw mn(at.UNEXPECTED_ERROR);const s=a.isRef(i.value)?{get(){return i.value.value},set(l){i.value.value=l}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,o,s)}),e.config.globalProperties.$i18n=n,yy.forEach(o=>{const i=Object.getOwnPropertyDescriptor(t,o);if(!i||!i.value)throw mn(at.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,i)}),()=>{delete e.config.globalProperties.$i18n,yy.forEach(o=>{delete e.config.globalProperties[`$${o}`]})}}const by=a.defineComponent({name:"i18n-d",props:Ot({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},pp),setup(e,t){const n=e.i18n||mp({useScope:e.scope,__useComponent:!0});return py(e,t,B2,(...r)=>n[ip](...r))}});if(QC(),TC(nC),wC(EC),kC(dC),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=co();e.__INTLIFY__=!0,rC(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Ey={fr:{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",multiselect_list_empty:"Commencez à taper",champ_obligatoire:"Champs obligatoires",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 chiffres",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 chiffres",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe.</a>",blurry_document:"Ce document nous semble flou. Si vous êtes sûr de sa netteté, vous pouvez continuer, sinon, nous vous conseillons d'envoyer une autre image.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",changez_votre_adresse:"Modifiez votre adresse",N_rue:"Adresse",compl_addresse:"Complément d'adresse",ville:"Ville",code_postal:"Code postal",pays:"Pays",Madame:"Madame",Numero_identification:"Siren ou numéro DUNS *",Monsieur:"Monsieur","Corrigez les erreurs":"Veuillez vérifier les erreurs restantes dans le formulaire.",date_fin_regule_passee:"La date limite de régularisation est dépassée. Le formulaire ne peut plus être soumis.",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",trouvepasreparateur:"Vous ne trouvez pas votre réparateur?",email_reparateur:"Email de votre réparateur *",enseigne_psa:"Nom de la société *",multiple_file_upload_en_cours:"Téléchargement en cours",multiple_file_aucun_fichier:"Aucun fichier",multiple_file_patientez:"Veuillez patienter, un ou plusieurs fichiers sont en cours de téléchargement. Ne validez pas le formulaire avant la fin de l'opération",multiple_file_add_file:"Ajouter un fichier",multiple_file_remove_file:"Retirer un fichier",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo",select_Précisez:"Veuillez préciser",prix_produit_produit:"Produit",prix_produit_reference:"Référence",prix_produit_description:"Description",prix_produit_quantite:"Quantité",prix_produit_prix:"Prix unitaire",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Sélectionnez une option",prix_produit_max_reached:"Limite de {max} produit(s) atteinte",prix_produit_error_select_ref:"Veuillez sélectionner une référence pour le produit {num}",prix_produit_error_select_refs:"Veuillez sélectionner une référence pour les produits {nums}",prix_produit_error_quantity:"Veuillez indiquer une quantité d’au moins 1 pour le produit {num}",prix_produit_error_price:"Le prix du produit {num} est requis",prix_produit_error_min_refs:"Veuillez sélectionner au moins {min} référence(s)","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :",field_required:"Ce champ est obligatoire.",date_invalid:"La date n’est pas valide.",date_after:"La date doit être postérieure au {date}.",date_before:"La date doit être antérieure au {date}.",phone_invalid:"Le numéro de téléphone n’est pas valide.",phone_country_not_accepted:"Le numéro de téléphone n’est pas accepté pour ce pays.",phone_mobile_required:"Veuillez saisir un numéro de téléphone mobile.",phone_fixed_required:"Veuillez saisir un numéro de téléphone fixe.",iban_invalid:"L’IBAN saisi n’est pas valide.",iban_country_not_accepted:"Le pays de cet IBAN n’est pas accepté pour cette opération.",postalcode_invalid:"Le code postal n’est pas valide.",unique_email_used:"Cette adresse e-mail a déjà été utilisée pour participer.",unique_phone_used:"Ce numéro de téléphone a déjà été utilisé pour participer.",unique_value_used:"Cette valeur a déjà été utilisée pour participer.",unique_check_failed:"La vérification d’unicité a échoué, veuillez réessayer.",error_title:"Erreur",error_generic:"Une erreur est survenue",prix_produit_add:"Ajouter un produit",prix_produit_remove:"Retirer",file_selected:"1 fichier sélectionné",file_upload_failed:"L’envoi du fichier a échoué.",file_format_not_accepted:"Format non accepté. Formats acceptés : {formats}",file_select_required:"Veuillez sélectionner un fichier",file_upload_button:"Télécharger",file_delete:"Supprimer le fichier",multiple_files_max:"Maximum {max} fichier(s).",multiple_files_drop:"Déposez vos fichiers ou cliquez"},en:{address_required:"The address is required",address_metropolitan_only:"This offer is only valid in mainland France and Corsica.",email_domain_not_allowed:"This email domain is not allowed for this operation.",noticetextlink:"attached notice",suivant:"Next",valider:"Submit",champ_obligatoire:"Required fields",multiselect_list_empty:"Start typing",iban_section_title:"Information on your IBAN",iban_holder:"Account holder",iban_warning:"Since 09/10/2025, the entered IBAN must match the account holder indicated. Any inconsistency may block the transfer.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 digits",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 digits",rgpd:"processes the data collected on the basis of the performance of the contract to manage your participation in this operation. To learn more about how your personal data is managed and to exercise your rights, please refer to the <a href='{link}' target='_blank' id='noticelink'>attached notice</a>.",precedent:"Previous",merci_renseigner_adresse:`Please select a suggested address or click on "I can't find my address"`,trouvepasadresse:"I can't find my address",trouvepasreparateur:"You can't find it?",email_reparateur:"E-mail of your repairer *",enseigne_psa:"Company name *",Numero_identification:"DUNS number *",votre_adresse:"Your address *",changez_votre_adresse:"Edit your address",N_rue:"Number and street name",compl_addresse:"Additional address info",ville:"City",code_postal:"ZIP code",pays:"Country","Corrigez les erreurs":"Please check the remaining errors in the form.",date_fin_regule_passee:"The regularization deadline has passed. The form can no longer be submitted.",Madame:"Mrs.",Monsieur:"Mr.",multiple_file_upload_en_cours:"Upload in progress",multiple_file_aucun_fichier:"No file",multiple_file_patientez:"Please wait, one or more files are being uploaded. Do not submit the form until the operation is complete.",multiple_file_add_file:"Add a file",multiple_file_remove_file:"Remove a file",file_max_size_error:"The file size is too large",file_heic_error:"iPhone .heic files not supported",file_max_size_info:"Maximum file size: {size} MB",select_Précisez:"Please specify",prix_produit_produit:"Product",prix_produit_reference:"Reference",prix_produit_description:"Description",prix_produit_quantite:"Quantity",prix_produit_prix:"Unit price incl. tax",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Select an option",prix_produit_max_reached:"Limit of {max} product(s) reached",prix_produit_error_select_ref:"Please select a reference for product {num}",prix_produit_error_select_refs:"Please select a reference for products {nums}",prix_produit_error_quantity:"Please enter a quantity of at least 1 for product {num}",prix_produit_error_price:"The price of product {num} is required",prix_produit_error_min_refs:"Please select at least {min} reference(s)","Erreurs de validation":"Validation errors","Champs concernés :":"Affected fields:",field_required:"This field is required.",date_invalid:"The date is not valid.",date_after:"The date must be after {date}.",date_before:"The date must be before {date}.",phone_invalid:"The phone number is not valid.",phone_country_not_accepted:"Phone numbers from this country are not accepted.",phone_mobile_required:"Please enter a mobile phone number.",phone_fixed_required:"Please enter a landline number.",iban_invalid:"The IBAN entered is not valid.",iban_country_not_accepted:"IBANs from this country are not accepted for this operation.",postalcode_invalid:"The postcode is not valid.",unique_email_used:"This email address has already been used to take part.",unique_phone_used:"This phone number has already been used to take part.",unique_value_used:"This value has already been used to take part.",unique_check_failed:"The check failed. Please try again.",error_title:"Error",error_generic:"An error has occurred",prix_produit_add:"Add a product",prix_produit_remove:"Remove",file_selected:"1 file selected",file_upload_failed:"The file upload failed.",file_format_not_accepted:"Format not accepted. Accepted formats: {formats}",file_select_required:"Please select a file",file_upload_button:"Upload",file_delete:"Delete file",multiple_files_max:"Maximum {max} file(s).",multiple_files_drop:"Drop your files here or click"},es:{address_required:"La dirección es obligatoria",address_metropolitan_only:"Esta oferta solo es válida en Francia metropolitana y Córcega.",email_domain_not_allowed:"Este dominio de correo electrónico no está permitido para esta operación.",noticetextlink:"aviso adjunto",suivant:"próximo",valider:"Validar",champ_obligatoire:"campos obligatorios",iban_section_title:"Información indicada en su IBAN",iban_holder:"Titular de la cuenta",iban_warning:"Desde el 09/10/2025, el IBAN ingresado debe corresponder al titular de la cuenta indicado. Cualquier inconsistencia puede bloquear la transferencia.",rgpd:"trata los datos recopilados sobre la base de la ejecución del contrato para gestionar su participación en esta operación. Para obtener más información sobre la gestión de sus datos personales y ejercer sus derechos, <a href='{link}' target='_blank' id='noticelink'>consulte el aviso adjunto</a>.",precedent:"anterior",merci_renseigner_adresse:'Introduzca su dirección o haga clic en "No encuentro mi dirección"',votre_adresse:"Tu dirección *",changez_votre_adresse:"Cambie tu dirección",Numero_identification:"TO_TRANSLATE_ES D.U.N.S number *",N_rue:"Número y nombre de la calle",compl_addresse:"Información de dirección adicional",ville:"Ciudad",code_postal:"Código postal",pays:"País",Madame:"Señor",Monsieur:"Señora",trouvepasadresse:"No se pudo encontrar su dirección","Corrigez les erreurs":"Compruebe si hay errores en el formulario",date_fin_regule_passee:"La fecha límite de regularización ha pasado. El formulario ya no puede ser enviado.",trouvepasreparateur:"TO_TRANSLATE_ES_REPARATOR?",enseigne_psa:"TO_TRANSLATE_ES_ENSEIGNE",email_reparateur:"TO_TRANSLATE_ES_E-mail of your repairer *",multiple_file_upload_en_cours:"Subida en curso",multiple_file_aucun_fichier:"Ningún archivo",multiple_file_patientez:"Espere, uno o más archivos se están subiendo. No envíe el formulario hasta que se complete la operación.",multiple_file_add_file:"Agregar un archivo",multiple_file_remove_file:"Eliminar un archivo",file_max_size_error:"El tamaño del archivo es demasiado grande",file_heic_error:"Archivos iPhone .heic no soportados",file_max_size_info:"Tamaño máximo del archivo: {size} MB",select_Précisez:"Por favor, especifique",prix_produit_produit:"Producto",prix_produit_reference:"Referencia",prix_produit_description:"Descripción",prix_produit_quantite:"Cantidad",prix_produit_prix:"Precio unitario con IVA",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Seleccione una opción",prix_produit_max_reached:"Límite de {max} producto(s) alcanzado",prix_produit_error_select_ref:"Seleccione una referencia para el producto {num}",prix_produit_error_select_refs:"Seleccione una referencia para los productos {nums}",prix_produit_error_quantity:"Indique una cantidad de al menos 1 para el producto {num}",prix_produit_error_price:"El precio del producto {num} es obligatorio",prix_produit_error_min_refs:"Seleccione al menos {min} referencia(s)","Erreurs de validation":"Errores de validación","Champs concernés :":"Campos afectados:",field_required:"Este campo es obligatorio.",date_invalid:"La fecha no es válida.",date_after:"La fecha debe ser posterior al {date}.",date_before:"La fecha debe ser anterior al {date}.",phone_invalid:"El número de teléfono no es válido.",phone_country_not_accepted:"No se aceptan números de teléfono de este país.",phone_mobile_required:"Introduzca un número de teléfono móvil.",phone_fixed_required:"Introduzca un número de teléfono fijo.",iban_invalid:"El IBAN introducido no es válido.",iban_country_not_accepted:"No se aceptan IBAN de este país para esta operación.",postalcode_invalid:"El código postal no es válido.",unique_email_used:"Esta dirección de correo electrónico ya se ha utilizado para participar.",unique_phone_used:"Este número de teléfono ya se ha utilizado para participar.",unique_value_used:"Este valor ya se ha utilizado para participar.",unique_check_failed:"No se ha podido realizar la comprobación. Inténtelo de nuevo.",error_title:"Error",error_generic:"Se ha producido un error",prix_produit_add:"Añadir un producto",prix_produit_remove:"Eliminar",file_selected:"1 archivo seleccionado",file_upload_failed:"No se ha podido subir el archivo.",file_format_not_accepted:"Formato no aceptado. Formatos aceptados: {formats}",file_select_required:"Seleccione un archivo",file_upload_button:"Subir",file_delete:"Eliminar el archivo",multiple_files_max:"Máximo {max} archivo(s).",multiple_files_drop:"Arrastre sus archivos aquí o haga clic"},"es-cat":{address_required:"L'adreça és obligatòria",address_metropolitan_only:"Aquesta oferta només és vàlida a França metropolitana i Còrsega.",email_domain_not_allowed:"Aquest domini de correu electrònic no està permès per a aquesta operació.",noticetextlink:"avís adjunt",suivant:"Próximo",valider:"ubmitos",champ_obligatoire:"TO_TRANSLATE_ES CHAMPOS OBLIGANDO",iban_section_title:"Informació indicada al vostre IBAN",iban_holder:"Titular del compte",iban_warning:"Des del 09/10/2025, l'IBAN introduït ha de correspondre amb el titular del compte indicat. Qualsevol inconsistència pot bloquejar la transferència.",rgpd:"tracta les dades recollides sobre la base de l’execució del contracte per gestionar la vostra participació en aquesta operació. Per obtenir més informació sobre la gestió de les vostres dades personals i exercir els vostres drets, <a href='{link}' target='_blank' id='noticelink'>consulteu l'avís adjunt</a>.",precedent:"TO_TRANSLATE_ES PRECEDENTOS",merci_renseigner_adresse:'TO_TRANSLATE_ES Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Adreça *",N_rue:"Carrer i número de casa",compl_addresse:"Informació addicional sobre l'adreça",ville:"TO_TRANSLATE_ES Ville",code_postal:"TO_TRANSLATE_ES Code postal",pays:"País",Numero_identification:"TO_TRANSLATE_ES_D.U.N.S number *",Madame:"TO_TRANSLATE_ES Madame",Monsieur:"TO_TRANSLATE_ES Monsieur",trouvepasreparateur:"TO_TRANSLATE_CAT_REPARATOR?","Corrigez les erreurs":"Compruebe si hay errores en el formulario",email_reparateur:"TO_TRANSLATE_CAT_E-mail of your repairer *",enseigne_psa:"TO_TRANSLATE_CAT_ENSEIGNE",file_max_size_error:"El tamaño del archivo es demasiado grande",file_heic_error:"Arxius iPhone .heic no compatibles",file_max_size_info:"Mida màxima del fitxer: {size} MB","Erreurs de validation":"Errors de validació","Champs concernés :":"Camps afectats:"},de:{address_required:"Die Adresse ist erforderlich",address_metropolitan_only:"Dieses Angebot gilt nur im französischen Festland und auf Korsika.",email_domain_not_allowed:"Diese E-Mail-Domain ist für diesen Vorgang nicht erlaubt.",noticetextlink:"beigefügte Mitteilung",suivant:"Weiter",valider:"validate",champ_obligatoire:"Pflichtangabe",iban_section_title:"Angaben auf Ihrer IBAN",iban_holder:"Kontoinhaber",iban_warning:"Seit dem 09.10.2025 muss die eingegebene IBAN dem angegebenen Kontoinhaber entsprechen. Jegliche Unstimmigkeit kann die Überweisung blockieren.",rgpd:"verarbeitet die erhobenen Daten auf Grundlage der Vertragserfüllung, um Ihre Teilnahme an dieser Aktion zu bearbeiten. Weitere Informationen zum Umgang mit Ihren personenbezogenen Daten und zur Ausübung Ihrer Rechte finden Sie in der <a href='{link}' target='_blank' id='noticelink'>beigefügten Mitteilung</a>.",multiselect_list_empty:"Mit der Eingabe beginnen",precedent:"zurück",blurry_document:"Dieses Dokument scheint unscharf zu sein. Wir empfehlen Ihnen, ein anderes Bild zu senden, um zu vermeiden, dass die Bewerbung abgelehnt wird.",merci_renseigner_adresse:'Bitte geben Sie Ihre Adresse ein, oder klicken Sie auf "Ich kann meine Adresse nicht finden".',votre_adresse:"Ihre Adresse *",changez_votre_adresse:"Ändern Sie Ihre Adresse",N_rue:"Strasse und Hausnummer *",compl_addresse:"Adresszusatz",Numero_identification:"Identifikationsnummer*",ville:"Ort",code_postal:"Postleitzahl",pays:"Land",Madame:"Frau",Monsieur:"Herr",trouvepasadresse:" Sie finden Ihre Adresse nicht?","Corrigez les erreurs":"Bitte überprüfen Sie Ihre eingabe.",trouvepasreparateur:"Sie finden Ihre reparatur nicht?",email_reparateur:"E-Mail Adresse *",enseigne_psa:"Firmenamme *",multiple_file_upload_en_cours:"Upload läuft",multiple_file_aucun_fichier:"Keine Datei",multiple_file_patientez:"Bitte warten Sie, eine oder mehrere Dateien werden hochgeladen. Senden Sie das Formular nicht ab, bevor der Vorgang abgeschlossen ist.",multiple_file_add_file:"Datei hinzufügen",multiple_file_remove_file:"Datei entfernen",file_max_size_error:"Die Dateigröße ist zu groß",file_heic_error:"iPhone .heic Dateien werden nicht unterstützt",file_max_size_info:"Maximale Dateigröße: {size} MB",select_Précisez:"Bitte präzisieren",prix_produit_produit:"Produkt",prix_produit_reference:"Referenz",prix_produit_description:"Beschreibung",prix_produit_quantite:"Menge",prix_produit_prix:"Stückpreis inkl. MwSt.",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Option auswählen",prix_produit_max_reached:"Limit von {max} Produkt(en) erreicht",prix_produit_error_select_ref:"Bitte wählen Sie eine Referenz für Produkt {num}",prix_produit_error_select_refs:"Bitte wählen Sie eine Referenz für die Produkte {nums}",prix_produit_error_quantity:"Bitte geben Sie für Produkt {num} eine Menge von mindestens 1 an",prix_produit_error_price:"Der Preis von Produkt {num} ist erforderlich",prix_produit_error_min_refs:"Bitte wählen Sie mindestens {min} Referenz(en)","Erreurs de validation":"Validierungsfehler","Champs concernés :":"Betroffene Felder:",date_fin_regule_passee:"Die Frist für die Nachreichung ist abgelaufen. Das Formular kann nicht mehr abgeschickt werden.",field_required:"Dies ist ein Pflichtfeld.",date_invalid:"Das Datum ist ungültig.",date_after:"Das Datum muss nach dem {date} liegen.",date_before:"Das Datum muss vor dem {date} liegen.",phone_invalid:"Die Telefonnummer ist ungültig.",phone_country_not_accepted:"Telefonnummern aus diesem Land werden nicht akzeptiert.",phone_mobile_required:"Bitte geben Sie eine Mobilfunknummer ein.",phone_fixed_required:"Bitte geben Sie eine Festnetznummer ein.",iban_invalid:"Die eingegebene IBAN ist ungültig.",iban_country_not_accepted:"IBANs aus diesem Land werden für diese Aktion nicht akzeptiert.",postalcode_invalid:"Die Postleitzahl ist ungültig.",unique_email_used:"Diese E-Mail-Adresse wurde bereits für eine Teilnahme verwendet.",unique_phone_used:"Diese Telefonnummer wurde bereits für eine Teilnahme verwendet.",unique_value_used:"Dieser Wert wurde bereits für eine Teilnahme verwendet.",unique_check_failed:"Die Überprüfung ist fehlgeschlagen. Bitte versuchen Sie es erneut.",error_title:"Fehler",error_generic:"Ein Fehler ist aufgetreten",prix_produit_add:"Produkt hinzufügen",prix_produit_remove:"Entfernen",file_selected:"1 Datei ausgewählt",file_upload_failed:"Das Hochladen der Datei ist fehlgeschlagen.",file_format_not_accepted:"Format nicht zulässig. Zulässige Formate: {formats}",file_select_required:"Bitte wählen Sie eine Datei aus",file_upload_button:"Hochladen",file_delete:"Datei löschen",multiple_files_max:"Maximal {max} Datei(en).",multiple_files_drop:"Dateien hierher ziehen oder klicken"},nl:{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",multiselect_list_empty:"Begin met typen",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"verwerkt de verzamelde gegevens op basis van de uitvoering van de overeenkomst om uw deelname aan deze actie te beheren. Voor meer informatie over het beheer van uw persoonsgegevens en om uw rechten uit te oefenen, verwijzen wij u naar de <a href='{link}' target='_blank' id='noticelink'>bijgevoegde kennisgeving</a>.",champ_obligatoire:"verplichte velden",blurry_document:"Dit document ziet er wazig uit, wij adviseren u een andere afbeelding te sturen om te voorkomen dat het bestand wordt geweigerd.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Uw adres *",changez_votre_adresse:"Uw adres wijzigen",N_rue:"Straatnaam en huisnummer",compl_addresse:"Aanvullende adresinformatie",ville:"Stad",code_postal:"Postcode",pays:"Land",Madame:"Mevr",Monsieur:"Man","Corrigez les erreurs":"Controleer de resterende fouten in het formulier.",Numero_identification:"D.U.N.S nummer * (Identificatienummer)",trouvepasadresse:"Staat uw adres er niet bij?",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",email_reparateur:"Reparateur email *",enseigne_psa:"bedrijfsnaam *",multiple_file_upload_en_cours:"Upload bezig",multiple_file_aucun_fichier:"Geen bestand",multiple_file_patientez:"Even geduld aub, één of meerdere bestanden worden geüpload. Verzend het formulier niet voordat de operatie voltooid is.",multiple_file_add_file:"Bestand toevoegen",multiple_file_remove_file:"Bestand verwijderen",file_max_size_error:"De bestandsgrootte is te groot",file_heic_error:"iPhone .heic bestanden worden niet ondersteund",file_max_size_info:"Maximale bestandsgrootte: {size} MB",select_Précisez:"Gelieve te specificeren",prix_produit_produit:"Product",prix_produit_reference:"Referentie",prix_produit_description:"Beschrijving",prix_produit_quantite:"Aantal",prix_produit_prix:"Eenheidsprijs incl. btw",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Selecteer een optie",prix_produit_max_reached:"Limiet van {max} product(en) bereikt",prix_produit_error_select_ref:"Selecteer een referentie voor product {num}",prix_produit_error_select_refs:"Selecteer een referentie voor producten {nums}",prix_produit_error_quantity:"Het aantal van product {num} is vereist",prix_produit_error_price:"De prijs van product {num} is vereist",prix_produit_error_min_refs:"Selecteer minstens {min} referentie(s)","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 cijfers",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 cijfers",date_fin_regule_passee:"De uiterste datum voor regularisatie is verstreken. Het formulier kan niet meer worden verzonden.",field_required:"Dit veld is verplicht.",date_invalid:"De datum is ongeldig.",date_after:"De datum moet na {date} liggen.",date_before:"De datum moet vóór {date} liggen.",phone_invalid:"Het telefoonnummer is ongeldig.",phone_country_not_accepted:"Het telefoonnummer wordt voor dit land niet geaccepteerd.",phone_mobile_required:"Vul een mobiel telefoonnummer in.",phone_fixed_required:"Vul een vast telefoonnummer in.",iban_invalid:"Deze IBAN is ongeldig.",iban_country_not_accepted:"IBAN's uit dit land worden voor deze actie niet geaccepteerd.",postalcode_invalid:"De postcode is ongeldig.",unique_email_used:"Dit e-mailadres is al gebruikt om deel te nemen.",unique_phone_used:"Dit telefoonnummer is al gebruikt om deel te nemen.",unique_value_used:"Deze waarde is al gebruikt om deel te nemen.",unique_check_failed:"De controle is mislukt, probeer het opnieuw.",error_title:"Fout",error_generic:"Er is een fout opgetreden",prix_produit_add:"Product toevoegen",prix_produit_remove:"Verwijderen",file_selected:"1 bestand geselecteerd",file_upload_failed:"Het uploaden van het bestand is mislukt.",file_format_not_accepted:"Formaat niet geaccepteerd. Geaccepteerde formaten: {formats}",file_select_required:"Selecteer een bestand",file_upload_button:"Uploaden",file_delete:"Bestand verwijderen",multiple_files_max:"Maximaal {max} bestand(en).",multiple_files_drop:"Sleep uw bestanden hierheen of klik"},"lu-fr":{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",champ_obligatoire:"Champ obligatoire",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe</a>.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",N_rue:"N°, rue",compl_addresse:"Complément d'adresse",ville:"Ville",Numero_identification:"Numéro D.U.N.S *",code_postal:"Code postal *",pays:"Pays",Madame:"Madame",Monsieur:"Monsieur",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",email_reparateur:"email de votre réparateur *",enseigne_psa:"Nom de la société *",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :"},"lu-nl":{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",champ_obligatoire:"verplichte velden",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"behandelt d'Donnéeën, déi op Basis vun der Ausféierung vum Kontrakt gesammelt goufen, fir Är Participatioun un dëser Aktioun ze verwalten. Fir méi Informatiounen iwwer den Ëmgank mat Ären perséinlechen Daten a fir Är Rechter auszeüben, kuckt w.e.g. <a href='{link}' target='_blank' id='noticelink'>an d'ugeschloss Notiz</a>.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Jouw adres *",N_rue:"Straat en huisnummer",compl_addresse:"Aanvullende adresgegevens",ville:"Stad",code_postal:"Postcode",pays:"Land",Madame:"Mevr",Monsieur:"Man",Numero_identification:"D.U.N.S nummer *",trouvepasadresse:"Vind je je adres niet ?",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",email_reparateur:"Reparateur e-mail*",enseigne_psa:"bedrijfsnaam *",file_max_size_error:"De bestandsgrootte is te groot",file_heic_error:"iPhone .heic bestanden worden niet ondersteund",file_max_size_info:"Maximale bestandsgrootte: {size} MB","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:"},"be-fr":{address_required:"L'adresse est obligatoire",address_metropolitan_only:"Cette offre n'est valable qu'en France métropolitaine et en Corse.",email_domain_not_allowed:"Ce domaine d'email n'est pas autorisé pour cette opération.",noticetextlink:"notice ci-jointe",suivant:"Suivant",valider:"Valider",champ_obligatoire:"Champ obligatoire",iban_section_title:"Informations indiquées sur votre IBAN",iban_holder:"Titulaire du compte",iban_warning:"Depuis le 09/10/2025, l'IBAN saisi doit correspondre au titulaire du compte indiqué. Toute incohérence pourra bloquer le virement.",rgpd:"traite les données recueillies sur la base de l’exécution d’un contrat pour traiter votre participation à cette opération. Pour en savoir plus sur la gestion de vos données personnelles et pour exercer vos droits, reportez-vous à la <a href='{link}' target='_blank' id='noticelink'>notice ci-jointe</a>.",precedent:"Précédent",merci_renseigner_adresse:'Merci de renseigner votre adresse, ou cliquer sur "Je ne trouve pas mon adresse"',votre_adresse:"Votre Adresse *",N_rue:"N°, rue",compl_addresse:"Complément d'adresse",ville:"Ville",code_postal:"Code postal",pays:"Pays",Madame:"Madame",Monsieur:"Monsieur",trouvepasadresse:"Vous ne trouvez pas votre adresse ?",enseigne_psa:"Nom de la société * ",Numero_identification:"numéro DUNS *",email_reparateur:"Email de votre réparateur *",file_max_size_error:"La taille du fichier est trop grande",file_heic_error:"Fichier iPhone .heic non supportés",file_max_size_info:"Taille maximale du fichier: {size} Mo","Erreurs de validation":"Erreurs de validation","Champs concernés :":"Champs concernés :"},"be-nl":{address_required:"Het adres is verplicht",address_metropolitan_only:"Deze actie is alleen geldig in Europees Frankrijk en Corsica.",email_domain_not_allowed:"Dit e-maildomein is niet toegestaan voor deze actie.",noticetextlink:"bijgevoegde mededeling",suivant:"volgend",valider:"bevestigen",champ_obligatoire:"verplichte velden",multiselect_list_empty:"Begin met typen",iban_section_title:"Informatie op uw IBAN",iban_holder:"Rekeninghouder",iban_warning:"Vanaf 09/10/2025 moet de ingevoerde IBAN overeenkomen met de aangegeven rekeninghouder. Elke inconsistentie kan de overschrijving blokkeren.",rgpd:"verwerkt de verzamelde gegevens op basis van de uitvoering van de overeenkomst om uw deelname aan deze actie te beheren. Voor meer informatie over het beheer van uw persoonlijke gegevens en om uw rechten uit te oefenen, raadpleeg de <a href='{link}' target='_blank' id='noticelink'>bijgevoegde mededeling</a>.",blurry_document:"Dit document ziet er wazig uit, wij adviseren u een andere afbeelding te sturen om te voorkomen dat het bestand wordt geweigerd.",precedent:"vorig",merci_renseigner_adresse:'Voer alstublieft uw adres in, of klik op "Ik kan mijn adres niet vinden"',votre_adresse:"Uw adres *","modifier votre adresse":"Uw adres wijzigen",N_rue:"Straatnaam en huisnummer",compl_addresse:"Aanvullende adresgegevens",trouvepasreparateur:"Ik kan mijn reparateur niet vinden?",enseigne_psa:"bedrijfsnaam *",ville:"Plaats",code_postal:"Postcode",pays:"Land",Numero_identification:"D.U.N.S nummer *",Madame:"Mevr",Monsieur:"Man",trouvepasadresse:"Vind je je adres niet ?",email_reparateur:"Reparateur e-mail*","Erreurs de validation":"Validatiefouten","Champs concernés :":"Betreffende velden:"},sl:{address_required:"Naslov je obvezen",address_metropolitan_only:"Ta ponudba velja samo za celinsko Francijo in Korziko.",noticetextlink:"priložené oznámenie",suivant:"TO_TRANSLATE_SL Suivant",valider:"TO_TRANSLATE_SL Valider",champ_obligatoire:"obvezna polja",iban_section_title:"Informacije navedene na vašem IBAN",iban_holder:"Imetnik računa",iban_warning:"Od 09/10/2025 mora vneseni IBAN ustrezati navedenemu imetniku računa. Vsaka neskladnost lahko blokira prenos.",precedent:"TO_TRANSLATE_SL Précédent",merci_renseigner_adresse:"Vnesite svoj naslov ali pa kliknite možnost »Ne najdem svojega naslova«",votre_adresse:"POŠTNI NASLOV *",N_rue:"Številka ulice",compl_addresse:"Dodatni naslov",ville:"Kraj",code_postal:"Poštna številka",pays:"Država",Madame:"Gospa",Monsieur:"Gospod",Numero_identification:"TO_TRANSLATE_SL_D.U.N.S nummer *",trouvepasadresse:"Ne najdem svojega naslova",trouvepasreparateur:"TO_TRANSLATE_SL_REPARATOR?",enseigne_psa:"TO_TRANSLATE_SL_ENSEIGNE",email_reparateur:"TO_TRANSLATE_SL_Email de votre réparateur *","Erreurs de validation":"Napake pri preverjanju","Champs concernés :":"Vplivana polja:"},bg:{address_required:"Адресът е задължителен",address_metropolitan_only:"Тази оферта е валидна само за континентална Франция и Корсика.",noticetextlink:"приложено известие",suivant:"TO_TRANSLATE_BG Suivant",valider:"TO_TRANSLATE_BG Valider",champ_obligatoire:"задължителни полета",iban_section_title:"Информация посочена във вашия IBAN",iban_holder:"Титуляр на сметката",iban_warning:"От 09/10/2025 въведеният IBAN трябва да съответства на посочения титуляр на сметката. Всяко несъответствие може да блокира превода.",precedent:"TO_TRANSLATE_BG Précédent",merci_renseigner_adresse:"Моля, попълнете адреса си или щракнете върху „Не намирам адреса си“",votre_adresse:"ПОЩЕНСКИ АДРЕС *",N_rue:"Улица, №",compl_addresse:"Други адресни данни",ville:"Град",code_postal:"Пощенски код",pays:"Държава",Madame:"Gospa",Monsieur:"Gospod",Numero_identification:"TO_TRANSLATE_BG_D.U.N.S nummer *",trouvepasadresse:"Не намирате адреса си?",trouvepasreparateur:"TO_TRANSLATE_BG_REPARATOR?",enseigne_psa:"TO_TRANSLATE_BG_ENSEIGNE",email_reparateur:"TO_TRANSLATE_BG_Email de votre réparateur *","Erreurs de validation":"Грешки при валидация","Champs concernés :":"Засегнати полета:"},ro:{address_required:"Adresa este obligatorie",address_metropolitan_only:"Această ofertă este valabilă doar în Franța metropolitană și Corsica.",noticetextlink:"notificare atasata",suivant:"TO_TRANSLATE_RO Suivant",valider:"TO_TRANSLATE_RO Valider",champ_obligatoire:"câmpuri obligatorii",iban_section_title:"Informații indicate pe IBAN-ul dvs.",iban_holder:"Titular de cont",iban_warning:"Din 09/10/2025, IBAN-ul introdus trebuie să corespundă titularului de cont indicat. Orice inconsecvență poate bloca transferul.",precedent:"TO_TRANSLATE_RO Précédent",merci_renseigner_adresse:"Vă rugăm să completați adresa dvs. sau să faceți clic pe „Nu îmi găsesc adresa”",votre_adresse:"ADRESA *",N_rue:"Număr Stradă",compl_addresse:"Alte detalii privind adresa",ville:"Oraș",code_postal:"Cod poștal",pays:"Țara",Madame:"Doamna",Monsieur:"Domnul",Numero_identification:"TO_TRANSLATE_RO_D.U.N.S nummer *",trouvepasadresse:"Nu vă puteți găsi adresa?",trouvepasreparateur:"TO_TRANSLATE_RO_REPARATOR?",enseigne_psa:"TO_TRANSLATE_RO_ENSEIGNE",email_reparateur:"TO_TRANSLATE_RO_Email de votre réparateur *","Erreurs de validation":"Erori de validare","Champs concernés :":"Câmpuri afectate:"},el:{address_required:"Η διεύθυνση είναι υποχρεωτική",address_metropolitan_only:"Η προσφορά ισχύει μόνο για τη μητροπολιτική Γαλλία και την Κορσική.",noticetextlink:"notice ci-jointe",suivant:"TO_TRANSLATE_RO Suivant",valider:"TO_TRANSLATE_RO Valider",champ_obligatoire:"Υποχρεωτικό πεδίο",iban_section_title:"Πληροφορίες που αναγράφονται στο IBAN σας",iban_holder:"Κάτοχος λογαριασμού",iban_warning:"Από τις 09/10/2025, το IBAN που εισάγεται πρέπει να αντιστοιχεί στον υποδεικνυόμενο κάτοχο λογαριασμού. Οποιαδήποτε ασυνέπεια μπορεί να μπλοκάρει τη μεταφορά.",precedent:"TO_TRANSLATE_RO Précédent",merci_renseigner_adresse:'Συμπληρώστε τη διεύθυνσή σας ή κάντε κλικ στο "Δεν μπορώ να βρω τη διεύθυνσή μου"',votre_adresse:"ΤΑΧ/ΚΗ ΔΙΕΥΘΥΝΣΗ *",N_rue:"Οδός και αριθμός",compl_addresse:"Λοιπά στοιχεία διεύθυνσης",ville:"Πόλη",code_postal:"Ταχυδρομικός κώδικας",pays:"Χώρα",Madame:"κυρία",Monsieur:"κύριος",Numero_identification:"TO_TRANSLATE_RO_D.U.N.S nummer *",trouvepasadresse:"Δεν μπορείτε να βρείτε τη διεύθυνσή σας;",trouvepasreparateur:"TO_TRANSLATE_RO_REPARATOR?",enseigne_psa:"TO_TRANSLATE_RO_ENSEIGNE",email_reparateur:"TO_TRANSLATE_RO_Email de votre réparateur *","Erreurs de validation":"Σφάλματα επικύρωσης","Champs concernés :":"Επηρεαζόμενα πεδία:"},it:{address_required:"L'indirizzo è obbligatorio",address_metropolitan_only:"Questa offerta è valida solo in Francia metropolitana e Corsica.",email_domain_not_allowed:"Questo dominio email non è consentito per questa operazione.",multiple_file_remove_file:"Rimuovere un file",multiple_file_add_file:"Aggiungere un file",changez_votre_adresse:"Modifica il tuo indirizzo",noticetextlink:"avviso allegato",suivant:"Successivo",valider:"Confermare",champ_obligatoire:"Campi obbligatori",iban_section_title:"Informazioni indicate sul vostro IBAN",iban_holder:"Titolare del conto",iban_warning:"Dal 09/10/2025, l'IBAN inserito deve corrispondere al titolare del conto indicato. Qualsiasi incoerenza può bloccare il bonifico.",precedent:"Precedente",merci_renseigner_adresse:'Si prega di inserire il proprio indirizzo o cliccare su "Non trovo il mio indirizzo"',votre_adresse:"Il tuo indirizzo",N_rue:"N°, via",compl_addresse:"Complemento d'indirizzo",ville:"Città",code_postal:"Codice di avviamento postale",pays:"Paese",Madame:"Signora",Monsieur:"Signore",Numero_identification:"Numero D.U.N.S *",trouvepasadresse:"Non trovi il tuo indirizzo?",trouvepasreparateur:"RIPARATORE?",enseigne_psa:"INSEGNA",email_reparateur:"Email del tuo riparatore *","Corrigez les erreurs":"Si prega di verificare gli errori rimanenti nel modulo.","Erreurs de validation":"Errori di convalida","Champs concernés :":"Campi interessati:",rgpd:"tratta i dati raccolti sulla base dell'esecuzione del contratto per gestire la sua partecipazione a questa operazione. Per saperne di più sulla gestione dei suoi dati personali e per esercitare i suoi diritti, consulti l'<a href='{link}' target='_blank' id='noticelink'>avviso allegato</a>.",date_fin_regule_passee:"Il termine per la regolarizzazione è scaduto. Il modulo non può più essere inviato.",multiple_file_upload_en_cours:"Caricamento in corso",multiple_file_patientez:"Attendere: uno o più file sono in fase di caricamento. Non convalidare il modulo prima del termine dell'operazione.",file_max_size_error:"Il file è troppo grande",file_heic_error:"I file iPhone .heic non sono supportati",select_Précisez:"Si prega di specificare",prix_produit_produit:"Prodotto",prix_produit_reference:"Riferimento",prix_produit_description:"Descrizione",prix_produit_quantite:"Quantità",prix_produit_prix:"Prezzo unitario IVA inclusa",prix_produit_imei:"IMEI",field_required:"Questo campo è obbligatorio.",date_invalid:"La data non è valida.",date_after:"La data deve essere successiva al {date}.",date_before:"La data deve essere precedente al {date}.",phone_invalid:"Il numero di telefono non è valido.",phone_country_not_accepted:"I numeri di telefono di questo Paese non sono accettati.",phone_mobile_required:"Si prega di inserire un numero di cellulare.",phone_fixed_required:"Si prega di inserire un numero di telefono fisso.",iban_invalid:"L'IBAN inserito non è valido.",iban_country_not_accepted:"Gli IBAN di questo Paese non sono accettati per questa operazione.",postalcode_invalid:"Il codice postale non è valido.",unique_email_used:"Questo indirizzo e-mail è già stato utilizzato per partecipare.",unique_phone_used:"Questo numero di telefono è già stato utilizzato per partecipare.",unique_value_used:"Questo valore è già stato utilizzato per partecipare.",unique_check_failed:"Verifica non riuscita. Si prega di riprovare.",error_title:"Errore",error_generic:"Si è verificato un errore",prix_produit_add:"Aggiungi un prodotto",prix_produit_remove:"Rimuovi",prix_produit_error_quantity:"Si prega di indicare una quantità di almeno 1 per il prodotto {num}",file_selected:"1 file selezionato",file_upload_failed:"Il caricamento del file non è riuscito.",file_format_not_accepted:"Formato non accettato. Formati accettati: {formats}",file_select_required:"Si prega di selezionare un file",file_upload_button:"Carica",file_delete:"Elimina il file",multiple_files_max:"Massimo {max} file.",multiple_files_drop:"Trascina qui i tuoi file o fai clic"},pl:{address_required:"Adres jest wymagany",address_metropolitan_only:"Ta oferta jest ważna tylko we Francji metropolitalnej i na Korsyce.",email_domain_not_allowed:"Ta domena e-mail nie jest dozwolona dla tej operacji.",noticetextlink:"załączoną informacją",suivant:"Następny",valider:"Zatwierdź",champ_obligatoire:"Pola Wymagane",iban_section_title:"Informacje podane na Twoim IBAN",iban_holder:"Posiadacz konta",iban_warning:"Od 09/10/2025 wprowadzony IBAN musi odpowiadać wskazanemu posiadaczowi konta. Wszelkie niezgodności mogą zablokować przelew.",rgpd:"przetwarza zebrane dane na podstawie wykonania umowy w celu zarządzania udziałem w tej akcji. Aby uzyskać więcej informacji na temat zarządzania Państwa danymi osobowymi i skorzystać ze swoich praw, prosimy zapoznać się z <a href='{link}' target='_blank' id='noticelink'>załączoną informacją</a>.",blurry_document:"Ten dokument jest niewyraźny, radzimy wysłać inny obraz, aby uniknąć odrzucenia pliku.",precedent:"Poprzedni",merci_renseigner_adresse:"Wpisz swój adres lub kliknij „Nie mogę znaleźć swojego adresuWpisz swój adres lub kliknij „Nie mogę znaleźć swojego adresu",votre_adresse:"Twój adres",N_rue:"Adres",compl_addresse:"Uzupełnienie adresu",Numero_identification:"Numer identyfikacyjny",ville:"Miasto",code_postal:"Kod pocztowy",pays:"Kraj",Madame:"Pani.",Monsieur:"Pan.",trouvepasadresse:"Nie możesz znaleźć swojego adresu?",trouvepasreparateur:"TO_TRANSLATE_PL_REPARATOR?",email_reparateur:"TO_TRANSLATE_PL_Email de votre réparateur *",enseigne_psa:"TO_TRANSLATE_PL_ENSEIGNE","Erreurs de validation":"Błędy walidacji","Champs concernés :":"Pola, których dotyczy:","Corrigez les erreurs":"Sprawdź pozostałe błędy w formularzu.",date_fin_regule_passee:"Termin na uzupełnienie zgłoszenia minął. Formularza nie można już przesłać.",multiple_file_upload_en_cours:"Przesyłanie w toku",multiple_file_patientez:"Proszę czekać, trwa przesyłanie jednego lub kilku plików. Nie zatwierdzaj formularza przed zakończeniem operacji.",multiple_file_add_file:"Dodaj plik",multiple_file_remove_file:"Usuń plik",file_max_size_error:"Plik jest za duży",file_heic_error:"Pliki iPhone .heic nie są obsługiwane",select_Précisez:"Proszę sprecyzować",prix_produit_produit:"Produkt",prix_produit_reference:"Numer referencyjny",prix_produit_description:"Opis",prix_produit_quantite:"Ilość",prix_produit_prix:"Cena jednostkowa brutto",prix_produit_imei:"IMEI",field_required:"To pole jest wymagane.",date_invalid:"Data jest nieprawidłowa.",date_after:"Data musi być późniejsza niż {date}.",date_before:"Data musi być wcześniejsza niż {date}.",phone_invalid:"Numer telefonu jest nieprawidłowy.",phone_country_not_accepted:"Numery telefonów z tego kraju nie są akceptowane.",phone_mobile_required:"Wpisz numer telefonu komórkowego.",phone_fixed_required:"Wpisz numer telefonu stacjonarnego.",iban_invalid:"Wprowadzony numer IBAN jest nieprawidłowy.",iban_country_not_accepted:"Numery IBAN z tego kraju nie są akceptowane w tej akcji.",postalcode_invalid:"Kod pocztowy jest nieprawidłowy.",unique_email_used:"Ten adres e-mail został już użyty do udziału w akcji.",unique_phone_used:"Ten numer telefonu został już użyty do udziału w akcji.",unique_value_used:"Ta wartość została już użyta do udziału w akcji.",unique_check_failed:"Weryfikacja nie powiodła się. Spróbuj ponownie.",error_title:"Błąd",error_generic:"Wystąpił błąd",prix_produit_add:"Dodaj produkt",prix_produit_remove:"Usuń",prix_produit_error_quantity:"Podaj ilość co najmniej 1 dla produktu {num}",file_selected:"Wybrano 1 plik",file_upload_failed:"Nie udało się przesłać pliku.",file_format_not_accepted:"Niedozwolony format. Dozwolone formaty: {formats}",file_select_required:"Wybierz plik",file_upload_button:"Prześlij",file_delete:"Usuń plik",multiple_files_max:"Maksymalna liczba plików: {max}.",multiple_files_drop:"Przeciągnij pliki tutaj lub kliknij"},pt:{address_required:"O endereço é obrigatório",address_metropolitan_only:"Esta oferta é válida apenas em França metropolitana e na Córsega.",email_domain_not_allowed:"Este domínio de e-mail não é permitido para esta operação.",noticetextlink:"aviso anexado",suivant:"Próximo",valider:"Validar",multiselect_list_empty:"Comece a dactilografar",champ_obligatoire:"Campo obrigatório",iban_section_title:"Informações indicadas no seu IBAN",iban_holder:"Titular da conta",iban_warning:"Desde 09/10/2025, o IBAN inserido deve corresponder ao titular da conta indicado. Qualquer inconsistência pode bloquear a transferência.",rgpd:"processa os dados recolhidos com base na execução do contrato para gerir a sua participação nesta ação. Para saber mais sobre a gestão dos seus dados pessoais e para exercer os seus direitos, consulte o <a href='{link}' target='_blank' id='noticelink'>aviso em anexo</a>.",blurry_document:"Este documento parece desfocado, aconselhamos a enviar outra imagem para evitar que o ficheiro seja recusado",precedent:"Anterior",merci_renseigner_adresse:' Introduzca su dirección o haga clic en "No encuentro mi dirección"',votre_adresse:"O seu endereço",changez_votre_adresse:"Altere o seu endereço",N_rue:"Endereço, linha 1",compl_addresse:"Endereço adicional",Numero_identification:"TO_TRANSLATE_PL_D.U.N.S nummer",ville:"Cidade",code_postal:"Código postal",pays:"País",Madame:"Senhora",Monsieur:"Senhor",trouvepasadresse:"Não consegue encontrar a sua morada?",trouvepasreparateur:"TO_TRANSLATE_PT_REPARATOR?",email_reparateur:"TO_TRANSLATE_PT_Email de votre réparateur *",enseigne_psa:"TO_TRANSLATE_PT_ENSEIGNE","Erreurs de validation":"Erros de validação","Champs concernés :":"Campos afetados:","Corrigez les erreurs":"Por favor, verifique os erros restantes no formulário.",date_fin_regule_passee:"O prazo de regularização terminou. O formulário já não pode ser submetido.",multiple_file_upload_en_cours:"Carregamento em curso",multiple_file_patientez:"Aguarde: um ou mais ficheiros estão a ser carregados. Não valide o formulário antes do fim da operação.",multiple_file_add_file:"Adicionar um ficheiro",multiple_file_remove_file:"Remover um ficheiro",file_max_size_error:"O ficheiro é demasiado grande",file_heic_error:"Ficheiros iPhone .heic não suportados",select_Précisez:"Por favor, especifique",prix_produit_produit:"Produto",prix_produit_reference:"Referência",prix_produit_description:"Descrição",prix_produit_quantite:"Quantidade",prix_produit_prix:"Preço unitário com IVA",prix_produit_imei:"IMEI",field_required:"Este campo é obrigatório.",date_invalid:"A data não é válida.",date_after:"A data deve ser posterior a {date}.",date_before:"A data deve ser anterior a {date}.",phone_invalid:"O número de telefone não é válido.",phone_country_not_accepted:"Não são aceites números de telefone deste país.",phone_mobile_required:"Introduza um número de telemóvel.",phone_fixed_required:"Introduza um número de telefone fixo.",iban_invalid:"O IBAN introduzido não é válido.",iban_country_not_accepted:"Não são aceites IBAN deste país para esta operação.",postalcode_invalid:"O código postal não é válido.",unique_email_used:"Este endereço de e-mail já foi utilizado para participar.",unique_phone_used:"Este número de telefone já foi utilizado para participar.",unique_value_used:"Este valor já foi utilizado para participar.",unique_check_failed:"Não foi possível efetuar a verificação. Tente novamente.",error_title:"Erro",error_generic:"Ocorreu um erro",prix_produit_add:"Adicionar um produto",prix_produit_remove:"Remover",prix_produit_error_quantity:"Indique uma quantidade de, pelo menos, 1 para o produto {num}",file_selected:"1 ficheiro selecionado",file_upload_failed:"Não foi possível carregar o ficheiro.",file_format_not_accepted:"Formato não aceite. Formatos aceites: {formats}",file_select_required:"Selecione um ficheiro",file_upload_button:"Carregar",file_delete:"Eliminar o ficheiro",multiple_files_max:"Máximo de {max} ficheiro(s).",multiple_files_drop:"Arraste os seus ficheiros para aqui ou clique"},no:{address_required:"The address is required",address_metropolitan_only:"This offer is only valid in mainland France and Corsica.",email_domain_not_allowed:"This email domain is not allowed for this operation.",noticetextlink:"attached notice",suivant:"Next",valider:"Submit",champ_obligatoire:"Required fields",multiselect_list_empty:"Start typing",iban_section_title:"Information on your IBAN",iban_holder:"Account holder",iban_warning:"Since 09/10/2025, the entered IBAN must match the account holder indicated. Any inconsistency may block the transfer.",iban_uk_sort_code:"Sort Code",iban_uk_sort_code_placeholder:"6 digits",iban_uk_account_number:"Account Number",iban_uk_account_number_placeholder:"8 digits",rgpd:"processes the data collected on the basis of the performance of the contract to manage your participation in this operation. To learn more about how your personal data is managed and to exercise your rights, please refer to the <a href='{link}' target='_blank' id='noticelink'>attached notice</a>.",precedent:"Previous",merci_renseigner_adresse:`Please select a suggested address or click on "I can't find my address"`,trouvepasadresse:"I can't find my address",trouvepasreparateur:"You can't find it?",email_reparateur:"E-mail of your repairer *",enseigne_psa:"Company name *",Numero_identification:"DUNS number *",votre_adresse:"Your address *",changez_votre_adresse:"Edit your address",N_rue:"Number and street name",compl_addresse:"Additional address info",ville:"City",code_postal:"ZIP code",pays:"Country","Corrigez les erreurs":"Please check the remaining errors in the form.",date_fin_regule_passee:"The regularization deadline has passed. The form can no longer be submitted.",Madame:"Mrs.",Monsieur:"Mr.",multiple_file_upload_en_cours:"Upload in progress",multiple_file_aucun_fichier:"No file",multiple_file_patientez:"Please wait, one or more files are being uploaded. Do not submit the form until the operation is complete.",multiple_file_add_file:"Add a file",multiple_file_remove_file:"Remove a file",file_max_size_error:"The file size is too large",file_heic_error:"iPhone .heic files not supported",file_max_size_info:"Maximum file size: {size} MB",select_Précisez:"Please specify",prix_produit_produit:"Product",prix_produit_reference:"Reference",prix_produit_description:"Description",prix_produit_quantite:"Quantity",prix_produit_prix:"Unit price incl. tax",prix_produit_imei:"IMEI",prix_produit_select_placeholder:"Select an option",prix_produit_max_reached:"Limit of {max} product(s) reached",prix_produit_error_select_ref:"Please select a reference for product {num}",prix_produit_error_select_refs:"Please select a reference for products {nums}",prix_produit_error_quantity:"The quantity of product {num} is required",prix_produit_error_price:"The price of product {num} is required",prix_produit_error_min_refs:"Please select at least {min} reference(s)","Erreurs de validation":"Validation errors","Champs concernés :":"Affected fields:"}},Rx={"es-cat":["es","fr"],"lu-fr":["fr"],"be-fr":["fr"],"lu-nl":["nl","fr"],"be-nl":["nl","fr"],default:["fr"]},Px={fr:"fr","fr-fr":"fr","lu-fr":"lu-fr","be-fr":"be-fr",en:"en","en-gb":"en","en-uk":"en",uk:"en",es:"es","es-es":"es","es-cat":"es-cat",de:"de",nl:"nl","lu-nl":"lu-nl","be-nl":"be-nl",it:"it",pl:"pl",sl:"sl",si:"sl",bg:"bg",ro:"ro",el:"el",gr:"el",pt:"pt","pt-pt":"pt",no:"no",nb:"no",nn:"no","nb-no":"no","nn-no":"no"};function $y(e){const t=(e||"fr").toLowerCase(),n=Px[t]||t.split("-")[0];return Ey[n]?n:"fr"}const gt=Tx({legacy:!1,locale:"fr",fallbackLocale:Rx,messages:Ey,missingWarn:!1,fallbackWarn:!1});function Lr(e){return a.watch(e,t=>{gt.global.locale.value=$y(t)},{immediate:!0}),(t,n)=>gt.global.t(t,n??{})}function Mx(e,t={}){if(e==null||e==="")return!0;const{phoneType:n="both",defaultCountry:r,acceptedCountries:o=[]}=t,i=Yg(String(e)),s=UN(i,i.trim().startsWith("+")?void 0:r);if(!s||!s.isValid())return gt.global.t("phone_invalid");if(o.length>0&&(!s.country||!o.includes(s.country)))return gt.global.t("phone_country_not_accepted");const l=s.getType(),c=l==="MOBILE"||l==="FIXED_LINE_OR_MOBILE",d=l==="FIXED_LINE"||l==="FIXED_LINE_OR_MOBILE";return n==="mobile"&&!c?gt.global.t("phone_mobile_required"):n==="fixed"&&!d?gt.global.t("phone_fixed_required"):!0}function _p(e){return(e||"").replace(/\s+/g,"").toUpperCase()}function Dx(e){return _p(e).slice(0,2)}const Lx=["AD","AT","BE","BG","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GI","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","NL","NO","PL","PT","RO","SE","SI","SK","SM","VA"],Fx={FR:27,BE:16,LU:20,DE:22,NL:18,ES:24,IT:27,PT:25,GB:22,IE:22,AT:20,PL:28,SI:19,BG:22,RO:24,GR:27,CH:21,MC:27};function Bx(e){const t=_p(e);if(!/^[A-Z]{2}\d{2}[A-Z0-9]+$/.test(t))return!1;const n=Fx[t.slice(0,2)];if(n&&t.length!==n)return!1;const r=t.slice(4)+t.slice(0,4);let o=0;for(const i of r){const s=i>="A"&&i<="Z"?(i.charCodeAt(0)-55).toString():i;for(const l of s)o=(o*10+Number(l))%97}return o===1}function Ux(e){return _p(e).replace(/(.{4})/g,"$1 ").trim()}function Vx(e){return e==null||e===""?!0:Bx(String(e))||gt.global.t("iban_invalid")}function jx(e,t=[]){if(e==null||e===""||t.length===0)return!0;const n=Dx(String(e));return t.flatMap(o=>o.toUpperCase()==="SEPA"?Lx:[o.toUpperCase()]).includes(n)||gt.global.t("iban_country_not_accepted")}function zx(e,t){if(e==null||e==="")return!0;const n=String(e).replace(/\D/g,"");return String(t||"").replace(/\D/g,"").length!==6||n.length!==8,!0}function qx(e){const n=(e||"").replace(/\s+/g,"").toUpperCase().replace("2A","19").replace("2B","18");if(!/^\d{15}$/.test(n))return!1;const r=n.slice(0,13),o=Number(n.slice(13,15));return 97-Number(r)%97===o}function Hx(e){return e==null||e===""?!0:qx(String(e))||"Le numéro de sécurité sociale n’est pas valide."}const Sy=/^(?:0[1-9]|[1-8]\d|9[0-5])\d{3}$/,Wx=/^(?:97|98)/;function hp(e){return Array.isArray(e)?e.flat(1/0).map(t=>String(t).toLowerCase()):[]}const Gx=new Set(["fr","fr-metro","gp","mq","gf","re","yt","pm","bl","mf"]);function Yx(e){const t=hp(e);return t.length>0&&t.every(n=>Gx.has(n))}function vy(e){return hp(e).includes("fr-metro")}function Kx(e){return Sy.test(String(e??"").trim())}function gp(e){return Wx.test(String(e??"").trim())}function Xx(e){return hp(e).map(t=>t==="fr-metro"?"fr":t)}const Ty={fr:/^\d{5}$/,"fr-metro":Sy,be:/^[1-9]\d{3}$/,lu:/^[1-9]\d{3}$/,at:/^[1-9]\d{3}$/,nl:/^\d{4}\s?[A-Za-z]{2}$/,de:/^[1-9]\d{4}$/,no:/^(?!0000)\d{4}$/};function Jx(e,t=[]){if(e==null||e==="")return!0;const n=String(e).trim(),o=t.map(s=>s.toLowerCase()).filter(s=>Ty[s]);return o.length===0?!0:o.some(s=>Ty[s].test(n))||gt.global.t("postalcode_invalid")}async function Zx(e,t){if(e==null||e==="")return!0;const{field:n,operationId:r,server:o}=t,i=(o||"").replace(/\/$/,"");try{const{data:s}=await et.post(`${i}/api/check/${r}`,{operationId:r,[n]:e});return s?.status==="OK"?Qx(n):!0}catch(s){return xn(s,{where:"uniqueRule",field:n,operationId:r}),gt.global.t("unique_check_failed")}}function Qx(e){return e==="email"?gt.global.t("unique_email_used"):["phone","mobile_phone","fixed_phone"].includes(e)?gt.global.t("unique_phone_used"):gt.global.t("unique_value_used")}fn.extend(L1);function Ui(e){return Array.isArray(e)?e:e==null?[]:typeof e=="object"?Object.values(e):[e]}function yp(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}let wy=!1;function ky(){if(wy)return;wy=!0;const e={required:QT,email:qT,min:H1,max:z1,min_value:W1,max_value:q1,numeric:XT,integer:HT,length:WT,digits:V1,regex:G1,one_of:$f,not_one_of:GT,confirmed:zT,size:ew,between:U1,url:tw,alpha_spaces:B1};for(const[t,n]of Object.entries(e))rn(t,n);rn("phone",(t,n)=>Mx(t,yp(n))),rn("iban",t=>Vx(t)),rn("countryiban",(t,n)=>jx(t,Ui(n).map(String))),rn("iban_uk_modulus",(t,n)=>zx(t,String(Ui(n)[0]??""))),rn("securitesocialefr",t=>Hx(t)),rn("checked",t=>t===!0?!0:gt.global.t("field_required")),rn("address_required",t=>{const n=t;return n&&typeof n=="object"&&n.address?!0:gt.global.t("address_required")}),rn("address_metropolitan",t=>{const n=t;return!n||typeof n!="object"||!n.postcode||Kx(n.postcode)?!0:gt.global.t("address_metropolitan_only")}),rn("prix_produits_quantity",t=>{const r=(Array.isArray(t)?t:[]).findIndex(o=>!(Number.isInteger(o.quantity)&&Number(o.quantity)>=1));return r===-1?!0:gt.global.t("prix_produit_error_quantity",{num:r+1})}),rn("postalcode",(t,n)=>Jx(t,Ui(n).map(String))),rn("unique",(t,n)=>{const r=yp(n);return Zx(t,{field:String(r.field??""),operationId:String(r.operationId??""),server:String(r.server??"")})}),rn("date_range",(t,n)=>{if(t==null||t==="")return!0;const r=yp(n),o=fn(String(t),["DD/MM/YYYY","YYYY-MM-DD"],!0);if(!o.isValid())return gt.global.t("date_invalid");const i=r.min?fn(String(r.min)):null,s=r.max?fn(String(r.max)):null;return i&&i.isValid()&&o.isBefore(i,"day")?gt.global.t("date_after",{date:i.format("DD/MM/YYYY")}):s&&s.isValid()&&o.isAfter(s,"day")?gt.global.t("date_before",{date:s.format("DD/MM/YYYY")}):!0}),rn("date_between",(t,n)=>{if(t==null||t==="")return!0;const[r,o]=Ui(n).map(s=>s?fn(String(s)):null),i=fn(String(t));return i.isValid()?r&&r.isValid()&&i.isBefore(r,"day")?gt.global.t("date_after",{date:r.format("DD/MM/YYYY")}):o&&o.isValid()&&i.isAfter(o,"day")?gt.global.t("date_before",{date:o.format("DD/MM/YYYY")}):!0:gt.global.t("date_invalid")}),rn("before",(t,n)=>{if(!t)return!0;const r=Ui(n)[0],o=r?fn(String(r)):null;return!o||!o.isValid()||fn(String(t)).isBefore(o,"day")?!0:gt.global.t("date_before",{date:o.format("DD/MM/YYYY")})}),rn("after",(t,n)=>{if(!t)return!0;const r=Ui(n)[0],o=r?fn(String(r)):null;return!o||!o.isValid()||fn(String(t)).isAfter(o,"day")?!0:gt.global.t("date_after",{date:o.format("DD/MM/YYYY")})}),YS({generateMessage:sw({fr:aw,en:lw,es:cw,de:dw,nl:uw,it:fw,pl:pw,sl:mw,bg:_w,ro:hw,el:gw,pt:yw}),validateOnInput:!1,validateOnBlur:!0,validateOnChange:!0,validateOnModelUpdate:!1}),Q1("fr")}function eO(e){Q1(e)}const Ay=Symbol("houston-form-context");function tO(e){a.provide(Ay,e)}function ho(){const e=a.inject(Ay);if(!e)throw new Error("useFormContext() doit être utilisé dans un champ rendu par <HoustonForm>.");return e}const Ny={included:"one_of",not_included:"not_one_of"};function Iy(e){const t={};for(const n of e.split("|").map(r=>r.trim()).filter(Boolean)){const r=n.indexOf(":"),o=r===-1?n:n.slice(0,r),i=r===-1?void 0:n.slice(r+1),s=Ny[o]||o;if(i===void 0)t[s]=!0;else{const l=i.split(",");t[s]=l.length>1?l:l[0]}}return t}function nO(e){if(!e)return{};if(typeof e=="string")return Iy(e);const t={};for(const[n,r]of Object.entries(e))t[Ny[n]||n]=r;return t}function rO(e,t={}){const n={...e.type==="email"?{email:!0}:{},...e.validation?Iy(e.validation):{},...nO(e.validationRules),...t};return e.required&&(n.required=!0),n}function Rt(e,t={}){const n=ho(),r=e.save_to||e.validationLabel||e.label||e.name||"field",o=a.computed(()=>rO(e,{...t,...e.unique&&e.save_to&&!n.testmode.value?.disableunique?{unique:{field:e.save_to,operationId:n.operationId.value,server:n.server}}:{}})),i=e.save_to&&e.save_to in n.form?n.form[e.save_to]:void 0,{value:s,errorMessage:l,meta:c,handleBlur:d,handleChange:f,validate:u,setValue:p}=Bo(r,o,{initialValue:i,label:e.validationLabel||e.label||void 0,syncVModel:!1});e.save_to&&a.watch(s,E=>{n.form[e.save_to]=E},{immediate:!0});const m=E=>E==null||E==="",_=a.computed(()=>!!l.value&&(c.touched||c.dirty||n.submitAttempted.value)),b=a.computed(()=>c.valid&&!l.value&&(c.touched||c.dirty)&&!m(s.value)),g=a.computed(()=>_.value?"error":b.value?"valid":"idle"),h=a.computed(()=>({"fb-invalid":_.value,"fb-valid":b.value})),y=a.computed({get:()=>s.value,set:E=>p(E)});return{ctx:n,validationName:r,value:s,model:y,errorMessage:l,showError:_,isValid:b,fieldState:g,controlClass:h,meta:c,handleBlur:d,handleChange:f,validate:u,setValue:p}}function Cy(e,t){if(!t)return e;const n='<span class="fb-required-star">*</span>',r=e.match(/<\/[^>]+>$/);return r&&r.index!==void 0?e.slice(0,r.index)+n+e.slice(r.index):e+n}const oO=["for","innerHTML"],Ke=a.defineComponent({__name:"FieldLabel",props:{label:{},required:{type:Boolean},forId:{}},setup(e){const t=e,n=a.computed(()=>Cy(t.label??"",t.required));return(r,o)=>(a.openBlock(),a.createElementBlock("label",{class:"fb-label",for:e.forId,innerHTML:n.value},null,8,oO))}}),iO={class:"fb-field"},sO=["id","type","name","required","inputmode","placeholder","aria-invalid"],aO={key:0,class:"fb-error",role:"alert"},lO=a.defineComponent({__name:"FieldConfirmation",props:{targetName:{},name:{},label:{},type:{},required:{type:Boolean},placeholder:{},inputmode:{}},setup(e){const t=e,n=a.ref(null),{value:r,errorMessage:o,meta:i,handleBlur:s}=Bo(t.name,{required:!!t.required,confirmed:`@${t.targetName}`},{label:t.label}),l=a.computed(()=>!!o.value&&(i.touched||i.dirty)),c=a.computed(()=>t.inputmode);return a.onMounted(()=>{n.value?.addEventListener("paste",d=>d.preventDefault())}),(d,f)=>(a.openBlock(),a.createElementBlock("div",iO,[a.createVNode(Ke,{"for-id":e.name,label:e.label,required:e.required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("input",{id:e.name,ref_key:"inputRef",ref:n,"onUpdate:modelValue":f[0]||(f[0]=u=>a.isRef(r)?r.value=u:null),class:a.normalizeClass(["fb-input",{"fb-invalid":l.value}]),type:e.type||"text",name:e.name,required:e.required,inputmode:c.value,placeholder:e.placeholder,"aria-invalid":l.value||void 0,onBlur:f[1]||(f[1]=(...u)=>a.unref(s)&&a.unref(s)(...u))},null,42,sO),[[a.vModelDynamic,a.unref(r)]]),l.value?(a.openBlock(),a.createElementBlock("span",aO,a.toDisplayString(a.unref(o)),1)):a.createCommentVNode("",!0)]))}}),cO={class:"fb-field"},dO=["id","type","name","required","autocomplete","placeholder","pattern","maxlength","inputmode","aria-invalid","aria-describedby"],uO=["innerHTML"],fO=a.defineComponent({__name:"FieldInput",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-info`,i=`${r}-error`,{model:s,showError:l,errorMessage:c,controlClass:d,validationName:f,handleBlur:u}=Rt(n),p=a.computed(()=>[n.info?o:null,l.value?i:null].filter(Boolean).join(" ")||void 0),m=a.computed(()=>n.inputmode);return(_,b)=>(a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",cO,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("input",{id:a.unref(r),"onUpdate:modelValue":b[0]||(b[0]=g=>a.isRef(s)?s.value=g:null),class:a.normalizeClass(["fb-input",a.unref(d)]),type:a.unref(n).type||"text",name:a.unref(f),required:a.unref(n).required||void 0,autocomplete:a.unref(n).autocomplete,placeholder:a.unref(n).placeholder,pattern:a.unref(n).pattern,maxlength:a.unref(n).maxlength,inputmode:m.value,"aria-invalid":a.unref(l)||void 0,"aria-describedby":p.value,onBlur:b[1]||(b[1]=(...g)=>a.unref(u)&&a.unref(u)(...g))},null,42,dO),[[a.vModelDynamic,a.unref(s)]]),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,id:o,class:"fb-info",innerHTML:a.unref(n).info},null,8,uO)):a.createCommentVNode("",!0),a.unref(l)&&!a.unref(n).hideErrorMessage?(a.openBlock(),a.createElementBlock("span",{key:1,id:i,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(c)),1)):a.createCommentVNode("",!0)]),a.unref(n).confirmation?(a.openBlock(),a.createBlock(lO,{key:0,"target-name":a.unref(f),name:`${a.unref(r)}_confirmation`,label:a.unref(n).confirmationLabel,type:a.unref(n).type||"text",required:a.unref(n).required,placeholder:a.unref(n).placeholder,inputmode:a.unref(n).inputmode},null,8,["target-name","name","label","type","required","placeholder","inputmode"])):a.createCommentVNode("",!0)]))}}),pO={class:"fb-field"},mO=["id","name","required","aria-invalid","aria-describedby"],_O=["innerHTML"],hO=["innerHTML"],gO=a.defineComponent({__name:"FieldCheckbox",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-error`,i=Cy(n.label??"",n.required),{model:s,showError:l,errorMessage:c,handleBlur:d}=Rt({...n,required:!1},n.required?{checked:!0}:{});return(f,u)=>(a.openBlock(),a.createElementBlock("div",pO,[a.createElementVNode("label",{class:a.normalizeClass(["fb-choice",{"is-checked":!!a.unref(s)}])},[a.withDirectives(a.createElementVNode("input",{id:a.unref(r),"onUpdate:modelValue":u[0]||(u[0]=p=>a.isRef(s)?s.value=p:null),type:"checkbox",name:a.unref(r),required:a.unref(n).required||void 0,"aria-invalid":a.unref(l)||void 0,"aria-describedby":a.unref(l)?o:void 0,onBlur:u[1]||(u[1]=(...p)=>a.unref(d)&&a.unref(d)(...p))},null,40,mO),[[a.vModelCheckbox,a.unref(s)]]),a.createElementVNode("span",{class:"fb-choice-label",innerHTML:a.unref(i)},null,8,_O)],2),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,class:"fb-info",innerHTML:a.unref(n).info},null,8,hO)):a.createCommentVNode("",!0),a.unref(l)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(c)),1)):a.createCommentVNode("",!0)]))}}),yO={class:"fb-field"},bO={class:"fb-label"},EO=["innerHTML"],$O={key:0,class:"fb-required-star"},SO={class:"fb-choice-list"},vO=["name","value","required"],TO=["innerHTML"],wO=["innerHTML"],kO=a.defineComponent({__name:"FieldRadio",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-error`,{model:i,showError:s,errorMessage:l,handleBlur:c}=Rt(n),d=a.computed(()=>(n.options||[]).map(f=>typeof f=="string"?{value:f.toLowerCase(),name:f}:{value:f.value,name:f.name??f.label??f.value}));return(f,u)=>(a.openBlock(),a.createElementBlock("fieldset",yO,[a.createElementVNode("legend",bO,[a.createElementVNode("span",{innerHTML:a.unref(n).label},null,8,EO),a.unref(n).required?(a.openBlock(),a.createElementBlock("span",$O,"*")):a.createCommentVNode("",!0)]),a.createElementVNode("div",SO,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,(p,m)=>(a.openBlock(),a.createElementBlock("label",{key:m,class:a.normalizeClass(["fb-choice",{"is-checked":a.unref(i)===p.value}])},[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":u[0]||(u[0]=_=>a.isRef(i)?i.value=_:null),type:"radio",name:a.unref(r),value:p.value,required:a.unref(n).required||void 0,onBlur:u[1]||(u[1]=(..._)=>a.unref(c)&&a.unref(c)(..._))},null,40,vO),[[a.vModelRadio,a.unref(i)]]),a.createElementVNode("span",{class:"fb-choice-label",innerHTML:p.name},null,8,TO)],2))),128))]),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,class:"fb-info",innerHTML:a.unref(n).info},null,8,wO)):a.createCommentVNode("",!0),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),AO={key:0,class:"fb-field fb-field--inline"},NO={class:"fb-label"},IO=["innerHTML"],CO={key:0,class:"fb-required-star"},xO={class:"fb-choice-list fb-choice-list--inline"},OO=["name","value","required"],RO={class:"fb-choice-label"},PO={key:1,class:"fb-field"},MO=["id","name","required"],DO={value:"madame"},LO={value:"monsieur"},FO=a.defineComponent({__name:"FieldCivilite",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"civilite",o=`${r}-error`,{model:i,showError:s,errorMessage:l,handleBlur:c}=Rt(n),d=a.computed(()=>!!n.type&&n.type!=="radio"),f=a.computed(()=>n.LabelMadame||"Madame"),u=a.computed(()=>n.LabelMonsieur||"Monsieur"),p=a.computed(()=>[{value:"madame",name:f.value},{value:"monsieur",name:u.value}]);return(m,_)=>d.value?(a.openBlock(),a.createElementBlock("div",PO,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("select",{id:a.unref(r),"onUpdate:modelValue":_[2]||(_[2]=b=>a.isRef(i)?i.value=b:null),class:a.normalizeClass(["fb-select",{"fb-invalid":a.unref(s)}]),name:a.unref(r),required:a.unref(n).required||void 0,onBlur:_[3]||(_[3]=(...b)=>a.unref(c)&&a.unref(c)(...b))},[_[4]||(_[4]=a.createElementVNode("option",{value:""}," ",-1)),a.createElementVNode("option",DO,a.toDisplayString(f.value),1),a.createElementVNode("option",LO,a.toDisplayString(u.value),1)],42,MO),[[a.vModelSelect,a.unref(i)]]),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:0,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(l)),1)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("fieldset",AO,[a.createElementVNode("legend",NO,[a.createElementVNode("span",{innerHTML:a.unref(n).label},null,8,IO),a.unref(n).required?(a.openBlock(),a.createElementBlock("span",CO,"*")):a.createCommentVNode("",!0)]),a.createElementVNode("div",xO,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.value,b=>(a.openBlock(),a.createElementBlock("label",{key:b.value,class:a.normalizeClass(["fb-choice",{"is-checked":a.unref(i)===b.value}])},[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":_[0]||(_[0]=g=>a.isRef(i)?i.value=g:null),type:"radio",name:a.unref(r),value:b.value,required:a.unref(n).required||void 0,onBlur:_[1]||(_[1]=(...g)=>a.unref(c)&&a.unref(c)(...g))},null,40,OO),[[a.vModelRadio,a.unref(i)]]),a.createElementVNode("span",RO,a.toDisplayString(b.name),1)],2))),128))]),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:0,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),BO={class:"fb-field"},UO=["id","name","required","autocomplete"],VO={key:0,value:""},jO=["value"],zO={key:1,class:"fb-subfield"},qO=["id","placeholder"],HO=["innerHTML"],WO=a.defineComponent({__name:"FieldSelect",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"field",o=`${r}-error`,{model:i,showError:s,errorMessage:l,handleBlur:c,ctx:d}=Rt(n),f=Lr(d.locale),u=a.computed(()=>(n.options||[]).map(g=>typeof g=="string"?{value:g.toLowerCase(),name:g,other:!1}:{value:g.value,name:g.name??g.label??g.value,other:!!g.other})),p=a.ref(""),m=a.ref("");a.onMounted(()=>{const g=typeof i.value=="string"?i.value:"",h=g.split(":")[0];if(h&&u.value.length&&!u.value.some(y=>y.value===h)){i.value="";return}if(g.includes(":")){const[y,...E]=g.split(":");p.value=y,m.value=E.join(":")}else n.defaultOptionText||(p.value=g)});const _=a.computed(()=>u.value.find(g=>g.value===p.value)),b=a.computed(()=>!!_.value?.other);return a.watch([p,m],()=>{i.value=b.value?`${p.value}:${m.value}`:p.value}),(g,h)=>(a.openBlock(),a.createElementBlock("div",BO,[a.unref(n).displayLabel!==!1?(a.openBlock(),a.createBlock(Ke,{key:0,"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("select",{id:a.unref(r),"onUpdate:modelValue":h[0]||(h[0]=y=>p.value=y),class:a.normalizeClass(["fb-select",{"fb-invalid":a.unref(s)}]),name:a.unref(r),required:a.unref(n).required||void 0,autocomplete:a.unref(n).autocomplete,onBlur:h[1]||(h[1]=(...y)=>a.unref(c)&&a.unref(c)(...y))},[a.unref(n).defaultOptionText!==void 0?(a.openBlock(),a.createElementBlock("option",VO,a.toDisplayString(a.unref(n).defaultOptionText),1)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(y,E)=>(a.openBlock(),a.createElementBlock("option",{key:E,value:y.value},a.toDisplayString(y.name),9,jO))),128))],42,UO),[[a.vModelSelect,p.value]]),b.value?(a.openBlock(),a.createElementBlock("div",zO,[a.createVNode(Ke,{"for-id":`${a.unref(r)}-other`,label:a.unref(f)("select_Précisez")},null,8,["for-id","label"]),a.withDirectives(a.createElementVNode("input",{id:`${a.unref(r)}-other`,"onUpdate:modelValue":h[2]||(h[2]=y=>m.value=y),class:"fb-input",type:"text",placeholder:a.unref(f)("select_Précisez")},null,8,qO),[[a.vModelText,m.value]])])):a.createCommentVNode("",!0),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:2,class:"fb-info",innerHTML:a.unref(n).info},null,8,HO)):a.createCommentVNode("",!0),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:3,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),GO={class:"fb-field"},YO=["id","name","required","autocomplete","placeholder","aria-invalid","aria-describedby"],KO=["innerHTML"],XO=a.defineComponent({__name:"FieldInputNumber",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-error`,i=`${r}-info`,{model:s,showError:l,errorMessage:c,controlClass:d,handleBlur:f}=Rt(n);function u(p){const m=p.target;m.value!==""&&Number(m.value)<0&&(s.value=0)}return(p,m)=>(a.openBlock(),a.createElementBlock("div",GO,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("input",{id:a.unref(r),"onUpdate:modelValue":m[0]||(m[0]=_=>a.isRef(s)?s.value=_:null),class:a.normalizeClass(["fb-input",a.unref(d)]),type:"number",inputmode:"decimal",min:"0",name:a.unref(r),required:a.unref(n).required||void 0,autocomplete:a.unref(n).autocomplete,placeholder:a.unref(n).placeholder,"aria-invalid":a.unref(l)||void 0,"aria-describedby":a.unref(n).info?i:void 0,onInput:u,onBlur:m[1]||(m[1]=(..._)=>a.unref(f)&&a.unref(f)(..._))},null,42,YO),[[a.vModelText,a.unref(s),void 0,{number:!0}]]),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,id:i,class:"fb-info",innerHTML:a.unref(n).info},null,8,KO)):a.createCommentVNode("",!0),a.unref(l)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(c)),1)):a.createCommentVNode("",!0)]))}}),JO={class:"fb-field"},ZO=["id","name","rows","required","placeholder","maxlength","aria-invalid","aria-describedby"],QO=["innerHTML"],eR=a.defineComponent({__name:"FieldTextarea",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-error`,i=`${r}-info`,{model:s,showError:l,errorMessage:c,controlClass:d,handleBlur:f}=Rt(n),u=a.computed({get:()=>s.value??"",set:p=>s.value=p});return(p,m)=>(a.openBlock(),a.createElementBlock("div",JO,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("textarea",{id:a.unref(r),"onUpdate:modelValue":m[0]||(m[0]=_=>u.value=_),class:a.normalizeClass(["fb-textarea",a.unref(d)]),name:a.unref(r),rows:a.unref(n).rows||4,required:a.unref(n).required||void 0,placeholder:a.unref(n).placeholder,maxlength:a.unref(n).maxlength,"aria-invalid":a.unref(l)||void 0,"aria-describedby":a.unref(n).info?i:void 0,onBlur:m[1]||(m[1]=(..._)=>a.unref(f)&&a.unref(f)(..._))},null,42,ZO),[[a.vModelText,u.value]]),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,id:i,class:"fb-info",innerHTML:a.unref(n).info},null,8,QO)):a.createCommentVNode("",!0),a.unref(l)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(c)),1)):a.createCommentVNode("",!0)]))}}),tR={class:"fb-field"},nR=["id","name","value","min","max","required","aria-invalid"],rR=["innerHTML"],oR=a.defineComponent({__name:"FieldDateInput",props:{field:{}},setup(e){const n=e.field,r=n.save_to||n.name||"field",o=`${r}-error`,i=n.min?fn(String(n.min)).format("YYYY-MM-DD"):void 0,s=n.dateMaxToday?fn().format("YYYY-MM-DD"):n.max?fn(String(n.max)).format("YYYY-MM-DD"):void 0,l={};i&&(l.min=i),s&&(l.max=s);const{model:c,showError:d,errorMessage:f,controlClass:u,handleBlur:p}=Rt(n,Object.keys(l).length?{date_range:l}:{}),m=a.ref("");a.watch(c,b=>{typeof b=="string"&&/^\d{2}\/\d{2}\/\d{4}$/.test(b)?m.value=b.split("/").reverse().join("-"):typeof b=="string"&&/^\d{4}-\d{2}-\d{2}/.test(b)&&(m.value=b.slice(0,10))},{immediate:!0});function _(b){const g=b.target.value;m.value=g,c.value=g?g.split("-").reverse().join("/"):""}return(b,g)=>(a.openBlock(),a.createElementBlock("div",tR,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.createElementVNode("input",{id:a.unref(r),class:a.normalizeClass(["fb-input",a.unref(u)]),type:"date",name:a.unref(r),value:m.value,min:a.unref(i),max:a.unref(s),required:a.unref(n).required||void 0,"aria-invalid":a.unref(d)||void 0,onInput:_,onBlur:g[0]||(g[0]=(...h)=>a.unref(p)&&a.unref(p)(...h))},null,42,nR),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,class:"fb-info",innerHTML:a.unref(n).info},null,8,rR)):a.createCommentVNode("",!0),a.unref(d)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(f)),1)):a.createCommentVNode("",!0)]))}});function xy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function iR(e){if(Array.isArray(e))return e}function sR(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,s,l=[],c=!0,d=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){d=!0,o=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw o}}return l}}function aR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
27
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lR(e,t){return iR(e)||sR(e,t)||cR(e,t)||aR()}function cR(e,t){if(e){if(typeof e=="string")return xy(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xy(e,t):void 0}}const Oy=Object.entries,Ry=Object.setPrototypeOf,dR=Object.isFrozen,Py=Object.getPrototypeOf,My=Object.getOwnPropertyDescriptor;let Xt=Object.freeze,Jt=Object.seal,Vi=Object.create,Dy=typeof Reflect<"u"&&Reflect,bp=Dy.apply,Ep=Dy.construct;Xt||(Xt=function(t){return t}),Jt||(Jt=function(t){return t}),bp||(bp=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return t.apply(n,o)}),Ep||(Ep=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const Fr=St(Array.prototype.forEach),uR=St(Array.prototype.lastIndexOf),Ly=St(Array.prototype.pop),Aa=St(Array.prototype.push),fR=St(Array.prototype.slice),pR=St(Array.prototype.splice),ji=Array.isArray,$p=jy(Set),Sp=St(Set.prototype.add),Na=St(Set.prototype.has),Zo=St(String.prototype.toLowerCase),vp=St(String.prototype.toString),Fy=St(String.prototype.match),Ia=St(String.prototype.replace),By=St(String.prototype.indexOf),mR=St(String.prototype.trim),_R=St(Number.prototype.toString),hR=St(Boolean.prototype.toString),Uy=typeof BigInt>"u"?null:St(BigInt.prototype.toString),Vy=typeof Symbol>"u"?null:St(Symbol.prototype.toString),kn=St(Object.prototype.hasOwnProperty),Ca=St(Object.prototype.toString),Zt=St(RegExp.prototype.test),Br=jy(TypeError);function St(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return bp(e,t,r)}}function jy(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ep(e,n)}}function Je(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zo;if(Ry&&Ry(e,null),!ji(t))return e;let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(dR(t)||(t[r]=i),o=i)}e[o]=!0}return e}function gR(e){for(let t=0;t<e.length;t++)kn(e,t)||(e[t]=null);return e}function Rn(e){const t=Vi(null);for(const r of Oy(e)){var n=lR(r,2);const o=n[0],i=n[1];kn(e,o)&&(ji(i)?t[o]=gR(i):i&&typeof i=="object"&&i.constructor===Object?t[o]=Rn(i):t[o]=i)}return t}function yR(e){switch(typeof e){case"string":return e;case"number":return _R(e);case"boolean":return hR(e);case"bigint":return Uy?Uy(e):"0";case"symbol":return Vy?Vy(e):"Symbol()";case"undefined":return Ca(e);case"function":case"object":{if(e===null)return Ca(e);const t=e,n=zn(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Ca(r)}return Ca(e)}default:return Ca(e)}}function zn(e,t){for(;e!==null;){const r=My(e,t);if(r){if(r.get)return St(r.get);if(typeof r.value=="function")return St(r.value)}e=Py(e)}function n(){return null}return n}function bR(e,t){for(;e!==null;){const n=My(e,t);if(n)return n.get?St(n.get):null;e=Py(e)}return null}function ER(e){try{return Zt(e,""),!0}catch{return!1}}const zy=Xt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Tp=Xt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wp=Xt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$R=Xt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),kp=Xt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),SR=Xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qy=Xt(["#text"]),Hy=Xt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ap=Xt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Wy=Xt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Cc=Xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vR=Jt(/{{[\w\W]*|^[\w\W]*}}/g),TR=Jt(/<%[\w\W]*|^[\w\W]*%>/g),wR=Jt(/\${[\w\W]*/g),kR=Jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),AR=Jt(/^aria-[\-\w]+$/),Gy=Jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),NR=Jt(/^(?:\w+script|data):/i),IR=Jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),CR=Jt(/^html$/i),xR=Jt(/^[a-z][.\w]*(-[.\w]+)+$/i),Np=Jt(/<[/\w!]/g),Yy=Jt(/<[/\w]/g),OR=Jt(/<\/no(script|embed|frames)/i),Ky=Jt(/\/>/i),Lt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},RR=Xt(Je({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),PR=function(){return typeof window>"u"?null:window},MR=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Xy=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},go=function(t,n,r,o){return kn(t,n)&&ji(t[n])?Je(o.base?Rn(o.base):{},t[n],o.transform):r},Ip=function(t,n,r){const o=kn(t,n)?t[n]:void 0;return o&&typeof o=="object"?Rn(o):r()};function Jy(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:PR();const t=ie=>Jy(ie);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==Lt.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,o=r.currentScript;e.DocumentFragment;const i=e.HTMLTemplateElement,s=e.Node,l=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,f=e.trustedTypes,u=l.prototype,p=zn(u,"cloneNode"),m=zn(u,"remove"),_=zn(u,"removeAttributeNode"),b=zn(u,"nextSibling"),g=zn(u,"childNodes"),h=zn(u,"parentNode"),y=zn(u,"shadowRoot"),E=zn(u,"attributes"),$=s&&s.prototype?zn(s.prototype,"nodeType"):null,O=s&&s.prototype?zn(s.prototype,"nodeName"):null,N=s&&s.prototype?zn(s.prototype,"ownerDocument"):null,v=function(S){return $?$(S):S.nodeType},B=function(S){return O?O(S):S.nodeName},H=bR(u,"namespaceURI"),U=function(S){return H?H(S):S.namespaceURI};if(typeof i=="function"){const ie=n.createElement("template");ie.content&&ie.content.ownerDocument&&(n=ie.content.ownerDocument)}let C,A="",R,I=!1,V=0;const j=function(){if(V>0)throw Br('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},F=function(S){j(),V++;try{return C.createHTML(S)}finally{V--}},M=function(S){j(),V++;try{return C.createScriptURL(S)}finally{V--}},Y=function(){return I||(R=MR(f,o),I=!0),R},W=n,K=W.implementation,te=W.createNodeIterator,X=W.createDocumentFragment,oe=W.getElementsByTagName,fe=r.importNode;let J=Xy();t.isSupported=typeof Oy=="function"&&typeof h=="function"&&K&&K.createHTMLDocument!==void 0;const ae=vR,ye=TR,$e=wR,Ie=kR,je=AR,we=NR,Le=IR,Fe=xR;let Ye=Gy,ke=null;const Ze=Je({},[...zy,...Tp,...wp,...kp,...qy]);let w=null;const T=Je({},[...Hy,...Ap,...Wy,...Cc]);let k=Object.seal(Vi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,ee=null;const le=Object.seal(Vi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ce=!0,ot=!0,Qe=!1,Ue=!0,G=!1,re=!0,ze=!1,L=!1,z=null,ne=null,pe=!1,Ee=!1,Oe=!1,Se=!1,_t=!0,At=!1;const zt="user-content-";let it=!0,Ut=!1,Ct=null,qt={},Un=null;const Us=Je({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Vs=null;const js=Je({},["audio","video","img","source","image","track"]);let zs=null;const dS=Je({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Uu="http://www.w3.org/1998/Math/MathML",Vu="http://www.w3.org/2000/svg",Nr="http://www.w3.org/1999/xhtml";let qs=Nr,K0=!1,X0=null;const fre=Je({},[Uu,Vu,Nr],vp),uS=Xt(["mi","mo","mn","ms","mtext"]);let J0=Je({},uS);const fS=Xt(["annotation-xml"]);let Z0=Je({},fS);const pre=Je({},["title","style","font","a","script"]);let jl=null;const mre=["application/xhtml+xml","text/html"],_re="text/html";let Mt=null,Hs=null;const hre=n.createElement("form"),pS=function(S){return S instanceof RegExp||S instanceof Function},Q0=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Hs&&Hs===S)return;(!S||typeof S!="object")&&(S={}),S=Rn(S),jl=mre.indexOf(S.PARSER_MEDIA_TYPE)===-1?_re:S.PARSER_MEDIA_TYPE,Mt=jl==="application/xhtml+xml"?vp:Zo,ke=go(S,"ALLOWED_TAGS",Ze,{transform:Mt}),w=go(S,"ALLOWED_ATTR",T,{transform:Mt}),X0=go(S,"ALLOWED_NAMESPACES",fre,{transform:vp}),zs=go(S,"ADD_URI_SAFE_ATTR",dS,{transform:Mt,base:dS}),Vs=go(S,"ADD_DATA_URI_TAGS",js,{transform:Mt,base:js}),Un=go(S,"FORBID_CONTENTS",Us,{transform:Mt}),q=go(S,"FORBID_TAGS",Rn({}),{transform:Mt}),ee=go(S,"FORBID_ATTR",Rn({}),{transform:Mt}),qt=kn(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?Rn(S.USE_PROFILES):S.USE_PROFILES:!1,ce=S.ALLOW_ARIA_ATTR!==!1,ot=S.ALLOW_DATA_ATTR!==!1,Qe=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Ue=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,G=S.SAFE_FOR_TEMPLATES||!1,re=S.SAFE_FOR_XML!==!1,ze=S.WHOLE_DOCUMENT||!1,Ee=S.RETURN_DOM||!1,Oe=S.RETURN_DOM_FRAGMENT||!1,Se=S.RETURN_TRUSTED_TYPE||!1,pe=S.FORCE_BODY||!1,_t=S.SANITIZE_DOM!==!1,At=S.SANITIZE_NAMED_PROPS||!1,it=S.KEEP_CONTENT!==!1,Ut=S.IN_PLACE||!1,Ye=ER(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:Gy,qs=typeof S.NAMESPACE=="string"?S.NAMESPACE:Nr,J0=Ip(S,"MATHML_TEXT_INTEGRATION_POINTS",()=>Je({},uS)),Z0=Ip(S,"HTML_INTEGRATION_POINTS",()=>Je({},fS));const D=Ip(S,"CUSTOM_ELEMENT_HANDLING",()=>Vi(null));if(k=Vi(null),kn(D,"tagNameCheck")&&pS(D.tagNameCheck)&&(k.tagNameCheck=D.tagNameCheck),kn(D,"attributeNameCheck")&&pS(D.attributeNameCheck)&&(k.attributeNameCheck=D.attributeNameCheck),kn(D,"allowCustomizedBuiltInElements")&&typeof D.allowCustomizedBuiltInElements=="boolean"&&(k.allowCustomizedBuiltInElements=D.allowCustomizedBuiltInElements),Jt(k),G&&(ot=!1),Oe&&(Ee=!0),qt&&(ke=Je({},qy),w=Vi(null),qt.html===!0&&(Je(ke,zy),Je(w,Hy)),qt.svg===!0&&(Je(ke,Tp),Je(w,Ap),Je(w,Cc)),qt.svgFilters===!0&&(Je(ke,wp),Je(w,Ap),Je(w,Cc)),qt.mathMl===!0&&(Je(ke,kp),Je(w,Wy),Je(w,Cc))),le.tagCheck=null,le.attributeCheck=null,kn(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?le.tagCheck=S.ADD_TAGS:ji(S.ADD_TAGS)&&(ke===Ze&&(ke=Rn(ke)),Je(ke,S.ADD_TAGS,Mt))),kn(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?le.attributeCheck=S.ADD_ATTR:ji(S.ADD_ATTR)&&(w===T&&(w=Rn(w)),Je(w,S.ADD_ATTR,Mt))),kn(S,"ADD_FORBID_CONTENTS")&&ji(S.ADD_FORBID_CONTENTS)&&(Un===Us&&(Un=Rn(Un)),Je(Un,S.ADD_FORBID_CONTENTS,Mt)),it&&(ke["#text"]=!0),ze&&Je(ke,["html","head","body"]),ke.table&&(Je(ke,["tbody"]),delete q.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Br('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Br('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Z=C;C=S.TRUSTED_TYPES_POLICY;try{A=F("")}catch(Q){throw C=Z,Q}}else S.TRUSTED_TYPES_POLICY===null?(C=void 0,A=""):(C===void 0&&(C=Y()),C&&typeof A=="string"&&(A=F("")));Xt&&Xt(S),Hs=S},mS=Je({},[...Tp,...wp,...$R]),_S=Je({},[...kp,...SR]),gre=function(S,D,Z){return D.namespaceURI===Nr?S==="svg":D.namespaceURI===Uu?S==="svg"&&(Z==="annotation-xml"||J0[Z]):!!mS[S]},yre=function(S,D,Z){return D.namespaceURI===Nr?S==="math":D.namespaceURI===Vu?S==="math"&&Z0[Z]:!!_S[S]},bre=function(S,D,Z){return D.namespaceURI===Vu&&!Z0[Z]||D.namespaceURI===Uu&&!J0[Z]?!1:!_S[S]&&(pre[S]||!mS[S])},Ere=function(S){const D=U(S),Z=Zo(B(S)),Q=h(S);let ve,xe;return Q&&v(Q)===Lt.element?(ve={namespaceURI:U(Q)},xe=Zo(B(Q))):(ve={namespaceURI:qs},xe="template"),X0[D]?D===Vu?gre(Z,ve,xe):D===Uu?yre(Z,ve,xe):D===Nr?bre(Z,ve,xe):!!(jl==="application/xhtml+xml"&&X0[D]):!1},Lo=function(S){Aa(t.removed,{element:S});try{h(S).removeChild(S)}catch{if(m(S),!h(S))throw Br("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},hS=function(S,D,Z){try{_(S,D)}catch{try{S.removeAttribute(Z)}catch{}}},eh=function(S){nh(S);const D=g(S);D&&Fr(fR(D),Q=>{try{m(Q)}catch{}});const Z=v(S)===Lt.element?E(S):null;if(Z)for(let Q=Z.length-1;Q>=0;--Q){const ve=Z[Q],xe=ve&&ve.name;typeof xe=="string"&&hS(S,ve,xe)}},Ws=function(S,D,Z){if(!Z)try{Z=D.getAttributeNode(S)}catch{Z=null}Aa(t.removed,{attribute:Z||null,from:D});try{Z?_(D,Z):D.removeAttribute(S)}catch{try{D.removeAttribute(S)}catch{}}if(S==="is")if(Ee||Oe)try{Lo(D)}catch{}else try{D.setAttribute(S,"")}catch{}},gS=function(S){const D=E(S);if(D)for(let Z=D.length-1;Z>=0;--Z){const Q=D[Z],ve=Q&&Q.name;typeof ve!="string"||w[Mt(ve)]||hS(S,Q,ve)}},th=function(S,D){let Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const Q=[S];for(;Q.length>0;){const ve=Q.pop();if(D(ve)===!1)continue;if(Z&&v(ve)===Lt.element){const qe=y(ve);Fo(qe)&&Q.push(qe)}const xe=g(ve);if(xe)for(let qe=xe.length-1;qe>=0;--qe)Q.push(xe[qe])}},nh=function(S){th(S,D=>{v(D)===Lt.element&&gS(D)})},rh=function(S){const D=[];return th(S,Z=>{D.push(Z)},!0),D},$re=function(S,D){const Z=$p();Fr(rh(S),Q=>{v(Q)===Lt.element&&Sp(Z,Q)}),Fr(D,Q=>{v(Q)===Lt.element&&!Na(Z,Q)&&gS(Q)})},yS=function(S,D){let Z=!1;return Fr(t.removed,Q=>{Q.element&&(Z=Z||Q.element===S,nh(Q.element))}),$re(S,D),Z},Sre=8,vre=function(S,D){const Z=Ct;let Q=null;const ve=()=>(Q||(Q=$p(),Fr(D,xe=>{Sp(Q,xe)})),Q);for(let xe=0;;xe++){const qe=rh(S),Ht=[S];let Ir=!1;if(Fr(qe,bn=>{v(bn)===Lt.documentFragment?Aa(Ht,bn):!Ir&&!Na(Z,bn)&&(Ir=Na(ve(),bn))}),!Ir)return;if(xe>=Sre)throw Br("the tree kept changing during in-place sanitization; refusing to return it");Fr(Ht,(bn,In)=>{Tre(bn,In>0,S,ve())})}},Tre=function(S,D,Z,Q){const ve=oh(S);let xe;for(;xe=ve.nextNode();)!Na(Q,xe)||Na(Ct,xe)||(D&&fr(J.uponSanitizeShadowNode,xe,null),sh(xe,Z),ah(xe,Z),Fo(xe.content)&&ql(xe.content))},wre=function(S){Ct&&Sp(Ct,S)},bS=function(S,D){return re?S==="patchsrc"?!0:S==="for"&&D!=="label"&&D!=="output":!1},kre=function(S){re&&th(S,D=>{const Z=v(D);if(Z===Lt.processingInstruction||Z===Lt.comment&&Zt(Yy,D.data)){try{m(D)}catch{}return!1}if(Z===Lt.element){const Q=D,ve=Mt(B(D));try{Q.hasAttribute&&Q.hasAttribute("patchsrc")&&Q.removeAttribute("patchsrc"),Q.hasAttribute&&Q.hasAttribute("for")&&bS("for",ve)&&Q.removeAttribute("for")}catch{}}return!0})},ES=function(S){let D=null,Z=null;if(pe)S="<remove></remove>"+S;else{const xe=Fy(S,/^[\r\n\t ]+/);Z=xe&&xe[0]}jl==="application/xhtml+xml"&&qs===Nr&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Q=C?F(S):S;if(qs===Nr)try{D=new d().parseFromString(Q,jl)}catch{}if(!D||!D.documentElement){D=K.createDocument(qs,"template",null);try{D.documentElement.innerHTML=K0?A:Q}catch{}}const ve=D.body||D.documentElement;return S&&Z&&ve.insertBefore(n.createTextNode(Z),ve.childNodes[0]||null),qs===Nr?oe.call(D,ze?"html":"body")[0]:ze?D.documentElement:ve},oh=function(S){const D=N?N(S):S.ownerDocument;return te.call(D||S,S,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ju=function(S){return S=Ia(S,ae," "),S=Ia(S,ye," "),S=Ia(S,$e," "),S},ih=function(S){var D;$S(S);const Z=(D=S.querySelectorAll)===null||D===void 0?void 0:D.call(S,"template");Z&&Fr(Z,Q=>{Fo(Q.content)&&ih(Q.content)})},$S=function(S){S.normalize();const D=N?N(S):S.ownerDocument,Z=te.call(D||S,S,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Q=Z.nextNode();for(;Q;)Q.data=ju(Q.data),Q=Z.nextNode()},zu=function(S){const D=O?O(S):null;return typeof D!="string"||Mt(D)!=="form"?!1:typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||S.attributes!==E(S)||typeof S.removeAttribute!="function"||typeof S.removeAttributeNode!="function"||typeof S.getAttributeNode!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function"||S.nodeType!==$(S)||S.childNodes!==g(S)},Fo=function(S){if(!$||typeof S!="object"||S===null)return!1;try{return $(S)===Lt.documentFragment}catch{return!1}},zl=function(S){if(!$||typeof S!="object"||S===null)return!1;try{return typeof $(S)=="number"}catch{return!1}};function fr(ie,S,D){ie.length!==0&&Fr(ie,Z=>{Z.call(t,S,D,Hs)})}const Are=function(S,D){return!!(re&&S.hasChildNodes()&&!zl(S.firstElementChild)&&Zt(Np,S.textContent)&&Zt(Np,S.innerHTML)||re&&RR[D]&&v(S)===Lt.element&&U(S)===Nr&&(zl(S.firstElementChild)||typeof S.textContent=="string"&&Zt(Np,S.textContent))||S.nodeType===Lt.processingInstruction||re&&S.nodeType===Lt.comment&&Zt(Yy,S.data))},qu=function(S,D){if(S instanceof RegExp)return Zt(S,D);if(S instanceof Function){for(var Z=arguments.length,Q=new Array(Z>2?Z-2:0),ve=2;ve<Z;ve++)Q[ve-2]=arguments[ve];return!!S(D,...Q)}return!1},Nre=function(S,D,Z){if(!q[D]&&TS(D)&&qu(k.tagNameCheck,D))return!1;if(it&&!Un[D]&&!Un[Zo(D)]){const Q=h(S),ve=g(S);if(ve&&Q){const xe=ve.length;for(let qe=xe-1;qe>=0;--qe){const Ht=S===Z?p(ve[qe],!0):ve[qe];Q.insertBefore(Ht,b(S))}}}return Lo(S),!0},SS=function(S,D,Z,Q){return S.length===0?D:D===Z||D===Q?Rn(D):D},Gs=function(S,D){return S===D||h(S)!==null?!1:(Ut&&nh(S),!0)},sh=function(S,D){if(wre(S),fr(J.beforeSanitizeElements,S,null),Gs(S,D))return!0;if(zu(S))return Lo(S),!0;const Z=Mt(B(S));if(ke=SS(J.uponSanitizeElement,ke,Ze,z),fr(J.uponSanitizeElement,S,{tagName:Z,allowedTags:ke}),Gs(S,D))return!0;if(Are(S,Z))return Lo(S),!0;if(q[Z]||!(le.tagCheck instanceof Function&&le.tagCheck(Z))&&!ke[Z]){const Q=Nre(S,Z,D);return Q===!1&&(fr(J.afterSanitizeElements,S,null),Gs(S,D))?!0:Q}if(v(S)===Lt.element&&!Ere(S)||(Z==="noscript"||Z==="noembed"||Z==="noframes")&&Zt(OR,S.innerHTML))return Lo(S),!0;if(G&&S.nodeType===Lt.text){const Q=ju(S.textContent);S.textContent!==Q&&(Aa(t.removed,{element:S.cloneNode()}),S.textContent=Q)}return fr(J.afterSanitizeElements,S,null),Gs(S,D)},vS=function(S,D,Z){if(ee[D]||bS(D,S)||_t&&(D==="id"||D==="name")&&(Z in n||Z in hre))return!1;const Q=w[D]||le.attributeCheck instanceof Function&&le.attributeCheck(D,S);return ot&&Zt(Ie,D)||ce&&Zt(je,D)?!0:Q?zs[D]||Zt(Ye,Ia(Z,Le,""))||(D==="src"||D==="xlink:href"||D==="href")&&S!=="script"&&By(Z,"data:")===0&&Vs[S]||Qe&&!Zt(we,Ia(Z,Le,""))?!0:!Z:TS(S)&&qu(k.tagNameCheck,S)&&qu(k.attributeNameCheck,D,S)||D==="is"&&k.allowCustomizedBuiltInElements&&qu(k.tagNameCheck,Z)},Ire=Je({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),TS=function(S){return!Ire[Zo(S)]&&Zt(Fe,S)},Cre=function(S,D,Z,Q){if(C&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Z)switch(f.getAttributeType(S,D)){case"TrustedHTML":return F(Q);case"TrustedScriptURL":return M(Q)}return Q},xre=function(S,D,Z,Q){try{return Z?S.setAttributeNS(Z,D,Q):S.setAttribute(D,Q),zu(S)?(Lo(S),!1):!0}catch{return Ws(D,S),!1}},wS=function(S,D){return re&&Zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,D)?!0:Zo(S)==="attributename"&&Fy(D,"href")!==null},ah=function(S,D){if(fr(J.beforeSanitizeAttributes,S,null),Gs(S,D))return;const Z=S.attributes;if(!Z||zu(S))return;w=SS(J.uponSanitizeAttribute,w,T,ne);const Q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:w,forceKeepAttr:void 0};let ve=Z.length;const xe=Mt(S.nodeName);for(;ve--;){const qe=Z[ve],Ht=qe.name,Ir=qe.namespaceURI,bn=qe.value,In=Mt(Ht),Ys=bn;let Cn=Ht==="value"?Ys:mR(Ys),kS=!1;if(Q.attrName=In,Q.attrValue=Cn,Q.keepAttr=!0,Q.forceKeepAttr=void 0,fr(J.uponSanitizeAttribute,S,Q),Cn=Q.attrValue,At&&(In==="id"||In==="name")&&By(Cn,zt)!==0&&(Ws(Ht,S,qe),Cn=zt+Cn,kS=!0),wS(Ht,Cn)){Ws(Ht,S,qe);continue}if(!Q.forceKeepAttr){if(!Q.keepAttr){Ws(Ht,S,qe);continue}if(!Ue&&Zt(Ky,Cn)){Ws(Ht,S,qe);continue}if(G&&(Cn=ju(Cn)),!vS(xe,In,Cn)){Ws(Ht,S,qe);continue}Cn=Cre(xe,In,Ir,Cn),Cn!==Ys&&xre(S,Ht,Ir,Cn)&&kS&&Ly(t.removed)}}fr(J.afterSanitizeAttributes,S,null),Gs(S,D)},ql=function(S){let D=null;const Z=oh(S);for(fr(J.beforeSanitizeShadowDOM,S,null);D=Z.nextNode();)if(fr(J.uponSanitizeShadowNode,D,null),sh(D,S),ah(D,S),Fo(D.content)&&ql(D.content),v(D)===Lt.element){const Q=y(D);Fo(Q)&&(lh(Q),ql(Q))}G&&$S(S),fr(J.afterSanitizeShadowDOM,S,null)},lh=function(S){const D=[{node:S,shadow:null}];for(;D.length>0;){const Z=D.pop();if(Z.shadow){ql(Z.shadow);continue}const Q=Z.node,ve=v(Q)===Lt.element,xe=g(Q);if(xe)for(let qe=xe.length-1;qe>=0;--qe)D.push({node:xe[qe],shadow:null});if(ve){const qe=O?O(Q):null;if(typeof qe=="string"&&Mt(qe)==="template"){const Ht=Q.content;Fo(Ht)&&D.push({node:Ht,shadow:null})}}if(ve){const qe=y(Q);Fo(qe)&&D.push({node:null,shadow:qe},{node:qe,shadow:null})}}};return t.sanitize=function(ie){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=null,Z=null,Q=null,ve=null;if(K0=!ie,K0&&(ie="<!-->"),typeof ie!="string"&&!zl(ie)&&(ie=yR(ie),typeof ie!="string"))throw Br("dirty is not a string, aborting");if(!t.isSupported)return ie;L?(ke=z,w=ne):Q0(S),(J.uponSanitizeElement.length>0||J.uponSanitizeAttribute.length>0)&&(ke=Rn(ke)),J.uponSanitizeAttribute.length>0&&(w=Rn(w)),t.removed=[];const xe=Ut&&typeof ie!="string"&&zl(ie);let qe=[];const Ht=Ct;if(xe){kre(ie);const In=B(ie);if(typeof In=="string"){const Ys=Mt(In);if(!ke[Ys]||q[Ys])throw eh(ie),Br("root node is forbidden and cannot be sanitized in-place")}if(zu(ie))throw eh(ie),Br("root node is clobbered and cannot be sanitized in-place");qe=rh(ie),Ct=$p()}else if(zl(ie))D=ES("<!---->"),Z=D.ownerDocument.importNode(ie,!0),Z.nodeType===Lt.element&&Z.nodeName==="BODY"||Z.nodeName==="HTML"?D=Z:D.appendChild(Z),lh(D);else{if(!Ee&&!G&&!ze&&ie.indexOf("<")===-1)return C&&Se?F(ie):ie;if(D=ES(ie),!D)return Ee?null:Se?A:""}D&&pe&&Lo(D.firstChild);const Ir=xe?ie:D;try{xe&&lh(ie);const In=oh(Ir);for(;Q=In.nextNode();)sh(Q,Ir),ah(Q,Ir),Fo(Q.content)&&ql(Q.content);xe&&vre(ie,qe)}catch(In){throw xe&&(eh(ie),yS(ie,qe)),In}finally{Ct=Ht}if(xe){if(yS(ie,qe))throw Br("a node selected for removal could not be safely returned; refusing to sanitize in place");return G&&ih(ie),ie}if(Ee){if(G&&ih(D),Oe)for(ve=X.call(D.ownerDocument);D.firstChild;)ve.appendChild(D.firstChild);else ve=D;return(w.shadowroot||w.shadowrootmode)&&(ve=fe.call(r,ve,!0)),ve}let bn=ze?D.outerHTML:D.innerHTML;return ze&&ke["!doctype"]&&D.ownerDocument&&D.ownerDocument.doctype&&D.ownerDocument.doctype.name&&Zt(CR,D.ownerDocument.doctype.name)&&(bn="<!DOCTYPE "+D.ownerDocument.doctype.name+`>
|
|
28
|
+
`+bn),G&&(bn=ju(bn)),C&&Se?F(bn):bn},t.setConfig=function(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Q0(ie),L=!0,z=ke,ne=w},t.clearConfig=function(){Hs=null,L=!1,z=null,ne=null,C=R,A=""},t.isValidAttribute=function(ie,S,D){Hs||Q0({});const Z=Mt(ie),Q=Mt(S);return typeof D=="string"&&(wS(S,D)||!Ue&&Zt(Ky,D))?!1:vS(Z,Q,D)},t.addHook=function(ie,S){typeof S=="function"&&kn(J,ie)&&Aa(J[ie],S)},t.removeHook=function(ie,S){if(kn(J,ie)){if(S!==void 0){const D=uR(J[ie],S);return D===-1?void 0:pR(J[ie],D,1)[0]}return Ly(J[ie])}},t.removeHooks=function(ie){kn(J,ie)&&(J[ie]=[])},t.removeAllHooks=function(){J=Xy()},t}var DR=Jy();const LR=["b","i","em","strong","u","s","small","sub","sup","p","br","hr","div","span","section","h1","h2","h3","h4","h5","h6","ul","ol","li","a","img","table","thead","tbody","tr","th","td","blockquote","pre","code","label","input","select","option"],FR=["href","target","rel","src","alt","width","height","class","id","style","data-umami-event","type","for","name","value"];function yo(e){return e?DR.sanitize(String(e),{ALLOWED_TAGS:LR,ALLOWED_ATTR:FR,ALLOW_DATA_ATTR:!1}):""}function xc(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}const BR=["label","info","buttonUploadLabel","defaultOptionText","confirmationLabel"];function UR(e){return typeof e=="string"?yo(e):e&&typeof e=="object"&&typeof e.name=="string"?{...e,name:yo(e.name)}:e}function VR(e){const t={...e},n=t;for(const r of BR)typeof n[r]=="string"&&(n[r]=yo(n[r]));return Array.isArray(t.options)&&(t.options=t.options.map(UR)),t}function jR(e){return Array.isArray(e)?e.map(t=>({...t,name:typeof t.name=="string"?yo(t.name):t.name,fields:Array.isArray(t.fields)?t.fields.map(VR):t.fields})):[]}const zR=["innerHTML"],Zy=a.defineComponent({__name:"FieldBlocHtml",props:{field:{}},setup(e){const n=e.field,{form:r}=ho(),o=a.computed(()=>(n.html||"").replace(/\{\{\s*([\w.$]+)\s*\}\}/g,(s,l)=>{const c=l.replace(/^this\.form\./,"");if(c==="motif_nc_display"){const d=r.motif_nc_display,f=Array.isArray(d)?d.map(u=>String(u)):typeof d=="string"?d.split(`
|
|
29
29
|
`).filter(Boolean):[];return f.length?`<ul>${f.map(u=>`<li>${xc(u)}</li>`).join("")}</ul>`:xc(d)}if(c==="amount_to_refund"){const d=r.amount_to_refund;if(typeof d!="number")return xc(d);const f=d/100;return f%1===0?f.toString():f.toLocaleString("fr-FR",{minimumFractionDigits:2,maximumFractionDigits:2})}return xc(r[c])}));return(i,s)=>(a.openBlock(),a.createElementBlock("div",{class:"fb-blochtml",innerHTML:o.value},null,8,zR))}});const qR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var Oc={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const HR=({size:e,strokeWidth:t=2,absoluteStrokeWidth:n,color:r,iconNode:o,name:i,class:s,...l},{slots:c})=>a.h("svg",{...Oc,width:e||Oc.width,height:e||Oc.height,stroke:r||Oc.stroke,"stroke-width":n?Number(t)*24/Number(e):t,class:["lucide",`lucide-${qR(i??"icon")}`],...l},[...o.map(d=>a.h(...d)),...c.default?[c.default()]:[]]);const Ur=(e,t)=>(n,{slots:r})=>a.h(HR,{...n,iconNode:t,name:e},r);const Cp=Ur("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const WR=Ur("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const GR=Ur("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const YR=Ur("MinusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const Qy=Ur("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const xp=Ur("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const KR=Ur("TriangleAlertIcon",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const eb=Ur("UploadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);const tb=Ur("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),XR={class:"fb-field"},JR=["name","required","placeholder","aria-invalid"],ZR={key:0,class:"fb-error",role:"alert"},nb=a.defineComponent({__name:"FieldIbanHolder",props:{label:{},placeholder:{},required:{type:Boolean}},setup(e){const t=e,{form:n}=ho(),{value:r,errorMessage:o,meta:i,handleBlur:s}=Bo(t.label,t.required?{required:!0}:{},{initialValue:n.iban_holder??""});a.watch(r,c=>{n.iban_holder=c},{immediate:!0});const l=a.computed(()=>!!o.value&&(i.touched||i.dirty));return(c,d)=>(a.openBlock(),a.createElementBlock("div",XR,[a.createVNode(Ke,{"for-id":"iban_holder",label:e.label,required:e.required},null,8,["label","required"]),a.withDirectives(a.createElementVNode("input",{id:"iban_holder","onUpdate:modelValue":d[0]||(d[0]=f=>a.isRef(r)?r.value=f:null),class:a.normalizeClass(["fb-input",{"fb-invalid":l.value}]),type:"text",name:e.label,required:e.required||void 0,placeholder:e.placeholder,"aria-invalid":l.value||void 0,onBlur:d[1]||(d[1]=(...f)=>a.unref(s)&&a.unref(s)(...f))},null,42,JR),[[a.vModelText,a.unref(r)]]),l.value?(a.openBlock(),a.createElementBlock("span",ZR,a.toDisplayString(a.unref(o)),1)):a.createCommentVNode("",!0)]))}}),QR={class:"fb-field"},eP={class:"fb-iban-title"},tP=["id","name","value","placeholder","required","aria-invalid"],nP={key:1,class:"fb-iban-warning"},rP=["innerHTML"],oP=a.defineComponent({__name:"FieldIban",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"iban",o=`${r}-error`,i=n.acceptedCountries||[],s={iban:!0};i.length&&(s.countryiban=i);const{model:l,showError:c,errorMessage:d,controlClass:f,handleBlur:u,ctx:p}=Rt(n,s),m=Lr(p.locale);function _(b){l.value=Ux(b.target.value)}return(b,g)=>(a.openBlock(),a.createElementBlock("div",QR,[a.unref(n).disableHolderField?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("h3",eP,a.toDisplayString(a.unref(n).sectionTitle||a.unref(m)("iban_section_title")),1),a.createVNode(nb,{label:a.unref(n).holderLabel||a.unref(m)("iban_holder"),placeholder:a.unref(n).holderPlaceholder||"Nom et prénom ou société",required:a.unref(n).required},null,8,["label","placeholder","required"])],64)),a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.createElementVNode("input",{id:a.unref(r),class:a.normalizeClass(["fb-input",a.unref(f)]),type:"text",name:a.unref(r),value:a.unref(l),autocomplete:"off",spellcheck:"false",placeholder:a.unref(n).placeholder,required:a.unref(n).required||void 0,"aria-invalid":a.unref(c)||void 0,onInput:_,onBlur:g[0]||(g[0]=(...h)=>a.unref(u)&&a.unref(u)(...h))},null,42,tP),a.unref(n).disableHolderField?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",nP,[a.createVNode(a.unref(KR),{size:20,"aria-hidden":"true"}),a.createElementVNode("p",null,a.toDisplayString(a.unref(m)("iban_warning")),1)])),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:2,class:"fb-info",innerHTML:a.unref(n).info},null,8,rP)):a.createCommentVNode("",!0),a.unref(c)?(a.openBlock(),a.createElementBlock("span",{key:3,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(d)),1)):a.createCommentVNode("",!0)]))}}),Op=e=>e.accept&&e.allowDataFiles?`${e.accept},.csv,.json`:e.accept||"",Rp=(e,t)=>{if(t)return t;const n=e.match(/\/f\/[0-9a-f]{24}\/[\w-]+\.(\w+)$/);return n?`document.${n[1]}`:decodeURI(e.split("/").slice(-1)[0])},iP={class:"fb-field"},sP={key:0,class:"fb-file-status"},aP={key:1,class:"fb-file-link"},lP=["href"],cP=["aria-label"],dP={key:0,class:"fb-file-btn"},uP=["innerHTML"],fP=["id","name","accept","required"],pP=["id","name","accept","required","aria-invalid"],mP={key:2,class:"fb-file-selected"},_P=["innerHTML"],hP=a.defineComponent({__name:"FieldFile",props:{field:{}},setup(e){const n=e.field,r=Op(n),o=n.save_to||"file",i=`${o}-error`,s=n.sizeMax??2560,{model:l,showError:c,errorMessage:d,handleBlur:f,ctx:u}=Rt(n),p=Lr(u.locale),m=a.ref(null),_=a.ref(!1),b=a.ref(""),g=a.computed(()=>typeof l.value=="string"&&l.value.startsWith("http")),h=a.computed(()=>typeof l.value=="string"&&l.value.startsWith("data:"));function y(v){u.bus.emit("show-popup",{title:n.label||"Fichier",message:v})}function E(v){if(!r)return!0;const B=String(r).split(",").map(U=>U.trim().toLowerCase().replace(/^\./,"")).filter(Boolean);if(!B.length)return!0;const H=v.toLowerCase().match(/\.([^.\s]+)\s*$/)?.[1];return!!H&&B.includes(H)}async function $(v){const B=v.target.files?.[0];if(!B)return;if(!E(B.name)){m.value&&(m.value.value=""),y(p("file_format_not_accepted",{formats:r}));return}if(B.size>s*1e3){m.value&&(m.value.value=""),y(p("file_max_size_error"));return}if(B.name.toLowerCase().endsWith(".heic")){m.value&&(m.value.value=""),y(p("file_heic_error"));return}if(b.value=B.name,u.privateUploads.value){await O(B);return}const H=new FileReader;H.onloadend=async()=>{const U=H.result;if(n.isDirectUpload)try{_.value=!0;const{data:C}=await et.post(`${u.server}/api/v2/submissions/upload`,{b64file:U,filename:B.name,operationId:u.operationId.value,save_to:n.save_to});l.value=C.url}catch(C){l.value="",m.value&&(m.value.value="");const A=C.response?.data?.errors?.[0];y(A||p("file_upload_failed")),xn(C,{where:"FieldFile.upload",save_to:n.save_to})}finally{_.value=!1}else l.value=U;f()},H.readAsDataURL(B)}async function O(v){try{_.value=!0,l.value=await u.api.uploadPrivateFile(u.formId,n.save_to||"",v)}catch(B){l.value="",m.value&&(m.value.value="");const H=B.response?.data?.errors?.[0];y(H||p("file_upload_failed")),xn(B,{where:"FieldFile.uploadPrivate",save_to:n.save_to})}finally{_.value=!1}f()}function N(){l.value="",b.value="",m.value&&(m.value.value="")}return(v,B)=>(a.openBlock(),a.createElementBlock("div",iP,[a.createVNode(Ke,{"for-id":a.unref(o),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),_.value?(a.openBlock(),a.createElementBlock("div",sP,a.toDisplayString(a.unref(p)("multiple_file_upload_en_cours"))+"… ",1)):g.value?(a.openBlock(),a.createElementBlock("div",aP,[a.createElementVNode("a",{href:String(a.unref(l)),target:"_blank",rel:"noopener"},a.toDisplayString(a.unref(Rp)(String(a.unref(l)),b.value)),9,lP),a.createElementVNode("button",{type:"button",class:"fb-file-delete","aria-label":a.unref(p)("file_delete"),onClick:N},[a.createVNode(a.unref(tb),{size:16})],8,cP)])):a.createCommentVNode("",!0),!_.value&&!g.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.unref(n).isButtonUpload?(a.openBlock(),a.createElementBlock("label",dP,[a.createVNode(a.unref(eb),{size:18}),a.createElementVNode("span",{innerHTML:a.unref(n).buttonUploadLabel||a.unref(p)("file_upload_button")},null,8,uP),a.createElementVNode("input",{id:a.unref(o),ref_key:"inputRef",ref:m,type:"file",class:"fb-file-hidden",name:a.unref(o),accept:a.unref(r),required:!a.unref(l)&&a.unref(n).required?!0:void 0,onChange:$,onBlur:B[0]||(B[0]=(...H)=>a.unref(f)&&a.unref(f)(...H))},null,40,fP)])):(a.openBlock(),a.createElementBlock("input",{key:1,id:a.unref(o),ref_key:"inputRef",ref:m,type:"file",class:"fb-file-input",name:a.unref(o),accept:a.unref(r),required:!a.unref(l)&&a.unref(n).required?!0:void 0,"aria-invalid":a.unref(c)||void 0,onChange:$,onBlur:B[1]||(B[1]=(...H)=>a.unref(f)&&a.unref(f)(...H))},null,40,pP)),h.value?(a.openBlock(),a.createElementBlock("span",mP,[a.createTextVNode(a.toDisplayString(a.unref(p)("file_selected")),1),b.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode(" — "+a.toDisplayString(b.value),1)],64)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:3,class:"fb-info",innerHTML:a.unref(n).info},null,8,_P)):a.createCommentVNode("",!0),a.unref(c)?(a.openBlock(),a.createElementBlock("span",{key:4,id:i,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(d)),1)):a.createCommentVNode("",!0)]))}});function gP(e){const t=(e||"").replace(/[^\dAB]/gi,"").toUpperCase().slice(0,15),n=[1,2,2,2,3,3,2],r=[];let o=0;for(const i of n){if(o>=t.length)break;r.push(t.slice(o,o+i)),o+=i}return r.join(" ")}const yP={class:"fb-field"},bP=["id","name","value","placeholder","required","aria-invalid"],EP=["innerHTML"],$P=a.defineComponent({__name:"FieldSecuriteSociale",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"ssn",o=`${r}-error`,{model:i,showError:s,errorMessage:l,controlClass:c,handleBlur:d}=Rt(n,{securitesocialefr:!0});function f(u){i.value=gP(u.target.value)}return(u,p)=>(a.openBlock(),a.createElementBlock("div",yP,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.createElementVNode("input",{id:a.unref(r),class:a.normalizeClass(["fb-input",a.unref(c)]),type:"text",inputmode:"numeric",name:a.unref(r),value:a.unref(i),placeholder:a.unref(n).placeholder||"1 23 45 67 890 123 45",required:a.unref(n).required||void 0,"aria-invalid":a.unref(s)||void 0,onInput:f,onBlur:p[0]||(p[0]=(...m)=>a.unref(d)&&a.unref(d)(...m))},null,42,bP),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,class:"fb-info",innerHTML:a.unref(n).info},null,8,EP)):a.createCommentVNode("",!0),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),SP={class:"fb-field"},vP=["id","name","placeholder","required","aria-invalid"],TP=a.defineComponent({__name:"FieldDevise",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"devise",o=`${r}-error`,{model:i,showError:s,errorMessage:l,controlClass:c,handleBlur:d}=Rt(n,{min_value:0}),f=a.computed({get:()=>{const u=Number(i.value);return u?u/100:""},set:u=>{const p=Math.round(parseFloat(String(u))*100);i.value=Number.isNaN(p)?0:p}});return(u,p)=>(a.openBlock(),a.createElementBlock("div",SP,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.withDirectives(a.createElementVNode("input",{id:a.unref(r),"onUpdate:modelValue":p[0]||(p[0]=m=>f.value=m),class:a.normalizeClass(["fb-input",a.unref(c)]),type:"number",step:"0.01",inputmode:"decimal",name:a.unref(r),placeholder:a.unref(n).placeholder,required:a.unref(n).required||void 0,"aria-invalid":a.unref(s)||void 0,onBlur:p[1]||(p[1]=(...m)=>a.unref(d)&&a.unref(d)(...m))},null,42,vP),[[a.vModelText,f.value]]),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:0,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(l)),1)):a.createCommentVNode("",!0)]))}});function Pp(e){const t=(e||"").replace(/\D/g,"").slice(0,13);return t.length<=1?t:[t.slice(0,1),t.slice(1,7),t.slice(7,13)].filter(Boolean).join(" ")}const wP={class:"fb-field"},kP=["id","name","value","placeholder","required","aria-invalid"],AP={key:0,class:"fb-ean-ok"},NP=["innerHTML"],IP=a.defineComponent({__name:"FieldEan",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"ean",o=`${r}-error`,i=a.computed(()=>(n.options||[]).map(y=>typeof y=="string"?{value:y,label:y}:{value:y.value,label:y.label??y.name??y.value})),s=a.computed(()=>i.value.length>0),l=a.computed(()=>i.value.map(y=>Pp(y.label))),c={};s.value&&(c.one_of=l.value);const{model:d,showError:f,errorMessage:u,controlClass:p,handleBlur:m,setValue:_}=Rt(n,c),b=a.ref(Pp(String(d.value??""))),g=a.ref(null);function h(y){b.value=Pp(y.target.value);const E=b.value.replace(/\D/g,"");if(s.value){_(b.value);const $=i.value.find(O=>O.label.replace(/\D/g,"")===E);g.value=$?$.value:null}else _(E.length===13?E:""),g.value=null}return(y,E)=>(a.openBlock(),a.createElementBlock("div",wP,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.createElementVNode("input",{id:a.unref(r),class:a.normalizeClass(["fb-input",a.unref(p)]),type:"text",inputmode:"numeric",name:a.unref(r),value:b.value,placeholder:a.unref(n).placeholder,required:a.unref(n).required||void 0,"aria-invalid":a.unref(f)||void 0,onInput:h,onBlur:E[0]||(E[0]=(...$)=>a.unref(m)&&a.unref(m)(...$))},null,42,kP),g.value?(a.openBlock(),a.createElementBlock("span",AP,[a.createVNode(a.unref(Cp),{size:16}),a.createTextVNode(" "+a.toDisplayString(g.value),1)])):a.createCommentVNode("",!0),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:1,class:"fb-info",innerHTML:a.unref(n).info},null,8,NP)):a.createCommentVNode("",!0),a.unref(f)?(a.openBlock(),a.createElementBlock("span",{key:2,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(u)),1)):a.createCommentVNode("",!0)]))}}),CP={class:"fb-field"},xP=["id","name","value","placeholder","required","disabled","autocomplete","aria-invalid"],OP={key:0,class:"fb-phone-verif","aria-live":"polite"},RP={key:0,class:"fb-phone-verified"},PP={class:"fb-phone-code"},MP=["onKeydown"],DP=["disabled"],LP={key:1,class:"fb-info"},FP=["disabled"],BP=["innerHTML"],UP={key:3,class:"fb-error",role:"alert"},VP=60,jP=a.defineComponent({__name:"FieldPhone",props:{field:{}},emits:["phone-verification"],setup(e,{emit:t}){const n=e,r=t,o=n.field,i=o.save_to||"phone",s=`${i}-error`,{model:l,showError:c,errorMessage:d,controlClass:f,handleBlur:u,ctx:p}=Rt(o,{phone:{phoneType:o.phoneType||"both",defaultCountry:o.defaultCountry,acceptedCountries:o.acceptedCountries||[]}});function m(A){const R=A.target.value,I=Yg(R);l.value=new bc(o.defaultCountry).input(I)}const _=a.ref(""),b=a.ref(""),g=a.ref("idle"),h=a.ref(!1),y=a.ref(0);let E;const $=a.computed(()=>{const A=y.value;return`${Math.floor(A/60)}:${String(A%60).padStart(2,"0")}`});function O(){y.value=VP,clearInterval(E),E=setInterval(()=>{y.value>0?y.value--:clearInterval(E)},1e3)}function N(){return{formulaireId:p.formId,field:o.save_to,phone:l.value,email:p.phoneVerificationEmail.value,url:window.location.href,testmode:p.testmode.value}}function v(A){return et.isAxiosError(A)?A.response?.data?.message:void 0}function B(A){h.value=!0,clearInterval(E),r("phone-verification",{save_to:o.save_to,verified:!0,token:A,phone:l.value})}async function H(){b.value="",g.value="sending";try{const{data:A}=await et.post(`${p.server}/api/v2/phone-verification/request`,N());if(A.alreadyVerified){B();return}A.devCode&&console.info("[phone-verification] code:",A.devCode),g.value="codeSent",O()}catch(A){g.value="idle",b.value=v(A)||"L’envoi du code a échoué, veuillez réessayer.",xn(A,{where:"FieldPhone.request",save_to:o.save_to})}}async function U(){b.value="";try{const{data:A}=await et.post(`${p.server}/api/v2/phone-verification/verify`,{...N(),code:_.value});B(A.token)}catch(A){b.value=v(A)||"Code incorrect, veuillez réessayer.",xn(A,{where:"FieldPhone.verify",save_to:o.save_to})}}function C(){_.value=_.value.replace(/\D/g,"").slice(0,6)}return a.onBeforeUnmount(()=>clearInterval(E)),(A,R)=>(a.openBlock(),a.createElementBlock("div",CP,[a.createVNode(Ke,{"for-id":a.unref(i),label:a.unref(o).label,required:a.unref(o).required},null,8,["for-id","label","required"]),a.createElementVNode("input",{id:a.unref(i),class:a.normalizeClass(["fb-input",a.unref(f)]),type:"tel",inputmode:"tel",name:a.unref(i),value:a.unref(l),placeholder:a.unref(o).placeholder,required:a.unref(o).required||void 0,disabled:h.value,autocomplete:a.unref(o).autocomplete?"tel":void 0,"aria-invalid":a.unref(c)||void 0,onInput:m,onBlur:R[0]||(R[0]=(...I)=>a.unref(u)&&a.unref(u)(...I))},null,42,xP),a.unref(o).phoneVerificationSms?(a.openBlock(),a.createElementBlock("div",OP,[h.value?(a.openBlock(),a.createElementBlock("span",RP,[a.createVNode(a.unref(Cp),{size:16}),R[2]||(R[2]=a.createTextVNode(" Numéro validé ",-1))])):g.value==="codeSent"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",PP,[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":R[1]||(R[1]=I=>_.value=I),class:"fb-input",type:"text",inputmode:"numeric",autocomplete:"one-time-code",maxlength:"6",placeholder:"Code reçu par SMS",onInput:C,onKeydown:a.withKeys(a.withModifiers(U,["prevent"]),["enter"])},null,40,MP),[[a.vModelText,_.value]]),a.createElementVNode("button",{type:"button",class:"fb-button fb-button--primary",disabled:_.value.length!==6,onClick:U}," Vérifier ",8,DP)]),R[3]||(R[3]=a.createElementVNode("span",{class:"fb-info"}," Pensez à vérifier la réception de votre code dans vos spams SMS. ",-1)),y.value===0?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"fb-button fb-button--ghost",onClick:H}," Renvoyer le code ")):(a.openBlock(),a.createElementBlock("span",LP,"Renvoyer dans "+a.toDisplayString($.value),1))],64)):(a.openBlock(),a.createElementBlock("button",{key:2,type:"button",class:"fb-button fb-button--primary",disabled:g.value==="sending"||!a.unref(l),onClick:H},a.toDisplayString(g.value==="sending"?"Envoi…":"Valider mon numéro"),9,FP))])):a.createCommentVNode("",!0),a.unref(o).info?(a.openBlock(),a.createElementBlock("p",{key:1,class:"fb-info",innerHTML:a.unref(o).info},null,8,BP)):a.createCommentVNode("",!0),a.unref(c)?(a.openBlock(),a.createElementBlock("span",{key:2,id:s,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(d)),1)):a.createCommentVNode("",!0),b.value?(a.openBlock(),a.createElementBlock("span",UP,a.toDisplayString(b.value),1)):a.createCommentVNode("",!0)]))}});let Rc=null;function zP(e,t="fr"){return typeof window>"u"||window.google?.maps?.places?Promise.resolve():Rc||(Rc=new Promise((r,o)=>{const i="__houstonGoogleMapsLoaded";window[i]=()=>{window.google.maps.importLibrary("places").then(()=>r(),o)};const s=document.createElement("script");s.src=`https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(e)}&libraries=places&language=${t}&loading=async&callback=${i}`,s.async=!0,s.onerror=()=>o(new Error("Google Maps script failed to load")),document.head.appendChild(s)}),Rc)}const qP={class:"fb-field"},HP={key:0,class:"fb-address-ac-wrap"},WP={key:0,class:"fb-address-ban"},GP=["id","aria-expanded","value","placeholder"],YP={key:0,class:"fb-address-suggestions",role:"listbox"},KP=["aria-selected","onMousedown","onMouseenter"],XP={key:2,class:"fb-address-manual"},JP={class:"fb-field"},ZP=["id","placeholder"],QP={class:"fb-field"},eM=["id"],tM={class:"fb-address-row"},nM={class:"fb-field"},rM=["id"],oM={class:"fb-field"},iM=["id"],sM={class:"fb-field"},aM=["id"],lM=["innerHTML"],cM="https://data.geopf.fr/geocodage/completion/",dM=a.defineComponent({__name:"FieldAdresse",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"address",o=`${r}-error`,i={};n.required&&(i.address_required=!0),vy(n.countries)&&(i.address_metropolitan=!0);const{model:s,showError:l,errorMessage:c,ctx:d}=Rt(n,i),f=Lr(d.locale),u=a.reactive({...s.value||{}});a.watch(u,()=>{s.value={...u}},{deep:!0});const p=a.ref(null),m=a.ref(!1),_=a.computed(()=>Yx(n.countries)),b=a.computed(()=>vy(n.countries)),g=a.ref(""),h=a.ref([]),y=a.ref(!1),E=a.ref(-1);let $,O=0,N=null;async function v(A){const R=++O;N?.abort(),N=typeof AbortController<"u"?new AbortController:null;try{const I=`${cM}?text=${encodeURIComponent(A)}&type=StreetAddress&maximumResponses=15`,j=await(await fetch(I,{signal:N?.signal})).json();if(R!==O)return;const F=Array.isArray(j?.results)?j.results:[];h.value=b.value?F.filter(M=>!gp(M.zipcode)):F,y.value=h.value.length>0,E.value=-1}catch(I){if(R!==O||I?.name==="AbortError")return;xn(I,{where:"FieldAdresse.ban"})}}function B(A){g.value=A,clearTimeout($);const R=A.trim();if(R.length<3){h.value=[],y.value=!1;return}$=setTimeout(()=>v(R),220)}function H(A){if(b.value&&gp(A.zipcode))return;clearTimeout($),N?.abort();const R=`, ${A.zipcode??""} ${A.city??""}`,I=A.fulltext.endsWith(R)?A.fulltext.slice(0,-R.length):A.fulltext.split(",")[0];u.address=I||A.street||A.fulltext,u.postcode=A.zipcode,u.city=A.city,u.country="France",typeof A.y=="number"&&(u.latitude=A.y),typeof A.x=="number"&&(u.longitude=A.x),g.value=A.fulltext,y.value=!1,h.value=[]}function U(A){!y.value||!h.value.length||(A.key==="ArrowDown"?(A.preventDefault(),E.value=(E.value+1)%h.value.length):A.key==="ArrowUp"?(A.preventDefault(),E.value=(E.value-1+h.value.length)%h.value.length):A.key==="Enter"&&E.value>=0?(A.preventDefault(),H(h.value[E.value])):A.key==="Escape"&&(y.value=!1))}function C(A,R,I){const V=Y=>A.find(W=>(W.types||[]).includes(Y)),j=Y=>Y?.longText??Y?.long_name??"",F=j(V("street_number")),M=j(V("route"));u.address=[F,M].filter(Boolean).join(" ")||I,u.city=j(V("locality"))||j(V("postal_town")),u.postcode=j(V("postal_code")),u.country=j(V("country")),R&&(u.latitude=typeof R.lat=="function"?R.lat():R.lat,u.longitude=typeof R.lng=="function"?R.lng():R.lng)}return a.onMounted(async()=>{if(!_.value){if(!d.googleMapsApiKey.value){m.value=!0;return}try{await zP(d.googleMapsApiKey.value,d.locale.value);const A=window.google,R={},I=Xx(n.countries);I.length&&(R.includedRegionCodes=I);const V=new A.maps.places.PlaceAutocompleteElement(R);V.id=r,p.value?.appendChild(V),V.addEventListener("gmp-select",async j=>{try{const F=j.placePrediction.toPlace();await F.fetchFields({fields:["addressComponents","location","formattedAddress"]}),C(F.addressComponents||[],F.location,F.formattedAddress||""),b.value&&gp(u.postcode)&&(m.value=!0)}catch(F){xn(F,{where:"FieldAdresse.select"})}})}catch(A){xn(A,{where:"FieldAdresse.load"}),m.value=!0}}}),(A,R)=>(a.openBlock(),a.createElementBlock("div",qP,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),!m.value&&!u.address?(a.openBlock(),a.createElementBlock("div",HP,[_.value?(a.openBlock(),a.createElementBlock("div",WP,[a.createElementVNode("input",{id:a.unref(r),class:"fb-input",type:"text",autocomplete:"off",role:"combobox","aria-autocomplete":"list","aria-expanded":y.value,value:g.value,placeholder:a.unref(n).placeholder||a.unref(f)("N_rue"),onInput:R[0]||(R[0]=I=>B(I.target.value)),onKeydown:U,onFocus:R[1]||(R[1]=I=>y.value=h.value.length>0),onBlur:R[2]||(R[2]=I=>y.value=!1)},null,40,GP),y.value?(a.openBlock(),a.createElementBlock("ul",YP,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(I,V)=>(a.openBlock(),a.createElementBlock("li",{key:`${I.fulltext}-${V}`,class:a.normalizeClass(["fb-address-suggestion",{"is-active":V===E.value}]),role:"option","aria-selected":V===E.value,onMousedown:a.withModifiers(j=>H(I),["prevent"]),onMouseenter:j=>E.value=V},a.toDisplayString(I.fulltext),43,KP))),128))])):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",{key:1,ref_key:"autocompleteEl",ref:p,class:"fb-address-ac"},null,512))])):a.createCommentVNode("",!0),!m.value&&!u.address?(a.openBlock(),a.createElementBlock("button",{key:1,type:"button",class:"fb-address-toggle",onClick:R[3]||(R[3]=I=>m.value=!0)},a.toDisplayString(a.unref(f)("trouvepasadresse")),1)):a.createCommentVNode("",!0),m.value||u.address?(a.openBlock(),a.createElementBlock("div",XP,[a.createElementVNode("div",JP,[a.withDirectives(a.createElementVNode("input",{id:`${a.unref(r)}-street`,"onUpdate:modelValue":R[4]||(R[4]=I=>u.address=I),class:"fb-input",type:"text",placeholder:a.unref(f)("N_rue"),autocomplete:"address-line1"},null,8,ZP),[[a.vModelText,u.address]])]),a.createElementVNode("div",QP,[a.createVNode(Ke,{"for-id":`${a.unref(r)}-compl`,label:a.unref(f)("compl_addresse")},null,8,["for-id","label"]),a.withDirectives(a.createElementVNode("input",{id:`${a.unref(r)}-compl`,"onUpdate:modelValue":R[5]||(R[5]=I=>u.complement=I),class:"fb-input",type:"text",autocomplete:"address-line2"},null,8,eM),[[a.vModelText,u.complement]])]),a.createElementVNode("div",tM,[a.createElementVNode("div",nM,[a.createVNode(Ke,{"for-id":`${a.unref(r)}-cp`,label:a.unref(f)("code_postal")},null,8,["for-id","label"]),a.withDirectives(a.createElementVNode("input",{id:`${a.unref(r)}-cp`,"onUpdate:modelValue":R[6]||(R[6]=I=>u.postcode=I),class:"fb-input",type:"text",autocomplete:"postal-code"},null,8,rM),[[a.vModelText,u.postcode]])]),a.createElementVNode("div",oM,[a.createVNode(Ke,{"for-id":`${a.unref(r)}-city`,label:a.unref(f)("ville")},null,8,["for-id","label"]),a.withDirectives(a.createElementVNode("input",{id:`${a.unref(r)}-city`,"onUpdate:modelValue":R[7]||(R[7]=I=>u.city=I),class:"fb-input",type:"text",autocomplete:"address-level2"},null,8,iM),[[a.vModelText,u.city]])])]),a.createElementVNode("div",sM,[a.createVNode(Ke,{"for-id":`${a.unref(r)}-country`,label:a.unref(f)("pays")},null,8,["for-id","label"]),a.withDirectives(a.createElementVNode("input",{id:`${a.unref(r)}-country`,"onUpdate:modelValue":R[8]||(R[8]=I=>u.country=I),class:"fb-input",type:"text",autocomplete:"country-name"},null,8,aM),[[a.vModelText,u.country]])])])):a.createCommentVNode("",!0),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:3,class:"fb-info",innerHTML:a.unref(n).info},null,8,lM)):a.createCommentVNode("",!0),a.unref(l)?(a.openBlock(),a.createElementBlock("span",{key:4,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(c)),1)):a.createCommentVNode("",!0)]))}}),uM={class:"fb-field"},fM={key:0,class:"fb-file-status"},pM={key:1,class:"fb-file-link"},mM=["href"],_M=["aria-label","onClick"],hM={key:2,class:"fb-file-btn"},gM=["innerHTML"],yM=["id","name","accept","onChange"],bM=["id","name","accept","onChange"],EM={class:"fb-mf-actions"},$M={key:0,class:"fb-info"},SM=["innerHTML"],vM={key:2,class:"fb-error",role:"alert"},TM=a.defineComponent({__name:"FieldMultipleFiles",props:{field:{}},setup(e){const n=e.field,r=Op(n),o=n.save_to||"files",i=n.sizeMax??2560,s=n.validationLabel||n.label||o,l=ho(),c=Lr(l.locale),d=a.ref([{data:void 0}]),f=l.form[o];Array.isArray(f)&&f.length&&(d.value=[...f]);const{value:u,errorMessage:p,meta:m,handleBlur:_}=Bo(`${s}_hidden_required`,n.required?{required:!0}:{},{label:s});function b(A){return typeof A=="string"?!0:typeof A.data=="string"&&A.data.startsWith("http")}const g=a.computed(()=>d.value.some(A=>typeof A!="string"&&A.uploading)),h=a.computed(()=>d.value.some(b)),y=a.computed(()=>!!n.required&&!!p.value&&(m.touched||m.dirty||l.submitAttempted.value));a.watch(d,()=>{const A=d.value.filter(R=>typeof R=="string"?!0:!!R.data).map(R=>typeof R=="string"?R:R.data);l.form[o]=A,u.value=h.value||g.value?"has_files":""},{deep:!0,immediate:!0});function E(A){l.bus.emit("show-popup",{title:n.label||"Fichiers",message:A})}function $(A){if(!r)return!0;const R=String(r).split(",").map(V=>V.trim().toLowerCase().replace(/^\./,"")).filter(Boolean);if(!R.length)return!0;const I=A.toLowerCase().match(/\.([^.\s]+)\s*$/)?.[1];return!!I&&R.includes(I)}async function O(A,R){const I=Array.from(R.target.files||[]);d.value.splice(A,1);for(const V of I){if(!$(V.name)){E(`Format non accepté. Formats acceptés : ${r}`);continue}if(V.size>i*1e3){E(c("file_max_size_error"));continue}if(V.name.toLowerCase().endsWith(".heic")){E(c("file_heic_error"));continue}const j=await N(V),F={data:j,uploading:!0,name:V.name};d.value.push(F);try{F.data=l.privateUploads.value?await l.api.uploadPrivateFile(l.formId,o,V):(await et.post(`${l.server}/api/v2/submissions/upload`,{b64file:j,filename:V.name,operationId:l.operationId.value,save_to:o})).data.url,F.uploading=!1,d.value=[...d.value]}catch(M){const Y=d.value.indexOf(F);Y!==-1&&d.value.splice(Y,1);const W=M.response?.data?.errors?.[0];E(W||c("file_upload_failed")),xn(M,{where:"FieldMultipleFiles.upload",save_to:o})}}d.value.length||d.value.push({data:void 0})}function N(A){return new Promise(R=>{const I=new FileReader;I.onloadend=()=>R(I.result),I.readAsDataURL(A)})}function v(){d.value.push({data:void 0})}const B=a.computed(()=>{if(d.value.length<2)return!1;const A=d.value[d.value.length-1];return typeof A=="string"||!A.uploading});function H(){B.value&&d.value.pop()}function U(A){d.value.splice(A,1),d.value.length||d.value.push({data:void 0})}function C(A){return typeof A=="string"?A:A.data}return(A,R)=>(a.openBlock(),a.createElementBlock("div",uM,[a.createVNode(Ke,{"for-id":a.unref(o),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,(I,V)=>(a.openBlock(),a.createElementBlock("div",{key:V,class:"fb-mf-row"},[typeof I!="string"&&I.uploading?(a.openBlock(),a.createElementBlock("div",fM," ["+a.toDisplayString(I.name)+"] "+a.toDisplayString(a.unref(c)("multiple_file_upload_en_cours"))+"… ",1)):b(I)?(a.openBlock(),a.createElementBlock("div",pM,[a.createElementVNode("a",{href:C(I),target:"_blank",rel:"noopener"},a.toDisplayString(a.unref(Rp)(C(I),typeof I=="string"?void 0:I.name)),9,mM),a.createElementVNode("button",{type:"button",class:"fb-file-delete","aria-label":a.unref(c)("file_delete"),onClick:j=>U(V)},[a.createVNode(a.unref(xp),{size:16})],8,_M)])):a.unref(n).isButtonUpload?(a.openBlock(),a.createElementBlock("label",hM,[a.createVNode(a.unref(eb),{size:18}),a.createElementVNode("span",{innerHTML:a.unref(n).buttonUploadLabel||a.unref(c)("file_upload_button")},null,8,gM),a.createElementVNode("input",{id:`${a.unref(o)}_${V}`,type:"file",class:"fb-file-hidden",name:`${a.unref(o)}_file_${V}`,accept:a.unref(r),multiple:"",onChange:j=>O(V,j),onBlur:R[0]||(R[0]=(...j)=>a.unref(_)&&a.unref(_)(...j))},null,40,yM)])):(a.openBlock(),a.createElementBlock("input",{key:3,id:`${a.unref(o)}_${V}`,type:"file",class:"fb-file-input",name:`${a.unref(o)}_file_${V}`,accept:a.unref(r),multiple:"",onChange:j=>O(V,j),onBlur:R[1]||(R[1]=(...j)=>a.unref(_)&&a.unref(_)(...j))},null,40,bM))]))),128)),a.createElementVNode("div",EM,[a.createElementVNode("button",{type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:v},[a.createVNode(a.unref(Qy),{size:16}),a.createTextVNode(" "+a.toDisplayString(a.unref(c)("multiple_file_add_file")),1)]),B.value?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:H},[a.createVNode(a.unref(YR),{size:16}),a.createTextVNode(" "+a.toDisplayString(a.unref(c)("multiple_file_remove_file")),1)])):a.createCommentVNode("",!0)]),g.value?(a.openBlock(),a.createElementBlock("span",$M,a.toDisplayString(a.unref(c)("multiple_file_patientez")),1)):a.createCommentVNode("",!0),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:1,class:"fb-info",innerHTML:a.unref(n).info},null,8,SM)):a.createCommentVNode("",!0),y.value?(a.openBlock(),a.createElementBlock("span",vM,a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(p)||a.unref(c)("file_select_required")),1)):a.createCommentVNode("",!0)]))}});function zi(e){return(e||[]).map(t=>typeof t=="string"?{value:t.toLowerCase(),name:t}:{value:t.value,name:t.name??t.label??t.value,other:!!t.other})}const wM={class:"fb-field"},kM={class:"fb-label"},AM=["innerHTML"],NM={key:0,class:"fb-required-star"},IM={class:"fb-choice-list"},CM=["name","value"],xM={class:"fb-choice-label"},OM=["innerHTML"],RM=a.defineComponent({__name:"FieldMultiCheckbox",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"field",o=`${r}-error`,{model:i,showError:s,errorMessage:l,handleBlur:c}=Rt(n),d=a.computed(()=>zi(n.options)),f=a.ref(typeof i.value=="string"&&i.value?i.value.split(":"):[]);return a.watch(f,()=>{i.value=f.value.join(":")},{deep:!0}),(u,p)=>(a.openBlock(),a.createElementBlock("fieldset",wM,[a.createElementVNode("legend",kM,[a.createElementVNode("span",{innerHTML:a.unref(n).label},null,8,AM),a.unref(n).required?(a.openBlock(),a.createElementBlock("span",NM,"*")):a.createCommentVNode("",!0)]),a.createElementVNode("div",IM,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,m=>(a.openBlock(),a.createElementBlock("label",{key:m.value,class:a.normalizeClass(["fb-choice",{"is-checked":f.value.includes(m.value)}])},[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":p[0]||(p[0]=_=>f.value=_),type:"checkbox",name:a.unref(r),value:m.value,onBlur:p[1]||(p[1]=(..._)=>a.unref(c)&&a.unref(c)(..._))},null,40,CM),[[a.vModelCheckbox,f.value]]),a.createElementVNode("span",xM,a.toDisplayString(m.name),1)],2))),128))]),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,class:"fb-info",innerHTML:a.unref(n).info},null,8,OM)):a.createCommentVNode("",!0),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(n).forceErrorMessage||a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),PM={class:"fb-recap"},MM=["innerHTML"],DM={key:0,class:"fb-recap-value"},LM={key:1,class:"fb-recap-value"},FM=a.defineComponent({__name:"FieldRecap",props:{field:{}},setup(e){const n=e.field,{form:r}=ho(),o=a.computed(()=>n.save_to?r[n.save_to]:void 0),i=a.computed(()=>n.save_to==="address"&&o.value&&typeof o.value=="object"?o.value:null);return(s,l)=>(a.openBlock(),a.createElementBlock("div",PM,[a.createElementVNode("div",{class:"fb-recap-label",innerHTML:a.unref(n).label},null,8,MM),i.value?(a.openBlock(),a.createElementBlock("div",DM,[a.createTextVNode(a.toDisplayString(i.value.address),1),i.value.complement?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode(", "+a.toDisplayString(i.value.complement),1)],64)):a.createCommentVNode("",!0),i.value.postcode?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(", "+a.toDisplayString(i.value.postcode),1)],64)):a.createCommentVNode("",!0),a.createTextVNode(" "+a.toDisplayString(i.value.city),1)])):(a.openBlock(),a.createElementBlock("div",LM,a.toDisplayString(o.value),1))]))}}),BM={class:"fb-field"},UM=["aria-label"],VM=["aria-checked","onClick","onKeydown"],jM={key:0,class:"fb-cem-hints"},zM=a.defineComponent({__name:"FieldCustomerExpMetric",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"cem",o=`${r}-error`,{model:i,showError:s,errorMessage:l,handleBlur:c}=Rt(n),d=a.computed(()=>Number(n.numberOfItem)||10),f=a.computed(()=>Array.from({length:d.value+1},(h,y)=>y)),u=a.computed(()=>Number(n.numberOfRedItem)||0),p=a.computed(()=>Number(n.numberOfGreenItem)||0),m=a.computed(()=>n.hint0||""),_=a.computed(()=>n.hint10||"");function b(h){return d.value-h<p.value?"cem-green":h<u.value?"cem-red":"cem-yellow"}function g(h){i.value=h,c()}return(h,y)=>(a.openBlock(),a.createElementBlock("div",BM,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.createElementVNode("ul",{class:"fb-cem",role:"radiogroup","aria-label":a.unref(n).label},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.value,E=>(a.openBlock(),a.createElementBlock("li",{key:E,class:a.normalizeClass(["fb-cem-item",[b(E),{"is-active":a.unref(i)===E}]]),role:"radio","aria-checked":a.unref(i)===E,tabindex:"0",onClick:$=>g(E),onKeydown:[a.withKeys($=>g(E),["enter"]),a.withKeys(a.withModifiers($=>g(E),["prevent"]),["space"])]},a.toDisplayString(E),43,VM))),128))],8,UM),m.value||_.value?(a.openBlock(),a.createElementBlock("div",jM,[a.createElementVNode("span",null,a.toDisplayString(m.value?`0 – ${m.value}`:""),1),a.createElementVNode("span",null,a.toDisplayString(_.value?`${d.value} – ${_.value}`:""),1)])):a.createCommentVNode("",!0),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),qM={class:"fb-field"},HM=["id","name","value","list","placeholder","required","aria-invalid"],WM=["id"],GM=["value"],YM={key:1,class:"fb-ean-ok"},KM=["innerHTML"],XM=a.defineComponent({__name:"FieldDatalist",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"field",o=`${r}-error`,i=a.computed(()=>zi(n.options)),s=a.computed(()=>i.value.length>0),l={};s.value&&(l.one_of=i.value.map(h=>h.name));const{model:c,showError:d,errorMessage:f,controlClass:u,handleBlur:p,setValue:m}=Rt(n,l),_=a.ref(String(c.value??"")),b=a.ref(null);function g(h){if(_.value=h.target.value,m(_.value),s.value){const y=i.value.find(E=>E.name===_.value);b.value=y?y.value:null}}return(h,y)=>(a.openBlock(),a.createElementBlock("div",qM,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.createElementVNode("input",{id:a.unref(r),class:a.normalizeClass(["fb-input",a.unref(u)]),type:"text",name:a.unref(r),value:_.value,list:s.value?`${a.unref(r)}-list`:void 0,placeholder:a.unref(n).placeholder,autocomplete:"off",required:a.unref(n).required||void 0,"aria-invalid":a.unref(d)||void 0,onInput:g,onBlur:y[0]||(y[0]=(...E)=>a.unref(p)&&a.unref(p)(...E))},null,42,HM),s.value?(a.openBlock(),a.createElementBlock("datalist",{key:0,id:`${a.unref(r)}-list`},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,E=>(a.openBlock(),a.createElementBlock("option",{key:E.value,value:E.name},null,8,GM))),128))],8,WM)):a.createCommentVNode("",!0),b.value?(a.openBlock(),a.createElementBlock("span",YM,[a.createVNode(a.unref(Cp),{size:16}),a.createTextVNode(" "+a.toDisplayString(b.value),1)])):a.createCommentVNode("",!0),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:2,class:"fb-info",innerHTML:a.unref(n).info},null,8,KM)):a.createCommentVNode("",!0),a.unref(d)?(a.openBlock(),a.createElementBlock("span",{key:3,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(f)),1)):a.createCommentVNode("",!0)]))}}),JM={class:"fb-field"},ZM={class:"fb-iban-title"},QM={class:"fb-ibanuk-row"},eD={class:"fb-field"},tD=["id","value","placeholder"],nD={key:0,class:"fb-error",role:"alert"},rD={class:"fb-field"},oD=["id","value","placeholder"],iD={key:0,class:"fb-error",role:"alert"},sD=a.defineComponent({__name:"FieldIbanUK",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"iban_uk",o=ho(),i=Lr(o.locale),s=o.form[r]||{},{value:l,errorMessage:c,meta:d,handleBlur:f}=Bo(i("iban_uk_sort_code"),{required:!!n.required,digits:6},{initialValue:s.sort_code||""}),{value:u,errorMessage:p,meta:m,handleBlur:_}=Bo(i("iban_uk_account_number"),a.computed(()=>({required:!!n.required,digits:8,iban_uk_modulus:[l.value]})),{initialValue:s.account_number||""});a.watch([l,u],()=>{o.form[r]={sort_code:l.value,account_number:u.value}});const b=a.computed(()=>!!c.value&&(d.touched||d.dirty)),g=a.computed(()=>!!p.value&&(m.touched||m.dirty));function h(E){l.value=E.target.value.replace(/\D/g,"").slice(0,6)}function y(E){u.value=E.target.value.replace(/\D/g,"").slice(0,8)}return(E,$)=>(a.openBlock(),a.createElementBlock("div",JM,[a.unref(n).disableHolderField?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("h3",ZM,a.toDisplayString(a.unref(n).sectionTitle||a.unref(i)("iban_section_title")),1),a.createVNode(nb,{label:a.unref(n).holderLabel||a.unref(i)("iban_holder"),placeholder:a.unref(n).holderPlaceholder||"Nom et prénom ou société",required:a.unref(n).required},null,8,["label","placeholder","required"])],64)),a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.createElementVNode("div",QM,[a.createElementVNode("div",eD,[a.createVNode(Ke,{"for-id":`${a.unref(r)}-sort`,label:a.unref(i)("iban_uk_sort_code")},null,8,["for-id","label"]),a.createElementVNode("input",{id:`${a.unref(r)}-sort`,class:a.normalizeClass(["fb-input",{"fb-invalid":b.value}]),type:"text",inputmode:"numeric",value:a.unref(l),placeholder:a.unref(i)("iban_uk_sort_code_placeholder"),onInput:h,onBlur:$[0]||($[0]=(...O)=>a.unref(f)&&a.unref(f)(...O))},null,42,tD),b.value?(a.openBlock(),a.createElementBlock("span",nD,a.toDisplayString(a.unref(c)),1)):a.createCommentVNode("",!0)]),a.createElementVNode("div",rD,[a.createVNode(Ke,{"for-id":`${a.unref(r)}-account`,label:a.unref(i)("iban_uk_account_number")},null,8,["for-id","label"]),a.createElementVNode("input",{id:`${a.unref(r)}-account`,class:a.normalizeClass(["fb-input",{"fb-invalid":g.value}]),type:"text",inputmode:"numeric",value:a.unref(u),placeholder:a.unref(i)("iban_uk_account_number_placeholder"),onInput:y,onBlur:$[1]||($[1]=(...O)=>a.unref(_)&&a.unref(_)(...O))},null,42,oD),g.value?(a.openBlock(),a.createElementBlock("span",iD,a.toDisplayString(a.unref(p)),1)):a.createCommentVNode("",!0)])])]))}});function Mp(e,t=300){let n;const r=(...o)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...o),t)};return r.cancel=()=>{n&&clearTimeout(n)},r}const aD={class:"fb-field"},lD=["aria-expanded"],cD={key:0,class:"fb-ms-placeholder"},dD={key:1,class:"fb-ms-chips"},uD={key:0,class:"fb-ms-panel"},fD={class:"fb-ms-list"},pD={key:0,class:"fb-ms-empty"},mD=["checked","disabled","onChange"],_D={class:"fb-choice-label"},hD={key:1,class:"fb-ms-empty"},gD=["innerHTML"],yD=a.defineComponent({__name:"FieldMultiSelect",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"multiselect",o=`${r}-error`,{model:i,showError:s,errorMessage:l,handleBlur:c}=Rt(n),d=a.computed(()=>zi(n.options)),f=a.computed(()=>Number(n.nbMaxSelected)||0),u=a.computed(()=>Number(n.minSearchLength)||0),p=a.computed(()=>Number(n.maxDisplayResults)||0),m=a.computed(()=>n.multiple!==!1),_=typeof n.ajaxUrl=="string"?n.ajaxUrl:"",b=n.ajax===!0&&_.startsWith("http"),g=b&&_.includes("data-list/json/"),h=a.ref([]),y=a.ref({}),E=a.ref(!1),$=a.ref(!1),O=a.ref(!1);let N=0;const v=a.computed(()=>b?h.value:d.value);function B(X){return typeof X!="string"||!X?[]:m.value?X.split(":"):[X]}const H=a.ref(B(i.value));a.watch(H,()=>{i.value=m.value?H.value.join(":"):H.value[0]??""},{deep:!0});const U=a.ref(!1),C=a.ref(""),A=a.computed(()=>C.value.length<u.value);function R(X){for(const oe of X)y.value[oe.value]=oe.name}function I(X,oe){const fe=oe.toLowerCase();return X.name.toLowerCase().includes(fe)||X.value.toLowerCase().includes(fe)}const V=a.computed(()=>{if(A.value)return[];let X=v.value;return!g&&C.value&&(X=X.filter(oe=>I(oe,C.value))),p.value>0&&X.length>p.value?X.slice(0,p.value):X}),j=a.computed(()=>f.value>0&&H.value.length>=f.value),F=a.computed(()=>U.value&&!E.value&&!A.value&&!V.value.length&&(!g||O.value));async function M(X){const oe=++N;E.value=!0;try{const{data:fe}=await et.get(_,g?{params:{search:X}}:void 0);if(oe!==N)return;const J=zi(Array.isArray(fe)?fe:[]);R(J),h.value=J,g||($.value=!0),O.value=!0}catch{if(oe!==N)return;h.value=[],O.value=!0}finally{oe===N&&(E.value=!1)}}const Y=Mp(X=>{M(X)},300);a.watch(C,X=>{if(b){if(g){if(Y.cancel(),N+=1,h.value=[],!X||A.value){E.value=!1,O.value=!1;return}E.value=!0,O.value=!1,Y(X);return}A.value||$.value||Y(X)}}),a.onBeforeUnmount(()=>Y.cancel());function W(X){const oe=v.value.find(fe=>fe.value===X);if(oe&&(y.value[X]=oe.name),!m.value)H.value=H.value[0]===X?[]:[X];else{const fe=H.value.indexOf(X);fe>=0?H.value.splice(fe,1):j.value||H.value.push(X)}n.closeOnSelect&&(U.value=!1,C.value="")}function K(X){const oe=H.value.indexOf(X);oe>=0&&H.value.splice(oe,1)}const te=X=>y.value[X]??v.value.find(oe=>oe.value===X)?.name??X;return(X,oe)=>(a.openBlock(),a.createElementBlock("div",aD,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.createElementVNode("div",{class:"fb-ms",onFocusout:oe[2]||(oe[2]=(...fe)=>a.unref(c)&&a.unref(c)(...fe))},[a.createElementVNode("button",{type:"button",class:a.normalizeClass(["fb-input fb-ms-trigger",{"fb-invalid":a.unref(s)}]),"aria-expanded":U.value,onClick:oe[0]||(oe[0]=fe=>U.value=!U.value)},[H.value.length?(a.openBlock(),a.createElementBlock("span",dD,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(H.value,fe=>(a.openBlock(),a.createElementBlock("span",{key:fe,class:"fb-ms-chip"},[a.createTextVNode(a.toDisplayString(te(fe))+" ",1),a.createVNode(a.unref(tb),{size:13,onClick:a.withModifiers(J=>K(fe),["stop"])},null,8,["onClick"])]))),128))])):(a.openBlock(),a.createElementBlock("span",cD,a.toDisplayString(a.unref(n).placeholder||"Sélectionnez…"),1)),a.createVNode(a.unref(WR),{size:18,class:"fb-ms-caret"})],10,lD),U.value?(a.openBlock(),a.createElementBlock("div",uD,[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":oe[1]||(oe[1]=fe=>C.value=fe),class:"fb-input fb-ms-search",type:"text",placeholder:"Rechercher…"},null,512),[[a.vModelText,C.value]]),a.createElementVNode("ul",fD,[E.value?(a.openBlock(),a.createElementBlock("li",pD,"…")):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(V.value,fe=>(a.openBlock(),a.createElementBlock("li",{key:fe.value},[a.createElementVNode("label",{class:a.normalizeClass(["fb-choice",{"is-checked":H.value.includes(fe.value)}])},[a.createElementVNode("input",{type:"checkbox",checked:H.value.includes(fe.value),disabled:!H.value.includes(fe.value)&&j.value,onChange:J=>W(fe.value)},null,40,mD),a.createElementVNode("span",_D,a.toDisplayString(fe.name),1)],2)]))),128)),F.value?(a.openBlock(),a.createElementBlock("li",hD,"Aucun résultat")):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0)],32),a.unref(n).info?(a.openBlock(),a.createElementBlock("p",{key:0,class:"fb-info",innerHTML:a.unref(n).info},null,8,gD)):a.createCommentVNode("",!0),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:1,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),bD={class:"fb-field"},ED=["id","accept"],$D={key:0,class:"fb-dz-list"},SD={key:0},vD=["href"],TD=["aria-label","onClick"],wD={key:1,class:"fb-info"},kD={key:2,class:"fb-error",role:"alert"},AD=a.defineComponent({__name:"FieldMultipleFilesInOne",props:{field:{}},setup(e){const n=e.field,r=Op(n),o=n.save_to||"files",i=n.sizeMax??2560,s=n.validationLabel||n.label||o,l=a.computed(()=>Number(n.maxFiles)||0),c=ho(),d=Lr(c.locale),f=a.ref([]),u=c.form[o];Array.isArray(u)&&(f.value=u.map(C=>({url:C,name:Rp(String(C))})));const{value:p,errorMessage:m,meta:_,handleBlur:b}=Bo(`${s}_hidden_required`,n.required?{required:!0}:{},{label:s}),g=a.computed(()=>f.value.some(C=>C.uploading)),h=a.computed(()=>!!n.required&&!!m.value&&(_.touched||_.dirty||c.submitAttempted.value));a.watch(f,()=>{c.form[o]=f.value.filter(C=>C.url).map(C=>C.url),p.value=f.value.some(C=>C.url)||g.value?"has_files":""},{deep:!0,immediate:!0});const y=a.ref(!1),E=a.ref(null);function $(C){c.bus.emit("show-popup",{title:n.label||"Fichiers",message:C})}function O(C){if(!r)return!0;const A=String(r).split(",").map(I=>I.trim().toLowerCase().replace(/^\./,"")).filter(Boolean);if(!A.length)return!0;const R=C.toLowerCase().match(/\.([^.\s]+)\s*$/)?.[1];return!!R&&A.includes(R)}function N(C){return new Promise(A=>{const R=new FileReader;R.onloadend=()=>A(R.result),R.readAsDataURL(C)})}async function v(C){for(const A of Array.from(C)){if(l.value&&f.value.length>=l.value){$(d("multiple_files_max",{max:l.value}));break}if(!O(A.name)){$(`Format non accepté. Formats acceptés : ${r}`);continue}if(A.size>i*1e3){$(d("file_max_size_error"));continue}if(A.name.toLowerCase().endsWith(".heic")){$(d("file_heic_error"));continue}const R=await N(A),I={name:A.name,uploading:!0};f.value.push(I);try{I.url=c.privateUploads.value?await c.api.uploadPrivateFile(c.formId,o,A):(await et.post(`${c.server}/api/v2/submissions/upload`,{b64file:R,filename:A.name,operationId:c.operationId.value,save_to:o})).data.url,I.uploading=!1,f.value=[...f.value]}catch(V){const j=f.value.indexOf(I);j!==-1&&f.value.splice(j,1),$(d("file_upload_failed")),xn(V,{where:"FieldMultipleFilesInOne.upload",save_to:o})}}}function B(C){C.preventDefault(),y.value=!1,C.dataTransfer?.files&&v(C.dataTransfer.files)}function H(C){const A=C.target;A.files&&v(A.files),A.value="",b()}function U(C){f.value.splice(C,1)}return(C,A)=>(a.openBlock(),a.createElementBlock("div",bD,[a.createVNode(Ke,{"for-id":a.unref(o),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),a.createElementVNode("div",{class:a.normalizeClass(["fb-dropzone",{"is-drag":y.value}]),role:"button",tabindex:"0",onClick:A[0]||(A[0]=R=>E.value?.click()),onKeydown:A[1]||(A[1]=a.withKeys(R=>E.value?.click(),["enter"])),onDragover:A[2]||(A[2]=a.withModifiers(R=>y.value=!0,["prevent"])),onDragleave:A[3]||(A[3]=R=>y.value=!1),onDrop:B},[a.createVNode(a.unref(GR),{size:26}),a.createElementVNode("span",null,a.toDisplayString(a.unref(n).buttonUploadLabel||a.unref(d)("multiple_files_drop")),1),a.createElementVNode("input",{id:a.unref(o),ref_key:"inputRef",ref:E,type:"file",class:"fb-file-hidden",accept:a.unref(r),multiple:"",onChange:H},null,40,ED)],34),f.value.length?(a.openBlock(),a.createElementBlock("ul",$D,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.value,(R,I)=>(a.openBlock(),a.createElementBlock("li",{key:I,class:"fb-file-link"},[R.uploading?(a.openBlock(),a.createElementBlock("span",SD,"["+a.toDisplayString(R.name)+"] "+a.toDisplayString(a.unref(d)("multiple_file_upload_en_cours"))+"…",1)):(a.openBlock(),a.createElementBlock("a",{key:1,href:R.url,target:"_blank",rel:"noopener"},a.toDisplayString(R.name),9,vD)),a.createElementVNode("button",{type:"button",class:"fb-file-delete","aria-label":a.unref(d)("file_delete"),onClick:V=>U(I)},[a.createVNode(a.unref(xp),{size:16})],8,TD)]))),128))])):a.createCommentVNode("",!0),g.value?(a.openBlock(),a.createElementBlock("span",wD,a.toDisplayString(a.unref(d)("multiple_file_patientez")),1)):a.createCommentVNode("",!0),h.value?(a.openBlock(),a.createElementBlock("span",kD,a.toDisplayString(a.unref(m)||a.unref(d)("file_select_required")),1)):a.createCommentVNode("",!0)]))}}),ND=["innerHTML"],ID=a.defineComponent({__name:"FieldEstimateRefund",props:{field:{}},setup(e){const n=e.field,r=ho(),o=n.template||n.html||"",i=a.ref(""),s=Mp(async()=>{try{const{data:l}=await et.post(`${r.server}/api/v2/submissions/estimaterefund`,{...r.form,operationId:r.operationId.value}),c=Number(typeof l=="number"?l:l?.amount_to_refund??0),d=(c/100).toLocaleString("fr-FR",{style:"currency",currency:"EUR"});i.value=o.replace(/\{\{\s*amount_to_refund_raw\s*\}\}/g,String(c/100)).replace(/\{\{\s*amount_to_refund\s*\}\}/g,d)}catch(l){xn(l,{where:"FieldEstimateRefund"})}},500);return a.watch(()=>({...r.form}),s,{deep:!0}),a.onMounted(s),(l,c)=>(a.openBlock(),a.createElementBlock("div",{class:"fb-blochtml",innerHTML:i.value},null,8,ND))}}),CD={class:"fb-field"},xD={class:"fb-label"},OD=["innerHTML"],RD={key:0,class:"fb-required-star"},PD={class:"fb-choice-list"},MD=["name","value"],DD=["innerHTML"],LD=a.defineComponent({__name:"FieldRewardSelector",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"reward",o=`${r}-error`,{model:i,showError:s,errorMessage:l,handleBlur:c,ctx:d}=Rt(n),f=a.computed(()=>zi(n.options)),u=a.ref({}),p=Mp(async()=>{try{const{data:_}=await et.post(`${d.server}/api/v2/submissions/estimaterefund`,{...d.form,operationId:d.operationId.value}),g=(Number(_?.amount_to_refund??0)/100).toLocaleString("fr-FR",{style:"currency",currency:"EUR"}),h={};for(const y of f.value)h[y.value]=y.name.replace(/\{\{\s*amount_to_refund\s*\}\}/g,g);u.value=h}catch(_){xn(_,{where:"FieldRewardSelector"})}},500);a.watch(()=>({...d.form}),p,{deep:!0}),a.onMounted(p);const m=(_,b)=>u.value[_]??b;return(_,b)=>(a.openBlock(),a.createElementBlock("fieldset",CD,[a.createElementVNode("legend",xD,[a.createElementVNode("span",{innerHTML:a.unref(n).label},null,8,OD),a.unref(n).required?(a.openBlock(),a.createElementBlock("span",RD,"*")):a.createCommentVNode("",!0)]),a.createElementVNode("div",PD,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.value,g=>(a.openBlock(),a.createElementBlock("label",{key:g.value,class:a.normalizeClass(["fb-choice",{"is-checked":a.unref(i)===g.value}])},[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":b[0]||(b[0]=h=>a.isRef(i)?i.value=h:null),type:"radio",name:a.unref(r),value:g.value,onBlur:b[1]||(b[1]=(...h)=>a.unref(c)&&a.unref(c)(...h))},null,40,MD),[[a.vModelRadio,a.unref(i)]]),a.createElementVNode("span",{class:"fb-choice-label",innerHTML:m(g.value,g.name)},null,8,DD)],2))),128))]),a.unref(s)?(a.openBlock(),a.createElementBlock("span",{key:0,id:o,class:"fb-error",role:"alert"},a.toDisplayString(a.unref(l)),1)):a.createCommentVNode("",!0)]))}}),FD={class:"fb-field"},BD={class:"fb-pp-num"},UD={class:"fb-field"},VD=["id","onUpdate:modelValue"],jD=["value"],zD=["id","onUpdate:modelValue"],qD={key:0,class:"fb-field"},HD=["onUpdate:modelValue"],WD={key:1,class:"fb-field"},GD=["onUpdate:modelValue"],YD={key:2,class:"fb-field"},KD=["onUpdate:modelValue"],XD={key:3,class:"fb-field"},JD=["onUpdate:modelValue"],ZD=["onClick"],QD={key:1,class:"fb-error",role:"alert"},Dp={Input:fO,Checkbox:gO,Radio:kO,Civilite:FO,Select:WO,InputNumber:XO,Textarea:eR,DateInput:oR,BlocHTML:Zy,BlocHTMLsimple:Zy,Iban:oP,File:hP,SecuriteSociale:$P,Devise:TP,EAN:IP,Phone:jP,Adresse:dM,MultipleFiles:TM,MultiCheckbox:RM,Recap:FM,CustomerExpMetric:zM,Datalist:XM,IbanUK:sD,MultiSelect:yD,MultipleFilesInOne:AD,EstimateRefund:ID,RewardSelector:LD,PrixProduits:a.defineComponent({__name:"FieldPrixProduits",props:{field:{}},setup(e){const n=e.field,r=n.save_to||"prix_produits",o=n.configuration||{},{model:i,showError:s,errorMessage:l,ctx:c}=Rt(n,o.displayQuantite?{prix_produits_quantity:!0}:{}),d=Lr(c.locale),f=a.computed(()=>zi(n.options)),u=a.computed(()=>f.value.length>0),p=a.computed(()=>Number(o.minProducts)||1),m=a.computed(()=>Number(o.maxProducts)||0),_=Array.isArray(i.value)&&i.value.length?i.value:Array.from({length:p.value},()=>({})),b=a.reactive(_.map(y=>({...y})));a.watch(b,()=>{i.value=b.filter(y=>y.produit||y.price||y.quantity||y.imei).map(y=>({...y,price:y.price||0}))},{deep:!0});function g(){(!m.value||b.length<m.value)&&b.push({})}function h(y){b.length>p.value&&b.splice(y,1)}return(y,E)=>(a.openBlock(),a.createElementBlock("div",FD,[a.createVNode(Ke,{"for-id":a.unref(r),label:a.unref(n).label,required:a.unref(n).required},null,8,["for-id","label","required"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b,($,O)=>(a.openBlock(),a.createElementBlock("div",{key:O,class:"fb-pp-line"},[a.createElementVNode("span",BD,a.toDisplayString(a.unref(o).labelProductLine||a.unref(d)("prix_produit_produit"))+" "+a.toDisplayString(O+1),1),a.createElementVNode("div",UD,[a.createVNode(Ke,{"for-id":`${a.unref(r)}-ref-${O}`,label:a.unref(o).labelRef||a.unref(d)("prix_produit_reference")},null,8,["for-id","label"]),u.value?a.withDirectives((a.openBlock(),a.createElementBlock("select",{key:0,id:`${a.unref(r)}-ref-${O}`,"onUpdate:modelValue":N=>$.produit=N,class:"fb-select"},[E[0]||(E[0]=a.createElementVNode("option",{value:""},"—",-1)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.value,N=>(a.openBlock(),a.createElementBlock("option",{key:N.value,value:N.value},a.toDisplayString(N.name),9,jD))),128))],8,VD)),[[a.vModelSelect,$.produit]]):a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:1,id:`${a.unref(r)}-ref-${O}`,"onUpdate:modelValue":N=>$.produit=N,class:"fb-input",type:"text"},null,8,zD)),[[a.vModelText,$.produit]])]),a.unref(o).displayDescription?(a.openBlock(),a.createElementBlock("div",qD,[a.createVNode(Ke,{label:a.unref(o).labelDescription||a.unref(d)("prix_produit_description")},null,8,["label"]),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":N=>$.description=N,class:"fb-input",type:"text"},null,8,HD),[[a.vModelText,$.description]])])):a.createCommentVNode("",!0),a.unref(o).displayQuantite?(a.openBlock(),a.createElementBlock("div",WD,[a.createVNode(Ke,{label:a.unref(o).labelQuantite||a.unref(d)("prix_produit_quantite"),required:!!$.produit},null,8,["label","required"]),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":N=>$.quantity=N,class:"fb-input",type:"number",min:"1",step:"1"},null,8,GD),[[a.vModelText,$.quantity,void 0,{number:!0}]])])):a.createCommentVNode("",!0),a.unref(o).displayPrix?(a.openBlock(),a.createElementBlock("div",YD,[a.createVNode(Ke,{label:a.unref(o).labelPrix||a.unref(d)("prix_produit_prix")},null,8,["label"]),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":N=>$.price=N,class:"fb-input",type:"number",step:"0.01",min:"0"},null,8,KD),[[a.vModelText,$.price,void 0,{number:!0}]])])):a.createCommentVNode("",!0),a.unref(o).displayImei?(a.openBlock(),a.createElementBlock("div",XD,[a.createVNode(Ke,{label:a.unref(o).labelImei||a.unref(d)("prix_produit_imei")},null,8,["label"]),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":N=>$.imei=N,class:"fb-input",type:"text"},null,8,JD),[[a.vModelText,$.imei]])])):a.createCommentVNode("",!0),b.length>p.value?(a.openBlock(),a.createElementBlock("button",{key:4,type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:N=>h(O)},[a.createVNode(a.unref(xp),{size:16}),a.createTextVNode(" "+a.toDisplayString(a.unref(o).labelMoins||a.unref(d)("prix_produit_remove")),1)],8,ZD)):a.createCommentVNode("",!0)]))),128)),!m.value||b.length<m.value?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"fb-button fb-button--ghost fb-mf-btn",onClick:g},[a.createVNode(a.unref(Qy),{size:16}),a.createTextVNode(" "+a.toDisplayString(a.unref(o).labelPlus||a.unref(d)("prix_produit_add")),1)])):a.createCommentVNode("",!0),a.unref(s)?(a.openBlock(),a.createElementBlock("span",QD,a.toDisplayString(a.unref(l)),1)):a.createCommentVNode("",!0)]))}})},eL={key:0,class:"fb-popup-title"},tL=["innerHTML"],nL={class:"fb-popup-actions"},rL=a.defineComponent({__name:"FormPopup",props:{bus:{}},setup(e){const t=e,n=a.ref(!1),r=a.ref(""),o=a.ref(""),i=a.ref("OK"),s=a.ref(!0);function l(p){typeof p=="string"?(r.value=yo(p),o.value="",i.value="OK",s.value=!0):(r.value=yo(p.message||""),o.value=p.title||"",i.value=p.buttonText||"OK",s.value=p.closeOnOverlay!==!1),n.value=!0,document.body.style.overflow="hidden"}function c(){n.value=!1,document.body.style.overflow=""}function d(){s.value&&c()}function f(p){p.key==="Escape"&&n.value&&c()}let u;return a.onMounted(()=>{u=t.bus.on("show-popup",l),document.addEventListener("keydown",f)}),a.onBeforeUnmount(()=>{u?.(),document.removeEventListener("keydown",f),document.body.style.overflow=""}),(p,m)=>(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[n.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"fb-form fb-popup-overlay",role:"dialog","aria-modal":"true",onClick:d},[a.createElementVNode("div",{class:"fb-popup",onClick:m[0]||(m[0]=a.withModifiers(()=>{},["stop"]))},[o.value?(a.openBlock(),a.createElementBlock("h3",eL,a.toDisplayString(o.value),1)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"fb-popup-body",innerHTML:r.value},null,8,tL),a.createElementVNode("div",nL,[a.createElementVNode("button",{type:"button",class:"fb-button fb-button--primary",onClick:c},a.toDisplayString(i.value),1)])])])):a.createCommentVNode("",!0)]))}}),oL=["type","disabled"],iL={key:0,class:"fb-spinner","aria-hidden":"true"},sL=a.defineComponent({__name:"LoadingButton",props:{loading:{type:Boolean,default:!1},type:{default:"button"},variant:{default:"primary"},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(a.openBlock(),a.createElementBlock("button",{type:e.type,class:a.normalizeClass(["fb-button",e.variant==="ghost"?"fb-button--ghost":"fb-button--primary"]),disabled:e.disabled||e.loading},[e.loading?(a.openBlock(),a.createElementBlock("span",iL)):a.createCommentVNode("",!0),a.renderSlot(t.$slots,"default")],10,oL))}}),aL={class:"fb-form"},lL={key:0,class:"fb-error-update"},cL={key:0,class:"fb-progress","aria-hidden":"true"},dL={key:1,class:"fb-step-counter"},uL=["innerHTML"],fL={key:3,class:"fb-step-counter"},pL={key:4,class:"fb-mention"},mL={class:"fb-rgpd-wrap"},_L=["innerHTML"],hL={class:"fb-buttons"},gL=["textContent"],yL=["textContent"],rb=a.defineComponent({__name:"HoustonForm",props:{server:{},formId:{},submissionId:{default:void 0},displayCurrentStep:{type:Boolean,default:!1},multiColumn:{type:Boolean,default:!1},stepMessage:{default:"Étape "},relay:{default:void 0},testmode:{default:void 0},uid:{default:void 0},hideError:{type:Boolean,default:!1},hideSteps:{type:Boolean,default:!1},rgpdMentions:{default:void 0}},emits:["results","on_error","form_submit_loading","upload_progress","step-up","step-down","too-early","too-late"],setup(e,{emit:t}){ky();const n=e,r=t,o=new kT(n.server),i=new AT,s=a.reactive({}),l=a.ref([]),c=a.ref(0),d=a.ref({}),f=a.ref({}),u=a.ref(!1),p=a.ref("fr"),m=a.ref(""),_=a.ref(""),b=a.ref(void 0),g=a.ref(!1),h=a.reactive({});let y;const E=()=>y?.abandon(c.value),$=Lr(p),{validate:O}=yv(),N=a.computed(()=>c.value===l.value.length-1),v=a.computed(()=>!!n.testmode?.previewDossier&&!n.submissionId);function B(T){const k=new Set,q=/participationValide\s*===?\s*["']([A-Za-z0-9_]+)["']/g;for(const ee of T)for(const le of ee.fields||[]){const ce=String(le.displayIf??"");let ot;for(;ot=q.exec(ce);)k.add(ot[1])}return[...k]}function H(T){const k=T.toLowerCase();return/(amount|montant|prix|refund|rembours|reward|estimate)/.test(k)?3500:/^_?id$|code|uid|numero|num_/.test(k)?"APERÇU":/first_?name|prenom/.test(k)?"Prénom":/last_?name|nom/.test(k)?"Nom":/mail/.test(k)?"apercu@exemple.fr":/phone|tel|mobile/.test(k)?"0600000000":"…"}function U(T,k){const q={participationValide:k},ee=/\{\{\s*this\.form\.(\w+)\s*\}\}/g;for(const le of T)for(const ce of le.fields||[]){const ot=String(ce.html??"");let Qe;for(;Qe=ee.exec(ot);)Qe[1]in q||(q[Qe[1]]=H(Qe[1]))}return q}const C=a.computed(()=>{const T=l.value.flatMap(q=>q.fields||[]).find(q=>q.save_to==="email"||q.type==="email"||q.name==="email"),k=T?.save_to?s[T.save_to]:void 0;return typeof k=="string"&&k.trim()?k.trim():""}),A=a.computed(()=>d.value.custom?.notice_uri||"");function R(T){return T?T.replace(/<br\s*\/?>/gi,"").replace(/ /g," ").replace(/<[^>]+>/g,"").trim()==="":!0}function I(T){return T.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function V(T,k){const q=T.custom?.notice_uri;return!R(T.custom?.notice)||!q?`<a id="noticelink">${k}</a>`:`<a id="noticelink" href="${q}" target="_blank" rel="noopener">${k}</a>`}const j=a.computed(()=>f.value.precedent&&f.value.precedent.length>0?f.value.precedent:$("precedent")),F=a.computed(()=>N.value||n.multiColumn?f.value.valider&&f.value.valider.length>0?f.value.valider:$("valider"):f.value.suivant&&f.value.suivant.length>0?f.value.suivant:$("suivant")),M=a.computed(()=>f.value.hasSpinner||f.value.hasSpinner===void 0),Y=a.computed(()=>F1(f.value.displayIf,s)),W={server:n.server,api:o,formId:n.formId,operationId:m,form:s,locale:p,testmode:a.ref(n.testmode||{}),submitAttempted:g,googleMapsApiKey:_,phoneVerificationEmail:C,privateUploads:a.computed(()=>d.value.privateUploads===!0),bus:i};tO(W);function K(T){return F1(T.displayIf,s)}a.onMounted(async()=>{try{const T=await o.getForm(n.formId),{operation:k,formulaire:q}=T;if(d.value=k,m.value=k._id||"",n.relay)for(const ce in n.relay)s[ce]=n.relay[ce];const ee=q.form||[];if(q.type==="UPDATE")if(v.value){const ce=B(ee);n.testmode&&(n.testmode.statusOptions=ce);const ot=n.testmode?.previewStatus||ce[0]||"";n.testmode&&!n.testmode.previewStatus&&(n.testmode.previewStatus=ot),Object.assign(s,U(ee,ot))}else await te();else q.type==="LINE_ITEM"?s._id=n.submissionId:(y=UT(o.server,n.formId,!!n.testmode?.active),window.addEventListener("pagehide",E));_.value=k.gmapkey||"",(T.lang||q.lang||k.lang)!=="fr"&&(p.value=q.lang||k.lang||"fr",eO($y(p.value))),f.value=q.bouton_text||{},l.value=jR(q.form||[]),n.testmode&&(n.testmode.stepCount=l.value.length,n.testmode.currentStep=c.value);const le=new Date;k.from&&le<new Date(k.from)?r("too-early",k.from):k.to&&le>new Date(k.to)&&r("too-late",k.to),ao("form_view",{form_id:n.formId,operation_id:m.value,step:c.value+1,total_steps:l.value.length})}catch(T){console.error("error while loading form data:",T),da(T,{phase:"load",formId:n.formId}),b.value="Impossible de charger le formulaire."}}),a.onBeforeUnmount(()=>{E(),window.removeEventListener("pagehide",E)});async function te(){if(!n.submissionId){b.value="No submission id";return}try{const T=await o.getSubmission(n.submissionId,n.uid);Object.assign(s,T)}catch{b.value=`Submission ${n.submissionId} not found or bad uid`}}function X(){let T=l.value[c.value]?.fields.find(k=>k.component==="Adresse");return n.multiColumn&&!T&&l.value[1]&&(T=l.value[1].fields.find(k=>k.component==="Adresse")),T}function oe(T=!1){const k=X();if(!k||!k.required||!K(k))return!0;const q=k.save_to?s[k.save_to]:void 0;return q&&typeof q=="object"&&q.address?!0:(T||(Ii("Alert","merci_renseigner_adresse"),i.emit("show-popup",{title:k.label||"Adresse",message:$("merci_renseigner_adresse")})),!1)}function fe(T){if(T?.save_to){if(!T.verified){delete h[T.save_to];return}h[T.save_to]={token:T.token,phone:T.phone}}}function J(){return(N.value||n.multiColumn?l.value:[l.value[c.value]]).flatMap(k=>k?.fields||[]).find(k=>{if(k.component!=="Phone"||!k.phoneVerificationSms||!K(k))return!1;const q=k.save_to?s[k.save_to]:void 0;if(!q)return!1;const ee=k.save_to?h[k.save_to]:void 0;return!ee||ee.phone!==q})}function ae(T=!1){const k=J();return k?(T||i.emit("show-popup",{title:"Erreur",message:`Veuillez valider le champ ${cc(k.validationLabel||k.label||"Téléphone")}.`}),!1):!0}function ye(){oe()&&(g.value=!1,y?.stepDone(c.value),c.value++,Ii("Step",`step_${c.value}`),ao("form_step_change",{form_id:n.formId,operation_id:m.value,step:c.value+1,total_steps:l.value.length,direction:"forward"}),r("step-up",c.value))}function $e(){g.value=!1,c.value--,ao("form_step_change",{form_id:n.formId,operation_id:m.value,step:c.value+1,total_steps:l.value.length,direction:"backward"}),r("step-down",c.value)}function Ie(){return!!l.value[c.value]?.fields?.some(T=>T.required===!0&&K(T))}async function je(){g.value=!0;const T=oe(!0),k=ae(!0),{valid:q,errors:ee}=await O();q&&T&&k?!N.value&&!n.multiColumn?ye():await we():Fe(ee,T)}async function we(){if(d.value?.date_fin_regule&&new Date>new Date(d.value.date_fin_regule)){i.emit("show-popup",{title:$("error_title"),message:$("date_fin_regule_passee")||"La date limite de régularisation est dépassée. Le formulaire ne peut plus être soumis."}),Ii("Alert","date_fin_regule_passee"),y?.failed("date_limit"),ao("form_submit_error",{form_id:n.formId,operation_id:m.value,error_message:"date_fin_regule_passee",error_type:"date_limit_exceeded"});return}if(!u.value){u.value=!0,r("form_submit_loading",!0),Ii("Submit",n.formId),ao("form_submit",{form_id:n.formId,operation_id:m.value,step:c.value+1,total_steps:l.value.length});try{const T={...JSON.parse(JSON.stringify(s)),url:window.location.href,userAgent:window.navigator.userAgent,windowInnerResolution:`${window.innerWidth}x${window.innerHeight}`,fingerprint:OT(),testmode:n.testmode?{active:n.testmode.active,disableunique:n.testmode.disableunique,status:n.testmode.status,lot:n.testmode.lot}:void 0,_phoneVerificationTokens:{...h}},k=await o.submit(n.formId,T,q=>r("upload_progress",q));u.value=!1,r("form_submit_loading",!1),y?.submitted(c.value),r("results",k),ao("form_submit_success",{form_id:n.formId,operation_id:m.value,submission_id:k._id||k.id,lot:k.lot||"PERD"}),Ii("Success",n.formId)}catch(T){u.value=!1,r("form_submit_loading",!1),c.value=0,Le(T)}}}function Le(T){da(T,{phase:"submit",formId:n.formId});const k=T.response,q=k?.data;let ee=$("error_generic"),le=!1;q?.message?ee=String(q.message):q?.error?(Array.isArray(q.error)?q.error:[q.error]).includes("Email domain not allowed")&&(le=!0,ee=$("email_domain_not_allowed")):T.message&&(ee=String(T.message));const ce=k?k.status>=500?"server_error":le?"email_domain":q?.codecheckErrors?"invalid_codes":"rejected":"network";y?.failed(ce),ao("form_submit_error",{form_id:n.formId,operation_id:m.value,error_message:ee,error_type:"submission_error"}),!n.hideError&&!le&&i.emit("show-popup",{message:ee,title:$("error_title")}),r("on_error",k?.data??T??"Erreur inconnue")}function Fe(T,k){const q=[],ee=[];for(const Qe of Object.keys(T)){const Ue=Qe.replace(/_hidden_required$/,"");let G=Ue,re=Ue;for(const ze of l.value){const L=ze.fields.find(z=>z.save_to===Qe||z.save_to===Ue||z.validationLabel===Qe||z.validationLabel===Ue||z.label===Qe||z.label===Ue);if(L?.save_to&&(re=L.save_to),L?.label){G=L.label;break}}q.push(cc(G)),ee.push(re)}if(!k){const Qe=X();Qe?.label&&q.push(cc(Qe.label)),Qe?.save_to&&ee.push(Qe.save_to)}const le=J();le&&(q.push(cc(le.validationLabel||le.label||"Téléphone")),le.save_to&&ee.push(le.save_to)),y?.errors(ee);const ce=[...new Set(q)].filter(Qe=>Qe.trim()!==""),ot=ce.length>0?`${$("Corrigez les erreurs")}<br><br><strong>${$("Champs concernés :")}</strong><ul><li>${ce.join("</li><li>")}</li></ul>`:$("Corrigez les erreurs");i.emit("show-popup",{title:$("Erreurs de validation"),message:ot}),ao("form_validation_error",{form_id:n.formId,operation_id:m.value,step:c.value+1,error_type:"validation_error"}),Ii("Alert","corrigez_les_erreurs")}const Ye=T=>Dp[T]??null;function ke(T){const k=T.save_to?s[T.save_to]:void 0;return k!==void 0&&k!==""}const Ze=a.computed(()=>{const T=$("noticetextlink"),k=V(d.value,T),q=n.rgpdMentions||d.value.custom?.rgpd_mentions;if(q&&q!=="<div><br></div>")return yo(q.replace("[notice]",k));const ee=I(String(d.value.dataManager||"Promodev")),ce=$("rgpd",{link:A.value}).replace(/<a\b[^>]*id=['"]noticelink['"][^>]*>[\s\S]*?<\/a>/i,k);return yo(`${ee} ${ce}`)});a.watch(c,T=>{n.testmode&&(n.testmode.currentStep=T)}),a.watch(()=>n.testmode?.gotoStep,T=>{typeof T=="number"&&T>=0&&T<l.value.length&&(T!==c.value&&(g.value=!1,c.value=T),n.testmode&&(n.testmode.gotoStep=null))}),a.watch(()=>n.testmode?.previewStatus,T=>{v.value&&typeof T=="string"&&(s.participationValide=T)});const w=a.shallowRef(Dp);return a.watch(()=>Dp,T=>w.value=T),(T,k)=>(a.openBlock(),a.createElementBlock("div",aL,[b.value?(a.openBlock(),a.createElementBlock("div",lL,a.toDisplayString(b.value),1)):l.value.length>0?(a.openBlock(),a.createElementBlock("form",{key:1,novalidate:"",onFocusin:k[1]||(k[1]=q=>a.unref(y)?.start()),onSubmit:a.withModifiers(je,["prevent"])},[!e.hideSteps&&l.value.length>1&&!e.multiColumn?(a.openBlock(),a.createElementBlock("div",cL,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.value,(q,ee)=>(a.openBlock(),a.createElementBlock("span",{key:ee,class:a.normalizeClass(["fb-progress-step",{"is-done":ee<c.value,"is-current":ee===c.value}])},null,2))),128))])):a.createCommentVNode("",!0),!e.hideSteps&&e.displayCurrentStep&&l.value[c.value].name?(a.openBlock(),a.createElementBlock("p",dL,a.toDisplayString(c.value+1)+"/"+a.toDisplayString(l.value.length),1)):a.createCommentVNode("",!0),!e.hideSteps&&l.value[c.value].name?(a.openBlock(),a.createElementBlock("h2",{key:2,class:"fb-step-title",innerHTML:l.value[c.value].name},null,8,uL)):!e.hideSteps&&l.value.length>1?(a.openBlock(),a.createElementBlock("p",fL,a.toDisplayString(e.stepMessage)+a.toDisplayString(c.value+1)+"/"+a.toDisplayString(l.value.length),1)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.value,(q,ee)=>a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:ee,class:a.normalizeClass(["fb-step",`fb-step-${ee}`])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(q.fields,(le,ce)=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:ce},[(ee===c.value||e.multiColumn)&&K(le)&&le.component!=="ApiField"&&Ye(le.component)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(Ye(le.component)),{key:0,field:le,class:a.normalizeClass([{filled:ke(le)},"fb-field-wrapper","fb-field--"+le.save_to]),onPhoneVerification:fe},null,40,["field","class"])):a.createCommentVNode("",!0)],64))),128))],2)),[[a.vShow,ee===c.value||e.multiColumn]])),128)),Ie()?(a.openBlock(),a.createElementBlock("p",pL," * "+a.toDisplayString(a.unref($)("champ_obligatoire")),1)):a.createCommentVNode("",!0),a.createElementVNode("div",mL,[a.createElementVNode("p",{class:"fb-rgpd","data-gab-path":"content.gdpr.mentions",innerHTML:Ze.value},null,8,_L)]),a.createElementVNode("div",hL,[c.value>0?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"fb-button fb-button--ghost",onClick:k[0]||(k[0]=q=>$e()),textContent:a.toDisplayString(j.value)},null,8,gL)):a.createCommentVNode("",!0),Y.value&&M.value?(a.openBlock(),a.createBlock(sL,{key:1,loading:u.value,type:"submit",variant:"primary"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(F.value),1)]),_:1},8,["loading"])):Y.value?(a.openBlock(),a.createElementBlock("button",{key:2,type:"submit",class:"fb-button fb-button--primary",textContent:a.toDisplayString(F.value)},null,8,yL)):a.createCommentVNode("",!0)])],32)):a.createCommentVNode("",!0),a.createVNode(rL,{bus:a.unref(i)},null,8,["bus"])]))}}),ob={install(e,t={}){ky(),e.use(gt),e.component("HoustonForm",rb),t.sentry?.dsn&&Promise.resolve().then(()=>NT).then(n=>n.initSentry(e,t.sentry))}};var bL=Object.create,ib=Object.defineProperty,EL=Object.getOwnPropertyDescriptor,Lp=Object.getOwnPropertyNames,$L=Object.getPrototypeOf,SL=Object.prototype.hasOwnProperty,vL=(e,t)=>function(){return e&&(t=(0,e[Lp(e)[0]])(e=0)),t},TL=(e,t)=>function(){return t||(0,e[Lp(e)[0]])((t={exports:{}}).exports,t),t.exports},wL=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Lp(t))!SL.call(e,o)&&o!==n&&ib(e,o,{get:()=>t[o],enumerable:!(r=EL(t,o))||r.enumerable});return e},kL=(e,t,n)=>(n=e!=null?bL($L(e)):{},wL(ib(n,"default",{value:e,enumerable:!0}),e)),xa=vL({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),AL=TL({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){xa(),t.exports=r;function n(i){return i instanceof Buffer?Buffer.from(i):new i.constructor(i.buffer.slice(),i.byteOffset,i.length)}function r(i){if(i=i||{},i.circles)return o(i);const s=new Map;if(s.set(Date,u=>new Date(u)),s.set(Map,(u,p)=>new Map(c(Array.from(u),p))),s.set(Set,(u,p)=>new Set(c(Array.from(u),p))),i.constructorHandlers)for(const u of i.constructorHandlers)s.set(u[0],u[1]);let l=null;return i.proto?f:d;function c(u,p){const m=Object.keys(u),_=new Array(m.length);for(let b=0;b<m.length;b++){const g=m[b],h=u[g];typeof h!="object"||h===null?_[g]=h:h.constructor!==Object&&(l=s.get(h.constructor))?_[g]=l(h,p):ArrayBuffer.isView(h)?_[g]=n(h):_[g]=p(h)}return _}function d(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return c(u,d);if(u.constructor!==Object&&(l=s.get(u.constructor)))return l(u,d);const p={};for(const m in u){if(Object.hasOwnProperty.call(u,m)===!1)continue;const _=u[m];typeof _!="object"||_===null?p[m]=_:_.constructor!==Object&&(l=s.get(_.constructor))?p[m]=l(_,d):ArrayBuffer.isView(_)?p[m]=n(_):p[m]=d(_)}return p}function f(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return c(u,f);if(u.constructor!==Object&&(l=s.get(u.constructor)))return l(u,f);const p={};for(const m in u){const _=u[m];typeof _!="object"||_===null?p[m]=_:_.constructor!==Object&&(l=s.get(_.constructor))?p[m]=l(_,f):ArrayBuffer.isView(_)?p[m]=n(_):p[m]=f(_)}return p}}function o(i){const s=[],l=[],c=new Map;if(c.set(Date,m=>new Date(m)),c.set(Map,(m,_)=>new Map(f(Array.from(m),_))),c.set(Set,(m,_)=>new Set(f(Array.from(m),_))),i.constructorHandlers)for(const m of i.constructorHandlers)c.set(m[0],m[1]);let d=null;return i.proto?p:u;function f(m,_){const b=Object.keys(m),g=new Array(b.length);for(let h=0;h<b.length;h++){const y=b[h],E=m[y];if(typeof E!="object"||E===null)g[y]=E;else if(E.constructor!==Object&&(d=c.get(E.constructor)))g[y]=d(E,_);else if(ArrayBuffer.isView(E))g[y]=n(E);else{const $=s.indexOf(E);$!==-1?g[y]=l[$]:g[y]=_(E)}}return g}function u(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return f(m,u);if(m.constructor!==Object&&(d=c.get(m.constructor)))return d(m,u);const _={};s.push(m),l.push(_);for(const b in m){if(Object.hasOwnProperty.call(m,b)===!1)continue;const g=m[b];if(typeof g!="object"||g===null)_[b]=g;else if(g.constructor!==Object&&(d=c.get(g.constructor)))_[b]=d(g,u);else if(ArrayBuffer.isView(g))_[b]=n(g);else{const h=s.indexOf(g);h!==-1?_[b]=l[h]:_[b]=u(g)}}return s.pop(),l.pop(),_}function p(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return f(m,p);if(m.constructor!==Object&&(d=c.get(m.constructor)))return d(m,p);const _={};s.push(m),l.push(_);for(const b in m){const g=m[b];if(typeof g!="object"||g===null)_[b]=g;else if(g.constructor!==Object&&(d=c.get(g.constructor)))_[b]=d(g,p);else if(ArrayBuffer.isView(g))_[b]=n(g);else{const h=s.indexOf(g);h!==-1?_[b]=l[h]:_[b]=p(g)}}return s.pop(),l.pop(),_}}}});xa(),xa(),xa();var sb=typeof navigator<"u",ge=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof ge.chrome<"u"&&ge.chrome.devtools,sb&&(ge.self,ge.top);var ab;typeof navigator<"u"&&((ab=navigator.userAgent)==null||ab.toLowerCase().includes("electron")),xa();var NL=kL(AL()),IL=/(?:^|[-_/])(\w)/g;function CL(e,t){return t?t.toUpperCase():""}function xL(e){return e&&`${e}`.replace(IL,CL)}function OL(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const r=n.lastIndexOf("/"),o=n.substring(r+1);{const i=o.lastIndexOf(t);return o.substring(0,i)}}var RL=/^https?:\/\//;function PL(e){return e.startsWith("/")||RL.test(e)}var lb=(0,NL.default)({circles:!0});const ML={trailing:!0};function qi(e,t=25,n={}){if(n={...ML,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let r,o,i=[],s,l;const c=(d,f)=>(s=DL(e,d,f),s.finally(()=>{if(s=null,n.trailing&&l&&!o){const u=c(d,l);return l=null,u}}),s);return function(...d){return s?(n.trailing&&(l=d),s):new Promise(f=>{const u=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const p=n.leading?r:c(this,d);for(const m of i)m(p);i=[]},t),u?(r=c(this,d),f(r)):i.push(f)})}}async function DL(e,t,n){return await e.apply(t,n)}function Fp(e,t={},n){for(const r in e){const o=e[r],i=n?`${n}:${r}`:r;typeof o=="object"&&o!==null?Fp(o,t,i):typeof o=="function"&&(t[i]=o)}return t}const LL={run:e=>e()},FL=()=>LL,cb=typeof console.createTask<"u"?console.createTask:FL;function BL(e,t){const n=t.shift(),r=cb(n);return e.reduce((o,i)=>o.then(()=>r.run(()=>i(...t))),Promise.resolve())}function UL(e,t){const n=t.shift(),r=cb(n);return Promise.all(e.map(o=>r.run(()=>o(...t))))}function Bp(e,t){for(const n of[...e])n(t)}class VL{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const o=t;let i;for(;this._deprecatedHooks[t];)i=this._deprecatedHooks[t],t=i.to;if(i&&!r.allowDeprecated){let s=i.message;s||(s=`${o} hook has been deprecated`+(i.to?`, please use ${i.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(s)||(console.warn(s),this._deprecatedMessages.add(s))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,o=(...i)=>(typeof r=="function"&&r(),r=void 0,o=void 0,n(...i));return r=this.hook(t,o),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const o of r)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=Fp(t),r=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{for(const o of r.splice(0,r.length))o()}}removeHooks(t){const n=Fp(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(BL,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(UL,t,...n)}callHookWith(t,n,...r){const o=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&Bp(this._before,o);const i=t(n in this._hooks?[...this._hooks[n]]:[],r);return i instanceof Promise?i.finally(()=>{this._after&&o&&Bp(this._after,o)}):(this._after&&o&&Bp(this._after,o),i)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function db(){return new VL}var jL=Object.create,ub=Object.defineProperty,zL=Object.getOwnPropertyDescriptor,Up=Object.getOwnPropertyNames,qL=Object.getPrototypeOf,HL=Object.prototype.hasOwnProperty,WL=(e,t)=>function(){return e&&(t=(0,e[Up(e)[0]])(e=0)),t},fb=(e,t)=>function(){return t||(0,e[Up(e)[0]])((t={exports:{}}).exports,t),t.exports},GL=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Up(t))!HL.call(e,o)&&o!==n&&ub(e,o,{get:()=>t[o],enumerable:!(r=zL(t,o))||r.enumerable});return e},YL=(e,t,n)=>(n=e!=null?jL(qL(e)):{},GL(ub(n,"default",{value:e,enumerable:!0}),e)),se=WL({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),KL=fb({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){se(),(function(n){var r={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},o=["်","ް"],i={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},s={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},l={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},c=[";","?",":","@","&","=","+","$",",","/"].join(""),d=[";","?",":","@","&","=","+","$",","].join(""),f=[".","!","~","*","'","(",")"].join(""),u=function(g,h){var y="-",E="",$="",O=!0,N={},v,B,H,U,C,A,R,I,V,j,F,M,Y,W,K="";if(typeof g!="string")return"";if(typeof h=="string"&&(y=h),R=l.en,I=s.en,typeof h=="object"){v=h.maintainCase||!1,N=h.custom&&typeof h.custom=="object"?h.custom:N,H=+h.truncate>1&&h.truncate||!1,U=h.uric||!1,C=h.uricNoSlash||!1,A=h.mark||!1,O=!(h.symbols===!1||h.lang===!1),y=h.separator||y,U&&(K+=c),C&&(K+=d),A&&(K+=f),R=h.lang&&l[h.lang]&&O?l[h.lang]:O?l.en:{},I=h.lang&&s[h.lang]?s[h.lang]:h.lang===!1||h.lang===!0?{}:s.en,h.titleCase&&typeof h.titleCase.length=="number"&&Array.prototype.toString.call(h.titleCase)?(h.titleCase.forEach(function(te){N[te+""]=te+""}),B=!0):B=!!h.titleCase,h.custom&&typeof h.custom.length=="number"&&Array.prototype.toString.call(h.custom)&&h.custom.forEach(function(te){N[te+""]=te+""}),Object.keys(N).forEach(function(te){var X;te.length>1?X=new RegExp("\\b"+m(te)+"\\b","gi"):X=new RegExp(m(te),"gi"),g=g.replace(X,N[te])});for(F in N)K+=F}for(K+=y,K=m(K),g=g.replace(/(^\s+|\s+$)/g,""),Y=!1,W=!1,j=0,M=g.length;j<M;j++)F=g[j],_(F,N)?Y=!1:I[F]?(F=Y&&I[F].match(/[A-Za-z0-9]/)?" "+I[F]:I[F],Y=!1):F in r?(j+1<M&&o.indexOf(g[j+1])>=0?($+=F,F=""):W===!0?(F=i[$]+r[F],$=""):F=Y&&r[F].match(/[A-Za-z0-9]/)?" "+r[F]:r[F],Y=!1,W=!1):F in i?($+=F,F="",j===M-1&&(F=i[$]),W=!0):R[F]&&!(U&&c.indexOf(F)!==-1)&&!(C&&d.indexOf(F)!==-1)?(F=Y||E.substr(-1).match(/[A-Za-z0-9]/)?y+R[F]:R[F],F+=g[j+1]!==void 0&&g[j+1].match(/[A-Za-z0-9]/)?y:"",Y=!0):(W===!0?(F=i[$]+F,$="",W=!1):Y&&(/[A-Za-z0-9]/.test(F)||E.substr(-1).match(/A-Za-z0-9]/))&&(F=" "+F),Y=!1),E+=F.replace(new RegExp("[^\\w\\s"+K+"_-]","g"),y);return B&&(E=E.replace(/(\w)(\S*)/g,function(te,X,oe){var fe=X.toUpperCase()+(oe!==null?oe:"");return Object.keys(N).indexOf(fe.toLowerCase())<0?fe:fe.toLowerCase()})),E=E.replace(/\s+/g,y).replace(new RegExp("\\"+y+"+","g"),y).replace(new RegExp("(^\\"+y+"+|\\"+y+"+$)","g"),""),H&&E.length>H&&(V=E.charAt(H)===y,E=E.slice(0,H),V||(E=E.slice(0,E.lastIndexOf(y)))),!v&&!B&&(E=E.toLowerCase()),E},p=function(g){return function(y){return u(y,g)}},m=function(g){return g.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},_=function(b,g){for(var h in g)if(g[h]===b)return!0};if(typeof t<"u"&&t.exports)t.exports=u,t.exports.createSlug=p;else if(typeof define<"u"&&define.amd)define([],function(){return u});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=u,n.createSlug=p}catch{}})(e)}}),XL=fb({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){se(),t.exports=KL()}});se(),se(),se(),se(),se(),se(),se(),se();function JL(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function ZL(e){const t=e.__file;if(t)return xL(OL(t,".vue"))}function pb(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function Vp(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function mb(e){var t,n;const r=(t=e.subTree)==null?void 0:t.type,o=Vp(e);return o?((n=o?.types)==null?void 0:n.Fragment)===r:!1}function Pc(e){var t,n,r;const o=JL(e?.type||{});if(o)return o;if(e?.root===e)return"Root";for(const s in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[s]===e?.type)return pb(e,s);for(const s in(r=e.appContext)==null?void 0:r.components)if(e.appContext.components[s]===e?.type)return pb(e,s);const i=ZL(e?.type||{});return i||"Anonymous Component"}function QL(e){var t,n,r;const o=(r=(n=(t=e?.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?r:0,i=e===e?.root?"root":e.uid;return`${o}:${i}`}function jp(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function eF(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var Mc;function tF(e){return Mc||(Mc=document.createRange()),Mc.selectNode(e),Mc.getBoundingClientRect()}function nF(e){const t=eF();if(!e.children)return t;for(let n=0,r=e.children.length;n<r;n++){const o=e.children[n];let i;if(o.component)i=Qo(o.component);else if(o.el){const s=o.el;s.nodeType===1||s.getBoundingClientRect?i=s.getBoundingClientRect():s.nodeType===3&&s.data.trim()&&(i=tF(s))}i&&rF(t,i)}return t}function rF(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var _b={top:0,left:0,right:0,bottom:0,width:0,height:0};function Qo(e){const t=e.subTree.el;return typeof window>"u"?_b:mb(e)?nF(e.subTree):t?.nodeType===1?t?.getBoundingClientRect():e.subTree.component?Qo(e.subTree.component):_b}se();function zp(e){return mb(e)?oF(e.subTree):e.subTree?[e.subTree.el]:[]}function oF(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...zp(n.component)):n?.el&&t.push(n.el)}),t}var hb="__vue-devtools-component-inspector__",gb="__vue-devtools-component-inspector__card__",yb="__vue-devtools-component-inspector__name__",bb="__vue-devtools-component-inspector__indicator__",Eb={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},iF={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},sF={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Hi(){return document.getElementById(hb)}function aF(){return document.getElementById(gb)}function lF(){return document.getElementById(bb)}function cF(){return document.getElementById(yb)}function qp(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function Hp(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:hb,Object.assign(n.style,{...Eb,...qp(e.bounds),...e.style});const r=document.createElement("span");r.id=gb,Object.assign(r.style,{...iF,top:e.bounds.top<35?0:"-35px"});const o=document.createElement("span");o.id=yb,o.innerHTML=`<${e.name}> `;const i=document.createElement("i");return i.id=bb,i.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(i.style,sF),r.appendChild(o),r.appendChild(i),n.appendChild(r),document.body.appendChild(n),n}function Wp(e){const t=Hi(),n=aF(),r=cF(),o=lF();t&&(Object.assign(t.style,{...Eb,...qp(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),r.innerHTML=`<${e.name}> `,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function dF(e){const t=Qo(e);if(!t.width&&!t.height)return;const n=Pc(e);Hi()?Wp({bounds:t,name:n}):Hp({bounds:t,name:n})}function $b(){const e=Hi();e&&(e.style.display="none")}var Gp=null;function Yp(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(Gp=n,n.vnode.el)){const o=Qo(n),i=Pc(n);Hi()?Wp({bounds:o,name:i}):Hp({bounds:o,name:i})}}}function uF(e,t){if(e.preventDefault(),e.stopPropagation(),Gp){const n=QL(Gp);t(n)}}var Dc=null;function fF(){$b(),window.removeEventListener("mouseover",Yp),window.removeEventListener("click",Dc,!0),Dc=null}function pF(){return window.addEventListener("mouseover",Yp),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),uF(n,r=>{window.removeEventListener("click",t,!0),Dc=null,window.removeEventListener("mouseover",Yp);const o=Hi();o&&(o.style.display="none"),e(JSON.stringify({id:r}))})}Dc=t,window.addEventListener("click",t,!0)})}function mF(e){const t=jp(_n.value,e.id);if(t){const[n]=zp(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const r=Qo(t),o=document.createElement("div"),i={...qp(r),position:"absolute"};Object.assign(o.style,i),document.body.appendChild(o),o.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(o)},2e3)}setTimeout(()=>{const r=Qo(t);if(r.width||r.height){const o=Pc(t),i=Hi();i?Wp({...e,name:o,bounds:r}):Hp({...e,name:o,bounds:r}),setTimeout(()=>{i&&(i.style.display="none")},1500)}},1200)}}se();var Sb,vb;(vb=(Sb=ge).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(Sb.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function _F(e){let t=0;const n=setInterval(()=>{ge.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function hF(){const e=ge.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function gF(){return new Promise(e=>{function t(){hF(),e(ge.__VUE_INSPECTOR__)}ge.__VUE_INSPECTOR__?t():_F(()=>{t()})})}se(),se();function yF(e){return!!(e&&e.__v_isReadonly)}function Tb(e){return yF(e)?Tb(e.__v_raw):!!(e&&e.__v_isReactive)}function Kp(e){return!!(e&&e.__v_isRef===!0)}function Oa(e){const t=e&&e.__v_raw;return t?Oa(t):e}var bF=class{constructor(){this.refEditor=new EF}set(e,t,n,r){const o=Array.isArray(t)?t:t.split(".");for(;o.length>1;){const l=o.shift();e instanceof Map?e=e.get(l):e instanceof Set?e=Array.from(e.values())[l]:e=e[l],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const i=o[0],s=this.refEditor.get(e)[i];r?r(e,i,n):this.refEditor.isRef(s)?this.refEditor.set(s,n):e[i]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let r=0;r<n.length;r++)if(e instanceof Map?e=e.get(n[r]):e=e[n[r]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const r=Array.isArray(t)?t.slice():t.split("."),o=n?2:1;for(;e&&r.length>o;){const i=r.shift();e=e[i],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,r[0])}createDefaultSetCallback(e){return(t,n,r)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):Oa(t)instanceof Map?t.delete(n):Oa(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const o=t[e.newKey||n];this.refEditor.isRef(o)?this.refEditor.set(o,r):Oa(t)instanceof Map?t.set(e.newKey||n,r):Oa(t)instanceof Set?t.add(r):t[e.newKey||n]=r}}}},EF=class{set(e,t){if(Kp(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(o=>e.add(o));return}const n=Object.keys(t);if(e instanceof Map){const o=new Set(e.keys());n.forEach(i=>{e.set(i,Reflect.get(t,i)),o.delete(i)}),o.forEach(i=>e.delete(i));return}const r=new Set(Object.keys(e));n.forEach(o=>{Reflect.set(e,o,Reflect.get(t,o)),r.delete(o)}),r.forEach(o=>Reflect.deleteProperty(e,o))}}get(e){return Kp(e)?e.value:e}isRef(e){return Kp(e)||Tb(e)}};se(),se(),se();var $F="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function SF(){if(typeof window>"u"||!sb||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=typeof localStorage.getItem<"u"?localStorage.getItem($F):null;return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}se(),se(),se();var wb,kb;(kb=(wb=ge).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(wb.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var vF=new Proxy(ge.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function TF(e,t){Nt.timelineLayersState[t.id]=!1,vF.push({...e,descriptorId:t.id,appRecord:Vp(t.app)})}var Ab,Nb;(Nb=(Ab=ge).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(Ab.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var Xp=new Proxy(ge.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),Ib=qi(()=>{bo.hooks.callHook("sendInspectorToClient",Cb())});function wF(e,t){var n,r;Xp.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(r=e.stateFilterPlaceholder)!=null?r:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:Vp(t.app)}),Ib()}function Cb(){return Xp.filter(e=>e.descriptor.app===_n.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,r=e.options;return{id:r.id,label:r.label,logo:n.logo,icon:`custom-ic-baseline-${(t=r?.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function Lc(e,t){return Xp.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function kF(){const e=db();e.hook("addInspector",({inspector:r,plugin:o})=>{wF(r,o.descriptor)});const t=qi(async({inspectorId:r,plugin:o})=>{var i;if(!r||!((i=o?.descriptor)!=null&&i.app)||Nt.highPerfModeEnabled)return;const s=Lc(r,o.descriptor.app),l={app:o.descriptor.app,inspectorId:r,filter:s?.treeFilter||"",rootNodes:[]};await new Promise(c=>{e.callHookWith(async d=>{await Promise.all(d.map(f=>f(l))),c()},"getInspectorTree")}),e.callHookWith(async c=>{await Promise.all(c.map(d=>d({inspectorId:r,rootNodes:l.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=qi(async({inspectorId:r,plugin:o})=>{var i;if(!r||!((i=o?.descriptor)!=null&&i.app)||Nt.highPerfModeEnabled)return;const s=Lc(r,o.descriptor.app),l={app:o.descriptor.app,inspectorId:r,nodeId:s?.selectedNodeId||"",state:null},c={currentTab:`custom-inspector:${r}`};l.nodeId&&await new Promise(d=>{e.callHookWith(async f=>{await Promise.all(f.map(u=>u(l,c))),d()},"getInspectorState")}),e.callHookWith(async d=>{await Promise.all(d.map(f=>f({inspectorId:r,nodeId:l.nodeId,state:l.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:r,nodeId:o,plugin:i})=>{const s=Lc(r,i.descriptor.app);s&&(s.selectedNodeId=o)}),e.hook("timelineLayerAdded",({options:r,plugin:o})=>{TF(r,o.descriptor)}),e.hook("timelineEventAdded",({options:r,plugin:o})=>{var i;const s=["performance","component-event","keyboard","mouse"];Nt.highPerfModeEnabled||!((i=Nt.timelineLayersState)!=null&&i[o.descriptor.id])&&!s.includes(r.layerId)||e.callHookWith(async l=>{await Promise.all(l.map(c=>c(r)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:r})=>{const o=r.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!o)return null;const i=o.id.toString();return[...o.instanceMap].filter(([l])=>l.split(":")[0]===i).map(([,l])=>l)}),e.hook("getComponentBounds",async({instance:r})=>Qo(r)),e.hook("getComponentName",({instance:r})=>Pc(r)),e.hook("componentHighlight",({uid:r})=>{const o=_n.value.instanceMap.get(r);o&&dF(o)}),e.hook("componentUnhighlight",()=>{$b()}),e}var xb,Ob;(Ob=(xb=ge).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(xb.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var Rb,Pb;(Pb=(Rb=ge).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(Rb.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var Mb,Db;(Db=(Mb=ge).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(Mb.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var Lb,Fb;(Fb=(Lb=ge).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(Lb.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var Bb,Ub;(Ub=(Bb=ge).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(Bb.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var ei="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function AF(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:SF()}}var Vb,jb;(jb=(Vb=ge)[ei])!=null||(Vb[ei]=AF());var NF=qi(e=>{bo.hooks.callHook("devtoolsStateUpdated",{state:e})});qi((e,t)=>{bo.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var Fc=new Proxy(ge.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?ge.__VUE_DEVTOOLS_KIT_APP_RECORDS__:ge.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),_n=new Proxy(ge.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?ge.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?ge.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:ge.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function Ra(){NF({...ge[ei],appRecords:Fc.value,activeAppRecordId:_n.id,tabs:ge.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:ge.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function IF(e){ge.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,Ra()}function CF(e){ge.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,Ra()}var Nt=new Proxy(ge[ei],{get(e,t){return t==="appRecords"?Fc:t==="activeAppRecordId"?_n.id:t==="tabs"?ge.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?ge.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:ge[ei][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...ge[ei]},e[t]=n,ge[ei][t]=n,!0}});function xF(e){return new Promise(t=>{Nt.connected&&(e(),t()),bo.hooks.hook("devtoolsConnectedUpdated",({state:n})=>{n.connected&&(e(),t())})})}var Jp=e=>{if(e)return e.startsWith("baseline-")?`custom-ic-${e}`:e.startsWith("i-")||PL(e)?e:`custom-ic-baseline-${e}`};function OF(e){const t=ge.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;t.some(n=>n.name===e.name)||(t.push({...e,icon:Jp(e.icon)}),Ra())}function RF(e){const t=ge.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;t.some(n=>n.id===e.id)||(t.push({...e,icon:Jp(e.icon),children:e.children?e.children.map(n=>({...n,icon:Jp(n.icon)})):void 0}),Ra())}function PF(e){const t=ge.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__,n=t.findIndex(r=>r.id===e);n!==-1&&(t.splice(n,1),Ra())}function MF(e={}){var t,n,r;const{file:o,host:i,baseUrl:s=window.location.origin,line:l=0,column:c=0}=e;if(o){if(i==="chrome-extension"){const d=o.replace(/\\/g,"\\\\"),f=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${f}__open-in-editor?file=${encodeURI(o)}`).then(u=>{if(!u.ok){const p=`Opening component ${d} failed`;console.log(`%c${p}`,"color:red")}})}else if(Nt.vitePluginDetected){const d=(r=ge.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?r:s;ge.__VUE_INSPECTOR__.openInEditor(d,o,l,c)}}}se(),se(),se(),se(),se();var zb,qb;(qb=(zb=ge).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(zb.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var Zp=new Proxy(ge.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function Qp(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function em(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function DF(e){var t,n,r;const o=(n=(t=Zp.find(i=>{var s;return i[0].id===e&&!!((s=i[0])!=null&&s.settings)}))==null?void 0:t[0])!=null?n:null;return(r=o?.settings)!=null?r:null}function Hb(e,t){var n,r,o;const i=em(e);if(i){const s=localStorage.getItem(i);if(s)return JSON.parse(s)}if(e){const s=(r=(n=Zp.find(l=>l[0].id===e))==null?void 0:n[0])!=null?r:null;return Qp((o=s?.settings)!=null?o:{})}return Qp(t)}function LF(e,t){const n=em(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(Qp(t)))}function FF(e,t,n){const r=em(e),o=localStorage.getItem(r),i=JSON.parse(o||"{}"),s={...i,[t]:n};localStorage.setItem(r,JSON.stringify(s)),bo.hooks.callHookWith(l=>{l.forEach(c=>c({pluginId:e,key:t,oldValue:i[t],newValue:n,settings:s}))},"setPluginSettings")}se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se();var Wb,Gb,Pn=(Gb=(Wb=ge).__VUE_DEVTOOLS_HOOK)!=null?Gb:Wb.__VUE_DEVTOOLS_HOOK=db(),BF={vueAppInit(e){Pn.hook("app:init",e)},vueAppUnmount(e){Pn.hook("app:unmount",e)},vueAppConnected(e){Pn.hook("app:connected",e)},componentAdded(e){return Pn.hook("component:added",e)},componentEmit(e){return Pn.hook("component:emit",e)},componentUpdated(e){return Pn.hook("component:updated",e)},componentRemoved(e){return Pn.hook("component:removed",e)},setupDevtoolsPlugin(e){Pn.hook("devtools-plugin:setup",e)},perfStart(e){return Pn.hook("perf:start",e)},perfEnd(e){return Pn.hook("perf:end",e)}},Yb={on:BF,setupDevToolsPlugin(e,t){return Pn.callHook("devtools-plugin:setup",e,t)}},UF=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(Nt.highPerfModeEnabled)return;const n=Cb().find(r=>r.packageName===this.plugin.descriptor.packageName);if(n?.id){if(e){const r=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];Pn.callHook("component:updated",...r)}else Pn.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&LF(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){Nt.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){Nt.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return Nt.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){Nt.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return Hb(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},VF=UF;se(),se(),se(),se();var jF="__vue_devtool_undefined__",zF="__vue_devtool_infinity__",qF="__vue_devtool_negative_infinity__",HF="__vue_devtool_nan__";se(),se();var WF={[jF]:"undefined",[HF]:"NaN",[zF]:"Infinity",[qF]:"-Infinity"};Object.entries(WF).reduce((e,[t,n])=>(e[n]=t,e),{}),se(),se(),se(),se(),se();var Kb,Xb;(Xb=(Kb=ge).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(Kb.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function Jb(e,t){return Yb.setupDevToolsPlugin(e,t)}function GF(e,t){const[n,r]=e;if(n.app!==t)return;const o=new VF({plugin:{setupFn:r,descriptor:n},ctx:bo});n.packageName==="vuex"&&o.on.editInspectorState(i=>{o.sendInspectorState(i.inspectorId)}),r(o)}function Zb(e,t){ge.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||Nt.highPerfModeEnabled&&!t?.inspectingComponent||(ge.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),Zp.forEach(n=>{GF(n,e)}))}se(),se();var Pa="__VUE_DEVTOOLS_ROUTER__",Wi="__VUE_DEVTOOLS_ROUTER_INFO__",Qb,e3;(e3=(Qb=ge)[Wi])!=null||(Qb[Wi]={currentRoute:null,routes:[]});var t3,n3;(n3=(t3=ge)[Pa])!=null||(t3[Pa]={}),new Proxy(ge[Wi],{get(e,t){return ge[Wi][t]}}),new Proxy(ge[Pa],{get(e,t){if(t==="value")return ge[Pa]}});function YF(e){const t=new Map;return(e?.getRoutes()||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function tm(e){return e.map(t=>{let{path:n,name:r,children:o,meta:i}=t;return o?.length&&(o=tm(o)),{path:n,name:r,children:o,meta:i}})}function KF(e){if(e){const{fullPath:t,hash:n,href:r,path:o,name:i,matched:s,params:l,query:c}=e;return{fullPath:t,hash:n,href:r,path:o,name:i,params:l,query:c,matched:tm(s)}}return e}function XF(e,t){function n(){var r;const o=(r=e.app)==null?void 0:r.config.globalProperties.$router,i=KF(o?.currentRoute.value),s=tm(YF(o)),l=console.warn;console.warn=()=>{},ge[Wi]={currentRoute:i?lb(i):{},routes:lb(s)},ge[Pa]=o,console.warn=l}n(),Yb.on.componentUpdated(qi(()=>{var r;((r=t.value)==null?void 0:r.app)===e.app&&(n(),!Nt.highPerfModeEnabled&&bo.hooks.callHook("routerInfoUpdated",{state:ge[Wi]}))},200))}function JF(e){return{async getInspectorTree(t){const n={...t,app:_n.value.app,rootNodes:[]};return await new Promise(r=>{e.callHookWith(async o=>{await Promise.all(o.map(i=>i(n))),r()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:_n.value.app,state:null},r={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(o=>{e.callHookWith(async i=>{await Promise.all(i.map(s=>s(n,r))),o()},"getInspectorState")}),n.state},editInspectorState(t){const n=new bF,r={...t,app:_n.value.app,set:(o,i=t.path,s=t.state.value,l)=>{n.set(o,i,s,l||n.createDefaultSetCallback(t.state))}};e.callHookWith(o=>{o.forEach(i=>i(r))},"editInspectorState")},sendInspectorState(t){const n=Lc(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return pF()},cancelInspectComponentInspector(){return fF()},getComponentRenderCode(t){const n=jp(_n.value,t);if(n)return typeof n?.type!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return mF({id:t})},openInEditor:MF,getVueInspector:gF,toggleApp(t,n){const r=Fc.value.find(o=>o.id===t);r&&(CF(t),IF(r),XF(r,_n),Ib(),Zb(r.app,n))},inspectDOM(t){const n=jp(_n.value,t);if(n){const[r]=zp(n);r&&(ge.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=r)}},updatePluginSettings(t,n,r){FF(t,n,r)},getPluginSettings(t){return{options:DF(t),values:Hb(t)}}}}se();var r3,o3;(o3=(r3=ge).__VUE_DEVTOOLS_ENV__)!=null||(r3.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var i3=kF(),s3,a3;(a3=(s3=ge).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(s3.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:i3,get state(){return{...Nt,activeAppRecordId:_n.id,activeAppRecord:_n.value,appRecords:Fc.value}},api:JF(i3)});var bo=ge.__VUE_DEVTOOLS_KIT_CONTEXT__;se(),YL(XL());var l3,c3;(c3=(l3=ge).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(l3.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),se();function ZF(e){return new Promise(t=>{if(Nt.connected&&Nt.clientConnected){e(),t();return}bo.hooks.hook("devtoolsConnectedUpdated",({state:n})=>{n.connected&&n.clientConnected&&(e(),t())})})}se();function QF(e){Nt.highPerfModeEnabled=e??!Nt.highPerfModeEnabled,!e&&_n.value&&Zb(_n.value.app)}se(),se(),se();function eB(e){Nt.devtoolsClientDetected={...Nt.devtoolsClientDetected,...e};const t=Object.values(Nt.devtoolsClientDetected).some(Boolean);QF(!t)}var d3,u3;(u3=(d3=ge).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(d3.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=eB),se(),se(),se(),se(),se(),se(),se();var tB=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},f3=class{constructor(e){this.generateIdentifier=e,this.kv=new tB}register(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},nB=class extends f3{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};se(),se();function rB(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function oB(e,t){const n=rB(e);if("find"in n)return n.find(t);const r=n;for(let o=0;o<r.length;o++){const i=r[o];if(t(i))return i}}function Gi(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Bc(e,t){return e.indexOf(t)!==-1}function p3(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var iB=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return oB(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};se(),se();var sB=e=>Object.prototype.toString.call(e).slice(8,-1),m3=e=>typeof e>"u",aB=e=>e===null,Ma=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,nm=e=>Ma(e)&&Object.keys(e).length===0,Eo=e=>Array.isArray(e),lB=e=>typeof e=="string",cB=e=>typeof e=="number"&&!isNaN(e),dB=e=>typeof e=="boolean",uB=e=>e instanceof RegExp,Da=e=>e instanceof Map,La=e=>e instanceof Set,_3=e=>sB(e)==="Symbol",fB=e=>e instanceof Date&&!isNaN(e.valueOf()),pB=e=>e instanceof Error,h3=e=>typeof e=="number"&&isNaN(e),mB=e=>dB(e)||aB(e)||m3(e)||cB(e)||lB(e)||_3(e),_B=e=>typeof e=="bigint",hB=e=>e===1/0||e===-1/0,gB=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),yB=e=>e instanceof URL;se();var g3=e=>e.replace(/\./g,"\\."),rm=e=>e.map(String).map(g3).join("."),Fa=e=>{const t=[];let n="";for(let o=0;o<e.length;o++){let i=e.charAt(o);if(i==="\\"&&e.charAt(o+1)==="."){n+=".",o++;continue}if(i==="."){t.push(n),n="";continue}n+=i}const r=n;return t.push(r),t};se();function yr(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var y3=[yr(m3,"undefined",()=>null,()=>{}),yr(_B,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),yr(fB,"Date",e=>e.toISOString(),e=>new Date(e)),yr(pB,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),yr(uB,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),yr(La,"set",e=>[...e.values()],e=>new Set(e)),yr(Da,"map",e=>[...e.entries()],e=>new Map(e)),yr(e=>h3(e)||hB(e),"number",e=>h3(e)?"NaN":e>0?"Infinity":"-Infinity",Number),yr(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),yr(yB,"URL",e=>e.toString(),e=>new URL(e))];function Uc(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var b3=Uc((e,t)=>_3(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),bB=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),E3=Uc(gB,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=bB[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function $3(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var S3=Uc($3,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(o=>{r[o]=e[o]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),v3=Uc((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),EB=[S3,b3,v3,E3],T3=(e,t)=>{const n=p3(EB,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=p3(y3,o=>o.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},w3={};y3.forEach(e=>{w3[e.annotation]=e});var $B=(e,t,n)=>{if(Eo(t))switch(t[0]){case"symbol":return b3.untransform(e,t,n);case"class":return S3.untransform(e,t,n);case"custom":return v3.untransform(e,t,n);case"typed-array":return E3.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=w3[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}};se();var Yi=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function k3(e){if(Bc(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Bc(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Bc(e,"constructor"))throw new Error("constructor is not allowed as a property")}var SB=(e,t)=>{k3(t);for(let n=0;n<t.length;n++){const r=t[n];if(La(e))e=Yi(e,+r);else if(Da(e)){const o=+r,i=+t[++n]==0?"key":"value",s=Yi(e,o);switch(i){case"key":e=s;break;case"value":e=e.get(s);break}}else e=e[r]}return e},om=(e,t,n)=>{if(k3(t),t.length===0)return n(e);let r=e;for(let i=0;i<t.length-1;i++){const s=t[i];if(Eo(r)){const l=+s;r=r[l]}else if(Ma(r))r=r[s];else if(La(r)){const l=+s;r=Yi(r,l)}else if(Da(r)){if(i===t.length-2)break;const c=+s,d=+t[++i]==0?"key":"value",f=Yi(r,c);switch(d){case"key":r=f;break;case"value":r=r.get(f);break}}}const o=t[t.length-1];if(Eo(r)?r[+o]=n(r[+o]):Ma(r)&&(r[o]=n(r[o])),La(r)){const i=Yi(r,+o),s=n(i);i!==s&&(r.delete(i),r.add(s))}if(Da(r)){const i=+t[t.length-2],s=Yi(r,i);switch(+o==0?"key":"value"){case"key":{const c=n(s);r.set(c,r.get(s)),c!==s&&r.delete(s);break}case"value":{r.set(s,n(r.get(s)));break}}}return e};function im(e,t,n=[]){if(!e)return;if(!Eo(e)){Gi(e,(i,s)=>im(i,t,[...n,...Fa(s)]));return}const[r,o]=e;o&&Gi(o,(i,s)=>{im(i,t,[...n,...Fa(s)])}),t(r,n)}function vB(e,t,n){return im(t,(r,o)=>{e=om(e,o,i=>$B(i,r,n))}),e}function TB(e,t){function n(r,o){const i=SB(e,Fa(o));r.map(Fa).forEach(s=>{e=om(e,s,()=>i)})}if(Eo(t)){const[r,o]=t;r.forEach(i=>{e=om(e,Fa(i),()=>e)}),o&&Gi(o,n)}else Gi(t,n);return e}var wB=(e,t)=>Ma(e)||Eo(e)||Da(e)||La(e)||$3(e,t);function kB(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function AB(e,t){const n={};let r;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(l=>l.map(String)).sort((l,c)=>l.length-c.length));const[i,...s]=o;i.length===0?r=s.map(rm):n[rm(i)]=s.map(rm)}),r?nm(n)?[r]:[r,n]:nm(n)?void 0:n}var A3=(e,t,n,r,o=[],i=[],s=new Map)=>{var l;const c=mB(e);if(!c){kB(e,o,t);const _=s.get(e);if(_)return r?{transformedValue:null}:_}if(!wB(e,n)){const _=T3(e,n),b=_?{transformedValue:_.value,annotations:[_.type]}:{transformedValue:e};return c||s.set(e,b),b}if(Bc(i,e))return{transformedValue:null};const d=T3(e,n),f=(l=d?.value)!=null?l:e,u=Eo(f)?[]:{},p={};Gi(f,(_,b)=>{if(b==="__proto__"||b==="constructor"||b==="prototype")throw new Error(`Detected property ${b}. This is a prototype pollution risk, please remove it from your object.`);const g=A3(_,t,n,r,[...o,b],[...i,e],s);u[b]=g.transformedValue,Eo(g.annotations)?p[b]=g.annotations:Ma(g.annotations)&&Gi(g.annotations,(h,y)=>{p[g3(b)+"."+y]=h})});const m=nm(p)?{transformedValue:u,annotations:d?[d.type]:void 0}:{transformedValue:u,annotations:d?[d.type,p]:p};return c||s.set(e,m),m};se(),se();function N3(e){return Object.prototype.toString.call(e).slice(8,-1)}function I3(e){return N3(e)==="Array"}function NB(e){if(N3(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function IB(e,t,n,r,o){const i={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=n),o&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function sm(e,t={}){if(I3(e))return e.map(o=>sm(o,t));if(!NB(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((o,i)=>{if(I3(t.props)&&!t.props.includes(i))return o;const s=e[i],l=sm(s,t);return IB(o,i,l,e,t.nonenumerable),o},{})}var yt=class{constructor({dedupe:e=!1}={}){this.classRegistry=new nB,this.symbolRegistry=new f3(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new iB,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=A3(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const o=AB(t,this.dedupe);return o&&(r.meta={...r.meta,referentialEqualities:o}),r}deserialize(e){const{json:t,meta:n}=e;let r=sm(t);return n?.values&&(r=vB(r,n.values,this)),n?.referentialEqualities&&(r=TB(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};yt.defaultInstance=new yt,yt.serialize=yt.defaultInstance.serialize.bind(yt.defaultInstance),yt.deserialize=yt.defaultInstance.deserialize.bind(yt.defaultInstance),yt.stringify=yt.defaultInstance.stringify.bind(yt.defaultInstance),yt.parse=yt.defaultInstance.parse.bind(yt.defaultInstance),yt.registerClass=yt.defaultInstance.registerClass.bind(yt.defaultInstance),yt.registerSymbol=yt.defaultInstance.registerSymbol.bind(yt.defaultInstance),yt.registerCustom=yt.defaultInstance.registerCustom.bind(yt.defaultInstance),yt.allowErrorProps=yt.defaultInstance.allowErrorProps.bind(yt.defaultInstance),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se(),se();var C3,x3;(x3=(C3=ge).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(C3.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var O3,R3;(R3=(O3=ge).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(O3.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var P3,M3;(M3=(P3=ge).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(P3.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var D3,L3;(L3=(D3=ge).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(D3.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var F3,B3;(B3=(F3=ge).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(F3.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var U3,V3;(V3=(U3=ge).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(U3.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),se(),se(),se(),se(),se(),se(),se();const CB=Object.freeze(Object.defineProperty({__proto__:null,addCustomCommand:RF,addCustomTab:OF,onDevToolsClientConnected:ZF,onDevToolsConnected:xF,removeCustomCommand:PF,setupDevToolsPlugin:Jb,setupDevtoolsPlugin:Jb},Symbol.toStringTag,{value:"Module"})),ue=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Te=globalThis,Vr="10.51.0";function jr(){return Ba(Te),Te}function Ba(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Vr,t[Vr]=t[Vr]||{}}function Ki(e,t,n=Te){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Vr]=r[Vr]||{};return o[e]||(o[e]=t())}const am=["debug","info","warn","error","log","assert","trace"],xB="Sentry Logger ",Vc={};function nr(e){if(!("console"in Te))return e();const t=Te.console,n={},r=Object.keys(Vc);r.forEach(o=>{const i=Vc[o];n[o]=t[o],t[o]=i});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function OB(){cm().enabled=!0}function RB(){cm().enabled=!1}function j3(){return cm().enabled}function PB(...e){lm("log",...e)}function MB(...e){lm("warn",...e)}function DB(...e){lm("error",...e)}function lm(e,...t){ue&&j3()&&nr(()=>{Te.console[e](`${xB}[${e}]:`,...t)})}function cm(){return ue?Ki("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const P={enable:OB,disable:RB,isEnabled:j3,log:PB,warn:MB,error:DB},z3=50,br="?",q3=/\(error: (.*)\)/,H3=/captureMessage|captureException/;function W3(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const i=[],s=n.split(`
|
|
30
30
|
`);for(let l=r;l<s.length;l++){let c=s[l];c.length>1024&&(c=c.slice(0,1024));const d=q3.test(c)?c.replace(q3,"$1"):c;if(!d.includes("Error: ")){for(const f of t){const u=f(d);if(u){i.push(u);break}}if(i.length>=z3+o)break}}return FB(i.slice(o))}}function LB(e){return Array.isArray(e)?W3(...e):e}function FB(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(jc(t).function||"")&&t.pop(),t.reverse(),H3.test(jc(t).function||"")&&(t.pop(),H3.test(jc(t).function||"")&&t.pop()),t.slice(0,z3).map(n=>({...n,filename:n.filename||jc(t).filename,function:n.function||br}))}function jc(e){return e[e.length-1]||{}}const dm="<anonymous>";function zr(e){try{return!e||typeof e!="function"?dm:e.name||dm}catch{return dm}}function um(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function G3(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function BB(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const Ua={},Y3={};function $o(e,t){return Ua[e]=Ua[e]||[],Ua[e].push(t),()=>{const n=Ua[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function So(e,t){if(!Y3[e]){Y3[e]=!0;try{t()}catch(n){ue&&P.error(`Error while instrumenting ${e}`,n)}}}function qn(e,t){const n=e&&Ua[e];if(n)for(const r of n)try{r(t)}catch(o){ue&&P.error(`Error while triggering instrumentation handler.
|
|
31
31
|
Type: ${e}
|
|
@@ -34,16 +34,16 @@ Error:`,o)}}let fm=null;function K3(e){const t="error";$o(t,e),So(t,UB)}function
|
|
|
34
34
|
${JSON.stringify(s)}
|
|
35
35
|
`),typeof l=="string"||l instanceof Uint8Array)o(l);else{let c;try{c=JSON.stringify(l)}catch{c=JSON.stringify(tn(l))}o(c)}}return typeof r=="string"?r:uV(r)}function uV(e){const t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function fV(e){let t=typeof e=="string"?td(e):e;function n(s){const l=t.subarray(0,s);return t=t.subarray(s+1),l}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(dV(n(s)))}const o=r(),i=[];for(;t.length;){const s=r(),l=typeof s.length=="number"?s.length:void 0;i.push([s,l?n(l):r()])}return[o,i]}function pV(e){return[{type:"span"},e]}function mV(e){const t=typeof e.data=="string"?td(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Z4={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function _V(e){return e in Z4}function Q4(e){return _V(e)?Z4[e]:e}function tl(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function e9(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Sr(r)},...o&&{trace:o}}}function hV(e,t){if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function gV(e,t,n,r){const o=tl(n),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Sr(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Gn(i,[s])}function yV(e,t,n,r){const o=tl(n),i=e.type&&e.type!=="replay_event"?e.type:"event";hV(e,n?.sdk);const s=e9(e,o,r,t);return delete e.sdkProcessingMetadata,Gn(s,[[{type:i},e]])}function bV(e,t){function n(m){return!!m.trace_id&&!!m.public_key}const r=Wn(e[0]),o=t?.getDsn(),i=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&o&&{dsn:Sr(o)}},{beforeSendSpan:l,ignoreSpans:c}=t?.getOptions()||{},d=c?.length?e.filter(m=>{const _=Me(m);return!el({description:_.description,op:_.op,attributes:_.data},c)}):e,f=e.length-d.length;f&&t?.recordDroppedEvent("before_send","span",f);const u=l?m=>{const _=Me(m),b=ed(l)?_:l(_);return b||(Jc(),_)}:Me,p=[];for(const m of d){const _=u(m);_&&p.push(pV(_))}return Gn(s,p)}function EV(e){if(!ue)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Me(e),{spanId:o}=e.spanContext(),i=Jr(e),s=Tt(e),l=s===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${l?"root ":""}span`,d=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&d.push(`parent ID: ${r}`),!l){const{op:f,description:u}=Me(s);d.push(`root ID: ${s.spanContext().spanId}`),f&&d.push(`root op: ${f}`),u&&d.push(`root description: ${u}`)}P.log(`${c}
|
|
36
36
|
${d.join(`
|
|
37
|
-
`)}`)}function $V(e){if(!ue)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Me(e),{spanId:r}=e.spanContext(),i=Tt(e)===e,s=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;P.log(s)}function t9(e,t,n,r=wt()){const o=r&&Tt(r);o&&(ue&&P.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Ya]:t,[Ga]:n}))}function n9(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[Ga],i=r[Ya];typeof o=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:o})}),t}function Zr(e){return e.getOptions().traceLifecycle==="stream"}const r9=1e3;class rd{constructor(t={}){this._traceId=t.traceId||Er(),this._spanId=t.spanId||Kr(),this._startTime=t.startTimestamp||ut(),this._links=t.links,this._attributes={},this.setAttributes({[We]:"manual",[tt]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Yc:x4}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Xr(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Pt,"custom"),this}end(t){this._endTime||(this._endTime=Xr(t),$V(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[tt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:V4(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[We],profile_id:this._attributes[vm],exclusive_time:this._attributes[To],measurements:n9(this._events),is_segment:this._isStandaloneSpan&&Tt(this)===this||void 0,segment_id:this._isStandaloneSpan?Tt(this).spanContext().spanId:void 0,links:M4(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===Tt(this),status:j4(this._status),attributes:this._attributes,links:D4(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){ue&&P.log("[Tracing] Adding an event to span:",t);const o=o9(n)?n:r||ut(),i=o9(n)?{}:n||{},s={name:t,time:Xr(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=_e();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===Tt(this)))return;if(this._isStandaloneSpan){this._sampled?vV(bV([this],t)):(ue&&P.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}else if(t&&Zr(t)){t.emit("afterSegmentSpanEnd",this);return}const r=this._convertSpanToTransaction();r&&(Za(this).scope||Re()).captureEvent(r)}_convertSpanToTransaction(){if(!i9(Me(this)))return;this._name||(ue&&P.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Za(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const i=Qa(this).filter(f=>f!==this&&!SV(f)).map(f=>Me(f)).filter(i9),s=this._attributes[Pt];delete this._attributes[Ka],i.forEach(f=>{delete f.data[Ka]});const l={contexts:{trace:qU(this)},spans:i.length>r9?i.sort((f,u)=>f.start_timestamp-u.start_timestamp).slice(0,r9):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Wn(this)},request:r,...s&&{transaction_info:{source:s}}},c=n9(this._events);return c&&Object.keys(c).length&&(ue&&P.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),l.measurements=c),l}}function o9(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function i9(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function SV(e){return e instanceof rd&&e.isStandaloneSpan()}function vV(e){const t=_e();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Im(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(i){throw t(i),n(),i}return TV(o,t,n,r)}function TV(e,t,n,r){return ti(e)?u4(e,o=>{n(),r(o)},o=>{t(o),n()}):(n(),r(e),e)}function wV(e,t,n){if(!Mn(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:l=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):l}),r=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);const i=si(o);if(i===void 0)return ue&&P.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return ue&&P.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];const s=n<i;return s||ue&&P.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[s,i,r]}const Cm="__SENTRY_SUPPRESS_TRACING__";function vr(e,t){const n=ns();if(n.startSpan)return n.startSpan(e,t);const r=Om(e),{forceTransaction:o,parentSpan:i,scope:s}=e,l=s?.clone();return Hn(l,()=>c9(i)(()=>{const d=Re(),f=Rm(d,i),u=_e(),p=e.onlyIfParent&&!f,m=p?new Dn:xm({parentSpan:f,spanArguments:r,forceTransaction:o,scope:d});return p&&u?.recordDroppedEvent("no_parent_span","span"),(!d9(m)||!f)&&$r(d,m),Im(()=>t(m),()=>{const{status:_}=Me(m);m.isRecording()&&(!_||_==="ok")&&m.setStatus({code:Ge,message:"internal_error"})},()=>{m.end()})}))}function Qr(e,t){const n=ns();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Om(e),{forceTransaction:o,parentSpan:i,scope:s}=e,l=s?.clone();return Hn(l,()=>c9(i)(()=>{const d=Re(),f=Rm(d,i),u=e.onlyIfParent&&!f,p=u?new Dn:xm({parentSpan:f,spanArguments:r,forceTransaction:o,scope:d});return u&&_e()?.recordDroppedEvent("no_parent_span","span"),(!d9(p)||!f)&&$r(d,p),Im(()=>t(p,()=>p.end()),()=>{const{status:m}=Me(p);p.isRecording()&&(!m||m==="ok")&&p.setStatus({code:Ge,message:"internal_error"})})}))}function Tr(e){const t=ns();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Om(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?s=>Hn(e.scope,s):o!==void 0?s=>nl(o,s):s=>s())(()=>{const s=Re(),l=Rm(s,o),c=_e();return e.onlyIfParent&&!l?(c?.recordDroppedEvent("no_parent_span","span"),new Dn):xm({parentSpan:l,spanArguments:n,forceTransaction:r,scope:s})})}const kV=(e,t)=>{const n=jr(),r=vo(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:i}=e,s=_e(),l=Tm(i);return s&&!zU(s,l?.org_id)?a9(t):Hn(c=>{const d=N4(o,i);return c.setPropagationContext(d),$r(c,void 0),t()})};function nl(e,t){const n=ns();return n.withActiveSpan?n.withActiveSpan(e,t):Hn(r=>($r(r,e||void 0),t(r)))}function s9(e){const t=ns();return t.suppressTracing?t.suppressTracing(e):Hn(n=>{n.setSDKProcessingMetadata({[Cm]:!0});const r=e();return n.setSDKProcessingMetadata({[Cm]:void 0}),r})}function a9(e){const t=ns();return t.startNewTrace?t.startNewTrace(e):Hn(n=>(n.setPropagationContext({traceId:Er(),sampleRand:Gr()}),ue&&P.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),nl(null,e)))}function xm({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Mn()){const l=new Dn;if(n||!e){const c={sampled:"false",sample_rate:"0",transaction:t.name,...Wn(l)};Qc(l,c)}return l}const o=_e();if(NV(o,t))return Pm(r)||o?.recordDroppedEvent("ignored","span"),new Dn({dropReason:"ignored",traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});const i=vt();let s;if(e&&!n)s=AV(e,r,t),z4(e,s);else if(e){const l=Wn(e),{traceId:c,spanId:d}=e.spanContext(),f=Jr(e);s=l9({traceId:c,parentSpanId:d,...t},r,f),Qc(s,l)}else{const{traceId:l,dsc:c,parentSpanId:d,sampled:f}={...i.getPropagationContext(),...r.getPropagationContext()};s=l9({traceId:l,parentSpanId:d,...t},r,f),c&&Qc(s,c)}return EV(s),OU(s,r,i),s}function Om(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Xr(e.startTime),delete r.startTime,r}return n}function ns(){const e=jr();return vo(e)}function l9(e,t,n){const r=_e(),o=r?.getOptions()||{},{name:i=""}=e,s={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});const l=s.parentSampled??n,c=s.spanAttributes,d=t.getPropagationContext(),f=Pm(t),[u,p,m]=f?[!1]:wV(o,{name:i,parentSampled:l,attributes:c,parentSampleRate:si(d.dsc?.sample_rate)},d.sampleRand),_=new rd({...e,attributes:{[Pt]:"custom",[Wc]:p!==void 0&&m?p:void 0,...c},sampled:u});return!u&&r&&!f&&(ue&&P.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate",Zr(r)?"span":"transaction")),r&&r.emit("spanStart",_),_}function AV(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),i=Pm(t),s=i?!1:Jr(e),l=s?new rd({...n,parentSpanId:r,traceId:o,sampled:s}):new Dn({traceId:o});z4(e,l);const c=_e();return c&&(Zr(c)&&l instanceof Dn&&(e instanceof Dn&&e.dropReason?(l.dropReason=e.dropReason,c.recordDroppedEvent(e.dropReason,"span")):i||(l.dropReason="sample_rate",c.recordDroppedEvent("sample_rate","span"))),c.emit("spanStart",l),n.endTimestamp&&(c.emit("spanEnd",l),c.emit("afterSpanEnd",l))),l}function Rm(e,t){if(t)return t;if(t===null)return;const n=Qi(e);if(!n)return;const r=_e();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Tt(n):n}function c9(e){return e!==void 0?t=>nl(e,t):t=>t()}function NV(e,t){const n=e?.getOptions().ignoreSpans;return!e||!Zr(e)||!n?.length?!1:el({description:t.name||"",op:t.attributes?.[tt]||t.op,attributes:t.attributes},n)}function d9(e){return e instanceof Dn&&e.dropReason==="ignored"}function Pm(e){return e.getScopeData().sdkProcessingMetadata[Cm]===!0}const od={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},IV="heartbeatFailed",CV="idleTimeout",xV="finalTimeout",OV="externalFinish";function u9(e,t={}){const n=new Map;let r=!1,o,i=OV,s=!t.disableAutoFinish;const l=[],{idleTimeout:c=od.idleTimeout,finalTimeout:d=od.finalTimeout,childSpanTimeout:f=od.childSpanTimeout,beforeSpanEnd:u,trimIdleSpanEndTimestamp:p=!0}=t,m=_e();if(!m||!Mn()){const v=new Dn,B={sample_rate:"0",sampled:"false",...Wn(v)};return Qc(v,B),v}const _=Re(),b=wt(),g=RV(e);g.end=new Proxy(g.end,{apply(v,B,H){if(u&&u(g),B instanceof Dn)return;const[U,...C]=H,A=U||ut(),R=Xr(A),I=Qa(g).filter(W=>W!==g),V=Me(g);if(!I.length||!p)return N(R),Reflect.apply(v,B,[R,...C]);const j=m.getOptions().ignoreSpans,F=I?.reduce((W,K)=>{const te=Me(K);return!te.timestamp||j&&el({description:te.description,op:te.op,attributes:te.data},j)?W:W?Math.max(W,te.timestamp):te.timestamp},void 0),M=V.start_timestamp,Y=Math.min(M?M+d/1e3:1/0,Math.max(M||-1/0,Math.min(R,F||1/0)));return N(Y),Reflect.apply(v,B,[Y,...C])}});function h(){o&&(clearTimeout(o),o=void 0)}function y(v){h(),o=setTimeout(()=>{!r&&n.size===0&&s&&(i=CV,g.end(v))},c)}function E(v){o=setTimeout(()=>{!r&&s&&(i=IV,g.end(v))},f)}function $(v){h(),n.set(v,!0);const B=ut();E(B+f/1e3)}function O(v){if(n.has(v)&&n.delete(v),n.size===0){const B=ut();y(B+c/1e3)}}function N(v){r=!0,n.clear(),l.forEach(I=>I()),$r(_,b);const B=Me(g),{start_timestamp:H}=B;if(!H)return;B.data[Wa]||g.setAttribute(Wa,i);const C=B.status;(!C||C==="unknown")&&g.setStatus({code:Xa}),P.log(`[Tracing] Idle span "${B.op}" finished`);const A=Qa(g).filter(I=>I!==g);let R=0;A.forEach(I=>{I.isRecording()&&(I.setStatus({code:Ge,message:"cancelled"}),I.end(v),ue&&P.log("[Tracing] Cancelling span since span ended early",JSON.stringify(I,void 0,2)));const V=Me(I),{timestamp:j=0,start_timestamp:F=0}=V,M=F<=v,Y=(d+c)/1e3,W=j-F<=Y;if(ue){const K=JSON.stringify(I,void 0,2);M?W||P.log("[Tracing] Discarding span since it finished after idle span final timeout",K):P.log("[Tracing] Discarding span since it happened after idle span was finished",K)}(!W||!M)&&(GU(g,I),R++)}),R>0&&g.setAttribute("sentry.idle_span_discarded_spans",R)}return l.push(m.on("spanStart",v=>{if(r||v===g||Me(v).timestamp||v instanceof rd&&v.isStandaloneSpan())return;Qa(g).includes(v)&&$(v.spanContext().spanId)})),l.push(m.on("spanEnd",v=>{r||O(v.spanContext().spanId)})),l.push(m.on("idleSpanEnableAutoFinish",v=>{v===g&&(s=!0,y(),n.size&&E())})),t.disableAutoFinish||y(),setTimeout(()=>{r||(g.setStatus({code:Ge,message:"deadline_exceeded"}),i=xV,g.end())},d),g}function RV(e){const t=Tr(e);return $r(Re(),t),ue&&P.log("[Tracing] Started span is an idle span"),t}function PV(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;MV(e,t),r&&FV(e,r),BV(e,n),DV(e,o),LV(e,i)}function f9(e,t){const{extra:n,tags:r,attributes:o,user:i,contexts:s,level:l,sdkProcessingMetadata:c,breadcrumbs:d,fingerprint:f,eventProcessors:u,attachments:p,propagationContext:m,transactionName:_,span:b}=t;rl(e,"extra",n),rl(e,"tags",r),rl(e,"attributes",o),rl(e,"user",i),rl(e,"contexts",s),e.sdkProcessingMetadata=Ha(e.sdkProcessingMetadata,c,2),l&&(e.level=l),_&&(e.transactionName=_),b&&(e.span=b),d.length&&(e.breadcrumbs=[...e.breadcrumbs,...d]),f.length&&(e.fingerprint=[...e.fingerprint,...f]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...m}}function rl(e,t,n){e[t]=Ha(e[t],n,1)}function ol(e,t){const n=ii().getScopeData();return e&&f9(n,e.getScopeData()),t&&f9(n,t.getScopeData()),n}function MV(e,t){const{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:l}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),s&&(e.level=s),l&&e.type!=="transaction"&&(e.transaction=l)}function DV(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function LV(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function FV(e,t){e.contexts={trace:R4(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Wn(t),...e.sdkProcessingMetadata};const n=Tt(t),r=Me(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function BV(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function UV(e,t){const n=Kc(e),r=Xc(e),o=Kc(r),{isolationScope:i,scope:s}=Za(e),l=ol(i,s);VV(n,o,t,l);const c=e.kind;HV(n,c),n.is_segment&&t.emit("processSegmentSpan",n),t.emit("processSpan",n);const{beforeSendSpan:d}=t.getOptions(),f=d&&ed(d)?jV(n,d):n,u=f.attributes?.[Pt];return u&&Yn(f,{"sentry.span.source":u}),{...WU(f),_segmentSpan:r}}function VV(e,t,n,r){const o=n.getSdkMetadata(),{release:i,environment:s,sendDefaultPii:l}=n.getOptions();Yn(e,{[hU]:i,[gU]:s,[yU]:t.name,[bU]:t.span_id,[EU]:o?.sdk?.name,[$U]:o?.sdk?.version,...l?{[SU]:r.user?.id,[vU]:r.user?.email,[TU]:r.user?.ip_address,[wU]:r.user?.username}:{},...r.attributes})}function jV(e,t){const n=t(e);return n||(Jc(),e)}function Yn(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}const zV=1,qV=2;function HV(e,t){const n=e.attributes;if(!n)return;const r=n["http.request.method"]||n["http.method"];if(r){WV(e,n,t,r);return}const o=n["db.system.name"]||n["db.system"],i=typeof n[tt]=="string"&&`${n[tt]}`.startsWith("cache.");if(o&&!i){GV(e,n);return}if(n["rpc.service"]){Yn(e,{[tt]:"rpc"});return}if(n["messaging.system"]){Yn(e,{[tt]:"message"});return}const s=n["faas.trigger"];s&&Yn(e,{[tt]:`${s}`})}function WV(e,t,n,r){const o=["http"];n===qV?o.push("client"):n===zV&&o.push("server"),t["sentry.http.prefetch"]&&o.push("prefetch"),Yn(e,{[tt]:o.join(".")});const i=t[Ka];if(typeof i=="string"){e.name=i;return}if(t[Pt]==="custom")return;const s=t["http.route"];typeof s=="string"?(e.name=`${r} ${s}`,Yn(e,{[Pt]:"route"})):Yn(e,{[Pt]:"url"})}function GV(e,t){Yn(e,{[tt]:"db"});const n=t[Ka];if(typeof n=="string"){e.name=n;return}if(t[Pt]==="custom")return;const r=t["db.statement"];r&&(e.name=`${r}`,Yn(e,{[Pt]:"task"}))}const Mm=0,p9=1,m9=2;function il(e){return new sl(t=>{t(e)})}function Dm(e){return new sl((t,n)=>{n(e)})}class sl{constructor(t){this._state=Mm,this._handlers=[],this._runExecutor(t)}then(t,n){return new sl((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(s){o(s)}},i=>{if(!n)o(i);else try{r(n(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new sl((n,r)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}_executeHandlers(){if(this._state===Mm)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===p9&&n[1](this._value),this._state===m9&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,s)=>{if(this._state===Mm){if(ti(s)){s.then(r,o);return}this._state=i,this._value=s,this._executeHandlers()}},r=i=>{n(p9,i)},o=i=>{n(m9,i)};try{t(r,o)}catch(i){o(i)}}}function YV(e,t,n,r=0){try{const o=Lm(t,n,e,r);return ti(o)?o:il(o)}catch(o){return Dm(o)}}function Lm(e,t,n,r){const o=n[r];if(!e||!o)return e;const i=o({...e},t);return ue&&i===null&&P.log(`Event processor "${o.id||"?"}" dropped event`),ti(i)?i.then(s=>Lm(s,t,n,r+1)):Lm(i,t,n,r+1)}let ci,_9,h9,wo;function g9(e){const t=Te._sentryDebugIds,n=Te._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(wo&&r.length===_9&&o.length===h9)return wo;_9=r.length,h9=o.length,wo={},ci||(ci={});const i=(s,l)=>{for(const c of s){const d=l[c],f=ci?.[c];if(f&&wo&&d)wo[f[0]]=d,ci&&(ci[c]=[f[0],d]);else if(d){const u=e(c);for(let p=u.length-1;p>=0;p--){const _=u[p]?.filename;if(_&&wo&&ci){wo[_]=d,ci[c]=[_,d];break}}}}};return t&&i(r,t),n&&i(o,n),wo}function KV(e,t){const n=g9(e);if(!n)return[];const r=[];for(const o of t){const i=BB(o);i&&n[i]&&r.push({type:"sourcemap",code_file:o,debug_id:n[i]})}return r}function y9(e,t,n,r,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:l=1e3}=e,c={...t,event_id:t.event_id||n.event_id||jt(),timestamp:t.timestamp||oi()},d=n.integrations||e.integrations.map(h=>h.name);XV(c,e),QV(c,d),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&JV(c,e.stackParser);const f=tj(r,n.captureContext);n.mechanism&&Yr(c,n.mechanism);const u=o?o.getEventProcessors():[],p=ol(i,f),m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),PV(c,p);const _=[...u,...p.eventProcessors];return(n.data&&n.data.__sentry__===!0?il(c):YV(_,c,n)).then(h=>(h&&ZV(h),typeof s=="number"&&s>0?ej(h,s,l):h))}function XV(e,t){const{environment:n,release:r,dist:o,maxValueLength:i}=t;e.environment=e.environment||n||Zc,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const s=e.request;s?.url&&i&&(s.url=za(s.url,i)),i&&e.exception?.values?.forEach(l=>{l.value&&(l.value=za(l.value,i))})}function JV(e,t){const n=g9(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function ZV(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function QV(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function ej(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:tn(o.data,t,n)}}))},...e.user&&{user:tn(e.user,t,n)},...e.contexts&&{contexts:tn(e.contexts,t,n)},...e.extra&&{extra:tn(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=tn(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:tn(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=tn(e.contexts.flags,3,n)),r}function tj(e,t){if(!t)return e;const n=e?e.clone():new ir;return n.update(t),n}function nj(e){if(e)return rj(e)?{captureContext:e}:ij(e)?{captureContext:e}:e}function rj(e){return e instanceof ir||typeof e=="function"}const oj=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function ij(e){return Object.keys(e).some(t=>oj.includes(t))}function lt(e,t){return Re().captureException(e,nj(t))}function b9(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return Re().captureMessage(e,n,r)}function rs(e,t){return Re().captureEvent(e,t)}function E9(e,t){vt().setContext(e,t)}function sj(e){vt().setExtras(e)}function aj(e,t){vt().setExtra(e,t)}function lj(e){vt().setTags(e)}function cj(e,t){vt().setTag(e,t)}function dj(e){vt().setUser(e)}function uj(e){vt().setConversationId(e)}function $9(){return vt().lastEventId()}async function fj(e){const t=_e();return t?t.flush(e):(ue&&P.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function pj(e){const t=_e();return t?t.close(e):(ue&&P.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function mj(){return!!_e()}function S9(){const e=_e();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function v9(e){vt().addEventProcessor(e)}function Fm(e){const t=vt(),{user:n}=ol(t,Re()),{userAgent:r}=Te.navigator||{},o=tU({user:n,...r&&{userAgent:r},...e}),i=t.getSession();return i?.status==="ok"&&Zi(i,{status:"exited"}),Bm(),t.setSession(o),o}function Bm(){const e=vt(),n=Re().getSession()||e.getSession();n&&nU(n),T9(),e.setSession()}function T9(){const e=vt(),t=_e(),n=e.getSession();n&&t&&t.captureSession(n)}function id(e=!1){if(e){Bm();return}T9()}const _j="7";function w9(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function hj(e){return`${w9(e)}${e.projectId}/envelope/`}function gj(e,t){const n={sentry_version:_j};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function k9(e,t,n){return t||`${hj(e)}?${gj(e,n)}`}function yj(e,t){const n=k4(e);if(!n)return"";const r=`${w9(n)}embed/error-page/`;let o=`dsn=${Sr(n)}`;for(const i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){const s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${o}`}const A9=[];function bj(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Ej(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return bj(r)}function $j(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&I9(e,r,n)}),n}function N9(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function I9(e,t,n){if(n[t.name]){ue&&P.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!A9.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),A9.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>r(o,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((i,s)=>r(i,s,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{const o=t[r];typeof o=="function"&&e.on(r,i=>o.call(t,i,e))}),ue&&P.log(`Integration installed: ${t.name}`)}function Um(e){const t=_e();if(!t){ue&&P.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function K2e(e){return e}const Sj="sentry.timestamp.sequence";let Vm=0,jm;function C9(e){const t=Math.floor(e*1e3);jm!==void 0&&t!==jm&&(Vm=0);const n=Vm;return Vm++,jm=t,{key:Sj,value:{value:n,type:"integer"}}}function x9(e,t){return t?Hn(t,()=>{const n=wt(),r=n?R4(n):_4(t);return[n?Wn(n):km(e,t),r]}):[void 0,void 0]}const vj={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Tj(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function wj(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Sr(r)),Gn(o,[Tj(e)])}const kj=100;function wr(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Aj(e,t){const n=zm(),r=O9(e);r===void 0?n.set(e,[t]):r.length>=kj?(ad(e,r),n.set(e,[t])):n.set(e,[...r,t])}function sd(e,t=Re(),n=Aj){const r=t?.getClient()??_e();if(!r){ue&&P.warn("No client available to capture log.");return}const{release:o,environment:i,enableLogs:s=!1,beforeSendLog:l}=r.getOptions();if(!s){ue&&P.warn("logging option not enabled, log will not be captured.");return}const[,c]=x9(r,t),d={...e.attributes},{user:{id:f,email:u,username:p},attributes:m={}}=ol(vt(),t);wr(d,"user.id",f,!1),wr(d,"user.email",u,!1),wr(d,"user.name",p,!1),wr(d,"sentry.release",o),wr(d,"sentry.environment",i);const{name:_,version:b}=r.getSdkMetadata()?.sdk??{};wr(d,"sentry.sdk.name",_),wr(d,"sentry.sdk.version",b);const g=r.getIntegrationByName("Replay"),h=g?.getReplayId(!0);wr(d,"sentry.replay_id",h),h&&g?.getRecordingMode()==="buffer"&&wr(d,"sentry._internal.replay_is_buffering",!0);const y=e.message;if(zc(y)){const{__sentry_template_string__:R,__sentry_template_values__:I=[]}=y;I?.length&&(d["sentry.message.template"]=R),I.forEach((V,j)=>{d[`sentry.message.parameter.${j}`]=V})}const E=Qi(t);wr(d,"sentry.trace.parent_span_id",E?.spanContext().spanId);const $={...e,attributes:d};r.emit("beforeCaptureLog",$);const O=l?nr(()=>l($)):$;if(!O){r.recordDroppedEvent("before_send","log_item",1),ue&&P.warn("beforeSendLog returned null, log will not be captured.");return}const{level:N,message:v,attributes:B={},severityNumber:H}=O,U=ut(),C=C9(U),A={timestamp:U,level:N,body:v,trace_id:c?.trace_id,severity_number:H??vj[N],attributes:{...ts(m),...ts(B,!0),[C.key]:C.value}};n(r,A),r.emit("afterCaptureLog",O)}function ad(e,t){const n=t??O9(e)??[];if(n.length===0)return;const r=e.getOptions(),o=wj(n,r._metadata,r.tunnel,e.getDsn());zm().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function O9(e){return zm().get(e)}function zm(){return Ki("clientToLogBufferMap",()=>new WeakMap)}function Nj(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function Ij(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Sr(r)),Gn(o,[Nj(e)])}const Cj=1e3;function eo(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function xj(e,t){const n=Hm(),r=R9(e);r===void 0?n.set(e,[t]):r.length>=Cj?(qm(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Oj(e,t,n){const{release:r,environment:o}=t.getOptions(),i={...e.attributes};eo(i,"user.id",n.id,!1),eo(i,"user.email",n.email,!1),eo(i,"user.name",n.username,!1),eo(i,"sentry.release",r),eo(i,"sentry.environment",o);const{name:s,version:l}=t.getSdkMetadata()?.sdk??{};eo(i,"sentry.sdk.name",s),eo(i,"sentry.sdk.version",l);const c=t.getIntegrationByName("Replay"),d=c?.getReplayId(!0);return eo(i,"sentry.replay_id",d),d&&c?.getRecordingMode()==="buffer"&&eo(i,"sentry._internal.replay_is_buffering",!0),{...e,attributes:i}}function Rj(e,t,n,r){const[,o]=x9(t,n),i=Qi(n),s=i?i.spanContext().traceId:o?.trace_id,l=i?i.spanContext().spanId:void 0,c=ut(),d=C9(c);return{timestamp:c,trace_id:s??"",span_id:l,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...ts(r),...ts(e.attributes,"skip-undefined"),[d.key]:d.value}}}function Pj(e,t){const n=t?.scope??Re(),r=t?.captureSerializedMetric??xj,o=n?.getClient()??_e();if(!o){ue&&P.warn("No client available to capture metric.");return}const{_experiments:i,enableMetrics:s,beforeSendMetric:l}=o.getOptions();if(!(s??i?.enableMetrics??!0)){ue&&P.warn("metrics option not enabled, metric will not be captured.");return}const{user:d,attributes:f}=ol(vt(),n),u=Oj(e,o,d);o.emit("processMetric",u);const p=l||i?.beforeSendMetric,m=p?p(u):u;if(!m){ue&&P.log("`beforeSendMetric` returned `null`, will not send metric.");return}const _=Rj(m,o,n,f);ue&&P.log("[Metric]",_),r(o,_),o.emit("afterCaptureMetric",m)}function qm(e,t){const n=t??R9(e)??[];if(n.length===0)return;const r=e.getOptions(),o=Ij(n,r._metadata,r.tunnel,e.getDsn());Hm().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function R9(e){return Hm().get(e)}function Hm(){return Ki("clientToMetricBufferMap",()=>new WeakMap)}function ld(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const Wm=Symbol.for("SentryBufferFullError");function Gm(e=100){const t=new Set;function n(){return t.size<e}function r(s){t.delete(s)}function o(s){if(!n())return Dm(Wm);const l=s();return t.add(l),l.then(()=>r(l),()=>r(l)),l}function i(s){if(!t.size)return il(!0);const l=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return l;const c=[l,new Promise(d=>ld(setTimeout(()=>d(!1),s)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:i}}const Mj=60*1e3;function P9(e,t=ja()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Mj:r-t}function Dj(e,t){return e[t]||e.all||0}function M9(e,t,n=ja()){return Dj(e,t)>n}function D9(e,{statusCode:t,headers:n},r=ja()){const o={...e},i=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(i)for(const l of i.trim().split(",")){const[c,d,,,f]=l.split(":",5),u=parseInt(c,10),p=(isNaN(u)?60:u)*1e3;if(!d)o.all=r+p;else for(const m of d.split(";"))m==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(o[m]=r+p):o[m]=r+p}else s?o.all=r+P9(s,r):t===429&&(o.all=r+60*1e3);return o}const L9=64;function F9(e,t,n=Gm(e.bufferSize||L9)){let r={};const o=s=>n.drain(s);function i(s){const l=[];if(li(s,(u,p)=>{const m=Q4(p);M9(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):l.push(u)}),l.length===0)return Promise.resolve({});const c=Gn(s[0],l),d=u=>{if(Nm(c,["client_report"])){ue&&P.warn(`Dropping client report. Will not send outcomes (reason: ${u}).`);return}li(c,(p,m)=>{e.recordDroppedEvent(u,Q4(m))})},f=()=>t({body:nd(c)}).then(u=>u.statusCode===413?(ue&&P.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),d("send_error"),u):(ue&&u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&P.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),r=D9(r,u),u),u=>{throw d("network_error"),ue&&P.error("Encountered error running transport request:",u),u});return n.add(f).then(u=>u,u=>{if(u===Wm)return ue&&P.error("Skipped sending event because buffer is full."),d("queue_overflow"),Promise.resolve({});throw u})}return{send:i,flush:o}}function Lj(e,t,n){const r=[{type:"client_report"},{timestamp:oi(),discarded_events:e}];return Gn(t?{dsn:t}:{},[r])}function B9(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Fj(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:s,op:l}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:l,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[vm],exclusive_time:s?.[To],measurements:e.measurements,is_segment:!0}}function Bj(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[vm]:e.profile_id},...e.exclusive_time&&{[To]:e.exclusive_time}}}},measurements:e.measurements}}const U9="Not capturing exception because it's already been captured.",V9="Discarded session because of missing or non-string release",j9=Symbol.for("SentryInternalError"),z9=Symbol.for("SentryDoNotSendEventError"),Uj=5e3;function cd(e){return{message:e,[j9]:!0}}function Ym(e){return{message:e,[z9]:!0}}function q9(e){return!!e&&typeof e=="object"&&j9 in e}function H9(e){return!!e&&typeof e=="object"&&z9 in e}function W9(e,t,n,r,o){let i=0,s,l=!1;e.on(n,()=>{i=0,clearTimeout(s),l=!1}),e.on(t,c=>{i+=r(c),i>=8e5?o(e):l||(l=!0,s=ld(setTimeout(()=>{o(e)},Uj)))}),e.on("flush",()=>{o(e)})}class Vj{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Gm(t.transportOptions?.bufferSize??L9),t.dsn?this._dsn=k4(t.dsn):ue&&P.warn("No DSN provided, client will not send events."),this._dsn){const r=k9(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&W9(this,"afterCaptureLog","flushLogs",Hj,ad),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&W9(this,"afterCaptureMetric","flushMetrics",qj,qm)}captureException(t,n,r){const o=jt();if(s4(t))return ue&&P.log(U9),o;const i={event_id:o,...n};return this._process(()=>this.eventFromException(t,i).then(s=>this._captureEvent(s,i,r)).then(s=>s),"error"),i.event_id}captureMessage(t,n,r,o){const i={event_id:jt(),...r},s=zc(t)?t:String(t),l=Hr(t),c=l?this.eventFromMessage(s,n,i):this.eventFromException(t,i);return this._process(()=>c.then(d=>this._captureEvent(d,i,o)),l?"unknown":"error"),i.event_id}captureEvent(t,n,r){const o=jt();if(n?.originalException&&s4(n.originalException))return ue&&P.log(U9),o;const i={event_id:o,...n},s=t.sdkProcessingMetadata||{},l=s.capturedSpanScope,c=s.capturedSpanIsolationScope,d=G9(t.type);return this._process(()=>this._captureEvent(t,i,l||r,c),d),i.event_id}captureSession(t){this.sendSession(t),Zi(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){ad(this);const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),I9(this,t,this._integrations),n||N9(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=yV(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=cV(r,mV(o));this.sendEnvelope(r).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){const{release:n,environment:r=Zc}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){ue&&P.warn(V9);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){ue&&P.warn(V9);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=gV(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;ue&&P.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,o=(...i)=>n(...i);return r.add(o),()=>{r.delete(o)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return ue&&P.error("Error while sending envelope:",n),{}}return ue&&P.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=$j(this,t),N9(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1;const i=n.exception?.values;if(i){o=!0,r=!1;for(const c of i)if(c.mechanism?.handled===!1){r=!0;break}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(Zi(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){const i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),y9(i,t,n,r,this,o).then(l=>{if(l===null)return l;this.emit("postprocessEvent",l,n),l.contexts={trace:{...l.contexts?.trace,..._4(r)},...l.contexts};const c=km(this,r);return l.sdkProcessingMetadata={dynamicSamplingContext:c,...l.sdkProcessingMetadata},l})}_captureEvent(t,n={},r=Re(),o=vt()){return ue&&Km(t)&&P.log(`Captured error event \`${B9(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(i=>i.event_id,i=>{ue&&(H9(i)?P.log(i.message):q9(i)?P.warn(i.message):P.warn(i))})}_processEvent(t,n,r,o){const i=this.getOptions(),{sampleRate:s}=i,l=Y9(t),c=Km(t),f=`before send for type \`${t.type||"error"}\``,u=typeof s>"u"?void 0:si(s);if(c&&typeof u=="number"&&Gr()>u)return this.recordDroppedEvent("sample_rate","error"),Dm(Ym(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const p=G9(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",p),Ym("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return m;const b=zj(this,i,m,n);return jj(b,f)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",p),l){const h=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",h)}throw Ym(`${f} returned \`null\`, will not send event.`)}const _=r.getSession()||o.getSession();if(c&&_&&this._updateSessionFromEvent(_,m),l){const g=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,h=m.spans?m.spans.length:0,y=g-h;y>0&&this.recordDroppedEvent("before_send","span",y)}const b=m.transaction_info;if(l&&b&&m.transaction!==t.transaction){const g="custom";m.transaction_info={...b,source:g}}return this.sendEvent(m,n),m}).then(null,m=>{throw H9(m)||q9(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),cd(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
38
|
-
Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Wm&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){ue&&P.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){ue&&P.log("No outcomes to send");return}if(!this._dsn){ue&&P.log("No dsn provided, will not send outcomes");return}ue&&P.log("Sending outcomes:",t);const n=Lj(t,this._options.tunnel&&Sr(this._dsn));this.sendEnvelope(n)}}function G9(e){return e==="replay_event"?"replay":e||"error"}function jj(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ti(e))return e.then(r=>{if(!An(r)&&r!==null)throw cd(n);return r},r=>{throw cd(`${t} rejected with ${r}`)});if(!An(e)&&e!==null)throw cd(n);return e}function zj(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,ignoreSpans:s}=t,l=!ed(t.beforeSendSpan)&&t.beforeSendSpan;let c=n;if(Km(c)&&o)return o(c,r);if(Y9(c)){if(l||s){const d=Fj(c);if(s?.length&&el({description:d.description,op:d.op,attributes:d.data},s))return null;if(l){const f=l(d);f?c=Ha(n,Bj(f)):Jc()}if(c.spans){const f=[],u=c.spans;for(const m of u){if(s?.length&&el({description:m.description,op:m.op,attributes:m.data},s)){XU(u,m);continue}if(l){const _=l(m);_?f.push(_):(Jc(),f.push(m))}else f.push(m)}const p=c.spans.length-f.length;p&&e.recordDroppedEvent("before_send","span",p),c.spans=f}}if(i){if(c.spans){const d=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:d}}return i(c,r)}}return c}function Km(e){return e.type===void 0}function Y9(e){return e.type==="transaction"}function qj(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+K9(e.attributes)}function Hj(e){let t=0;return e.message&&(t+=e.message.length*2),t+K9(e.attributes)}function K9(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*X9(n[0]):Hr(n)?t+=X9(n):t+=100}),t}function X9(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Wj(e){return qr(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function J9(e){return Wj(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Gj(e,t){t.debug===!0&&(ue?P.enable():nr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Re().update(t.initialScope);const r=new e(t);return Z9(r),r.init(),r}function Z9(e){Re().setClient(e)}const Xm=100,Jm=5e3,Yj=36e5;function Kj(e){function t(...n){ue&&P.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let i=Jm,s;function l(u,p,m){return Nm(u,["client_report"])?!1:n.shouldStore?n.shouldStore(u,p,m):!0}function c(u){s&&clearTimeout(s),s=ld(setTimeout(async()=>{s=void 0;const p=await o.shift();p&&(t("Attempting to send previously queued event"),p[0].sent_at=new Date().toISOString(),f(p,!0).catch(m=>{t("Failed to retry sending",m)}))},u))}function d(){s||(c(i),i=Math.min(i*2,Yj))}async function f(u,p=!1){if(!p&&Nm(u,["replay_event","replay_recording"]))return await o.push(u),c(Xm),{};try{if(n.shouldSend&&await n.shouldSend(u)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const m=await r.send(u);let _=Xm;if(m){if(m.headers?.["retry-after"])_=P9(m.headers["retry-after"]);else if(m.headers?.["x-sentry-rate-limits"])_=6e4;else if((m.statusCode||0)>=400)return m}return c(_),i=Jm,m}catch(m){if(await l(u,m,i))return p?await o.unshift(u):await o.push(u),d(),t("Error sending. Event queued.",m),{};throw m}}return n.flushAtStartup&&d(),{send:f,flush:u=>(u===void 0&&(i=Jm,c(Xm)),r.flush(u))}}}const dd="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function Q9(e,t){let n;return li(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Xj(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const i=Q9(o,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(o)}}}}function Jj(e,t){return Gn(t?{...e[0],dsn:t}:e[0],e[1])}function Zj(e,t){return n=>{const r=e(n),o=new Map,i=t||(d=>{const f=d.getEvent();return f?.extra?.[dd]&&Array.isArray(f.extra[dd])?f.extra[dd]:[]});function s(d,f){const u=f?`${d}:${f}`:d;let p=o.get(u);if(!p){const m=v4(d);if(!m)return;const _=k9(m,n.tunnel);p=f?Xj(e,f)({...n,url:_}):e({...n,url:_}),o.set(u,p)}return[d,p]}async function l(d){function f(_){const b=_?.length?_:["event"];return Q9(d,b)}const u=i({envelope:d,getEvent:f}).map(_=>typeof _=="string"?s(_,void 0):s(_.dsn,_.release)).filter(_=>!!_),p=u.length?u:[["",r]];return(await Promise.all(p.map(([_,b])=>b.send(Jj(d,_)))))[0]}async function c(d){const f=[...o.values(),r];return(await Promise.all(f.map(p=>p.flush(d)))).every(p=>p)}return{send:l,flush:c}}}const Qj="thismessage:/";function Zm(e){return"isRelative"in e}function Qm(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?Qj:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function ez(e){if(Zm(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function di(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function eE(e){return e.split(/[?#]/,1)[0]}function ko(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(",");let s="";if(t&&i!==-1){const l=e.slice(i+1);s=l.length>10?`${l.slice(0,10)}... [truncated]`:l}return`data:${r}${o?",base64":""}${s?`,${s}`:""}`}return e}function tE(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return nz(e,n)||tz(e,r)}function tz(e,t){return t?nE(e)===nE(t):!1}function nz(e,t){const n=Qm(e);return!n||Zm(n)||!t?!1:rz(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function rz(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function nE(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function rE(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const oz=rE;function iz(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function oE(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(i=>({name:`${r}:@sentry/${i}`,version:Vr})),o.version=Vr)}function
|
|
37
|
+
`)}`)}function $V(e){if(!ue)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Me(e),{spanId:r}=e.spanContext(),i=Tt(e)===e,s=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;P.log(s)}function t9(e,t,n,r=wt()){const o=r&&Tt(r);o&&(ue&&P.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Ya]:t,[Ga]:n}))}function n9(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[Ga],i=r[Ya];typeof o=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:o})}),t}function Zr(e){return e.getOptions().traceLifecycle==="stream"}const r9=1e3;class rd{constructor(t={}){this._traceId=t.traceId||Er(),this._spanId=t.spanId||Kr(),this._startTime=t.startTimestamp||ut(),this._links=t.links,this._attributes={},this.setAttributes({[We]:"manual",[tt]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Yc:x4}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Xr(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Pt,"custom"),this}end(t){this._endTime||(this._endTime=Xr(t),$V(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[tt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:V4(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[We],profile_id:this._attributes[vm],exclusive_time:this._attributes[To],measurements:n9(this._events),is_segment:this._isStandaloneSpan&&Tt(this)===this||void 0,segment_id:this._isStandaloneSpan?Tt(this).spanContext().spanId:void 0,links:M4(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===Tt(this),status:j4(this._status),attributes:this._attributes,links:D4(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){ue&&P.log("[Tracing] Adding an event to span:",t);const o=o9(n)?n:r||ut(),i=o9(n)?{}:n||{},s={name:t,time:Xr(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=_e();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===Tt(this)))return;if(this._isStandaloneSpan){this._sampled?vV(bV([this],t)):(ue&&P.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}else if(t&&Zr(t)){t.emit("afterSegmentSpanEnd",this);return}const r=this._convertSpanToTransaction();r&&(Za(this).scope||Re()).captureEvent(r)}_convertSpanToTransaction(){if(!i9(Me(this)))return;this._name||(ue&&P.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Za(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const i=Qa(this).filter(f=>f!==this&&!SV(f)).map(f=>Me(f)).filter(i9),s=this._attributes[Pt];delete this._attributes[Ka],i.forEach(f=>{delete f.data[Ka]});const l={contexts:{trace:qU(this)},spans:i.length>r9?i.sort((f,u)=>f.start_timestamp-u.start_timestamp).slice(0,r9):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Wn(this)},request:r,...s&&{transaction_info:{source:s}}},c=n9(this._events);return c&&Object.keys(c).length&&(ue&&P.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),l.measurements=c),l}}function o9(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function i9(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function SV(e){return e instanceof rd&&e.isStandaloneSpan()}function vV(e){const t=_e();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Im(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(i){throw t(i),n(),i}return TV(o,t,n,r)}function TV(e,t,n,r){return ti(e)?u4(e,o=>{n(),r(o)},o=>{t(o),n()}):(n(),r(e),e)}function wV(e,t,n){if(!Mn(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:l=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):l}),r=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);const i=si(o);if(i===void 0)return ue&&P.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return ue&&P.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];const s=n<i;return s||ue&&P.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[s,i,r]}const Cm="__SENTRY_SUPPRESS_TRACING__";function vr(e,t){const n=ns();if(n.startSpan)return n.startSpan(e,t);const r=Om(e),{forceTransaction:o,parentSpan:i,scope:s}=e,l=s?.clone();return Hn(l,()=>c9(i)(()=>{const d=Re(),f=Rm(d,i),u=_e(),p=e.onlyIfParent&&!f,m=p?new Dn:xm({parentSpan:f,spanArguments:r,forceTransaction:o,scope:d});return p&&u?.recordDroppedEvent("no_parent_span","span"),(!d9(m)||!f)&&$r(d,m),Im(()=>t(m),()=>{const{status:_}=Me(m);m.isRecording()&&(!_||_==="ok")&&m.setStatus({code:Ge,message:"internal_error"})},()=>{m.end()})}))}function Qr(e,t){const n=ns();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Om(e),{forceTransaction:o,parentSpan:i,scope:s}=e,l=s?.clone();return Hn(l,()=>c9(i)(()=>{const d=Re(),f=Rm(d,i),u=e.onlyIfParent&&!f,p=u?new Dn:xm({parentSpan:f,spanArguments:r,forceTransaction:o,scope:d});return u&&_e()?.recordDroppedEvent("no_parent_span","span"),(!d9(p)||!f)&&$r(d,p),Im(()=>t(p,()=>p.end()),()=>{const{status:m}=Me(p);p.isRecording()&&(!m||m==="ok")&&p.setStatus({code:Ge,message:"internal_error"})})}))}function Tr(e){const t=ns();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Om(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?s=>Hn(e.scope,s):o!==void 0?s=>nl(o,s):s=>s())(()=>{const s=Re(),l=Rm(s,o),c=_e();return e.onlyIfParent&&!l?(c?.recordDroppedEvent("no_parent_span","span"),new Dn):xm({parentSpan:l,spanArguments:n,forceTransaction:r,scope:s})})}const kV=(e,t)=>{const n=jr(),r=vo(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:i}=e,s=_e(),l=Tm(i);return s&&!zU(s,l?.org_id)?a9(t):Hn(c=>{const d=N4(o,i);return c.setPropagationContext(d),$r(c,void 0),t()})};function nl(e,t){const n=ns();return n.withActiveSpan?n.withActiveSpan(e,t):Hn(r=>($r(r,e||void 0),t(r)))}function s9(e){const t=ns();return t.suppressTracing?t.suppressTracing(e):Hn(n=>{n.setSDKProcessingMetadata({[Cm]:!0});const r=e();return n.setSDKProcessingMetadata({[Cm]:void 0}),r})}function a9(e){const t=ns();return t.startNewTrace?t.startNewTrace(e):Hn(n=>(n.setPropagationContext({traceId:Er(),sampleRand:Gr()}),ue&&P.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),nl(null,e)))}function xm({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Mn()){const l=new Dn;if(n||!e){const c={sampled:"false",sample_rate:"0",transaction:t.name,...Wn(l)};Qc(l,c)}return l}const o=_e();if(NV(o,t))return Pm(r)||o?.recordDroppedEvent("ignored","span"),new Dn({dropReason:"ignored",traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});const i=vt();let s;if(e&&!n)s=AV(e,r,t),z4(e,s);else if(e){const l=Wn(e),{traceId:c,spanId:d}=e.spanContext(),f=Jr(e);s=l9({traceId:c,parentSpanId:d,...t},r,f),Qc(s,l)}else{const{traceId:l,dsc:c,parentSpanId:d,sampled:f}={...i.getPropagationContext(),...r.getPropagationContext()};s=l9({traceId:l,parentSpanId:d,...t},r,f),c&&Qc(s,c)}return EV(s),OU(s,r,i),s}function Om(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Xr(e.startTime),delete r.startTime,r}return n}function ns(){const e=jr();return vo(e)}function l9(e,t,n){const r=_e(),o=r?.getOptions()||{},{name:i=""}=e,s={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});const l=s.parentSampled??n,c=s.spanAttributes,d=t.getPropagationContext(),f=Pm(t),[u,p,m]=f?[!1]:wV(o,{name:i,parentSampled:l,attributes:c,parentSampleRate:si(d.dsc?.sample_rate)},d.sampleRand),_=new rd({...e,attributes:{[Pt]:"custom",[Wc]:p!==void 0&&m?p:void 0,...c},sampled:u});return!u&&r&&!f&&(ue&&P.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate",Zr(r)?"span":"transaction")),r&&r.emit("spanStart",_),_}function AV(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),i=Pm(t),s=i?!1:Jr(e),l=s?new rd({...n,parentSpanId:r,traceId:o,sampled:s}):new Dn({traceId:o});z4(e,l);const c=_e();return c&&(Zr(c)&&l instanceof Dn&&(e instanceof Dn&&e.dropReason?(l.dropReason=e.dropReason,c.recordDroppedEvent(e.dropReason,"span")):i||(l.dropReason="sample_rate",c.recordDroppedEvent("sample_rate","span"))),c.emit("spanStart",l),n.endTimestamp&&(c.emit("spanEnd",l),c.emit("afterSpanEnd",l))),l}function Rm(e,t){if(t)return t;if(t===null)return;const n=Qi(e);if(!n)return;const r=_e();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Tt(n):n}function c9(e){return e!==void 0?t=>nl(e,t):t=>t()}function NV(e,t){const n=e?.getOptions().ignoreSpans;return!e||!Zr(e)||!n?.length?!1:el({description:t.name||"",op:t.attributes?.[tt]||t.op,attributes:t.attributes},n)}function d9(e){return e instanceof Dn&&e.dropReason==="ignored"}function Pm(e){return e.getScopeData().sdkProcessingMetadata[Cm]===!0}const od={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},IV="heartbeatFailed",CV="idleTimeout",xV="finalTimeout",OV="externalFinish";function u9(e,t={}){const n=new Map;let r=!1,o,i=OV,s=!t.disableAutoFinish;const l=[],{idleTimeout:c=od.idleTimeout,finalTimeout:d=od.finalTimeout,childSpanTimeout:f=od.childSpanTimeout,beforeSpanEnd:u,trimIdleSpanEndTimestamp:p=!0}=t,m=_e();if(!m||!Mn()){const v=new Dn,B={sample_rate:"0",sampled:"false",...Wn(v)};return Qc(v,B),v}const _=Re(),b=wt(),g=RV(e);g.end=new Proxy(g.end,{apply(v,B,H){if(u&&u(g),B instanceof Dn)return;const[U,...C]=H,A=U||ut(),R=Xr(A),I=Qa(g).filter(W=>W!==g),V=Me(g);if(!I.length||!p)return N(R),Reflect.apply(v,B,[R,...C]);const j=m.getOptions().ignoreSpans,F=I?.reduce((W,K)=>{const te=Me(K);return!te.timestamp||j&&el({description:te.description,op:te.op,attributes:te.data},j)?W:W?Math.max(W,te.timestamp):te.timestamp},void 0),M=V.start_timestamp,Y=Math.min(M?M+d/1e3:1/0,Math.max(M||-1/0,Math.min(R,F||1/0)));return N(Y),Reflect.apply(v,B,[Y,...C])}});function h(){o&&(clearTimeout(o),o=void 0)}function y(v){h(),o=setTimeout(()=>{!r&&n.size===0&&s&&(i=CV,g.end(v))},c)}function E(v){o=setTimeout(()=>{!r&&s&&(i=IV,g.end(v))},f)}function $(v){h(),n.set(v,!0);const B=ut();E(B+f/1e3)}function O(v){if(n.has(v)&&n.delete(v),n.size===0){const B=ut();y(B+c/1e3)}}function N(v){r=!0,n.clear(),l.forEach(I=>I()),$r(_,b);const B=Me(g),{start_timestamp:H}=B;if(!H)return;B.data[Wa]||g.setAttribute(Wa,i);const C=B.status;(!C||C==="unknown")&&g.setStatus({code:Xa}),P.log(`[Tracing] Idle span "${B.op}" finished`);const A=Qa(g).filter(I=>I!==g);let R=0;A.forEach(I=>{I.isRecording()&&(I.setStatus({code:Ge,message:"cancelled"}),I.end(v),ue&&P.log("[Tracing] Cancelling span since span ended early",JSON.stringify(I,void 0,2)));const V=Me(I),{timestamp:j=0,start_timestamp:F=0}=V,M=F<=v,Y=(d+c)/1e3,W=j-F<=Y;if(ue){const K=JSON.stringify(I,void 0,2);M?W||P.log("[Tracing] Discarding span since it finished after idle span final timeout",K):P.log("[Tracing] Discarding span since it happened after idle span was finished",K)}(!W||!M)&&(GU(g,I),R++)}),R>0&&g.setAttribute("sentry.idle_span_discarded_spans",R)}return l.push(m.on("spanStart",v=>{if(r||v===g||Me(v).timestamp||v instanceof rd&&v.isStandaloneSpan())return;Qa(g).includes(v)&&$(v.spanContext().spanId)})),l.push(m.on("spanEnd",v=>{r||O(v.spanContext().spanId)})),l.push(m.on("idleSpanEnableAutoFinish",v=>{v===g&&(s=!0,y(),n.size&&E())})),t.disableAutoFinish||y(),setTimeout(()=>{r||(g.setStatus({code:Ge,message:"deadline_exceeded"}),i=xV,g.end())},d),g}function RV(e){const t=Tr(e);return $r(Re(),t),ue&&P.log("[Tracing] Started span is an idle span"),t}function PV(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;MV(e,t),r&&FV(e,r),BV(e,n),DV(e,o),LV(e,i)}function f9(e,t){const{extra:n,tags:r,attributes:o,user:i,contexts:s,level:l,sdkProcessingMetadata:c,breadcrumbs:d,fingerprint:f,eventProcessors:u,attachments:p,propagationContext:m,transactionName:_,span:b}=t;rl(e,"extra",n),rl(e,"tags",r),rl(e,"attributes",o),rl(e,"user",i),rl(e,"contexts",s),e.sdkProcessingMetadata=Ha(e.sdkProcessingMetadata,c,2),l&&(e.level=l),_&&(e.transactionName=_),b&&(e.span=b),d.length&&(e.breadcrumbs=[...e.breadcrumbs,...d]),f.length&&(e.fingerprint=[...e.fingerprint,...f]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...m}}function rl(e,t,n){e[t]=Ha(e[t],n,1)}function ol(e,t){const n=ii().getScopeData();return e&&f9(n,e.getScopeData()),t&&f9(n,t.getScopeData()),n}function MV(e,t){const{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:l}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),s&&(e.level=s),l&&e.type!=="transaction"&&(e.transaction=l)}function DV(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function LV(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function FV(e,t){e.contexts={trace:R4(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Wn(t),...e.sdkProcessingMetadata};const n=Tt(t),r=Me(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function BV(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function UV(e,t){const n=Kc(e),r=Xc(e),o=Kc(r),{isolationScope:i,scope:s}=Za(e),l=ol(i,s);VV(n,o,t,l);const c=e.kind;HV(n,c),n.is_segment&&t.emit("processSegmentSpan",n),t.emit("processSpan",n);const{beforeSendSpan:d}=t.getOptions(),f=d&&ed(d)?jV(n,d):n,u=f.attributes?.[Pt];return u&&Yn(f,{"sentry.span.source":u}),{...WU(f),_segmentSpan:r}}function VV(e,t,n,r){const o=n.getSdkMetadata(),{release:i,environment:s,sendDefaultPii:l}=n.getOptions();Yn(e,{[hU]:i,[gU]:s,[yU]:t.name,[bU]:t.span_id,[EU]:o?.sdk?.name,[$U]:o?.sdk?.version,...l?{[SU]:r.user?.id,[vU]:r.user?.email,[TU]:r.user?.ip_address,[wU]:r.user?.username}:{},...r.attributes})}function jV(e,t){const n=t(e);return n||(Jc(),e)}function Yn(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}const zV=1,qV=2;function HV(e,t){const n=e.attributes;if(!n)return;const r=n["http.request.method"]||n["http.method"];if(r){WV(e,n,t,r);return}const o=n["db.system.name"]||n["db.system"],i=typeof n[tt]=="string"&&`${n[tt]}`.startsWith("cache.");if(o&&!i){GV(e,n);return}if(n["rpc.service"]){Yn(e,{[tt]:"rpc"});return}if(n["messaging.system"]){Yn(e,{[tt]:"message"});return}const s=n["faas.trigger"];s&&Yn(e,{[tt]:`${s}`})}function WV(e,t,n,r){const o=["http"];n===qV?o.push("client"):n===zV&&o.push("server"),t["sentry.http.prefetch"]&&o.push("prefetch"),Yn(e,{[tt]:o.join(".")});const i=t[Ka];if(typeof i=="string"){e.name=i;return}if(t[Pt]==="custom")return;const s=t["http.route"];typeof s=="string"?(e.name=`${r} ${s}`,Yn(e,{[Pt]:"route"})):Yn(e,{[Pt]:"url"})}function GV(e,t){Yn(e,{[tt]:"db"});const n=t[Ka];if(typeof n=="string"){e.name=n;return}if(t[Pt]==="custom")return;const r=t["db.statement"];r&&(e.name=`${r}`,Yn(e,{[Pt]:"task"}))}const Mm=0,p9=1,m9=2;function il(e){return new sl(t=>{t(e)})}function Dm(e){return new sl((t,n)=>{n(e)})}class sl{constructor(t){this._state=Mm,this._handlers=[],this._runExecutor(t)}then(t,n){return new sl((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(s){o(s)}},i=>{if(!n)o(i);else try{r(n(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new sl((n,r)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}_executeHandlers(){if(this._state===Mm)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===p9&&n[1](this._value),this._state===m9&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,s)=>{if(this._state===Mm){if(ti(s)){s.then(r,o);return}this._state=i,this._value=s,this._executeHandlers()}},r=i=>{n(p9,i)},o=i=>{n(m9,i)};try{t(r,o)}catch(i){o(i)}}}function YV(e,t,n,r=0){try{const o=Lm(t,n,e,r);return ti(o)?o:il(o)}catch(o){return Dm(o)}}function Lm(e,t,n,r){const o=n[r];if(!e||!o)return e;const i=o({...e},t);return ue&&i===null&&P.log(`Event processor "${o.id||"?"}" dropped event`),ti(i)?i.then(s=>Lm(s,t,n,r+1)):Lm(i,t,n,r+1)}let ci,_9,h9,wo;function g9(e){const t=Te._sentryDebugIds,n=Te._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(wo&&r.length===_9&&o.length===h9)return wo;_9=r.length,h9=o.length,wo={},ci||(ci={});const i=(s,l)=>{for(const c of s){const d=l[c],f=ci?.[c];if(f&&wo&&d)wo[f[0]]=d,ci&&(ci[c]=[f[0],d]);else if(d){const u=e(c);for(let p=u.length-1;p>=0;p--){const _=u[p]?.filename;if(_&&wo&&ci){wo[_]=d,ci[c]=[_,d];break}}}}};return t&&i(r,t),n&&i(o,n),wo}function KV(e,t){const n=g9(e);if(!n)return[];const r=[];for(const o of t){const i=BB(o);i&&n[i]&&r.push({type:"sourcemap",code_file:o,debug_id:n[i]})}return r}function y9(e,t,n,r,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:l=1e3}=e,c={...t,event_id:t.event_id||n.event_id||jt(),timestamp:t.timestamp||oi()},d=n.integrations||e.integrations.map(h=>h.name);XV(c,e),QV(c,d),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&JV(c,e.stackParser);const f=tj(r,n.captureContext);n.mechanism&&Yr(c,n.mechanism);const u=o?o.getEventProcessors():[],p=ol(i,f),m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),PV(c,p);const _=[...u,...p.eventProcessors];return(n.data&&n.data.__sentry__===!0?il(c):YV(_,c,n)).then(h=>(h&&ZV(h),typeof s=="number"&&s>0?ej(h,s,l):h))}function XV(e,t){const{environment:n,release:r,dist:o,maxValueLength:i}=t;e.environment=e.environment||n||Zc,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const s=e.request;s?.url&&i&&(s.url=za(s.url,i)),i&&e.exception?.values?.forEach(l=>{l.value&&(l.value=za(l.value,i))})}function JV(e,t){const n=g9(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function ZV(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function QV(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function ej(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:tn(o.data,t,n)}}))},...e.user&&{user:tn(e.user,t,n)},...e.contexts&&{contexts:tn(e.contexts,t,n)},...e.extra&&{extra:tn(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=tn(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:tn(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=tn(e.contexts.flags,3,n)),r}function tj(e,t){if(!t)return e;const n=e?e.clone():new ir;return n.update(t),n}function nj(e){if(e)return rj(e)?{captureContext:e}:ij(e)?{captureContext:e}:e}function rj(e){return e instanceof ir||typeof e=="function"}const oj=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function ij(e){return Object.keys(e).some(t=>oj.includes(t))}function lt(e,t){return Re().captureException(e,nj(t))}function b9(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return Re().captureMessage(e,n,r)}function rs(e,t){return Re().captureEvent(e,t)}function E9(e,t){vt().setContext(e,t)}function sj(e){vt().setExtras(e)}function aj(e,t){vt().setExtra(e,t)}function lj(e){vt().setTags(e)}function cj(e,t){vt().setTag(e,t)}function dj(e){vt().setUser(e)}function uj(e){vt().setConversationId(e)}function $9(){return vt().lastEventId()}async function fj(e){const t=_e();return t?t.flush(e):(ue&&P.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function pj(e){const t=_e();return t?t.close(e):(ue&&P.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function mj(){return!!_e()}function S9(){const e=_e();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function v9(e){vt().addEventProcessor(e)}function Fm(e){const t=vt(),{user:n}=ol(t,Re()),{userAgent:r}=Te.navigator||{},o=tU({user:n,...r&&{userAgent:r},...e}),i=t.getSession();return i?.status==="ok"&&Zi(i,{status:"exited"}),Bm(),t.setSession(o),o}function Bm(){const e=vt(),n=Re().getSession()||e.getSession();n&&nU(n),T9(),e.setSession()}function T9(){const e=vt(),t=_e(),n=e.getSession();n&&t&&t.captureSession(n)}function id(e=!1){if(e){Bm();return}T9()}const _j="7";function w9(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function hj(e){return`${w9(e)}${e.projectId}/envelope/`}function gj(e,t){const n={sentry_version:_j};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function k9(e,t,n){return t||`${hj(e)}?${gj(e,n)}`}function yj(e,t){const n=k4(e);if(!n)return"";const r=`${w9(n)}embed/error-page/`;let o=`dsn=${Sr(n)}`;for(const i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){const s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${o}`}const A9=[];function bj(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Ej(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return bj(r)}function $j(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&I9(e,r,n)}),n}function N9(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function I9(e,t,n){if(n[t.name]){ue&&P.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!A9.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),A9.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>r(o,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((i,s)=>r(i,s,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{const o=t[r];typeof o=="function"&&e.on(r,i=>o.call(t,i,e))}),ue&&P.log(`Integration installed: ${t.name}`)}function Um(e){const t=_e();if(!t){ue&&P.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Aye(e){return e}const Sj="sentry.timestamp.sequence";let Vm=0,jm;function C9(e){const t=Math.floor(e*1e3);jm!==void 0&&t!==jm&&(Vm=0);const n=Vm;return Vm++,jm=t,{key:Sj,value:{value:n,type:"integer"}}}function x9(e,t){return t?Hn(t,()=>{const n=wt(),r=n?R4(n):_4(t);return[n?Wn(n):km(e,t),r]}):[void 0,void 0]}const vj={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Tj(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function wj(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Sr(r)),Gn(o,[Tj(e)])}const kj=100;function wr(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Aj(e,t){const n=zm(),r=O9(e);r===void 0?n.set(e,[t]):r.length>=kj?(ad(e,r),n.set(e,[t])):n.set(e,[...r,t])}function sd(e,t=Re(),n=Aj){const r=t?.getClient()??_e();if(!r){ue&&P.warn("No client available to capture log.");return}const{release:o,environment:i,enableLogs:s=!1,beforeSendLog:l}=r.getOptions();if(!s){ue&&P.warn("logging option not enabled, log will not be captured.");return}const[,c]=x9(r,t),d={...e.attributes},{user:{id:f,email:u,username:p},attributes:m={}}=ol(vt(),t);wr(d,"user.id",f,!1),wr(d,"user.email",u,!1),wr(d,"user.name",p,!1),wr(d,"sentry.release",o),wr(d,"sentry.environment",i);const{name:_,version:b}=r.getSdkMetadata()?.sdk??{};wr(d,"sentry.sdk.name",_),wr(d,"sentry.sdk.version",b);const g=r.getIntegrationByName("Replay"),h=g?.getReplayId(!0);wr(d,"sentry.replay_id",h),h&&g?.getRecordingMode()==="buffer"&&wr(d,"sentry._internal.replay_is_buffering",!0);const y=e.message;if(zc(y)){const{__sentry_template_string__:R,__sentry_template_values__:I=[]}=y;I?.length&&(d["sentry.message.template"]=R),I.forEach((V,j)=>{d[`sentry.message.parameter.${j}`]=V})}const E=Qi(t);wr(d,"sentry.trace.parent_span_id",E?.spanContext().spanId);const $={...e,attributes:d};r.emit("beforeCaptureLog",$);const O=l?nr(()=>l($)):$;if(!O){r.recordDroppedEvent("before_send","log_item",1),ue&&P.warn("beforeSendLog returned null, log will not be captured.");return}const{level:N,message:v,attributes:B={},severityNumber:H}=O,U=ut(),C=C9(U),A={timestamp:U,level:N,body:v,trace_id:c?.trace_id,severity_number:H??vj[N],attributes:{...ts(m),...ts(B,!0),[C.key]:C.value}};n(r,A),r.emit("afterCaptureLog",O)}function ad(e,t){const n=t??O9(e)??[];if(n.length===0)return;const r=e.getOptions(),o=wj(n,r._metadata,r.tunnel,e.getDsn());zm().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function O9(e){return zm().get(e)}function zm(){return Ki("clientToLogBufferMap",()=>new WeakMap)}function Nj(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function Ij(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Sr(r)),Gn(o,[Nj(e)])}const Cj=1e3;function eo(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function xj(e,t){const n=Hm(),r=R9(e);r===void 0?n.set(e,[t]):r.length>=Cj?(qm(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Oj(e,t,n){const{release:r,environment:o}=t.getOptions(),i={...e.attributes};eo(i,"user.id",n.id,!1),eo(i,"user.email",n.email,!1),eo(i,"user.name",n.username,!1),eo(i,"sentry.release",r),eo(i,"sentry.environment",o);const{name:s,version:l}=t.getSdkMetadata()?.sdk??{};eo(i,"sentry.sdk.name",s),eo(i,"sentry.sdk.version",l);const c=t.getIntegrationByName("Replay"),d=c?.getReplayId(!0);return eo(i,"sentry.replay_id",d),d&&c?.getRecordingMode()==="buffer"&&eo(i,"sentry._internal.replay_is_buffering",!0),{...e,attributes:i}}function Rj(e,t,n,r){const[,o]=x9(t,n),i=Qi(n),s=i?i.spanContext().traceId:o?.trace_id,l=i?i.spanContext().spanId:void 0,c=ut(),d=C9(c);return{timestamp:c,trace_id:s??"",span_id:l,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...ts(r),...ts(e.attributes,"skip-undefined"),[d.key]:d.value}}}function Pj(e,t){const n=t?.scope??Re(),r=t?.captureSerializedMetric??xj,o=n?.getClient()??_e();if(!o){ue&&P.warn("No client available to capture metric.");return}const{_experiments:i,enableMetrics:s,beforeSendMetric:l}=o.getOptions();if(!(s??i?.enableMetrics??!0)){ue&&P.warn("metrics option not enabled, metric will not be captured.");return}const{user:d,attributes:f}=ol(vt(),n),u=Oj(e,o,d);o.emit("processMetric",u);const p=l||i?.beforeSendMetric,m=p?p(u):u;if(!m){ue&&P.log("`beforeSendMetric` returned `null`, will not send metric.");return}const _=Rj(m,o,n,f);ue&&P.log("[Metric]",_),r(o,_),o.emit("afterCaptureMetric",m)}function qm(e,t){const n=t??R9(e)??[];if(n.length===0)return;const r=e.getOptions(),o=Ij(n,r._metadata,r.tunnel,e.getDsn());Hm().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function R9(e){return Hm().get(e)}function Hm(){return Ki("clientToMetricBufferMap",()=>new WeakMap)}function ld(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const Wm=Symbol.for("SentryBufferFullError");function Gm(e=100){const t=new Set;function n(){return t.size<e}function r(s){t.delete(s)}function o(s){if(!n())return Dm(Wm);const l=s();return t.add(l),l.then(()=>r(l),()=>r(l)),l}function i(s){if(!t.size)return il(!0);const l=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return l;const c=[l,new Promise(d=>ld(setTimeout(()=>d(!1),s)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:i}}const Mj=60*1e3;function P9(e,t=ja()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Mj:r-t}function Dj(e,t){return e[t]||e.all||0}function M9(e,t,n=ja()){return Dj(e,t)>n}function D9(e,{statusCode:t,headers:n},r=ja()){const o={...e},i=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(i)for(const l of i.trim().split(",")){const[c,d,,,f]=l.split(":",5),u=parseInt(c,10),p=(isNaN(u)?60:u)*1e3;if(!d)o.all=r+p;else for(const m of d.split(";"))m==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(o[m]=r+p):o[m]=r+p}else s?o.all=r+P9(s,r):t===429&&(o.all=r+60*1e3);return o}const L9=64;function F9(e,t,n=Gm(e.bufferSize||L9)){let r={};const o=s=>n.drain(s);function i(s){const l=[];if(li(s,(u,p)=>{const m=Q4(p);M9(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):l.push(u)}),l.length===0)return Promise.resolve({});const c=Gn(s[0],l),d=u=>{if(Nm(c,["client_report"])){ue&&P.warn(`Dropping client report. Will not send outcomes (reason: ${u}).`);return}li(c,(p,m)=>{e.recordDroppedEvent(u,Q4(m))})},f=()=>t({body:nd(c)}).then(u=>u.statusCode===413?(ue&&P.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),d("send_error"),u):(ue&&u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&P.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),r=D9(r,u),u),u=>{throw d("network_error"),ue&&P.error("Encountered error running transport request:",u),u});return n.add(f).then(u=>u,u=>{if(u===Wm)return ue&&P.error("Skipped sending event because buffer is full."),d("queue_overflow"),Promise.resolve({});throw u})}return{send:i,flush:o}}function Lj(e,t,n){const r=[{type:"client_report"},{timestamp:oi(),discarded_events:e}];return Gn(t?{dsn:t}:{},[r])}function B9(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Fj(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:s,op:l}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:l,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[vm],exclusive_time:s?.[To],measurements:e.measurements,is_segment:!0}}function Bj(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[vm]:e.profile_id},...e.exclusive_time&&{[To]:e.exclusive_time}}}},measurements:e.measurements}}const U9="Not capturing exception because it's already been captured.",V9="Discarded session because of missing or non-string release",j9=Symbol.for("SentryInternalError"),z9=Symbol.for("SentryDoNotSendEventError"),Uj=5e3;function cd(e){return{message:e,[j9]:!0}}function Ym(e){return{message:e,[z9]:!0}}function q9(e){return!!e&&typeof e=="object"&&j9 in e}function H9(e){return!!e&&typeof e=="object"&&z9 in e}function W9(e,t,n,r,o){let i=0,s,l=!1;e.on(n,()=>{i=0,clearTimeout(s),l=!1}),e.on(t,c=>{i+=r(c),i>=8e5?o(e):l||(l=!0,s=ld(setTimeout(()=>{o(e)},Uj)))}),e.on("flush",()=>{o(e)})}class Vj{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Gm(t.transportOptions?.bufferSize??L9),t.dsn?this._dsn=k4(t.dsn):ue&&P.warn("No DSN provided, client will not send events."),this._dsn){const r=k9(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&W9(this,"afterCaptureLog","flushLogs",Hj,ad),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&W9(this,"afterCaptureMetric","flushMetrics",qj,qm)}captureException(t,n,r){const o=jt();if(s4(t))return ue&&P.log(U9),o;const i={event_id:o,...n};return this._process(()=>this.eventFromException(t,i).then(s=>this._captureEvent(s,i,r)).then(s=>s),"error"),i.event_id}captureMessage(t,n,r,o){const i={event_id:jt(),...r},s=zc(t)?t:String(t),l=Hr(t),c=l?this.eventFromMessage(s,n,i):this.eventFromException(t,i);return this._process(()=>c.then(d=>this._captureEvent(d,i,o)),l?"unknown":"error"),i.event_id}captureEvent(t,n,r){const o=jt();if(n?.originalException&&s4(n.originalException))return ue&&P.log(U9),o;const i={event_id:o,...n},s=t.sdkProcessingMetadata||{},l=s.capturedSpanScope,c=s.capturedSpanIsolationScope,d=G9(t.type);return this._process(()=>this._captureEvent(t,i,l||r,c),d),i.event_id}captureSession(t){this.sendSession(t),Zi(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){ad(this);const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),I9(this,t,this._integrations),n||N9(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=yV(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=cV(r,mV(o));this.sendEnvelope(r).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){const{release:n,environment:r=Zc}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){ue&&P.warn(V9);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){ue&&P.warn(V9);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=gV(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;ue&&P.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,o=(...i)=>n(...i);return r.add(o),()=>{r.delete(o)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return ue&&P.error("Error while sending envelope:",n),{}}return ue&&P.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=$j(this,t),N9(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1;const i=n.exception?.values;if(i){o=!0,r=!1;for(const c of i)if(c.mechanism?.handled===!1){r=!0;break}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(Zi(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){const i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),y9(i,t,n,r,this,o).then(l=>{if(l===null)return l;this.emit("postprocessEvent",l,n),l.contexts={trace:{...l.contexts?.trace,..._4(r)},...l.contexts};const c=km(this,r);return l.sdkProcessingMetadata={dynamicSamplingContext:c,...l.sdkProcessingMetadata},l})}_captureEvent(t,n={},r=Re(),o=vt()){return ue&&Km(t)&&P.log(`Captured error event \`${B9(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(i=>i.event_id,i=>{ue&&(H9(i)?P.log(i.message):q9(i)?P.warn(i.message):P.warn(i))})}_processEvent(t,n,r,o){const i=this.getOptions(),{sampleRate:s}=i,l=Y9(t),c=Km(t),f=`before send for type \`${t.type||"error"}\``,u=typeof s>"u"?void 0:si(s);if(c&&typeof u=="number"&&Gr()>u)return this.recordDroppedEvent("sample_rate","error"),Dm(Ym(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const p=G9(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",p),Ym("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return m;const b=zj(this,i,m,n);return jj(b,f)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",p),l){const h=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",h)}throw Ym(`${f} returned \`null\`, will not send event.`)}const _=r.getSession()||o.getSession();if(c&&_&&this._updateSessionFromEvent(_,m),l){const g=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,h=m.spans?m.spans.length:0,y=g-h;y>0&&this.recordDroppedEvent("before_send","span",y)}const b=m.transaction_info;if(l&&b&&m.transaction!==t.transaction){const g="custom";m.transaction_info={...b,source:g}}return this.sendEvent(m,n),m}).then(null,m=>{throw H9(m)||q9(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),cd(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
38
|
+
Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Wm&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){ue&&P.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){ue&&P.log("No outcomes to send");return}if(!this._dsn){ue&&P.log("No dsn provided, will not send outcomes");return}ue&&P.log("Sending outcomes:",t);const n=Lj(t,this._options.tunnel&&Sr(this._dsn));this.sendEnvelope(n)}}function G9(e){return e==="replay_event"?"replay":e||"error"}function jj(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ti(e))return e.then(r=>{if(!An(r)&&r!==null)throw cd(n);return r},r=>{throw cd(`${t} rejected with ${r}`)});if(!An(e)&&e!==null)throw cd(n);return e}function zj(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,ignoreSpans:s}=t,l=!ed(t.beforeSendSpan)&&t.beforeSendSpan;let c=n;if(Km(c)&&o)return o(c,r);if(Y9(c)){if(l||s){const d=Fj(c);if(s?.length&&el({description:d.description,op:d.op,attributes:d.data},s))return null;if(l){const f=l(d);f?c=Ha(n,Bj(f)):Jc()}if(c.spans){const f=[],u=c.spans;for(const m of u){if(s?.length&&el({description:m.description,op:m.op,attributes:m.data},s)){XU(u,m);continue}if(l){const _=l(m);_?f.push(_):(Jc(),f.push(m))}else f.push(m)}const p=c.spans.length-f.length;p&&e.recordDroppedEvent("before_send","span",p),c.spans=f}}if(i){if(c.spans){const d=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:d}}return i(c,r)}}return c}function Km(e){return e.type===void 0}function Y9(e){return e.type==="transaction"}function qj(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+K9(e.attributes)}function Hj(e){let t=0;return e.message&&(t+=e.message.length*2),t+K9(e.attributes)}function K9(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*X9(n[0]):Hr(n)?t+=X9(n):t+=100}),t}function X9(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Wj(e){return qr(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function J9(e){return Wj(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Gj(e,t){t.debug===!0&&(ue?P.enable():nr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Re().update(t.initialScope);const r=new e(t);return Z9(r),r.init(),r}function Z9(e){Re().setClient(e)}const Xm=100,Jm=5e3,Yj=36e5;function Kj(e){function t(...n){ue&&P.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let i=Jm,s;function l(u,p,m){return Nm(u,["client_report"])?!1:n.shouldStore?n.shouldStore(u,p,m):!0}function c(u){s&&clearTimeout(s),s=ld(setTimeout(async()=>{s=void 0;const p=await o.shift();p&&(t("Attempting to send previously queued event"),p[0].sent_at=new Date().toISOString(),f(p,!0).catch(m=>{t("Failed to retry sending",m)}))},u))}function d(){s||(c(i),i=Math.min(i*2,Yj))}async function f(u,p=!1){if(!p&&Nm(u,["replay_event","replay_recording"]))return await o.push(u),c(Xm),{};try{if(n.shouldSend&&await n.shouldSend(u)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const m=await r.send(u);let _=Xm;if(m){if(m.headers?.["retry-after"])_=P9(m.headers["retry-after"]);else if(m.headers?.["x-sentry-rate-limits"])_=6e4;else if((m.statusCode||0)>=400)return m}return c(_),i=Jm,m}catch(m){if(await l(u,m,i))return p?await o.unshift(u):await o.push(u),d(),t("Error sending. Event queued.",m),{};throw m}}return n.flushAtStartup&&d(),{send:f,flush:u=>(u===void 0&&(i=Jm,c(Xm)),r.flush(u))}}}const dd="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function Q9(e,t){let n;return li(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Xj(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const i=Q9(o,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(o)}}}}function Jj(e,t){return Gn(t?{...e[0],dsn:t}:e[0],e[1])}function Zj(e,t){return n=>{const r=e(n),o=new Map,i=t||(d=>{const f=d.getEvent();return f?.extra?.[dd]&&Array.isArray(f.extra[dd])?f.extra[dd]:[]});function s(d,f){const u=f?`${d}:${f}`:d;let p=o.get(u);if(!p){const m=v4(d);if(!m)return;const _=k9(m,n.tunnel);p=f?Xj(e,f)({...n,url:_}):e({...n,url:_}),o.set(u,p)}return[d,p]}async function l(d){function f(_){const b=_?.length?_:["event"];return Q9(d,b)}const u=i({envelope:d,getEvent:f}).map(_=>typeof _=="string"?s(_,void 0):s(_.dsn,_.release)).filter(_=>!!_),p=u.length?u:[["",r]];return(await Promise.all(p.map(([_,b])=>b.send(Jj(d,_)))))[0]}async function c(d){const f=[...o.values(),r];return(await Promise.all(f.map(p=>p.flush(d)))).every(p=>p)}return{send:l,flush:c}}}const Qj="thismessage:/";function Zm(e){return"isRelative"in e}function Qm(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?Qj:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function ez(e){if(Zm(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function di(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function eE(e){return e.split(/[?#]/,1)[0]}function ko(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(",");let s="";if(t&&i!==-1){const l=e.slice(i+1);s=l.length>10?`${l.slice(0,10)}... [truncated]`:l}return`data:${r}${o?",base64":""}${s?`,${s}`:""}`}return e}function tE(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return nz(e,n)||tz(e,r)}function tz(e,t){return t?nE(e)===nE(t):!1}function nz(e,t){const n=Qm(e);return!n||Zm(n)||!t?!1:rz(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function rz(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function nE(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function rE(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const oz=rE;function iz(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function oE(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(i=>({name:`${r}:@sentry/${i}`,version:Vr})),o.version=Vr)}function e_(e={}){const t=e.client||_e();if(!S9()||!t)return{};const n=jr(),r=vo(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||Re(),i=e.span||wt(),s=i?P4(i):sz(o),l=i?Wn(i):km(t,o),c=$4(l);if(!A4.test(s))return P.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const f={"sentry-trace":s,baggage:c};return e.propagateTraceparent&&(f.traceparent=i?HU(i):az(o)),f}function sz(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return I4(t,r,n)}function az(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return C4(t,r,n)}function lz(e,t,n){let r,o,i;const s=n?.maxWait?Math.max(n.maxWait,t):0,l=n?.setTimeoutImpl||setTimeout;function c(){return d(),r=e(),r}function d(){o!==void 0&&clearTimeout(o),i!==void 0&&clearTimeout(i),o=i=void 0}function f(){return o!==void 0||i!==void 0?c():r}function u(){return o&&clearTimeout(o),o=l(c,t),s&&i===void 0&&(i=l(c,s)),r}return u.cancel=d,u.flush=f,u}const cz=100;function sr(e,t){const n=_e(),r=vt();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=cz}=n.getOptions();if(i<=0)return;const l={timestamp:oi(),...e},c=o?nr(()=>o(l,t)):l;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}let iE;const dz="FunctionToString",sE=new WeakMap,aE=(()=>({name:dz,setupOnce(){iE=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=gm(this),n=sE.has(_e())&&t!==void 0?t:this;return iE.apply(n,e)}}catch{}},setup(e){sE.set(e,!0)}})),uz=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],fz="EventFilters",lE=(e={})=>{let t;return{name:fz,setup(n){const r=n.getOptions();t=dE(e,r)},processEvent(n,r,o){if(!t){const i=o.getOptions();t=dE(e,i)}return pz(n,t)?null:n}}},cE=((e={})=>({...lE(e),name:"InboundFilters"}));function dE(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:uz],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function pz(e,t){if(e.type){if(e.type==="transaction"&&_z(e,t.ignoreTransactions))return ue&&P.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
39
39
|
Event: ${ri(e)}`),!0}else{if(mz(e,t.ignoreErrors))return ue&&P.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
40
40
|
Event: ${ri(e)}`),!0;if(bz(e))return ue&&P.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
41
41
|
Event: ${ri(e)}`),!0;if(hz(e,t.denyUrls))return ue&&P.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
42
42
|
Event: ${ri(e)}.
|
|
43
43
|
Url: ${ud(e)}`),!0;if(!gz(e,t.allowUrls))return ue&&P.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
44
44
|
Event: ${ri(e)}.
|
|
45
|
-
Url: ${ud(e)}`),!0}return!1}function mz(e,t){return t?.length?B9(e).some(n=>or(n,t)):!1}function _z(e,t){if(!t?.length)return!1;const n=e.transaction;return n?or(n,t):!1}function hz(e,t){if(!t?.length)return!1;const n=ud(e);return n?or(n,t):!1}function gz(e,t){if(!t?.length)return!0;const n=ud(e);return n?or(n,t):!0}function yz(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ud(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?yz(n):null}catch{return ue&&P.error(`Cannot extract url for event ${ri(e)}`),null}}function bz(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Ez(e,t,n,r,o,i){if(!o.exception?.values||!i||!Wr(i.originalException,Error))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=t0(e,t,r,i.originalException,n,o.exception.values,s,0))}function t0(e,t,n,r,o,i,s,l){if(i.length>=n+1)return i;let c=[...i];if(Wr(r[o],Error)){fE(s,l,r);const d=e(t,r[o]),f=c.length;pE(d,o,f,l),c=t0(e,t,n,r[o],o,[d,...c],d,f)}return uE(r)&&r.errors.forEach((d,f)=>{if(Wr(d,Error)){fE(s,l,r);const u=e(t,d),p=c.length;pE(u,`errors[${f}]`,p,l),c=t0(e,t,n,d,o,[u,...c],u,p)}}),c}function uE(e){return Array.isArray(e.errors)}function fE(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...uE(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function pE(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const mE=new Map,_E=new Set;function $z(e){if(Te._sentryModuleMetadata)for(const t of Object.keys(Te._sentryModuleMetadata)){const n=Te._sentryModuleMetadata[t];if(_E.has(t))continue;_E.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){mE.set(o.filename,n);break}}}function Sz(e,t){return $z(e),mE.get(t)}function hE(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const o=Sz(e,r.filename);o&&(r.module_metadata=o)})})}function gE(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const vz=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{li(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(gE(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;hE(n,t)})}});function n0(e){const t="console",n=$o(t,e);return So(t,Tz),n}function Tz(){"console"in Te&&am.forEach(function(e){e in Te.console&&Qt(Te.console,e,function(t){return Vc[e]=t,function(...n){qn("console",{args:n,level:e}),Vc[e]?.apply(Te.console,n)}})})}function fd(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const wz="CaptureConsole",kz=((e={})=>{const t=e.levels||am,n=e.handled??!0;return{name:wz,setup(r){"console"in Te&&n0(({args:o,level:i})=>{_e()!==r||!t.includes(i)||Az(o,i,n)})}}});function Az(e,t,n){const r=fd(t),o=new Error,i={level:fd(t),extra:{arguments:e}};Hn(s=>{if(s.addEventProcessor(d=>(d.logger="console",Yr(d,{handled:n,type:"auto.core.capture_console"}),d)),t==="assert"){if(!e[0]){const d=`Assertion failed: ${Hc(e.slice(1)," ")||"console.assert"}`;s.setExtra("arguments",e.slice(1)),s.captureMessage(d,r,{captureContext:i,syntheticException:o})}return}const l=e.find(d=>d instanceof Error);if(l){lt(l,i);return}const c=Hc(e," ");s.captureMessage(c,r,{captureContext:i,syntheticException:o})})}const Nz="Dedupe",yE=(()=>{let e;return{name:Nz,processEvent(t){if(t.type)return t;try{if(Iz(t,e))return ue&&P.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}});function Iz(e,t){return t?!!(Cz(e,t)||xz(e,t)):!1}function Cz(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!EE(e,t)||!bE(e,t))}function xz(e,t){const n=$E(t),r=$E(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!EE(e,t)||!bE(e,t))}function bE(e,t){let n=um(e),r=um(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function EE(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function $E(e){return e.exception?.values?.[0]}const Oz="ExtraErrorData",Rz=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:Oz,processEvent(r,o,i){const{maxValueLength:s}=i.getOptions();return Pz(r,o,t,n,s)}}});function Pz(e,t={},n,r,o){if(!t.originalException||!qr(t.originalException))return e;const i=t.originalException.name||t.originalException.constructor.name,s=SE(t.originalException,r,o);if(s){const l={...e.contexts},c=tn(s,n);return An(c)&&(eV(c),l[i]=c),{...e,contexts:l}}return e}function SE(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const i of Object.keys(e)){if(r.indexOf(i)!==-1)continue;const s=e[i];o[i]=qr(s)||typeof s=="string"?n?za(`${s}`,n):`${s}`:s}if(t&&e.cause!==void 0)if(qr(e.cause)){const i=e.cause.name||e.cause.constructor.name;o.cause={[i]:SE(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){const i=e.toJSON();for(const s of Object.keys(i)){const l=i[s];o[s]=qr(l)?l.toString():l}}return o}catch(r){ue&&P.error("Unable to extract extra data from the Error object:",r)}return null}function Mz(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const Dz=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Lz(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Dz.exec(t);return n?n.slice(1):[]}function vE(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=Mz(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function TE(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function Fz(e,t){e=vE(e).slice(1),t=vE(t).slice(1);const n=TE(e.split("/")),r=TE(t.split("/")),o=Math.min(n.length,r.length);let i=o;for(let l=0;l<o;l++)if(n[l]!==r[l]){i=l;break}let s=[];for(let l=i;l<n.length;l++)s.push("..");return s=s.concat(r.slice(i)),s.join("/")}function Bz(e,t){return Lz(e)[2]||""}const Uz="RewriteFrames",Vz=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in Te&&!!Te.window,o=e.iteratee||jz({isBrowser:r,root:t,prefix:n});function i(l){try{return{...l,exception:{...l.exception,values:l.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:s(c.stacktrace)}}))}}}catch{return l}}function s(l){return{...l,frames:l?.frames?.map(c=>o(c))}}return{name:Uz,processEvent(l){let c=l;return l.exception&&Array.isArray(l.exception.values)&&(c=i(c)),c}}};function jz({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),i=/^\//.test(r.filename);if(e){if(t){const s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(o||i){const s=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,l=t?Fz(t,s):Bz(s);r.filename=`${n}${l}`}return r}}const zz=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],qz=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],Hz={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},wE=["select","insert","upsert","update","delete"];function pd(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function md(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function kE(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function Wz(e,t){return kE(e,t)!==void 0}function Gz(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function Yz(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&Hz[n]||"filter",`${o}(${e}, ${r.join(".")})`}function AE(e,t=!1){return new Proxy(e,{apply(n,r,o){return vr({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[We]:"auto.db.supabase",[tt]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},i=>Reflect.apply(n,r,o).then(s=>(s&&typeof s=="object"&&"error"in s&&s.error?(i.setStatus({code:Ge}),lt(s.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):i.setStatus({code:Xa}),i.end(),s)).catch(s=>{throw i.setStatus({code:Ge}),i.end(),lt(s,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),s}).then(...o))}})}function Kz(e){const t=e.auth;if(!(!t||md(e.auth))){for(const n of zz){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=AE(r))}for(const n of qz){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=AE(r,!0))}pd(e.auth)}}function Xz(e){md(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const o=Reflect.apply(t,n,r),i=o.constructor;return Zz(i),o}}),pd(e.prototype.from))}function Jz(e){md(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const o=wE,i=n,s=Gz(i.method,i.headers);if(!o.includes(s)||!i?.url?.pathname||typeof i.url.pathname!="string")return Reflect.apply(t,n,r);const l=i.url.pathname.split("/"),c=l.length>0?l[l.length-1]:"",d=[];for(const[y,E]of i.url.searchParams.entries())d.push(Yz(y,E));const f=Object.create(null);if(An(i.body))for(const[y,E]of Object.entries(i.body))f[y]=E;const u=!!_e()?.getOptions().sendDefaultPii,p=kE(i.body,f),m=s==="select"?"":`${s}${Wz(i.body,f)?"(...) ":""}`,_=u?d.join(" "):d.length>0?"[redacted]":"",b=[m.trimEnd(),_].filter(Boolean).join(" "),g=b?`${b} from(${c})`:`from(${c})`,h={"db.table":c,"db.schema":i.schema,"db.url":i.url.origin,"db.sdk":i.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[We]:"auto.db.supabase",[tt]:"db"};return d.length&&u&&(h["db.query"]=d),p!==void 0&&u&&(h["db.body"]=p),vr({name:g,attributes:h},y=>Reflect.apply(t,n,[]).then(E=>{if(y&&(E&&typeof E=="object"&&"status"in E&&Ja(y,E.status||500),y.end()),E?.error){const N=new Error(E.error.message);E.error.code&&(N.code=E.error.code),E.error.details&&(N.details=E.error.details);const v={};d.length&&u&&(v.query=d),p!==void 0&&u&&(v.body=p),lt(N,B=>(B.addEventProcessor(H=>(Yr(H,{handled:!1,type:"auto.db.supabase.postgres"}),H)),B.setContext("supabase",v),B))}const $={type:"supabase",category:`db.${s}`,message:g},O={};return d.length&&u&&(O.query=d),p!==void 0&&u&&(O.body=p),Object.keys(O).length&&($.data=O),sr($),E},E=>{throw y&&(Ja(y,500),y.end()),E}).then(...r))}}),pd(e.prototype.then))}function Zz(e){for(const t of wE)md(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,o){const i=Reflect.apply(n,r,o),s=i.constructor;return ue&&P.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),Jz(s),i}}),pd(e.prototype[t]))}const NE=e=>{if(!e){ue&&P.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;Xz(t),Kz(e)},Qz="Supabase",eq=(e=>({setupOnce(){NE(e)},name:Qz})),tq=e=>eq(e.supabaseClient),nq=10,rq="ZodErrors";function oq(e){return qr(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function iq(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function sq(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function aq(e){const t=new Set;for(const r of e.issues){const o=sq(r.path);o.length>0&&t.add(o)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${za(n.join(", "),100)}`}function lq(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!oq(r.originalException)||r.originalException.issues.length===0)return n;try{const i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(iq);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:aq(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(o){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message}
|
|
46
|
-
${o.stack}`:"unknown"}}}}}const cq=((e={})=>{const t=e.limit??nq;return{name:rq,processEvent(n,r){return lq(t,e.saveZodIssuesAsAttachment,n,r)}}}),dq=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{li(n,(r,o)=>{if(o==="event"){const i=Array.isArray(r)?r[1]:void 0;i&&(gE(i),r[1]=i)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;hE(r,n)})},processEvent(t){const n=fq(t,e.ignoreSentryInternalFrames);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](i=>!i.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function uq(e,t){if(t!==0||!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(mq))return!1;if(e.pre_context){const n=e.pre_context.length;for(let r=0;r<n;r++)if(e.pre_context[r]?.includes(pq))return!0}return!1}function fq(e,t){const n=um(e);if(n)return n.filter((r,o)=>!r.filename||r.lineno==null&&r.colno==null&&r.instruction_addr==null?!1:!t||!uq(r,o)).map(r=>r.module_metadata?Object.keys(r.module_metadata).filter(o=>o.startsWith(IE)).map(o=>o.slice(IE.length)):[])}const IE="_sentryBundlerPluginAppKey:",pq="Attempt to invoke user-land function",mq="fn.apply(this, wrappedArguments)",_q=100,hq=10,_d="flag.evaluation.";function os(e){if(e.type)return e;const n=Re().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function ui(e,t,n=_q){const r=Re().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;gq(o,e,t,n)}function gq(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){ue&&P.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const o=e.findIndex(i=>i.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function fi(e,t,n=hq){if(typeof t!="boolean")return;const r=wt();if(!r)return;const o=Me(r).data;if(`${_d}${e}`in o){r.setAttribute(`${_d}${e}`,t);return}Object.keys(o).filter(s=>s.startsWith(_d)).length<n&&r.setAttribute(`${_d}${e}`,t)}const yq=()=>({name:"FeatureFlags",processEvent(e,t,n){return os(e)},addFeatureFlag(e,t){ui(e,t),fi(e,t)}}),bq=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Qt(t,"isOn",CE),typeof t.getFeatureValue=="function"&&Qt(t,"getFeatureValue",CE)},processEvent(t,n,r){return os(t)}});function CE(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(ui(n,r),fi(n,r)),r}}const Eq="ConversationId",$q=(()=>({name:Eq,setup(e){e.on("spanStart",t=>{const n=Re().getScopeData(),r=vt().getScopeData(),o=n.conversationId||r.conversationId;if(o){const{op:i,data:s,description:l}=Me(t);if(!i?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!l?.startsWith("ai."))return;t.setAttribute(IU,o)}})}}));function Sq(e,t,n,r,o){if(!e.fetchData)return;const{method:i,url:s}=e.fetchData,l=Mn()&&t(s);if(e.endTimestamp){const m=e.fetchData.__span;if(!m)return;const _=r[m];_&&(l&&(wq(_,e),vq(_,e,o)),delete r[m]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:d=!1}=typeof o=="object"?o:{spanOrigin:o},f=_e(),u=!!wt(),p=l&&u?Tr(Nq(s,i,c)):new Dn;if(l&&!u&&f?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(e.fetchData.url)){const m=e.args[0],_={...e.args[1]||{}},b=Tq(m,_,Mn()&&u?p:void 0,d);b&&(e.args[1]=_,_.headers=b)}if(f){const m={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",p,m)}return p}function vq(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Tq(e,t,n,r){const o=e0({span:n,propagateTraceparent:r}),i=o["sentry-trace"],s=o.baggage,l=o.traceparent;if(!i)return;const c=t.headers||(mm(e)?e.headers:void 0);if(c)if(kq(c)){const d=new Headers(c);if(d.get("sentry-trace")||d.set("sentry-trace",i),r&&l&&!d.get("traceparent")&&d.set("traceparent",l),s){const f=d.get("baggage");f?hd(f)||d.set("baggage",`${f},${s}`):d.set("baggage",s)}return d}else if(Aq(c)){const d=[...c];d.find(u=>u[0]==="sentry-trace")||d.push(["sentry-trace",i]),r&&l&&!d.find(u=>u[0]==="traceparent")&&d.push(["traceparent",l]);const f=c.find(u=>u[0]==="baggage"&&typeof u[1]=="string"&&hd(u[1]));return s&&!f&&d.push(["baggage",s]),d}else{const d="sentry-trace"in c?c["sentry-trace"]:void 0,f="traceparent"in c?c.traceparent:void 0,u="baggage"in c?c.baggage:void 0,p=u?Array.isArray(u)?[...u]:[u]:[],m=u&&(Array.isArray(u)?u.find(b=>hd(b)):hd(u));s&&!m&&p.push(s);const _=Object.assign({},c,{"sentry-trace":d??i,baggage:p.length>0?p.join(","):void 0});return r&&l&&!f&&(_.traceparent=l),_}else return{...o}}function wq(e,t){if(t.response){Ja(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:Ge,message:"internal_error"});e.end()}function hd(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Gc))}function kq(e){return typeof Headers<"u"&&Wr(e,Headers)}function Aq(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function Nq(e,t,n){if(e.startsWith("data:")){const i=ko(e);return{name:`${t} ${i}`,attributes:xE(e,void 0,t,n)}}const r=Qm(e),o=r?ez(r):e;return{name:`${t} ${o}`,attributes:xE(e,r,t,n)}}function xE(e,t,n,r){const o={url:ko(e),type:"fetch","http.method":n,[We]:r,[tt]:"http.client"};return t&&(Zm(t)||(o["http.url"]=ko(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function OE(e,t={},n=Re()){const{message:r,name:o,email:i,url:s,source:l,associatedEventId:c,tags:d}=e,f={contexts:{feedback:{contact_email:i,name:o,message:r,url:s,source:l,associated_event_id:c}},type:"feedback",level:"info",tags:d},u=n?.getClient()||_e();return u&&u.emit("beforeSendFeedback",f,t),n.captureEvent(f,t)}function is(e,t,n,r,o){sd({level:e,message:t,attributes:n,severityNumber:o},r)}function Iq(e,t,{scope:n}={}){is("trace",e,t,n)}function Cq(e,t,{scope:n}={}){is("debug",e,t,n)}function xq(e,t,{scope:n}={}){is("info",e,t,n)}function Oq(e,t,{scope:n}={}){is("warn",e,t,n)}function Rq(e,t,{scope:n}={}){is("error",e,t,n)}function Pq(e,t,{scope:n}={}){is("fatal",e,t,n)}const Mq=Object.freeze(Object.defineProperty({__proto__:null,debug:Cq,error:Rq,fatal:Pq,fmt:oz,info:xq,trace:Iq,warn:Oq},Symbol.toStringTag,{value:"Module"}));function gd(e,t,n){return"util"in Te&&typeof Te.util.format=="function"?Te.util.format(...e):Dq(e,t,n)}function Dq(e,t,n){return e.map(r=>Hr(r)?String(r):JSON.stringify(tn(r,t,n))).join(" ")}function RE(e){return/%[sdifocO]/.test(e)}function PE(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((o,i)=>{n[`sentry.message.parameter.${i}`]=o}),n}const Lq="ConsoleLogs",ME={[We]:"auto.log.console"},Fq=((e={})=>{const t=e.levels||am;return{name:Lq,setup(n){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:i=1e3}=n.getOptions();if(!r){ue&&P.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}const s=n0(({args:l,level:c})=>{if(_e()!==n||!t.includes(c))return;const d=l[0],f=l.slice(1);if(c==="assert"){if(!d){const _=f.length>0?`Assertion failed: ${gd(f,o,i)}`:"Assertion failed";sd({level:"error",message:_,attributes:ME})}return}const u=c==="log",p=l.length>1&&typeof l[0]=="string"&&!RE(l[0]),m={...ME,...p?PE(d,f):{}};sd({level:u?"info":c,message:gd(l,o,i),severityNumber:u?10:void 0,attributes:m})});n.registerCleanup(s)}}});function r0(e,t,n,r){Pj({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function Bq(e,t=1,n){r0("counter",e,t,n)}function Uq(e,t,n){r0("gauge",e,t,n)}function o0(e,t,n){r0("distribution",e,t,n)}const Vq=Object.freeze(Object.defineProperty({__proto__:null,count:Bq,distribution:o0,gauge:Uq},Symbol.toStringTag,{value:"Module"})),jq=["trace","debug","info","warn","error","fatal"];function zq(e={}){const t=new Set(e.levels??jq),n=e.client;return{log(r){const{type:o,level:i,message:s,args:l,tag:c,date:d,...f}=r,u=n||_e();if(!u)return;const p=Wq(o,i);if(!t.has(p))return;const{normalizeDepth:m=3,normalizeMaxBreadth:_=1e3}=u.getOptions(),b={};for(const[h,y]of Object.entries(f))b[h]=tn(y,m,_);b["sentry.origin"]="auto.log.consola",c&&(b["consola.tag"]=c),o&&(b["consola.type"]=o),i!=null&&typeof i=="number"&&(b["consola.level"]=i);const g=Yq(Gq(l,m,_),m,_);g?.attributes&&Object.assign(b,g.attributes),sd({level:p,message:g?.message||s||l&&gd(l,m,_)||"",attributes:b})}}}const qq={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},Hq={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function Wq(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=qq[e];if(n)return n}if(typeof t=="number"){const n=Hq[t];if(n)return n}return"info"}function Gq(e,t,n){if(!e?.length)return{message:""};const r=gd(e,t,n),o=e[0];if(An(o)){const i=typeof e[1]=="string"?2:1,s=e.slice(i);return{message:r,attributes:o,messageParameters:s}}else{const i=e.slice(1),s=i.length>0&&typeof o=="string"&&!RE(o);return{message:r,messageTemplate:s?o:void 0,messageParameters:s?i:void 0}}}function Yq(e,t,n){const{message:r,attributes:o,messageTemplate:i,messageParameters:s}=e,l={};if(i&&s){const c=PE(i,s);for(const[d,f]of Object.entries(c))l[d]=d.startsWith("sentry.message.parameter.")?tn(f,t,n):f}else s&&s.length>0&&s.forEach((c,d)=>{l[`sentry.message.parameter.${d}`]=tn(c,t,n)});return{message:r,attributes:{...tn(o,t,n),...l}}}const Kq="gen_ai.prompt",al="gen_ai.system",nn="gen_ai.request.model",i0="gen_ai.request.stream",yd="gen_ai.request.temperature",s0="gen_ai.request.max_tokens",bd="gen_ai.request.frequency_penalty",a0="gen_ai.request.presence_penalty",Ed="gen_ai.request.top_p",DE="gen_ai.request.top_k",LE="gen_ai.request.encoding_format",FE="gen_ai.request.dimensions",ss="gen_ai.response.finish_reasons",as="gen_ai.response.model",$d="gen_ai.response.id",Xq="gen_ai.response.stop_reason",pi="gen_ai.usage.input_tokens",mi="gen_ai.usage.output_tokens",Ao="gen_ai.usage.total_tokens",ar="gen_ai.operation.name",_i="sentry.sdk_meta.gen_ai.input.messages.original_length",ls="gen_ai.input.messages",ll="gen_ai.system_instructions",kr="gen_ai.response.text",cl="gen_ai.request.available_tools",Jq="gen_ai.response.streaming",No="gen_ai.response.tool_calls",Sd="gen_ai.agent.name",Zq="gen_ai.pipeline.name",l0="gen_ai.conversation.id",Qq="gen_ai.usage.cache_creation_input_tokens",eH="gen_ai.usage.cache_read_input_tokens",tH="gen_ai.invoke_agent",c0="gen_ai.embeddings.input",BE="gen_ai.embeddings",UE="gen_ai.execute_tool",VE="gen_ai.tool.name",nH="gen_ai.tool.call.id",rH="gen_ai.tool.type",jE="gen_ai.tool.input",zE="gen_ai.tool.output",oH="gen_ai.tool.description";function cs(e){return!e||typeof e!="object"?!1:sH(e)||HE(e)||iH(e)||WE(e)||GE(e)||aH(e)||lH(e)||cH(e)||dH(e)||uH(e)||fH(e)||pH(e)}function iH(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):qE(e):!1}function qE(e){return"image_url"in e&&!!e.image_url&&typeof e.image_url=="object"&&"url"in e.image_url&&typeof e.image_url.url=="string"&&e.image_url.url.startsWith("data:")}function sH(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&cs(e.source)}function HE(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}function WE(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="string"}function GE(e){return"type"in e&&e.type==="file"&&"file"in e&&!!e.file&&typeof e.file=="object"&&"file_data"in e.file&&typeof e.file.file_data=="string"}function aH(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function lH(e){return"type"in e&&e.type==="file"&&"mediaType"in e&&typeof e.mediaType=="string"&&"data"in e&&typeof e.data=="string"&&!e.data.startsWith("http://")&&!e.data.startsWith("https://")}function cH(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function dH(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function uH(e){return"b64_json"in e}function fH(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function pH(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}const dl="[Blob substitute]",mH=["image_url","data","content","b64_json","result","uri","image"];function ul(e){const t={...e};cs(t.source)&&(t.source=ul(t.source)),HE(e)&&(t.inlineData={...e.inlineData,data:dl}),qE(e)&&(t.image_url={...e.image_url,url:dl}),WE(e)&&(t.input_audio={...e.input_audio,data:dl}),GE(e)&&(t.file={...e.file,file_data:dl});for(const n of mH)typeof t[n]=="string"&&(t[n]=dl);return t}const YE=2e4,vd=e=>new TextEncoder().encode(e).length,d0=e=>vd(JSON.stringify(e));function Td(e,t){if(vd(e)<=t)return e;let n=0,r=e.length,o="";for(;n<=r;){const i=Math.floor((n+r)/2),s=e.slice(0,i);vd(s)<=t?(o=s,n=i+1):r=i-1}return o}function _H(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function KE(e,t){return typeof e=="string"?t:{...e,text:t}}function hH(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function XE(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function JE(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function gH(e,t){const n={...e,content:""},r=d0(n),o=t-r;if(o<=0)return[];const i=Td(e.content,o);return[{...e,content:i}]}function yH(e){return"parts"in e&&Array.isArray(e.parts)?{key:"parts",items:e.parts}:"content"in e&&Array.isArray(e.content)?{key:"content",items:e.content}:{key:null,items:[]}}function bH(e,t){const{key:n,items:r}=yH(e);if(n===null||r.length===0)return[];const o=r.map(c=>KE(c,"")),i=d0({...e,[n]:o});let s=t-i;if(s<=0)return[];const l=[];for(const c of r){const d=_H(c),f=vd(d);if(f<=s)l.push(c),s-=f;else if(l.length===0){const u=Td(d,s);u&&l.push(KE(c,u));break}else break}return l.length<=0?[]:[{...e,[n]:l}]}function EH(e,t){if(!e)return[];if(typeof e=="string"){const n=Td(e,t);return n?[n]:[]}return typeof e!="object"?[]:hH(e)?gH(e,t):XE(e)||JE(e)?bH(e,t):[]}function u0(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(XE(n)?r={...n,content:u0(n.content)}:"content"in n&&cs(n.content)&&(r={...n,content:ul(n.content)}),JE(n)&&(r={...r??n,parts:u0(n.parts)}),cs(r)?r=ul(r):cs(n)&&(r=ul(n))),r??n})}function $H(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=t-2,r=e[e.length-1],o=u0([r]),i=o[0];return d0(i)<=n?o:EH(i,n)}function SH(e){return $H(e,YE)}function vH(e){return Td(e,YE)}function hi(e){const t=!!_e()?.getOptions().sendDefaultPii;return{...e,recordInputs:e?.recordInputs??t,recordOutputs:e?.recordOutputs??t}}function to(e){const t=_e();return e??!(t&&Zr(t))}function f0(e,t){return e?`${e}.${t}`:t}function TH(e,t,n,r,o){if(t!==void 0&&e.setAttributes({[pi]:t}),n!==void 0&&e.setAttributes({[mi]:n}),t!==void 0||n!==void 0||r!==void 0||o!==void 0){const i=(t??0)+(n??0)+(r??0)+(o??0);e.setAttributes({[Ao]:i})}}function wd(e,t,n){if(!e.isRecording())return;const r={[Jq]:!0};t.responseId&&(r[$d]=t.responseId),t.responseModel&&(r[as]=t.responseModel),t.promptTokens!==void 0&&(r[pi]=t.promptTokens),t.completionTokens!==void 0&&(r[mi]=t.completionTokens),t.totalTokens!==void 0?r[Ao]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[Ao]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)),t.finishReasons.length&&(r[ss]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[kr]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[No]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function ds(e){return typeof e=="string"?e:JSON.stringify(e)}function us(e){if(typeof e=="string")return vH(e);if(Array.isArray(e)){const t=SH(e);return JSON.stringify(t)}return JSON.stringify(e)}function fl(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};const t=e.findIndex(s=>s&&typeof s=="object"&&"role"in s&&s.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};const n=e[t],r=typeof n.content=="string"?n.content:n.content!==void 0?JSON.stringify(n.content):void 0;if(!r)return{systemInstructions:void 0,filteredMessages:e};const o=JSON.stringify([{type:"text",content:r}]),i=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:o,filteredMessages:i}}async function wH(e,t,n){const r=e.catch(s=>{throw lt(s,{mechanism:{handled:!1,type:n}}),s}),o=await t,i=await r;return i&&typeof i=="object"&&"data"in i?{...i,data:o}:o}function kd(e,t,n){return ti(e)?new Proxy(e,{get(r,o){const s=o in Promise.prototype||o===Symbol.toStringTag?t:r,l=Reflect.get(s,o);return o==="withResponse"&&typeof l=="function"?function(){const d=l.call(r);return wH(d,t,n)}:typeof l=="function"?l.bind(s):l}}):t}const kH={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},AH=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"]];function NH(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function IH(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function CH(e,t,n){if(!t||typeof t!="object")return;const r=t,o={};if(typeof r.id=="string"&&(o[$d]=r.id),typeof r.model=="string"&&(o[as]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(o[l0]=r.id),r.usage&&typeof r.usage=="object"){const i=r.usage,s=i.prompt_tokens??i.input_tokens;typeof s=="number"&&(o[pi]=s);const l=i.completion_tokens??i.output_tokens;typeof l=="number"&&(o[mi]=l),typeof i.total_tokens=="number"&&(o[Ao]=i.total_tokens)}if(Array.isArray(r.choices)){const i=r.choices,s=i.map(l=>l.finish_reason).filter(l=>typeof l=="string");if(s.length>0&&(o[ss]=JSON.stringify(s)),n){const l=i.map(d=>d.message?.content||"");o[kr]=JSON.stringify(l);const c=i.map(d=>d.message?.tool_calls).filter(d=>Array.isArray(d)&&d.length>0).flat();c.length>0&&(o[No]=JSON.stringify(c))}}if(typeof r.status=="string"&&(o[ss]||(o[ss]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!o[kr]&&(o[kr]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!o[No])){const i=r.output.filter(s=>s?.type==="function_call");i.length>0&&(o[No]=JSON.stringify(i))}e.setAttributes(o)}function xH(e){if("conversation"in e&&typeof e.conversation=="string")return e.conversation;if("previous_response_id"in e&&typeof e.previous_response_id=="string")return e.previous_response_id}function OH(e){const t={[nn]:e.model??"unknown"};"temperature"in e&&(t[yd]=e.temperature),"top_p"in e&&(t[Ed]=e.top_p),"frequency_penalty"in e&&(t[bd]=e.frequency_penalty),"presence_penalty"in e&&(t[a0]=e.presence_penalty),"stream"in e&&(t[i0]=e.stream),"encoding_format"in e&&(t[LE]=e.encoding_format),"dimensions"in e&&(t[FE]=e.dimensions);const n=xH(e);return n&&(t[l0]=n),t}function RH(e,t){for(const n of e){const r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{const o=t.chatCompletionToolCalls[r];n.function.arguments&&o?.function&&(o.function.arguments+=n.function.arguments)}}}function PH(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(const r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&RH(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function MH(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:Ge,message:"internal_error"}),lt(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const o=e;if(!AH.includes(o.type)){t.eventTypes.push(o.type);return}if(n&&(o.type==="response.output_item.done"&&"item"in o&&t.responsesApiToolCalls.push(o.item),o.type==="response.output_text.delta"&&"delta"in o&&o.delta)){t.responseTexts.push(o.delta);return}if("response"in o){const{response:i}=o;t.responseId=i.id??t.responseId,t.responseModel=i.model??t.responseModel,i.usage&&(t.promptTokens=i.usage.input_tokens,t.completionTokens=i.usage.output_tokens,t.totalTokens=i.usage.total_tokens),i.status&&t.finishReasons.push(i.status),n&&i.output_text&&t.responseTexts.push(i.output_text)}}async function*DH(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const o of e)IH(o)?PH(o,r,n):NH(o)&&MH(o,r,n,t),yield o}finally{const o=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];wd(t,{...r,toolCalls:o},n)}}function LH(e){const t=Array.isArray(e.tools)?e.tools:[],r=e.web_search_options&&typeof e.web_search_options=="object"?[{type:"web_search_options",...e.web_search_options}]:[],o=[...t,...r];if(o.length!==0)try{return JSON.stringify(o)}catch(i){ue&&P.error("Failed to serialize OpenAI tools:",i);return}}function FH(e,t){const n={[al]:"openai",[ar]:t,[We]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],o=LH(r);o&&(n[cl]=o),Object.assign(n,OH(r))}else n[nn]="unknown";return n}function ZE(e,t,n,r){if(n==="embeddings"&&"input"in t){const l=t.input;if(l==null||typeof l=="string"&&l.length===0||Array.isArray(l)&&l.length===0)return;e.setAttribute(c0,typeof l=="string"?l:JSON.stringify(l));return}const o="input"in t?t.input:"messages"in t?t.messages:void 0;if(!o||Array.isArray(o)&&o.length===0)return;const{systemInstructions:i,filteredMessages:s}=fl(o);i&&e.setAttribute(ll,i),e.setAttribute(ls,r?us(s):ds(s)),Array.isArray(s)?e.setAttribute(_i,s.length):e.setAttribute(_i,1)}function BH(e,t,n,r,o){return function(...s){const l=n.operation||"unknown",c=FH(s,l),d=c[nn]||"unknown",f=s[0],u=f&&typeof f=="object"&&f.stream===!0,p={name:`${l} ${d}`,op:`gen_ai.${l}`,attributes:c};if(u){let b;const g=Qr(p,h=>(b=e.apply(r,s),o.recordInputs&&f&&ZE(h,f,l,to(o.enableTruncation)),(async()=>{try{const y=await b;return DH(y,h,o.recordOutputs??!1)}catch(y){throw h.setStatus({code:Ge,message:"internal_error"}),lt(y,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),h.end(),y}})()));return kd(b,g,"auto.ai.openai")}let m;const _=vr(p,b=>(m=e.apply(r,s),o.recordInputs&&f&&ZE(b,f,l,to(o.enableTruncation)),m.then(g=>(CH(b,g,o.recordOutputs),g),g=>{throw lt(g,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),g})));return kd(m,_,"auto.ai.openai")}}function QE(e,t="",n){return new Proxy(e,{get(r,o){const i=r[o],s=f0(t,String(o)),l=kH[s];return typeof i=="function"&&l?BH(i,s,l,r,n):typeof i=="function"?i.bind(r):i&&typeof i=="object"?QE(i,s,n):i}})}function UH(e,t){return QE(e,"",hi(t))}const VH={"messages.create":{operation:"chat"},"messages.stream":{operation:"chat",streaming:!0},"messages.countTokens":{operation:"chat"},"models.get":{operation:"models"},"completions.create":{operation:"chat"},"models.retrieve":{operation:"models"},"beta.messages.create":{operation:"chat"}};function jH(e,t,n){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:r,filteredMessages:o}=fl(t);r&&e.setAttributes({[ll]:r});const i=Array.isArray(o)?o.length:1;e.setAttributes({[ls]:n?us(o):ds(o),[_i]:i})}const zH={invalid_request_error:"invalid_argument",authentication_error:"unauthenticated",permission_error:"permission_denied",not_found_error:"not_found",request_too_large:"failed_precondition",rate_limit_error:"resource_exhausted",api_error:"internal_error",overloaded_error:"unavailable"};function e$(e){return e&&zH[e]||"internal_error"}function qH(e,t){t.error&&(e.setStatus({code:Ge,message:e$(t.error.type)}),lt(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function HH(e){const{system:t,messages:n,input:r}=e,o=typeof t=="string"?[{role:"system",content:e.system}]:[],i=Array.isArray(r)?r:r!=null?[r]:void 0,s=Array.isArray(n)?n:n!=null?[n]:[],l=i??s;return[...o,...l]}function WH(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:Ge,message:e$(e.error?.type)}),lt(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function GH(e,t){if(e.type==="message_delta"&&e.usage&&"output_tokens"in e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.message){const n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&(typeof n.usage.input_tokens=="number"&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens=="number"&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens=="number"&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function YH(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function KH(e,t,n){if(!(e.type!=="content_block_delta"||!e.delta)){if(typeof e.index=="number"&&"partial_json"in e.delta&&typeof e.delta.partial_json=="string"){const r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function XH(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let o;try{o=r?JSON.parse(r):{}}catch{o={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:o}),delete t.activeToolBlocks[e.index]}function t$(e,t,n,r){!(e&&typeof e=="object")||WH(e,r)||(GH(e,t),YH(e,t),KH(e,t,n),XH(e,t))}async function*JH(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const o of e)t$(o,r,n,t),yield o}finally{wd(t,r,n)}}function ZH(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",o=>{t$(o,r,n,t)}),e.on("message",()=>{wd(t,r,n)}),e.on("error",o=>{lt(o,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:Ge,message:"internal_error"}),t.end())}),e}function QH(e,t,n){const r={[al]:"anthropic",[ar]:n,[We]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const o=e[0];o.tools&&Array.isArray(o.tools)&&(r[cl]=JSON.stringify(o.tools)),r[nn]=o.model??"unknown","temperature"in o&&(r[yd]=o.temperature),"top_p"in o&&(r[Ed]=o.top_p),"stream"in o&&(r[i0]=o.stream),"top_k"in o&&(r[DE]=o.top_k),"frequency_penalty"in o&&(r[bd]=o.frequency_penalty),"max_tokens"in o&&(r[s0]=o.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[nn]=e[0]:r[nn]="unknown";return r}function p0(e,t,n){const r=HH(t);jH(e,r,n),"prompt"in t&&e.setAttributes({[Kq]:JSON.stringify(t.prompt)})}function eW(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[kr]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[No]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[kr]:t.completion}),"input_tokens"in t&&e.setAttributes({[kr]:JSON.stringify(t.input_tokens)})}function tW(e,t){"id"in t&&"model"in t&&(e.setAttributes({[$d]:t.id,[as]:t.model}),"usage"in t&&t.usage&&TH(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function nW(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){qH(e,t);return}n&&eW(e,t),tW(e,t)}}function n$(e,t,n){throw lt(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:Ge,message:"internal_error"}),t.end()),e}function rW(e,t,n,r,o,i,s,l,c,d,f){const u=o[nn]??"unknown",p={name:`${i} ${u}`,op:`gen_ai.${i}`,attributes:o};if(d&&!f){let m;const _=Qr(p,b=>(m=e.apply(n,r),c.recordInputs&&l&&p0(b,l,to(c.enableTruncation)),(async()=>{try{const g=await m;return JH(g,b,c.recordOutputs??!1)}catch(g){return n$(g,b,s)}})()));return kd(m,_,"auto.ai.anthropic")}else return Qr(p,m=>{try{c.recordInputs&&l&&p0(m,l,to(c.enableTruncation));const _=t.apply(n,r);return ZH(_,m,c.recordOutputs??!1)}catch(_){return n$(_,m,s)}})}function oW(e,t,n,r,o){return new Proxy(e,{apply(i,s,l){const c=n.operation||"unknown",d=QH(l,t,c),f=d[nn]??"unknown",u=typeof l[0]=="object"?l[0]:void 0,p=!!u?.stream,m=n.streaming===!0;if(p||m)return rW(e,i,r,l,d,c,t,u,o,p,m);let _;const b=vr({name:`${c} ${f}`,op:`gen_ai.${c}`,attributes:d},g=>(_=i.apply(r,l),o.recordInputs&&u&&p0(g,u,to(o.enableTruncation)),_.then(h=>(nW(g,h,o.recordOutputs),h),h=>{throw lt(h,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}}),h})));return kd(_,b,"auto.ai.anthropic")}})}function r$(e,t="",n){return new Proxy(e,{get(r,o){const i=r[o],s=f0(t,String(o)),l=VH[s];return typeof i=="function"&&l?oW(i,s,l,r,n):typeof i=="function"?i.bind(r):i&&typeof i=="object"?r$(i,s,n):i}})}function iW(e,t){return r$(e,"",hi(t))}const sW={"models.generateContent":{operation:"generate_content"},"models.generateContentStream":{operation:"generate_content",streaming:!0},"models.embedContent":{operation:"embeddings"},"chats.create":{proxyResultPath:"chat"},"chat.sendMessage":{operation:"chat"},"chat.sendMessageStream":{operation:"chat",streaming:!0}},aW="google_genai";function lW(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:Ge,message:"internal_error"}),lt(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function cW(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="string"&&(t.responseModel=e.modelVersion);const n=e.usageMetadata;n&&(typeof n.promptTokenCount=="number"&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount=="number"&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount))}function dW(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(const o of r?.content?.parts??[])n&&o.text&&t.responseTexts.push(o.text),o.functionCall&&t.toolCalls.push({type:"function",id:o.functionCall.id,name:o.functionCall.name,arguments:o.functionCall.args})}}function uW(e,t,n,r){!e||lW(e,r)||(cW(e,t),dW(e,t,n))}async function*fW(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const o of e)uW(o,r,n,t),yield o}finally{wd(t,r,n)}}function pl(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>pl(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}function o$(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function pW(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[yd]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[Ed]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[DE]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[s0]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[bd]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[a0]=e.presencePenalty),t}function mW(e,t,n){const r={[al]:aW,[ar]:e,[We]:"auto.ai.google_genai"};if(t){if(r[nn]=o$(t,n),"config"in t&&typeof t.config=="object"&&t.config){const o=t.config;if(Object.assign(r,pW(o)),"tools"in o&&Array.isArray(o.tools)){const i=o.tools.flatMap(s=>s.functionDeclarations);r[cl]=JSON.stringify(i)}}}else r[nn]=o$({},n);return r}function i$(e,t,n,r){if(n){const i=t.contents;i!=null&&e.setAttribute(c0,typeof i=="string"?i:JSON.stringify(i));return}const o=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&o.push(...pl(t.config.systemInstruction,"system")),"history"in t&&o.push(...pl(t.history,"user")),"contents"in t&&o.push(...pl(t.contents,"user")),"message"in t&&o.push(...pl(t.message,"user")),Array.isArray(o)&&o.length){const{systemInstructions:i,filteredMessages:s}=fl(o);i&&e.setAttribute(ll,i);const l=Array.isArray(s)?s.length:0;e.setAttributes({[_i]:l,[ls]:r?us(s):ds(s)})}}function _W(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(as,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[pi]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[mi]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[Ao]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(o=>o.content?.parts&&Array.isArray(o.content.parts)?o.content.parts.map(i=>typeof i.text=="string"?i.text:"").filter(i=>i.length>0).join(""):"").filter(o=>o.length>0);r.length>0&&e.setAttributes({[kr]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[No]:JSON.stringify(r)})}}}function hW(e,t,n,r,o){const i=n.operation==="embeddings";return new Proxy(e,{apply(s,l,c){const d=n.operation||"unknown",f=c[0],u=mW(d,f,r),p=u[nn]??"unknown";return n.streaming?Qr({name:`${d} ${p}`,op:`gen_ai.${d}`,attributes:u},async m=>{try{o.recordInputs&&f&&i$(m,f,i,to(o.enableTruncation));const _=await s.apply(r,c);return fW(_,m,!!o.recordOutputs)}catch(_){throw m.setStatus({code:Ge,message:"internal_error"}),lt(_,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),m.end(),_}}):vr({name:`${d} ${p}`,op:`gen_ai.${d}`,attributes:u},m=>(o.recordInputs&&f&&i$(m,f,i,to(o.enableTruncation)),Im(()=>s.apply(r,c),_=>{lt(_,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},_=>{i||_W(m,_,o.recordOutputs)})))}})}function m0(e,t="",n){return new Proxy(e,{get:(r,o,i)=>{const s=Reflect.get(r,o,i),l=f0(t,String(o)),c=sW[l];if(typeof s=="function"&&c){const d=c.operation?hW(s,l,c,r,n):s.bind(r);return c.proxyResultPath?function(...f){const u=d(...f);return u&&typeof u=="object"?m0(u,c.proxyResultPath,n):u}:d}return typeof s=="function"?s.bind(r):s&&typeof s=="object"?m0(s,l,n):s}})}function gW(e,t){return m0(e,"",hi(t))}const fs="auto.ai.langchain",yW={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},Kn=(e,t,n)=>{n!=null&&(e[t]=n)},Ln=(e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)};function gi(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function ps(e){if(Array.isArray(e))try{const t=e.map(n=>n&&typeof n=="object"&&cs(n)?ul(n):n);return JSON.stringify(t)}catch{return String(e)}return gi(e)}function ml(e){const t=e.toLowerCase();return yW[t]??t}function s$(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function a$(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function _0(e){return e.map(t=>{const n=t._getType;if(typeof n=="function"){const o=n.call(t);return{role:ml(o),content:ps(t.content)}}if(t.lc===1&&t.kwargs){const o=t.id,i=Array.isArray(o)&&o.length>0?o[o.length-1]:"",s=typeof i=="string"?s$(i):"user";return{role:ml(s),content:ps(t.kwargs?.content)}}if(t.type){const o=String(t.type).toLowerCase();return{role:ml(o),content:ps(t.content)}}if(t.role)return{role:ml(String(t.role)),content:ps(t.content)};const r=t.constructor?.name;return r&&r!=="Object"?{role:ml(s$(r)),content:ps(t.content)}:{role:"user",content:ps(t.content)}})}function bW(e,t,n){const r={},o="kwargs"in e?e.kwargs:void 0,i=t?.temperature??n?.ls_temperature??o?.temperature;Ln(r,yd,i);const s=t?.max_tokens??n?.ls_max_tokens??o?.max_tokens;Ln(r,s0,s);const l=t?.top_p??o?.top_p;Ln(r,Ed,l);const c=t?.frequency_penalty;Ln(r,bd,c);const d=t?.presence_penalty;return Ln(r,a0,d),t&&"stream"in t&&Kn(r,i0,!!t.stream),r}function l$(e,t,n,r,o){return{[al]:gi(e??"langchain"),[ar]:"chat",[nn]:gi(t),[We]:fs,...bW(n,r,o)}}function EW(e,t,n,r,o,i){const s=i?.ls_provider,l=o?.model??i?.ls_model_name??"unknown",c=l$(s,l,e,o,i);if(n&&Array.isArray(t)&&t.length>0){Kn(c,_i,t.length);const d=t.map(f=>({role:"user",content:f}));Kn(c,ls,r?us(d):ds(d))}return c}function $W(e,t,n,r,o,i){const s=i?.ls_provider??e.id?.[2],l=o?.model??i?.ls_model_name??"unknown",c=l$(s,l,e,o,i);if(n&&Array.isArray(t)&&t.length>0){const d=_0(t.flat()),{systemInstructions:f,filteredMessages:u}=fl(d);f&&Kn(c,ll,f);const p=Array.isArray(u)?u.length:0;Kn(c,_i,p),Kn(c,ls,r?us(u):ds(u))}return c}function SW(e,t){const n=[],r=e.flat();for(const o of r){const s=o.message?.tool_calls;if(Array.isArray(s)&&s.length>0)n.push(...s);else{const l=o.message?.content;if(Array.isArray(l))for(const c of l){const d=c;d.type==="tool_use"&&n.push(d)}}}n.length>0&&Kn(t,No,gi(n))}function vW(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)Ln(t,pi,n.promptTokens),Ln(t,mi,n.completionTokens),Ln(t,Ao,n.totalTokens);else if(r){Ln(t,pi,r.input_tokens),Ln(t,mi,r.output_tokens);const o=Number(r.input_tokens),i=Number(r.output_tokens),s=(Number.isNaN(o)?0:o)+(Number.isNaN(i)?0:i);s>0&&Ln(t,Ao,s),r.cache_creation_input_tokens!==void 0&&Ln(t,Qq,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&Ln(t,eH,r.cache_read_input_tokens)}}function TW(e,t){if(!e)return;const n={};if(Array.isArray(e.generations)){const d=e.generations.flat().map(f=>f.generationInfo?.finish_reason?f.generationInfo.finish_reason:f.generation_info?.finish_reason?f.generation_info.finish_reason:null).filter(f=>typeof f=="string");if(d.length>0&&Kn(n,ss,gi(d)),SW(e.generations,n),t){const f=e.generations.flat().map(u=>u.text??u.message?.content).filter(u=>typeof u=="string");f.length>0&&Kn(n,kr,gi(f))}}vW(e.llmOutput,n);const r=e.llmOutput,i=e.generations?.[0]?.[0]?.message,s=r?.model_name??r?.model??i?.response_metadata?.model_name;s&&Kn(n,as,s);const l=r?.id??i?.id;l&&Kn(n,$d,l);const c=r?.stop_reason??i?.response_metadata?.finish_reason;return c&&Kn(n,Xq,gi(c)),n}function h0(e){const t={},n=e?.lc_agent_name;return typeof n=="string"&&(t[Sd]=n),t}function wW(e){const t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;const n=t.map(r=>{const o=r.function;return{type:"function",name:r.name??o?.name??"",description:r.description??o?.description}});return JSON.stringify(n)}function g0(e={}){const{recordInputs:t,recordOutputs:n}=hi(e),r=to(e.enableTruncation),o=new Map,i=l=>{const c=o.get(l);c?.isRecording()&&(c.end(),o.delete(l))},s={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(l,c,d,f,u,p,m,_){const b=a$(p),g=EW(l,c,t,r,b,m),h=g[nn],y=g[ar];Qr({name:`${y} ${h}`,op:"gen_ai.chat",attributes:{...h0(m),...g,[tt]:"gen_ai.chat"}},E=>(o.set(d,E),E))},handleChatModelStart(l,c,d,f,u,p,m,_){const b=a$(p),g=$W(l,c,t,r,b,m),h=wW(u);h&&(g[cl]=h);const y=g[nn],E=g[ar];Qr({name:`${E} ${y}`,op:"gen_ai.chat",attributes:{...h0(m),...g,[tt]:"gen_ai.chat"}},$=>(o.set(d,$),$))},handleLLMEnd(l,c,d,f,u){const p=o.get(c);if(p?.isRecording()){const m=TW(l,n);m&&p.setAttributes(m),i(c)}},handleLLMError(l,c){const d=o.get(c);d?.isRecording()&&(d.setStatus({code:Ge,message:"internal_error"}),i(c)),lt(l,{mechanism:{handled:!1,type:`${fs}.llm_error_handler`}})},handleChainStart(l,c,d,f,u,p,m,_){if(p?.__sentry_langgraph__)return;const b=_||l.name||"unknown_chain",g={[We]:"auto.ai.langchain","langchain.chain.name":b};t&&(g["langchain.chain.inputs"]=JSON.stringify(c)),Qr({name:`chain ${b}`,op:"gen_ai.invoke_agent",attributes:{...g,[tt]:"gen_ai.invoke_agent"}},h=>(o.set(d,h),h))},handleChainEnd(l,c){const d=o.get(c);d?.isRecording()&&(n&&d.setAttributes({"langchain.chain.outputs":JSON.stringify(l)}),i(c))},handleChainError(l,c){const d=o.get(c);d?.isRecording()&&(d.setStatus({code:Ge,message:"internal_error"}),i(c)),lt(l,{mechanism:{handled:!1,type:`${fs}.chain_error_handler`}})},handleToolStart(l,c,d,f,u,p,m){if(p?.__sentry_langgraph__)return;const _=m||l.name||"unknown_tool",b={...h0(p),[We]:fs,[ar]:"execute_tool",[VE]:_};t&&(b[jE]=c),Qr({name:`execute_tool ${_}`,op:"gen_ai.execute_tool",attributes:{...b,[tt]:"gen_ai.execute_tool"}},g=>(o.set(d,g),g))},handleToolEnd(l,c){const d=o.get(c);if(d?.isRecording()){if(n){const f=l,u=f&&typeof f=="object"&&"content"in f?f.content:l;d.setAttributes({[zE]:typeof u=="string"?u:JSON.stringify(u)})}i(c)}},handleToolError(l,c){const d=o.get(c);d?.isRecording()&&(d.setStatus({code:Ge,message:"internal_error"}),i(c)),lt(l,{mechanism:{handled:!1,type:`${fs}.tool_error_handler`}})},copy(){return s},toJSON(){return{lc:1,type:"not_implemented",id:s.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:s.lc_id}}};return s}const y0="auto.ai.langgraph";function kW(e){const t=e[0];if(typeof t!="object"||!t||!("llm"in t)||!t.llm||typeof t.llm!="object")return null;const n=t.llm;return typeof n.modelName!="string"&&typeof n.model!="string"?null:n}function AW(e){const t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function NW(e,t,n){const r="__sentry_tool_wrapped__";for(const o of e){if(!o||typeof o!="object")continue;const i=o,s=i.invoke;if(typeof s!="function"||Object.prototype.hasOwnProperty.call(i,r))continue;const l=typeof i.name=="string"?i.name:"unknown_tool",c=typeof i.description=="string"?i.description:void 0,d=new Proxy(s,{apply(f,u,p){const m={[We]:y0,[tt]:UE,[ar]:"execute_tool",[VE]:l,[rH]:"function"},b=p[1]?.metadata?.lc_agent_name??n;typeof b=="string"&&(m[Sd]=b),c&&(m[oH]=c);const g=p[0];if(typeof g=="object"&&g&&("id"in g&&typeof g.id=="string"&&(m[nH]=g.id),t.recordInputs)){const h="args"in g&&typeof g.args=="object"?g.args:g;try{m[jE]=JSON.stringify(h)}catch{}}return vr({op:UE,name:`execute_tool ${l}`,attributes:m},async h=>{try{const y=await Reflect.apply(f,u,p);if(t.recordOutputs)try{const E=y,$=E&&typeof E=="object"&&"content"in E?E.content:y;h.setAttribute(zE,typeof $=="string"?$:JSON.stringify($))}catch{}return y}catch(y){throw h.setStatus({code:Ge,message:"internal_error"}),lt(y,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),y}})}});i.invoke=d,Object.defineProperty(i,r,{value:!0,enumerable:!1})}return e}function IW(e){if(!e||e.length===0)return null;const t=[];for(const n of e)if(n&&typeof n=="object"){const r=n.tool_calls;r&&Array.isArray(r)&&t.push(...r)}return t.length>0?t:null}function CW(e){const t=e;let n=0,r=0,o=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){const i=t.usage_metadata;return typeof i.input_tokens=="number"&&(n=i.input_tokens),typeof i.output_tokens=="number"&&(r=i.output_tokens),typeof i.total_tokens=="number"&&(o=i.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:o}}if(t.response_metadata&&typeof t.response_metadata=="object"){const i=t.response_metadata;if(i.tokenUsage&&typeof i.tokenUsage=="object"){const s=i.tokenUsage;typeof s.promptTokens=="number"&&(n=s.promptTokens),typeof s.completionTokens=="number"&&(r=s.completionTokens),typeof s.totalTokens=="number"&&(o=s.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:o}}function xW(e,t){const n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){const r=n.response_metadata;r.model_name&&typeof r.model_name=="string"&&e.setAttribute(as,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(ss,[r.finish_reason])}}function OW(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;const t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(n=>({name:n.lc_kwargs?.name,description:n.lc_kwargs?.description,schema:n.lc_kwargs?.schema}))}function RW(e,t,n){const o=n?.messages;if(!o||!Array.isArray(o))return;const i=t?.length??0,s=o.length>i?o.slice(i):[];if(s.length===0)return;const l=IW(s);l&&e.setAttribute(No,JSON.stringify(l));const c=_0(s);e.setAttribute(kr,JSON.stringify(c));let d=0,f=0,u=0;for(const p of s){const m=CW(p);d+=m.inputTokens,f+=m.outputTokens,u+=m.totalTokens,xW(e,p)}d>0&&e.setAttribute(pi,d),f>0&&e.setAttribute(mi,f),u>0&&e.setAttribute(Ao,u)}function PW(e,t){if(!e)return[t];if(Array.isArray(e))return e.includes(t)?e:[...e,t];const n=e;return typeof n.addHandler=="function"&&(Array.isArray(n.handlers)&&n.handlers.includes(t)||n.addHandler(t)),e}let b0=!1;const Ad="__sentry_patched__";function MW(e,t){if(Object.prototype.hasOwnProperty.call(e,Ad))return e;const n=g0(t),r=new Proxy(e,{apply(o,i,s){return b0?Reflect.apply(o,i,s):vr({op:"gen_ai.create_agent",name:"create_agent",attributes:{[We]:y0,[tt]:"gen_ai.create_agent",[ar]:"create_agent"}},l=>{try{const c=Reflect.apply(o,i,s),d=s.length>0?s[0]:{};d?.name&&typeof d.name=="string"&&(l.setAttribute(Sd,d.name),l.updateName(`create_agent ${d.name}`));const f=c.invoke;return f&&typeof f=="function"&&(c.invoke=c$(f.bind(c),c,d,t,void 0,n)),c}catch(c){throw l.setStatus({code:Ge,message:"internal_error"}),lt(c,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),c}})}});return Object.defineProperty(r,Ad,{value:!0,enumerable:!1}),r}function c$(e,t,n,r,o,i){return new Proxy(e,{apply(s,l,c){const d=o?.modelName??o?.model;return vr({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[We]:y0,[tt]:tH,[ar]:"invoke_agent"}},async f=>{try{const u=n?.name;u&&typeof u=="string"&&(f.setAttribute(Zq,u),f.setAttribute(Sd,u),f.updateName(`invoke_agent ${u}`)),d&&f.setAttribute(nn,d);const _=(c.length>1?c[1]:void 0)?.configurable?.thread_id;if(_&&typeof _=="string"&&f.setAttribute(l0,_),i){const $=c[1]??{};c[1]=$;const O=$.metadata??{};$.metadata={...O,__sentry_langgraph__:!0,...typeof u=="string"?{lc_agent_name:u}:{}},$.callbacks=PW($.callbacks,i)}const b=OW(t);b&&f.setAttribute(cl,JSON.stringify(b));const g=r.recordInputs,h=r.recordOutputs,y=c.length>0?c[0]?.messages??[]:[];if(y&&g){const $=_0(y),{systemInstructions:O,filteredMessages:N}=fl($);O&&f.setAttribute(ll,O);const v=to(r.enableTruncation),B=Array.isArray(N)?N.length:0;f.setAttributes({[ls]:v?us(N):ds(N),[_i]:B})}const E=await Reflect.apply(s,l,c);return h&&RW(f,y??null,E),E}catch(u){throw f.setStatus({code:Ge,message:"internal_error"}),lt(u,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),u}})}})}function DW(e,t){if(Object.prototype.hasOwnProperty.call(e,Ad))return e;const n=hi(t),r=g0(n),o=new Proxy(e,{apply(i,s,l){const c=kW(l),d=AW(l),f=l[0];f&&Array.isArray(f.tools)&&f.tools.length>0&&NW(f.tools,n,d??void 0),b0=!0;let u;try{u=Reflect.apply(i,s,l)}finally{b0=!1}const p=u.invoke;if(p&&typeof p=="function"){const m={};d&&(m.name=d),u.invoke=c$(p.bind(u),u,m,n,c,r)}return u}});return Object.defineProperty(o,Ad,{value:!0,enumerable:!1}),o}function LW(e,t){return e.compile=MW(e.compile,hi(t)),e}function FW(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function BW(){return"npm"}function UW(){return!FW()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function _l(){return typeof window<"u"&&(!UW()||VW())}function VW(){return Te.process?.type==="renderer"}function jW(e,t,n){const r=n.getOptions(),o=n.getDsn(),i=r.tunnel,s=tl(r._metadata),l={sent_at:new Date().toISOString(),...zW(t)&&{trace:t},...s&&{sdk:s},...!!i&&o&&{dsn:Sr(o)}},c=r.sendDefaultPii?"auto":"never",d=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,..._l()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return Gn(l,[d])}function zW(e){return!!e.trace_id&&!!e.public_key}function qW(e){let t=156;if(t+=e.name.length*2,t+=p4(e.attributes),e.links&&e.links.length>0){const r=e.links[0]?.attributes,o=100+(r?p4(r):0);t+=o*e.links.length}return t}const d$=1e3,HW=5e6;class WW{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:i}=n??{};this._maxSpanLimit=r&&r>0&&r<=d$?r:d$,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=i&&i>0?i:HW,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(s=>{clearTimeout(s.timeout)}),this._traceBuckets.clear()})}add(t){const n=t.trace_id;let r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:ld(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=qW(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(ue&&P.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}const r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o){ue&&P.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}const i=Wn(o),s=r.map(c=>{const{_segmentSpan:d,...f}=c;return f}),l=jW(s,i,this._client);ue&&P.log(`Sending span envelope for trace ${t} with ${s.length} spans`),this._client.sendEnvelope(l).then(null,c=>{ue&&P.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){const n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}function u$(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const ms=Te;function GW(){return"history"in ms&&!!ms.history}function YW(){if(!("fetch"in ms))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function E0(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function f$(){if(typeof EdgeRuntime=="string")return!0;if(!YW())return!1;if(E0(ms.fetch))return!0;let e=!1;const t=ms.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=E0(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ue&&P.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function KW(){return"ReportingObserver"in ms}function $0(e,t){const n="fetch",r=$o(n,e);return So(n,()=>p$(void 0,t)),r}function XW(e){const t="fetch-body-resolved",n=$o(t,e);return So(t,()=>p$(ZW)),n}function p$(e,t=!1){t&&!f$()||Qt(Te,"fetch",function(n){return function(...r){const o=new Error,{method:i,url:s}=QW(r),l={args:r,fetchData:{method:i,url:s},startTimestamp:ut()*1e3,virtualError:o,headers:eG(r)};return e||qn("fetch",{...l}),n.apply(Te,r).then(async c=>(e?e(c):qn("fetch",{...l,endTimestamp:ut()*1e3,response:c}),c),c=>{qn("fetch",{...l,endTimestamp:ut()*1e3,error:c}),qr(c)&&c.stack===void 0&&(c.stack=o.stack,en(c,"framesToPop",1));const f=_e()?.getOptions().enhanceFetchErrorMessages??"always";if(f!==!1&&c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const m=new URL(l.fetchData.url).host;f==="always"?c.message=`${c.message} (${m})`:en(c,"__sentry_fetch_url_host__",m)}catch{}throw c})}})}async function JW(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:l}=await r.read();clearTimeout(s),l&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(s)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function ZW(e){let t;try{t=e.clone()}catch{return}JW(t,()=>{qn("fetch-body-resolved",{endTimestamp:ut()*1e3,response:e})})}function Nd(e,t){return!!e&&typeof e=="object"&&!!e[t]}function m$(e){return typeof e=="string"?e:e?Nd(e,"url")?e.url:e.toString?e.toString():"":""}function QW(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:m$(n),method:Nd(r,"method")?String(r.method).toUpperCase():mm(n)&&Nd(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:m$(t),method:Nd(t,"method")?String(t.method).toUpperCase():"GET"}}function eG(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(mm(t))return new Headers(t.headers)}catch{}}function tG(e){const t=e.constructor?.name??"";return t.includes("OpenAI")?"openai":t.includes("Google")?"google_genai":t.includes("Mistral")?"mistralai":t.includes("Vertex")?"google_vertexai":t.includes("Bedrock")?"aws_bedrock":t.includes("Ollama")?"ollama":t.includes("Cloudflare")?"cloudflare":t.includes("Cohere")?"cohere":"langchain"}function nG(e){const t=e??{},n={[We]:fs,[tt]:BE,[ar]:"embeddings",[nn]:t.model??"unknown"};return n[al]=tG(t),"dimensions"in t&&(n[FE]=t.dimensions),"encodingFormat"in t&&(n[LE]=t.encodingFormat),n}function _$(e,t={}){const{recordInputs:n}=hi(t);return new Proxy(e,{apply(r,o,i){const s=nG(o),l=s[nn]||"unknown";if(n){const c=i[0];c!=null&&(s[c0]=typeof c=="string"?c:JSON.stringify(c))}return vr({name:`embeddings ${l}`,op:BE,attributes:s},()=>Reflect.apply(r,o,i).then(void 0,c=>{throw lt(c,{mechanism:{handled:!1,type:"auto.ai.langchain"}}),c}))}})}function rG(e,t){const n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=_$(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=_$(n.embedDocuments,t)),e}const lr=Te,ft=lr.document,hl=lr.navigator,h$="Report a Bug",oG="Cancel",iG="Send Bug Report",sG="Confirm",aG="Report a Bug",lG="your.email@example.org",cG="Email",dG="What's the bug? What did you expect?",uG="Description",fG="Your Name",pG="Name",mG="Thank you for your report!",_G="(required)",hG="Add a screenshot",gG="Remove screenshot",yG="Highlight",bG="Hide",EG="Remove",g$="Unable to submit feedback with empty message",y$="No client setup, cannot send feedback.",b$="Unable to determine if Feedback was correctly sent.",E$="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",$$="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",$G="widget",SG="api",vG=5e3,TG={ERROR_EMPTY_MESSAGE:g$,ERROR_NO_CLIENT:y$,ERROR_TIMEOUT:b$,ERROR_FORBIDDEN:E$,ERROR_GENERIC:$$};function Id(e,t){return t?.[e]??TG[e]}function S$(e,t){return new Error(Id(e,t))}const v$=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw S$("ERROR_EMPTY_MESSAGE",n);const r=_e();if(!r)throw S$("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&Re().setTags(e.tags);const o=OE({source:SG,url:ni(),...e},t);return new Promise((i,s)=>{const l=setTimeout(()=>{c(),s(Id("ERROR_TIMEOUT",n))},3e4),c=r.on("afterSendEvent",(d,f)=>{if(d.event_id===o)return clearTimeout(l),c(),f?.statusCode&&f.statusCode>=200&&f.statusCode<300?i(o):f?.statusCode===403?s(Id("ERROR_FORBIDDEN",n)):s(Id("ERROR_GENERIC",n))})})},Cd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function wG(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(hl.userAgent)||/Macintosh/i.test(hl.userAgent)&&hl.maxTouchPoints&&hl.maxTouchPoints>1||!isSecureContext)}function xd(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function kG(e){const t=ft.createElement("style");return t.textContent=`
|
|
45
|
+
Url: ${ud(e)}`),!0}return!1}function mz(e,t){return t?.length?B9(e).some(n=>or(n,t)):!1}function _z(e,t){if(!t?.length)return!1;const n=e.transaction;return n?or(n,t):!1}function hz(e,t){if(!t?.length)return!1;const n=ud(e);return n?or(n,t):!1}function gz(e,t){if(!t?.length)return!0;const n=ud(e);return n?or(n,t):!0}function yz(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ud(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?yz(n):null}catch{return ue&&P.error(`Cannot extract url for event ${ri(e)}`),null}}function bz(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Ez(e,t,n,r,o,i){if(!o.exception?.values||!i||!Wr(i.originalException,Error))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=t_(e,t,r,i.originalException,n,o.exception.values,s,0))}function t_(e,t,n,r,o,i,s,l){if(i.length>=n+1)return i;let c=[...i];if(Wr(r[o],Error)){fE(s,l,r);const d=e(t,r[o]),f=c.length;pE(d,o,f,l),c=t_(e,t,n,r[o],o,[d,...c],d,f)}return uE(r)&&r.errors.forEach((d,f)=>{if(Wr(d,Error)){fE(s,l,r);const u=e(t,d),p=c.length;pE(u,`errors[${f}]`,p,l),c=t_(e,t,n,d,o,[u,...c],u,p)}}),c}function uE(e){return Array.isArray(e.errors)}function fE(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...uE(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function pE(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const mE=new Map,_E=new Set;function $z(e){if(Te._sentryModuleMetadata)for(const t of Object.keys(Te._sentryModuleMetadata)){const n=Te._sentryModuleMetadata[t];if(_E.has(t))continue;_E.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){mE.set(o.filename,n);break}}}function Sz(e,t){return $z(e),mE.get(t)}function hE(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const o=Sz(e,r.filename);o&&(r.module_metadata=o)})})}function gE(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const vz=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{li(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(gE(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;hE(n,t)})}});function n_(e){const t="console",n=$o(t,e);return So(t,Tz),n}function Tz(){"console"in Te&&am.forEach(function(e){e in Te.console&&Qt(Te.console,e,function(t){return Vc[e]=t,function(...n){qn("console",{args:n,level:e}),Vc[e]?.apply(Te.console,n)}})})}function fd(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const wz="CaptureConsole",kz=((e={})=>{const t=e.levels||am,n=e.handled??!0;return{name:wz,setup(r){"console"in Te&&n_(({args:o,level:i})=>{_e()!==r||!t.includes(i)||Az(o,i,n)})}}});function Az(e,t,n){const r=fd(t),o=new Error,i={level:fd(t),extra:{arguments:e}};Hn(s=>{if(s.addEventProcessor(d=>(d.logger="console",Yr(d,{handled:n,type:"auto.core.capture_console"}),d)),t==="assert"){if(!e[0]){const d=`Assertion failed: ${Hc(e.slice(1)," ")||"console.assert"}`;s.setExtra("arguments",e.slice(1)),s.captureMessage(d,r,{captureContext:i,syntheticException:o})}return}const l=e.find(d=>d instanceof Error);if(l){lt(l,i);return}const c=Hc(e," ");s.captureMessage(c,r,{captureContext:i,syntheticException:o})})}const Nz="Dedupe",yE=(()=>{let e;return{name:Nz,processEvent(t){if(t.type)return t;try{if(Iz(t,e))return ue&&P.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}});function Iz(e,t){return t?!!(Cz(e,t)||xz(e,t)):!1}function Cz(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!EE(e,t)||!bE(e,t))}function xz(e,t){const n=$E(t),r=$E(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!EE(e,t)||!bE(e,t))}function bE(e,t){let n=um(e),r=um(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function EE(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function $E(e){return e.exception?.values?.[0]}const Oz="ExtraErrorData",Rz=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:Oz,processEvent(r,o,i){const{maxValueLength:s}=i.getOptions();return Pz(r,o,t,n,s)}}});function Pz(e,t={},n,r,o){if(!t.originalException||!qr(t.originalException))return e;const i=t.originalException.name||t.originalException.constructor.name,s=SE(t.originalException,r,o);if(s){const l={...e.contexts},c=tn(s,n);return An(c)&&(eV(c),l[i]=c),{...e,contexts:l}}return e}function SE(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const i of Object.keys(e)){if(r.indexOf(i)!==-1)continue;const s=e[i];o[i]=qr(s)||typeof s=="string"?n?za(`${s}`,n):`${s}`:s}if(t&&e.cause!==void 0)if(qr(e.cause)){const i=e.cause.name||e.cause.constructor.name;o.cause={[i]:SE(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){const i=e.toJSON();for(const s of Object.keys(i)){const l=i[s];o[s]=qr(l)?l.toString():l}}return o}catch(r){ue&&P.error("Unable to extract extra data from the Error object:",r)}return null}function Mz(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const Dz=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Lz(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Dz.exec(t);return n?n.slice(1):[]}function vE(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=Mz(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function TE(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function Fz(e,t){e=vE(e).slice(1),t=vE(t).slice(1);const n=TE(e.split("/")),r=TE(t.split("/")),o=Math.min(n.length,r.length);let i=o;for(let l=0;l<o;l++)if(n[l]!==r[l]){i=l;break}let s=[];for(let l=i;l<n.length;l++)s.push("..");return s=s.concat(r.slice(i)),s.join("/")}function Bz(e,t){return Lz(e)[2]||""}const Uz="RewriteFrames",Vz=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in Te&&!!Te.window,o=e.iteratee||jz({isBrowser:r,root:t,prefix:n});function i(l){try{return{...l,exception:{...l.exception,values:l.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:s(c.stacktrace)}}))}}}catch{return l}}function s(l){return{...l,frames:l?.frames?.map(c=>o(c))}}return{name:Uz,processEvent(l){let c=l;return l.exception&&Array.isArray(l.exception.values)&&(c=i(c)),c}}};function jz({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),i=/^\//.test(r.filename);if(e){if(t){const s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(o||i){const s=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,l=t?Fz(t,s):Bz(s);r.filename=`${n}${l}`}return r}}const zz=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],qz=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],Hz={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},wE=["select","insert","upsert","update","delete"];function pd(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function md(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function kE(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function Wz(e,t){return kE(e,t)!==void 0}function Gz(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function Yz(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&Hz[n]||"filter",`${o}(${e}, ${r.join(".")})`}function AE(e,t=!1){return new Proxy(e,{apply(n,r,o){return vr({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[We]:"auto.db.supabase",[tt]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},i=>Reflect.apply(n,r,o).then(s=>(s&&typeof s=="object"&&"error"in s&&s.error?(i.setStatus({code:Ge}),lt(s.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):i.setStatus({code:Xa}),i.end(),s)).catch(s=>{throw i.setStatus({code:Ge}),i.end(),lt(s,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),s}).then(...o))}})}function Kz(e){const t=e.auth;if(!(!t||md(e.auth))){for(const n of zz){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=AE(r))}for(const n of qz){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=AE(r,!0))}pd(e.auth)}}function Xz(e){md(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const o=Reflect.apply(t,n,r),i=o.constructor;return Zz(i),o}}),pd(e.prototype.from))}function Jz(e){md(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const o=wE,i=n,s=Gz(i.method,i.headers);if(!o.includes(s)||!i?.url?.pathname||typeof i.url.pathname!="string")return Reflect.apply(t,n,r);const l=i.url.pathname.split("/"),c=l.length>0?l[l.length-1]:"",d=[];for(const[y,E]of i.url.searchParams.entries())d.push(Yz(y,E));const f=Object.create(null);if(An(i.body))for(const[y,E]of Object.entries(i.body))f[y]=E;const u=!!_e()?.getOptions().sendDefaultPii,p=kE(i.body,f),m=s==="select"?"":`${s}${Wz(i.body,f)?"(...) ":""}`,_=u?d.join(" "):d.length>0?"[redacted]":"",b=[m.trimEnd(),_].filter(Boolean).join(" "),g=b?`${b} from(${c})`:`from(${c})`,h={"db.table":c,"db.schema":i.schema,"db.url":i.url.origin,"db.sdk":i.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[We]:"auto.db.supabase",[tt]:"db"};return d.length&&u&&(h["db.query"]=d),p!==void 0&&u&&(h["db.body"]=p),vr({name:g,attributes:h},y=>Reflect.apply(t,n,[]).then(E=>{if(y&&(E&&typeof E=="object"&&"status"in E&&Ja(y,E.status||500),y.end()),E?.error){const N=new Error(E.error.message);E.error.code&&(N.code=E.error.code),E.error.details&&(N.details=E.error.details);const v={};d.length&&u&&(v.query=d),p!==void 0&&u&&(v.body=p),lt(N,B=>(B.addEventProcessor(H=>(Yr(H,{handled:!1,type:"auto.db.supabase.postgres"}),H)),B.setContext("supabase",v),B))}const $={type:"supabase",category:`db.${s}`,message:g},O={};return d.length&&u&&(O.query=d),p!==void 0&&u&&(O.body=p),Object.keys(O).length&&($.data=O),sr($),E},E=>{throw y&&(Ja(y,500),y.end()),E}).then(...r))}}),pd(e.prototype.then))}function Zz(e){for(const t of wE)md(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,o){const i=Reflect.apply(n,r,o),s=i.constructor;return ue&&P.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),Jz(s),i}}),pd(e.prototype[t]))}const NE=e=>{if(!e){ue&&P.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;Xz(t),Kz(e)},Qz="Supabase",eq=(e=>({setupOnce(){NE(e)},name:Qz})),tq=e=>eq(e.supabaseClient),nq=10,rq="ZodErrors";function oq(e){return qr(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function iq(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function sq(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function aq(e){const t=new Set;for(const r of e.issues){const o=sq(r.path);o.length>0&&t.add(o)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${za(n.join(", "),100)}`}function lq(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!oq(r.originalException)||r.originalException.issues.length===0)return n;try{const i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(iq);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:aq(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(o){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message}
|
|
46
|
+
${o.stack}`:"unknown"}}}}}const cq=((e={})=>{const t=e.limit??nq;return{name:rq,processEvent(n,r){return lq(t,e.saveZodIssuesAsAttachment,n,r)}}}),dq=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{li(n,(r,o)=>{if(o==="event"){const i=Array.isArray(r)?r[1]:void 0;i&&(gE(i),r[1]=i)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;hE(r,n)})},processEvent(t){const n=fq(t,e.ignoreSentryInternalFrames);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](i=>!i.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function uq(e,t){if(t!==0||!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(mq))return!1;if(e.pre_context){const n=e.pre_context.length;for(let r=0;r<n;r++)if(e.pre_context[r]?.includes(pq))return!0}return!1}function fq(e,t){const n=um(e);if(n)return n.filter((r,o)=>!r.filename||r.lineno==null&&r.colno==null&&r.instruction_addr==null?!1:!t||!uq(r,o)).map(r=>r.module_metadata?Object.keys(r.module_metadata).filter(o=>o.startsWith(IE)).map(o=>o.slice(IE.length)):[])}const IE="_sentryBundlerPluginAppKey:",pq="Attempt to invoke user-land function",mq="fn.apply(this, wrappedArguments)",_q=100,hq=10,_d="flag.evaluation.";function os(e){if(e.type)return e;const n=Re().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function ui(e,t,n=_q){const r=Re().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;gq(o,e,t,n)}function gq(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){ue&&P.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const o=e.findIndex(i=>i.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function fi(e,t,n=hq){if(typeof t!="boolean")return;const r=wt();if(!r)return;const o=Me(r).data;if(`${_d}${e}`in o){r.setAttribute(`${_d}${e}`,t);return}Object.keys(o).filter(s=>s.startsWith(_d)).length<n&&r.setAttribute(`${_d}${e}`,t)}const yq=()=>({name:"FeatureFlags",processEvent(e,t,n){return os(e)},addFeatureFlag(e,t){ui(e,t),fi(e,t)}}),bq=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Qt(t,"isOn",CE),typeof t.getFeatureValue=="function"&&Qt(t,"getFeatureValue",CE)},processEvent(t,n,r){return os(t)}});function CE(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(ui(n,r),fi(n,r)),r}}const Eq="ConversationId",$q=(()=>({name:Eq,setup(e){e.on("spanStart",t=>{const n=Re().getScopeData(),r=vt().getScopeData(),o=n.conversationId||r.conversationId;if(o){const{op:i,data:s,description:l}=Me(t);if(!i?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!l?.startsWith("ai."))return;t.setAttribute(IU,o)}})}}));function Sq(e,t,n,r,o){if(!e.fetchData)return;const{method:i,url:s}=e.fetchData,l=Mn()&&t(s);if(e.endTimestamp){const m=e.fetchData.__span;if(!m)return;const _=r[m];_&&(l&&(wq(_,e),vq(_,e,o)),delete r[m]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:d=!1}=typeof o=="object"?o:{spanOrigin:o},f=_e(),u=!!wt(),p=l&&u?Tr(Nq(s,i,c)):new Dn;if(l&&!u&&f?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(e.fetchData.url)){const m=e.args[0],_={...e.args[1]||{}},b=Tq(m,_,Mn()&&u?p:void 0,d);b&&(e.args[1]=_,_.headers=b)}if(f){const m={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",p,m)}return p}function vq(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Tq(e,t,n,r){const o=e_({span:n,propagateTraceparent:r}),i=o["sentry-trace"],s=o.baggage,l=o.traceparent;if(!i)return;const c=t.headers||(mm(e)?e.headers:void 0);if(c)if(kq(c)){const d=new Headers(c);if(d.get("sentry-trace")||d.set("sentry-trace",i),r&&l&&!d.get("traceparent")&&d.set("traceparent",l),s){const f=d.get("baggage");f?hd(f)||d.set("baggage",`${f},${s}`):d.set("baggage",s)}return d}else if(Aq(c)){const d=[...c];d.find(u=>u[0]==="sentry-trace")||d.push(["sentry-trace",i]),r&&l&&!d.find(u=>u[0]==="traceparent")&&d.push(["traceparent",l]);const f=c.find(u=>u[0]==="baggage"&&typeof u[1]=="string"&&hd(u[1]));return s&&!f&&d.push(["baggage",s]),d}else{const d="sentry-trace"in c?c["sentry-trace"]:void 0,f="traceparent"in c?c.traceparent:void 0,u="baggage"in c?c.baggage:void 0,p=u?Array.isArray(u)?[...u]:[u]:[],m=u&&(Array.isArray(u)?u.find(b=>hd(b)):hd(u));s&&!m&&p.push(s);const _=Object.assign({},c,{"sentry-trace":d??i,baggage:p.length>0?p.join(","):void 0});return r&&l&&!f&&(_.traceparent=l),_}else return{...o}}function wq(e,t){if(t.response){Ja(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:Ge,message:"internal_error"});e.end()}function hd(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Gc))}function kq(e){return typeof Headers<"u"&&Wr(e,Headers)}function Aq(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function Nq(e,t,n){if(e.startsWith("data:")){const i=ko(e);return{name:`${t} ${i}`,attributes:xE(e,void 0,t,n)}}const r=Qm(e),o=r?ez(r):e;return{name:`${t} ${o}`,attributes:xE(e,r,t,n)}}function xE(e,t,n,r){const o={url:ko(e),type:"fetch","http.method":n,[We]:r,[tt]:"http.client"};return t&&(Zm(t)||(o["http.url"]=ko(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function OE(e,t={},n=Re()){const{message:r,name:o,email:i,url:s,source:l,associatedEventId:c,tags:d}=e,f={contexts:{feedback:{contact_email:i,name:o,message:r,url:s,source:l,associated_event_id:c}},type:"feedback",level:"info",tags:d},u=n?.getClient()||_e();return u&&u.emit("beforeSendFeedback",f,t),n.captureEvent(f,t)}function is(e,t,n,r,o){sd({level:e,message:t,attributes:n,severityNumber:o},r)}function Iq(e,t,{scope:n}={}){is("trace",e,t,n)}function Cq(e,t,{scope:n}={}){is("debug",e,t,n)}function xq(e,t,{scope:n}={}){is("info",e,t,n)}function Oq(e,t,{scope:n}={}){is("warn",e,t,n)}function Rq(e,t,{scope:n}={}){is("error",e,t,n)}function Pq(e,t,{scope:n}={}){is("fatal",e,t,n)}const Mq=Object.freeze(Object.defineProperty({__proto__:null,debug:Cq,error:Rq,fatal:Pq,fmt:oz,info:xq,trace:Iq,warn:Oq},Symbol.toStringTag,{value:"Module"}));function gd(e,t,n){return"util"in Te&&typeof Te.util.format=="function"?Te.util.format(...e):Dq(e,t,n)}function Dq(e,t,n){return e.map(r=>Hr(r)?String(r):JSON.stringify(tn(r,t,n))).join(" ")}function RE(e){return/%[sdifocO]/.test(e)}function PE(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((o,i)=>{n[`sentry.message.parameter.${i}`]=o}),n}const Lq="ConsoleLogs",ME={[We]:"auto.log.console"},Fq=((e={})=>{const t=e.levels||am;return{name:Lq,setup(n){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:i=1e3}=n.getOptions();if(!r){ue&&P.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}const s=n_(({args:l,level:c})=>{if(_e()!==n||!t.includes(c))return;const d=l[0],f=l.slice(1);if(c==="assert"){if(!d){const _=f.length>0?`Assertion failed: ${gd(f,o,i)}`:"Assertion failed";sd({level:"error",message:_,attributes:ME})}return}const u=c==="log",p=l.length>1&&typeof l[0]=="string"&&!RE(l[0]),m={...ME,...p?PE(d,f):{}};sd({level:u?"info":c,message:gd(l,o,i),severityNumber:u?10:void 0,attributes:m})});n.registerCleanup(s)}}});function r_(e,t,n,r){Pj({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function Bq(e,t=1,n){r_("counter",e,t,n)}function Uq(e,t,n){r_("gauge",e,t,n)}function o_(e,t,n){r_("distribution",e,t,n)}const Vq=Object.freeze(Object.defineProperty({__proto__:null,count:Bq,distribution:o_,gauge:Uq},Symbol.toStringTag,{value:"Module"})),jq=["trace","debug","info","warn","error","fatal"];function zq(e={}){const t=new Set(e.levels??jq),n=e.client;return{log(r){const{type:o,level:i,message:s,args:l,tag:c,date:d,...f}=r,u=n||_e();if(!u)return;const p=Wq(o,i);if(!t.has(p))return;const{normalizeDepth:m=3,normalizeMaxBreadth:_=1e3}=u.getOptions(),b={};for(const[h,y]of Object.entries(f))b[h]=tn(y,m,_);b["sentry.origin"]="auto.log.consola",c&&(b["consola.tag"]=c),o&&(b["consola.type"]=o),i!=null&&typeof i=="number"&&(b["consola.level"]=i);const g=Yq(Gq(l,m,_),m,_);g?.attributes&&Object.assign(b,g.attributes),sd({level:p,message:g?.message||s||l&&gd(l,m,_)||"",attributes:b})}}}const qq={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},Hq={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function Wq(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=qq[e];if(n)return n}if(typeof t=="number"){const n=Hq[t];if(n)return n}return"info"}function Gq(e,t,n){if(!e?.length)return{message:""};const r=gd(e,t,n),o=e[0];if(An(o)){const i=typeof e[1]=="string"?2:1,s=e.slice(i);return{message:r,attributes:o,messageParameters:s}}else{const i=e.slice(1),s=i.length>0&&typeof o=="string"&&!RE(o);return{message:r,messageTemplate:s?o:void 0,messageParameters:s?i:void 0}}}function Yq(e,t,n){const{message:r,attributes:o,messageTemplate:i,messageParameters:s}=e,l={};if(i&&s){const c=PE(i,s);for(const[d,f]of Object.entries(c))l[d]=d.startsWith("sentry.message.parameter.")?tn(f,t,n):f}else s&&s.length>0&&s.forEach((c,d)=>{l[`sentry.message.parameter.${d}`]=tn(c,t,n)});return{message:r,attributes:{...tn(o,t,n),...l}}}const Kq="gen_ai.prompt",al="gen_ai.system",nn="gen_ai.request.model",i_="gen_ai.request.stream",yd="gen_ai.request.temperature",s_="gen_ai.request.max_tokens",bd="gen_ai.request.frequency_penalty",a_="gen_ai.request.presence_penalty",Ed="gen_ai.request.top_p",DE="gen_ai.request.top_k",LE="gen_ai.request.encoding_format",FE="gen_ai.request.dimensions",ss="gen_ai.response.finish_reasons",as="gen_ai.response.model",$d="gen_ai.response.id",Xq="gen_ai.response.stop_reason",pi="gen_ai.usage.input_tokens",mi="gen_ai.usage.output_tokens",Ao="gen_ai.usage.total_tokens",ar="gen_ai.operation.name",_i="sentry.sdk_meta.gen_ai.input.messages.original_length",ls="gen_ai.input.messages",ll="gen_ai.system_instructions",kr="gen_ai.response.text",cl="gen_ai.request.available_tools",Jq="gen_ai.response.streaming",No="gen_ai.response.tool_calls",Sd="gen_ai.agent.name",Zq="gen_ai.pipeline.name",l_="gen_ai.conversation.id",Qq="gen_ai.usage.cache_creation_input_tokens",eH="gen_ai.usage.cache_read_input_tokens",tH="gen_ai.invoke_agent",c_="gen_ai.embeddings.input",BE="gen_ai.embeddings",UE="gen_ai.execute_tool",VE="gen_ai.tool.name",nH="gen_ai.tool.call.id",rH="gen_ai.tool.type",jE="gen_ai.tool.input",zE="gen_ai.tool.output",oH="gen_ai.tool.description";function cs(e){return!e||typeof e!="object"?!1:sH(e)||HE(e)||iH(e)||WE(e)||GE(e)||aH(e)||lH(e)||cH(e)||dH(e)||uH(e)||fH(e)||pH(e)}function iH(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):qE(e):!1}function qE(e){return"image_url"in e&&!!e.image_url&&typeof e.image_url=="object"&&"url"in e.image_url&&typeof e.image_url.url=="string"&&e.image_url.url.startsWith("data:")}function sH(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&cs(e.source)}function HE(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}function WE(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="string"}function GE(e){return"type"in e&&e.type==="file"&&"file"in e&&!!e.file&&typeof e.file=="object"&&"file_data"in e.file&&typeof e.file.file_data=="string"}function aH(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function lH(e){return"type"in e&&e.type==="file"&&"mediaType"in e&&typeof e.mediaType=="string"&&"data"in e&&typeof e.data=="string"&&!e.data.startsWith("http://")&&!e.data.startsWith("https://")}function cH(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function dH(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function uH(e){return"b64_json"in e}function fH(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function pH(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}const dl="[Blob substitute]",mH=["image_url","data","content","b64_json","result","uri","image"];function ul(e){const t={...e};cs(t.source)&&(t.source=ul(t.source)),HE(e)&&(t.inlineData={...e.inlineData,data:dl}),qE(e)&&(t.image_url={...e.image_url,url:dl}),WE(e)&&(t.input_audio={...e.input_audio,data:dl}),GE(e)&&(t.file={...e.file,file_data:dl});for(const n of mH)typeof t[n]=="string"&&(t[n]=dl);return t}const YE=2e4,vd=e=>new TextEncoder().encode(e).length,d_=e=>vd(JSON.stringify(e));function Td(e,t){if(vd(e)<=t)return e;let n=0,r=e.length,o="";for(;n<=r;){const i=Math.floor((n+r)/2),s=e.slice(0,i);vd(s)<=t?(o=s,n=i+1):r=i-1}return o}function _H(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function KE(e,t){return typeof e=="string"?t:{...e,text:t}}function hH(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function XE(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function JE(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function gH(e,t){const n={...e,content:""},r=d_(n),o=t-r;if(o<=0)return[];const i=Td(e.content,o);return[{...e,content:i}]}function yH(e){return"parts"in e&&Array.isArray(e.parts)?{key:"parts",items:e.parts}:"content"in e&&Array.isArray(e.content)?{key:"content",items:e.content}:{key:null,items:[]}}function bH(e,t){const{key:n,items:r}=yH(e);if(n===null||r.length===0)return[];const o=r.map(c=>KE(c,"")),i=d_({...e,[n]:o});let s=t-i;if(s<=0)return[];const l=[];for(const c of r){const d=_H(c),f=vd(d);if(f<=s)l.push(c),s-=f;else if(l.length===0){const u=Td(d,s);u&&l.push(KE(c,u));break}else break}return l.length<=0?[]:[{...e,[n]:l}]}function EH(e,t){if(!e)return[];if(typeof e=="string"){const n=Td(e,t);return n?[n]:[]}return typeof e!="object"?[]:hH(e)?gH(e,t):XE(e)||JE(e)?bH(e,t):[]}function u_(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(XE(n)?r={...n,content:u_(n.content)}:"content"in n&&cs(n.content)&&(r={...n,content:ul(n.content)}),JE(n)&&(r={...r??n,parts:u_(n.parts)}),cs(r)?r=ul(r):cs(n)&&(r=ul(n))),r??n})}function $H(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=t-2,r=e[e.length-1],o=u_([r]),i=o[0];return d_(i)<=n?o:EH(i,n)}function SH(e){return $H(e,YE)}function vH(e){return Td(e,YE)}function hi(e){const t=!!_e()?.getOptions().sendDefaultPii;return{...e,recordInputs:e?.recordInputs??t,recordOutputs:e?.recordOutputs??t}}function to(e){const t=_e();return e??!(t&&Zr(t))}function f_(e,t){return e?`${e}.${t}`:t}function TH(e,t,n,r,o){if(t!==void 0&&e.setAttributes({[pi]:t}),n!==void 0&&e.setAttributes({[mi]:n}),t!==void 0||n!==void 0||r!==void 0||o!==void 0){const i=(t??0)+(n??0)+(r??0)+(o??0);e.setAttributes({[Ao]:i})}}function wd(e,t,n){if(!e.isRecording())return;const r={[Jq]:!0};t.responseId&&(r[$d]=t.responseId),t.responseModel&&(r[as]=t.responseModel),t.promptTokens!==void 0&&(r[pi]=t.promptTokens),t.completionTokens!==void 0&&(r[mi]=t.completionTokens),t.totalTokens!==void 0?r[Ao]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[Ao]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)),t.finishReasons.length&&(r[ss]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[kr]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[No]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function ds(e){return typeof e=="string"?e:JSON.stringify(e)}function us(e){if(typeof e=="string")return vH(e);if(Array.isArray(e)){const t=SH(e);return JSON.stringify(t)}return JSON.stringify(e)}function fl(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};const t=e.findIndex(s=>s&&typeof s=="object"&&"role"in s&&s.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};const n=e[t],r=typeof n.content=="string"?n.content:n.content!==void 0?JSON.stringify(n.content):void 0;if(!r)return{systemInstructions:void 0,filteredMessages:e};const o=JSON.stringify([{type:"text",content:r}]),i=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:o,filteredMessages:i}}async function wH(e,t,n){const r=e.catch(s=>{throw lt(s,{mechanism:{handled:!1,type:n}}),s}),o=await t,i=await r;return i&&typeof i=="object"&&"data"in i?{...i,data:o}:o}function kd(e,t,n){return ti(e)?new Proxy(e,{get(r,o){const s=o in Promise.prototype||o===Symbol.toStringTag?t:r,l=Reflect.get(s,o);return o==="withResponse"&&typeof l=="function"?function(){const d=l.call(r);return wH(d,t,n)}:typeof l=="function"?l.bind(s):l}}):t}const kH={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},AH=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"]];function NH(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function IH(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function CH(e,t,n){if(!t||typeof t!="object")return;const r=t,o={};if(typeof r.id=="string"&&(o[$d]=r.id),typeof r.model=="string"&&(o[as]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(o[l_]=r.id),r.usage&&typeof r.usage=="object"){const i=r.usage,s=i.prompt_tokens??i.input_tokens;typeof s=="number"&&(o[pi]=s);const l=i.completion_tokens??i.output_tokens;typeof l=="number"&&(o[mi]=l),typeof i.total_tokens=="number"&&(o[Ao]=i.total_tokens)}if(Array.isArray(r.choices)){const i=r.choices,s=i.map(l=>l.finish_reason).filter(l=>typeof l=="string");if(s.length>0&&(o[ss]=JSON.stringify(s)),n){const l=i.map(d=>d.message?.content||"");o[kr]=JSON.stringify(l);const c=i.map(d=>d.message?.tool_calls).filter(d=>Array.isArray(d)&&d.length>0).flat();c.length>0&&(o[No]=JSON.stringify(c))}}if(typeof r.status=="string"&&(o[ss]||(o[ss]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!o[kr]&&(o[kr]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!o[No])){const i=r.output.filter(s=>s?.type==="function_call");i.length>0&&(o[No]=JSON.stringify(i))}e.setAttributes(o)}function xH(e){if("conversation"in e&&typeof e.conversation=="string")return e.conversation;if("previous_response_id"in e&&typeof e.previous_response_id=="string")return e.previous_response_id}function OH(e){const t={[nn]:e.model??"unknown"};"temperature"in e&&(t[yd]=e.temperature),"top_p"in e&&(t[Ed]=e.top_p),"frequency_penalty"in e&&(t[bd]=e.frequency_penalty),"presence_penalty"in e&&(t[a_]=e.presence_penalty),"stream"in e&&(t[i_]=e.stream),"encoding_format"in e&&(t[LE]=e.encoding_format),"dimensions"in e&&(t[FE]=e.dimensions);const n=xH(e);return n&&(t[l_]=n),t}function RH(e,t){for(const n of e){const r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{const o=t.chatCompletionToolCalls[r];n.function.arguments&&o?.function&&(o.function.arguments+=n.function.arguments)}}}function PH(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(const r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&RH(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function MH(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:Ge,message:"internal_error"}),lt(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const o=e;if(!AH.includes(o.type)){t.eventTypes.push(o.type);return}if(n&&(o.type==="response.output_item.done"&&"item"in o&&t.responsesApiToolCalls.push(o.item),o.type==="response.output_text.delta"&&"delta"in o&&o.delta)){t.responseTexts.push(o.delta);return}if("response"in o){const{response:i}=o;t.responseId=i.id??t.responseId,t.responseModel=i.model??t.responseModel,i.usage&&(t.promptTokens=i.usage.input_tokens,t.completionTokens=i.usage.output_tokens,t.totalTokens=i.usage.total_tokens),i.status&&t.finishReasons.push(i.status),n&&i.output_text&&t.responseTexts.push(i.output_text)}}async function*DH(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const o of e)IH(o)?PH(o,r,n):NH(o)&&MH(o,r,n,t),yield o}finally{const o=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];wd(t,{...r,toolCalls:o},n)}}function LH(e){const t=Array.isArray(e.tools)?e.tools:[],r=e.web_search_options&&typeof e.web_search_options=="object"?[{type:"web_search_options",...e.web_search_options}]:[],o=[...t,...r];if(o.length!==0)try{return JSON.stringify(o)}catch(i){ue&&P.error("Failed to serialize OpenAI tools:",i);return}}function FH(e,t){const n={[al]:"openai",[ar]:t,[We]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],o=LH(r);o&&(n[cl]=o),Object.assign(n,OH(r))}else n[nn]="unknown";return n}function ZE(e,t,n,r){if(n==="embeddings"&&"input"in t){const l=t.input;if(l==null||typeof l=="string"&&l.length===0||Array.isArray(l)&&l.length===0)return;e.setAttribute(c_,typeof l=="string"?l:JSON.stringify(l));return}const o="input"in t?t.input:"messages"in t?t.messages:void 0;if(!o||Array.isArray(o)&&o.length===0)return;const{systemInstructions:i,filteredMessages:s}=fl(o);i&&e.setAttribute(ll,i),e.setAttribute(ls,r?us(s):ds(s)),Array.isArray(s)?e.setAttribute(_i,s.length):e.setAttribute(_i,1)}function BH(e,t,n,r,o){return function(...s){const l=n.operation||"unknown",c=FH(s,l),d=c[nn]||"unknown",f=s[0],u=f&&typeof f=="object"&&f.stream===!0,p={name:`${l} ${d}`,op:`gen_ai.${l}`,attributes:c};if(u){let b;const g=Qr(p,h=>(b=e.apply(r,s),o.recordInputs&&f&&ZE(h,f,l,to(o.enableTruncation)),(async()=>{try{const y=await b;return DH(y,h,o.recordOutputs??!1)}catch(y){throw h.setStatus({code:Ge,message:"internal_error"}),lt(y,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),h.end(),y}})()));return kd(b,g,"auto.ai.openai")}let m;const _=vr(p,b=>(m=e.apply(r,s),o.recordInputs&&f&&ZE(b,f,l,to(o.enableTruncation)),m.then(g=>(CH(b,g,o.recordOutputs),g),g=>{throw lt(g,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),g})));return kd(m,_,"auto.ai.openai")}}function QE(e,t="",n){return new Proxy(e,{get(r,o){const i=r[o],s=f_(t,String(o)),l=kH[s];return typeof i=="function"&&l?BH(i,s,l,r,n):typeof i=="function"?i.bind(r):i&&typeof i=="object"?QE(i,s,n):i}})}function UH(e,t){return QE(e,"",hi(t))}const VH={"messages.create":{operation:"chat"},"messages.stream":{operation:"chat",streaming:!0},"messages.countTokens":{operation:"chat"},"models.get":{operation:"models"},"completions.create":{operation:"chat"},"models.retrieve":{operation:"models"},"beta.messages.create":{operation:"chat"}};function jH(e,t,n){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:r,filteredMessages:o}=fl(t);r&&e.setAttributes({[ll]:r});const i=Array.isArray(o)?o.length:1;e.setAttributes({[ls]:n?us(o):ds(o),[_i]:i})}const zH={invalid_request_error:"invalid_argument",authentication_error:"unauthenticated",permission_error:"permission_denied",not_found_error:"not_found",request_too_large:"failed_precondition",rate_limit_error:"resource_exhausted",api_error:"internal_error",overloaded_error:"unavailable"};function e$(e){return e&&zH[e]||"internal_error"}function qH(e,t){t.error&&(e.setStatus({code:Ge,message:e$(t.error.type)}),lt(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function HH(e){const{system:t,messages:n,input:r}=e,o=typeof t=="string"?[{role:"system",content:e.system}]:[],i=Array.isArray(r)?r:r!=null?[r]:void 0,s=Array.isArray(n)?n:n!=null?[n]:[],l=i??s;return[...o,...l]}function WH(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:Ge,message:e$(e.error?.type)}),lt(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function GH(e,t){if(e.type==="message_delta"&&e.usage&&"output_tokens"in e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.message){const n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&(typeof n.usage.input_tokens=="number"&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens=="number"&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens=="number"&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function YH(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function KH(e,t,n){if(!(e.type!=="content_block_delta"||!e.delta)){if(typeof e.index=="number"&&"partial_json"in e.delta&&typeof e.delta.partial_json=="string"){const r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function XH(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let o;try{o=r?JSON.parse(r):{}}catch{o={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:o}),delete t.activeToolBlocks[e.index]}function t$(e,t,n,r){!(e&&typeof e=="object")||WH(e,r)||(GH(e,t),YH(e,t),KH(e,t,n),XH(e,t))}async function*JH(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const o of e)t$(o,r,n,t),yield o}finally{wd(t,r,n)}}function ZH(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",o=>{t$(o,r,n,t)}),e.on("message",()=>{wd(t,r,n)}),e.on("error",o=>{lt(o,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:Ge,message:"internal_error"}),t.end())}),e}function QH(e,t,n){const r={[al]:"anthropic",[ar]:n,[We]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const o=e[0];o.tools&&Array.isArray(o.tools)&&(r[cl]=JSON.stringify(o.tools)),r[nn]=o.model??"unknown","temperature"in o&&(r[yd]=o.temperature),"top_p"in o&&(r[Ed]=o.top_p),"stream"in o&&(r[i_]=o.stream),"top_k"in o&&(r[DE]=o.top_k),"frequency_penalty"in o&&(r[bd]=o.frequency_penalty),"max_tokens"in o&&(r[s_]=o.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[nn]=e[0]:r[nn]="unknown";return r}function p_(e,t,n){const r=HH(t);jH(e,r,n),"prompt"in t&&e.setAttributes({[Kq]:JSON.stringify(t.prompt)})}function eW(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[kr]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[No]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[kr]:t.completion}),"input_tokens"in t&&e.setAttributes({[kr]:JSON.stringify(t.input_tokens)})}function tW(e,t){"id"in t&&"model"in t&&(e.setAttributes({[$d]:t.id,[as]:t.model}),"usage"in t&&t.usage&&TH(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function nW(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){qH(e,t);return}n&&eW(e,t),tW(e,t)}}function n$(e,t,n){throw lt(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:Ge,message:"internal_error"}),t.end()),e}function rW(e,t,n,r,o,i,s,l,c,d,f){const u=o[nn]??"unknown",p={name:`${i} ${u}`,op:`gen_ai.${i}`,attributes:o};if(d&&!f){let m;const _=Qr(p,b=>(m=e.apply(n,r),c.recordInputs&&l&&p_(b,l,to(c.enableTruncation)),(async()=>{try{const g=await m;return JH(g,b,c.recordOutputs??!1)}catch(g){return n$(g,b,s)}})()));return kd(m,_,"auto.ai.anthropic")}else return Qr(p,m=>{try{c.recordInputs&&l&&p_(m,l,to(c.enableTruncation));const _=t.apply(n,r);return ZH(_,m,c.recordOutputs??!1)}catch(_){return n$(_,m,s)}})}function oW(e,t,n,r,o){return new Proxy(e,{apply(i,s,l){const c=n.operation||"unknown",d=QH(l,t,c),f=d[nn]??"unknown",u=typeof l[0]=="object"?l[0]:void 0,p=!!u?.stream,m=n.streaming===!0;if(p||m)return rW(e,i,r,l,d,c,t,u,o,p,m);let _;const b=vr({name:`${c} ${f}`,op:`gen_ai.${c}`,attributes:d},g=>(_=i.apply(r,l),o.recordInputs&&u&&p_(g,u,to(o.enableTruncation)),_.then(h=>(nW(g,h,o.recordOutputs),h),h=>{throw lt(h,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}}),h})));return kd(_,b,"auto.ai.anthropic")}})}function r$(e,t="",n){return new Proxy(e,{get(r,o){const i=r[o],s=f_(t,String(o)),l=VH[s];return typeof i=="function"&&l?oW(i,s,l,r,n):typeof i=="function"?i.bind(r):i&&typeof i=="object"?r$(i,s,n):i}})}function iW(e,t){return r$(e,"",hi(t))}const sW={"models.generateContent":{operation:"generate_content"},"models.generateContentStream":{operation:"generate_content",streaming:!0},"models.embedContent":{operation:"embeddings"},"chats.create":{proxyResultPath:"chat"},"chat.sendMessage":{operation:"chat"},"chat.sendMessageStream":{operation:"chat",streaming:!0}},aW="google_genai";function lW(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:Ge,message:"internal_error"}),lt(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function cW(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="string"&&(t.responseModel=e.modelVersion);const n=e.usageMetadata;n&&(typeof n.promptTokenCount=="number"&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount=="number"&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount))}function dW(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(const o of r?.content?.parts??[])n&&o.text&&t.responseTexts.push(o.text),o.functionCall&&t.toolCalls.push({type:"function",id:o.functionCall.id,name:o.functionCall.name,arguments:o.functionCall.args})}}function uW(e,t,n,r){!e||lW(e,r)||(cW(e,t),dW(e,t,n))}async function*fW(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const o of e)uW(o,r,n,t),yield o}finally{wd(t,r,n)}}function pl(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>pl(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}function o$(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function pW(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[yd]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[Ed]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[DE]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[s_]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[bd]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[a_]=e.presencePenalty),t}function mW(e,t,n){const r={[al]:aW,[ar]:e,[We]:"auto.ai.google_genai"};if(t){if(r[nn]=o$(t,n),"config"in t&&typeof t.config=="object"&&t.config){const o=t.config;if(Object.assign(r,pW(o)),"tools"in o&&Array.isArray(o.tools)){const i=o.tools.flatMap(s=>s.functionDeclarations);r[cl]=JSON.stringify(i)}}}else r[nn]=o$({},n);return r}function i$(e,t,n,r){if(n){const i=t.contents;i!=null&&e.setAttribute(c_,typeof i=="string"?i:JSON.stringify(i));return}const o=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&o.push(...pl(t.config.systemInstruction,"system")),"history"in t&&o.push(...pl(t.history,"user")),"contents"in t&&o.push(...pl(t.contents,"user")),"message"in t&&o.push(...pl(t.message,"user")),Array.isArray(o)&&o.length){const{systemInstructions:i,filteredMessages:s}=fl(o);i&&e.setAttribute(ll,i);const l=Array.isArray(s)?s.length:0;e.setAttributes({[_i]:l,[ls]:r?us(s):ds(s)})}}function _W(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(as,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[pi]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[mi]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[Ao]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(o=>o.content?.parts&&Array.isArray(o.content.parts)?o.content.parts.map(i=>typeof i.text=="string"?i.text:"").filter(i=>i.length>0).join(""):"").filter(o=>o.length>0);r.length>0&&e.setAttributes({[kr]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[No]:JSON.stringify(r)})}}}function hW(e,t,n,r,o){const i=n.operation==="embeddings";return new Proxy(e,{apply(s,l,c){const d=n.operation||"unknown",f=c[0],u=mW(d,f,r),p=u[nn]??"unknown";return n.streaming?Qr({name:`${d} ${p}`,op:`gen_ai.${d}`,attributes:u},async m=>{try{o.recordInputs&&f&&i$(m,f,i,to(o.enableTruncation));const _=await s.apply(r,c);return fW(_,m,!!o.recordOutputs)}catch(_){throw m.setStatus({code:Ge,message:"internal_error"}),lt(_,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),m.end(),_}}):vr({name:`${d} ${p}`,op:`gen_ai.${d}`,attributes:u},m=>(o.recordInputs&&f&&i$(m,f,i,to(o.enableTruncation)),Im(()=>s.apply(r,c),_=>{lt(_,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},_=>{i||_W(m,_,o.recordOutputs)})))}})}function m_(e,t="",n){return new Proxy(e,{get:(r,o,i)=>{const s=Reflect.get(r,o,i),l=f_(t,String(o)),c=sW[l];if(typeof s=="function"&&c){const d=c.operation?hW(s,l,c,r,n):s.bind(r);return c.proxyResultPath?function(...f){const u=d(...f);return u&&typeof u=="object"?m_(u,c.proxyResultPath,n):u}:d}return typeof s=="function"?s.bind(r):s&&typeof s=="object"?m_(s,l,n):s}})}function gW(e,t){return m_(e,"",hi(t))}const fs="auto.ai.langchain",yW={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},Kn=(e,t,n)=>{n!=null&&(e[t]=n)},Ln=(e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)};function gi(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function ps(e){if(Array.isArray(e))try{const t=e.map(n=>n&&typeof n=="object"&&cs(n)?ul(n):n);return JSON.stringify(t)}catch{return String(e)}return gi(e)}function ml(e){const t=e.toLowerCase();return yW[t]??t}function s$(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function a$(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function __(e){return e.map(t=>{const n=t._getType;if(typeof n=="function"){const o=n.call(t);return{role:ml(o),content:ps(t.content)}}if(t.lc===1&&t.kwargs){const o=t.id,i=Array.isArray(o)&&o.length>0?o[o.length-1]:"",s=typeof i=="string"?s$(i):"user";return{role:ml(s),content:ps(t.kwargs?.content)}}if(t.type){const o=String(t.type).toLowerCase();return{role:ml(o),content:ps(t.content)}}if(t.role)return{role:ml(String(t.role)),content:ps(t.content)};const r=t.constructor?.name;return r&&r!=="Object"?{role:ml(s$(r)),content:ps(t.content)}:{role:"user",content:ps(t.content)}})}function bW(e,t,n){const r={},o="kwargs"in e?e.kwargs:void 0,i=t?.temperature??n?.ls_temperature??o?.temperature;Ln(r,yd,i);const s=t?.max_tokens??n?.ls_max_tokens??o?.max_tokens;Ln(r,s_,s);const l=t?.top_p??o?.top_p;Ln(r,Ed,l);const c=t?.frequency_penalty;Ln(r,bd,c);const d=t?.presence_penalty;return Ln(r,a_,d),t&&"stream"in t&&Kn(r,i_,!!t.stream),r}function l$(e,t,n,r,o){return{[al]:gi(e??"langchain"),[ar]:"chat",[nn]:gi(t),[We]:fs,...bW(n,r,o)}}function EW(e,t,n,r,o,i){const s=i?.ls_provider,l=o?.model??i?.ls_model_name??"unknown",c=l$(s,l,e,o,i);if(n&&Array.isArray(t)&&t.length>0){Kn(c,_i,t.length);const d=t.map(f=>({role:"user",content:f}));Kn(c,ls,r?us(d):ds(d))}return c}function $W(e,t,n,r,o,i){const s=i?.ls_provider??e.id?.[2],l=o?.model??i?.ls_model_name??"unknown",c=l$(s,l,e,o,i);if(n&&Array.isArray(t)&&t.length>0){const d=__(t.flat()),{systemInstructions:f,filteredMessages:u}=fl(d);f&&Kn(c,ll,f);const p=Array.isArray(u)?u.length:0;Kn(c,_i,p),Kn(c,ls,r?us(u):ds(u))}return c}function SW(e,t){const n=[],r=e.flat();for(const o of r){const s=o.message?.tool_calls;if(Array.isArray(s)&&s.length>0)n.push(...s);else{const l=o.message?.content;if(Array.isArray(l))for(const c of l){const d=c;d.type==="tool_use"&&n.push(d)}}}n.length>0&&Kn(t,No,gi(n))}function vW(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)Ln(t,pi,n.promptTokens),Ln(t,mi,n.completionTokens),Ln(t,Ao,n.totalTokens);else if(r){Ln(t,pi,r.input_tokens),Ln(t,mi,r.output_tokens);const o=Number(r.input_tokens),i=Number(r.output_tokens),s=(Number.isNaN(o)?0:o)+(Number.isNaN(i)?0:i);s>0&&Ln(t,Ao,s),r.cache_creation_input_tokens!==void 0&&Ln(t,Qq,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&Ln(t,eH,r.cache_read_input_tokens)}}function TW(e,t){if(!e)return;const n={};if(Array.isArray(e.generations)){const d=e.generations.flat().map(f=>f.generationInfo?.finish_reason?f.generationInfo.finish_reason:f.generation_info?.finish_reason?f.generation_info.finish_reason:null).filter(f=>typeof f=="string");if(d.length>0&&Kn(n,ss,gi(d)),SW(e.generations,n),t){const f=e.generations.flat().map(u=>u.text??u.message?.content).filter(u=>typeof u=="string");f.length>0&&Kn(n,kr,gi(f))}}vW(e.llmOutput,n);const r=e.llmOutput,i=e.generations?.[0]?.[0]?.message,s=r?.model_name??r?.model??i?.response_metadata?.model_name;s&&Kn(n,as,s);const l=r?.id??i?.id;l&&Kn(n,$d,l);const c=r?.stop_reason??i?.response_metadata?.finish_reason;return c&&Kn(n,Xq,gi(c)),n}function h_(e){const t={},n=e?.lc_agent_name;return typeof n=="string"&&(t[Sd]=n),t}function wW(e){const t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;const n=t.map(r=>{const o=r.function;return{type:"function",name:r.name??o?.name??"",description:r.description??o?.description}});return JSON.stringify(n)}function g_(e={}){const{recordInputs:t,recordOutputs:n}=hi(e),r=to(e.enableTruncation),o=new Map,i=l=>{const c=o.get(l);c?.isRecording()&&(c.end(),o.delete(l))},s={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(l,c,d,f,u,p,m,_){const b=a$(p),g=EW(l,c,t,r,b,m),h=g[nn],y=g[ar];Qr({name:`${y} ${h}`,op:"gen_ai.chat",attributes:{...h_(m),...g,[tt]:"gen_ai.chat"}},E=>(o.set(d,E),E))},handleChatModelStart(l,c,d,f,u,p,m,_){const b=a$(p),g=$W(l,c,t,r,b,m),h=wW(u);h&&(g[cl]=h);const y=g[nn],E=g[ar];Qr({name:`${E} ${y}`,op:"gen_ai.chat",attributes:{...h_(m),...g,[tt]:"gen_ai.chat"}},$=>(o.set(d,$),$))},handleLLMEnd(l,c,d,f,u){const p=o.get(c);if(p?.isRecording()){const m=TW(l,n);m&&p.setAttributes(m),i(c)}},handleLLMError(l,c){const d=o.get(c);d?.isRecording()&&(d.setStatus({code:Ge,message:"internal_error"}),i(c)),lt(l,{mechanism:{handled:!1,type:`${fs}.llm_error_handler`}})},handleChainStart(l,c,d,f,u,p,m,_){if(p?.__sentry_langgraph__)return;const b=_||l.name||"unknown_chain",g={[We]:"auto.ai.langchain","langchain.chain.name":b};t&&(g["langchain.chain.inputs"]=JSON.stringify(c)),Qr({name:`chain ${b}`,op:"gen_ai.invoke_agent",attributes:{...g,[tt]:"gen_ai.invoke_agent"}},h=>(o.set(d,h),h))},handleChainEnd(l,c){const d=o.get(c);d?.isRecording()&&(n&&d.setAttributes({"langchain.chain.outputs":JSON.stringify(l)}),i(c))},handleChainError(l,c){const d=o.get(c);d?.isRecording()&&(d.setStatus({code:Ge,message:"internal_error"}),i(c)),lt(l,{mechanism:{handled:!1,type:`${fs}.chain_error_handler`}})},handleToolStart(l,c,d,f,u,p,m){if(p?.__sentry_langgraph__)return;const _=m||l.name||"unknown_tool",b={...h_(p),[We]:fs,[ar]:"execute_tool",[VE]:_};t&&(b[jE]=c),Qr({name:`execute_tool ${_}`,op:"gen_ai.execute_tool",attributes:{...b,[tt]:"gen_ai.execute_tool"}},g=>(o.set(d,g),g))},handleToolEnd(l,c){const d=o.get(c);if(d?.isRecording()){if(n){const f=l,u=f&&typeof f=="object"&&"content"in f?f.content:l;d.setAttributes({[zE]:typeof u=="string"?u:JSON.stringify(u)})}i(c)}},handleToolError(l,c){const d=o.get(c);d?.isRecording()&&(d.setStatus({code:Ge,message:"internal_error"}),i(c)),lt(l,{mechanism:{handled:!1,type:`${fs}.tool_error_handler`}})},copy(){return s},toJSON(){return{lc:1,type:"not_implemented",id:s.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:s.lc_id}}};return s}const y_="auto.ai.langgraph";function kW(e){const t=e[0];if(typeof t!="object"||!t||!("llm"in t)||!t.llm||typeof t.llm!="object")return null;const n=t.llm;return typeof n.modelName!="string"&&typeof n.model!="string"?null:n}function AW(e){const t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function NW(e,t,n){const r="__sentry_tool_wrapped__";for(const o of e){if(!o||typeof o!="object")continue;const i=o,s=i.invoke;if(typeof s!="function"||Object.prototype.hasOwnProperty.call(i,r))continue;const l=typeof i.name=="string"?i.name:"unknown_tool",c=typeof i.description=="string"?i.description:void 0,d=new Proxy(s,{apply(f,u,p){const m={[We]:y_,[tt]:UE,[ar]:"execute_tool",[VE]:l,[rH]:"function"},b=p[1]?.metadata?.lc_agent_name??n;typeof b=="string"&&(m[Sd]=b),c&&(m[oH]=c);const g=p[0];if(typeof g=="object"&&g&&("id"in g&&typeof g.id=="string"&&(m[nH]=g.id),t.recordInputs)){const h="args"in g&&typeof g.args=="object"?g.args:g;try{m[jE]=JSON.stringify(h)}catch{}}return vr({op:UE,name:`execute_tool ${l}`,attributes:m},async h=>{try{const y=await Reflect.apply(f,u,p);if(t.recordOutputs)try{const E=y,$=E&&typeof E=="object"&&"content"in E?E.content:y;h.setAttribute(zE,typeof $=="string"?$:JSON.stringify($))}catch{}return y}catch(y){throw h.setStatus({code:Ge,message:"internal_error"}),lt(y,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),y}})}});i.invoke=d,Object.defineProperty(i,r,{value:!0,enumerable:!1})}return e}function IW(e){if(!e||e.length===0)return null;const t=[];for(const n of e)if(n&&typeof n=="object"){const r=n.tool_calls;r&&Array.isArray(r)&&t.push(...r)}return t.length>0?t:null}function CW(e){const t=e;let n=0,r=0,o=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){const i=t.usage_metadata;return typeof i.input_tokens=="number"&&(n=i.input_tokens),typeof i.output_tokens=="number"&&(r=i.output_tokens),typeof i.total_tokens=="number"&&(o=i.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:o}}if(t.response_metadata&&typeof t.response_metadata=="object"){const i=t.response_metadata;if(i.tokenUsage&&typeof i.tokenUsage=="object"){const s=i.tokenUsage;typeof s.promptTokens=="number"&&(n=s.promptTokens),typeof s.completionTokens=="number"&&(r=s.completionTokens),typeof s.totalTokens=="number"&&(o=s.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:o}}function xW(e,t){const n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){const r=n.response_metadata;r.model_name&&typeof r.model_name=="string"&&e.setAttribute(as,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(ss,[r.finish_reason])}}function OW(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;const t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(n=>({name:n.lc_kwargs?.name,description:n.lc_kwargs?.description,schema:n.lc_kwargs?.schema}))}function RW(e,t,n){const o=n?.messages;if(!o||!Array.isArray(o))return;const i=t?.length??0,s=o.length>i?o.slice(i):[];if(s.length===0)return;const l=IW(s);l&&e.setAttribute(No,JSON.stringify(l));const c=__(s);e.setAttribute(kr,JSON.stringify(c));let d=0,f=0,u=0;for(const p of s){const m=CW(p);d+=m.inputTokens,f+=m.outputTokens,u+=m.totalTokens,xW(e,p)}d>0&&e.setAttribute(pi,d),f>0&&e.setAttribute(mi,f),u>0&&e.setAttribute(Ao,u)}function PW(e,t){if(!e)return[t];if(Array.isArray(e))return e.includes(t)?e:[...e,t];const n=e;return typeof n.addHandler=="function"&&(Array.isArray(n.handlers)&&n.handlers.includes(t)||n.addHandler(t)),e}let b_=!1;const Ad="__sentry_patched__";function MW(e,t){if(Object.prototype.hasOwnProperty.call(e,Ad))return e;const n=g_(t),r=new Proxy(e,{apply(o,i,s){return b_?Reflect.apply(o,i,s):vr({op:"gen_ai.create_agent",name:"create_agent",attributes:{[We]:y_,[tt]:"gen_ai.create_agent",[ar]:"create_agent"}},l=>{try{const c=Reflect.apply(o,i,s),d=s.length>0?s[0]:{};d?.name&&typeof d.name=="string"&&(l.setAttribute(Sd,d.name),l.updateName(`create_agent ${d.name}`));const f=c.invoke;return f&&typeof f=="function"&&(c.invoke=c$(f.bind(c),c,d,t,void 0,n)),c}catch(c){throw l.setStatus({code:Ge,message:"internal_error"}),lt(c,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),c}})}});return Object.defineProperty(r,Ad,{value:!0,enumerable:!1}),r}function c$(e,t,n,r,o,i){return new Proxy(e,{apply(s,l,c){const d=o?.modelName??o?.model;return vr({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[We]:y_,[tt]:tH,[ar]:"invoke_agent"}},async f=>{try{const u=n?.name;u&&typeof u=="string"&&(f.setAttribute(Zq,u),f.setAttribute(Sd,u),f.updateName(`invoke_agent ${u}`)),d&&f.setAttribute(nn,d);const _=(c.length>1?c[1]:void 0)?.configurable?.thread_id;if(_&&typeof _=="string"&&f.setAttribute(l_,_),i){const $=c[1]??{};c[1]=$;const O=$.metadata??{};$.metadata={...O,__sentry_langgraph__:!0,...typeof u=="string"?{lc_agent_name:u}:{}},$.callbacks=PW($.callbacks,i)}const b=OW(t);b&&f.setAttribute(cl,JSON.stringify(b));const g=r.recordInputs,h=r.recordOutputs,y=c.length>0?c[0]?.messages??[]:[];if(y&&g){const $=__(y),{systemInstructions:O,filteredMessages:N}=fl($);O&&f.setAttribute(ll,O);const v=to(r.enableTruncation),B=Array.isArray(N)?N.length:0;f.setAttributes({[ls]:v?us(N):ds(N),[_i]:B})}const E=await Reflect.apply(s,l,c);return h&&RW(f,y??null,E),E}catch(u){throw f.setStatus({code:Ge,message:"internal_error"}),lt(u,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),u}})}})}function DW(e,t){if(Object.prototype.hasOwnProperty.call(e,Ad))return e;const n=hi(t),r=g_(n),o=new Proxy(e,{apply(i,s,l){const c=kW(l),d=AW(l),f=l[0];f&&Array.isArray(f.tools)&&f.tools.length>0&&NW(f.tools,n,d??void 0),b_=!0;let u;try{u=Reflect.apply(i,s,l)}finally{b_=!1}const p=u.invoke;if(p&&typeof p=="function"){const m={};d&&(m.name=d),u.invoke=c$(p.bind(u),u,m,n,c,r)}return u}});return Object.defineProperty(o,Ad,{value:!0,enumerable:!1}),o}function LW(e,t){return e.compile=MW(e.compile,hi(t)),e}function FW(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function BW(){return"npm"}function UW(){return!FW()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function _l(){return typeof window<"u"&&(!UW()||VW())}function VW(){return Te.process?.type==="renderer"}function jW(e,t,n){const r=n.getOptions(),o=n.getDsn(),i=r.tunnel,s=tl(r._metadata),l={sent_at:new Date().toISOString(),...zW(t)&&{trace:t},...s&&{sdk:s},...!!i&&o&&{dsn:Sr(o)}},c=r.sendDefaultPii?"auto":"never",d=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,..._l()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return Gn(l,[d])}function zW(e){return!!e.trace_id&&!!e.public_key}function qW(e){let t=156;if(t+=e.name.length*2,t+=p4(e.attributes),e.links&&e.links.length>0){const r=e.links[0]?.attributes,o=100+(r?p4(r):0);t+=o*e.links.length}return t}const d$=1e3,HW=5e6;class WW{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:i}=n??{};this._maxSpanLimit=r&&r>0&&r<=d$?r:d$,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=i&&i>0?i:HW,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(s=>{clearTimeout(s.timeout)}),this._traceBuckets.clear()})}add(t){const n=t.trace_id;let r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:ld(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=qW(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(ue&&P.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}const r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o){ue&&P.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}const i=Wn(o),s=r.map(c=>{const{_segmentSpan:d,...f}=c;return f}),l=jW(s,i,this._client);ue&&P.log(`Sending span envelope for trace ${t} with ${s.length} spans`),this._client.sendEnvelope(l).then(null,c=>{ue&&P.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){const n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}function u$(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const ms=Te;function GW(){return"history"in ms&&!!ms.history}function YW(){if(!("fetch"in ms))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function E_(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function f$(){if(typeof EdgeRuntime=="string")return!0;if(!YW())return!1;if(E_(ms.fetch))return!0;let e=!1;const t=ms.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=E_(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ue&&P.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function KW(){return"ReportingObserver"in ms}function $_(e,t){const n="fetch",r=$o(n,e);return So(n,()=>p$(void 0,t)),r}function XW(e){const t="fetch-body-resolved",n=$o(t,e);return So(t,()=>p$(ZW)),n}function p$(e,t=!1){t&&!f$()||Qt(Te,"fetch",function(n){return function(...r){const o=new Error,{method:i,url:s}=QW(r),l={args:r,fetchData:{method:i,url:s},startTimestamp:ut()*1e3,virtualError:o,headers:eG(r)};return e||qn("fetch",{...l}),n.apply(Te,r).then(async c=>(e?e(c):qn("fetch",{...l,endTimestamp:ut()*1e3,response:c}),c),c=>{qn("fetch",{...l,endTimestamp:ut()*1e3,error:c}),qr(c)&&c.stack===void 0&&(c.stack=o.stack,en(c,"framesToPop",1));const f=_e()?.getOptions().enhanceFetchErrorMessages??"always";if(f!==!1&&c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const m=new URL(l.fetchData.url).host;f==="always"?c.message=`${c.message} (${m})`:en(c,"__sentry_fetch_url_host__",m)}catch{}throw c})}})}async function JW(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:l}=await r.read();clearTimeout(s),l&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(s)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function ZW(e){let t;try{t=e.clone()}catch{return}JW(t,()=>{qn("fetch-body-resolved",{endTimestamp:ut()*1e3,response:e})})}function Nd(e,t){return!!e&&typeof e=="object"&&!!e[t]}function m$(e){return typeof e=="string"?e:e?Nd(e,"url")?e.url:e.toString?e.toString():"":""}function QW(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:m$(n),method:Nd(r,"method")?String(r.method).toUpperCase():mm(n)&&Nd(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:m$(t),method:Nd(t,"method")?String(t.method).toUpperCase():"GET"}}function eG(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(mm(t))return new Headers(t.headers)}catch{}}function tG(e){const t=e.constructor?.name??"";return t.includes("OpenAI")?"openai":t.includes("Google")?"google_genai":t.includes("Mistral")?"mistralai":t.includes("Vertex")?"google_vertexai":t.includes("Bedrock")?"aws_bedrock":t.includes("Ollama")?"ollama":t.includes("Cloudflare")?"cloudflare":t.includes("Cohere")?"cohere":"langchain"}function nG(e){const t=e??{},n={[We]:fs,[tt]:BE,[ar]:"embeddings",[nn]:t.model??"unknown"};return n[al]=tG(t),"dimensions"in t&&(n[FE]=t.dimensions),"encodingFormat"in t&&(n[LE]=t.encodingFormat),n}function _$(e,t={}){const{recordInputs:n}=hi(t);return new Proxy(e,{apply(r,o,i){const s=nG(o),l=s[nn]||"unknown";if(n){const c=i[0];c!=null&&(s[c_]=typeof c=="string"?c:JSON.stringify(c))}return vr({name:`embeddings ${l}`,op:BE,attributes:s},()=>Reflect.apply(r,o,i).then(void 0,c=>{throw lt(c,{mechanism:{handled:!1,type:"auto.ai.langchain"}}),c}))}})}function rG(e,t){const n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=_$(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=_$(n.embedDocuments,t)),e}const lr=Te,ft=lr.document,hl=lr.navigator,h$="Report a Bug",oG="Cancel",iG="Send Bug Report",sG="Confirm",aG="Report a Bug",lG="your.email@example.org",cG="Email",dG="What's the bug? What did you expect?",uG="Description",fG="Your Name",pG="Name",mG="Thank you for your report!",_G="(required)",hG="Add a screenshot",gG="Remove screenshot",yG="Highlight",bG="Hide",EG="Remove",g$="Unable to submit feedback with empty message",y$="No client setup, cannot send feedback.",b$="Unable to determine if Feedback was correctly sent.",E$="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",$$="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",$G="widget",SG="api",vG=5e3,TG={ERROR_EMPTY_MESSAGE:g$,ERROR_NO_CLIENT:y$,ERROR_TIMEOUT:b$,ERROR_FORBIDDEN:E$,ERROR_GENERIC:$$};function Id(e,t){return t?.[e]??TG[e]}function S$(e,t){return new Error(Id(e,t))}const v$=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw S$("ERROR_EMPTY_MESSAGE",n);const r=_e();if(!r)throw S$("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&Re().setTags(e.tags);const o=OE({source:SG,url:ni(),...e},t);return new Promise((i,s)=>{const l=setTimeout(()=>{c(),s(Id("ERROR_TIMEOUT",n))},3e4),c=r.on("afterSendEvent",(d,f)=>{if(d.event_id===o)return clearTimeout(l),c(),f?.statusCode&&f.statusCode>=200&&f.statusCode<300?i(o):f?.statusCode===403?s(Id("ERROR_FORBIDDEN",n)):s(Id("ERROR_GENERIC",n))})})},Cd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function wG(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(hl.userAgent)||/Macintosh/i.test(hl.userAgent)&&hl.maxTouchPoints&&hl.maxTouchPoints>1||!isSecureContext)}function xd(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function kG(e){const t=ft.createElement("style");return t.textContent=`
|
|
47
47
|
.widget__actor {
|
|
48
48
|
position: fixed;
|
|
49
49
|
z-index: var(--z-index);
|
|
@@ -131,7 +131,7 @@ ${e==="system"?`
|
|
|
131
131
|
${k$({...w$,...t})}
|
|
132
132
|
}
|
|
133
133
|
}`:""}
|
|
134
|
-
`,r&&o.setAttribute("nonce",r),o}const N$=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:o="sentry-feedback",autoInject:i=!0,showBranding:s=!0,isEmailRequired:l=!1,isNameRequired:c=!1,showEmail:d=!0,showName:f=!0,enableScreenshot:u=!0,useSentryUser:p={email:"email",name:"username"},tags:m,styleNonce:_,scriptNonce:b,colorScheme:g="system",themeLight:h={},themeDark:y={},addScreenshotButtonLabel:E=hG,cancelButtonLabel:$=oG,confirmButtonLabel:O=sG,emailLabel:N=cG,emailPlaceholder:v=lG,formTitle:B=aG,isRequiredLabel:H=_G,messageLabel:U=uG,messagePlaceholder:C=dG,nameLabel:A=pG,namePlaceholder:R=fG,removeScreenshotButtonLabel:I=gG,submitButtonLabel:V=iG,successMessageText:j=mG,triggerLabel:F=h$,triggerAriaLabel:M="",highlightToolText:Y=yG,hideToolText:W=bG,removeHighlightText:K=EG,errorEmptyMessageText:te=g$,errorNoClientText:X=y$,errorTimeoutText:oe=b$,errorForbiddenText:fe=E$,errorGenericText:J=$$,onFormOpen:ae,onFormClose:ye,onSubmitSuccess:$e,onSubmitError:Ie,onFormSubmitted:je}={})=>{const we={id:o,autoInject:i,showBranding:s,isEmailRequired:l,isNameRequired:c,showEmail:d,showName:f,enableScreenshot:u,useSentryUser:p,tags:m,styleNonce:_,scriptNonce:b,colorScheme:g,themeDark:y,themeLight:h,triggerLabel:F,triggerAriaLabel:M,cancelButtonLabel:$,submitButtonLabel:V,confirmButtonLabel:O,formTitle:B,emailLabel:N,emailPlaceholder:v,messageLabel:U,messagePlaceholder:C,nameLabel:A,namePlaceholder:R,successMessageText:j,isRequiredLabel:H,addScreenshotButtonLabel:E,removeScreenshotButtonLabel:I,highlightToolText:Y,hideToolText:W,removeHighlightText:K,errorEmptyMessageText:te,errorNoClientText:X,errorTimeoutText:oe,errorForbiddenText:fe,errorGenericText:J,onFormClose:ye,onFormOpen:ae,onSubmitError:Ie,onSubmitSuccess:$e,onFormSubmitted:je};let Le=null,Fe=null,Ye=[];const ke=k=>{if(!Le){const q=ft.createElement("div");q.id=String(k.id),ft.body.appendChild(q),Le=q.attachShadow({mode:"open"}),Fe=A$(k),Le.appendChild(Fe)}return Le},Ze=async k=>{const q=k.enableScreenshot&&wG();let ee,le;try{ee=(t?t():await e("feedbackModalIntegration",b))(),Um(ee)}catch{throw Cd&&P.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const Ue=q?n?n():await e("feedbackScreenshotIntegration",b):void 0;Ue&&(le=Ue(),Um(le))}catch{Cd&&P.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const ce={ERROR_EMPTY_MESSAGE:k.errorEmptyMessageText,ERROR_NO_CLIENT:k.errorNoClientText,ERROR_TIMEOUT:k.errorTimeoutText,ERROR_FORBIDDEN:k.errorForbiddenText,ERROR_GENERIC:k.errorGenericText},ot=(Ue,G)=>v$(Ue,{includeReplay:!0,...G,errorMessages:ce}),Qe=ee.createDialog({options:{...k,onFormClose:()=>{Qe?.close(),k.onFormClose?.()},onFormSubmitted:()=>{Qe?.close(),k.onFormSubmitted?.()}},screenshotIntegration:le,sendFeedback:ot,shadow:ke(k)});return Qe},w=(k,q={})=>{const ee=xd(we,q),le=typeof k=="string"?ft.querySelector(k):typeof k.addEventListener=="function"?k:null;if(!le)throw Cd&&P.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let ce=null;const ot=async()=>{ce||(ce=await Ze({...ee,onFormSubmitted:()=>{ce?.removeFromDom(),ee.onFormSubmitted?.()}})),ce.appendToDom(),ce.open()};le.addEventListener("click",ot);const Qe=()=>{Ye=Ye.filter(Ue=>Ue!==Qe),ce?.removeFromDom(),ce=null,le.removeEventListener("click",ot)};return Ye.push(Qe),Qe},T=(k={})=>{const q=xd(we,k),ee=ke(q),le=IG({triggerLabel:q.triggerLabel,triggerAriaLabel:q.triggerAriaLabel,shadow:ee,styleNonce:_});return w(le.el,{...q,onFormOpen(){le.hide()},onFormClose(){le.show()},onFormSubmitted(){le.show()}}),le};return{name:"Feedback",setupOnce(){!_l()||!we.autoInject||(ft.readyState==="loading"?ft.addEventListener("DOMContentLoaded",()=>T().appendToDom()):T().appendToDom())},attachTo:w,createWidget(k={}){const q=T(xd(we,k));return q.appendToDom(),q},async createForm(k={}){return Ze(xd(we,k))},setTheme(k){if(we.colorScheme=k,Le){const q=A$(we);Fe?Le.replaceChild(q,Fe):Le.prepend(q),Fe=q}},remove(){Le&&(Le.parentElement?.remove(),Le=null,Fe=null),Ye.forEach(k=>k()),Ye=[]}}});function xG(){return _e()?.getIntegrationByName("Feedback")}var Od,pt,I$,yi,C$,x$,S0,gl={},v0=[],OG=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,T0=Array.isArray;function Io(e,t){for(var n in t)e[n]=t[n];return e}function O$(e){var t=e.parentNode;t&&t.removeChild(e)}function Ve(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Od.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Rd(e,s,r,o,null)}function Rd(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++I$,__i:-1,__u:0};return o==null&&pt.vnode!=null&&pt.vnode(i),i}function yl(e){return e.children}function Pd(e,t){this.props=e,this.context=t}function hs(e,t){if(t==null)return e.__?hs(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?hs(e):null}function RG(e,t,n){var r,o=e.__v,i=o.__e,s=e.__P;if(s)return(r=Io({},o)).__v=o.__v+1,pt.vnode&&pt.vnode(r),w0(s,r,o,e.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,t,i??hs(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=i&&R$(r),r}function R$(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return R$(e)}}function P$(e){(!e.__d&&(e.__d=!0)&&yi.push(e)&&!Md.__r++||C$!==pt.debounceRendering)&&((C$=pt.debounceRendering)||x$)(Md)}function Md(){var e,t,n,r=[],o=[];for(yi.sort(S0);e=yi.shift();)e.__d&&(n=yi.length,t=RG(e,r,o)||t,n===0||yi.length>n?(k0(r,t,o),o.length=r.length=0,t=void 0,yi.sort(S0)):t&&pt.__c&&pt.__c(t,v0));t&&k0(r,t,o),Md.__r=0}function M$(e,t,n,r,o,i,s,l,c,d,f){var u,p,m,_,b,g=r&&r.__k||v0,h=t.length;for(n.__d=c,PG(n,t,g),c=n.__d,u=0;u<h;u++)(m=n.__k[u])!=null&&typeof m!="boolean"&&typeof m!="function"&&(p=m.__i===-1?gl:g[m.__i]||gl,m.__i=u,w0(e,m,p,o,i,s,l,c,d,f),_=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&A0(p.ref,null,m),f.push(m.ref,m.__c||_,m)),b==null&&_!=null&&(b=_),65536&m.__u||p.__k===m.__k?c=D$(m,c,e):typeof m.type=="function"&&m.__d!==void 0?c=m.__d:_&&(c=_.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=c,n.__e=b}function PG(e,t,n){var r,o,i,s,l,c=t.length,d=n.length,f=d,u=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Rd(null,o,null,null,o):T0(o)?Rd(yl,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Rd(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,l=MG(o,n,s=r+u,f),o.__i=l,i=null,l!==-1&&(f--,(i=n[l])&&(i.__u|=131072)),i==null||i.__v===null?(l==-1&&u--,typeof o.type!="function"&&(o.__u|=65536)):l!==s&&(l===s+1?u++:l>s?f>c-s?u+=l-s:u--:u=l<s&&l==s-1?l-s:0,l!==r+u&&(o.__u|=65536))):(i=n[r])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=hs(i)),N0(i,i,!1),n[r]=null,f--);if(f)for(r=0;r<d;r++)(i=n[r])!=null&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=hs(i)),N0(i,i))}function D$(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=D$(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function MG(e,t,n,r){var o=e.key,i=e.type,s=n-1,l=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;s>=0||l<t.length;){if(s>=0){if((c=t[s])&&(131072&c.__u)==0&&o==c.key&&i===c.type)return s;s--}if(l<t.length){if((c=t[l])&&(131072&c.__u)==0&&o==c.key&&i===c.type)return l;l++}}return-1}function L$(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||OG.test(t)?n:n+"px"}function Dd(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||L$(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||L$(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?B$:F$,i)):e.removeEventListener(t,i?B$:F$,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function F$(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(pt.event?pt.event(e):e)}}function B$(e){if(this.l)return this.l[e.type+!0](pt.event?pt.event(e):e)}function w0(e,t,n,r,o,i,s,l,c,d){var f,u,p,m,_,b,g,h,y,E,$,O,N,v,B,H=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[l=t.__e=n.__e]),(f=pt.__b)&&f(t);e:if(typeof H=="function")try{if(h=t.props,y=(f=H.contextType)&&r[f.__c],E=f?y?y.props.value:f.__:r,n.__c?g=(u=t.__c=n.__c).__=u.__E:("prototype"in H&&H.prototype.render?t.__c=u=new H(h,E):(t.__c=u=new Pd(h,E),u.constructor=H,u.render=LG),y&&y.sub(u),u.props=h,u.state||(u.state={}),u.context=E,u.__n=r,p=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),H.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Io({},u.__s)),Io(u.__s,H.getDerivedStateFromProps(h,u.__s))),m=u.props,_=u.state,u.__v=t,p)H.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(H.getDerivedStateFromProps==null&&h!==m&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(h,E),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(h,u.__s,E)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=h,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(U){U&&(U.__=t)}),$=0;$<u._sb.length;$++)u.__h.push(u._sb[$]);u._sb=[],u.__h.length&&s.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(h,u.__s,E),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(m,_,b)})}if(u.context=E,u.props=h,u.__P=e,u.__e=!1,O=pt.__r,N=0,"prototype"in H&&H.prototype.render){for(u.state=u.__s,u.__d=!1,O&&O(t),f=u.render(u.props,u.state,u.context),v=0;v<u._sb.length;v++)u.__h.push(u._sb[v]);u._sb=[]}else do u.__d=!1,O&&O(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++N<25);u.state=u.__s,u.getChildContext!=null&&(r=Io(Io({},r),u.getChildContext())),p||u.getSnapshotBeforeUpdate==null||(b=u.getSnapshotBeforeUpdate(m,_)),M$(e,T0(B=f!=null&&f.type===yl&&f.key==null?f.props.children:f)?B:[B],t,n,r,o,i,s,l,c,d),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),g&&(u.__E=u.__=null)}catch(U){t.__v=null,c||i!=null?(t.__e=l,t.__u|=c?160:32,i[i.indexOf(l)]=null):(t.__e=n.__e,t.__k=n.__k),pt.__e(U,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=DG(n.__e,t,n,r,o,i,s,c,d);(f=pt.diffed)&&f(t)}function k0(e,t,n){for(var r=0;r<n.length;r++)A0(n[r],n[++r],n[++r]);pt.__c&&pt.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){pt.__e(i,o.__v)}})}function DG(e,t,n,r,o,i,s,l,c){var d,f,u,p,m,_,b,g=n.props,h=t.props,y=t.type;if(y==="svg"&&(o=!0),i!=null){for(d=0;d<i.length;d++)if((m=i[d])&&"setAttribute"in m==!!y&&(y?m.localName===y:m.nodeType===3)){e=m,i[d]=null;break}}if(e==null){if(y===null)return document.createTextNode(h);e=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,h.is&&h),i=null,l=!1}if(y===null)g===h||l&&e.data===h||(e.data=h);else{if(i=i&&Od.call(e.childNodes),g=n.props||gl,!l&&i!=null)for(g={},d=0;d<e.attributes.length;d++)g[(m=e.attributes[d]).name]=m.value;for(d in g)m=g[d],d=="children"||(d=="dangerouslySetInnerHTML"?u=m:d==="key"||d in h||Dd(e,d,null,m,o));for(d in h)m=h[d],d=="children"?p=m:d=="dangerouslySetInnerHTML"?f=m:d=="value"?_=m:d=="checked"?b=m:d==="key"||l&&typeof m!="function"||g[d]===m||Dd(e,d,m,g[d],o);if(f)l||u&&(f.__html===u.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(u&&(e.innerHTML=""),M$(e,T0(p)?p:[p],t,n,r,o&&y!=="foreignObject",i,s,i?i[0]:n.__k&&hs(n,0),l,c),i!=null)for(d=i.length;d--;)i[d]!=null&&O$(i[d]);l||(d="value",_!==void 0&&(_!==e[d]||y==="progress"&&!_||y==="option"&&_!==g[d])&&Dd(e,d,_,g[d],!1),d="checked",b!==void 0&&b!==e[d]&&Dd(e,d,b,g[d],!1))}return e}function A0(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){pt.__e(r,n)}}function N0(e,t,n){var r,o;if(pt.unmount&&pt.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||A0(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){pt.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&N0(r[o],t,n||typeof e.type!="function");n||e.__e==null||O$(e.__e),e.__=e.__e=e.__d=void 0}function LG(e,t,n){return this.constructor(e,n)}function FG(e,t,n){var r,o,i,s;pt.__&&pt.__(e,t),o=(r=!1)?null:t.__k,i=[],s=[],w0(t,e=t.__k=Ve(yl,null,[e]),o||gl,gl,t.ownerSVGElement!==void 0,o?null:t.firstChild?Od.call(t.childNodes):null,i,o?o.__e:t.firstChild,r,s),e.__d=void 0,k0(i,e,s)}Od=v0.slice,pt={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(l){e=l}throw e}},I$=0,Pd.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Io({},this.state),typeof e=="function"&&(e=e(Io({},n),this.props)),e&&Io(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),P$(this))},Pd.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P$(this))},Pd.prototype.render=yl,yi=[],x$=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,S0=function(e,t){return e.__v.__b-t.__v.__b},Md.__r=0;var no,mt,I0,U$,gs=0,V$=[],Ld=[],kt=pt,j$=kt.__b,z$=kt.__r,q$=kt.diffed,H$=kt.__c,W$=kt.unmount,G$=kt.__;function bi(e,t){kt.__h&&kt.__h(mt,e,gs||t),gs=0;var n=mt.__H||(mt.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ld}),n.__[e]}function Ei(e){return gs=1,Y$(J$,e)}function Y$(e,t,n){var r=bi(no++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):J$(void 0,t),function(l){var c=r.__N?r.__N[0]:r.__[0],d=r.t(c,l);c!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=mt,!mt.u)){var o=function(l,c,d){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(p){return!!p.__c});if(f.every(function(p){return!p.__N}))return!i||i.call(this,l,c,d);var u=!1;return f.forEach(function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(u=!0)}}),!(!u&&r.__c.props===l)&&(!i||i.call(this,l,c,d))};mt.u=!0;var i=mt.shouldComponentUpdate,s=mt.componentWillUpdate;mt.componentWillUpdate=function(l,c,d){if(this.__e){var f=i;i=void 0,o(l,c,d),i=f}s&&s.call(this,l,c,d)},mt.shouldComponentUpdate=o}return r.__N||r.__}function BG(e,t){var n=bi(no++,3);!kt.__s&&x0(n.__H,t)&&(n.__=e,n.i=t,mt.__H.__h.push(n))}function K$(e,t){var n=bi(no++,4);!kt.__s&&x0(n.__H,t)&&(n.__=e,n.i=t,mt.__h.push(n))}function UG(e){return gs=5,bl(function(){return{current:e}},[])}function VG(e,t,n){gs=6,K$(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function bl(e,t){var n=bi(no++,7);return x0(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ys(e,t){return gs=8,bl(function(){return e},t)}function jG(e){var t=mt.context[e.__c],n=bi(no++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(mt)),t.props.value):e.__}function zG(e,t){kt.useDebugValue&&kt.useDebugValue(t?t(e):e)}function qG(e){var t=bi(no++,10),n=Ei();return t.__=e,mt.componentDidCatch||(mt.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function HG(){var e=bi(no++,11);if(!e.__){for(var t=mt.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function WG(){for(var e;e=V$.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Fd),e.__H.__h.forEach(C0),e.__H.__h=[]}catch(t){e.__H.__h=[],kt.__e(t,e.__v)}}kt.__b=function(e){mt=null,j$&&j$(e)},kt.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),G$&&G$(e,t)},kt.__r=function(e){z$&&z$(e),no=0;var t=(mt=e.__c).__H;t&&(I0===mt?(t.__h=[],mt.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ld,n.__N=n.i=void 0})):(t.__h.forEach(Fd),t.__h.forEach(C0),t.__h=[],no=0)),I0=mt},kt.diffed=function(e){q$&&q$(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(V$.push(t)!==1&&U$===kt.requestAnimationFrame||((U$=kt.requestAnimationFrame)||GG)(WG)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ld&&(n.__=n.__V),n.i=void 0,n.__V=Ld})),I0=mt=null},kt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Fd),n.__h=n.__h.filter(function(r){return!r.__||C0(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],kt.__e(r,n.__v)}}),H$&&H$(e,t)},kt.unmount=function(e){W$&&W$(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Fd(r)}catch(o){t=o}}),n.__H=void 0,t&&kt.__e(t,n.__v))};var X$=typeof requestAnimationFrame=="function";function GG(e){var t,n=function(){clearTimeout(r),X$&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);X$&&(t=requestAnimationFrame(n))}function Fd(e){var t=mt,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),mt=t}function C0(e){var t=mt;e.__c=e.__(),mt=t}function x0(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function J$(e,t){return typeof t=="function"?t(e):t}const YG=Object.defineProperty({__proto__:null,useCallback:ys,useContext:jG,useDebugValue:zG,useEffect:BG,useErrorBoundary:qG,useId:HG,useImperativeHandle:VG,useLayoutEffect:K$,useMemo:bl,useReducer:Y$,useRef:UG,useState:Ei},Symbol.toStringTag,{value:"Module"}),KG="http://www.w3.org/2000/svg";function XG(){const e=r=>ft.createElementNS(KG,r),t=Fn(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Fn(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function JG({options:e}){const t=bl(()=>({__html:XG().outerHTML}),[]);return Ve("h2",{class:"dialog__header"},Ve("span",{class:"dialog__title"},e.formTitle),e.showBranding?Ve("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function ZG(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function O0(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function QG({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:i,onSubmitError:s,showEmail:l,showName:c,screenshotInput:d}){const{tags:f,addScreenshotButtonLabel:u,removeScreenshotButtonLabel:p,cancelButtonLabel:m,emailLabel:_,emailPlaceholder:b,isEmailRequired:g,isNameRequired:h,messageLabel:y,messagePlaceholder:E,nameLabel:$,namePlaceholder:O,submitButtonLabel:N,isRequiredLabel:v}=e,[B,H]=Ei(!1),[U,C]=Ei(null),[A,R]=Ei(!1),I=d?.input,[V,j]=Ei(null),F=ys(W=>{j(W),R(!1)},[]),M=ys(W=>{const K=ZG(W,{emailLabel:_,isEmailRequired:g,isNameRequired:h,messageLabel:y,nameLabel:$});return K.length>0?C(`Please enter in the following required fields: ${K.join(", ")}`):C(null),K.length===0},[_,g,h,y,$]),Y=ys(async W=>{H(!0);try{if(W.preventDefault(),!(W.target instanceof HTMLFormElement))return;const K=new FormData(W.target),te=await(d&&A?d.value():void 0),X={name:O0(K,"name"),email:O0(K,"email"),message:O0(K,"message"),attachments:te?[te]:void 0};if(!M(X))return;try{const oe=await o({name:X.name,email:X.email,message:X.message,source:$G,tags:f},{attachments:X.attachments});i(X,oe)}catch(oe){Cd&&P.error(oe);const fe=oe instanceof Error?oe:new Error(String(oe));C(fe.message),s(fe)}}finally{H(!1)}},[d&&A,i,s]);return Ve("form",{class:"form",onSubmit:Y},I&&A?Ve(I,{onError:F}):null,Ve("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:B},Ve("div",{class:"form__top"},U?Ve("div",{class:"form__error-container"},U):null,c?Ve("label",{for:"name",class:"form__label"},Ve(R0,{label:$,isRequiredLabel:v,isRequired:h}),Ve("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:O,required:h,type:"text"})):Ve("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),l?Ve("label",{for:"email",class:"form__label"},Ve(R0,{label:_,isRequiredLabel:v,isRequired:g}),Ve("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:b,required:g,type:"email"})):Ve("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Ve("label",{for:"message",class:"form__label"},Ve(R0,{label:y,isRequiredLabel:v,isRequired:!0}),Ve("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:E,required:!0,rows:5})),I?Ve("label",{for:"screenshot",class:"form__label"},Ve("button",{class:"btn btn--default",disabled:B,type:"button",onClick:()=>{j(null),R(W=>!W)}},A?p:u),V?Ve("div",{class:"form__error-container"},V.message):null):null),Ve("div",{class:"btn-group"},Ve("button",{class:"btn btn--primary",disabled:B,type:"submit"},N),Ve("button",{class:"btn btn--default",disabled:B,type:"button",onClick:r},m))))}function R0({label:e,isRequired:t,isRequiredLabel:n}){return Ve("span",{class:"form__label__text"},e,t&&Ve("span",{class:"form__label__text--required"},n))}const Bd=16,Z$=17,eY="http://www.w3.org/2000/svg";function tY(){const e=c=>lr.document.createElementNS(eY,c),t=Fn(e("svg"),{width:`${Bd}`,height:`${Z$}`,viewBox:`0 0 ${Bd} ${Z$}`,fill:"inherit"}),n=Fn(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Fn(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Fn(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const i=e("defs"),s=Fn(e("clipPath"),{id:"clip0_57_156"}),l=Fn(e("rect"),{width:`${Bd}`,height:`${Bd}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(l),i.appendChild(s),t.appendChild(i).appendChild(s).appendChild(l),t}function nY({open:e,onFormSubmitted:t,...n}){const r=n.options,o=bl(()=>({__html:tY().outerHTML}),[]),[i,s]=Ei(null),l=ys(()=>{i&&(clearTimeout(i),s(null)),t()},[i]),c=ys((d,f)=>{n.onSubmitSuccess(d,f),s(setTimeout(()=>{t(),s(null)},vG))},[t]);return Ve(yl,null,i?Ve("div",{class:"success__position",onClick:l},Ve("div",{class:"success__content"},r.successMessageText,Ve("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):Ve("dialog",{class:"dialog",onClick:r.onFormClose,open:e},Ve("div",{class:"dialog__position"},Ve("div",{class:"dialog__content",onClick:d=>{d.stopPropagation()}},Ve(JG,{options:r}),Ve(QG,{...n,onSubmitSuccess:c})))))}const rY=`
|
|
134
|
+
`,r&&o.setAttribute("nonce",r),o}const N$=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:o="sentry-feedback",autoInject:i=!0,showBranding:s=!0,isEmailRequired:l=!1,isNameRequired:c=!1,showEmail:d=!0,showName:f=!0,enableScreenshot:u=!0,useSentryUser:p={email:"email",name:"username"},tags:m,styleNonce:_,scriptNonce:b,colorScheme:g="system",themeLight:h={},themeDark:y={},addScreenshotButtonLabel:E=hG,cancelButtonLabel:$=oG,confirmButtonLabel:O=sG,emailLabel:N=cG,emailPlaceholder:v=lG,formTitle:B=aG,isRequiredLabel:H=_G,messageLabel:U=uG,messagePlaceholder:C=dG,nameLabel:A=pG,namePlaceholder:R=fG,removeScreenshotButtonLabel:I=gG,submitButtonLabel:V=iG,successMessageText:j=mG,triggerLabel:F=h$,triggerAriaLabel:M="",highlightToolText:Y=yG,hideToolText:W=bG,removeHighlightText:K=EG,errorEmptyMessageText:te=g$,errorNoClientText:X=y$,errorTimeoutText:oe=b$,errorForbiddenText:fe=E$,errorGenericText:J=$$,onFormOpen:ae,onFormClose:ye,onSubmitSuccess:$e,onSubmitError:Ie,onFormSubmitted:je}={})=>{const we={id:o,autoInject:i,showBranding:s,isEmailRequired:l,isNameRequired:c,showEmail:d,showName:f,enableScreenshot:u,useSentryUser:p,tags:m,styleNonce:_,scriptNonce:b,colorScheme:g,themeDark:y,themeLight:h,triggerLabel:F,triggerAriaLabel:M,cancelButtonLabel:$,submitButtonLabel:V,confirmButtonLabel:O,formTitle:B,emailLabel:N,emailPlaceholder:v,messageLabel:U,messagePlaceholder:C,nameLabel:A,namePlaceholder:R,successMessageText:j,isRequiredLabel:H,addScreenshotButtonLabel:E,removeScreenshotButtonLabel:I,highlightToolText:Y,hideToolText:W,removeHighlightText:K,errorEmptyMessageText:te,errorNoClientText:X,errorTimeoutText:oe,errorForbiddenText:fe,errorGenericText:J,onFormClose:ye,onFormOpen:ae,onSubmitError:Ie,onSubmitSuccess:$e,onFormSubmitted:je};let Le=null,Fe=null,Ye=[];const ke=k=>{if(!Le){const q=ft.createElement("div");q.id=String(k.id),ft.body.appendChild(q),Le=q.attachShadow({mode:"open"}),Fe=A$(k),Le.appendChild(Fe)}return Le},Ze=async k=>{const q=k.enableScreenshot&&wG();let ee,le;try{ee=(t?t():await e("feedbackModalIntegration",b))(),Um(ee)}catch{throw Cd&&P.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const Ue=q?n?n():await e("feedbackScreenshotIntegration",b):void 0;Ue&&(le=Ue(),Um(le))}catch{Cd&&P.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const ce={ERROR_EMPTY_MESSAGE:k.errorEmptyMessageText,ERROR_NO_CLIENT:k.errorNoClientText,ERROR_TIMEOUT:k.errorTimeoutText,ERROR_FORBIDDEN:k.errorForbiddenText,ERROR_GENERIC:k.errorGenericText},ot=(Ue,G)=>v$(Ue,{includeReplay:!0,...G,errorMessages:ce}),Qe=ee.createDialog({options:{...k,onFormClose:()=>{Qe?.close(),k.onFormClose?.()},onFormSubmitted:()=>{Qe?.close(),k.onFormSubmitted?.()}},screenshotIntegration:le,sendFeedback:ot,shadow:ke(k)});return Qe},w=(k,q={})=>{const ee=xd(we,q),le=typeof k=="string"?ft.querySelector(k):typeof k.addEventListener=="function"?k:null;if(!le)throw Cd&&P.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let ce=null;const ot=async()=>{ce||(ce=await Ze({...ee,onFormSubmitted:()=>{ce?.removeFromDom(),ee.onFormSubmitted?.()}})),ce.appendToDom(),ce.open()};le.addEventListener("click",ot);const Qe=()=>{Ye=Ye.filter(Ue=>Ue!==Qe),ce?.removeFromDom(),ce=null,le.removeEventListener("click",ot)};return Ye.push(Qe),Qe},T=(k={})=>{const q=xd(we,k),ee=ke(q),le=IG({triggerLabel:q.triggerLabel,triggerAriaLabel:q.triggerAriaLabel,shadow:ee,styleNonce:_});return w(le.el,{...q,onFormOpen(){le.hide()},onFormClose(){le.show()},onFormSubmitted(){le.show()}}),le};return{name:"Feedback",setupOnce(){!_l()||!we.autoInject||(ft.readyState==="loading"?ft.addEventListener("DOMContentLoaded",()=>T().appendToDom()):T().appendToDom())},attachTo:w,createWidget(k={}){const q=T(xd(we,k));return q.appendToDom(),q},async createForm(k={}){return Ze(xd(we,k))},setTheme(k){if(we.colorScheme=k,Le){const q=A$(we);Fe?Le.replaceChild(q,Fe):Le.prepend(q),Fe=q}},remove(){Le&&(Le.parentElement?.remove(),Le=null,Fe=null),Ye.forEach(k=>k()),Ye=[]}}});function xG(){return _e()?.getIntegrationByName("Feedback")}var Od,pt,I$,yi,C$,x$,S_,gl={},v_=[],OG=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,T_=Array.isArray;function Io(e,t){for(var n in t)e[n]=t[n];return e}function O$(e){var t=e.parentNode;t&&t.removeChild(e)}function Ve(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Od.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Rd(e,s,r,o,null)}function Rd(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++I$,__i:-1,__u:0};return o==null&&pt.vnode!=null&&pt.vnode(i),i}function yl(e){return e.children}function Pd(e,t){this.props=e,this.context=t}function hs(e,t){if(t==null)return e.__?hs(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?hs(e):null}function RG(e,t,n){var r,o=e.__v,i=o.__e,s=e.__P;if(s)return(r=Io({},o)).__v=o.__v+1,pt.vnode&&pt.vnode(r),w_(s,r,o,e.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,t,i??hs(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=i&&R$(r),r}function R$(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return R$(e)}}function P$(e){(!e.__d&&(e.__d=!0)&&yi.push(e)&&!Md.__r++||C$!==pt.debounceRendering)&&((C$=pt.debounceRendering)||x$)(Md)}function Md(){var e,t,n,r=[],o=[];for(yi.sort(S_);e=yi.shift();)e.__d&&(n=yi.length,t=RG(e,r,o)||t,n===0||yi.length>n?(k_(r,t,o),o.length=r.length=0,t=void 0,yi.sort(S_)):t&&pt.__c&&pt.__c(t,v_));t&&k_(r,t,o),Md.__r=0}function M$(e,t,n,r,o,i,s,l,c,d,f){var u,p,m,_,b,g=r&&r.__k||v_,h=t.length;for(n.__d=c,PG(n,t,g),c=n.__d,u=0;u<h;u++)(m=n.__k[u])!=null&&typeof m!="boolean"&&typeof m!="function"&&(p=m.__i===-1?gl:g[m.__i]||gl,m.__i=u,w_(e,m,p,o,i,s,l,c,d,f),_=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&A_(p.ref,null,m),f.push(m.ref,m.__c||_,m)),b==null&&_!=null&&(b=_),65536&m.__u||p.__k===m.__k?c=D$(m,c,e):typeof m.type=="function"&&m.__d!==void 0?c=m.__d:_&&(c=_.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=c,n.__e=b}function PG(e,t,n){var r,o,i,s,l,c=t.length,d=n.length,f=d,u=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Rd(null,o,null,null,o):T_(o)?Rd(yl,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Rd(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,l=MG(o,n,s=r+u,f),o.__i=l,i=null,l!==-1&&(f--,(i=n[l])&&(i.__u|=131072)),i==null||i.__v===null?(l==-1&&u--,typeof o.type!="function"&&(o.__u|=65536)):l!==s&&(l===s+1?u++:l>s?f>c-s?u+=l-s:u--:u=l<s&&l==s-1?l-s:0,l!==r+u&&(o.__u|=65536))):(i=n[r])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=hs(i)),N_(i,i,!1),n[r]=null,f--);if(f)for(r=0;r<d;r++)(i=n[r])!=null&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=hs(i)),N_(i,i))}function D$(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=D$(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function MG(e,t,n,r){var o=e.key,i=e.type,s=n-1,l=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;s>=0||l<t.length;){if(s>=0){if((c=t[s])&&(131072&c.__u)==0&&o==c.key&&i===c.type)return s;s--}if(l<t.length){if((c=t[l])&&(131072&c.__u)==0&&o==c.key&&i===c.type)return l;l++}}return-1}function L$(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||OG.test(t)?n:n+"px"}function Dd(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||L$(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||L$(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?B$:F$,i)):e.removeEventListener(t,i?B$:F$,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function F$(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(pt.event?pt.event(e):e)}}function B$(e){if(this.l)return this.l[e.type+!0](pt.event?pt.event(e):e)}function w_(e,t,n,r,o,i,s,l,c,d){var f,u,p,m,_,b,g,h,y,E,$,O,N,v,B,H=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[l=t.__e=n.__e]),(f=pt.__b)&&f(t);e:if(typeof H=="function")try{if(h=t.props,y=(f=H.contextType)&&r[f.__c],E=f?y?y.props.value:f.__:r,n.__c?g=(u=t.__c=n.__c).__=u.__E:("prototype"in H&&H.prototype.render?t.__c=u=new H(h,E):(t.__c=u=new Pd(h,E),u.constructor=H,u.render=LG),y&&y.sub(u),u.props=h,u.state||(u.state={}),u.context=E,u.__n=r,p=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),H.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Io({},u.__s)),Io(u.__s,H.getDerivedStateFromProps(h,u.__s))),m=u.props,_=u.state,u.__v=t,p)H.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(H.getDerivedStateFromProps==null&&h!==m&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(h,E),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(h,u.__s,E)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=h,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(U){U&&(U.__=t)}),$=0;$<u._sb.length;$++)u.__h.push(u._sb[$]);u._sb=[],u.__h.length&&s.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(h,u.__s,E),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(m,_,b)})}if(u.context=E,u.props=h,u.__P=e,u.__e=!1,O=pt.__r,N=0,"prototype"in H&&H.prototype.render){for(u.state=u.__s,u.__d=!1,O&&O(t),f=u.render(u.props,u.state,u.context),v=0;v<u._sb.length;v++)u.__h.push(u._sb[v]);u._sb=[]}else do u.__d=!1,O&&O(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++N<25);u.state=u.__s,u.getChildContext!=null&&(r=Io(Io({},r),u.getChildContext())),p||u.getSnapshotBeforeUpdate==null||(b=u.getSnapshotBeforeUpdate(m,_)),M$(e,T_(B=f!=null&&f.type===yl&&f.key==null?f.props.children:f)?B:[B],t,n,r,o,i,s,l,c,d),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),g&&(u.__E=u.__=null)}catch(U){t.__v=null,c||i!=null?(t.__e=l,t.__u|=c?160:32,i[i.indexOf(l)]=null):(t.__e=n.__e,t.__k=n.__k),pt.__e(U,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=DG(n.__e,t,n,r,o,i,s,c,d);(f=pt.diffed)&&f(t)}function k_(e,t,n){for(var r=0;r<n.length;r++)A_(n[r],n[++r],n[++r]);pt.__c&&pt.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){pt.__e(i,o.__v)}})}function DG(e,t,n,r,o,i,s,l,c){var d,f,u,p,m,_,b,g=n.props,h=t.props,y=t.type;if(y==="svg"&&(o=!0),i!=null){for(d=0;d<i.length;d++)if((m=i[d])&&"setAttribute"in m==!!y&&(y?m.localName===y:m.nodeType===3)){e=m,i[d]=null;break}}if(e==null){if(y===null)return document.createTextNode(h);e=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,h.is&&h),i=null,l=!1}if(y===null)g===h||l&&e.data===h||(e.data=h);else{if(i=i&&Od.call(e.childNodes),g=n.props||gl,!l&&i!=null)for(g={},d=0;d<e.attributes.length;d++)g[(m=e.attributes[d]).name]=m.value;for(d in g)m=g[d],d=="children"||(d=="dangerouslySetInnerHTML"?u=m:d==="key"||d in h||Dd(e,d,null,m,o));for(d in h)m=h[d],d=="children"?p=m:d=="dangerouslySetInnerHTML"?f=m:d=="value"?_=m:d=="checked"?b=m:d==="key"||l&&typeof m!="function"||g[d]===m||Dd(e,d,m,g[d],o);if(f)l||u&&(f.__html===u.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(u&&(e.innerHTML=""),M$(e,T_(p)?p:[p],t,n,r,o&&y!=="foreignObject",i,s,i?i[0]:n.__k&&hs(n,0),l,c),i!=null)for(d=i.length;d--;)i[d]!=null&&O$(i[d]);l||(d="value",_!==void 0&&(_!==e[d]||y==="progress"&&!_||y==="option"&&_!==g[d])&&Dd(e,d,_,g[d],!1),d="checked",b!==void 0&&b!==e[d]&&Dd(e,d,b,g[d],!1))}return e}function A_(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){pt.__e(r,n)}}function N_(e,t,n){var r,o;if(pt.unmount&&pt.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||A_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){pt.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&N_(r[o],t,n||typeof e.type!="function");n||e.__e==null||O$(e.__e),e.__=e.__e=e.__d=void 0}function LG(e,t,n){return this.constructor(e,n)}function FG(e,t,n){var r,o,i,s;pt.__&&pt.__(e,t),o=(r=!1)?null:t.__k,i=[],s=[],w_(t,e=t.__k=Ve(yl,null,[e]),o||gl,gl,t.ownerSVGElement!==void 0,o?null:t.firstChild?Od.call(t.childNodes):null,i,o?o.__e:t.firstChild,r,s),e.__d=void 0,k_(i,e,s)}Od=v_.slice,pt={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(l){e=l}throw e}},I$=0,Pd.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Io({},this.state),typeof e=="function"&&(e=e(Io({},n),this.props)),e&&Io(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),P$(this))},Pd.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P$(this))},Pd.prototype.render=yl,yi=[],x$=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,S_=function(e,t){return e.__v.__b-t.__v.__b},Md.__r=0;var no,mt,I_,U$,gs=0,V$=[],Ld=[],kt=pt,j$=kt.__b,z$=kt.__r,q$=kt.diffed,H$=kt.__c,W$=kt.unmount,G$=kt.__;function bi(e,t){kt.__h&&kt.__h(mt,e,gs||t),gs=0;var n=mt.__H||(mt.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ld}),n.__[e]}function Ei(e){return gs=1,Y$(J$,e)}function Y$(e,t,n){var r=bi(no++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):J$(void 0,t),function(l){var c=r.__N?r.__N[0]:r.__[0],d=r.t(c,l);c!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=mt,!mt.u)){var o=function(l,c,d){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(p){return!!p.__c});if(f.every(function(p){return!p.__N}))return!i||i.call(this,l,c,d);var u=!1;return f.forEach(function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(u=!0)}}),!(!u&&r.__c.props===l)&&(!i||i.call(this,l,c,d))};mt.u=!0;var i=mt.shouldComponentUpdate,s=mt.componentWillUpdate;mt.componentWillUpdate=function(l,c,d){if(this.__e){var f=i;i=void 0,o(l,c,d),i=f}s&&s.call(this,l,c,d)},mt.shouldComponentUpdate=o}return r.__N||r.__}function BG(e,t){var n=bi(no++,3);!kt.__s&&x_(n.__H,t)&&(n.__=e,n.i=t,mt.__H.__h.push(n))}function K$(e,t){var n=bi(no++,4);!kt.__s&&x_(n.__H,t)&&(n.__=e,n.i=t,mt.__h.push(n))}function UG(e){return gs=5,bl(function(){return{current:e}},[])}function VG(e,t,n){gs=6,K$(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function bl(e,t){var n=bi(no++,7);return x_(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ys(e,t){return gs=8,bl(function(){return e},t)}function jG(e){var t=mt.context[e.__c],n=bi(no++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(mt)),t.props.value):e.__}function zG(e,t){kt.useDebugValue&&kt.useDebugValue(t?t(e):e)}function qG(e){var t=bi(no++,10),n=Ei();return t.__=e,mt.componentDidCatch||(mt.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function HG(){var e=bi(no++,11);if(!e.__){for(var t=mt.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function WG(){for(var e;e=V$.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Fd),e.__H.__h.forEach(C_),e.__H.__h=[]}catch(t){e.__H.__h=[],kt.__e(t,e.__v)}}kt.__b=function(e){mt=null,j$&&j$(e)},kt.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),G$&&G$(e,t)},kt.__r=function(e){z$&&z$(e),no=0;var t=(mt=e.__c).__H;t&&(I_===mt?(t.__h=[],mt.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ld,n.__N=n.i=void 0})):(t.__h.forEach(Fd),t.__h.forEach(C_),t.__h=[],no=0)),I_=mt},kt.diffed=function(e){q$&&q$(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(V$.push(t)!==1&&U$===kt.requestAnimationFrame||((U$=kt.requestAnimationFrame)||GG)(WG)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ld&&(n.__=n.__V),n.i=void 0,n.__V=Ld})),I_=mt=null},kt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Fd),n.__h=n.__h.filter(function(r){return!r.__||C_(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],kt.__e(r,n.__v)}}),H$&&H$(e,t)},kt.unmount=function(e){W$&&W$(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Fd(r)}catch(o){t=o}}),n.__H=void 0,t&&kt.__e(t,n.__v))};var X$=typeof requestAnimationFrame=="function";function GG(e){var t,n=function(){clearTimeout(r),X$&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);X$&&(t=requestAnimationFrame(n))}function Fd(e){var t=mt,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),mt=t}function C_(e){var t=mt;e.__c=e.__(),mt=t}function x_(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function J$(e,t){return typeof t=="function"?t(e):t}const YG=Object.defineProperty({__proto__:null,useCallback:ys,useContext:jG,useDebugValue:zG,useEffect:BG,useErrorBoundary:qG,useId:HG,useImperativeHandle:VG,useLayoutEffect:K$,useMemo:bl,useReducer:Y$,useRef:UG,useState:Ei},Symbol.toStringTag,{value:"Module"}),KG="http://www.w3.org/2000/svg";function XG(){const e=r=>ft.createElementNS(KG,r),t=Fn(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Fn(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function JG({options:e}){const t=bl(()=>({__html:XG().outerHTML}),[]);return Ve("h2",{class:"dialog__header"},Ve("span",{class:"dialog__title"},e.formTitle),e.showBranding?Ve("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function ZG(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function O_(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function QG({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:i,onSubmitError:s,showEmail:l,showName:c,screenshotInput:d}){const{tags:f,addScreenshotButtonLabel:u,removeScreenshotButtonLabel:p,cancelButtonLabel:m,emailLabel:_,emailPlaceholder:b,isEmailRequired:g,isNameRequired:h,messageLabel:y,messagePlaceholder:E,nameLabel:$,namePlaceholder:O,submitButtonLabel:N,isRequiredLabel:v}=e,[B,H]=Ei(!1),[U,C]=Ei(null),[A,R]=Ei(!1),I=d?.input,[V,j]=Ei(null),F=ys(W=>{j(W),R(!1)},[]),M=ys(W=>{const K=ZG(W,{emailLabel:_,isEmailRequired:g,isNameRequired:h,messageLabel:y,nameLabel:$});return K.length>0?C(`Please enter in the following required fields: ${K.join(", ")}`):C(null),K.length===0},[_,g,h,y,$]),Y=ys(async W=>{H(!0);try{if(W.preventDefault(),!(W.target instanceof HTMLFormElement))return;const K=new FormData(W.target),te=await(d&&A?d.value():void 0),X={name:O_(K,"name"),email:O_(K,"email"),message:O_(K,"message"),attachments:te?[te]:void 0};if(!M(X))return;try{const oe=await o({name:X.name,email:X.email,message:X.message,source:$G,tags:f},{attachments:X.attachments});i(X,oe)}catch(oe){Cd&&P.error(oe);const fe=oe instanceof Error?oe:new Error(String(oe));C(fe.message),s(fe)}}finally{H(!1)}},[d&&A,i,s]);return Ve("form",{class:"form",onSubmit:Y},I&&A?Ve(I,{onError:F}):null,Ve("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:B},Ve("div",{class:"form__top"},U?Ve("div",{class:"form__error-container"},U):null,c?Ve("label",{for:"name",class:"form__label"},Ve(R_,{label:$,isRequiredLabel:v,isRequired:h}),Ve("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:O,required:h,type:"text"})):Ve("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),l?Ve("label",{for:"email",class:"form__label"},Ve(R_,{label:_,isRequiredLabel:v,isRequired:g}),Ve("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:b,required:g,type:"email"})):Ve("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Ve("label",{for:"message",class:"form__label"},Ve(R_,{label:y,isRequiredLabel:v,isRequired:!0}),Ve("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:E,required:!0,rows:5})),I?Ve("label",{for:"screenshot",class:"form__label"},Ve("button",{class:"btn btn--default",disabled:B,type:"button",onClick:()=>{j(null),R(W=>!W)}},A?p:u),V?Ve("div",{class:"form__error-container"},V.message):null):null),Ve("div",{class:"btn-group"},Ve("button",{class:"btn btn--primary",disabled:B,type:"submit"},N),Ve("button",{class:"btn btn--default",disabled:B,type:"button",onClick:r},m))))}function R_({label:e,isRequired:t,isRequiredLabel:n}){return Ve("span",{class:"form__label__text"},e,t&&Ve("span",{class:"form__label__text--required"},n))}const Bd=16,Z$=17,eY="http://www.w3.org/2000/svg";function tY(){const e=c=>lr.document.createElementNS(eY,c),t=Fn(e("svg"),{width:`${Bd}`,height:`${Z$}`,viewBox:`0 0 ${Bd} ${Z$}`,fill:"inherit"}),n=Fn(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Fn(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Fn(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const i=e("defs"),s=Fn(e("clipPath"),{id:"clip0_57_156"}),l=Fn(e("rect"),{width:`${Bd}`,height:`${Bd}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(l),i.appendChild(s),t.appendChild(i).appendChild(s).appendChild(l),t}function nY({open:e,onFormSubmitted:t,...n}){const r=n.options,o=bl(()=>({__html:tY().outerHTML}),[]),[i,s]=Ei(null),l=ys(()=>{i&&(clearTimeout(i),s(null)),t()},[i]),c=ys((d,f)=>{n.onSubmitSuccess(d,f),s(setTimeout(()=>{t(),s(null)},vG))},[t]);return Ve(yl,null,i?Ve("div",{class:"success__position",onClick:l},Ve("div",{class:"success__content"},r.successMessageText,Ve("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):Ve("dialog",{class:"dialog",onClick:r.onFormClose,open:e},Ve("div",{class:"dialog__position"},Ve("div",{class:"dialog__content",onClick:d=>{d.stopPropagation()}},Ve(JG,{options:r}),Ve(QG,{...n,onSubmitSuccess:c})))))}const rY=`
|
|
135
135
|
.dialog {
|
|
136
136
|
position: fixed;
|
|
137
137
|
z-index: var(--z-index);
|
|
@@ -513,22 +513,22 @@ ${aY}
|
|
|
513
513
|
.editor__rect:hover button {
|
|
514
514
|
opacity: 1;
|
|
515
515
|
}
|
|
516
|
-
`,e&&t.setAttribute("nonce",e),t}function pY({h:e}){return function({action:n,setAction:r,options:o}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},o.hideToolText)))}}function mY({hooks:e}){function t(){const[n,r]=e.useState(lr.devicePixelRatio??1);return e.useEffect(()=>{const o=()=>{r(lr.devicePixelRatio)},i=matchMedia(`(resolution: ${lr.devicePixelRatio}dppx)`);return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:i,onError:s}){const l=t();e.useEffect(()=>{(async()=>{r();const d=await hl.mediaDevices.getDisplayMedia({video:{width:lr.innerWidth*l,height:lr.innerHeight*l},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),f=ft.createElement("video");await new Promise((u,p)=>{f.srcObject=d,f.onloadedmetadata=()=>{o(f,l),d.getTracks().forEach(m=>m.stop()),u()},f.play().catch(p)}),i()})().catch(s)},[])}}function _Y(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Co(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function P0(e,t){Co(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function M0(e,t,n){Co(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(i=>{_Y(i,o,t)})})}function hY({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const i=mY({hooks:t}),s=pY({h:e}),l=uY({h:e}),c={__html:fY(o.styleNonce).innerText},d=r.el.style,f=({screenshot:u})=>{const[p,m]=t.useState("highlight"),[_,b]=t.useState([]),g=t.useRef(null),h=t.useRef(null),y=t.useRef(null),E=t.useRef(null),[$,O]=t.useState(1),N=t.useMemo(()=>{const A=ft.getElementById(o.id);if(!A)return"white";const R=getComputedStyle(A);return R.getPropertyValue("--button-primary-background")||R.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const A=()=>{const R=g.current;R&&(Co(u.canvas,{alpha:!1},I=>{const V=Math.min(R.clientWidth/I.width,R.clientHeight/I.height);O(V)}),(R.clientHeight===0||R.clientWidth===0)&&setTimeout(A,0))};return A(),lr.addEventListener("resize",A),()=>{lr.removeEventListener("resize",A)}},[u]);const v=t.useCallback((A,R)=>{Co(A,{alpha:!0},(I,V)=>{V.scale(R,R),I.width=u.canvas.width,I.height=u.canvas.height})},[u]);t.useEffect(()=>{v(h.current,u.dpi),P0(h.current,u.canvas)},[u]),t.useEffect(()=>{v(y.current,u.dpi),Co(y.current,{alpha:!0},(A,R)=>{R.clearRect(0,0,A.width,A.height)}),M0(y.current,N,_)},[_,N]),t.useEffect(()=>{v(n,u.dpi),P0(n,u.canvas),Co(ft.createElement("canvas"),{alpha:!0},(A,R)=>{R.scale(u.dpi,u.dpi),A.width=u.canvas.width,A.height=u.canvas.height,M0(A,N,_),P0(n,A)})},[_,u,N]);const B=A=>{if(!p||!E.current)return;const R=E.current.getBoundingClientRect(),I={type:p,x:A.offsetX/$,y:A.offsetY/$},V=(M,Y)=>{const W=(Y.clientX-R.x)/$,K=(Y.clientY-R.y)/$;return{type:M.type,x:Math.min(M.x,W),y:Math.min(M.y,K),w:Math.abs(W-M.x),h:Math.abs(K-M.y)}},j=M=>{Co(y.current,{alpha:!0},(Y,W)=>{W.clearRect(0,0,Y.width,Y.height)}),M0(y.current,N,[..._,V(I,M)])},F=M=>{const Y=V(I,M);Y.w*$>=1&&Y.h*$>=1&&b(W=>[...W,Y]),ft.removeEventListener("mousemove",j),ft.removeEventListener("mouseup",F)};ft.addEventListener("mousemove",j),ft.addEventListener("mouseup",F)},H=t.useCallback(A=>R=>{R.preventDefault(),R.stopPropagation(),b(I=>{const V=[...I];return V.splice(A,1),V})},[]),U={width:`${u.canvas.width*$}px`,height:`${u.canvas.height*$}px`},C=A=>{A.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:g},e("canvas",{ref:h,id:"background",style:U}),e("canvas",{ref:y,id:"foreground",style:U}),e("div",{ref:E,onMouseDown:B,style:U},_.map((A,R)=>e("div",{key:R,class:"editor__rect",style:{top:`${A.y*$}px`,left:`${A.x*$}px`,width:`${A.w*$}px`,height:`${A.h*$}px`}},e("button",{"aria-label":o.removeHighlightText,onClick:H(R),onMouseDown:C,onMouseUp:C,type:"button"},e(l,null))))))),e(s,{options:o,action:p,setAction:m}))};return function({onError:p}){const[m,_]=t.useState();return i({onBeforeScreenshot:t.useCallback(()=>{d.display="none"},[]),onScreenshot:t.useCallback((b,g)=>{Co(ft.createElement("canvas"),{alpha:!1},(h,y)=>{y.scale(g,g),h.width=b.videoWidth,h.height=b.videoHeight,y.drawImage(b,0,0,h.width,h.height),_({canvas:h,dpi:g})}),n.width=b.videoWidth,n.height=b.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{d.display="block"},[]),onError:t.useCallback(b=>{d.display="block",p(b)},[])}),m?e(f,{screenshot:m}):e("div",null)}}const gY=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=ft.createElement("canvas");return{input:hY({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const i=await new Promise(s=>{o.toBlob(s,"image/png")});if(i)return{data:new Uint8Array(await i.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),be=Te;let D0=0;function Q$(){return D0>0}function yY(){D0++,setTimeout(()=>{D0--})}function bs(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(gm(e))return e}catch{return e}const r=function(...o){try{const i=o.map(s=>bs(s,t));return e.apply(this,i)}catch(i){throw yY(),Hn(s=>{s.addEventProcessor(l=>(t.mechanism&&(Em(l,void 0),Yr(l,t.mechanism)),l.extra={...l.extra,arguments:o},l)),lt(i)}),i}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}t4(r,e),en(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Ud(){const e=ni(),{referrer:t}=be.document||{},{userAgent:n}=be.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const bY=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],EY={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function $Y(e){return EY[e]||e.replace("Integration","").toLowerCase()}const e6=be;async function t6(e,t){const n=bY.includes(e)?$Y(e):void 0,r=e6.Sentry=e6.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const i=SY(n),s=be.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);const l=new Promise((u,p)=>{s.addEventListener("load",()=>u()),s.addEventListener("error",p)}),c=be.document.currentScript,d=be.document.body||be.document.head||c?.parentElement;if(d)d.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await l}catch{throw new Error(`Error when loading integration: ${e}`)}const f=r[e];if(typeof f!="function")throw new Error(`Could not load integration: ${e}`);return f}function SY(e){const n=_e()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Vr}/${e}.min.js`,n).toString()}const vY=N$({lazyLoadIntegration:t6}),n6=N$({getModalIntegration:()=>dY,getScreenshotIntegration:()=>gY});function Vd(e,t){const n=F0(e,t),r={type:NY(t),value:IY(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function TY(e,t,n,r){const i=_e()?.getOptions().normalizeDepth,s=OY(t),l={__serialized__:J4(t,i)};if(s)return{exception:{values:[Vd(e,s)]},extra:l};const c={exception:{values:[{type:qc(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:CY(t,{isUnhandledRejection:r})}]},extra:l};if(n){const d=F0(e,n);d.length&&(c.exception.values[0].stacktrace={frames:d})}return c}function L0(e,t){return{exception:{values:[Vd(e,t)]}}}function F0(e,t){const n=t.stacktrace||t.stack||"",r=kY(t),o=AY(t);try{return e(n,r,o)}catch{}return[]}const wY=/Minified React error #\d+;/i;function kY(e){return e&&wY.test(e.message)?1:0}function AY(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function r6(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function NY(e){const t=e?.name;return!t&&r6(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function IY(e){const t=e?.message;return r6(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?J9(t.error):J9(e):"No error message"}function o6(e,t,n,r){const o=n?.syntheticException||void 0,i=jd(e,t,o,r);return Yr(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),il(i)}function i6(e,t,n="info",r,o){const i=r?.syntheticException||void 0,s=B0(e,t,i,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),il(s)}function jd(e,t,n,r,o){let i;if(Z3(t)&&t.error)return L0(e,t.error);if(Q3(t)||jB(t)){const s=t;if("stack"in t)i=L0(e,t);else{const l=s.name||(Q3(s)?"DOMError":"DOMException"),c=s.message?`${l}: ${s.message}`:l;i=B0(e,c,n,r),Em(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return qr(t)?L0(e,t):An(t)||qc(t)?(i=TY(e,t,n,o),Yr(i,{synthetic:!0}),i):(i=B0(e,t,n,r),Em(i,`${t}`),Yr(i,{synthetic:!0}),i)}function B0(e,t,n,r){const o={};if(r&&n){const i=F0(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),Yr(o,{synthetic:!0})}if(zc(t)){const{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function CY(e,{isUnhandledRejection:t}){const n=YB(e),r=t?"promise rejection":"exception";return Z3(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:qc(e)?`Event \`${xY(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function xY(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function OY(e){return Object.values(e).find(t=>t instanceof Error)}class s6 extends Vj{constructor(t){const n=RY(t),r=be.SENTRY_SDK_SOURCE||BW();oE(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:o,sendClientReports:i,enableLogs:s,_experiments:l,enableMetrics:c}=this._options,d=c??l?.enableMetrics??!0;be.document&&(i||s||d)&&be.document.addEventListener("visibilitychange",()=>{be.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),s&&ad(this),d&&qm(this))}),o&&this.on("beforeSendSession",iz)}eventFromException(t,n){return o6(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return i6(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}}function RY(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:be.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const cr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,De=Te,PY=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",El=(e,t,n,r)=>{let o,i;return s=>{t.value>=0&&(s||r)&&(i=t.value-(o??0),(i||o===void 0)&&(o=t.value,t.delta=i,t.rating=PY(t.value,n),e(t)))}},$l=(e=!0)=>{const t=De.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Es=()=>$l()?.activationStart??0;function xo(e,t,n){De.document&&De.addEventListener(e,t,n)}function zd(e,t,n){De.document&&De.removeEventListener(e,t,n)}let $s=-1;const a6=new Set,MY=()=>De.document?.visibilityState==="hidden"&&!De.document?.prerendering?0:1/0,qd=e=>{if(DY(e)&&$s>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of a6)t();isFinite($s)||($s=e.type==="visibilitychange"?e.timeStamp:0,zd("prerenderingchange",qd,!0))}},Sl=()=>{if(De.document&&$s<0){const e=Es();$s=(De.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??MY(),xo("visibilitychange",qd,!0),xo("pagehide",qd,!0),xo("prerenderingchange",qd,!0)}return{get firstHiddenTime(){return $s},onHidden(e){a6.add(e)}}};function DY(e){return e.type==="pagehide"||De.document?.visibilityState==="hidden"}const LY=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,vl=(e,t=-1)=>{const n=$l();let r="navigate";return n&&(De.document?.prerendering||Es()>0?r="prerender":De.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:LY(),navigationType:r}},U0=new WeakMap;function V0(e,t){try{return U0.get(e)||U0.set(e,new t),U0.get(e)}catch{return new t}}class Hd{constructor(){Hd.prototype.__init.call(this),Hd.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const Ss=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},j0=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Wd=e=>{De.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},FY=[1800,3e3],BY=(e,t={})=>{Wd(()=>{const n=Sl(),r=vl("FCP");let o;const s=Ss("paint",l=>{for(const c of l)c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Es(),0),r.entries.push(c),o(!0)))});s&&(o=El(e,r,FY,t.reportAllChanges))})},UY=[.1,.25],VY=(e,t={})=>{BY(j0(()=>{const n=vl("CLS",0);let r;const o=Sl(),i=V0(t,Hd),s=c=>{for(const d of c)i._processEntry(d);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},l=Ss("layout-shift",s);l&&(r=El(e,n,UY,t.reportAllChanges),o.onHidden(()=>{s(l.takeRecords()),r(!0)}),De?.setTimeout?.(r))}))};let l6=0,z0=1/0,Gd=0;const jY=e=>{e.forEach(t=>{t.interactionId&&(z0=Math.min(z0,t.interactionId),Gd=Math.max(Gd,t.interactionId),l6=Gd?(Gd-z0)/7+1:0)})};let q0;const c6=()=>q0?l6:performance.interactionCount||0,zY=()=>{"interactionCount"in performance||q0||(q0=Ss("event",jY,{type:"event",buffered:!0,durationThreshold:0}))},H0=10;let d6=0;const qY=()=>c6()-d6;class Yd{constructor(){Yd.prototype.__init.call(this),Yd.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){d6=c6(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(qY()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<H0||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,i)=>i._latency-o._latency),this._longestInteractionList.length>H0){const o=this._longestInteractionList.splice(H0);for(const i of o)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}}const u6=e=>{const t=De.requestIdleCallback||De.setTimeout;De.document?.visibilityState==="hidden"?e():(e=j0(e),xo("visibilitychange",e,{once:!0,capture:!0}),xo("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),zd("visibilitychange",e,{capture:!0}),zd("pagehide",e,{capture:!0})}))},HY=[200,500],WY=40,GY=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Sl();Wd(()=>{zY();const r=vl("INP");let o;const i=V0(t,Yd),s=c=>{u6(()=>{for(const f of c)i._processEntry(f);const d=i._estimateP98LongestInteraction();d&&d._latency!==r.value&&(r.value=d._latency,r.entries=d.entries,o())})},l=Ss("event",s,{durationThreshold:t.durationThreshold??WY});o=El(e,r,HY,t.reportAllChanges),l&&(l.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(l.takeRecords()),o(!0)}))})};class YY{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const KY=[2500,4e3],XY=(e,t={})=>{Wd(()=>{const n=Sl(),r=vl("LCP");let o;const i=V0(t,YY),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(const d of c)i._processEntry(d),d.startTime<n.firstHiddenTime&&(r.value=Math.max(d.startTime-Es(),0),r.entries=[d],o())},l=Ss("largest-contentful-paint",s);if(l){o=El(e,r,KY,t.reportAllChanges);const c=j0(()=>{s(l.takeRecords()),l.disconnect(),o(!0)}),d=f=>{f.isTrusted&&(u6(c),zd(f.type,d,{capture:!0}))};for(const f of["keydown","click","visibilitychange"])xo(f,d,{capture:!0})}})},JY=[800,1800],W0=e=>{De.document?.prerendering?Wd(()=>W0(e)):De.document?.readyState!=="complete"?addEventListener("load",()=>W0(e),!0):setTimeout(e)},ZY=(e,t={})=>{const n=vl("TTFB"),r=El(e,n,JY,t.reportAllChanges);W0(()=>{const o=$l();o&&(n.value=Math.max(o.responseStart-Es(),0),n.entries=[o],r(!0))})},Tl={},Kd={};let f6,p6,m6,_6;function Xd(e,t=!1){return Zd("cls",e,eK,f6,t)}function Jd(e,t=!1){return Zd("lcp",e,tK,p6,t)}function QY(e){return Zd("ttfb",e,nK,m6)}function G0(e){return Zd("inp",e,rK,_6)}function $i(e,t){return h6(e,t),Kd[e]||(oK(e),Kd[e]=!0),g6(e,t)}function wl(e,t){const n=Tl[e];if(n?.length)for(const r of n)try{r(t)}catch(o){cr&&P.error(`Error while triggering instrumentation handler.
|
|
516
|
+
`,e&&t.setAttribute("nonce",e),t}function pY({h:e}){return function({action:n,setAction:r,options:o}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},o.hideToolText)))}}function mY({hooks:e}){function t(){const[n,r]=e.useState(lr.devicePixelRatio??1);return e.useEffect(()=>{const o=()=>{r(lr.devicePixelRatio)},i=matchMedia(`(resolution: ${lr.devicePixelRatio}dppx)`);return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:i,onError:s}){const l=t();e.useEffect(()=>{(async()=>{r();const d=await hl.mediaDevices.getDisplayMedia({video:{width:lr.innerWidth*l,height:lr.innerHeight*l},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),f=ft.createElement("video");await new Promise((u,p)=>{f.srcObject=d,f.onloadedmetadata=()=>{o(f,l),d.getTracks().forEach(m=>m.stop()),u()},f.play().catch(p)}),i()})().catch(s)},[])}}function _Y(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Co(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function P_(e,t){Co(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function M_(e,t,n){Co(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(i=>{_Y(i,o,t)})})}function hY({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const i=mY({hooks:t}),s=pY({h:e}),l=uY({h:e}),c={__html:fY(o.styleNonce).innerText},d=r.el.style,f=({screenshot:u})=>{const[p,m]=t.useState("highlight"),[_,b]=t.useState([]),g=t.useRef(null),h=t.useRef(null),y=t.useRef(null),E=t.useRef(null),[$,O]=t.useState(1),N=t.useMemo(()=>{const A=ft.getElementById(o.id);if(!A)return"white";const R=getComputedStyle(A);return R.getPropertyValue("--button-primary-background")||R.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const A=()=>{const R=g.current;R&&(Co(u.canvas,{alpha:!1},I=>{const V=Math.min(R.clientWidth/I.width,R.clientHeight/I.height);O(V)}),(R.clientHeight===0||R.clientWidth===0)&&setTimeout(A,0))};return A(),lr.addEventListener("resize",A),()=>{lr.removeEventListener("resize",A)}},[u]);const v=t.useCallback((A,R)=>{Co(A,{alpha:!0},(I,V)=>{V.scale(R,R),I.width=u.canvas.width,I.height=u.canvas.height})},[u]);t.useEffect(()=>{v(h.current,u.dpi),P_(h.current,u.canvas)},[u]),t.useEffect(()=>{v(y.current,u.dpi),Co(y.current,{alpha:!0},(A,R)=>{R.clearRect(0,0,A.width,A.height)}),M_(y.current,N,_)},[_,N]),t.useEffect(()=>{v(n,u.dpi),P_(n,u.canvas),Co(ft.createElement("canvas"),{alpha:!0},(A,R)=>{R.scale(u.dpi,u.dpi),A.width=u.canvas.width,A.height=u.canvas.height,M_(A,N,_),P_(n,A)})},[_,u,N]);const B=A=>{if(!p||!E.current)return;const R=E.current.getBoundingClientRect(),I={type:p,x:A.offsetX/$,y:A.offsetY/$},V=(M,Y)=>{const W=(Y.clientX-R.x)/$,K=(Y.clientY-R.y)/$;return{type:M.type,x:Math.min(M.x,W),y:Math.min(M.y,K),w:Math.abs(W-M.x),h:Math.abs(K-M.y)}},j=M=>{Co(y.current,{alpha:!0},(Y,W)=>{W.clearRect(0,0,Y.width,Y.height)}),M_(y.current,N,[..._,V(I,M)])},F=M=>{const Y=V(I,M);Y.w*$>=1&&Y.h*$>=1&&b(W=>[...W,Y]),ft.removeEventListener("mousemove",j),ft.removeEventListener("mouseup",F)};ft.addEventListener("mousemove",j),ft.addEventListener("mouseup",F)},H=t.useCallback(A=>R=>{R.preventDefault(),R.stopPropagation(),b(I=>{const V=[...I];return V.splice(A,1),V})},[]),U={width:`${u.canvas.width*$}px`,height:`${u.canvas.height*$}px`},C=A=>{A.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:g},e("canvas",{ref:h,id:"background",style:U}),e("canvas",{ref:y,id:"foreground",style:U}),e("div",{ref:E,onMouseDown:B,style:U},_.map((A,R)=>e("div",{key:R,class:"editor__rect",style:{top:`${A.y*$}px`,left:`${A.x*$}px`,width:`${A.w*$}px`,height:`${A.h*$}px`}},e("button",{"aria-label":o.removeHighlightText,onClick:H(R),onMouseDown:C,onMouseUp:C,type:"button"},e(l,null))))))),e(s,{options:o,action:p,setAction:m}))};return function({onError:p}){const[m,_]=t.useState();return i({onBeforeScreenshot:t.useCallback(()=>{d.display="none"},[]),onScreenshot:t.useCallback((b,g)=>{Co(ft.createElement("canvas"),{alpha:!1},(h,y)=>{y.scale(g,g),h.width=b.videoWidth,h.height=b.videoHeight,y.drawImage(b,0,0,h.width,h.height),_({canvas:h,dpi:g})}),n.width=b.videoWidth,n.height=b.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{d.display="block"},[]),onError:t.useCallback(b=>{d.display="block",p(b)},[])}),m?e(f,{screenshot:m}):e("div",null)}}const gY=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=ft.createElement("canvas");return{input:hY({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const i=await new Promise(s=>{o.toBlob(s,"image/png")});if(i)return{data:new Uint8Array(await i.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),be=Te;let D_=0;function Q$(){return D_>0}function yY(){D_++,setTimeout(()=>{D_--})}function bs(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(gm(e))return e}catch{return e}const r=function(...o){try{const i=o.map(s=>bs(s,t));return e.apply(this,i)}catch(i){throw yY(),Hn(s=>{s.addEventProcessor(l=>(t.mechanism&&(Em(l,void 0),Yr(l,t.mechanism)),l.extra={...l.extra,arguments:o},l)),lt(i)}),i}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}t4(r,e),en(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Ud(){const e=ni(),{referrer:t}=be.document||{},{userAgent:n}=be.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const bY=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],EY={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function $Y(e){return EY[e]||e.replace("Integration","").toLowerCase()}const e6=be;async function t6(e,t){const n=bY.includes(e)?$Y(e):void 0,r=e6.Sentry=e6.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const i=SY(n),s=be.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);const l=new Promise((u,p)=>{s.addEventListener("load",()=>u()),s.addEventListener("error",p)}),c=be.document.currentScript,d=be.document.body||be.document.head||c?.parentElement;if(d)d.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await l}catch{throw new Error(`Error when loading integration: ${e}`)}const f=r[e];if(typeof f!="function")throw new Error(`Could not load integration: ${e}`);return f}function SY(e){const n=_e()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Vr}/${e}.min.js`,n).toString()}const vY=N$({lazyLoadIntegration:t6}),n6=N$({getModalIntegration:()=>dY,getScreenshotIntegration:()=>gY});function Vd(e,t){const n=F_(e,t),r={type:NY(t),value:IY(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function TY(e,t,n,r){const i=_e()?.getOptions().normalizeDepth,s=OY(t),l={__serialized__:J4(t,i)};if(s)return{exception:{values:[Vd(e,s)]},extra:l};const c={exception:{values:[{type:qc(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:CY(t,{isUnhandledRejection:r})}]},extra:l};if(n){const d=F_(e,n);d.length&&(c.exception.values[0].stacktrace={frames:d})}return c}function L_(e,t){return{exception:{values:[Vd(e,t)]}}}function F_(e,t){const n=t.stacktrace||t.stack||"",r=kY(t),o=AY(t);try{return e(n,r,o)}catch{}return[]}const wY=/Minified React error #\d+;/i;function kY(e){return e&&wY.test(e.message)?1:0}function AY(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function r6(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function NY(e){const t=e?.name;return!t&&r6(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function IY(e){const t=e?.message;return r6(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?J9(t.error):J9(e):"No error message"}function o6(e,t,n,r){const o=n?.syntheticException||void 0,i=jd(e,t,o,r);return Yr(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),il(i)}function i6(e,t,n="info",r,o){const i=r?.syntheticException||void 0,s=B_(e,t,i,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),il(s)}function jd(e,t,n,r,o){let i;if(Z3(t)&&t.error)return L_(e,t.error);if(Q3(t)||jB(t)){const s=t;if("stack"in t)i=L_(e,t);else{const l=s.name||(Q3(s)?"DOMError":"DOMException"),c=s.message?`${l}: ${s.message}`:l;i=B_(e,c,n,r),Em(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return qr(t)?L_(e,t):An(t)||qc(t)?(i=TY(e,t,n,o),Yr(i,{synthetic:!0}),i):(i=B_(e,t,n,r),Em(i,`${t}`),Yr(i,{synthetic:!0}),i)}function B_(e,t,n,r){const o={};if(r&&n){const i=F_(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),Yr(o,{synthetic:!0})}if(zc(t)){const{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function CY(e,{isUnhandledRejection:t}){const n=YB(e),r=t?"promise rejection":"exception";return Z3(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:qc(e)?`Event \`${xY(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function xY(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function OY(e){return Object.values(e).find(t=>t instanceof Error)}class s6 extends Vj{constructor(t){const n=RY(t),r=be.SENTRY_SDK_SOURCE||BW();oE(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:o,sendClientReports:i,enableLogs:s,_experiments:l,enableMetrics:c}=this._options,d=c??l?.enableMetrics??!0;be.document&&(i||s||d)&&be.document.addEventListener("visibilitychange",()=>{be.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),s&&ad(this),d&&qm(this))}),o&&this.on("beforeSendSession",iz)}eventFromException(t,n){return o6(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return i6(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}}function RY(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:be.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const cr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,De=Te,PY=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",El=(e,t,n,r)=>{let o,i;return s=>{t.value>=0&&(s||r)&&(i=t.value-(o??0),(i||o===void 0)&&(o=t.value,t.delta=i,t.rating=PY(t.value,n),e(t)))}},$l=(e=!0)=>{const t=De.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Es=()=>$l()?.activationStart??0;function xo(e,t,n){De.document&&De.addEventListener(e,t,n)}function zd(e,t,n){De.document&&De.removeEventListener(e,t,n)}let $s=-1;const a6=new Set,MY=()=>De.document?.visibilityState==="hidden"&&!De.document?.prerendering?0:1/0,qd=e=>{if(DY(e)&&$s>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of a6)t();isFinite($s)||($s=e.type==="visibilitychange"?e.timeStamp:0,zd("prerenderingchange",qd,!0))}},Sl=()=>{if(De.document&&$s<0){const e=Es();$s=(De.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??MY(),xo("visibilitychange",qd,!0),xo("pagehide",qd,!0),xo("prerenderingchange",qd,!0)}return{get firstHiddenTime(){return $s},onHidden(e){a6.add(e)}}};function DY(e){return e.type==="pagehide"||De.document?.visibilityState==="hidden"}const LY=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,vl=(e,t=-1)=>{const n=$l();let r="navigate";return n&&(De.document?.prerendering||Es()>0?r="prerender":De.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:LY(),navigationType:r}},U_=new WeakMap;function V_(e,t){try{return U_.get(e)||U_.set(e,new t),U_.get(e)}catch{return new t}}class Hd{constructor(){Hd.prototype.__init.call(this),Hd.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const Ss=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},j_=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Wd=e=>{De.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},FY=[1800,3e3],BY=(e,t={})=>{Wd(()=>{const n=Sl(),r=vl("FCP");let o;const s=Ss("paint",l=>{for(const c of l)c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Es(),0),r.entries.push(c),o(!0)))});s&&(o=El(e,r,FY,t.reportAllChanges))})},UY=[.1,.25],VY=(e,t={})=>{BY(j_(()=>{const n=vl("CLS",0);let r;const o=Sl(),i=V_(t,Hd),s=c=>{for(const d of c)i._processEntry(d);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},l=Ss("layout-shift",s);l&&(r=El(e,n,UY,t.reportAllChanges),o.onHidden(()=>{s(l.takeRecords()),r(!0)}),De?.setTimeout?.(r))}))};let l6=0,z_=1/0,Gd=0;const jY=e=>{e.forEach(t=>{t.interactionId&&(z_=Math.min(z_,t.interactionId),Gd=Math.max(Gd,t.interactionId),l6=Gd?(Gd-z_)/7+1:0)})};let q_;const c6=()=>q_?l6:performance.interactionCount||0,zY=()=>{"interactionCount"in performance||q_||(q_=Ss("event",jY,{type:"event",buffered:!0,durationThreshold:0}))},H_=10;let d6=0;const qY=()=>c6()-d6;class Yd{constructor(){Yd.prototype.__init.call(this),Yd.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){d6=c6(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(qY()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<H_||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,i)=>i._latency-o._latency),this._longestInteractionList.length>H_){const o=this._longestInteractionList.splice(H_);for(const i of o)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}}const u6=e=>{const t=De.requestIdleCallback||De.setTimeout;De.document?.visibilityState==="hidden"?e():(e=j_(e),xo("visibilitychange",e,{once:!0,capture:!0}),xo("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),zd("visibilitychange",e,{capture:!0}),zd("pagehide",e,{capture:!0})}))},HY=[200,500],WY=40,GY=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Sl();Wd(()=>{zY();const r=vl("INP");let o;const i=V_(t,Yd),s=c=>{u6(()=>{for(const f of c)i._processEntry(f);const d=i._estimateP98LongestInteraction();d&&d._latency!==r.value&&(r.value=d._latency,r.entries=d.entries,o())})},l=Ss("event",s,{durationThreshold:t.durationThreshold??WY});o=El(e,r,HY,t.reportAllChanges),l&&(l.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(l.takeRecords()),o(!0)}))})};class YY{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const KY=[2500,4e3],XY=(e,t={})=>{Wd(()=>{const n=Sl(),r=vl("LCP");let o;const i=V_(t,YY),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(const d of c)i._processEntry(d),d.startTime<n.firstHiddenTime&&(r.value=Math.max(d.startTime-Es(),0),r.entries=[d],o())},l=Ss("largest-contentful-paint",s);if(l){o=El(e,r,KY,t.reportAllChanges);const c=j_(()=>{s(l.takeRecords()),l.disconnect(),o(!0)}),d=f=>{f.isTrusted&&(u6(c),zd(f.type,d,{capture:!0}))};for(const f of["keydown","click","visibilitychange"])xo(f,d,{capture:!0})}})},JY=[800,1800],W_=e=>{De.document?.prerendering?Wd(()=>W_(e)):De.document?.readyState!=="complete"?addEventListener("load",()=>W_(e),!0):setTimeout(e)},ZY=(e,t={})=>{const n=vl("TTFB"),r=El(e,n,JY,t.reportAllChanges);W_(()=>{const o=$l();o&&(n.value=Math.max(o.responseStart-Es(),0),n.entries=[o],r(!0))})},Tl={},Kd={};let f6,p6,m6,_6;function Xd(e,t=!1){return Zd("cls",e,eK,f6,t)}function Jd(e,t=!1){return Zd("lcp",e,tK,p6,t)}function QY(e){return Zd("ttfb",e,nK,m6)}function G_(e){return Zd("inp",e,rK,_6)}function $i(e,t){return h6(e,t),Kd[e]||(oK(e),Kd[e]=!0),g6(e,t)}function wl(e,t){const n=Tl[e];if(n?.length)for(const r of n)try{r(t)}catch(o){cr&&P.error(`Error while triggering instrumentation handler.
|
|
517
517
|
Type: ${e}
|
|
518
518
|
Name: ${zr(r)}
|
|
519
|
-
Error:`,o)}}function eK(){return VY(e=>{wl("cls",{metric:e}),f6=e},{reportAllChanges:!0})}function tK(){return XY(e=>{wl("lcp",{metric:e}),p6=e},{reportAllChanges:!0})}function nK(){return ZY(e=>{wl("ttfb",{metric:e}),m6=e})}function rK(){return GY(e=>{wl("inp",{metric:e}),_6=e})}function Zd(e,t,n,r,o=!1){h6(e,t);let i;return Kd[e]||(i=n(),Kd[e]=!0),r&&t({metric:r}),g6(e,t,o?i:void 0)}function oK(e){const t={};e==="event"&&(t.durationThreshold=0),Ss(e,n=>{wl(e,{entries:n})},t)}function h6(e,t){Tl[e]=Tl[e]||[],Tl[e].push(t)}function g6(e,t,n){return()=>{n&&n();const r=Tl[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function iK(e){return"duration"in e}const sK=e=>{const t=n=>{(n.type==="pagehide"||De.document?.visibilityState==="hidden")&&e(n)};xo("visibilitychange",t,{capture:!0,once:!0}),xo("pagehide",t,{capture:!0,once:!0})};function Y0(e){return typeof e=="number"&&isFinite(e)}function Oo(e,t,n,{...r}){const o=Me(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),nl(e,()=>{const i=Tr({startTime:t,...r});return i&&i.end(n),i})}function K0(e){const t=_e();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:i}=e,{release:s,environment:l,sendDefaultPii:c}=t.getOptions(),f=t.getIntegrationByName("Replay")?.getReplayId(),u=Re(),p=u.getUser(),m=p!==void 0?p.email||p.id||p.ip_address:void 0;let _;try{_=u.getScopeData().contexts.profile.profile_id}catch{}const b={release:s,environment:l,user:m||void 0,profile_id:_||void 0,replay_id:f||void 0,transaction:r,"user_agent.original":De.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o};return Tr({name:n,attributes:b,startTime:i,experimental:{standalone:!0}})}function vs(){return De.addEventListener&&De.performance}function $t(e){return e/1e3}function aK(e){let t="unknown",n="unknown",r="";for(const o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function Qd(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function eu(e,t){let n,r=!1;function o(l){!r&&n&&t(l,n.spanContext().spanId,n),r=!0}sK(()=>{o("pagehide")});const i=e.on("beforeStartNavigationSpan",(l,c)=>{c?.isRedirect||(o("navigation"),i(),s())}),s=e.on("afterStartPageLoadSpan",l=>{n=l,s()})}function lK(e){let t=0,n;if(!Qd("layout-shift"))return;const r=Xd(({metric:o})=>{const i=o.entries[o.entries.length-1];i&&(t=o.value,n=i)},!0);eu(e,(o,i)=>{cK(t,n,i,o),r()})}function cK(e,t,n,r){cr&&P.log(`Sending CLS span (${e})`);const o=t?$t((Ft()||0)+t.startTime):ut(),i=Re().getScopeData().transactionName,s=t?Vt(t.sources[0]?.node):"Layout shift",l={[We]:"auto.http.browser.cls",[tt]:"ui.webvital.cls",[To]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((d,f)=>{l[`cls.source.${f+1}`]=Vt(d.node)});const c=K0({name:s,transaction:i,attributes:l,startTime:o});c&&(c.addEvent("cls",{[Ga]:"",[Ya]:e}),c.end(o))}const dK=6e4;function kl(e){return e!=null&&e>0&&e<=dK}function uK(e){let t=0,n;if(!Qd("largest-contentful-paint"))return;const r=Jd(({metric:o})=>{const i=o.entries[o.entries.length-1];!i||!kl(o.value)||(t=o.value,n=i)},!0);eu(e,(o,i)=>{fK(t,n,i,o),r()})}function fK(e,t,n,r){if(!kl(e))return;cr&&P.log(`Sending LCP span (${e})`);const o=$t((Ft()||0)+(t?.startTime||0)),i=Re().getScopeData().transactionName,s=t?Vt(t.element):"Largest contentful paint",l={[We]:"auto.http.browser.lcp",[tt]:"ui.webvital.lcp",[To]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(l["lcp.element"]=Vt(t.element)),t.id&&(l["lcp.id"]=t.id),t.url&&(l["lcp.url"]=t.url),t.loadTime!=null&&(l["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(l["lcp.renderTime"]=t.renderTime),t.size!=null&&(l["lcp.size"]=t.size));const c=K0({name:s,transaction:i,attributes:l,startTime:o});c&&(c.addEvent("lcp",{[Ga]:"millisecond",[Ya]:e}),c.end(o))}function Xn(e){return e&&((Ft()||performance.timeOrigin)+e)/1e3}function y6(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=aK(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Ft()||vs()?.timeOrigin?pK({...t,"http.request.redirect_start":Xn(e.redirectStart),"http.request.redirect_end":Xn(e.redirectEnd),"http.request.worker_start":Xn(e.workerStart),"http.request.fetch_start":Xn(e.fetchStart),"http.request.domain_lookup_start":Xn(e.domainLookupStart),"http.request.domain_lookup_end":Xn(e.domainLookupEnd),"http.request.connect_start":Xn(e.connectStart),"http.request.secure_connection_start":Xn(e.secureConnectionStart),"http.request.connection_end":Xn(e.connectEnd),"http.request.request_start":Xn(e.requestStart),"http.request.response_start":Xn(e.responseStart),"http.request.response_end":Xn(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function pK(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const mK=2147483647;let b6=0,hn={},Nn,tu;function _K({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=vs();if(r&&Ft()){r.mark&&De.performance.mark("sentry-tracing-init");const o=t?uK(n):t===!1?EK():void 0,i=e?lK(n):e===!1?bK():void 0,s=$K();return()=>{s(),o?.(),i?.()}}return()=>{}}function hK(){$i("longtask",({entries:e})=>{const t=wt();if(!t)return;const{op:n,start_timestamp:r}=Me(t);for(const o of e){const i=$t(Ft()+o.startTime),s=$t(o.duration);n==="navigation"&&r&&i<r||Oo(t,i,i+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[We]:"auto.ui.browser.metrics"}})}})}function gK(){new PerformanceObserver(t=>{const n=wt();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const o=$t(Ft()+r.startTime),{start_timestamp:i,op:s}=Me(n);if(s==="navigation"&&i&&o<i)continue;const l=$t(r.duration),c={[We]:"auto.ui.browser.metrics"},d=r.scripts[0],{invoker:f,invokerType:u,sourceURL:p,sourceFunctionName:m,sourceCharPosition:_}=d;c["browser.script.invoker"]=f,c["browser.script.invoker_type"]=u,p&&(c["code.filepath"]=p),m&&(c["code.function"]=m),_!==-1&&(c["browser.script.source_char_position"]=_),Oo(n,o,o+l,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function yK(){$i("event",({entries:e})=>{const t=wt();if(t){for(const n of e)if(n.name==="click"){const r=$t(Ft()+n.startTime),o=$t(n.duration),i={name:Vt(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[We]:"auto.ui.browser.metrics"}},s=hm(n.target);s&&(i.attributes["ui.component_name"]=s),Oo(t,r,r+o,i)}}})}function bK(){return Xd(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(hn.cls={value:e.value,unit:""},tu=t)},!0)}function EK(){return Jd(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!kl(e.value)||(hn.lcp={value:e.value,unit:"millisecond"},Nn=t)},!0)}function $K(){return QY(({metric:e})=>{e.entries[e.entries.length-1]&&(hn.ttfb={value:e.value,unit:"millisecond"})})}function SK(e,t){const n=vs(),r=Ft();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:o,ignorePerformanceApiSpans:i,ignoreResourceSpans:s,recordClsOnPageloadSpan:l,recordLcpOnPageloadSpan:c}=t,d=$t(r),f=n.getEntries(),{op:u,start_timestamp:p}=Me(e);if(f.slice(b6).forEach(m=>{const _=$t(m.startTime),b=$t(Math.max(0,m.duration));if(!(u==="navigation"&&p&&d+_<p))switch(m.entryType){case"navigation":{kK(e,m,d);break}case"mark":case"paint":case"measure":{TK(e,m,_,b,d,i);const g=Sl(),h=m.startTime<g.firstHiddenTime;m.name==="first-paint"&&h&&(hn.fp={value:m.startTime,unit:"millisecond"}),m.name==="first-contentful-paint"&&h&&(hn.fcp={value:m.startTime,unit:"millisecond"});break}case"resource":{IK(e,m,m.name,_,b,d,s);break}}}),b6=Math.max(f.length-1,0),CK(e,o),u==="pageload"){if(RK(hn),o){const m=(_,b,g)=>{const h=g??`browser.web_vital.${_}.value`;e.setAttribute(h,b),cr&&P.log("Setting web vital attribute",{[h]:b},"on pageload span")};["ttfb","fp","fcp"].forEach(_=>{hn[_]&&m(_,hn[_].value)}),hn["ttfb.requestTime"]&&m("ttfb.requestTime",hn["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else l||delete hn.cls,c||delete hn.lcp,Object.entries(hn).forEach(([m,_])=>{t9(m,_.value,_.unit)}),xK(e,t);e.setAttribute(o?"browser.performance.time_origin":"performance.timeOrigin",d),e.setAttribute(o?"browser.performance.navigation.activation_start":"performance.activationStart",Es())}Nn=void 0,tu=void 0,hn={}}function vK(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function TK(e,t,n,r,o,i){if(vK(t)||["mark","measure"].includes(t.entryType)&&or(t.name,i))return;const s=$l(!1),l=$t(s?s.requestStart:0),c=o+Math.max(n,l),d=o+n,f=d+r,u={[We]:"auto.resource.browser.metrics"};c!==d&&(u["sentry.browser.measure_happened_before_request"]=!0,u["sentry.browser.measure_start_time"]=c),wK(u,t),c<=f&&Oo(e,c,f,{name:t.name,op:t.entryType,attributes:u})}function wK(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&Hr(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(Hr(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function kK(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{nu(e,t,r,n)}),nu(e,t,"secureConnection",n,"TLS/SSL"),nu(e,t,"fetch",n,"cache"),nu(e,t,"domainLookup",n,"DNS"),NK(e,t,n)}function nu(e,t,n,r,o=n){const i=AK(n),s=t[i],l=t[`${n}Start`];!l||!s||Oo(e,r+$t(l),r+$t(s),{op:`browser.${o}`,name:t.name,attributes:{[We]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function AK(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function NK(e,t,n){const r=n+$t(t.requestStart),o=n+$t(t.responseEnd),i=n+$t(t.responseStart);t.responseEnd&&(Oo(e,r,o,{op:"browser.request",name:t.name,attributes:{[We]:"auto.ui.browser.metrics"}}),Oo(e,i,o,{op:"browser.response",name:t.name,attributes:{[We]:"auto.ui.browser.metrics"}}))}function IK(e,t,n,r,o,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const l=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(l))return;const c={[We]:"auto.resource.browser.metrics"},d=di(n);d.protocol&&(c["url.scheme"]=d.protocol.split(":").pop()),d.host&&(c["server.address"]=d.host),c["url.same_origin"]=n.includes(De.location.origin),OK(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const f={...c,...y6(t)},u=i+r,p=u+o;Oo(e,u,p,{name:n.replace(De.location.origin,""),op:l,attributes:f})}function CK(e,t){const n=De.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?"network.connection.type":"connectionType",r.type),Y0(r.rtt)&&(hn["connection.rtt"]={value:r.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",r.rtt))),Y0(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),Y0(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function xK(e,t){Nn&&t.recordLcpOnPageloadSpan&&(Nn.element&&e.setAttribute("lcp.element",Vt(Nn.element)),Nn.id&&e.setAttribute("lcp.id",Nn.id),Nn.url&&e.setAttribute("lcp.url",Nn.url.trim().slice(0,200)),Nn.loadTime!=null&&e.setAttribute("lcp.loadTime",Nn.loadTime),Nn.renderTime!=null&&e.setAttribute("lcp.renderTime",Nn.renderTime),e.setAttribute("lcp.size",Nn.size)),tu?.sources&&t.recordClsOnPageloadSpan&&tu.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Vt(n.node)))}function OK(e,t,n){n.forEach(([r,o])=>{const i=e[r];i!=null&&(typeof i=="number"&&i<mK||typeof i=="string")&&(t[o]=i)})}function RK(e){const t=$l(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const PK="ElementTiming",MK=(()=>({name:PK,setup(){!vs()||!Ft()||$i("element",({entries:t})=>{for(const n of t){const r=n;if(!r.identifier)continue;const o=r.identifier,i=r.name,s=r.renderTime,l=r.loadTime,c={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":o};i&&(c["ui.element.paint_type"]=i),r.id&&(c["ui.element.id"]=r.id),r.element&&(c["ui.element.type"]=r.element.tagName.toLowerCase()),r.url&&(c["ui.element.url"]=r.url),r.naturalWidth&&(c["ui.element.width"]=r.naturalWidth),r.naturalHeight&&(c["ui.element.height"]=r.naturalHeight),s>0&&o0("ui.element.render_time",s,{unit:"millisecond",attributes:c}),l>0&&o0("ui.element.load_time",l,{unit:"millisecond",attributes:c})}})}})),X0=[],Al=new Map,Ts=new Map,E6=60;function DK(){if(vs()&&Ft()){const t=LK();return()=>{t()}}return()=>{}}const Nl={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function LK(){return G0(FK)}const FK=({metric:e})=>{if(e.value==null)return;const t=$t(e.value);if(t>E6)return;const n=e.entries.find(_=>_.duration===e.value&&Nl[_.name]);if(!n)return;const{interactionId:r}=n,o=Nl[n.name],i=$t(Ft()+n.startTime),s=wt(),l=s?Tt(s):void 0,c=r!=null?Al.get(r):void 0,d=c?.span||l,f=d?Me(d).description:Re().getScopeData().transactionName,u=c?.elementName||Vt(n.target),p={[We]:"auto.http.browser.inp",[tt]:`ui.interaction.${o}`,[To]:n.duration},m=K0({name:u,transaction:f,attributes:p,startTime:i});m&&(m.addEvent("inp",{[Ga]:"millisecond",[Ya]:e.value}),m.end(i+t))};function BK(e){return e!=null?Al.get(e):void 0}function UK(){const e=Object.keys(Nl);_l()&&e.forEach(o=>{De.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){const i=o.target;if(!i)return;const s=Vt(i),l=Math.round(o.timeStamp);if(Ts.set(l,s),Ts.size>50){const c=Ts.keys().next().value;c!==void 0&&Ts.delete(c)}}function n(o){const i=Math.round(o.startTime);let s=Ts.get(i);if(!s)for(let l=-5;l<=5;l++){const c=Ts.get(i+l);if(c){s=c;break}}return s||"<unknown>"}const r=({entries:o})=>{const i=wt(),s=i&&Tt(i);o.forEach(l=>{if(!iK(l))return;const c=l.interactionId;if(c==null||Al.has(c))return;const d=l.target?Vt(l.target):n(l);if(X0.length>10){const f=X0.shift();Al.delete(f)}X0.push(c),Al.set(c,{span:s,elementName:d})})};$i("event",r),$i("first-input",r)}function J0(e){const{name:t,op:n,origin:r,metricName:o,value:i,attributes:s,parentSpan:l,reportEvent:c,startTime:d,endTime:f}=e,u=Re().getScopeData().transactionName,p={[We]:r,[tt]:n,[To]:0,[`browser.web_vital.${o}.value`]:i,"sentry.transaction":u,"user_agent.original":De.navigator?.userAgent,...s};l&&Kc(l).attributes?.[tt]==="pageload"&&(p["sentry.pageload.span_id"]=l.spanContext().spanId),c&&(p[`browser.web_vital.${o}.report_event`]=c);const m=Tr({name:t,attributes:p,startTime:d,parentSpan:l});m&&m.end(f??d)}function VK(e){let t=0,n;if(!Qd("largest-contentful-paint"))return;const r=Jd(({metric:o})=>{const i=o.entries[o.entries.length-1];!i||!kl(o.value)||(t=o.value,n=i)},!0);eu(e,(o,i,s)=>{jK(t,n,s,o),r()})}function jK(e,t,n,r){if(!kl(e))return;cr&&P.log(`Sending LCP span (${e})`);const o=Ft()||0,i=$t(o),s=$t(o+(t?.startTime||0)),l=t?Vt(t.element):"Largest contentful paint",c={};t?.element&&(c["browser.web_vital.lcp.element"]=Vt(t.element)),t?.id&&(c["browser.web_vital.lcp.id"]=t.id),t?.url&&(c["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(c["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(c["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(c["browser.web_vital.lcp.size"]=t.size),J0({name:l,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:i,endTime:s})}function zK(e){let t=0,n;if(!Qd("layout-shift"))return;const r=Xd(({metric:o})=>{const i=o.entries[o.entries.length-1];i&&(t=o.value,n=i)},!0);eu(e,(o,i,s)=>{qK(t,n,s,o),r()})}function qK(e,t,n,r){cr&&P.log(`Sending CLS span (${e})`);const o=t?$t((Ft()||0)+t.startTime):ut(),i=t?Vt(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((l,c)=>{s[`browser.web_vital.cls.source.${c+1}`]=Vt(l.node)}),J0({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:s,parentSpan:n,reportEvent:r,startTime:o})}function HK(){if(!vs()||!Ft())return;G0(({metric:n})=>{if(n.value==null||$t(n.value)>E6)return;const o=n.entries.find(i=>i.duration===n.value&&Nl[i.name]);o&&WK(n.value,o)})}function WK(e,t){cr&&P.log(`Sending INP span (${e})`);const n=$t(Ft()+t.startTime),r=$t(e),o=Nl[t.name],i=BK(t.interactionId),s=wt(),l=s?Tt(s):void 0,c=i?.span||l,d=c?Kc(c).name:Re().getScopeData().transactionName,f=i?.elementName||Vt(t.target);J0({name:f,op:`ui.interaction.${o}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[To]:t.duration,"sentry.transaction":d},startTime:n,endTime:n+r,parentSpan:c})}const GK=1e3;let $6,Z0,Q0;function S6(e){$o("dom",e),So("dom",YK)}function YK(){if(!De.document)return;const e=qn.bind(null,"dom"),t=v6(e,!0);De.document.addEventListener("click",t,!1),De.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const o=De[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Qt(o,"addEventListener",function(i){return function(s,l,c){if(s==="click"||s=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[s]=d[s]||{refCount:0};if(!f.handler){const u=v6(e);f.handler=u,i.call(this,s,u,c)}f.refCount++}catch{}return i.call(this,s,l,c)}}),Qt(o,"removeEventListener",function(i){return function(s,l,c){if(s==="click"||s=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[s];f&&(f.refCount--,f.refCount<=0&&(i.call(this,s,f.handler,c),f.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,l,c)}}))})}function KK(e){if(e.type!==Z0)return!1;try{if(!e.target||e.target._sentryId!==Q0)return!1}catch{}return!0}function XK(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function v6(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=JK(n);if(XK(n.type,r))return;en(n,"_sentryCaptured",!0),r&&!r._sentryId&&en(r,"_sentryId",jt());const o=n.type==="keypress"?"input":n.type;KK(n)||(e({event:n,name:o,global:t}),Z0=n.type,Q0=r?r._sentryId:void 0),clearTimeout($6),$6=De.setTimeout(()=>{Q0=void 0,Z0=void 0},GK)}}function JK(e){try{return e.target}catch{return null}}let ru;function ou(e){const t="history";$o(t,e),So(t,ZK)}function ZK(){if(De.addEventListener("popstate",()=>{const t=De.location.href,n=ru;if(ru=t,n===t)return;qn("history",{from:n,to:t})}),!GW())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=ru,i=QK(String(r));if(ru=i,o===i)return t.apply(this,n);qn("history",{from:o,to:i})}return t.apply(this,n)}}Qt(De.history,"pushState",e),Qt(De.history,"replaceState",e)}function QK(e){try{return new URL(e,De.location.origin).toString()}catch{return e}}const iu={};function e_(e){const t=iu[e];if(t)return t;let n=De[e];if(E0(n))return iu[e]=n.bind(De);const r=De.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const i=o.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(o)}catch(o){cr&&P.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(iu[e]=n.bind(De))}function eX(e){iu[e]=void 0}function Il(...e){return e_("setTimeout")(...e)}const ro="__sentry_xhr_v3__";function t_(e){$o("xhr",e),So("xhr",tX)}function tX(){if(!De.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const o=new Error,i=ut()*1e3,s=rr(r[0])?r[0].toUpperCase():void 0,l=nX(r[1]);if(!s||!l)return t.apply(n,r);n[ro]={method:s,url:l,request_headers:{}},s==="POST"&&l.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const d=n[ro];if(d&&n.readyState===4){try{d.status_code=n.status}catch{}const f={endTimestamp:ut()*1e3,startTimestamp:i,xhr:n,virtualError:o};qn("xhr",f)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(d,f,u){return c(),d.apply(f,u)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(d,f,u){const[p,m]=u,_=f[ro];return _&&rr(p)&&rr(m)&&(_.request_headers[p.toLowerCase()]=m),d.apply(f,u)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[ro];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const i={startTimestamp:ut()*1e3,xhr:n};return qn("xhr",i),t.apply(n,r)}})}function nX(e){if(rr(e))return e;try{return e.toString()}catch{}}const rX=Symbol.for("sentry__originalRequestBody");function T6(e){return new URLSearchParams(e).toString()}function su(e,t=P){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[T6(e)];if(!e)return[void 0]}catch(n){return cr&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return cr&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function n_(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][rX];return n!==void 0?n:void 0}}function w6(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return cr&&P.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
520
|
-
`).reduce((n,r)=>{const[o,i]=r.split(": ");return i&&(n[o.toLowerCase()]=i),n},{}):{}}const oX=40;function r_(e,t=e_("fetch")){let n=0,r=0;async function o(i){const s=i.body.length;n+=s,r++;const l={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,l);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw eX("fetch"),c}finally{n-=s,r--}}return F9(e,o,Gm(e.bufferSize||oX))}const de=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function iX(){const e=_e();if(!e){de&&P.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){de&&P.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function sX(){const e=_e();if(!e){de&&P.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){de&&P.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}const aX={startProfiler:iX,stopProfiler:sX},lX=10,cX=20,dX=30,uX=40,fX=50;function ws(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?br:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const pX=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,mX=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_X=/\((\S*)(?::(\d+))(?::(\d+))\)/,hX=/at (.+?) ?\(data:(.+?),/,k6=[dX,e=>{const t=e.match(hX);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=pX.exec(e);if(n){const[,o,i,s]=n;return ws(o,br,+i,+s)}const r=mX.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const l=_X.exec(r[2]);l&&(r[2]=l[1],r[3]=l[2],r[4]=l[3])}const[i,s]=C6(r[1]||br,r[2]);return ws(s,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],gX=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yX=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,A6=[fX,e=>{const t=gX.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=yX.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||br;return[o,r]=C6(o,r),ws(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],bX=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,EX=[uX,e=>{const t=bX.exec(e);return t?ws(t[2],t[1]||br,+t[3],t[4]?+t[4]:void 0):void 0}],$X=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,SX=[lX,e=>{const t=$X.exec(e);return t?ws(t[2],t[3]||br,+t[1]):void 0}],vX=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,TX=[cX,e=>{const t=vX.exec(e);return t?ws(t[5],t[3]||t[4]||br,+t[1],+t[2]):void 0}],N6=[k6,A6],I6=W3(...N6),C6=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:br,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function wX(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Sr(r)}},i=kX(e);return Gn(o,[i])}function kX(e){return[{type:"user_report"},e]}const au=1024,AX="Breadcrumbs",x6=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:AX,setup(n){t.console&&n0(CX(n)),t.dom&&S6(IX(n,t.dom)),t.xhr&&t_(xX(n)),t.fetch&&$0(OX(n)),t.history&&ou(RX(n)),t.sentry&&n.on("beforeSendEvent",NX(n))}}});function NX(e){return function(n){_e()===e&&sr({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ri(n)},{event:n})}}function IX(e,t){return function(r){if(_e()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,l=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;l&&l>au&&(de&&P.warn(`\`dom.maxStringLength\` cannot exceed ${au}, but a value of ${l} was configured. Sentry will use ${au} instead.`),l=au),typeof s=="string"&&(s=[s]);try{const d=r.event,f=PX(d)?d.target:d;o=Vt(f,{keyAttrs:s,maxStringLength:l}),i=hm(f)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};i&&(c.data={"ui.component_name":i}),sr(c,{event:r.event,name:r.name,global:r.global})}}function CX(e){return function(n){if(_e()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:fd(n.level),message:Hc(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Hc(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;sr(r,{input:n.args,level:n.level})}}function xX(e){return function(n){if(_e()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,i=n.xhr[ro];if(!r||!o||!i)return;const{method:s,url:l,status_code:c,body:d}=i,f={method:s,url:l,status_code:c},u={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:o},p={category:"xhr",data:f,type:"http",level:u$(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,u),sr(p,u)}}function OX(e){return function(n){if(_e()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},s={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,i),sr(s,i)}else{const i=n.response,s={...n.fetchData,status_code:i?.status},l={input:n.args,response:i,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:s,type:"http",level:u$(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,l),sr(c,l)}}}function RX(e){return function(n){if(_e()!==e)return;let r=n.from,o=n.to;const i=di(be.location.href);let s=r?di(r):void 0;const l=di(o);s?.path||(s=i),i.protocol===l.protocol&&i.host===l.host&&(o=l.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),sr({category:"navigation",data:{from:r,to:o}})}}function PX(e){return!!e&&!!e.target}const MX="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),DX="BrowserApiErrors",O6=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:DX,setupOnce(){t.setTimeout&&Qt(be,"setTimeout",R6),t.setInterval&&Qt(be,"setInterval",R6),t.requestAnimationFrame&&Qt(be,"requestAnimationFrame",LX),t.XMLHttpRequest&&"XMLHttpRequest"in be&&Qt(XMLHttpRequest.prototype,"send",FX);const n=t.eventTarget;n&&(Array.isArray(n)?n:MX).forEach(o=>BX(o,t))}}});function R6(e){return function(...t){const n=t[0];return t[0]=bs(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${zr(e)}`}}),e.apply(this,t)}}function LX(e){return function(t){return e.apply(this,[bs(t,{mechanism:{data:{handler:zr(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function FX(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Qt(n,o,function(i){const s={mechanism:{data:{handler:zr(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},l=gm(i);return l&&(s.mechanism.data.handler=zr(l)),bs(i,s)})}),e.apply(this,t)}}function BX(e,t){const r=be[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Qt(r,"addEventListener",function(o){return function(i,s,l){try{UX(s)&&(s.handleEvent=bs(s.handleEvent,{mechanism:{data:{handler:zr(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&VX(this,i,s),o.apply(this,[i,bs(s,{mechanism:{data:{handler:zr(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),l])}}),Qt(r,"removeEventListener",function(o){return function(i,s,l){try{const c=s.__sentry_wrapped__;c&&o.call(this,i,c,l)}catch{}return o.call(this,i,s,l)}}))}function UX(e){return typeof e.handleEvent=="function"}function VX(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const P6=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof be.document>"u"){de&&P.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Fm({ignoreDuration:!0}),id();const n=vt();let r=n.getUser();n.addScopeListener(o=>{const i=o.getUser();(r?.id!==i?.id||r?.ip_address!==i?.ip_address)&&(id(),r=i)}),t==="route"&&ou(({from:o,to:i})=>{o!==i&&(Fm({ignoreDuration:!0}),id())})}}},jX="CultureContext",M6=(()=>({name:jX,preprocessEvent(e){const t=D6();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=D6();t&&Yn(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}}));function D6(){try{const e=be.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const zX="GlobalHandlers",L6=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:zX,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(qX(n),U6("onerror")),t.onunhandledrejection&&(HX(n),U6("onunhandledrejection"))}}});function qX(e){K3(t=>{const{stackParser:n,attachStacktrace:r}=V6();if(_e()!==e||Q$())return;const{msg:o,url:i,line:s,column:l,error:c}=t,d=WX(jd(n,c||o,void 0,r,!1),i,s,l);d.level="error",rs(d,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function HX(e){X3(t=>{const{stackParser:n,attachStacktrace:r}=V6();if(_e()!==e||Q$())return;const o=F6(t),i=Hr(o)?B6(o):jd(n,o,void 0,r,!0);i.level="error",rs(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function F6(e){if(Hr(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function B6(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function WX(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},l=s.stacktrace=s.stacktrace||{},c=l.frames=l.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:GX(t)??ni(),function:br,in_app:!0}),e}function U6(e){de&&P.log(`Global Handler attached: ${e}`)}function V6(){return _e()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function GX(e){if(!(!rr(e)||e.length===0))return e.startsWith("data:")?`<${ko(e,!1)}>`:e}const j6=()=>({name:"HttpContext",preprocessEvent(e){if(!be.navigator&&!be.location&&!be.document)return;const t=Ud(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!be.navigator&&!be.location&&!be.document)return;const t=Ud();Yn(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}}),YX="cause",KX=5,XX="LinkedErrors",z6=((e={})=>{const t=e.limit||KX,n=e.key||YX;return{name:XX,preprocessEvent(r,o,i){const s=i.getOptions();Ez(Vd,s.stackParser,n,t,r,o)}}}),JX="SpotlightBrowser",ZX=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:JX,setup:()=>{de&&P.log("Using Sidecar URL",t)},processEvent:n=>tJ(n)?null:n,afterAllSetup:n=>{QX(n,t)}}});function QX(e,t){const n=e_("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){P.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:nd(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(i=>{i.status>=200&&i.status<400&&(r=0)},i=>{r++,P.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",i)})})}const eJ=ZX;function tJ(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}function nJ(){return rJ()?(de&&nr(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function rJ(){if(typeof be.window>"u")return!1;const e=be;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=ni();return!(be===be.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function o_(e){return[cE(),aE(),$q(),O6(),x6(),L6(),z6(),yE(),j6(),M6(),P6()]}function oJ(e={}){const t=!e.skipBrowserExtensionCheck&&nJ();let n=e.defaultIntegrations==null?o_():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:LB(e.stackParser||I6),integrations:Ej({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||r_};return Gj(s6,r)}function iJ(){}function sJ(e){e()}function aJ(e={}){const t=be.document,n=t?.head||t?.body;if(!n){de&&P.error("[showReportDialog] Global document not defined");return}const r=Re(),i=_e()?.getDsn();if(!i){de&&P.error("[showReportDialog] DSN not configured");return}const s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||$9()},l=be.document.createElement("script");l.async=!0,l.crossOrigin="anonymous",l.src=yj(i,s);const{onLoad:c,onClose:d}=s;if(c&&(l.onload=c),d){const f=u=>{if(u.data==="__sentry_reportdialog_closed__")try{d()}finally{be.removeEventListener("message",f)}};be.addEventListener("message",f)}n.appendChild(l)}const lJ=Te,cJ="ReportingObserver",q6=new WeakMap,dJ=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(q6.has(_e()))for(const o of r)Hn(i=>{i.setExtra("url",o.url);const s=`ReportingObserver [${o.type}]`;let l="No details available";if(o.body){const c={};for(const d in o.body)c[d]=o.body[d];if(i.setExtra("body",c),o.type==="crash"){const d=o.body;l=[d.crashId||"",d.reason||""].join(" ").trim()||l}else l=o.body.message||l}b9(`${s}: ${l}`)})}return{name:cJ,setupOnce(){if(!KW())return;new lJ.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){q6.set(r,!0)}}}),uJ="HttpClient",fJ=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:uJ,setup(n){EJ(n,t),$J(n,t)}}});function pJ(e,t,n,r,o){if(G6(e,n.status,n.url)){const i=SJ(t,r);let s,l,c,d;K6()&&([s,c]=H6("Cookie",i),[l,d]=H6("Set-Cookie",n));const f=Y6({url:i.url,method:i.method,status:n.status,requestHeaders:s,responseHeaders:l,requestCookies:c,responseCookies:d,error:o,type:"fetch"});rs(f)}}function H6(e,t){const n=hJ(t.headers);let r;try{const o=n[e]||n[e.toLowerCase()]||void 0;o&&(r=W6(o))}catch{}return[n,r]}function mJ(e,t,n,r,o){if(G6(e,t.status,t.responseURL)){let i,s,l;if(K6()){try{const d=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;d&&(s=W6(d))}catch{}try{l=gJ(t)}catch{}i=r}const c=Y6({url:t.responseURL,method:n,status:t.status,requestHeaders:i,responseHeaders:l,responseCookies:s,error:o,type:"xhr"});rs(c)}}function _J(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function W6(e){return e.split("; ").reduce((t,n)=>{const[r,o]=n.split("=");return r&&o&&(t[r]=o),t},{})}function hJ(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function gJ(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
521
|
-
`).reduce((n,r)=>{const[o,i]=r.split(": ");return o&&i&&(n[o]=i),n},{}):{}}function yJ(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function bJ(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function EJ(e,t){f$()&&$
|
|
522
|
-
`),"</html>"];return o.forEach(l=>{const c=l.stacktrace;c?.frames&&(c.frames=c.frames.map(d=>AJ(d,s,r,t)))}),e}function AJ(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||JB(t,e,r),e}const NJ="GraphQLClient",IJ=(e=>({name:NJ,setup(t){CJ(t,e),xJ(t,e)}}));function CJ(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const i=Me(n).data||{};if(!(i[tt]==="http.client"))return;const c=i[AU]||i["http.url"]||i.url,d=i[kU]||i["http.method"];if(!rr(c)||!rr(d))return;const{endpoints:f}=t,u=or(c,f),p=J6(r);if(u&&p){const m=Z6(p);if(m){const _=X6(m);n.updateName(`${d} ${c} (${_})`),cu(m)&&n.setAttribute("graphql.document",m.query),du(m)&&(n.setAttribute("graphql.persisted_query.hash.sha256",m.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",m.extensions.persistedQuery.version))}}})}function xJ(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:i,data:s}=n;if(i==="http"&&(o==="fetch"||o==="xhr")){const f=s?.url,{endpoints:u}=t,p=or(f,u),m=J6(r);if(p&&s&&m){const _=Z6(m);if(!s.graphql&&_){const b=X6(_);s["graphql.operation"]=b,cu(_)&&(s["graphql.document"]=_.query),du(_)&&(s["graphql.persisted_query.hash.sha256"]=_.extensions.persistedQuery.sha256Hash,s["graphql.persisted_query.version"]=_.extensions.persistedQuery.version)}}}})}function X6(e){if(du(e))return`persisted ${e.operationName}`;if(cu(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=OJ(t);return r?`${o} ${r}`:`${o}`}return"unknown"}function J6(e){const t="xhr"in e;let n;if(t){const r=e.xhr[ro];n=r&&su(r.body)[0]}else{const r=n_(e.input);n=su(r)[0]}return n}function OJ(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function lu(e){return typeof e=="object"&&e!==null}function cu(e){return lu(e)&&typeof e.query=="string"}function du(e){return lu(e)&&typeof e.operationName=="string"&&lu(e.extensions)&&lu(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function Z6(e){try{const t=JSON.parse(e);return cu(t)||du(t)?t:void 0}catch{return}}const RJ=IJ,PJ=(e={})=>{const t=["script"];function n(r,o,i=0){if(!r)return;const s="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const l of s){if(!(l instanceof HTMLElement))continue;const c=hm(l,1)||void 0,d=l.tagName.toLowerCase();if(t.includes(d))continue;const f=e.onElement?.({element:l,componentName:c,tagName:d,depth:i})||{};if(f==="skip")continue;if(f==="children"){n(l,o,i+1);continue}const{x:u,y:p,width:m,height:_}=l.getBoundingClientRect(),b={identifier:l.id||void 0,type:c||d,visible:!0,alpha:1,height:_,width:m,x:u,y:p,...f},g=[];b.children=g,n(l,b.children,i+1),o.push(b)}}return{name:"ViewHierarchy",processEvent:(r,o)=>{if(r.type!==void 0||e.shouldAttach?.(r,o)===!1)return r;const i={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||be.document.body,i.windows);const s={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(i)};return o.attachments=o.attachments||[],o.attachments.push(s),r}}},bt=Te,s_="sentryReplaySession",MJ="replay_event",a_="Unable to send Replay",DJ=3e5,LJ=9e5,FJ=5e3,BJ=5500,UJ=6e4,VJ=5e3,jJ=3,Q6=15e4,uu=5e3,zJ=3e3,qJ=300,l_=2e7,HJ=4999,WJ=5e4,e5=36e5;var GJ=Object.defineProperty,YJ=(e,t,n)=>t in e?GJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,t5=(e,t,n)=>YJ(e,typeof t!="symbol"?t+"":t,n),Bt=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Bt||{});function KJ(e){return e.nodeType===e.ELEMENT_NODE}function Cl(e){return e?.host?.shadowRoot===e}function xl(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function XJ(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function JJ(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function fu(e){try{const t=e.rules||e.cssRules;return t?XJ(Array.from(t,n5).join("")):null}catch{return null}}function ZJ(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],i=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function n5(e){let t;if(eZ(e))try{t=fu(e.styleSheet)||JJ(e)}catch{}else if(tZ(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=ZJ(e)),r&&(n=QJ(n)),r||o)return n}return t||e.cssText}function QJ(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function eZ(e){return"styleSheet"in e}function tZ(e){return"selectorText"in e}let r5=class{constructor(){t5(this,"idNodeMap",new Map),t5(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function nZ(){return new r5}function pu({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Ol({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function ks(e){return e.toLowerCase()}function c_(e){return e.toUpperCase()}const o5="__rrweb_original__";function rZ(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const i=t.getImageData,s=o5 in i?i[o5]:i;if(new Uint32Array(s.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function d_(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ks(t):null}function mu(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function i5(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const s5={};function a5(e){const t=s5[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return s5[e]=r.bind(window)}function u_(...e){return a5("setTimeout")(...e)}function l5(...e){return a5("clearTimeout")(...e)}function c5(e){try{return e.contentDocument}catch{}}let oZ=1;const iZ=new RegExp("[^a-z0-9-_:]"),Rl=-2;function f_(){return oZ++}function sZ(e){if(e instanceof HTMLFormElement)return"form";const t=ks(e.tagName);return iZ.test(t)?"div":t}function aZ(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let As,d5;const lZ=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,cZ=/^(?:[a-z+]+:)?\/\//i,dZ=/^www\..*/i,uZ=/^(data:)([^,]*),(.*)/i;function fZ(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let o of n){if(o=o.trim(),!o)continue;const i=o.indexOf(":");if(i===-1){r.push(o);continue}const s=o.slice(0,i).trim();t.has(s)||r.push(o)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function _u(e,t){return(e||"").replace(lZ,(n,r,o,i,s,l)=>{const c=o||s||l,d=r||i||"";if(!c)return n;if(cZ.test(c)||dZ.test(c))return`url(${d}${c}${d})`;if(uZ.test(c))return`url(${d}${c}${d})`;if(c[0]==="/")return`url(${d}${aZ(t)+c}${d})`;const f=t.split("/"),u=c.split("/");f.pop();for(const p of u)p!=="."&&(p===".."?f.pop():f.push(p));return`url(${d}${f.join("/")}${d})`})}const pZ=/^[^ \t\n\r\u000c]+/,mZ=/^[, \t\n\r\u000c]+/;function _Z(e,t){if(t.trim()==="")return t;let n=0;function r(i){let s;const l=i.exec(t.substring(n));return l?(s=l[0],n+=s.length,s):""}const o=[];for(;r(mZ),!(n>=t.length);){let i=r(pZ);if(i.slice(-1)===",")i=Ns(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=Ns(e,i);let l=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((i+s).trim());break}else if(l)c===")"&&(l=!1);else if(c===","){n+=1,o.push((i+s).trim());break}else c==="("&&(l=!0);s+=c,n+=1}}}return o.join(", ")}const u5=new WeakMap;function Ns(e,t){return!t||t.trim()===""?t:hu(e,t)}function hZ(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function hu(e,t){let n=u5.get(e);if(n||(n=e.createElement("a"),u5.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function f5(e,t,n,r,o,i,s){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Ns(e,r);if(n==="xlink:href"&&r[0]!=="#")return Ns(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Ns(e,r);if(n==="srcset")return _Z(e,r);if(n==="style"){let l=_u(r,hu(e));return s&&s.size>0&&(l=fZ(l,s)),l}else if(t==="object"&&n==="data")return Ns(e,r);return typeof i=="function"?i(n,r,o):r}function p5(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function gZ(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const i=e.classList[o];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function yZ(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Si(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Si(e.parentNode,t,n,r+1)}function Is(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(yZ(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Cs(e,t,n,r,o,i){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const d=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(d))return!0}let l=-1,c=-1;if(i){if(c=Si(s,Is(r,o)),c<0)return!0;l=Si(s,Is(t,n),c>=0?c:1/0)}else{if(l=Si(s,Is(t,n)),l<0)return!1;c=Si(s,Is(r,o),l>=0?l:1/0)}return l>=0?c>=0?l<=c:!0:c>=0?!1:!!i}catch{}return!!i}function bZ(e,t,n){const r=e.contentWindow;if(!r)return;let o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const l=u_(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{l5(l),o=!0,t()});return}const s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return u_(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function EZ(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;const i=u_(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{l5(i),r=!0,t()})}function $Z(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:l,maskAttributeFn:c,maskTextClass:d,unmaskTextClass:f,maskTextSelector:u,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:_={},maskTextFn:b,maskInputFn:g,dataURLOptions:h={},inlineImages:y,recordCanvas:E,keepIframeSrcFn:$,newlyAddedElement:O=!1,ignoreCSSAttributes:N}=t,v=SZ(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Bt.Document,childNodes:[],compatMode:e.compatMode}:{type:Bt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Bt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return TZ(e,{doc:n,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:_,maskInputFn:g,dataURLOptions:h,inlineImages:y,recordCanvas:E,keepIframeSrcFn:$,newlyAddedElement:O,rootId:v,maskTextClass:d,unmaskTextClass:f,maskTextSelector:u,unmaskTextSelector:p,ignoreCSSAttributes:N});case e.TEXT_NODE:return vZ(e,{doc:n,maskAllText:l,maskTextClass:d,unmaskTextClass:f,maskTextSelector:u,unmaskTextSelector:p,maskTextFn:b,maskInputOptions:_,maskInputFn:g,rootId:v});case e.CDATA_SECTION_NODE:return{type:Bt.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:Bt.Comment,textContent:e.textContent||"",rootId:v};default:return!1}}function SZ(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function vZ(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:l,maskInputOptions:c,maskInputFn:d,rootId:f}=t,u=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const m=u==="STYLE"?!0:void 0,_=u==="SCRIPT"?!0:void 0,b=u==="TEXTAREA"?!0:void 0;if(m&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=fu(e.parentNode.sheet))}catch(h){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${h}`,e)}p=_u(p,hu(t.doc))}_&&(p="SCRIPT_PLACEHOLDER");const g=Cs(e,r,i,o,s,n);if(!m&&!_&&!b&&p&&g&&(p=l?l(p,e.parentElement):p.replace(/[\S]/g,"*")),b&&p&&(c.textarea||g)&&(p=d?d(p,e.parentNode):p.replace(/[\S]/g,"*")),u==="OPTION"&&p){const h=pu({type:null,tagName:u,maskInputOptions:c});p=Ol({isMasked:Cs(e,r,i,o,s,h),element:e,value:p,maskInputFn:d})}return{type:Bt.Text,textContent:p||"",isStyle:m,rootId:f}}function TZ(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:l={},maskAttributeFn:c,maskInputFn:d,dataURLOptions:f={},inlineImages:u,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:_=!1,rootId:b,maskTextClass:g,unmaskTextClass:h,maskTextSelector:y,unmaskTextSelector:E,ignoreCSSAttributes:$}=t,O=gZ(e,r,o,i),N=sZ(e);let v={};const B=e.attributes.length;for(let U=0;U<B;U++){const C=e.attributes[U];C.name&&!p5(N,C.name,C.value)&&(v[C.name]=f5(n,N,ks(C.name),C.value,e,c,$))}if(N==="link"&&s){const U=Array.from(n.styleSheets).find(A=>A.href===e.href);let C=null;U&&(C=fu(U)),C&&(v.rel=null,v.href=null,v.crossorigin=null,v._cssText=_u(C,U.href))}if(N==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const U=fu(e.sheet);U&&(v._cssText=_u(U,hu(n)))}if(N==="input"||N==="textarea"||N==="select"||N==="option"){const U=e,C=d_(U),A=mu(U,c_(N),C),R=U.checked;if(C!=="submit"&&C!=="button"&&A){const I=Cs(U,g,y,h,E,pu({type:C,tagName:c_(N),maskInputOptions:l}));v.value=Ol({isMasked:I,element:U,value:A,maskInputFn:d})}R&&(v.checked=R)}if(N==="option"&&(e.selected&&!l.select?v.selected=!0:delete v.selected),N==="canvas"&&p){if(e.__context==="2d")rZ(e)||(v.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const U=e.toDataURL(f.type,f.quality),C=n.createElement("canvas");C.width=e.width,C.height=e.height;const A=C.toDataURL(f.type,f.quality);U!==A&&(v.rr_dataURL=U)}}if(N==="img"&&u){As||(As=n.createElement("canvas"),d5=As.getContext("2d"));const U=e,C=U.currentSrc||U.getAttribute("src")||"<unknown-src>",A=U.crossOrigin,R=()=>{U.removeEventListener("load",R);try{As.width=U.naturalWidth,As.height=U.naturalHeight,d5.drawImage(U,0,0),v.rr_dataURL=As.toDataURL(f.type,f.quality)}catch(I){if(U.crossOrigin!=="anonymous"){U.crossOrigin="anonymous",U.complete&&U.naturalWidth!==0?R():U.addEventListener("load",R);return}else console.warn(`Cannot inline img src=${C}! Error: ${I}`)}U.crossOrigin==="anonymous"&&(A?v.crossOrigin=A:U.removeAttribute("crossorigin"))};U.complete&&U.naturalWidth!==0?R():U.addEventListener("load",R)}if((N==="audio"||N==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),_||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),O){const{width:U,height:C}=e.getBoundingClientRect();v={class:v.class,rr_width:`${U}px`,rr_height:`${C}px`}}N==="iframe"&&!m(v.src)&&(!O&&!c5(e)&&(v.rr_src=v.src),delete v.src);let H;try{customElements.get(N)&&(H=!0)}catch{}return{type:Bt.Element,tagName:N,attributes:v,childNodes:[],isSVG:hZ(e)||void 0,needBlock:O,rootId:b,isCustom:H}}function Et(e){return e==null?"":e.toLowerCase()}function wZ(e,t){if(t.comment&&e.type===Bt.Comment)return!0;if(e.type===Bt.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&i5(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Et(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Et(e.attributes.name)==="application-name"||Et(e.attributes.rel)==="icon"||Et(e.attributes.rel)==="apple-touch-icon"||Et(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Et(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Et(e.attributes.property).match(/^(og|twitter|fb):/)||Et(e.attributes.name).match(/^(og|twitter):/)||Et(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Et(e.attributes.name)==="robots"||Et(e.attributes.name)==="googlebot"||Et(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Et(e.attributes.name)==="author"||Et(e.attributes.name)==="generator"||Et(e.attributes.name)==="framework"||Et(e.attributes.name)==="publisher"||Et(e.attributes.name)==="progid"||Et(e.attributes.property).match(/^article:/)||Et(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Et(e.attributes.name)==="google-site-verification"||Et(e.attributes.name)==="yandex-verification"||Et(e.attributes.name)==="csrf-token"||Et(e.attributes.name)==="p:domain_verify"||Et(e.attributes.name)==="verify-v1"||Et(e.attributes.name)==="verification"||Et(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function xs(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:u,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:_={},maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOMOptions:y,dataURLOptions:E={},inlineImages:$=!1,recordCanvas:O=!1,onSerialize:N,onIframeLoad:v,iframeLoadTimeout:B=5e3,onBlockedImageLoad:H,onStylesheetLoad:U,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:R=!1,ignoreCSSAttributes:I}=t;let{preserveWhiteSpace:V=!0}=t;const j=$Z(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:l,unblockSelector:s,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:u,inlineStylesheet:m,maskInputOptions:_,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,dataURLOptions:E,inlineImages:$,recordCanvas:O,keepIframeSrcFn:A,newlyAddedElement:R,ignoreCSSAttributes:I});if(!j)return console.warn(e,"not serialized"),null;let F;r.hasNode(e)?F=r.getId(e):wZ(j,y)||!V&&j.type===Bt.Text&&!j.isStyle&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?F=Rl:F=f_();const M=Object.assign(j,{id:F});if(r.add(e,M),F===Rl)return null;N&&N(e);let Y=!p;if(M.type===Bt.Element){Y=Y&&!M.needBlock;const W=e.shadowRoot;W&&xl(W)&&(M.isShadowHost=!0)}if((M.type===Bt.Document||M.type===Bt.Element)&&Y){y.headWhitespace&&M.type===Bt.Element&&M.tagName==="head"&&(V=!1);const W={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:l,unblockSelector:s,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:u,skipChild:p,inlineStylesheet:m,maskInputOptions:_,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOMOptions:y,dataURLOptions:E,inlineImages:$,recordCanvas:O,preserveWhiteSpace:V,onSerialize:N,onIframeLoad:v,iframeLoadTimeout:B,onBlockedImageLoad:H,onStylesheetLoad:U,stylesheetLoadTimeout:C,keepIframeSrcFn:A,ignoreCSSAttributes:I},K=e.childNodes?Array.from(e.childNodes):[];for(const te of K){const X=xs(te,W);X&&M.childNodes.push(X)}if(KJ(e)&&e.shadowRoot)for(const te of Array.from(e.shadowRoot.childNodes)){const X=xs(te,W);X&&(xl(e.shadowRoot)&&(X.isShadow=!0),M.childNodes.push(X))}}if(e.parentNode&&Cl(e.parentNode)&&xl(e.parentNode)&&(M.isShadow=!0),M.type===Bt.Element&&M.tagName==="iframe"&&!M.needBlock&&bZ(e,()=>{const W=c5(e);if(W&&v){const K=xs(W,{doc:W,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:m,maskInputOptions:_,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOMOptions:y,dataURLOptions:E,inlineImages:$,recordCanvas:O,preserveWhiteSpace:V,onSerialize:N,onIframeLoad:v,iframeLoadTimeout:B,onStylesheetLoad:U,stylesheetLoadTimeout:C,keepIframeSrcFn:A,ignoreCSSAttributes:I});K&&v(e,K)}},B),M.type===Bt.Element&&M.tagName==="img"&&!e.complete&&M.needBlock){const W=e,K=()=>{if(W.isConnected&&!W.complete&&H)try{const te=W.getBoundingClientRect();te.width>0&&te.height>0&&H(W,M,te)}catch{}W.removeEventListener("load",K)};W.isConnected&&W.addEventListener("load",K)}return M.type===Bt.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&i5(M.attributes.href)==="css")&&EZ(e,()=>{if(U){const W=xs(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:m,maskInputOptions:_,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOMOptions:y,dataURLOptions:E,inlineImages:$,recordCanvas:O,preserveWhiteSpace:V,onSerialize:N,onIframeLoad:v,iframeLoadTimeout:B,onStylesheetLoad:U,stylesheetLoadTimeout:C,keepIframeSrcFn:A,ignoreCSSAttributes:I});W&&U(e,W)}},C),M.type===Bt.Element&&delete M.needBlock,M}function kZ(e,t){const{mirror:n=new r5,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:l="rr-mask",unmaskTextClass:c=null,maskTextSelector:d=null,unmaskTextSelector:f=null,inlineStylesheet:u=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:_=!1,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOM:y=!1,dataURLOptions:E,preserveWhiteSpace:$,onSerialize:O,onIframeLoad:N,iframeLoadTimeout:v,onBlockedImageLoad:B,onStylesheetLoad:H,stylesheetLoadTimeout:U,keepIframeSrcFn:C=()=>!1,ignoreCSSAttributes:A=new Set([])}=t||{};return xs(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:u,maskInputOptions:_===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:_===!1?{}:_,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOMOptions:y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y,dataURLOptions:E,inlineImages:p,recordCanvas:m,preserveWhiteSpace:$,onSerialize:O,onIframeLoad:N,iframeLoadTimeout:v,onBlockedImageLoad:B,onStylesheetLoad:H,stylesheetLoadTimeout:U,keepIframeSrcFn:C,newlyAddedElement:!1,ignoreCSSAttributes:A})}function gn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Os=`Please stop import mirror directly. Instead of that,\r
|
|
519
|
+
Error:`,o)}}function eK(){return VY(e=>{wl("cls",{metric:e}),f6=e},{reportAllChanges:!0})}function tK(){return XY(e=>{wl("lcp",{metric:e}),p6=e},{reportAllChanges:!0})}function nK(){return ZY(e=>{wl("ttfb",{metric:e}),m6=e})}function rK(){return GY(e=>{wl("inp",{metric:e}),_6=e})}function Zd(e,t,n,r,o=!1){h6(e,t);let i;return Kd[e]||(i=n(),Kd[e]=!0),r&&t({metric:r}),g6(e,t,o?i:void 0)}function oK(e){const t={};e==="event"&&(t.durationThreshold=0),Ss(e,n=>{wl(e,{entries:n})},t)}function h6(e,t){Tl[e]=Tl[e]||[],Tl[e].push(t)}function g6(e,t,n){return()=>{n&&n();const r=Tl[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function iK(e){return"duration"in e}const sK=e=>{const t=n=>{(n.type==="pagehide"||De.document?.visibilityState==="hidden")&&e(n)};xo("visibilitychange",t,{capture:!0,once:!0}),xo("pagehide",t,{capture:!0,once:!0})};function Y_(e){return typeof e=="number"&&isFinite(e)}function Oo(e,t,n,{...r}){const o=Me(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),nl(e,()=>{const i=Tr({startTime:t,...r});return i&&i.end(n),i})}function K_(e){const t=_e();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:i}=e,{release:s,environment:l,sendDefaultPii:c}=t.getOptions(),f=t.getIntegrationByName("Replay")?.getReplayId(),u=Re(),p=u.getUser(),m=p!==void 0?p.email||p.id||p.ip_address:void 0;let _;try{_=u.getScopeData().contexts.profile.profile_id}catch{}const b={release:s,environment:l,user:m||void 0,profile_id:_||void 0,replay_id:f||void 0,transaction:r,"user_agent.original":De.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o};return Tr({name:n,attributes:b,startTime:i,experimental:{standalone:!0}})}function vs(){return De.addEventListener&&De.performance}function $t(e){return e/1e3}function aK(e){let t="unknown",n="unknown",r="";for(const o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function Qd(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function eu(e,t){let n,r=!1;function o(l){!r&&n&&t(l,n.spanContext().spanId,n),r=!0}sK(()=>{o("pagehide")});const i=e.on("beforeStartNavigationSpan",(l,c)=>{c?.isRedirect||(o("navigation"),i(),s())}),s=e.on("afterStartPageLoadSpan",l=>{n=l,s()})}function lK(e){let t=0,n;if(!Qd("layout-shift"))return;const r=Xd(({metric:o})=>{const i=o.entries[o.entries.length-1];i&&(t=o.value,n=i)},!0);eu(e,(o,i)=>{cK(t,n,i,o),r()})}function cK(e,t,n,r){cr&&P.log(`Sending CLS span (${e})`);const o=t?$t((Ft()||0)+t.startTime):ut(),i=Re().getScopeData().transactionName,s=t?Vt(t.sources[0]?.node):"Layout shift",l={[We]:"auto.http.browser.cls",[tt]:"ui.webvital.cls",[To]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((d,f)=>{l[`cls.source.${f+1}`]=Vt(d.node)});const c=K_({name:s,transaction:i,attributes:l,startTime:o});c&&(c.addEvent("cls",{[Ga]:"",[Ya]:e}),c.end(o))}const dK=6e4;function kl(e){return e!=null&&e>0&&e<=dK}function uK(e){let t=0,n;if(!Qd("largest-contentful-paint"))return;const r=Jd(({metric:o})=>{const i=o.entries[o.entries.length-1];!i||!kl(o.value)||(t=o.value,n=i)},!0);eu(e,(o,i)=>{fK(t,n,i,o),r()})}function fK(e,t,n,r){if(!kl(e))return;cr&&P.log(`Sending LCP span (${e})`);const o=$t((Ft()||0)+(t?.startTime||0)),i=Re().getScopeData().transactionName,s=t?Vt(t.element):"Largest contentful paint",l={[We]:"auto.http.browser.lcp",[tt]:"ui.webvital.lcp",[To]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(l["lcp.element"]=Vt(t.element)),t.id&&(l["lcp.id"]=t.id),t.url&&(l["lcp.url"]=t.url),t.loadTime!=null&&(l["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(l["lcp.renderTime"]=t.renderTime),t.size!=null&&(l["lcp.size"]=t.size));const c=K_({name:s,transaction:i,attributes:l,startTime:o});c&&(c.addEvent("lcp",{[Ga]:"millisecond",[Ya]:e}),c.end(o))}function Xn(e){return e&&((Ft()||performance.timeOrigin)+e)/1e3}function y6(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=aK(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Ft()||vs()?.timeOrigin?pK({...t,"http.request.redirect_start":Xn(e.redirectStart),"http.request.redirect_end":Xn(e.redirectEnd),"http.request.worker_start":Xn(e.workerStart),"http.request.fetch_start":Xn(e.fetchStart),"http.request.domain_lookup_start":Xn(e.domainLookupStart),"http.request.domain_lookup_end":Xn(e.domainLookupEnd),"http.request.connect_start":Xn(e.connectStart),"http.request.secure_connection_start":Xn(e.secureConnectionStart),"http.request.connection_end":Xn(e.connectEnd),"http.request.request_start":Xn(e.requestStart),"http.request.response_start":Xn(e.responseStart),"http.request.response_end":Xn(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function pK(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const mK=2147483647;let b6=0,hn={},Nn,tu;function _K({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=vs();if(r&&Ft()){r.mark&&De.performance.mark("sentry-tracing-init");const o=t?uK(n):t===!1?EK():void 0,i=e?lK(n):e===!1?bK():void 0,s=$K();return()=>{s(),o?.(),i?.()}}return()=>{}}function hK(){$i("longtask",({entries:e})=>{const t=wt();if(!t)return;const{op:n,start_timestamp:r}=Me(t);for(const o of e){const i=$t(Ft()+o.startTime),s=$t(o.duration);n==="navigation"&&r&&i<r||Oo(t,i,i+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[We]:"auto.ui.browser.metrics"}})}})}function gK(){new PerformanceObserver(t=>{const n=wt();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const o=$t(Ft()+r.startTime),{start_timestamp:i,op:s}=Me(n);if(s==="navigation"&&i&&o<i)continue;const l=$t(r.duration),c={[We]:"auto.ui.browser.metrics"},d=r.scripts[0],{invoker:f,invokerType:u,sourceURL:p,sourceFunctionName:m,sourceCharPosition:_}=d;c["browser.script.invoker"]=f,c["browser.script.invoker_type"]=u,p&&(c["code.filepath"]=p),m&&(c["code.function"]=m),_!==-1&&(c["browser.script.source_char_position"]=_),Oo(n,o,o+l,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function yK(){$i("event",({entries:e})=>{const t=wt();if(t){for(const n of e)if(n.name==="click"){const r=$t(Ft()+n.startTime),o=$t(n.duration),i={name:Vt(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[We]:"auto.ui.browser.metrics"}},s=hm(n.target);s&&(i.attributes["ui.component_name"]=s),Oo(t,r,r+o,i)}}})}function bK(){return Xd(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(hn.cls={value:e.value,unit:""},tu=t)},!0)}function EK(){return Jd(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!kl(e.value)||(hn.lcp={value:e.value,unit:"millisecond"},Nn=t)},!0)}function $K(){return QY(({metric:e})=>{e.entries[e.entries.length-1]&&(hn.ttfb={value:e.value,unit:"millisecond"})})}function SK(e,t){const n=vs(),r=Ft();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:o,ignorePerformanceApiSpans:i,ignoreResourceSpans:s,recordClsOnPageloadSpan:l,recordLcpOnPageloadSpan:c}=t,d=$t(r),f=n.getEntries(),{op:u,start_timestamp:p}=Me(e);if(f.slice(b6).forEach(m=>{const _=$t(m.startTime),b=$t(Math.max(0,m.duration));if(!(u==="navigation"&&p&&d+_<p))switch(m.entryType){case"navigation":{kK(e,m,d);break}case"mark":case"paint":case"measure":{TK(e,m,_,b,d,i);const g=Sl(),h=m.startTime<g.firstHiddenTime;m.name==="first-paint"&&h&&(hn.fp={value:m.startTime,unit:"millisecond"}),m.name==="first-contentful-paint"&&h&&(hn.fcp={value:m.startTime,unit:"millisecond"});break}case"resource":{IK(e,m,m.name,_,b,d,s);break}}}),b6=Math.max(f.length-1,0),CK(e,o),u==="pageload"){if(RK(hn),o){const m=(_,b,g)=>{const h=g??`browser.web_vital.${_}.value`;e.setAttribute(h,b),cr&&P.log("Setting web vital attribute",{[h]:b},"on pageload span")};["ttfb","fp","fcp"].forEach(_=>{hn[_]&&m(_,hn[_].value)}),hn["ttfb.requestTime"]&&m("ttfb.requestTime",hn["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else l||delete hn.cls,c||delete hn.lcp,Object.entries(hn).forEach(([m,_])=>{t9(m,_.value,_.unit)}),xK(e,t);e.setAttribute(o?"browser.performance.time_origin":"performance.timeOrigin",d),e.setAttribute(o?"browser.performance.navigation.activation_start":"performance.activationStart",Es())}Nn=void 0,tu=void 0,hn={}}function vK(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function TK(e,t,n,r,o,i){if(vK(t)||["mark","measure"].includes(t.entryType)&&or(t.name,i))return;const s=$l(!1),l=$t(s?s.requestStart:0),c=o+Math.max(n,l),d=o+n,f=d+r,u={[We]:"auto.resource.browser.metrics"};c!==d&&(u["sentry.browser.measure_happened_before_request"]=!0,u["sentry.browser.measure_start_time"]=c),wK(u,t),c<=f&&Oo(e,c,f,{name:t.name,op:t.entryType,attributes:u})}function wK(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&Hr(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(Hr(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function kK(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{nu(e,t,r,n)}),nu(e,t,"secureConnection",n,"TLS/SSL"),nu(e,t,"fetch",n,"cache"),nu(e,t,"domainLookup",n,"DNS"),NK(e,t,n)}function nu(e,t,n,r,o=n){const i=AK(n),s=t[i],l=t[`${n}Start`];!l||!s||Oo(e,r+$t(l),r+$t(s),{op:`browser.${o}`,name:t.name,attributes:{[We]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function AK(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function NK(e,t,n){const r=n+$t(t.requestStart),o=n+$t(t.responseEnd),i=n+$t(t.responseStart);t.responseEnd&&(Oo(e,r,o,{op:"browser.request",name:t.name,attributes:{[We]:"auto.ui.browser.metrics"}}),Oo(e,i,o,{op:"browser.response",name:t.name,attributes:{[We]:"auto.ui.browser.metrics"}}))}function IK(e,t,n,r,o,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const l=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(l))return;const c={[We]:"auto.resource.browser.metrics"},d=di(n);d.protocol&&(c["url.scheme"]=d.protocol.split(":").pop()),d.host&&(c["server.address"]=d.host),c["url.same_origin"]=n.includes(De.location.origin),OK(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const f={...c,...y6(t)},u=i+r,p=u+o;Oo(e,u,p,{name:n.replace(De.location.origin,""),op:l,attributes:f})}function CK(e,t){const n=De.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?"network.connection.type":"connectionType",r.type),Y_(r.rtt)&&(hn["connection.rtt"]={value:r.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",r.rtt))),Y_(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),Y_(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function xK(e,t){Nn&&t.recordLcpOnPageloadSpan&&(Nn.element&&e.setAttribute("lcp.element",Vt(Nn.element)),Nn.id&&e.setAttribute("lcp.id",Nn.id),Nn.url&&e.setAttribute("lcp.url",Nn.url.trim().slice(0,200)),Nn.loadTime!=null&&e.setAttribute("lcp.loadTime",Nn.loadTime),Nn.renderTime!=null&&e.setAttribute("lcp.renderTime",Nn.renderTime),e.setAttribute("lcp.size",Nn.size)),tu?.sources&&t.recordClsOnPageloadSpan&&tu.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Vt(n.node)))}function OK(e,t,n){n.forEach(([r,o])=>{const i=e[r];i!=null&&(typeof i=="number"&&i<mK||typeof i=="string")&&(t[o]=i)})}function RK(e){const t=$l(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const PK="ElementTiming",MK=(()=>({name:PK,setup(){!vs()||!Ft()||$i("element",({entries:t})=>{for(const n of t){const r=n;if(!r.identifier)continue;const o=r.identifier,i=r.name,s=r.renderTime,l=r.loadTime,c={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":o};i&&(c["ui.element.paint_type"]=i),r.id&&(c["ui.element.id"]=r.id),r.element&&(c["ui.element.type"]=r.element.tagName.toLowerCase()),r.url&&(c["ui.element.url"]=r.url),r.naturalWidth&&(c["ui.element.width"]=r.naturalWidth),r.naturalHeight&&(c["ui.element.height"]=r.naturalHeight),s>0&&o_("ui.element.render_time",s,{unit:"millisecond",attributes:c}),l>0&&o_("ui.element.load_time",l,{unit:"millisecond",attributes:c})}})}})),X_=[],Al=new Map,Ts=new Map,E6=60;function DK(){if(vs()&&Ft()){const t=LK();return()=>{t()}}return()=>{}}const Nl={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function LK(){return G_(FK)}const FK=({metric:e})=>{if(e.value==null)return;const t=$t(e.value);if(t>E6)return;const n=e.entries.find(_=>_.duration===e.value&&Nl[_.name]);if(!n)return;const{interactionId:r}=n,o=Nl[n.name],i=$t(Ft()+n.startTime),s=wt(),l=s?Tt(s):void 0,c=r!=null?Al.get(r):void 0,d=c?.span||l,f=d?Me(d).description:Re().getScopeData().transactionName,u=c?.elementName||Vt(n.target),p={[We]:"auto.http.browser.inp",[tt]:`ui.interaction.${o}`,[To]:n.duration},m=K_({name:u,transaction:f,attributes:p,startTime:i});m&&(m.addEvent("inp",{[Ga]:"millisecond",[Ya]:e.value}),m.end(i+t))};function BK(e){return e!=null?Al.get(e):void 0}function UK(){const e=Object.keys(Nl);_l()&&e.forEach(o=>{De.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){const i=o.target;if(!i)return;const s=Vt(i),l=Math.round(o.timeStamp);if(Ts.set(l,s),Ts.size>50){const c=Ts.keys().next().value;c!==void 0&&Ts.delete(c)}}function n(o){const i=Math.round(o.startTime);let s=Ts.get(i);if(!s)for(let l=-5;l<=5;l++){const c=Ts.get(i+l);if(c){s=c;break}}return s||"<unknown>"}const r=({entries:o})=>{const i=wt(),s=i&&Tt(i);o.forEach(l=>{if(!iK(l))return;const c=l.interactionId;if(c==null||Al.has(c))return;const d=l.target?Vt(l.target):n(l);if(X_.length>10){const f=X_.shift();Al.delete(f)}X_.push(c),Al.set(c,{span:s,elementName:d})})};$i("event",r),$i("first-input",r)}function J_(e){const{name:t,op:n,origin:r,metricName:o,value:i,attributes:s,parentSpan:l,reportEvent:c,startTime:d,endTime:f}=e,u=Re().getScopeData().transactionName,p={[We]:r,[tt]:n,[To]:0,[`browser.web_vital.${o}.value`]:i,"sentry.transaction":u,"user_agent.original":De.navigator?.userAgent,...s};l&&Kc(l).attributes?.[tt]==="pageload"&&(p["sentry.pageload.span_id"]=l.spanContext().spanId),c&&(p[`browser.web_vital.${o}.report_event`]=c);const m=Tr({name:t,attributes:p,startTime:d,parentSpan:l});m&&m.end(f??d)}function VK(e){let t=0,n;if(!Qd("largest-contentful-paint"))return;const r=Jd(({metric:o})=>{const i=o.entries[o.entries.length-1];!i||!kl(o.value)||(t=o.value,n=i)},!0);eu(e,(o,i,s)=>{jK(t,n,s,o),r()})}function jK(e,t,n,r){if(!kl(e))return;cr&&P.log(`Sending LCP span (${e})`);const o=Ft()||0,i=$t(o),s=$t(o+(t?.startTime||0)),l=t?Vt(t.element):"Largest contentful paint",c={};t?.element&&(c["browser.web_vital.lcp.element"]=Vt(t.element)),t?.id&&(c["browser.web_vital.lcp.id"]=t.id),t?.url&&(c["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(c["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(c["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(c["browser.web_vital.lcp.size"]=t.size),J_({name:l,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:i,endTime:s})}function zK(e){let t=0,n;if(!Qd("layout-shift"))return;const r=Xd(({metric:o})=>{const i=o.entries[o.entries.length-1];i&&(t=o.value,n=i)},!0);eu(e,(o,i,s)=>{qK(t,n,s,o),r()})}function qK(e,t,n,r){cr&&P.log(`Sending CLS span (${e})`);const o=t?$t((Ft()||0)+t.startTime):ut(),i=t?Vt(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((l,c)=>{s[`browser.web_vital.cls.source.${c+1}`]=Vt(l.node)}),J_({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:s,parentSpan:n,reportEvent:r,startTime:o})}function HK(){if(!vs()||!Ft())return;G_(({metric:n})=>{if(n.value==null||$t(n.value)>E6)return;const o=n.entries.find(i=>i.duration===n.value&&Nl[i.name]);o&&WK(n.value,o)})}function WK(e,t){cr&&P.log(`Sending INP span (${e})`);const n=$t(Ft()+t.startTime),r=$t(e),o=Nl[t.name],i=BK(t.interactionId),s=wt(),l=s?Tt(s):void 0,c=i?.span||l,d=c?Kc(c).name:Re().getScopeData().transactionName,f=i?.elementName||Vt(t.target);J_({name:f,op:`ui.interaction.${o}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[To]:t.duration,"sentry.transaction":d},startTime:n,endTime:n+r,parentSpan:c})}const GK=1e3;let $6,Z_,Q_;function S6(e){$o("dom",e),So("dom",YK)}function YK(){if(!De.document)return;const e=qn.bind(null,"dom"),t=v6(e,!0);De.document.addEventListener("click",t,!1),De.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const o=De[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Qt(o,"addEventListener",function(i){return function(s,l,c){if(s==="click"||s=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[s]=d[s]||{refCount:0};if(!f.handler){const u=v6(e);f.handler=u,i.call(this,s,u,c)}f.refCount++}catch{}return i.call(this,s,l,c)}}),Qt(o,"removeEventListener",function(i){return function(s,l,c){if(s==="click"||s=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[s];f&&(f.refCount--,f.refCount<=0&&(i.call(this,s,f.handler,c),f.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,l,c)}}))})}function KK(e){if(e.type!==Z_)return!1;try{if(!e.target||e.target._sentryId!==Q_)return!1}catch{}return!0}function XK(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function v6(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=JK(n);if(XK(n.type,r))return;en(n,"_sentryCaptured",!0),r&&!r._sentryId&&en(r,"_sentryId",jt());const o=n.type==="keypress"?"input":n.type;KK(n)||(e({event:n,name:o,global:t}),Z_=n.type,Q_=r?r._sentryId:void 0),clearTimeout($6),$6=De.setTimeout(()=>{Q_=void 0,Z_=void 0},GK)}}function JK(e){try{return e.target}catch{return null}}let ru;function ou(e){const t="history";$o(t,e),So(t,ZK)}function ZK(){if(De.addEventListener("popstate",()=>{const t=De.location.href,n=ru;if(ru=t,n===t)return;qn("history",{from:n,to:t})}),!GW())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=ru,i=QK(String(r));if(ru=i,o===i)return t.apply(this,n);qn("history",{from:o,to:i})}return t.apply(this,n)}}Qt(De.history,"pushState",e),Qt(De.history,"replaceState",e)}function QK(e){try{return new URL(e,De.location.origin).toString()}catch{return e}}const iu={};function e0(e){const t=iu[e];if(t)return t;let n=De[e];if(E_(n))return iu[e]=n.bind(De);const r=De.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const i=o.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(o)}catch(o){cr&&P.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(iu[e]=n.bind(De))}function eX(e){iu[e]=void 0}function Il(...e){return e0("setTimeout")(...e)}const ro="__sentry_xhr_v3__";function t0(e){$o("xhr",e),So("xhr",tX)}function tX(){if(!De.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const o=new Error,i=ut()*1e3,s=rr(r[0])?r[0].toUpperCase():void 0,l=nX(r[1]);if(!s||!l)return t.apply(n,r);n[ro]={method:s,url:l,request_headers:{}},s==="POST"&&l.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const d=n[ro];if(d&&n.readyState===4){try{d.status_code=n.status}catch{}const f={endTimestamp:ut()*1e3,startTimestamp:i,xhr:n,virtualError:o};qn("xhr",f)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(d,f,u){return c(),d.apply(f,u)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(d,f,u){const[p,m]=u,_=f[ro];return _&&rr(p)&&rr(m)&&(_.request_headers[p.toLowerCase()]=m),d.apply(f,u)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[ro];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const i={startTimestamp:ut()*1e3,xhr:n};return qn("xhr",i),t.apply(n,r)}})}function nX(e){if(rr(e))return e;try{return e.toString()}catch{}}const rX=Symbol.for("sentry__originalRequestBody");function T6(e){return new URLSearchParams(e).toString()}function su(e,t=P){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[T6(e)];if(!e)return[void 0]}catch(n){return cr&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return cr&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function n0(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][rX];return n!==void 0?n:void 0}}function w6(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return cr&&P.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
520
|
+
`).reduce((n,r)=>{const[o,i]=r.split(": ");return i&&(n[o.toLowerCase()]=i),n},{}):{}}const oX=40;function r0(e,t=e0("fetch")){let n=0,r=0;async function o(i){const s=i.body.length;n+=s,r++;const l={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,l);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw eX("fetch"),c}finally{n-=s,r--}}return F9(e,o,Gm(e.bufferSize||oX))}const de=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function iX(){const e=_e();if(!e){de&&P.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){de&&P.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function sX(){const e=_e();if(!e){de&&P.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){de&&P.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}const aX={startProfiler:iX,stopProfiler:sX},lX=10,cX=20,dX=30,uX=40,fX=50;function ws(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?br:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const pX=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,mX=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_X=/\((\S*)(?::(\d+))(?::(\d+))\)/,hX=/at (.+?) ?\(data:(.+?),/,k6=[dX,e=>{const t=e.match(hX);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=pX.exec(e);if(n){const[,o,i,s]=n;return ws(o,br,+i,+s)}const r=mX.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const l=_X.exec(r[2]);l&&(r[2]=l[1],r[3]=l[2],r[4]=l[3])}const[i,s]=C6(r[1]||br,r[2]);return ws(s,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],gX=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yX=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,A6=[fX,e=>{const t=gX.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=yX.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||br;return[o,r]=C6(o,r),ws(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],bX=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,EX=[uX,e=>{const t=bX.exec(e);return t?ws(t[2],t[1]||br,+t[3],t[4]?+t[4]:void 0):void 0}],$X=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,SX=[lX,e=>{const t=$X.exec(e);return t?ws(t[2],t[3]||br,+t[1]):void 0}],vX=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,TX=[cX,e=>{const t=vX.exec(e);return t?ws(t[5],t[3]||t[4]||br,+t[1],+t[2]):void 0}],N6=[k6,A6],I6=W3(...N6),C6=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:br,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function wX(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Sr(r)}},i=kX(e);return Gn(o,[i])}function kX(e){return[{type:"user_report"},e]}const au=1024,AX="Breadcrumbs",x6=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:AX,setup(n){t.console&&n_(CX(n)),t.dom&&S6(IX(n,t.dom)),t.xhr&&t0(xX(n)),t.fetch&&$_(OX(n)),t.history&&ou(RX(n)),t.sentry&&n.on("beforeSendEvent",NX(n))}}});function NX(e){return function(n){_e()===e&&sr({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ri(n)},{event:n})}}function IX(e,t){return function(r){if(_e()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,l=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;l&&l>au&&(de&&P.warn(`\`dom.maxStringLength\` cannot exceed ${au}, but a value of ${l} was configured. Sentry will use ${au} instead.`),l=au),typeof s=="string"&&(s=[s]);try{const d=r.event,f=PX(d)?d.target:d;o=Vt(f,{keyAttrs:s,maxStringLength:l}),i=hm(f)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};i&&(c.data={"ui.component_name":i}),sr(c,{event:r.event,name:r.name,global:r.global})}}function CX(e){return function(n){if(_e()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:fd(n.level),message:Hc(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Hc(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;sr(r,{input:n.args,level:n.level})}}function xX(e){return function(n){if(_e()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,i=n.xhr[ro];if(!r||!o||!i)return;const{method:s,url:l,status_code:c,body:d}=i,f={method:s,url:l,status_code:c},u={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:o},p={category:"xhr",data:f,type:"http",level:u$(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,u),sr(p,u)}}function OX(e){return function(n){if(_e()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},s={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,i),sr(s,i)}else{const i=n.response,s={...n.fetchData,status_code:i?.status},l={input:n.args,response:i,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:s,type:"http",level:u$(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,l),sr(c,l)}}}function RX(e){return function(n){if(_e()!==e)return;let r=n.from,o=n.to;const i=di(be.location.href);let s=r?di(r):void 0;const l=di(o);s?.path||(s=i),i.protocol===l.protocol&&i.host===l.host&&(o=l.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),sr({category:"navigation",data:{from:r,to:o}})}}function PX(e){return!!e&&!!e.target}const MX="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),DX="BrowserApiErrors",O6=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:DX,setupOnce(){t.setTimeout&&Qt(be,"setTimeout",R6),t.setInterval&&Qt(be,"setInterval",R6),t.requestAnimationFrame&&Qt(be,"requestAnimationFrame",LX),t.XMLHttpRequest&&"XMLHttpRequest"in be&&Qt(XMLHttpRequest.prototype,"send",FX);const n=t.eventTarget;n&&(Array.isArray(n)?n:MX).forEach(o=>BX(o,t))}}});function R6(e){return function(...t){const n=t[0];return t[0]=bs(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${zr(e)}`}}),e.apply(this,t)}}function LX(e){return function(t){return e.apply(this,[bs(t,{mechanism:{data:{handler:zr(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function FX(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Qt(n,o,function(i){const s={mechanism:{data:{handler:zr(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},l=gm(i);return l&&(s.mechanism.data.handler=zr(l)),bs(i,s)})}),e.apply(this,t)}}function BX(e,t){const r=be[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Qt(r,"addEventListener",function(o){return function(i,s,l){try{UX(s)&&(s.handleEvent=bs(s.handleEvent,{mechanism:{data:{handler:zr(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&VX(this,i,s),o.apply(this,[i,bs(s,{mechanism:{data:{handler:zr(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),l])}}),Qt(r,"removeEventListener",function(o){return function(i,s,l){try{const c=s.__sentry_wrapped__;c&&o.call(this,i,c,l)}catch{}return o.call(this,i,s,l)}}))}function UX(e){return typeof e.handleEvent=="function"}function VX(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const P6=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof be.document>"u"){de&&P.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Fm({ignoreDuration:!0}),id();const n=vt();let r=n.getUser();n.addScopeListener(o=>{const i=o.getUser();(r?.id!==i?.id||r?.ip_address!==i?.ip_address)&&(id(),r=i)}),t==="route"&&ou(({from:o,to:i})=>{o!==i&&(Fm({ignoreDuration:!0}),id())})}}},jX="CultureContext",M6=(()=>({name:jX,preprocessEvent(e){const t=D6();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=D6();t&&Yn(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}}));function D6(){try{const e=be.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const zX="GlobalHandlers",L6=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:zX,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(qX(n),U6("onerror")),t.onunhandledrejection&&(HX(n),U6("onunhandledrejection"))}}});function qX(e){K3(t=>{const{stackParser:n,attachStacktrace:r}=V6();if(_e()!==e||Q$())return;const{msg:o,url:i,line:s,column:l,error:c}=t,d=WX(jd(n,c||o,void 0,r,!1),i,s,l);d.level="error",rs(d,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function HX(e){X3(t=>{const{stackParser:n,attachStacktrace:r}=V6();if(_e()!==e||Q$())return;const o=F6(t),i=Hr(o)?B6(o):jd(n,o,void 0,r,!0);i.level="error",rs(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function F6(e){if(Hr(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function B6(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function WX(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},l=s.stacktrace=s.stacktrace||{},c=l.frames=l.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:GX(t)??ni(),function:br,in_app:!0}),e}function U6(e){de&&P.log(`Global Handler attached: ${e}`)}function V6(){return _e()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function GX(e){if(!(!rr(e)||e.length===0))return e.startsWith("data:")?`<${ko(e,!1)}>`:e}const j6=()=>({name:"HttpContext",preprocessEvent(e){if(!be.navigator&&!be.location&&!be.document)return;const t=Ud(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!be.navigator&&!be.location&&!be.document)return;const t=Ud();Yn(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}}),YX="cause",KX=5,XX="LinkedErrors",z6=((e={})=>{const t=e.limit||KX,n=e.key||YX;return{name:XX,preprocessEvent(r,o,i){const s=i.getOptions();Ez(Vd,s.stackParser,n,t,r,o)}}}),JX="SpotlightBrowser",ZX=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:JX,setup:()=>{de&&P.log("Using Sidecar URL",t)},processEvent:n=>tJ(n)?null:n,afterAllSetup:n=>{QX(n,t)}}});function QX(e,t){const n=e0("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){P.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:nd(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(i=>{i.status>=200&&i.status<400&&(r=0)},i=>{r++,P.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",i)})})}const eJ=ZX;function tJ(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}function nJ(){return rJ()?(de&&nr(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function rJ(){if(typeof be.window>"u")return!1;const e=be;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=ni();return!(be===be.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function o0(e){return[cE(),aE(),$q(),O6(),x6(),L6(),z6(),yE(),j6(),M6(),P6()]}function oJ(e={}){const t=!e.skipBrowserExtensionCheck&&nJ();let n=e.defaultIntegrations==null?o0():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:LB(e.stackParser||I6),integrations:Ej({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||r0};return Gj(s6,r)}function iJ(){}function sJ(e){e()}function aJ(e={}){const t=be.document,n=t?.head||t?.body;if(!n){de&&P.error("[showReportDialog] Global document not defined");return}const r=Re(),i=_e()?.getDsn();if(!i){de&&P.error("[showReportDialog] DSN not configured");return}const s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||$9()},l=be.document.createElement("script");l.async=!0,l.crossOrigin="anonymous",l.src=yj(i,s);const{onLoad:c,onClose:d}=s;if(c&&(l.onload=c),d){const f=u=>{if(u.data==="__sentry_reportdialog_closed__")try{d()}finally{be.removeEventListener("message",f)}};be.addEventListener("message",f)}n.appendChild(l)}const lJ=Te,cJ="ReportingObserver",q6=new WeakMap,dJ=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(q6.has(_e()))for(const o of r)Hn(i=>{i.setExtra("url",o.url);const s=`ReportingObserver [${o.type}]`;let l="No details available";if(o.body){const c={};for(const d in o.body)c[d]=o.body[d];if(i.setExtra("body",c),o.type==="crash"){const d=o.body;l=[d.crashId||"",d.reason||""].join(" ").trim()||l}else l=o.body.message||l}b9(`${s}: ${l}`)})}return{name:cJ,setupOnce(){if(!KW())return;new lJ.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){q6.set(r,!0)}}}),uJ="HttpClient",fJ=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:uJ,setup(n){EJ(n,t),$J(n,t)}}});function pJ(e,t,n,r,o){if(G6(e,n.status,n.url)){const i=SJ(t,r);let s,l,c,d;K6()&&([s,c]=H6("Cookie",i),[l,d]=H6("Set-Cookie",n));const f=Y6({url:i.url,method:i.method,status:n.status,requestHeaders:s,responseHeaders:l,requestCookies:c,responseCookies:d,error:o,type:"fetch"});rs(f)}}function H6(e,t){const n=hJ(t.headers);let r;try{const o=n[e]||n[e.toLowerCase()]||void 0;o&&(r=W6(o))}catch{}return[n,r]}function mJ(e,t,n,r,o){if(G6(e,t.status,t.responseURL)){let i,s,l;if(K6()){try{const d=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;d&&(s=W6(d))}catch{}try{l=gJ(t)}catch{}i=r}const c=Y6({url:t.responseURL,method:n,status:t.status,requestHeaders:i,responseHeaders:l,responseCookies:s,error:o,type:"xhr"});rs(c)}}function _J(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function W6(e){return e.split("; ").reduce((t,n)=>{const[r,o]=n.split("=");return r&&o&&(t[r]=o),t},{})}function hJ(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function gJ(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
521
|
+
`).reduce((n,r)=>{const[o,i]=r.split(": ");return o&&i&&(n[o]=i),n},{}):{}}function yJ(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function bJ(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function EJ(e,t){f$()&&$_(n=>{if(_e()!==e)return;const{response:r,args:o,error:i,virtualError:s}=n,[l,c]=o;r&&pJ(t,l,r,c,i||s)},!1)}function $J(e,t){"XMLHttpRequest"in Te&&t0(n=>{if(_e()!==e)return;const{error:r,virtualError:o}=n,i=n.xhr,s=i[ro];if(!s)return;const{method:l,request_headers:c}=s;try{mJ(t,i,l,c,r||o)}catch(d){de&&P.warn("Error while extracting response event form XHR response",d)}})}function G6(e,t,n){return bJ(e.failedRequestStatusCodes,t)&&yJ(e.failedRequestTargets,n)&&!tE(n,_e())}function Y6(e){const t=_e(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,i={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:_J(e.responseHeaders)}}};return Yr(i,{type:`auto.http.client.${e.type}`,handled:!1}),i}function SJ(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function K6(){const e=_e();return e?!!e.getOptions().sendDefaultPii:!1}const i0=Te,vJ=7,TJ="ContextLines",wJ=((e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:vJ;return{name:TJ,processEvent(n){return kJ(n,t)}}});function kJ(e,t){const n=i0.document,r=i0.location&&eE(i0.location.href);if(!n||!r)return e;const o=e.exception?.values;if(!o?.length)return e;const i=n.documentElement.innerHTML;if(!i)return e;const s=["<!DOCTYPE html>","<html>",...i.split(`
|
|
522
|
+
`),"</html>"];return o.forEach(l=>{const c=l.stacktrace;c?.frames&&(c.frames=c.frames.map(d=>AJ(d,s,r,t)))}),e}function AJ(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||JB(t,e,r),e}const NJ="GraphQLClient",IJ=(e=>({name:NJ,setup(t){CJ(t,e),xJ(t,e)}}));function CJ(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const i=Me(n).data||{};if(!(i[tt]==="http.client"))return;const c=i[AU]||i["http.url"]||i.url,d=i[kU]||i["http.method"];if(!rr(c)||!rr(d))return;const{endpoints:f}=t,u=or(c,f),p=J6(r);if(u&&p){const m=Z6(p);if(m){const _=X6(m);n.updateName(`${d} ${c} (${_})`),cu(m)&&n.setAttribute("graphql.document",m.query),du(m)&&(n.setAttribute("graphql.persisted_query.hash.sha256",m.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",m.extensions.persistedQuery.version))}}})}function xJ(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:i,data:s}=n;if(i==="http"&&(o==="fetch"||o==="xhr")){const f=s?.url,{endpoints:u}=t,p=or(f,u),m=J6(r);if(p&&s&&m){const _=Z6(m);if(!s.graphql&&_){const b=X6(_);s["graphql.operation"]=b,cu(_)&&(s["graphql.document"]=_.query),du(_)&&(s["graphql.persisted_query.hash.sha256"]=_.extensions.persistedQuery.sha256Hash,s["graphql.persisted_query.version"]=_.extensions.persistedQuery.version)}}}})}function X6(e){if(du(e))return`persisted ${e.operationName}`;if(cu(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=OJ(t);return r?`${o} ${r}`:`${o}`}return"unknown"}function J6(e){const t="xhr"in e;let n;if(t){const r=e.xhr[ro];n=r&&su(r.body)[0]}else{const r=n0(e.input);n=su(r)[0]}return n}function OJ(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function lu(e){return typeof e=="object"&&e!==null}function cu(e){return lu(e)&&typeof e.query=="string"}function du(e){return lu(e)&&typeof e.operationName=="string"&&lu(e.extensions)&&lu(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function Z6(e){try{const t=JSON.parse(e);return cu(t)||du(t)?t:void 0}catch{return}}const RJ=IJ,PJ=(e={})=>{const t=["script"];function n(r,o,i=0){if(!r)return;const s="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const l of s){if(!(l instanceof HTMLElement))continue;const c=hm(l,1)||void 0,d=l.tagName.toLowerCase();if(t.includes(d))continue;const f=e.onElement?.({element:l,componentName:c,tagName:d,depth:i})||{};if(f==="skip")continue;if(f==="children"){n(l,o,i+1);continue}const{x:u,y:p,width:m,height:_}=l.getBoundingClientRect(),b={identifier:l.id||void 0,type:c||d,visible:!0,alpha:1,height:_,width:m,x:u,y:p,...f},g=[];b.children=g,n(l,b.children,i+1),o.push(b)}}return{name:"ViewHierarchy",processEvent:(r,o)=>{if(r.type!==void 0||e.shouldAttach?.(r,o)===!1)return r;const i={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||be.document.body,i.windows);const s={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(i)};return o.attachments=o.attachments||[],o.attachments.push(s),r}}},bt=Te,s0="sentryReplaySession",MJ="replay_event",a0="Unable to send Replay",DJ=3e5,LJ=9e5,FJ=5e3,BJ=5500,UJ=6e4,VJ=5e3,jJ=3,Q6=15e4,uu=5e3,zJ=3e3,qJ=300,l0=2e7,HJ=4999,WJ=5e4,e5=36e5;var GJ=Object.defineProperty,YJ=(e,t,n)=>t in e?GJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,t5=(e,t,n)=>YJ(e,typeof t!="symbol"?t+"":t,n),Bt=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Bt||{});function KJ(e){return e.nodeType===e.ELEMENT_NODE}function Cl(e){return e?.host?.shadowRoot===e}function xl(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function XJ(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function JJ(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function fu(e){try{const t=e.rules||e.cssRules;return t?XJ(Array.from(t,n5).join("")):null}catch{return null}}function ZJ(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],i=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function n5(e){let t;if(eZ(e))try{t=fu(e.styleSheet)||JJ(e)}catch{}else if(tZ(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=ZJ(e)),r&&(n=QJ(n)),r||o)return n}return t||e.cssText}function QJ(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function eZ(e){return"styleSheet"in e}function tZ(e){return"selectorText"in e}let r5=class{constructor(){t5(this,"idNodeMap",new Map),t5(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function nZ(){return new r5}function pu({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Ol({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function ks(e){return e.toLowerCase()}function c0(e){return e.toUpperCase()}const o5="__rrweb_original__";function rZ(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const i=t.getImageData,s=o5 in i?i[o5]:i;if(new Uint32Array(s.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function d0(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ks(t):null}function mu(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function i5(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const s5={};function a5(e){const t=s5[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return s5[e]=r.bind(window)}function u0(...e){return a5("setTimeout")(...e)}function l5(...e){return a5("clearTimeout")(...e)}function c5(e){try{return e.contentDocument}catch{}}let oZ=1;const iZ=new RegExp("[^a-z0-9-_:]"),Rl=-2;function f0(){return oZ++}function sZ(e){if(e instanceof HTMLFormElement)return"form";const t=ks(e.tagName);return iZ.test(t)?"div":t}function aZ(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let As,d5;const lZ=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,cZ=/^(?:[a-z+]+:)?\/\//i,dZ=/^www\..*/i,uZ=/^(data:)([^,]*),(.*)/i;function fZ(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let o of n){if(o=o.trim(),!o)continue;const i=o.indexOf(":");if(i===-1){r.push(o);continue}const s=o.slice(0,i).trim();t.has(s)||r.push(o)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function _u(e,t){return(e||"").replace(lZ,(n,r,o,i,s,l)=>{const c=o||s||l,d=r||i||"";if(!c)return n;if(cZ.test(c)||dZ.test(c))return`url(${d}${c}${d})`;if(uZ.test(c))return`url(${d}${c}${d})`;if(c[0]==="/")return`url(${d}${aZ(t)+c}${d})`;const f=t.split("/"),u=c.split("/");f.pop();for(const p of u)p!=="."&&(p===".."?f.pop():f.push(p));return`url(${d}${f.join("/")}${d})`})}const pZ=/^[^ \t\n\r\u000c]+/,mZ=/^[, \t\n\r\u000c]+/;function _Z(e,t){if(t.trim()==="")return t;let n=0;function r(i){let s;const l=i.exec(t.substring(n));return l?(s=l[0],n+=s.length,s):""}const o=[];for(;r(mZ),!(n>=t.length);){let i=r(pZ);if(i.slice(-1)===",")i=Ns(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=Ns(e,i);let l=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((i+s).trim());break}else if(l)c===")"&&(l=!1);else if(c===","){n+=1,o.push((i+s).trim());break}else c==="("&&(l=!0);s+=c,n+=1}}}return o.join(", ")}const u5=new WeakMap;function Ns(e,t){return!t||t.trim()===""?t:hu(e,t)}function hZ(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function hu(e,t){let n=u5.get(e);if(n||(n=e.createElement("a"),u5.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function f5(e,t,n,r,o,i,s){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Ns(e,r);if(n==="xlink:href"&&r[0]!=="#")return Ns(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Ns(e,r);if(n==="srcset")return _Z(e,r);if(n==="style"){let l=_u(r,hu(e));return s&&s.size>0&&(l=fZ(l,s)),l}else if(t==="object"&&n==="data")return Ns(e,r);return typeof i=="function"?i(n,r,o):r}function p5(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function gZ(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const i=e.classList[o];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function yZ(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Si(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Si(e.parentNode,t,n,r+1)}function Is(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(yZ(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Cs(e,t,n,r,o,i){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const d=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(d))return!0}let l=-1,c=-1;if(i){if(c=Si(s,Is(r,o)),c<0)return!0;l=Si(s,Is(t,n),c>=0?c:1/0)}else{if(l=Si(s,Is(t,n)),l<0)return!1;c=Si(s,Is(r,o),l>=0?l:1/0)}return l>=0?c>=0?l<=c:!0:c>=0?!1:!!i}catch{}return!!i}function bZ(e,t,n){const r=e.contentWindow;if(!r)return;let o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const l=u0(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{l5(l),o=!0,t()});return}const s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return u0(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function EZ(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;const i=u0(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{l5(i),r=!0,t()})}function $Z(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:l,maskAttributeFn:c,maskTextClass:d,unmaskTextClass:f,maskTextSelector:u,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:_={},maskTextFn:b,maskInputFn:g,dataURLOptions:h={},inlineImages:y,recordCanvas:E,keepIframeSrcFn:$,newlyAddedElement:O=!1,ignoreCSSAttributes:N}=t,v=SZ(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Bt.Document,childNodes:[],compatMode:e.compatMode}:{type:Bt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Bt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return TZ(e,{doc:n,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:_,maskInputFn:g,dataURLOptions:h,inlineImages:y,recordCanvas:E,keepIframeSrcFn:$,newlyAddedElement:O,rootId:v,maskTextClass:d,unmaskTextClass:f,maskTextSelector:u,unmaskTextSelector:p,ignoreCSSAttributes:N});case e.TEXT_NODE:return vZ(e,{doc:n,maskAllText:l,maskTextClass:d,unmaskTextClass:f,maskTextSelector:u,unmaskTextSelector:p,maskTextFn:b,maskInputOptions:_,maskInputFn:g,rootId:v});case e.CDATA_SECTION_NODE:return{type:Bt.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:Bt.Comment,textContent:e.textContent||"",rootId:v};default:return!1}}function SZ(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function vZ(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:l,maskInputOptions:c,maskInputFn:d,rootId:f}=t,u=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const m=u==="STYLE"?!0:void 0,_=u==="SCRIPT"?!0:void 0,b=u==="TEXTAREA"?!0:void 0;if(m&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=fu(e.parentNode.sheet))}catch(h){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${h}`,e)}p=_u(p,hu(t.doc))}_&&(p="SCRIPT_PLACEHOLDER");const g=Cs(e,r,i,o,s,n);if(!m&&!_&&!b&&p&&g&&(p=l?l(p,e.parentElement):p.replace(/[\S]/g,"*")),b&&p&&(c.textarea||g)&&(p=d?d(p,e.parentNode):p.replace(/[\S]/g,"*")),u==="OPTION"&&p){const h=pu({type:null,tagName:u,maskInputOptions:c});p=Ol({isMasked:Cs(e,r,i,o,s,h),element:e,value:p,maskInputFn:d})}return{type:Bt.Text,textContent:p||"",isStyle:m,rootId:f}}function TZ(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:l={},maskAttributeFn:c,maskInputFn:d,dataURLOptions:f={},inlineImages:u,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:_=!1,rootId:b,maskTextClass:g,unmaskTextClass:h,maskTextSelector:y,unmaskTextSelector:E,ignoreCSSAttributes:$}=t,O=gZ(e,r,o,i),N=sZ(e);let v={};const B=e.attributes.length;for(let U=0;U<B;U++){const C=e.attributes[U];C.name&&!p5(N,C.name,C.value)&&(v[C.name]=f5(n,N,ks(C.name),C.value,e,c,$))}if(N==="link"&&s){const U=Array.from(n.styleSheets).find(A=>A.href===e.href);let C=null;U&&(C=fu(U)),C&&(v.rel=null,v.href=null,v.crossorigin=null,v._cssText=_u(C,U.href))}if(N==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const U=fu(e.sheet);U&&(v._cssText=_u(U,hu(n)))}if(N==="input"||N==="textarea"||N==="select"||N==="option"){const U=e,C=d0(U),A=mu(U,c0(N),C),R=U.checked;if(C!=="submit"&&C!=="button"&&A){const I=Cs(U,g,y,h,E,pu({type:C,tagName:c0(N),maskInputOptions:l}));v.value=Ol({isMasked:I,element:U,value:A,maskInputFn:d})}R&&(v.checked=R)}if(N==="option"&&(e.selected&&!l.select?v.selected=!0:delete v.selected),N==="canvas"&&p){if(e.__context==="2d")rZ(e)||(v.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const U=e.toDataURL(f.type,f.quality),C=n.createElement("canvas");C.width=e.width,C.height=e.height;const A=C.toDataURL(f.type,f.quality);U!==A&&(v.rr_dataURL=U)}}if(N==="img"&&u){As||(As=n.createElement("canvas"),d5=As.getContext("2d"));const U=e,C=U.currentSrc||U.getAttribute("src")||"<unknown-src>",A=U.crossOrigin,R=()=>{U.removeEventListener("load",R);try{As.width=U.naturalWidth,As.height=U.naturalHeight,d5.drawImage(U,0,0),v.rr_dataURL=As.toDataURL(f.type,f.quality)}catch(I){if(U.crossOrigin!=="anonymous"){U.crossOrigin="anonymous",U.complete&&U.naturalWidth!==0?R():U.addEventListener("load",R);return}else console.warn(`Cannot inline img src=${C}! Error: ${I}`)}U.crossOrigin==="anonymous"&&(A?v.crossOrigin=A:U.removeAttribute("crossorigin"))};U.complete&&U.naturalWidth!==0?R():U.addEventListener("load",R)}if((N==="audio"||N==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),_||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),O){const{width:U,height:C}=e.getBoundingClientRect();v={class:v.class,rr_width:`${U}px`,rr_height:`${C}px`}}N==="iframe"&&!m(v.src)&&(!O&&!c5(e)&&(v.rr_src=v.src),delete v.src);let H;try{customElements.get(N)&&(H=!0)}catch{}return{type:Bt.Element,tagName:N,attributes:v,childNodes:[],isSVG:hZ(e)||void 0,needBlock:O,rootId:b,isCustom:H}}function Et(e){return e==null?"":e.toLowerCase()}function wZ(e,t){if(t.comment&&e.type===Bt.Comment)return!0;if(e.type===Bt.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&i5(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Et(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Et(e.attributes.name)==="application-name"||Et(e.attributes.rel)==="icon"||Et(e.attributes.rel)==="apple-touch-icon"||Et(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Et(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Et(e.attributes.property).match(/^(og|twitter|fb):/)||Et(e.attributes.name).match(/^(og|twitter):/)||Et(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Et(e.attributes.name)==="robots"||Et(e.attributes.name)==="googlebot"||Et(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Et(e.attributes.name)==="author"||Et(e.attributes.name)==="generator"||Et(e.attributes.name)==="framework"||Et(e.attributes.name)==="publisher"||Et(e.attributes.name)==="progid"||Et(e.attributes.property).match(/^article:/)||Et(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Et(e.attributes.name)==="google-site-verification"||Et(e.attributes.name)==="yandex-verification"||Et(e.attributes.name)==="csrf-token"||Et(e.attributes.name)==="p:domain_verify"||Et(e.attributes.name)==="verify-v1"||Et(e.attributes.name)==="verification"||Et(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function xs(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:u,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:_={},maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOMOptions:y,dataURLOptions:E={},inlineImages:$=!1,recordCanvas:O=!1,onSerialize:N,onIframeLoad:v,iframeLoadTimeout:B=5e3,onBlockedImageLoad:H,onStylesheetLoad:U,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:R=!1,ignoreCSSAttributes:I}=t;let{preserveWhiteSpace:V=!0}=t;const j=$Z(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:l,unblockSelector:s,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:u,inlineStylesheet:m,maskInputOptions:_,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,dataURLOptions:E,inlineImages:$,recordCanvas:O,keepIframeSrcFn:A,newlyAddedElement:R,ignoreCSSAttributes:I});if(!j)return console.warn(e,"not serialized"),null;let F;r.hasNode(e)?F=r.getId(e):wZ(j,y)||!V&&j.type===Bt.Text&&!j.isStyle&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?F=Rl:F=f0();const M=Object.assign(j,{id:F});if(r.add(e,M),F===Rl)return null;N&&N(e);let Y=!p;if(M.type===Bt.Element){Y=Y&&!M.needBlock;const W=e.shadowRoot;W&&xl(W)&&(M.isShadowHost=!0)}if((M.type===Bt.Document||M.type===Bt.Element)&&Y){y.headWhitespace&&M.type===Bt.Element&&M.tagName==="head"&&(V=!1);const W={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:l,unblockSelector:s,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:u,skipChild:p,inlineStylesheet:m,maskInputOptions:_,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOMOptions:y,dataURLOptions:E,inlineImages:$,recordCanvas:O,preserveWhiteSpace:V,onSerialize:N,onIframeLoad:v,iframeLoadTimeout:B,onBlockedImageLoad:H,onStylesheetLoad:U,stylesheetLoadTimeout:C,keepIframeSrcFn:A,ignoreCSSAttributes:I},K=e.childNodes?Array.from(e.childNodes):[];for(const te of K){const X=xs(te,W);X&&M.childNodes.push(X)}if(KJ(e)&&e.shadowRoot)for(const te of Array.from(e.shadowRoot.childNodes)){const X=xs(te,W);X&&(xl(e.shadowRoot)&&(X.isShadow=!0),M.childNodes.push(X))}}if(e.parentNode&&Cl(e.parentNode)&&xl(e.parentNode)&&(M.isShadow=!0),M.type===Bt.Element&&M.tagName==="iframe"&&!M.needBlock&&bZ(e,()=>{const W=c5(e);if(W&&v){const K=xs(W,{doc:W,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:m,maskInputOptions:_,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOMOptions:y,dataURLOptions:E,inlineImages:$,recordCanvas:O,preserveWhiteSpace:V,onSerialize:N,onIframeLoad:v,iframeLoadTimeout:B,onStylesheetLoad:U,stylesheetLoadTimeout:C,keepIframeSrcFn:A,ignoreCSSAttributes:I});K&&v(e,K)}},B),M.type===Bt.Element&&M.tagName==="img"&&!e.complete&&M.needBlock){const W=e,K=()=>{if(W.isConnected&&!W.complete&&H)try{const te=W.getBoundingClientRect();te.width>0&&te.height>0&&H(W,M,te)}catch{}W.removeEventListener("load",K)};W.isConnected&&W.addEventListener("load",K)}return M.type===Bt.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&i5(M.attributes.href)==="css")&&EZ(e,()=>{if(U){const W=xs(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:m,maskInputOptions:_,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOMOptions:y,dataURLOptions:E,inlineImages:$,recordCanvas:O,preserveWhiteSpace:V,onSerialize:N,onIframeLoad:v,iframeLoadTimeout:B,onStylesheetLoad:U,stylesheetLoadTimeout:C,keepIframeSrcFn:A,ignoreCSSAttributes:I});W&&U(e,W)}},C),M.type===Bt.Element&&delete M.needBlock,M}function kZ(e,t){const{mirror:n=new r5,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:l="rr-mask",unmaskTextClass:c=null,maskTextSelector:d=null,unmaskTextSelector:f=null,inlineStylesheet:u=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:_=!1,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOM:y=!1,dataURLOptions:E,preserveWhiteSpace:$,onSerialize:O,onIframeLoad:N,iframeLoadTimeout:v,onBlockedImageLoad:B,onStylesheetLoad:H,stylesheetLoadTimeout:U,keepIframeSrcFn:C=()=>!1,ignoreCSSAttributes:A=new Set([])}=t||{};return xs(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:u,maskInputOptions:_===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:_===!1?{}:_,maskAttributeFn:b,maskTextFn:g,maskInputFn:h,slimDOMOptions:y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y,dataURLOptions:E,inlineImages:p,recordCanvas:m,preserveWhiteSpace:$,onSerialize:O,onIframeLoad:N,iframeLoadTimeout:v,onBlockedImageLoad:B,onStylesheetLoad:H,stylesheetLoadTimeout:U,keepIframeSrcFn:C,newlyAddedElement:!1,ignoreCSSAttributes:A})}function gn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Os=`Please stop import mirror directly. Instead of that,\r
|
|
523
523
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
524
|
-
or you can use record.mirror to access the mirror instance during recording.`;let m5={map:{},getId(){return console.error(Os),-1},getNode(){return console.error(Os),null},removeNodeFromMap(){console.error(Os)},has(){return console.error(Os),!1},reset(){console.error(Os)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(m5=new Proxy(m5,{get(e,t,n){return t==="map"&&console.error(Os),Reflect.get(e,t,n)}}));function Pl(e,t,n={}){let r=null,o=0;return function(...i){const s=Date.now();!o&&n.leading===!1&&(o=s);const l=t-(s-o),c=this;l<=0||l>t?(r&&(RZ(r),r=null),o=s,e.apply(c,i)):!r&&n.trailing!==!1&&(r=yu(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},l))}}function _5(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){yu(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>_5(e,t,i||{},!0)}function p_(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}let gu=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(gu=()=>new Date().getTime());function h5(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function g5(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function y5(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function b5(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Bn(e,t,n,r,o){if(!e)return!1;const i=b5(e);if(!i)return!1;const s=Is(t,n);if(!o){const d=r&&i.matches(r);return s(i)&&!d}const l=Si(i,s);let c=-1;return l<0?!1:(r&&(c=Si(i,Is(null,r))),l>-1&&c<0?!0:l<c)}function AZ(e,t){return t.getId(e)!==-1}function m_(e,t){return t.getId(e)===Rl}function E5(e,t){if(Cl(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?E5(e.parentNode,t):!0:!0}function __(e){return!!e.changedTouches}function NZ(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function $5(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function S5(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function h_(e){return!!e?.shadowRoot}class IZ{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function v5(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function CZ(e){let t=e,n;for(;n=v5(t);)t=n;return t}function xZ(e){const t=e.ownerDocument;if(!t)return!1;const n=CZ(e);return t.contains(n)}function T5(e){const t=e.ownerDocument;return t?t.contains(e)||xZ(e):!1}const w5={};function g_(e){const t=w5[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return w5[e]=r.bind(window)}function OZ(...e){return g_("requestAnimationFrame")(...e)}function yu(...e){return g_("setTimeout")(...e)}function RZ(...e){return g_("clearTimeout")(...e)}var Be=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Be||{}),Pe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Pe||{}),yn=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(yn||{}),oo=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(oo||{}),Rs=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Rs||{});function y_(e){try{return e.contentDocument}catch{}}function PZ(e){try{return e.contentWindow}catch{}}function k5(e){return"__ln"in e}class MZ{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&k5(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&k5(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const A5=(e,t)=>`${e}@${t}`;class DZ{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new MZ,o=c=>{let d=c,f=Rl;for(;f===Rl;)d=d&&d.nextSibling,f=d&&this.mirror.getId(d);return f},i=c=>{if(!c.parentNode||!T5(c))return;const d=Cl(c.parentNode)?this.mirror.getId(v5(c)):this.mirror.getId(c.parentNode),f=o(c);if(d===-1||f===-1)return r.addNode(c);const u=xs(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{$5(p,this.mirror)&&!Bn(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),S5(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),h_(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,m)=>{Bn(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(p,m),p.contentWindow&&this.canvasManager.addWindow(p.contentWindow),this.shadowDomManager.observeAttachShadow(p))},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)},onBlockedImageLoad:(p,m,{width:_,height:b})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:m.id,attributes:{style:{width:`${_}px`,height:`${b}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});u&&(t.push({parentId:d,nextId:f,node:u}),n.add(u.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)N5(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!I5(this.droppedSet,c)&&!N5(this.removes,c,this.mirror)||I5(this.movedSet,c)?i(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){const d=this.mirror.getId(s.value.parentNode),f=o(s.value);d!==-1&&f!==-1&&(c=s)}if(!c){let d=r.tail;for(;d;){const f=d;if(d=d.previous,f){const u=this.mirror.getId(f.value.parentNode);if(o(f.value)===-1)continue;if(u!==-1){c=f;break}else{const m=f.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const _=m.parentNode.host;if(this.mirror.getId(_)!==-1){c=f;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),i(c.value)}const l={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:d}=c;if(typeof d.style=="string"){const f=JSON.stringify(c.styleDiff),u=JSON.stringify(c._unchangedStyles);f.length<d.style.length&&(f+u).split("var(").length===d.style.split("var(").length&&(d.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:d}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.processMutation=t=>{if(!m_(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Cs(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,b5(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const s=d_(n),l=n.tagName;o=mu(n,l,s);const c=pu({maskInputOptions:this.maskInputOptions,tagName:l,type:s}),d=Cs(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=Ol({isMasked:d,element:n,value:o,maskInputFn:this.maskInputFn})}if(Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!y_(n))r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!p5(n.tagName,r)&&(i.attributes[r]=f5(this.doc,ks(n.tagName),ks(r),o,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(const l of Array.from(n.style)){const c=n.style.getPropertyValue(l),d=n.style.getPropertyPriority(l);c!==s.style.getPropertyValue(l)||d!==s.style.getPropertyPriority(l)?d===""?i.styleDiff[l]=c:i.styleDiff[l]=[c,d]:i._unchangedStyles[l]=[c,d]}for(const l of Array.from(s.style))n.style.getPropertyValue(l)===""&&(i.styleDiff[l]=!1)}break}case"childList":{if(Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=Cl(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||m_(n,this.mirror)||!AZ(n,this.mirror)||(this.addedSet.has(n)?(b_(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||E5(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[A5(r,o)]?b_(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Cl(t.target)&&xl(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(m_(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[A5(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Bn(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),h_(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function b_(e,t){e.delete(t),t.childNodes?.forEach(n=>b_(e,n))}function N5(e,t,n){return e.length===0?!1:LZ(e,t,n)}function LZ(e,t,n){let r=t.parentNode;for(;r;){const o=n.getId(r);if(e.some(i=>i.id===o))return!0;r=r.parentNode}return!1}function I5(e,t){return e.size===0?!1:C5(e,t)}function C5(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:C5(e,n):!1}let Ml;function FZ(e){Ml=e}function BZ(){Ml=void 0}const Xe=e=>Ml?(...n)=>{try{return e(...n)}catch(r){if(Ml&&Ml(r)===!0)return()=>{};throw r}}:e,Ps=[];function Dl(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function x5(e,t){const n=new DZ;Ps.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const i=new r(Xe(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function UZ({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],l;const c=Pl(Xe(u=>{const p=Date.now()-l;e(s.map(m=>(m.timeOffset-=p,m)),u),s=[],l=null}),i),d=Xe(Pl(Xe(u=>{const p=Dl(u),{clientX:m,clientY:_}=__(u)?u.changedTouches[0]:u;l||(l=gu()),s.push({x:m,y:_,id:r.getId(p),timeOffset:gu()-l}),c(typeof DragEvent<"u"&&u instanceof DragEvent?Pe.Drag:u instanceof MouseEvent?Pe.MouseMove:Pe.TouchMove)}),o,{trailing:!1})),f=[gn("mousemove",d,n),gn("touchmove",d,n),gn("drag",d,n)];return Xe(()=>{f.forEach(u=>u())})}function VZ({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const l=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[];let d=null;const f=u=>p=>{const m=Dl(p);if(Bn(m,r,o,i,!0))return;let _=null,b=u;if("pointerType"in p){switch(p.pointerType){case"mouse":_=oo.Mouse;break;case"touch":_=oo.Touch;break;case"pen":_=oo.Pen;break}_===oo.Touch?yn[u]===yn.MouseDown?b="TouchStart":yn[u]===yn.MouseUp&&(b="TouchEnd"):oo.Pen}else __(p)&&(_=oo.Touch);_!==null?(d=_,(b.startsWith("Touch")&&_===oo.Touch||b.startsWith("Mouse")&&_===oo.Mouse)&&(_=null)):yn[u]===yn.Click&&(_=d,d=null);const g=__(p)?p.changedTouches[0]:p;if(!g)return;const h=n.getId(m),{clientX:y,clientY:E}=g;Xe(e)({type:yn[b],id:h,x:y,y:E,..._!==null&&{pointerType:_}})};return Object.keys(yn).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&l[u]!==!1).forEach(u=>{let p=ks(u);const m=f(u);if(window.PointerEvent)switch(yn[u]){case yn.MouseDown:case yn.MouseUp:p=p.replace("mouse","pointer");break;case yn.TouchStart:case yn.TouchEnd:return}c.push(gn(p,m,t))}),Xe(()=>{c.forEach(u=>u())})}function O5({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){const l=Xe(Pl(Xe(c=>{const d=Dl(c);if(!d||Bn(d,r,o,i,!0))return;const f=n.getId(d);if(d===t&&t.defaultView){const u=h5(t.defaultView);e({id:f,x:u.left,y:u.top})}else e({id:f,x:d.scrollLeft,y:d.scrollTop})}),s.scroll||100));return gn("scroll",l,t)}function jZ({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=Xe(Pl(Xe(()=>{const i=g5(),s=y5();(n!==i||r!==s)&&(e({width:Number(s),height:Number(i)}),n=i,r=s)}),200));return gn("resize",o,t)}const zZ=["INPUT","TEXTAREA","SELECT"],R5=new WeakMap;function qZ({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:l,maskInputOptions:c,maskInputFn:d,sampling:f,userTriggeredOnInput:u,maskTextClass:p,unmaskTextClass:m,maskTextSelector:_,unmaskTextSelector:b}){function g(v){let B=Dl(v);const H=v.isTrusted,U=B&&c_(B.tagName);if(U==="OPTION"&&(B=B.parentElement),!B||!U||zZ.indexOf(U)<0||Bn(B,r,o,i,!0))return;const C=B;if(C.classList.contains(s)||l&&C.matches(l))return;const A=d_(B);let R=mu(C,U,A),I=!1;const V=pu({maskInputOptions:c,tagName:U,type:A}),j=Cs(B,p,_,m,b,V);(A==="radio"||A==="checkbox")&&(I=B.checked),R=Ol({isMasked:j,element:B,value:R,maskInputFn:d}),h(B,u?{text:R,isChecked:I,userTriggered:H}:{text:R,isChecked:I});const F=B.name;A==="radio"&&F&&I&&t.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(M=>{if(M!==B){const Y=Ol({isMasked:j,element:M,value:mu(M,U,A),maskInputFn:d});h(M,u?{text:Y,isChecked:!I,userTriggered:!1}:{text:Y,isChecked:!I})}})}function h(v,B){const H=R5.get(v);if(!H||H.text!==B.text||H.isChecked!==B.isChecked){R5.set(v,B);const U=n.getId(v);Xe(e)({...B,id:U})}}const E=(f.input==="last"?["change"]:["input","change"]).map(v=>gn(v,Xe(g),t)),$=t.defaultView;if(!$)return()=>{E.forEach(v=>v())};const O=$.Object.getOwnPropertyDescriptor($.HTMLInputElement.prototype,"value"),N=[[$.HTMLInputElement.prototype,"value"],[$.HTMLInputElement.prototype,"checked"],[$.HTMLSelectElement.prototype,"value"],[$.HTMLTextAreaElement.prototype,"value"],[$.HTMLSelectElement.prototype,"selectedIndex"],[$.HTMLOptionElement.prototype,"selected"]];return O&&O.set&&E.push(...N.map(v=>_5(v[0],v[1],{set(){Xe(g)({target:this,isTrusted:!1})}},!1,$))),Xe(()=>{E.forEach(v=>v())})}function bu(e){const t=[];function n(r,o){if(Eu("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Eu("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Eu("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Eu("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else if(r.parentStyleSheet){const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function Ro(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function HZ({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Xe((f,u,p)=>{const[m,_]=p,{id:b,styleId:g}=Ro(u,t,n.styleMirror);return(b&&b!==-1||g&&g!==-1)&&e({id:b,styleId:g,adds:[{rule:m,index:_}]}),f.apply(u,p)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Xe((f,u,p)=>{const[m]=p,{id:_,styleId:b}=Ro(u,t,n.styleMirror);return(_&&_!==-1||b&&b!==-1)&&e({id:_,styleId:b,removes:[{index:m}]}),f.apply(u,p)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Xe((f,u,p)=>{const[m]=p,{id:_,styleId:b}=Ro(u,t,n.styleMirror);return(_&&_!==-1||b&&b!==-1)&&e({id:_,styleId:b,replace:m}),f.apply(u,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:Xe((f,u,p)=>{const[m]=p,{id:_,styleId:b}=Ro(u,t,n.styleMirror);return(_&&_!==-1||b&&b!==-1)&&e({id:_,styleId:b,replaceSync:m}),f.apply(u,p)})}));const c={};$u("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:($u("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),$u("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),$u("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const d={};return Object.entries(c).forEach(([f,u])=>{d[f]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(d[f].insertRule,{apply:Xe((p,m,_)=>{const[b,g]=_,{id:h,styleId:y}=Ro(m.parentStyleSheet,t,n.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,adds:[{rule:b,index:[...bu(m),g||0]}]}),p.apply(m,_)})}),u.prototype.deleteRule=new Proxy(d[f].deleteRule,{apply:Xe((p,m,_)=>{const[b]=_,{id:g,styleId:h}=Ro(m.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||h&&h!==-1)&&e({id:g,styleId:h,removes:[{index:[...bu(m),b]}]}),p.apply(m,_)})})}),Xe(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(c).forEach(([f,u])=>{u.prototype.insertRule=d[f].insertRule,u.prototype.deleteRule=d[f].deleteRule})})}function P5({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,i=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(s){const l=i.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return l}}),Xe(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function WZ({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Xe((l,c,d)=>{const[f,u,p]=d;if(n.has(f))return i.apply(c,[f,u,p]);const{id:m,styleId:_}=Ro(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,set:{property:f,value:u,priority:p},index:bu(c.parentRule)}),l.apply(c,d)})});const s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Xe((l,c,d)=>{const[f]=d;if(n.has(f))return s.apply(c,[f]);const{id:u,styleId:p}=Ro(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(u&&u!==-1||p&&p!==-1)&&e({id:u,styleId:p,remove:{property:f},index:bu(c.parentRule)}),l.apply(c,d)})}),Xe(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function GZ({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:s}){const l=Xe(d=>Pl(Xe(f=>{const u=Dl(f);if(!u||Bn(u,t,n,r,!0))return;const{currentTime:p,volume:m,muted:_,playbackRate:b}=u;e({type:d,id:o.getId(u),currentTime:p,volume:m,muted:_,playbackRate:b})}),i.media||500)),c=[gn("play",l(Rs.Play),s),gn("pause",l(Rs.Pause),s),gn("seeked",l(Rs.Seeked),s),gn("volumechange",l(Rs.VolumeChange),s),gn("ratechange",l(Rs.RateChange),s)];return Xe(()=>{c.forEach(d=>d())})}function YZ({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(c,d,f){const u=new i(c,d,f);return o.set(u,{family:c,buffer:typeof d!="string",descriptors:f,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),u};const s=p_(t.fonts,"add",function(l){return function(c){return yu(Xe(()=>{const d=o.get(c);d&&(e(d),o.delete(c))}),0),l.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(s),Xe(()=>{r.forEach(l=>l())})}function KZ(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:s}=e;let l=!0;const c=Xe(()=>{const d=t.getSelection();if(!d||l&&d?.isCollapsed)return;l=d.isCollapsed||!1;const f=[],u=d.rangeCount||0;for(let p=0;p<u;p++){const m=d.getRangeAt(p),{startContainer:_,startOffset:b,endContainer:g,endOffset:h}=m;Bn(_,r,o,i,!0)||Bn(g,r,o,i,!0)||f.push({start:n.getId(_),startOffset:b,end:n.getId(g),endOffset:h})}s({ranges:f})});return c(),gn("selectionchange",c)}function XZ({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:p_(n.customElements,"define",function(o){return function(i,s,l){try{t({define:{name:i}})}catch{}return o.apply(this,[i,s,l])}})}function JZ(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=x5(e,e.doc));const o=UZ(e),i=VZ(e),s=O5(e),l=jZ(e,{win:n}),c=qZ(e),d=GZ(e);let f=()=>{},u=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(f=HZ(e,{win:n}),u=P5(e,e.doc),p=WZ(e,{win:n}),e.collectFonts&&(m=YZ(e)));const _=KZ(e),b=XZ(e),g=[];for(const h of e.plugins)g.push(h.observer(h.callback,n,h.options));return Xe(()=>{Ps.forEach(h=>h.reset()),r?.disconnect(),o(),i(),s(),l(),c(),d(),f(),u(),p(),m(),_(),b(),g.forEach(h=>h())})}function Eu(e){return typeof window[e]<"u"}function $u(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class E_{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){const i=r||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t);let l=i.get(n);return l||(l=this.generateIdFn(),i.set(n,l),s.set(l,n)),l}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=o.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class ZZ{constructor(){this.crossOriginIframeMirror=new E_(f_),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class QZ{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new E_(f_),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new E_(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=y_(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const i=this.transformCrossOriginEvent(o,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case Be.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:Be.IncrementalSnapshot,data:{source:Pe.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Be.Meta:case Be.Load:case Be.DomContentLoaded:return!1;case Be.Plugin:return n;case Be.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Be.IncrementalSnapshot:switch(n.data.source){case Pe.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Pe.Drag:case Pe.TouchMove:case Pe.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Pe.ViewportResize:return!1;case Pe.MediaInteraction:case Pe.MouseInteraction:case Pe.Scroll:case Pe.CanvasMutation:case Pe.Input:return this.replaceIds(n.data,t,["id"]),n;case Pe.StyleSheetRule:case Pe.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Pe.Font:return n;case Pe.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case Pe.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Bt.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class eQ{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class tQ{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!xl(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=x5({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(O5({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),yu(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(P5({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=y_(t),r=PZ(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(p_(t.prototype,"attachShadow",function(o){return function(i){const s=o.call(this,i);return this.shadowRoot&&T5(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var M5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nQ=typeof Uint8Array>"u"?[]:new Uint8Array(256),Su=0;Su<M5.length;Su++)nQ[M5.charCodeAt(Su)]=Su;class D5{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class rQ{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new IZ,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},o=[];for(const i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(l,c)=>({rule:n5(l),index:c}))})),r.styleIds.push(s)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class oQ{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,OZ(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let It,vu;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const dr=nZ();function ur(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:l="rr-ignore",ignoreSelector:c=null,maskAllText:d=!1,maskTextClass:f="rr-mask",unmaskTextClass:u=null,maskTextSelector:p=null,unmaskTextSelector:m=null,inlineStylesheet:_=!0,maskAllInputs:b,maskInputOptions:g,slimDOMOptions:h,maskAttributeFn:y,maskInputFn:E,maskTextFn:$,maxCanvasSize:O=null,packFn:N,sampling:v={},dataURLOptions:B={},mousemoveWait:H,recordDOM:U=!0,recordCanvas:C=!1,recordCrossOriginIframes:A=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:V=!1,inlineImages:j=!1,plugins:F,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:W,onMutation:K,getCanvasManager:te}=e;FZ(W);const X=A?window.parent===window:!0;let oe=!1;if(!X)try{window.parent.document&&(oe=!1)}catch{oe=!0}if(X&&!t)throw new Error("emit function is required");if(!X&&!oe)return()=>{};H!==void 0&&v.mousemove===void 0&&(v.mousemove=H),dr.reset();const fe=b===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g!==void 0?g:{},J=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};NZ();let ae,ye=0;const $e=k=>{for(const q of F||[])q.eventProcessor&&(k=q.eventProcessor(k));return N&&!oe&&(k=N(k)),k};It=(k,q)=>{const ee=k;if(ee.timestamp=gu(),Ps[0]?.isFrozen()&&ee.type!==Be.FullSnapshot&&!(ee.type===Be.IncrementalSnapshot&&ee.data.source===Pe.Mutation)&&Ps.forEach(le=>le.unfreeze()),X)t?.($e(ee),q);else if(oe){const le={type:"rrweb",event:$e(ee),origin:window.location.origin,isCheckout:q};window.parent.postMessage(le,"*")}if(ee.type===Be.FullSnapshot)ae=ee,ye=0;else if(ee.type===Be.IncrementalSnapshot){if(ee.data.source===Pe.Mutation&&ee.data.isAttachIframe)return;ye++;const le=r&&ye>=r,ce=n&&ae&&ee.timestamp-ae.timestamp>n;(le||ce)&&T(!0)}};const Ie=k=>{It({type:Be.IncrementalSnapshot,data:{source:Pe.Mutation,...k}})},je=k=>It({type:Be.IncrementalSnapshot,data:{source:Pe.Scroll,...k}}),we=k=>It({type:Be.IncrementalSnapshot,data:{source:Pe.CanvasMutation,...k}}),Le=k=>It({type:Be.IncrementalSnapshot,data:{source:Pe.AdoptedStyleSheet,...k}}),Fe=new rQ({mutationCb:Ie,adoptedStyleSheetCb:Le}),Ye=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new ZZ:new QZ({mirror:dr,mutationCb:Ie,stylesheetManager:Fe,recordCrossOriginIframes:A,wrappedEmit:It});for(const k of F||[])k.getMirror&&k.getMirror({nodeMirror:dr,crossOriginIframeMirror:Ye.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ye.crossOriginIframeStyleMirror});const ke=new oQ,Ze=sQ(te,{mirror:dr,win:window,mutationCb:k=>It({type:Be.IncrementalSnapshot,data:{source:Pe.CanvasMutation,...k}}),recordCanvas:C,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:O,sampling:v.canvas,dataURLOptions:B,errorHandler:W}),w=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new eQ:new tQ({mutationCb:Ie,scrollCb:je,bypassOptions:{onMutation:K,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:d,maskTextClass:f,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:_,maskInputOptions:fe,dataURLOptions:B,maskAttributeFn:y,maskTextFn:$,maskInputFn:E,recordCanvas:C,inlineImages:j,sampling:v,slimDOMOptions:J,iframeManager:Ye,stylesheetManager:Fe,canvasManager:Ze,keepIframeSrcFn:M,processedNodeManager:ke,ignoreCSSAttributes:Y},mirror:dr}),T=(k=!1)=>{if(!U)return;It({type:Be.Meta,data:{href:window.location.href,width:y5(),height:g5()}},k),Fe.reset(),w.init(),Ps.forEach(ee=>ee.lock());const q=kZ(document,{mirror:dr,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:d,maskTextClass:f,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:_,maskAllInputs:fe,maskAttributeFn:y,maskInputFn:E,maskTextFn:$,slimDOM:J,dataURLOptions:B,recordCanvas:C,inlineImages:j,onSerialize:ee=>{$5(ee,dr)&&Ye.addIframe(ee),S5(ee,dr)&&Fe.trackLinkElement(ee),h_(ee)&&w.addShadowRoot(ee.shadowRoot,document)},onIframeLoad:(ee,le)=>{Ye.attachIframe(ee,le),ee.contentWindow&&Ze.addWindow(ee.contentWindow),w.observeAttachShadow(ee)},onStylesheetLoad:(ee,le)=>{Fe.attachLinkElement(ee,le)},onBlockedImageLoad:(ee,le,{width:ce,height:ot})=>{Ie({adds:[],removes:[],texts:[],attributes:[{id:le.id,attributes:{style:{width:`${ce}px`,height:`${ot}px`}}}]})},keepIframeSrcFn:M,ignoreCSSAttributes:Y});if(!q)return console.warn("Failed to snapshot the document");It({type:Be.FullSnapshot,data:{node:q,initialOffset:h5(window)}}),Ps.forEach(ee=>ee.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Fe.adoptStyleSheets(document.adoptedStyleSheets,dr.getId(document))};vu=T;try{const k=[],q=le=>Xe(JZ)({onMutation:K,mutationCb:Ie,mousemoveCb:(ce,ot)=>It({type:Be.IncrementalSnapshot,data:{source:ot,positions:ce}}),mouseInteractionCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.MouseInteraction,...ce}}),scrollCb:je,viewportResizeCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.ViewportResize,...ce}}),inputCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.Input,...ce}}),mediaInteractionCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.MediaInteraction,...ce}}),styleSheetRuleCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.StyleSheetRule,...ce}}),styleDeclarationCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.StyleDeclaration,...ce}}),canvasMutationCb:we,fontCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.Font,...ce}}),selectionCb:ce=>{It({type:Be.IncrementalSnapshot,data:{source:Pe.Selection,...ce}})},customElementCb:ce=>{It({type:Be.IncrementalSnapshot,data:{source:Pe.CustomElement,...ce}})},blockClass:o,ignoreClass:l,ignoreSelector:c,maskAllText:d,maskTextClass:f,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:m,maskInputOptions:fe,inlineStylesheet:_,sampling:v,recordDOM:U,recordCanvas:C,inlineImages:j,userTriggeredOnInput:I,collectFonts:V,doc:le,maskAttributeFn:y,maskInputFn:E,maskTextFn:$,keepIframeSrcFn:M,blockSelector:i,unblockSelector:s,slimDOMOptions:J,dataURLOptions:B,mirror:dr,iframeManager:Ye,stylesheetManager:Fe,shadowDomManager:w,processedNodeManager:ke,canvasManager:Ze,ignoreCSSAttributes:Y,plugins:F?.filter(ce=>ce.observer)?.map(ce=>({observer:ce.observer,options:ce.options,callback:ot=>It({type:Be.Plugin,data:{plugin:ce.name,payload:ot}})}))||[]},{});Ye.addLoadListener(le=>{try{k.push(q(le.contentDocument))}catch(ce){console.warn(ce)}});const ee=()=>{T(),k.push(q(document))};return document.readyState==="interactive"||document.readyState==="complete"?ee():(k.push(gn("DOMContentLoaded",()=>{It({type:Be.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&ee()})),k.push(gn("load",()=>{It({type:Be.Load,data:{}}),R==="load"&&ee()},window))),()=>{k.forEach(le=>le()),ke.destroy(),vu=void 0,BZ()}}catch(k){console.warn(k)}}function iQ(e){if(!vu)throw new Error("please take full snapshot after start recording");vu(e)}ur.mirror=dr,ur.takeFullSnapshot=iQ;function sQ(e,t){try{return e?e(t):new D5}catch{return console.warn("Unable to initialize CanvasManager"),new D5}}var L5;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(L5||(L5={}));const aQ=3,lQ=5;function $_(e){return e>9999999999?e:e*1e3}function S_(e){return e>9999999999?e/1e3:e}function Ll(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Be.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:tn(t,10,1e3)}}),t.category==="console")))}const cQ="button,a";function F5(e){return e.closest(cQ)||e}function B5(e){const t=U5(e);return!t||!(t instanceof Element)?t:F5(t)}function U5(e){return dQ(e)?e.target:e}function dQ(e){return typeof e=="object"&&!!e&&"target"in e}let Po;function uQ(e){return Po||(Po=[],fQ()),Po.push(e),()=>{const t=Po?Po.indexOf(e):-1;t>-1&&Po.splice(t,1)}}function fQ(){Qt(bt,"open",function(e){return function(...t){if(Po)try{Po.forEach(n=>n())}catch{}return e.apply(bt,t)}})}const pQ=new Set([Pe.Mutation,Pe.StyleSheetRule,Pe.StyleDeclaration,Pe.AdoptedStyleSheet,Pe.CanvasMutation,Pe.Selection,Pe.MediaInteraction]);function mQ(e,t,n){e.handleClick(t,n)}class _Q{constructor(t,n,r=Ll){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=uQ(()=>{this._lastMutation=V5()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(gQ(n,this._ignoreSelector)||!yQ(t))return;const r={timestamp:S_(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=S_(t)}registerScroll(t=Date.now()){this._lastScroll=S_(t)}registerClick(t){const n=F5(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=V5();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!o,{clickCount:s,clickBreadcrumb:l}=t;if(i){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,d=c<this._timeout*1e3?"mutation":"timeout",f={type:"default",message:l.message,timestamp:l.timestamp,category:"ui.slowClickDetected",data:{...l.data,url:bt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:d,clickCount:s||1}};this._addBreadcrumbEvent(n,f);return}if(s>1){const c={type:"default",message:l.message,timestamp:l.timestamp,category:"ui.multiClick",data:{...l.data,url:bt.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Il(()=>this._checkClicks(),1e3)}}const hQ=["A","BUTTON","INPUT"];function gQ(e,t){return!!(!hQ.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function yQ(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function V5(){return Date.now()/1e3}function bQ(e,t){try{if(!EQ(t))return;const{source:n}=t.data;if(pQ.has(n)&&e.registerMutation(t.timestamp),n===Pe.Scroll&&e.registerScroll(t.timestamp),$Q(t)){const{type:r,id:o}=t.data,i=ur.mirror.getNode(o);i instanceof HTMLElement&&r===yn.Click&&e.registerClick(i)}}catch{}}function EQ(e){return e.type===aQ}function $Q(e){return e.data.source===Pe.MouseInteraction}function Ar(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Tu=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Tu||{});const SQ=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function vQ(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(SQ.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const TQ=e=>t=>{if(!e.isEnabled())return;const n=wQ(t);if(!n)return;const r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&mQ(e.clickDetector,n,B5(t.event)),Ll(e,n)};function j5(e,t){const n=ur.mirror.getId(e),r=n&&ur.mirror.getNode(n),o=r&&ur.mirror.getMeta(r),i=o&&AQ(o)?o:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===Tu.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:vQ(i.attributes)}}:{}}}function wQ(e){const{target:t,message:n}=kQ(e);return Ar({category:`ui.${e.name}`,...j5(t,n)})}function kQ(e){const t=e.name==="click";let n,r=null;try{r=t?B5(e.event):U5(e.event),n=Vt(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function AQ(e){return e.type===Tu.Element}function NQ(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=IQ(t);n&&Ll(e,n)}function IQ(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:s}=e;if(!s||CQ(s)||!i)return null;const l=t||r||o,c=i.length===1;if(!l&&c)return null;const d=Vt(s,{maxStringLength:200})||"<unknown>",f=j5(s,d);return Ar({category:"ui.keyDown",message:d,data:{...f.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i}})}function CQ(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const xQ={resource:DQ,paint:PQ,navigation:MQ};function v_(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function OQ(e){return e.map(RQ).filter(Boolean)}function RQ(e){const t=xQ[e.entryType];return t?t(e):null}function Ms(e){return((Ft()||bt.performance.timeOrigin)+e)/1e3}function PQ(e){const{duration:t,entryType:n,name:r,startTime:o}=e,i=Ms(o);return{type:n,name:r,start:i,end:i+t,data:void 0}}function MQ(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:l,domContentLoadedEventEnd:c,domInteractive:d,loadEventStart:f,loadEventEnd:u,redirectCount:p,startTime:m,transferSize:_,type:b}=e;return o===0?null:{type:`${t}.${b}`,start:Ms(m),end:Ms(i),name:n,data:{size:_,decodedBodySize:r,encodedBodySize:s,duration:o,domInteractive:d,domContentLoadedEventStart:l,domContentLoadedEventEnd:c,loadEventStart:f,loadEventEnd:u,domComplete:i,redirectCount:p}}}function DQ(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:l,responseStatus:c,transferSize:d}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Ms(i),end:Ms(o),name:r,data:{size:d,statusCode:c,decodedBodySize:s,encodedBodySize:l}}}function LQ(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return T_(e,"largest-contentful-paint",n)}function FQ(e){return e.sources!==void 0}function BQ(e){const t=[],n=[];for(const r of e.entries)if(FQ(r)){const o=[];for(const i of r.sources)if(i.node){n.push(i.node);const s=ur.mirror.getId(i.node);s&&o.push(s)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return T_(e,"cumulative-layout-shift",n,t)}function UQ(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return T_(e,"interaction-to-next-paint",n)}function T_(e,t,n,r){const o=e.value,i=e.rating,s=Ms(o);return{type:"web-vital",name:t,start:s,end:s,data:{value:o,size:o,rating:i,nodeIds:n?n.map(l=>ur.mirror.getId(l)):void 0,attributions:r}}}function VQ(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(o=>{r.push($i(o,n))}),r.push(Jd(v_(LQ,e)),Xd(v_(BQ,e)),G0(v_(UQ,e))),()=>{r.forEach(o=>o())}}const Ae=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,jQ='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function zQ(){const e=new Blob([jQ]);return URL.createObjectURL(e)}const z5=["log","warn","error"],wu="[Replay] ";function w_(e,t="info"){sr({category:"console",data:{logger:"replay"},level:t,message:`${wu}${e}`},{level:t})}function qQ(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return Ae?(z5.forEach(r=>{n[r]=(...o)=>{P[r](wu,...o),t&&w_(o.join(""),fd(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),P.error(wu,r),e?lt(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&w_(r,"error")},n.infoTick=(...r)=>{P.log(wu,...r),t&&setTimeout(()=>w_(r[0]),0)}):z5.forEach(r=>{n[r]=()=>{}}),n}const Ne=qQ();class k_ extends Error{constructor(){super(`Event buffer exceeded maximum size of ${l_}.`)}}class q5{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>l_)throw new k_;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:$_(t)}}class A_{constructor(t){A_.prototype.__init.call(this),this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(Ae&&Ne.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{Ae&&Ne.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){Ae&&Ne.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((o,i)=>{this._pending.set(r,{method:t,resolve:o,reject:i});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(s){this._pending.delete(r),i(s)}})}__init(){this._onMessage=({data:t})=>{const n=t;if(typeof n.id!="number")return;const r=this._pending.get(n.id);if(!(!r||r.method!==n.method)){if(this._pending.delete(n.id),!n.success){Ae&&Ne.error("Error in compression worker: ",n.response),r.reject(new Error("Error in compression worker"));return}r.resolve(n.response)}}}_getAndIncrementId(){return this._id++}}class HQ{constructor(t){this._worker=new A_(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=$_(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>l_?Promise.reject(new k_):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Ae&&Ne.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class WQ{constructor(t){this._fallback=new q5,this._compression=new HQ(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){Ae&&Ne.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(const i of t)o.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(i){Ae&&Ne.exception(i,"Failed to add events when switching buffers.")}}}function GQ({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=YQ(t);if(n)return n}return Ae&&Ne.log("Using simple buffer"),new q5}function YQ(e){try{const t=e||KQ();if(!t)return;Ae&&Ne.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new WQ(n)}catch(t){Ae&&Ne.exception(t,"Failed to create compression worker")}}function KQ(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?zQ():""}function N_(){try{return"sessionStorage"in bt&&!!bt.sessionStorage}catch{return!1}}function XQ(e){JQ(),e.session=void 0}function JQ(){if(N_())try{bt.sessionStorage.removeItem(s_)}catch{}}function H5(e){return e===void 0?!1:Math.random()<e}function ku(e){if(N_())try{bt.sessionStorage.setItem(s_,JSON.stringify(e))}catch{}}function W5(e){const t=Date.now(),n=e.id||jt(),r=e.started||t,o=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,l=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:o,segmentId:i,sampled:s,previousSessionId:l,dirty:c}}function ZQ(e,t){return H5(e)?"session":t?"buffer":!1}function G5({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=ZQ(e,t),i=W5({sampled:o,previousSessionId:r});return n&&ku(i),i}function QQ(){if(!N_())return null;try{const e=bt.sessionStorage.getItem(s_);if(!e)return null;const t=JSON.parse(e);return Ae&&Ne.infoTick("Loading existing session"),W5(t)}catch{return null}}function I_(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Y5(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return I_(e.started,t,r)||I_(e.lastActivity,n,r)}function K5(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Y5(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function C_({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&QQ();return o?K5(o,{sessionIdleExpire:e,maxReplayDuration:t})?(Ae&&Ne.infoTick("Session in sessionStorage is expired, creating new one..."),G5(r,{previousSessionId:o.id})):o:(Ae&&Ne.infoTick("Creating new session"),G5(r,{previousSessionId:n}))}function eee(e){return e.type===Be.Custom}function x_(e,t,n){return J5(e,t)?(X5(e,t,n),!0):!1}function tee(e,t,n){return J5(e,t)?X5(e,t,n):Promise.resolve(null)}async function X5(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=e.getOptions(),s=nee(t,i.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(i){const s=i&&i instanceof k_,l=s?"eventBufferOverflow":"eventBufferError",c=_e();if(c){const d=s?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(d,"replay")}if(s&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:l})}}function J5(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=$_(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Ae&&Ne.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function nee(e,t){try{if(typeof t=="function"&&eee(e))return t(e)}catch(n){return Ae&&Ne.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function O_(e){return!e.type}function R_(e){return e.type==="transaction"}function ree(e){return e.type==="replay_event"}function Z5(e){return e.type==="feedback"}function oee(e){return(t,n)=>{if(!e.isEnabled()||!O_(t)&&!R_(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(R_(t)){iee(e,t);return}see(e,t)}}}function iee(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function see(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Il(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function aee(e){return t=>{!e.isEnabled()||!O_(t)||lee(e,t)}}function lee(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=Ar({category:"replay.hydrate-error",data:{url:ni()}});Ll(e,r)}}function cee(e){const t=_e();t&&t.on("beforeAddBreadcrumb",n=>dee(e,n))}function dee(e,t){if(!e.isEnabled()||!Q5(t))return;const n=uee(t);n&&Ll(e,n)}function uee(e){return!Q5(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?fee(e):Ar(e)}function fee(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return Ar(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>uu?(n=!0,`${o.slice(0,uu)}…`):o;if(typeof o=="object")try{const i=tn(o,7);return JSON.stringify(i).length>uu?(n=!0,`${JSON.stringify(i,null,2).slice(0,uu)}…`):i}catch{}return o});return Ar({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Q5(e){return!!e.category}function pee(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function e8(){const e=Re().getPropagationContext().dsc;e&&delete e.replay_id;const t=wt();if(t){const n=Wn(t);delete n.replay_id}}function mee(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Be.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function _ee(e,t){return e.recordingMode!=="buffer"||t.message===a_||!t.exception||t.type?!1:H5(e.getOptions().errorSampleRate)}function hee(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(ree(t))return delete t.breadcrumbs,t;if(!O_(t)&&!R_(t)&&!Z5(t))return t;if(!e.checkAndHandleExpiredSession())return e8(),t;if(Z5(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),mee(e,t),t;if(pee(t,n)&&!e.getOptions()._experiments.captureExceptions)return Ae&&Ne.log("Ignoring error from rrweb internals",t),null;const o=_ee(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const s=e.session;s.dirty=!0,e.getOptions().stickySession&&ku(s)}return t},{id:"Replay"})}function Au(e,t){return t.map(({type:n,start:r,end:o,name:i,data:s})=>{const l=e.throttledAddEvent({type:Be.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:o,data:s}}});return typeof l=="string"?Promise.resolve(null):l})}function gee(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function yee(e){return t=>{if(!e.isEnabled())return;const n=gee(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Au(e,[n]),!1)))}}function bee(e,t){return Ae&&e.getOptions()._experiments.traceInternals?!1:tE(t,_e())}function t8(e,t){e.isEnabled()&&t!==null&&(bee(e,t.name)||e.addUpdate(()=>(Au(e,[t]),!0)))}function Nu(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=T6(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function n8(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Iu(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function r8(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:s,request:l,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:i,statusCode:s,request:l,response:c}}}function Fl(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Mo(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:i}=Eee(n);return r.body=o,i?.length&&(r._meta={warnings:i}),r}function P_(e,t){return Object.entries(e).reduce((n,[r,o])=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=o),n},{})}function Eee(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Q6,n=$ee(e);if(t){const r=e.slice(0,Q6);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function $ee(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Cu(e,t){const n=See(e);return or(n,t)}function See(e,t=bt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(bt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function vee(e,t,n){try{const r=await wee(e,t,n),o=r8("resource.fetch",r);t8(n.replay,o)}catch(r){Ae&&Ne.exception(r,"Failed to capture fetch breadcrumb")}}function Tee(e,t){const{input:n,response:r}=t,o=n?n_(n):void 0,i=Nu(o),s=r?n8(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}async function wee(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=t,{url:s,method:l,status_code:c=0,request_body_size:d,response_body_size:f}=e.data,u=Cu(s,n.networkDetailAllowUrls)&&!Cu(s,n.networkDetailDenyUrls),p=u?kee(n,t.input,d):Fl(d),m=await Aee(u,n,t.response,f);return{startTimestamp:o,endTimestamp:i,url:s,method:l,statusCode:c,request:p,response:m}}function kee({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?Cee(n,t):{};if(!e)return Mo(o,r,void 0);const i=n_(n),[s,l]=su(i,Ne),c=Mo(o,r,s);return l?Iu(c,l):c}async function Aee(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return Fl(o);const i=r?o8(r.headers,n):{};if(!r||!t&&o!==void 0)return Mo(i,o,void 0);const[s,l]=await Iee(r),c=Nee(s,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});return l?Iu(c,l):c}function Nee(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const i=e?.length&&n===void 0?Nu(e):n;return r?t?Mo(o,i,e):Mo(o,i,void 0):Fl(i)}catch(i){return Ae&&Ne.exception(i,"Failed to serialize response body"),Mo(o,n,void 0)}}async function Iee(e){const t=xee(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Oee(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(Ae&&Ne.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Ae&&Ne.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function o8(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Cee(e,t){return e.length===1&&typeof e[0]!="string"?i8(e[0],t):e.length===2?i8(e[1],t):{}}function i8(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?o8(n,t):Array.isArray(n)?{}:P_(n,t):{}}function xee(e){try{return e.clone()}catch(t){Ae&&Ne.exception(t,"Failed to clone response body")}}function Oee(e){return new Promise((t,n)=>{const r=Il(()=>n(new Error("Timeout while trying to read response body")),500);Ree(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function Ree(e){return await e.text()}async function Pee(e,t,n){try{const r=Dee(e,t,n),o=r8("resource.xhr",r);t8(n.replay,o)}catch(r){Ae&&Ne.exception(r,"Failed to capture xhr breadcrumb")}}function Mee(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Nu(r),i=n.getResponseHeader("content-length")?n8(n.getResponseHeader("content-length")):Bee(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function Dee(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:s,xhr:l}=t,{url:c,method:d,status_code:f=0,request_body_size:u,response_body_size:p}=e.data;if(!c)return null;if(!l||!Cu(c,n.networkDetailAllowUrls)||Cu(c,n.networkDetailDenyUrls)){const N=Fl(u),v=Fl(p);return{startTimestamp:o,endTimestamp:i,url:c,method:d,statusCode:f,request:N,response:v}}const m=l[ro],_=m?P_(m.request_headers,n.networkRequestHeaders):{},b=P_(w6(l),n.networkResponseHeaders),[g,h]=n.networkCaptureBodies?su(s,Ne):[void 0],[y,E]=n.networkCaptureBodies?Lee(l):[void 0],$=Mo(_,u,g),O=Mo(b,p,y);return{startTimestamp:o,endTimestamp:i,url:c,method:d,statusCode:f,request:h?Iu($,h):$,response:E?Iu(O,E):O}}function Lee(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Fee(e.response,e.responseType)}catch(n){t.push(n)}return Ae&&Ne.warn("Failed to get xhr response body",...t),[void 0]}function Fee(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return Ae&&Ne.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ae&&Ne.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Bee(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Nu(n)}catch{return}}function Uee(e){const t=_e();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s}=e.getOptions(),l={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,d)=>Vee(l,c,d))}catch{}}function Vee(e,t,n){if(t.data)try{jee(t)&&qee(n)&&(Mee(t,n),Pee(t,n,e)),zee(t)&&Hee(n)&&(Tee(t,n),vee(t,n,e))}catch(r){Ae&&Ne.exception(r,"Error when enriching network breadcrumb")}}function jee(e){return e.category==="xhr"}function zee(e){return e.category==="fetch"}function qee(e){return e?.xhr}function Hee(e){return e?.response}function Wee(e){const t=_e();S6(TQ(e)),ou(yee(e)),cee(e),Uee(e);const n=hee(e);v9(n),t&&(t.on("beforeSendEvent",aee(e)),t.on("afterSendEvent",oee(e)),t.on("createDsc",r=>{const o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,o)=>{const i=e.getSessionId();o?.includeReplay&&e.isEnabled()&&i&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function Gee(e){try{return Promise.all(Au(e,[Yee(bt.performance.memory)]))}catch{return[]}}function Yee(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Kee(e,t,n){return lz(e,t,{...n,setTimeoutImpl:Il})}const xu=Te.navigator;function Xee(){return/iPhone|iPad|iPod/i.test(xu?.userAgent??"")||/Macintosh/i.test(xu?.userAgent??"")&&xu?.maxTouchPoints&&xu?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function Jee(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Ae&&Ne.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,Zee(n),e.clickDetector&&bQ(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!x_(e,n,o))return!0;if(!o)return!1;const i=e.session;if(ete(e,o),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){const s=e.eventBuffer.getEarliestTimestamp();s&&(Ae&&Ne.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),i.started=s,e.getOptions().stickySession&&ku(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function Zee(e){const t=e.data;if(!(e.type!==Be.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==Pe.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=ur.mirror.getNode(n.id),o=r&&ur.mirror.getMeta(r);if(o?.type===Tu.Element)for(const[i,s]of Object.entries(n.attributes))s===null?delete o.attributes[i]:o.attributes[i]=s}}function Qee(e){const t=e.getOptions();return{type:Be.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function ete(e,t){!t||e.session?.segmentId!==0||x_(e,Qee(e),!1)}function tte(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function nte(e,t,n,r){return Gn(e9(e,tl(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function rte({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
525
|
-
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function ote({client:e,scope:t,replayId:n,event:r}){const o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:o};e.emit("preprocessEvent",r,i);const s=await y9(e.getOptions(),r,i,t,e,vt());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";const l=e.getSdkMetadata(),{name:c,version:d,settings:f}=l?.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:d||"0.0.0",settings:f},s}async function ite({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:i}){const s=rte({recordingData:e,headers:{segment_id:n}}),{urls:l,errorIds:c,traceIds:d,initialTimestamp:f}=r,u=_e(),p=Re(),m=u?.getTransport(),_=u?.getDsn();if(!u||!m||!_||!i.sampled)return Promise.resolve({});const b={type:MJ,replay_start_timestamp:f/1e3,timestamp:o/1e3,error_ids:c,trace_ids:d,urls:l,replay_id:t,segment_id:n,replay_type:i.sampled},g=await ote({scope:p,client:u,replayId:t,event:b});if(!g)return u.recordDroppedEvent("event_processor","replay"),Ae&&Ne.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;const h=nte(g,s,_,u.getOptions().tunnel);let y;try{y=await m.send(h)}catch($){const O=new Error(a_);try{O.cause=$}catch{}throw O}const E=D9({},y);if(M9(E,"replay"))throw new M_(E);if(typeof y.statusCode=="number"&&(y.statusCode<200||y.statusCode>=300))throw new s8(y.statusCode);return y}class s8 extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class M_ extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class a8 extends Error{constructor(){super("Session is too long, not sending replay")}}async function l8(e,t={count:0,interval:VJ}){const{recordingData:n,onError:r}=e;if(n.length)try{return await ite(e),!0}catch(o){if(o instanceof s8||o instanceof M_)throw o;if(E9("Replays",{_retryCount:t.count}),r&&r(o),t.count>=jJ){const i=new Error(`${a_} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{Il(async()=>{try{await l8(e,t),i(!0)}catch(l){s(l)}},t.interval)})}}const c8="__THROTTLED",ste="__SKIPPED";function ate(e,t,n){const r=new Map,o=l=>{const c=l-n;r.forEach((d,f)=>{f<c&&r.delete(f)})},i=()=>[...r.values()].reduce((l,c)=>l+c,0);let s=!1;return(...l)=>{const c=Math.floor(Date.now()/1e3);if(o(c),i()>=t){const f=s;return s=!0,f?ste:c8}s=!1;const d=r.get(c)||0;return r.set(c,d+1),e(...l)}}class lte{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:DJ,sessionIdleExpire:LJ},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=Kee(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=ate((s,l)=>tee(this,s,l),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),i=r?{threshold:Math.min(zJ,r),timeout:r,scrollTimeout:qJ,ignoreSelector:o?o.join(","):""}:void 0;if(i&&(this.clickDetector=new _Q(this,i)),Ae){const s=t._experiments;Ne.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{bt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const s=Ar({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{const s=Ar({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{NQ(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){Ae&&Ne.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){Ae&&Ne.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Ae&&Ne.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){Ae&&Ne.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Ae&&Ne.log("Buffering is in progress, call `flush()` to save the replay");return}Ae&&Ne.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=C_({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){Ae&&Ne.log("Buffering is in progress, call `flush()` to save the replay");return}Ae&&Ne.infoTick("Starting replay in buffer mode");const t=C_({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=ur({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:UJ}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Jee(this),...Xee(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";_e()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{Ae&&Ne.log(`Stopping Replay triggered by ${r}`),e8(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,XQ(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ae&&Ne.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Ae&&Ne.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Ae&&Ne.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&I_(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${bt.location.pathname}${bt.location.hash}${bt.location.search}`,n=`${bt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===c8){const o=Ar({category:"replay.throttled"});this.addUpdate(()=>!x_(this,{type:lQ,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||wt(),n=t&&Tt(t),o=(n&&Me(n).data||{})[Pt];if(!(!n||!o||!["route","custom"].includes(o)))return Me(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=GQ({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&_e()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=C_({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return K5(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{bt.document.addEventListener("visibilitychange",this._handleVisibilityChange),bt.addEventListener("blur",this._handleWindowBlur),bt.addEventListener("focus",this._handleWindowFocus),bt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Wee(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=VQ(this)}_removeListeners(){try{bt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),bt.removeEventListener("blur",this._handleWindowBlur),bt.removeEventListener("focus",this._handleWindowFocus),bt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||Y5(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Ae&&Ne.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Be.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=OQ(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(Au(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Ae&&Ne.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await Gee(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new a8;const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await l8({replayId:t,recordingData:i,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});const r=_e();if(r){let o;n instanceof M_?o="ratelimit_backoff":n instanceof a8?o="invalid":o="send_error",r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Ae&&Ne.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();const i=o<this._options.minReplayDuration,s=o>this._options.maxReplayDuration+5e3;if(i||s){Ae&&Ne.log(`Session duration (${Math.floor(o/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const l=this.eventBuffer;l&&this.session.segmentId===0&&!l.hasCheckout&&Ae&&Ne.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(d){this.handleException(d)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&ku(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(l=>{const c=tte(l.target),d=n.join(",");return c?.matches(d)}))return!1;const r=t.length,o=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=o&&r>o;if(r>i||s){const l=Ar({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(l)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Bl(e,t){return[...e,...t].join(",")}function cte({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const i=["base","iframe[srcdoc]:not([src])"],s=Bl(e,[".sentry-mask","[data-sentry-mask]"]),l=Bl(t,[]);return{maskTextSelector:s,unmaskTextSelector:l,blockSelector:Bl(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Bl(r,[]),ignoreSelector:Bl(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function dte({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return i;const s=n.includes(t),l=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return s||l?i.replace(/[\S]/g,"*"):i}const d8='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',ute=["content-length","content-type","accept"],fte=Symbol.for("sentry__originalRequestBody");let u8=!1,f8=!1;function pte(){if(typeof Request>"u"||f8)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return r?.body!=null&&(o[fte]=r.body),o};t.prototype=e.prototype,Te.Request=t,f8=!0}catch{}}const mte=(e=>new _te(e));class _te{constructor({flushMinDelay:t=FJ,flushMaxDelay:n=BJ,minReplayDuration:r=HJ,maxReplayDuration:o=e5,stickySession:i=!0,useCompression:s=!0,workerUrl:l,_experiments:c={},maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:p=750,mutationLimit:m=1e4,slowClickTimeout:_=7e3,slowClickIgnoreSelectors:b=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:h=[],networkCaptureBodies:y=!0,networkRequestHeaders:E=[],networkResponseHeaders:$=[],mask:O=[],maskAttributes:N=["title","placeholder","aria-label"],unmask:v=[],block:B=[],unblock:H=[],ignore:U=[],maskFn:C,beforeAddRecordingEvent:A,beforeErrorSampling:R,onError:I,attachRawBodyFromRequest:V=!1}={}){this.name="Replay";const j=cte({mask:O,unmask:v,block:B,unblock:H,ignore:U});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{password:!0},maskTextFn:C,maskInputFn:C,maskAttributeFn:(F,M,Y)=>dte({maskAttributes:N,maskAllText:d,privacyOptions:j,key:F,value:M,el:Y}),...j,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:F=>{try{F.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,WJ),maxReplayDuration:Math.min(o,e5),stickySession:i,useCompression:s,workerUrl:l,blockAllMedia:u,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:p,mutationLimit:m,slowClickTimeout:_,slowClickIgnoreSelectors:b,networkDetailAllowUrls:g,networkDetailDenyUrls:h,networkCaptureBodies:y,networkRequestHeaders:p8(E),networkResponseHeaders:p8($),beforeAddRecordingEvent:A,beforeErrorSampling:R,onError:I,attachRawBodyFromRequest:V,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${d8}`:d8,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&_l())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return u8}set _isInitialized(t){u8=t}afterAllSetup(t){!_l()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&pte(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=hte(this._initialOptions,t);this._replay=new lte({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function hte(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=si(n.replaysSessionSampleRate),i=si(n.replaysOnErrorSampleRate);return o==null&&i==null&&nr(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),i!=null&&(r.errorSampleRate=i),r}function p8(e){return[...ute,...e.map(t=>t.toLowerCase())]}function gte(){return _e()?.getIntegrationByName("Replay")}var yte=Object.defineProperty,bte=(e,t,n)=>t in e?yte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m8=(e,t,n)=>bte(e,typeof t!="symbol"?t+"":t,n);class Ete{constructor(){m8(this,"idNodeMap",new Map),m8(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function $te(){return new Ete}function Ste(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function D_(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:D_(e.parentNode,t,n,r+1)}function _8(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Ste(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Ds=`Please stop import mirror directly. Instead of that,\r
|
|
524
|
+
or you can use record.mirror to access the mirror instance during recording.`;let m5={map:{},getId(){return console.error(Os),-1},getNode(){return console.error(Os),null},removeNodeFromMap(){console.error(Os)},has(){return console.error(Os),!1},reset(){console.error(Os)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(m5=new Proxy(m5,{get(e,t,n){return t==="map"&&console.error(Os),Reflect.get(e,t,n)}}));function Pl(e,t,n={}){let r=null,o=0;return function(...i){const s=Date.now();!o&&n.leading===!1&&(o=s);const l=t-(s-o),c=this;l<=0||l>t?(r&&(RZ(r),r=null),o=s,e.apply(c,i)):!r&&n.trailing!==!1&&(r=yu(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},l))}}function _5(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){yu(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>_5(e,t,i||{},!0)}function p0(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}let gu=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(gu=()=>new Date().getTime());function h5(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function g5(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function y5(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function b5(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Bn(e,t,n,r,o){if(!e)return!1;const i=b5(e);if(!i)return!1;const s=Is(t,n);if(!o){const d=r&&i.matches(r);return s(i)&&!d}const l=Si(i,s);let c=-1;return l<0?!1:(r&&(c=Si(i,Is(null,r))),l>-1&&c<0?!0:l<c)}function AZ(e,t){return t.getId(e)!==-1}function m0(e,t){return t.getId(e)===Rl}function E5(e,t){if(Cl(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?E5(e.parentNode,t):!0:!0}function _0(e){return!!e.changedTouches}function NZ(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function $5(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function S5(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function h0(e){return!!e?.shadowRoot}class IZ{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function v5(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function CZ(e){let t=e,n;for(;n=v5(t);)t=n;return t}function xZ(e){const t=e.ownerDocument;if(!t)return!1;const n=CZ(e);return t.contains(n)}function T5(e){const t=e.ownerDocument;return t?t.contains(e)||xZ(e):!1}const w5={};function g0(e){const t=w5[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return w5[e]=r.bind(window)}function OZ(...e){return g0("requestAnimationFrame")(...e)}function yu(...e){return g0("setTimeout")(...e)}function RZ(...e){return g0("clearTimeout")(...e)}var Be=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Be||{}),Pe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Pe||{}),yn=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(yn||{}),oo=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(oo||{}),Rs=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Rs||{});function y0(e){try{return e.contentDocument}catch{}}function PZ(e){try{return e.contentWindow}catch{}}function k5(e){return"__ln"in e}class MZ{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&k5(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&k5(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const A5=(e,t)=>`${e}@${t}`;class DZ{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new MZ,o=c=>{let d=c,f=Rl;for(;f===Rl;)d=d&&d.nextSibling,f=d&&this.mirror.getId(d);return f},i=c=>{if(!c.parentNode||!T5(c))return;const d=Cl(c.parentNode)?this.mirror.getId(v5(c)):this.mirror.getId(c.parentNode),f=o(c);if(d===-1||f===-1)return r.addNode(c);const u=xs(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{$5(p,this.mirror)&&!Bn(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),S5(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),h0(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,m)=>{Bn(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(p,m),p.contentWindow&&this.canvasManager.addWindow(p.contentWindow),this.shadowDomManager.observeAttachShadow(p))},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)},onBlockedImageLoad:(p,m,{width:_,height:b})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:m.id,attributes:{style:{width:`${_}px`,height:`${b}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});u&&(t.push({parentId:d,nextId:f,node:u}),n.add(u.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)N5(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!I5(this.droppedSet,c)&&!N5(this.removes,c,this.mirror)||I5(this.movedSet,c)?i(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){const d=this.mirror.getId(s.value.parentNode),f=o(s.value);d!==-1&&f!==-1&&(c=s)}if(!c){let d=r.tail;for(;d;){const f=d;if(d=d.previous,f){const u=this.mirror.getId(f.value.parentNode);if(o(f.value)===-1)continue;if(u!==-1){c=f;break}else{const m=f.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const _=m.parentNode.host;if(this.mirror.getId(_)!==-1){c=f;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),i(c.value)}const l={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:d}=c;if(typeof d.style=="string"){const f=JSON.stringify(c.styleDiff),u=JSON.stringify(c._unchangedStyles);f.length<d.style.length&&(f+u).split("var(").length===d.style.split("var(").length&&(d.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:d}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.processMutation=t=>{if(!m0(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Cs(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,b5(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const s=d0(n),l=n.tagName;o=mu(n,l,s);const c=pu({maskInputOptions:this.maskInputOptions,tagName:l,type:s}),d=Cs(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=Ol({isMasked:d,element:n,value:o,maskInputFn:this.maskInputFn})}if(Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!y0(n))r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!p5(n.tagName,r)&&(i.attributes[r]=f5(this.doc,ks(n.tagName),ks(r),o,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(const l of Array.from(n.style)){const c=n.style.getPropertyValue(l),d=n.style.getPropertyPriority(l);c!==s.style.getPropertyValue(l)||d!==s.style.getPropertyPriority(l)?d===""?i.styleDiff[l]=c:i.styleDiff[l]=[c,d]:i._unchangedStyles[l]=[c,d]}for(const l of Array.from(s.style))n.style.getPropertyValue(l)===""&&(i.styleDiff[l]=!1)}break}case"childList":{if(Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=Cl(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Bn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||m0(n,this.mirror)||!AZ(n,this.mirror)||(this.addedSet.has(n)?(b0(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||E5(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[A5(r,o)]?b0(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Cl(t.target)&&xl(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(m0(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[A5(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Bn(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),h0(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function b0(e,t){e.delete(t),t.childNodes?.forEach(n=>b0(e,n))}function N5(e,t,n){return e.length===0?!1:LZ(e,t,n)}function LZ(e,t,n){let r=t.parentNode;for(;r;){const o=n.getId(r);if(e.some(i=>i.id===o))return!0;r=r.parentNode}return!1}function I5(e,t){return e.size===0?!1:C5(e,t)}function C5(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:C5(e,n):!1}let Ml;function FZ(e){Ml=e}function BZ(){Ml=void 0}const Xe=e=>Ml?(...n)=>{try{return e(...n)}catch(r){if(Ml&&Ml(r)===!0)return()=>{};throw r}}:e,Ps=[];function Dl(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function x5(e,t){const n=new DZ;Ps.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const i=new r(Xe(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function UZ({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],l;const c=Pl(Xe(u=>{const p=Date.now()-l;e(s.map(m=>(m.timeOffset-=p,m)),u),s=[],l=null}),i),d=Xe(Pl(Xe(u=>{const p=Dl(u),{clientX:m,clientY:_}=_0(u)?u.changedTouches[0]:u;l||(l=gu()),s.push({x:m,y:_,id:r.getId(p),timeOffset:gu()-l}),c(typeof DragEvent<"u"&&u instanceof DragEvent?Pe.Drag:u instanceof MouseEvent?Pe.MouseMove:Pe.TouchMove)}),o,{trailing:!1})),f=[gn("mousemove",d,n),gn("touchmove",d,n),gn("drag",d,n)];return Xe(()=>{f.forEach(u=>u())})}function VZ({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const l=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[];let d=null;const f=u=>p=>{const m=Dl(p);if(Bn(m,r,o,i,!0))return;let _=null,b=u;if("pointerType"in p){switch(p.pointerType){case"mouse":_=oo.Mouse;break;case"touch":_=oo.Touch;break;case"pen":_=oo.Pen;break}_===oo.Touch?yn[u]===yn.MouseDown?b="TouchStart":yn[u]===yn.MouseUp&&(b="TouchEnd"):oo.Pen}else _0(p)&&(_=oo.Touch);_!==null?(d=_,(b.startsWith("Touch")&&_===oo.Touch||b.startsWith("Mouse")&&_===oo.Mouse)&&(_=null)):yn[u]===yn.Click&&(_=d,d=null);const g=_0(p)?p.changedTouches[0]:p;if(!g)return;const h=n.getId(m),{clientX:y,clientY:E}=g;Xe(e)({type:yn[b],id:h,x:y,y:E,..._!==null&&{pointerType:_}})};return Object.keys(yn).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&l[u]!==!1).forEach(u=>{let p=ks(u);const m=f(u);if(window.PointerEvent)switch(yn[u]){case yn.MouseDown:case yn.MouseUp:p=p.replace("mouse","pointer");break;case yn.TouchStart:case yn.TouchEnd:return}c.push(gn(p,m,t))}),Xe(()=>{c.forEach(u=>u())})}function O5({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){const l=Xe(Pl(Xe(c=>{const d=Dl(c);if(!d||Bn(d,r,o,i,!0))return;const f=n.getId(d);if(d===t&&t.defaultView){const u=h5(t.defaultView);e({id:f,x:u.left,y:u.top})}else e({id:f,x:d.scrollLeft,y:d.scrollTop})}),s.scroll||100));return gn("scroll",l,t)}function jZ({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=Xe(Pl(Xe(()=>{const i=g5(),s=y5();(n!==i||r!==s)&&(e({width:Number(s),height:Number(i)}),n=i,r=s)}),200));return gn("resize",o,t)}const zZ=["INPUT","TEXTAREA","SELECT"],R5=new WeakMap;function qZ({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:l,maskInputOptions:c,maskInputFn:d,sampling:f,userTriggeredOnInput:u,maskTextClass:p,unmaskTextClass:m,maskTextSelector:_,unmaskTextSelector:b}){function g(v){let B=Dl(v);const H=v.isTrusted,U=B&&c0(B.tagName);if(U==="OPTION"&&(B=B.parentElement),!B||!U||zZ.indexOf(U)<0||Bn(B,r,o,i,!0))return;const C=B;if(C.classList.contains(s)||l&&C.matches(l))return;const A=d0(B);let R=mu(C,U,A),I=!1;const V=pu({maskInputOptions:c,tagName:U,type:A}),j=Cs(B,p,_,m,b,V);(A==="radio"||A==="checkbox")&&(I=B.checked),R=Ol({isMasked:j,element:B,value:R,maskInputFn:d}),h(B,u?{text:R,isChecked:I,userTriggered:H}:{text:R,isChecked:I});const F=B.name;A==="radio"&&F&&I&&t.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(M=>{if(M!==B){const Y=Ol({isMasked:j,element:M,value:mu(M,U,A),maskInputFn:d});h(M,u?{text:Y,isChecked:!I,userTriggered:!1}:{text:Y,isChecked:!I})}})}function h(v,B){const H=R5.get(v);if(!H||H.text!==B.text||H.isChecked!==B.isChecked){R5.set(v,B);const U=n.getId(v);Xe(e)({...B,id:U})}}const E=(f.input==="last"?["change"]:["input","change"]).map(v=>gn(v,Xe(g),t)),$=t.defaultView;if(!$)return()=>{E.forEach(v=>v())};const O=$.Object.getOwnPropertyDescriptor($.HTMLInputElement.prototype,"value"),N=[[$.HTMLInputElement.prototype,"value"],[$.HTMLInputElement.prototype,"checked"],[$.HTMLSelectElement.prototype,"value"],[$.HTMLTextAreaElement.prototype,"value"],[$.HTMLSelectElement.prototype,"selectedIndex"],[$.HTMLOptionElement.prototype,"selected"]];return O&&O.set&&E.push(...N.map(v=>_5(v[0],v[1],{set(){Xe(g)({target:this,isTrusted:!1})}},!1,$))),Xe(()=>{E.forEach(v=>v())})}function bu(e){const t=[];function n(r,o){if(Eu("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Eu("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Eu("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Eu("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else if(r.parentStyleSheet){const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function Ro(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function HZ({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Xe((f,u,p)=>{const[m,_]=p,{id:b,styleId:g}=Ro(u,t,n.styleMirror);return(b&&b!==-1||g&&g!==-1)&&e({id:b,styleId:g,adds:[{rule:m,index:_}]}),f.apply(u,p)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Xe((f,u,p)=>{const[m]=p,{id:_,styleId:b}=Ro(u,t,n.styleMirror);return(_&&_!==-1||b&&b!==-1)&&e({id:_,styleId:b,removes:[{index:m}]}),f.apply(u,p)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Xe((f,u,p)=>{const[m]=p,{id:_,styleId:b}=Ro(u,t,n.styleMirror);return(_&&_!==-1||b&&b!==-1)&&e({id:_,styleId:b,replace:m}),f.apply(u,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:Xe((f,u,p)=>{const[m]=p,{id:_,styleId:b}=Ro(u,t,n.styleMirror);return(_&&_!==-1||b&&b!==-1)&&e({id:_,styleId:b,replaceSync:m}),f.apply(u,p)})}));const c={};$u("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:($u("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),$u("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),$u("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const d={};return Object.entries(c).forEach(([f,u])=>{d[f]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(d[f].insertRule,{apply:Xe((p,m,_)=>{const[b,g]=_,{id:h,styleId:y}=Ro(m.parentStyleSheet,t,n.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,adds:[{rule:b,index:[...bu(m),g||0]}]}),p.apply(m,_)})}),u.prototype.deleteRule=new Proxy(d[f].deleteRule,{apply:Xe((p,m,_)=>{const[b]=_,{id:g,styleId:h}=Ro(m.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||h&&h!==-1)&&e({id:g,styleId:h,removes:[{index:[...bu(m),b]}]}),p.apply(m,_)})})}),Xe(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(c).forEach(([f,u])=>{u.prototype.insertRule=d[f].insertRule,u.prototype.deleteRule=d[f].deleteRule})})}function P5({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,i=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(s){const l=i.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return l}}),Xe(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function WZ({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Xe((l,c,d)=>{const[f,u,p]=d;if(n.has(f))return i.apply(c,[f,u,p]);const{id:m,styleId:_}=Ro(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,set:{property:f,value:u,priority:p},index:bu(c.parentRule)}),l.apply(c,d)})});const s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Xe((l,c,d)=>{const[f]=d;if(n.has(f))return s.apply(c,[f]);const{id:u,styleId:p}=Ro(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(u&&u!==-1||p&&p!==-1)&&e({id:u,styleId:p,remove:{property:f},index:bu(c.parentRule)}),l.apply(c,d)})}),Xe(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function GZ({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:s}){const l=Xe(d=>Pl(Xe(f=>{const u=Dl(f);if(!u||Bn(u,t,n,r,!0))return;const{currentTime:p,volume:m,muted:_,playbackRate:b}=u;e({type:d,id:o.getId(u),currentTime:p,volume:m,muted:_,playbackRate:b})}),i.media||500)),c=[gn("play",l(Rs.Play),s),gn("pause",l(Rs.Pause),s),gn("seeked",l(Rs.Seeked),s),gn("volumechange",l(Rs.VolumeChange),s),gn("ratechange",l(Rs.RateChange),s)];return Xe(()=>{c.forEach(d=>d())})}function YZ({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(c,d,f){const u=new i(c,d,f);return o.set(u,{family:c,buffer:typeof d!="string",descriptors:f,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),u};const s=p0(t.fonts,"add",function(l){return function(c){return yu(Xe(()=>{const d=o.get(c);d&&(e(d),o.delete(c))}),0),l.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(s),Xe(()=>{r.forEach(l=>l())})}function KZ(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:s}=e;let l=!0;const c=Xe(()=>{const d=t.getSelection();if(!d||l&&d?.isCollapsed)return;l=d.isCollapsed||!1;const f=[],u=d.rangeCount||0;for(let p=0;p<u;p++){const m=d.getRangeAt(p),{startContainer:_,startOffset:b,endContainer:g,endOffset:h}=m;Bn(_,r,o,i,!0)||Bn(g,r,o,i,!0)||f.push({start:n.getId(_),startOffset:b,end:n.getId(g),endOffset:h})}s({ranges:f})});return c(),gn("selectionchange",c)}function XZ({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:p0(n.customElements,"define",function(o){return function(i,s,l){try{t({define:{name:i}})}catch{}return o.apply(this,[i,s,l])}})}function JZ(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=x5(e,e.doc));const o=UZ(e),i=VZ(e),s=O5(e),l=jZ(e,{win:n}),c=qZ(e),d=GZ(e);let f=()=>{},u=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(f=HZ(e,{win:n}),u=P5(e,e.doc),p=WZ(e,{win:n}),e.collectFonts&&(m=YZ(e)));const _=KZ(e),b=XZ(e),g=[];for(const h of e.plugins)g.push(h.observer(h.callback,n,h.options));return Xe(()=>{Ps.forEach(h=>h.reset()),r?.disconnect(),o(),i(),s(),l(),c(),d(),f(),u(),p(),m(),_(),b(),g.forEach(h=>h())})}function Eu(e){return typeof window[e]<"u"}function $u(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class E0{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){const i=r||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t);let l=i.get(n);return l||(l=this.generateIdFn(),i.set(n,l),s.set(l,n)),l}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=o.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class ZZ{constructor(){this.crossOriginIframeMirror=new E0(f0),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class QZ{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new E0(f0),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new E0(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=y0(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const i=this.transformCrossOriginEvent(o,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case Be.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:Be.IncrementalSnapshot,data:{source:Pe.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Be.Meta:case Be.Load:case Be.DomContentLoaded:return!1;case Be.Plugin:return n;case Be.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Be.IncrementalSnapshot:switch(n.data.source){case Pe.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Pe.Drag:case Pe.TouchMove:case Pe.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Pe.ViewportResize:return!1;case Pe.MediaInteraction:case Pe.MouseInteraction:case Pe.Scroll:case Pe.CanvasMutation:case Pe.Input:return this.replaceIds(n.data,t,["id"]),n;case Pe.StyleSheetRule:case Pe.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Pe.Font:return n;case Pe.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case Pe.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Bt.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class eQ{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class tQ{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!xl(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=x5({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(O5({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),yu(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(P5({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=y0(t),r=PZ(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(p0(t.prototype,"attachShadow",function(o){return function(i){const s=o.call(this,i);return this.shadowRoot&&T5(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var M5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nQ=typeof Uint8Array>"u"?[]:new Uint8Array(256),Su=0;Su<M5.length;Su++)nQ[M5.charCodeAt(Su)]=Su;class D5{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class rQ{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new IZ,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},o=[];for(const i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(l,c)=>({rule:n5(l),index:c}))})),r.styleIds.push(s)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class oQ{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,OZ(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let It,vu;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const dr=nZ();function ur(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:l="rr-ignore",ignoreSelector:c=null,maskAllText:d=!1,maskTextClass:f="rr-mask",unmaskTextClass:u=null,maskTextSelector:p=null,unmaskTextSelector:m=null,inlineStylesheet:_=!0,maskAllInputs:b,maskInputOptions:g,slimDOMOptions:h,maskAttributeFn:y,maskInputFn:E,maskTextFn:$,maxCanvasSize:O=null,packFn:N,sampling:v={},dataURLOptions:B={},mousemoveWait:H,recordDOM:U=!0,recordCanvas:C=!1,recordCrossOriginIframes:A=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:V=!1,inlineImages:j=!1,plugins:F,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:W,onMutation:K,getCanvasManager:te}=e;FZ(W);const X=A?window.parent===window:!0;let oe=!1;if(!X)try{window.parent.document&&(oe=!1)}catch{oe=!0}if(X&&!t)throw new Error("emit function is required");if(!X&&!oe)return()=>{};H!==void 0&&v.mousemove===void 0&&(v.mousemove=H),dr.reset();const fe=b===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g!==void 0?g:{},J=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};NZ();let ae,ye=0;const $e=k=>{for(const q of F||[])q.eventProcessor&&(k=q.eventProcessor(k));return N&&!oe&&(k=N(k)),k};It=(k,q)=>{const ee=k;if(ee.timestamp=gu(),Ps[0]?.isFrozen()&&ee.type!==Be.FullSnapshot&&!(ee.type===Be.IncrementalSnapshot&&ee.data.source===Pe.Mutation)&&Ps.forEach(le=>le.unfreeze()),X)t?.($e(ee),q);else if(oe){const le={type:"rrweb",event:$e(ee),origin:window.location.origin,isCheckout:q};window.parent.postMessage(le,"*")}if(ee.type===Be.FullSnapshot)ae=ee,ye=0;else if(ee.type===Be.IncrementalSnapshot){if(ee.data.source===Pe.Mutation&&ee.data.isAttachIframe)return;ye++;const le=r&&ye>=r,ce=n&&ae&&ee.timestamp-ae.timestamp>n;(le||ce)&&T(!0)}};const Ie=k=>{It({type:Be.IncrementalSnapshot,data:{source:Pe.Mutation,...k}})},je=k=>It({type:Be.IncrementalSnapshot,data:{source:Pe.Scroll,...k}}),we=k=>It({type:Be.IncrementalSnapshot,data:{source:Pe.CanvasMutation,...k}}),Le=k=>It({type:Be.IncrementalSnapshot,data:{source:Pe.AdoptedStyleSheet,...k}}),Fe=new rQ({mutationCb:Ie,adoptedStyleSheetCb:Le}),Ye=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new ZZ:new QZ({mirror:dr,mutationCb:Ie,stylesheetManager:Fe,recordCrossOriginIframes:A,wrappedEmit:It});for(const k of F||[])k.getMirror&&k.getMirror({nodeMirror:dr,crossOriginIframeMirror:Ye.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ye.crossOriginIframeStyleMirror});const ke=new oQ,Ze=sQ(te,{mirror:dr,win:window,mutationCb:k=>It({type:Be.IncrementalSnapshot,data:{source:Pe.CanvasMutation,...k}}),recordCanvas:C,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:O,sampling:v.canvas,dataURLOptions:B,errorHandler:W}),w=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new eQ:new tQ({mutationCb:Ie,scrollCb:je,bypassOptions:{onMutation:K,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:d,maskTextClass:f,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:_,maskInputOptions:fe,dataURLOptions:B,maskAttributeFn:y,maskTextFn:$,maskInputFn:E,recordCanvas:C,inlineImages:j,sampling:v,slimDOMOptions:J,iframeManager:Ye,stylesheetManager:Fe,canvasManager:Ze,keepIframeSrcFn:M,processedNodeManager:ke,ignoreCSSAttributes:Y},mirror:dr}),T=(k=!1)=>{if(!U)return;It({type:Be.Meta,data:{href:window.location.href,width:y5(),height:g5()}},k),Fe.reset(),w.init(),Ps.forEach(ee=>ee.lock());const q=kZ(document,{mirror:dr,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:d,maskTextClass:f,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:_,maskAllInputs:fe,maskAttributeFn:y,maskInputFn:E,maskTextFn:$,slimDOM:J,dataURLOptions:B,recordCanvas:C,inlineImages:j,onSerialize:ee=>{$5(ee,dr)&&Ye.addIframe(ee),S5(ee,dr)&&Fe.trackLinkElement(ee),h0(ee)&&w.addShadowRoot(ee.shadowRoot,document)},onIframeLoad:(ee,le)=>{Ye.attachIframe(ee,le),ee.contentWindow&&Ze.addWindow(ee.contentWindow),w.observeAttachShadow(ee)},onStylesheetLoad:(ee,le)=>{Fe.attachLinkElement(ee,le)},onBlockedImageLoad:(ee,le,{width:ce,height:ot})=>{Ie({adds:[],removes:[],texts:[],attributes:[{id:le.id,attributes:{style:{width:`${ce}px`,height:`${ot}px`}}}]})},keepIframeSrcFn:M,ignoreCSSAttributes:Y});if(!q)return console.warn("Failed to snapshot the document");It({type:Be.FullSnapshot,data:{node:q,initialOffset:h5(window)}}),Ps.forEach(ee=>ee.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Fe.adoptStyleSheets(document.adoptedStyleSheets,dr.getId(document))};vu=T;try{const k=[],q=le=>Xe(JZ)({onMutation:K,mutationCb:Ie,mousemoveCb:(ce,ot)=>It({type:Be.IncrementalSnapshot,data:{source:ot,positions:ce}}),mouseInteractionCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.MouseInteraction,...ce}}),scrollCb:je,viewportResizeCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.ViewportResize,...ce}}),inputCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.Input,...ce}}),mediaInteractionCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.MediaInteraction,...ce}}),styleSheetRuleCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.StyleSheetRule,...ce}}),styleDeclarationCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.StyleDeclaration,...ce}}),canvasMutationCb:we,fontCb:ce=>It({type:Be.IncrementalSnapshot,data:{source:Pe.Font,...ce}}),selectionCb:ce=>{It({type:Be.IncrementalSnapshot,data:{source:Pe.Selection,...ce}})},customElementCb:ce=>{It({type:Be.IncrementalSnapshot,data:{source:Pe.CustomElement,...ce}})},blockClass:o,ignoreClass:l,ignoreSelector:c,maskAllText:d,maskTextClass:f,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:m,maskInputOptions:fe,inlineStylesheet:_,sampling:v,recordDOM:U,recordCanvas:C,inlineImages:j,userTriggeredOnInput:I,collectFonts:V,doc:le,maskAttributeFn:y,maskInputFn:E,maskTextFn:$,keepIframeSrcFn:M,blockSelector:i,unblockSelector:s,slimDOMOptions:J,dataURLOptions:B,mirror:dr,iframeManager:Ye,stylesheetManager:Fe,shadowDomManager:w,processedNodeManager:ke,canvasManager:Ze,ignoreCSSAttributes:Y,plugins:F?.filter(ce=>ce.observer)?.map(ce=>({observer:ce.observer,options:ce.options,callback:ot=>It({type:Be.Plugin,data:{plugin:ce.name,payload:ot}})}))||[]},{});Ye.addLoadListener(le=>{try{k.push(q(le.contentDocument))}catch(ce){console.warn(ce)}});const ee=()=>{T(),k.push(q(document))};return document.readyState==="interactive"||document.readyState==="complete"?ee():(k.push(gn("DOMContentLoaded",()=>{It({type:Be.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&ee()})),k.push(gn("load",()=>{It({type:Be.Load,data:{}}),R==="load"&&ee()},window))),()=>{k.forEach(le=>le()),ke.destroy(),vu=void 0,BZ()}}catch(k){console.warn(k)}}function iQ(e){if(!vu)throw new Error("please take full snapshot after start recording");vu(e)}ur.mirror=dr,ur.takeFullSnapshot=iQ;function sQ(e,t){try{return e?e(t):new D5}catch{return console.warn("Unable to initialize CanvasManager"),new D5}}var L5;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(L5||(L5={}));const aQ=3,lQ=5;function $0(e){return e>9999999999?e:e*1e3}function S0(e){return e>9999999999?e/1e3:e}function Ll(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Be.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:tn(t,10,1e3)}}),t.category==="console")))}const cQ="button,a";function F5(e){return e.closest(cQ)||e}function B5(e){const t=U5(e);return!t||!(t instanceof Element)?t:F5(t)}function U5(e){return dQ(e)?e.target:e}function dQ(e){return typeof e=="object"&&!!e&&"target"in e}let Po;function uQ(e){return Po||(Po=[],fQ()),Po.push(e),()=>{const t=Po?Po.indexOf(e):-1;t>-1&&Po.splice(t,1)}}function fQ(){Qt(bt,"open",function(e){return function(...t){if(Po)try{Po.forEach(n=>n())}catch{}return e.apply(bt,t)}})}const pQ=new Set([Pe.Mutation,Pe.StyleSheetRule,Pe.StyleDeclaration,Pe.AdoptedStyleSheet,Pe.CanvasMutation,Pe.Selection,Pe.MediaInteraction]);function mQ(e,t,n){e.handleClick(t,n)}class _Q{constructor(t,n,r=Ll){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=uQ(()=>{this._lastMutation=V5()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(gQ(n,this._ignoreSelector)||!yQ(t))return;const r={timestamp:S0(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=S0(t)}registerScroll(t=Date.now()){this._lastScroll=S0(t)}registerClick(t){const n=F5(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=V5();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!o,{clickCount:s,clickBreadcrumb:l}=t;if(i){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,d=c<this._timeout*1e3?"mutation":"timeout",f={type:"default",message:l.message,timestamp:l.timestamp,category:"ui.slowClickDetected",data:{...l.data,url:bt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:d,clickCount:s||1}};this._addBreadcrumbEvent(n,f);return}if(s>1){const c={type:"default",message:l.message,timestamp:l.timestamp,category:"ui.multiClick",data:{...l.data,url:bt.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Il(()=>this._checkClicks(),1e3)}}const hQ=["A","BUTTON","INPUT"];function gQ(e,t){return!!(!hQ.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function yQ(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function V5(){return Date.now()/1e3}function bQ(e,t){try{if(!EQ(t))return;const{source:n}=t.data;if(pQ.has(n)&&e.registerMutation(t.timestamp),n===Pe.Scroll&&e.registerScroll(t.timestamp),$Q(t)){const{type:r,id:o}=t.data,i=ur.mirror.getNode(o);i instanceof HTMLElement&&r===yn.Click&&e.registerClick(i)}}catch{}}function EQ(e){return e.type===aQ}function $Q(e){return e.data.source===Pe.MouseInteraction}function Ar(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Tu=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Tu||{});const SQ=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function vQ(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(SQ.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const TQ=e=>t=>{if(!e.isEnabled())return;const n=wQ(t);if(!n)return;const r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&mQ(e.clickDetector,n,B5(t.event)),Ll(e,n)};function j5(e,t){const n=ur.mirror.getId(e),r=n&&ur.mirror.getNode(n),o=r&&ur.mirror.getMeta(r),i=o&&AQ(o)?o:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===Tu.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:vQ(i.attributes)}}:{}}}function wQ(e){const{target:t,message:n}=kQ(e);return Ar({category:`ui.${e.name}`,...j5(t,n)})}function kQ(e){const t=e.name==="click";let n,r=null;try{r=t?B5(e.event):U5(e.event),n=Vt(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function AQ(e){return e.type===Tu.Element}function NQ(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=IQ(t);n&&Ll(e,n)}function IQ(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:s}=e;if(!s||CQ(s)||!i)return null;const l=t||r||o,c=i.length===1;if(!l&&c)return null;const d=Vt(s,{maxStringLength:200})||"<unknown>",f=j5(s,d);return Ar({category:"ui.keyDown",message:d,data:{...f.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i}})}function CQ(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const xQ={resource:DQ,paint:PQ,navigation:MQ};function v0(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function OQ(e){return e.map(RQ).filter(Boolean)}function RQ(e){const t=xQ[e.entryType];return t?t(e):null}function Ms(e){return((Ft()||bt.performance.timeOrigin)+e)/1e3}function PQ(e){const{duration:t,entryType:n,name:r,startTime:o}=e,i=Ms(o);return{type:n,name:r,start:i,end:i+t,data:void 0}}function MQ(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:l,domContentLoadedEventEnd:c,domInteractive:d,loadEventStart:f,loadEventEnd:u,redirectCount:p,startTime:m,transferSize:_,type:b}=e;return o===0?null:{type:`${t}.${b}`,start:Ms(m),end:Ms(i),name:n,data:{size:_,decodedBodySize:r,encodedBodySize:s,duration:o,domInteractive:d,domContentLoadedEventStart:l,domContentLoadedEventEnd:c,loadEventStart:f,loadEventEnd:u,domComplete:i,redirectCount:p}}}function DQ(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:l,responseStatus:c,transferSize:d}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Ms(i),end:Ms(o),name:r,data:{size:d,statusCode:c,decodedBodySize:s,encodedBodySize:l}}}function LQ(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return T0(e,"largest-contentful-paint",n)}function FQ(e){return e.sources!==void 0}function BQ(e){const t=[],n=[];for(const r of e.entries)if(FQ(r)){const o=[];for(const i of r.sources)if(i.node){n.push(i.node);const s=ur.mirror.getId(i.node);s&&o.push(s)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return T0(e,"cumulative-layout-shift",n,t)}function UQ(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return T0(e,"interaction-to-next-paint",n)}function T0(e,t,n,r){const o=e.value,i=e.rating,s=Ms(o);return{type:"web-vital",name:t,start:s,end:s,data:{value:o,size:o,rating:i,nodeIds:n?n.map(l=>ur.mirror.getId(l)):void 0,attributions:r}}}function VQ(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(o=>{r.push($i(o,n))}),r.push(Jd(v0(LQ,e)),Xd(v0(BQ,e)),G_(v0(UQ,e))),()=>{r.forEach(o=>o())}}const Ae=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,jQ='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function zQ(){const e=new Blob([jQ]);return URL.createObjectURL(e)}const z5=["log","warn","error"],wu="[Replay] ";function w0(e,t="info"){sr({category:"console",data:{logger:"replay"},level:t,message:`${wu}${e}`},{level:t})}function qQ(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return Ae?(z5.forEach(r=>{n[r]=(...o)=>{P[r](wu,...o),t&&w0(o.join(""),fd(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),P.error(wu,r),e?lt(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&w0(r,"error")},n.infoTick=(...r)=>{P.log(wu,...r),t&&setTimeout(()=>w0(r[0]),0)}):z5.forEach(r=>{n[r]=()=>{}}),n}const Ne=qQ();class k0 extends Error{constructor(){super(`Event buffer exceeded maximum size of ${l0}.`)}}class q5{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>l0)throw new k0;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:$0(t)}}class A0{constructor(t){A0.prototype.__init.call(this),this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(Ae&&Ne.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{Ae&&Ne.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){Ae&&Ne.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((o,i)=>{this._pending.set(r,{method:t,resolve:o,reject:i});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(s){this._pending.delete(r),i(s)}})}__init(){this._onMessage=({data:t})=>{const n=t;if(typeof n.id!="number")return;const r=this._pending.get(n.id);if(!(!r||r.method!==n.method)){if(this._pending.delete(n.id),!n.success){Ae&&Ne.error("Error in compression worker: ",n.response),r.reject(new Error("Error in compression worker"));return}r.resolve(n.response)}}}_getAndIncrementId(){return this._id++}}class HQ{constructor(t){this._worker=new A0(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=$0(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>l0?Promise.reject(new k0):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Ae&&Ne.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class WQ{constructor(t){this._fallback=new q5,this._compression=new HQ(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){Ae&&Ne.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(const i of t)o.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(i){Ae&&Ne.exception(i,"Failed to add events when switching buffers.")}}}function GQ({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=YQ(t);if(n)return n}return Ae&&Ne.log("Using simple buffer"),new q5}function YQ(e){try{const t=e||KQ();if(!t)return;Ae&&Ne.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new WQ(n)}catch(t){Ae&&Ne.exception(t,"Failed to create compression worker")}}function KQ(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?zQ():""}function N0(){try{return"sessionStorage"in bt&&!!bt.sessionStorage}catch{return!1}}function XQ(e){JQ(),e.session=void 0}function JQ(){if(N0())try{bt.sessionStorage.removeItem(s0)}catch{}}function H5(e){return e===void 0?!1:Math.random()<e}function ku(e){if(N0())try{bt.sessionStorage.setItem(s0,JSON.stringify(e))}catch{}}function W5(e){const t=Date.now(),n=e.id||jt(),r=e.started||t,o=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,l=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:o,segmentId:i,sampled:s,previousSessionId:l,dirty:c}}function ZQ(e,t){return H5(e)?"session":t?"buffer":!1}function G5({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=ZQ(e,t),i=W5({sampled:o,previousSessionId:r});return n&&ku(i),i}function QQ(){if(!N0())return null;try{const e=bt.sessionStorage.getItem(s0);if(!e)return null;const t=JSON.parse(e);return Ae&&Ne.infoTick("Loading existing session"),W5(t)}catch{return null}}function I0(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Y5(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return I0(e.started,t,r)||I0(e.lastActivity,n,r)}function K5(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Y5(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function C0({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&QQ();return o?K5(o,{sessionIdleExpire:e,maxReplayDuration:t})?(Ae&&Ne.infoTick("Session in sessionStorage is expired, creating new one..."),G5(r,{previousSessionId:o.id})):o:(Ae&&Ne.infoTick("Creating new session"),G5(r,{previousSessionId:n}))}function eee(e){return e.type===Be.Custom}function x0(e,t,n){return J5(e,t)?(X5(e,t,n),!0):!1}function tee(e,t,n){return J5(e,t)?X5(e,t,n):Promise.resolve(null)}async function X5(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=e.getOptions(),s=nee(t,i.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(i){const s=i&&i instanceof k0,l=s?"eventBufferOverflow":"eventBufferError",c=_e();if(c){const d=s?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(d,"replay")}if(s&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:l})}}function J5(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=$0(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Ae&&Ne.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function nee(e,t){try{if(typeof t=="function"&&eee(e))return t(e)}catch(n){return Ae&&Ne.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function O0(e){return!e.type}function R0(e){return e.type==="transaction"}function ree(e){return e.type==="replay_event"}function Z5(e){return e.type==="feedback"}function oee(e){return(t,n)=>{if(!e.isEnabled()||!O0(t)&&!R0(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(R0(t)){iee(e,t);return}see(e,t)}}}function iee(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function see(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Il(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function aee(e){return t=>{!e.isEnabled()||!O0(t)||lee(e,t)}}function lee(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=Ar({category:"replay.hydrate-error",data:{url:ni()}});Ll(e,r)}}function cee(e){const t=_e();t&&t.on("beforeAddBreadcrumb",n=>dee(e,n))}function dee(e,t){if(!e.isEnabled()||!Q5(t))return;const n=uee(t);n&&Ll(e,n)}function uee(e){return!Q5(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?fee(e):Ar(e)}function fee(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return Ar(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>uu?(n=!0,`${o.slice(0,uu)}…`):o;if(typeof o=="object")try{const i=tn(o,7);return JSON.stringify(i).length>uu?(n=!0,`${JSON.stringify(i,null,2).slice(0,uu)}…`):i}catch{}return o});return Ar({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Q5(e){return!!e.category}function pee(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function e8(){const e=Re().getPropagationContext().dsc;e&&delete e.replay_id;const t=wt();if(t){const n=Wn(t);delete n.replay_id}}function mee(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Be.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function _ee(e,t){return e.recordingMode!=="buffer"||t.message===a0||!t.exception||t.type?!1:H5(e.getOptions().errorSampleRate)}function hee(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(ree(t))return delete t.breadcrumbs,t;if(!O0(t)&&!R0(t)&&!Z5(t))return t;if(!e.checkAndHandleExpiredSession())return e8(),t;if(Z5(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),mee(e,t),t;if(pee(t,n)&&!e.getOptions()._experiments.captureExceptions)return Ae&&Ne.log("Ignoring error from rrweb internals",t),null;const o=_ee(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const s=e.session;s.dirty=!0,e.getOptions().stickySession&&ku(s)}return t},{id:"Replay"})}function Au(e,t){return t.map(({type:n,start:r,end:o,name:i,data:s})=>{const l=e.throttledAddEvent({type:Be.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:o,data:s}}});return typeof l=="string"?Promise.resolve(null):l})}function gee(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function yee(e){return t=>{if(!e.isEnabled())return;const n=gee(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Au(e,[n]),!1)))}}function bee(e,t){return Ae&&e.getOptions()._experiments.traceInternals?!1:tE(t,_e())}function t8(e,t){e.isEnabled()&&t!==null&&(bee(e,t.name)||e.addUpdate(()=>(Au(e,[t]),!0)))}function Nu(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=T6(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function n8(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Iu(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function r8(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:s,request:l,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:i,statusCode:s,request:l,response:c}}}function Fl(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Mo(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:i}=Eee(n);return r.body=o,i?.length&&(r._meta={warnings:i}),r}function P0(e,t){return Object.entries(e).reduce((n,[r,o])=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=o),n},{})}function Eee(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Q6,n=$ee(e);if(t){const r=e.slice(0,Q6);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function $ee(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Cu(e,t){const n=See(e);return or(n,t)}function See(e,t=bt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(bt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function vee(e,t,n){try{const r=await wee(e,t,n),o=r8("resource.fetch",r);t8(n.replay,o)}catch(r){Ae&&Ne.exception(r,"Failed to capture fetch breadcrumb")}}function Tee(e,t){const{input:n,response:r}=t,o=n?n0(n):void 0,i=Nu(o),s=r?n8(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}async function wee(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=t,{url:s,method:l,status_code:c=0,request_body_size:d,response_body_size:f}=e.data,u=Cu(s,n.networkDetailAllowUrls)&&!Cu(s,n.networkDetailDenyUrls),p=u?kee(n,t.input,d):Fl(d),m=await Aee(u,n,t.response,f);return{startTimestamp:o,endTimestamp:i,url:s,method:l,statusCode:c,request:p,response:m}}function kee({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?Cee(n,t):{};if(!e)return Mo(o,r,void 0);const i=n0(n),[s,l]=su(i,Ne),c=Mo(o,r,s);return l?Iu(c,l):c}async function Aee(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return Fl(o);const i=r?o8(r.headers,n):{};if(!r||!t&&o!==void 0)return Mo(i,o,void 0);const[s,l]=await Iee(r),c=Nee(s,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});return l?Iu(c,l):c}function Nee(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const i=e?.length&&n===void 0?Nu(e):n;return r?t?Mo(o,i,e):Mo(o,i,void 0):Fl(i)}catch(i){return Ae&&Ne.exception(i,"Failed to serialize response body"),Mo(o,n,void 0)}}async function Iee(e){const t=xee(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Oee(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(Ae&&Ne.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Ae&&Ne.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function o8(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Cee(e,t){return e.length===1&&typeof e[0]!="string"?i8(e[0],t):e.length===2?i8(e[1],t):{}}function i8(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?o8(n,t):Array.isArray(n)?{}:P0(n,t):{}}function xee(e){try{return e.clone()}catch(t){Ae&&Ne.exception(t,"Failed to clone response body")}}function Oee(e){return new Promise((t,n)=>{const r=Il(()=>n(new Error("Timeout while trying to read response body")),500);Ree(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function Ree(e){return await e.text()}async function Pee(e,t,n){try{const r=Dee(e,t,n),o=r8("resource.xhr",r);t8(n.replay,o)}catch(r){Ae&&Ne.exception(r,"Failed to capture xhr breadcrumb")}}function Mee(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Nu(r),i=n.getResponseHeader("content-length")?n8(n.getResponseHeader("content-length")):Bee(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function Dee(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:s,xhr:l}=t,{url:c,method:d,status_code:f=0,request_body_size:u,response_body_size:p}=e.data;if(!c)return null;if(!l||!Cu(c,n.networkDetailAllowUrls)||Cu(c,n.networkDetailDenyUrls)){const N=Fl(u),v=Fl(p);return{startTimestamp:o,endTimestamp:i,url:c,method:d,statusCode:f,request:N,response:v}}const m=l[ro],_=m?P0(m.request_headers,n.networkRequestHeaders):{},b=P0(w6(l),n.networkResponseHeaders),[g,h]=n.networkCaptureBodies?su(s,Ne):[void 0],[y,E]=n.networkCaptureBodies?Lee(l):[void 0],$=Mo(_,u,g),O=Mo(b,p,y);return{startTimestamp:o,endTimestamp:i,url:c,method:d,statusCode:f,request:h?Iu($,h):$,response:E?Iu(O,E):O}}function Lee(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Fee(e.response,e.responseType)}catch(n){t.push(n)}return Ae&&Ne.warn("Failed to get xhr response body",...t),[void 0]}function Fee(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return Ae&&Ne.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ae&&Ne.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Bee(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Nu(n)}catch{return}}function Uee(e){const t=_e();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s}=e.getOptions(),l={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,d)=>Vee(l,c,d))}catch{}}function Vee(e,t,n){if(t.data)try{jee(t)&&qee(n)&&(Mee(t,n),Pee(t,n,e)),zee(t)&&Hee(n)&&(Tee(t,n),vee(t,n,e))}catch(r){Ae&&Ne.exception(r,"Error when enriching network breadcrumb")}}function jee(e){return e.category==="xhr"}function zee(e){return e.category==="fetch"}function qee(e){return e?.xhr}function Hee(e){return e?.response}function Wee(e){const t=_e();S6(TQ(e)),ou(yee(e)),cee(e),Uee(e);const n=hee(e);v9(n),t&&(t.on("beforeSendEvent",aee(e)),t.on("afterSendEvent",oee(e)),t.on("createDsc",r=>{const o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,o)=>{const i=e.getSessionId();o?.includeReplay&&e.isEnabled()&&i&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function Gee(e){try{return Promise.all(Au(e,[Yee(bt.performance.memory)]))}catch{return[]}}function Yee(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Kee(e,t,n){return lz(e,t,{...n,setTimeoutImpl:Il})}const xu=Te.navigator;function Xee(){return/iPhone|iPad|iPod/i.test(xu?.userAgent??"")||/Macintosh/i.test(xu?.userAgent??"")&&xu?.maxTouchPoints&&xu?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function Jee(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Ae&&Ne.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,Zee(n),e.clickDetector&&bQ(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!x0(e,n,o))return!0;if(!o)return!1;const i=e.session;if(ete(e,o),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){const s=e.eventBuffer.getEarliestTimestamp();s&&(Ae&&Ne.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),i.started=s,e.getOptions().stickySession&&ku(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function Zee(e){const t=e.data;if(!(e.type!==Be.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==Pe.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=ur.mirror.getNode(n.id),o=r&&ur.mirror.getMeta(r);if(o?.type===Tu.Element)for(const[i,s]of Object.entries(n.attributes))s===null?delete o.attributes[i]:o.attributes[i]=s}}function Qee(e){const t=e.getOptions();return{type:Be.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function ete(e,t){!t||e.session?.segmentId!==0||x0(e,Qee(e),!1)}function tte(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function nte(e,t,n,r){return Gn(e9(e,tl(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function rte({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
525
|
+
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function ote({client:e,scope:t,replayId:n,event:r}){const o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:o};e.emit("preprocessEvent",r,i);const s=await y9(e.getOptions(),r,i,t,e,vt());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";const l=e.getSdkMetadata(),{name:c,version:d,settings:f}=l?.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:d||"0.0.0",settings:f},s}async function ite({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:i}){const s=rte({recordingData:e,headers:{segment_id:n}}),{urls:l,errorIds:c,traceIds:d,initialTimestamp:f}=r,u=_e(),p=Re(),m=u?.getTransport(),_=u?.getDsn();if(!u||!m||!_||!i.sampled)return Promise.resolve({});const b={type:MJ,replay_start_timestamp:f/1e3,timestamp:o/1e3,error_ids:c,trace_ids:d,urls:l,replay_id:t,segment_id:n,replay_type:i.sampled},g=await ote({scope:p,client:u,replayId:t,event:b});if(!g)return u.recordDroppedEvent("event_processor","replay"),Ae&&Ne.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;const h=nte(g,s,_,u.getOptions().tunnel);let y;try{y=await m.send(h)}catch($){const O=new Error(a0);try{O.cause=$}catch{}throw O}const E=D9({},y);if(M9(E,"replay"))throw new M0(E);if(typeof y.statusCode=="number"&&(y.statusCode<200||y.statusCode>=300))throw new s8(y.statusCode);return y}class s8 extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class M0 extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class a8 extends Error{constructor(){super("Session is too long, not sending replay")}}async function l8(e,t={count:0,interval:VJ}){const{recordingData:n,onError:r}=e;if(n.length)try{return await ite(e),!0}catch(o){if(o instanceof s8||o instanceof M0)throw o;if(E9("Replays",{_retryCount:t.count}),r&&r(o),t.count>=jJ){const i=new Error(`${a0} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{Il(async()=>{try{await l8(e,t),i(!0)}catch(l){s(l)}},t.interval)})}}const c8="__THROTTLED",ste="__SKIPPED";function ate(e,t,n){const r=new Map,o=l=>{const c=l-n;r.forEach((d,f)=>{f<c&&r.delete(f)})},i=()=>[...r.values()].reduce((l,c)=>l+c,0);let s=!1;return(...l)=>{const c=Math.floor(Date.now()/1e3);if(o(c),i()>=t){const f=s;return s=!0,f?ste:c8}s=!1;const d=r.get(c)||0;return r.set(c,d+1),e(...l)}}class lte{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:DJ,sessionIdleExpire:LJ},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=Kee(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=ate((s,l)=>tee(this,s,l),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),i=r?{threshold:Math.min(zJ,r),timeout:r,scrollTimeout:qJ,ignoreSelector:o?o.join(","):""}:void 0;if(i&&(this.clickDetector=new _Q(this,i)),Ae){const s=t._experiments;Ne.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{bt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const s=Ar({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{const s=Ar({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{NQ(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){Ae&&Ne.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){Ae&&Ne.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Ae&&Ne.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){Ae&&Ne.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Ae&&Ne.log("Buffering is in progress, call `flush()` to save the replay");return}Ae&&Ne.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=C0({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){Ae&&Ne.log("Buffering is in progress, call `flush()` to save the replay");return}Ae&&Ne.infoTick("Starting replay in buffer mode");const t=C0({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=ur({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:UJ}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Jee(this),...Xee(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";_e()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{Ae&&Ne.log(`Stopping Replay triggered by ${r}`),e8(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,XQ(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ae&&Ne.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Ae&&Ne.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Ae&&Ne.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&I0(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${bt.location.pathname}${bt.location.hash}${bt.location.search}`,n=`${bt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===c8){const o=Ar({category:"replay.throttled"});this.addUpdate(()=>!x0(this,{type:lQ,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||wt(),n=t&&Tt(t),o=(n&&Me(n).data||{})[Pt];if(!(!n||!o||!["route","custom"].includes(o)))return Me(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=GQ({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&_e()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=C0({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return K5(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{bt.document.addEventListener("visibilitychange",this._handleVisibilityChange),bt.addEventListener("blur",this._handleWindowBlur),bt.addEventListener("focus",this._handleWindowFocus),bt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Wee(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=VQ(this)}_removeListeners(){try{bt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),bt.removeEventListener("blur",this._handleWindowBlur),bt.removeEventListener("focus",this._handleWindowFocus),bt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||Y5(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Ae&&Ne.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Be.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=OQ(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(Au(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Ae&&Ne.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await Gee(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new a8;const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await l8({replayId:t,recordingData:i,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});const r=_e();if(r){let o;n instanceof M0?o="ratelimit_backoff":n instanceof a8?o="invalid":o="send_error",r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Ae&&Ne.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();const i=o<this._options.minReplayDuration,s=o>this._options.maxReplayDuration+5e3;if(i||s){Ae&&Ne.log(`Session duration (${Math.floor(o/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const l=this.eventBuffer;l&&this.session.segmentId===0&&!l.hasCheckout&&Ae&&Ne.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(d){this.handleException(d)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&ku(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(l=>{const c=tte(l.target),d=n.join(",");return c?.matches(d)}))return!1;const r=t.length,o=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=o&&r>o;if(r>i||s){const l=Ar({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(l)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Bl(e,t){return[...e,...t].join(",")}function cte({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const i=["base","iframe[srcdoc]:not([src])"],s=Bl(e,[".sentry-mask","[data-sentry-mask]"]),l=Bl(t,[]);return{maskTextSelector:s,unmaskTextSelector:l,blockSelector:Bl(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Bl(r,[]),ignoreSelector:Bl(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function dte({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return i;const s=n.includes(t),l=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return s||l?i.replace(/[\S]/g,"*"):i}const d8='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',ute=["content-length","content-type","accept"],fte=Symbol.for("sentry__originalRequestBody");let u8=!1,f8=!1;function pte(){if(typeof Request>"u"||f8)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return r?.body!=null&&(o[fte]=r.body),o};t.prototype=e.prototype,Te.Request=t,f8=!0}catch{}}const mte=(e=>new _te(e));class _te{constructor({flushMinDelay:t=FJ,flushMaxDelay:n=BJ,minReplayDuration:r=HJ,maxReplayDuration:o=e5,stickySession:i=!0,useCompression:s=!0,workerUrl:l,_experiments:c={},maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:p=750,mutationLimit:m=1e4,slowClickTimeout:_=7e3,slowClickIgnoreSelectors:b=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:h=[],networkCaptureBodies:y=!0,networkRequestHeaders:E=[],networkResponseHeaders:$=[],mask:O=[],maskAttributes:N=["title","placeholder","aria-label"],unmask:v=[],block:B=[],unblock:H=[],ignore:U=[],maskFn:C,beforeAddRecordingEvent:A,beforeErrorSampling:R,onError:I,attachRawBodyFromRequest:V=!1}={}){this.name="Replay";const j=cte({mask:O,unmask:v,block:B,unblock:H,ignore:U});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{password:!0},maskTextFn:C,maskInputFn:C,maskAttributeFn:(F,M,Y)=>dte({maskAttributes:N,maskAllText:d,privacyOptions:j,key:F,value:M,el:Y}),...j,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:F=>{try{F.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,WJ),maxReplayDuration:Math.min(o,e5),stickySession:i,useCompression:s,workerUrl:l,blockAllMedia:u,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:p,mutationLimit:m,slowClickTimeout:_,slowClickIgnoreSelectors:b,networkDetailAllowUrls:g,networkDetailDenyUrls:h,networkCaptureBodies:y,networkRequestHeaders:p8(E),networkResponseHeaders:p8($),beforeAddRecordingEvent:A,beforeErrorSampling:R,onError:I,attachRawBodyFromRequest:V,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${d8}`:d8,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&_l())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return u8}set _isInitialized(t){u8=t}afterAllSetup(t){!_l()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&pte(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=hte(this._initialOptions,t);this._replay=new lte({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function hte(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=si(n.replaysSessionSampleRate),i=si(n.replaysOnErrorSampleRate);return o==null&&i==null&&nr(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),i!=null&&(r.errorSampleRate=i),r}function p8(e){return[...ute,...e.map(t=>t.toLowerCase())]}function gte(){return _e()?.getIntegrationByName("Replay")}var yte=Object.defineProperty,bte=(e,t,n)=>t in e?yte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m8=(e,t,n)=>bte(e,typeof t!="symbol"?t+"":t,n);class Ete{constructor(){m8(this,"idNodeMap",new Map),m8(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function $te(){return new Ete}function Ste(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function D0(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:D0(e.parentNode,t,n,r+1)}function _8(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Ste(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Ds=`Please stop import mirror directly. Instead of that,\r
|
|
526
526
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
527
|
-
or you can use record.mirror to access the mirror instance during recording.`;let h8={map:{},getId(){return console.error(Ds),-1},getNode(){return console.error(Ds),null},removeNodeFromMap(){console.error(Ds)},has(){return console.error(Ds),!1},reset(){console.error(Ds)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(h8=new Proxy(h8,{get(e,t,n){return t==="map"&&console.error(Ds),Reflect.get(e,t,n)}}));function L_(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){b8(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>L_(e,t,i||{},!0)}function F_(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function vte(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ou(e,t,n,r,o){if(!e)return!1;const i=vte(e);if(!i)return!1;const s=_8(t,n),l=D_(i,s);let c=-1;return l<0?!1:(r&&(c=D_(i,_8(null,r))),l>-1&&c<0?!0:l<c)}const g8={};function y8(e){const t=g8[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return g8[e]=r.bind(window)}function vi(...e){return y8("requestAnimationFrame")(...e)}function b8(...e){return y8("setTimeout")(...e)}var Ls=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ls||{});let Ru;function Tte(e){Ru=e}const B_=e=>Ru?(...n)=>{try{return e(...n)}catch(r){if(Ru&&Ru(r)===!0)return()=>{};throw r}}:e;for(var Fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wte=typeof Uint8Array>"u"?[]:new Uint8Array(256),Pu=0;Pu<Fs.length;Pu++)wte[Fs.charCodeAt(Pu)]=Pu;var kte=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Fs[t[n]>>2],o+=Fs[(t[n]&3)<<4|t[n+1]>>4],o+=Fs[(t[n+1]&15)<<2|t[n+2]>>6],o+=Fs[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const E8=new Map;function Ate(e,t){let n=E8.get(e);return n||(n=new Map,E8.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const $8=(e,t,n)=>{if(!e||!(v8(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=Ate(n,r);let i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function Mu(e,t,n){if(e instanceof Array)return e.map(r=>Mu(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=kte(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Mu(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Mu(e.data,t,n),e.width,e.height]};if(v8(e,t)||typeof e=="object"){const r=e.constructor.name,o=$8(e,t,n);return{rr_type:r,index:o}}}}return e}const S8=(e,t,n)=>e.map(r=>Mu(r,t,n)),v8=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function Nte(e,t,n,r,o){const i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const l of s)try{if(typeof t.CanvasRenderingContext2D.prototype[l]!="function")continue;const c=F_(t.CanvasRenderingContext2D.prototype,l,function(d){return function(...f){return Ou(this.canvas,n,r,o,!0)||b8(()=>{const u=S8(f,t,this);e(this.canvas,{type:Ls["2D"],property:l,args:u})},0),d.apply(this,f)}});i.push(c)}catch{const c=L_(t.CanvasRenderingContext2D.prototype,l,{set(d){e(this.canvas,{type:Ls["2D"],property:l,args:[d],setter:!0})}});i.push(c)}return()=>{i.forEach(l=>l())}}function Ite(e){return e==="experimental-webgl"?"webgl":e}function T8(e,t,n,r,o){const i=[];try{const s=F_(e.HTMLCanvasElement.prototype,"getContext",function(l){return function(c,...d){if(!Ou(this,t,n,r,!0)){const f=Ite(c);if("__context"in this||(this.__context=f),o&&["webgl","webgl2"].includes(f))if(d[0]&&typeof d[0]=="object"){const u=d[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[c,...d])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function w8(e,t,n,r,o,i,s,l){const c=[],d=Object.getOwnPropertyNames(e);for(const f of d)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const u=F_(e,f,function(p){return function(...m){const _=p.apply(this,m);if($8(_,l,this),"tagName"in this.canvas&&!Ou(this.canvas,r,o,i,!0)){const b=S8(m,l,this),g={type:t,property:f,args:b};n(this.canvas,g)}return _}});c.push(u)}catch{const u=L_(e,f,{set(p){n(this.canvas,{type:t,property:f,args:[p],setter:!0})}});c.push(u)}return c}function Cte(e,t,n,r,o,i){const s=[];return s.push(...w8(t.WebGLRenderingContext.prototype,Ls.WebGL,e,n,r,o,i,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...w8(t.WebGL2RenderingContext.prototype,Ls.WebGL2,e,n,r,o,i,t)),()=>{s.forEach(l=>l())}}const xte='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function Ote(){const e=new Blob([xte]);return URL.createObjectURL(e)}class Rte{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:o,recordCanvas:i,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&Tte(s),(i&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&B_(()=>{i&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:i,recordCanvas:s,enableManualSnapshot:l}=this.options;if(!this.windowsSet.has(t)){if(l){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}B_(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,o,i),s&&typeof n=="number"){const c=T8(t,r,o,i,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}vi(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(Ote());return t.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:i,type:s,width:l,height:c}=r;this.mutationCb({id:o,type:Ls["2D"],commands:[{property:"clearRect",args:[0,0,l,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:s}]},0,0,l,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=vi(n)};t=vi(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const i=T8(t,n,r,o,!1),s=Nte(this.processMutation.bind(this),t,n,r,o),l=Cte(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{i(),s(),l()})}getCanvasElements(t,n,r){const o=[],i=s=>{s.querySelectorAll("canvas").forEach(l=>{Ou(l,t,n,r)||o.push(l)})};for(const s of this.windows){const l=s.deref();let c;try{c=l&&l.document}catch{}c&&i(c)}for(const s of this.shadowDoms){const l=s.deref();l&&i(l)}return o}takeSnapshot(t,n,r){const{sampling:o,blockClass:i,blockSelector:s,unblockSelector:l,dataURLOptions:c,maxCanvasSize:d}=this.options,u=1e3/(o==="all"?2:o||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<u?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(i,s,l)).forEach(_=>{const b=this.mirror.getId(_);if(!(!this.mirror.hasNode(_)||!_.width||!_.height||this.snapshotInProgressMap.get(b))){if(this.snapshotInProgressMap.set(b,!0),!n&&["webgl","webgl2"].includes(_.__context)){const g=_.getContext(_.__context);g?.getContextAttributes()?.preserveDrawingBuffer===!1&&g.clear(g.COLOR_BUFFER_BIT)}createImageBitmap(_).then(g=>{this.worker?.postMessage({id:b,bitmap:g,width:_.width,height:_.height,dataURLOptions:c,maxCanvasSize:d},[g])}).catch(g=>{B_(()=>{throw this.snapshotInProgressMap.delete(b),g})()})}}),!0)}startPendingCanvasMutationFlusher(){vi(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,vi(t)};vi(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),vi(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(s=>{const{type:l,...c}=s;return c}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}$te();var k8;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(k8||(k8={}));const A8={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},Pte="ReplayCanvas",Du=1280,Mte=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Du):Du,n?Math.min(n,Du):Du]};let o,i;const s=new Promise(l=>i=l);return{name:Pte,getOptions(){const{quality:l,enableManualSnapshot:c,maxCanvasSize:d}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:f=>{const u=new Rte({...f,enableManualSnapshot:c,maxCanvasSize:d,errorHandler:p=>{try{typeof p=="object"&&(p.__rrweb__=!0)}catch{}}});return o=u,i(u),u},...A8[l]||A8.medium}},async snapshot(l,c){(o||await s).snapshot(l,c)}}});function Dte(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function N8(e){try{return new URL(e,be.location.origin).href}catch{return}}function Lte(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function I8(e){try{return new Headers(e)}catch{return}}const C8=new WeakMap,U_=new Map,V_={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function x8(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:l,onRequestSpanStart:c,onRequestSpanEnd:d}={...V_,...t},f=typeof i=="function"?i:_=>!0,u=_=>Bte(_,l),p={},m=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(_=>(_.type==="transaction"&&_.spans&&_.spans.forEach(b=>{if(b.op==="http.client"){const g=U_.get(b.span_id);g&&(b.timestamp=g/1e3,U_.delete(b.span_id))}}),_)),o&&XW(_=>{if(_.response){const b=C8.get(_.response);b&&_.endTimestamp&&U_.set(b,_.endTimestamp)}}),$0(_=>{const b=Sq(_,f,u,p,{propagateTraceparent:m,onRequestSpanEnd:d});if(_.response&&_.fetchData.__span&&C8.set(_.response,_.fetchData.__span),b){const g=N8(_.fetchData.url),h=g?di(g).host:void 0;b.setAttributes({"http.url":g?ko(g):void 0,"server.address":h}),s&&O8(b,e),c?.(b,{headers:_.headers})}})),r&&t_(_=>{const b=Ute(_,f,u,p,m,d);b&&(s&&O8(b,e),c?.(b,{headers:I8(_.xhr.__sentry_xhr_v3__?.request_headers)}))})}const Fte=300;function O8(e,t){const{url:n}=Me(e).data;if(!n||typeof n!="string")return;let r=()=>void setTimeout(o);if(Zr(t)){const i=e.end.bind(e);e.end=s=>{const l=s??ut();let c=!1;const d=()=>{c||(c=!0,setTimeout(o),i(l),clearTimeout(f))};r=d;const f=setTimeout(d,Fte)}}const o=$i("resource",({entries:i})=>{i.forEach(s=>{Lte(s)&&s.name.endsWith(n)&&(e.setAttributes(y6(s)),r())})})}function Bte(e,t){const n=ni();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const i=r.origin===o;return t?or(r.toString(),t)||i&&or(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?or(e,t):r}}function Ute(e,t,n,r,o,i){const s=e.xhr,l=s?.[ro];if(!s||s.__sentry_own_request__||!l)return;const{url:c,method:d}=l,f=Mn()&&t(c);if(e.endTimestamp){const h=s.__sentry_xhr_span_id__;if(!h)return;const y=r[h];y&&(f&&l.status_code!==void 0&&(Ja(y,l.status_code),y.end(),i?.(y,{headers:I8(w6(s)),error:e.error})),delete r[h]);return}const u=N8(c),p=di(u||c),m=ko(eE(c)),_=_e(),b=!!wt(),g=f&&b?Tr({name:`${d} ${m}`,attributes:{url:ko(c),type:"xhr","http.method":d,"http.url":u?ko(u):void 0,"server.address":p?.host,[We]:"auto.http.browser",[tt]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new Dn;return f&&!b&&_?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=g.spanContext().spanId,r[s.__sentry_xhr_span_id__]=g,n(c)&&Vte(s,Mn()&&b?g:void 0,o),_&&_.emit("beforeOutgoingRequestSpan",g,e),g}function Vte(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:i}=e0({span:t,propagateTraceparent:n});r&&jte(e,r,o,i)}function jte(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const i=o?.baggage;(!i||!Dte(i))&&e.setRequestHeader("baggage",n)}}catch{}}function zte(){be.document?be.document.addEventListener("visibilitychange",()=>{const e=wt();if(!e)return;const t=Tt(e);if(be.document.hidden&&t){const n="cancelled",{op:r,status:o}=Me(t);de&&P.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:Ge,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):de&&P.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const qte=3600,R8="sentry_previous_trace",Hte="sentry.previous_trace";function Wte(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?Kte():void 0;e.on("spanStart",s=>{if(Tt(s)!==s)return;const l=Re().getPropagationContext();o=Gte(o,s,l),r&&Yte(o)});let i=!0;n&&e.on("beforeSampling",s=>{if(!o)return;const l=Re(),c=l.getPropagationContext();if(i&&c.parentSpanId){i=!1;return}l.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(j_(o.spanContext))},sampleRand:o.sampleRand}),s.parentSampled=j_(o.spanContext),s.parentSampleRate=o.sampleRate,s.spanAttributes={...s.spanAttributes,[h4]:o.sampleRate}})}function Gte(e,t,n){const r=Me(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Wc])}catch{return 0}}const i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return i;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=qte&&(de&&P.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[NU]:"previous_trace"}}),t.setAttribute(Hte,`${s.traceId}-${s.spanId}-${j_(s)?1:0}`)),i)}function Yte(e){try{be.sessionStorage.setItem(R8,JSON.stringify(e))}catch(t){de&&P.warn("Could not store previous trace in sessionStorage",t)}}function Kte(){try{const e=be.sessionStorage?.getItem(R8);return JSON.parse(e)}catch{return}}function j_(e){return e.traceFlags===1}const Xte="BrowserTracing",Jte=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function P8(){const e=be.navigator;return e?.userAgent?Jte.test(e.userAgent):!1}const Zte={...od,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...V_},M8=((e={})=>{"enableElementTiming"in e&&nr(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t={name:void 0,source:void 0},n=be.document,{enableInp:r,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:s,enableStandaloneClsSpans:l,enableStandaloneLcpSpans:c},beforeStartSpan:d,idleTimeout:f,finalTimeout:u,childSpanTimeout:p,markBackgroundSpan:m,traceFetch:_,traceXHR:b,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:h,enableHTTPTimings:y,ignoreResourceSpans:E,ignorePerformanceApiSpans:$,instrumentPageLoad:O,instrumentNavigation:N,detectRedirects:v,linkPreviousTrace:B,consistentTraceSampling:H,enableReportPageLoaded:U,onRequestSpanStart:C,onRequestSpanEnd:A}={...Zte,...e},R=P8();let I,V,j;function F(M,Y,W=!0){const K=Y.op==="pageload",te=Y.name,X=d?d(Y):Y,oe=X.attributes||{};if(te!==X.name&&(oe[Pt]="custom",X.attributes=oe),!W){const ae=oi();Tr({...X,startTime:ae}).end(ae);return}t.name=X.name,t.source=oe[Pt];const fe=u9(X,{idleTimeout:f,finalTimeout:u,childSpanTimeout:p,disableAutoFinish:K,beforeSpanEnd:ae=>{I?.();const ye=Zr(M);SK(ae,{recordClsOnPageloadSpan:!ye&&!l,recordLcpOnPageloadSpan:!ye&&!c,ignoreResourceSpans:E,ignorePerformanceApiSpans:$,spanStreamingEnabled:ye}),U8(M,void 0);const $e=Re(),Ie=$e.getPropagationContext();$e.setPropagationContext({...Ie,traceId:fe.spanContext().traceId,sampled:Jr(fe),dsc:Wn(ae)}),K&&(j=void 0)},trimIdleSpanEndTimestamp:!U});K&&U&&(j=fe),U8(M,fe);function J(){n&&["interactive","complete"].includes(n.readyState)&&M.emit("idleSpanEnableAutoFinish",fe)}K&&!U&&n&&(n.addEventListener("readystatechange",()=>{J()}),J())}return{name:Xte,setup(M){if(R){de&&P.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}H4();const Y=Zr(M);if(I=_K({recordClsStandaloneSpans:Y?void 0:l||!1,recordLcpStandaloneSpans:Y?void 0:c||!1,client:M}),Y?(VK(M),zK(M),r&&HK()):r&&DK(),i&&Te.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?gK():o&&hK(),s&&yK(),v&&n){const K=()=>{V=ut()};addEventListener("click",K,{capture:!0}),addEventListener("keydown",K,{capture:!0,passive:!0})}function W(){const K=Ul(M);K&&!Me(K).timestamp&&(de&&P.log(`[Tracing] Finishing current active span with op: ${Me(K).op}`),K.setAttribute(Wa,"cancelled"),K.end())}M.on("startNavigationSpan",(K,te)=>{if(_e()!==M)return;if(te?.isRedirect){de&&P.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),F(M,{op:"navigation.redirect",...K},!1);return}V=void 0,W(),vt().setPropagationContext({traceId:Er(),sampleRand:Math.random(),propagationSpanId:Mn()?void 0:Kr()});const X=Re();X.setPropagationContext({traceId:Er(),sampleRand:Math.random(),propagationSpanId:Mn()?void 0:Kr()}),X.setSDKProcessingMetadata({normalizedRequest:void 0}),F(M,{op:"navigation",...K,parentSpan:null,forceTransaction:!0})}),M.on("startPageLoadSpan",(K,te={})=>{if(_e()!==M)return;W();const X=te.sentryTrace||L8("sentry-trace")||F8("sentry-trace"),oe=te.baggage||L8("baggage")||F8("baggage"),fe=N4(X,oe),J=Re();J.setPropagationContext(fe),Mn()||(J.getPropagationContext().propagationSpanId=Kr()),J.setSDKProcessingMetadata({normalizedRequest:Ud()}),F(M,{op:"pageload",...K})}),M.on("endPageloadSpan",()=>{U&&j&&(j.setAttribute(Wa,"reportPageLoaded"),j.end())})},afterAllSetup(M){if(R)return;let Y=ni();if(B!=="off"&&Wte(M,{linkPreviousTrace:B,consistentTraceSampling:H}),be.location){if(O){const W=Ft();D8(M,{name:be.location.pathname,startTime:W?W/1e3:void 0,attributes:{[Pt]:"url",[We]:"auto.pageload.browser"}})}N&&ou(({to:W,from:K})=>{if(K===void 0&&Y?.indexOf(W)!==-1){Y=void 0;return}Y=void 0;const te=Qm(W),X=Ul(M),oe=X&&v&&ene(X,V);z_(M,{name:te?.pathname||be.location.pathname,attributes:{[Pt]:"url",[We]:"auto.navigation.browser"}},{url:W,isRedirect:oe})})}m&&zte(),s&&Qte(M,f,u,p,t),r&&UK(),x8(M,{traceFetch:_,traceXHR:b,trackFetchStreamPerformance:g,tracePropagationTargets:M.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:h,enableHTTPTimings:y,onRequestSpanStart:C,onRequestSpanEnd:A})}}});function D8(e,t,n){e.emit("startPageLoadSpan",t,n),Re().setTransactionName(t.name);const r=Ul(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function z_(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});const i=Re();return i.setTransactionName(t.name),r&&!o&&i.setSDKProcessingMetadata({normalizedRequest:{...Ud(),url:r}}),Ul(e)}function L8(e){return be.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function F8(e){return be.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function Qte(e,t,n,r,o){const i=be.document;let s;const l=()=>{const c="ui.action.click",d=Ul(e);if(d){const f=Me(d).op;if(["navigation","pageload"].includes(f)){de&&P.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(Wa,"interactionInterrupted"),s.end(),s=void 0),!o.name){de&&P.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=u9({name:o.name,op:c,attributes:{[Pt]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",l,{capture:!0})}const B8="_sentry_idleSpan";function Ul(e){return e[B8]}function U8(e,t){en(e,B8,t)}const V8=1.5;function ene(e,t){const n=Me(e),r=oi(),o=n.start_timestamp;return!(r-o>V8||t&&r-t<=V8)}function tne(e=_e()){e?.emit("endPageloadSpan")}function nne(e){const t=wt();if(t===e)return;const n=Re();e.end=new Proxy(e.end,{apply(r,o,i){return $r(n,t),Reflect.apply(r,o,i)}}),$r(n,e)}const rne=()=>({name:"SpanStreaming",beforeSetup(e){const t=e.getOptions();t.traceLifecycle||(de&&P.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),t.traceLifecycle="stream")},setup(e){const t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!Zr(e)){r.traceLifecycle="static",de&&P.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}const o=r.beforeSendSpan;if(o&&!ed(o)){r.traceLifecycle="static",de&&P.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}const i=new WW(e);e.on("afterSpanEnd",s=>{Jr(s)&&i.add(UV(s,e))}),e.on("afterSegmentSpanEnd",s=>{const l=s.spanContext().traceId;setTimeout(()=>{i.flush(l)},500)})}});function Bs(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function one(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Bs(n);return o=>r.then(i=>o(i.transaction(t,"readwrite").objectStore(t)))}function q_(e){return Bs(e.getAllKeys())}function ine(e,t,n){return e(r=>q_(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),Bs(r.transaction)}))}function sne(e,t,n){return e(r=>q_(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),Bs(r.transaction)}))}function ane(e){return e(t=>q_(t).then(n=>{const r=n[0];if(r!=null)return Bs(t.get(r)).then(o=>(t.delete(r),Bs(t.transaction).then(()=>o)))}))}function lne(e){let t;function n(){return t==null&&(t=one(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=nd(r);await ine(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=nd(r);await sne(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await ane(n());if(r)return fV(r)}catch{}}}}function cne(e){return t=>{const n=e({...t,createStore:lne});return be.addEventListener("online",async r=>{await n.flush()}),n}}function dne(e=r_){return cne(Kj(e))}const j8=1e6,une="window"in Te&&Te.window===Te&&typeof importScripts>"u",Do=String(0),Lu=une?"main":"worker",Fu=be.navigator;let z8="",q8="",H8="",H_=Fu?.userAgent||"",W8="";const fne=Fu?.language||Fu?.languages?.[0]||"";function pne(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const G8=Fu?.userAgentData;pne(G8)&&G8.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(z8=e.platform||"",H8=e.architecture||"",W8=e.model||"",q8=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];H_=`${t.brand} ${t.version}`}}).catch(e=>{});function mne(e){return!("thread_metadata"in e)}function _ne(e){return mne(e)?$ne(e):e}function hne(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&de&&P.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function gne(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const o=hne(r),i=_ne(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:ut()*1e3),l=typeof r.timestamp=="number"?r.timestamp*1e3:ut()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Zc,runtime:{name:"javascript",version:be.navigator.userAgent},os:{name:z8,version:q8,build_number:H_},device:{locale:fne,model:W8,manufacturer:H_,architecture:H8,is_emulator:!1},debug_meta:{images:K8(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||jt(),trace_id:o,active_thread_id:Do,relative_start_ns:"0",relative_end_ns:((l-s)*1e6).toFixed(0)}]}}function yne(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=Ene(e),o=t.getOptions(),i=t.getSdkMetadata?.()?.sdk;return{chunk_id:jt(),client_sdk:{name:i?.name??"sentry.javascript.browser",version:i?.version??"0.0.0"},profiler_id:n||jt(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:K8(e.resources)},profile:r}}function bne(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};const n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:`unknown validation error: ${t}`}}}function Ene(e){const t=[];for(let l=0;l<e.frames.length;l++){const c=e.frames[l];c&&(t[l]={function:c.name,abs_path:typeof c.resourceId=="number"?e.resources[c.resourceId]:void 0,lineno:c.line,colno:c.column})}const n=[];for(let l=0;l<e.stacks.length;l++){const c=e.stacks[l];if(!c)continue;const d=[];let f=c;for(;f;)d.push(f.frameId),f=f.parentId===void 0?void 0:e.stacks[f.parentId];n[l]=d}const r=Ft(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,i=o-(r||o),s=[];for(let l=0;l<e.samples.length;l++){const c=e.samples[l];if(!c)continue;const d=(o+(c.timestamp-i))/1e3;s[l]={stack_id:c.stackId??0,thread_id:Do,timestamp:d}}return{frames:t,stacks:n,samples:s,thread_metadata:{[Do]:{name:Lu}}}}function Y8(e){return Me(e).op==="pageload"}function $ne(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Do]:{name:Lu}}},o=e.samples[0];if(!o)return r;const i=o.timestamp,s=Ft(),l=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=l-(s||l);return e.samples.forEach((d,f)=>{if(d.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[f]={elapsed_since_start_ns:((d.timestamp+c-i)*j8).toFixed(0),stack_id:t,thread_id:Do};return}let u=e.stacks[d.stackId];const p=[];for(;u;){p.push(u.frameId);const _=e.frames[u.frameId];_&&r.frames[u.frameId]===void 0&&(r.frames[u.frameId]={function:_.name,abs_path:typeof _.resourceId=="number"?e.resources[_.resourceId]:void 0,lineno:_.line,colno:_.column}),u=u.parentId===void 0?void 0:e.stacks[u.parentId]}const m={elapsed_since_start_ns:((d.timestamp+c-i)*j8).toFixed(0),stack_id:n,thread_id:Do};r.stacks[n]=p,r.samples[f]=m,n++}),r}function Sne(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function vne(e){const t=[];return li(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++)n[o]?.contexts?.profile?.profile_id&&t.push(n[o])}),t}function K8(e){const r=_e()?.getOptions()?.stackParser;return r?KV(r,e):[]}function X8(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(de&&P.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(de&&P.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function Tne(e){return e.samples.length<2?(de&&P.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(de&&P.log("[Profiling] Discarding profile because it contains no frames"),!1)}let W_=!1;const J8=3e4;function wne(e){return typeof e=="function"}function Z8(){const e=be.Profiler;if(!wne(e)){de&&P.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(J8/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{de&&(P.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),P.log("[Profiling] Disabling profiling for current user session.")),W_=!0}}function Q8(e){if(W_)return de&&P.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return de&&P.log("[Profiling] Discarding profile because root span was not sampled."),!1;const n=_e()?.getOptions();if(!n)return de&&P.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return X8(r)?r?(r===!0?!0:Math.random()<r)?!0:(de&&P.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(de&&P.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(de&&P.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function kne(e){if(W_)return de&&P.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return de&&P.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return X8(t)?t?Math.random()<=t:(de&&P.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(de&&P.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function Bu(e){return typeof e.profilesSampleRate<"u"}function Ane(e,t,n,r){return Tne(n)?gne(e,t,n,r):null}const Ti=new Map;function Nne(){return Ti.size}function Ine(e){const t=Ti.get(e);return t&&Ti.delete(e),t}function Cne(e,t){if(Ti.set(e,t),Ti.size>30){const n=Ti.keys().next().value;n!==void 0&&Ti.delete(n)}}function xne(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace?.trace_id&&(e.contexts.trace={...e.contexts.trace,data:{...e.contexts.trace.data??{},"thread.id":Do,"thread.name":Lu}}),e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Do,"thread.name":Lu}})),e}function eS(e){let t;Y8(e)&&(t=ut()*1e3);const n=Z8();if(!n)return;de&&P.log(`[Profiling] started profiling span: ${Me(e).description}`);const r=jt();let o=null;Re().setContext("profile",{profile_id:r,start_timestamp:t});async function i(){if(e&&n){if(o){de&&P.log("[Profiling] profile for:",Me(e).description,"already exists, returning early");return}return n.stop().then(d=>{if(s&&(be.clearTimeout(s),s=void 0),de&&P.log(`[Profiling] stopped profiling of span: ${Me(e).description}`),!d){de&&P.log(`[Profiling] profiler returned null profile for: ${Me(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}o=d,Cne(r,d)}).catch(d=>{de&&P.log("[Profiling] error while stopping profiler:",d)})}}let s=be.setTimeout(()=>{de&&P.log("[Profiling] max profile duration elapsed, stopping profiling for:",Me(e).description),i()},J8);const l=e.end.bind(e);function c(){return e?(i().then(()=>{l()},()=>{l()}),e):l()}e.end=c}const One=6e4,Rne=3e5;class Pne{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(t){const n=t.getOptions().profileLifecycle,r=kne(t.getOptions());de&&P.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||de&&P.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=jt(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t)}start(){if(this._lifecycleMode==="trace"){de&&P.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){de&&P.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){de&&P.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){de&&P.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){de&&P.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&(de&&P.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling())}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,de&&P.log("[Profiling] Started profiling with profiler ID:",this._profilerId),ii().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){de&&P.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{de&&P.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&ii().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){de&&P.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==Tt(n))return;if(!n.isRecording()){de&&P.log("[Profiling] Discarding profile because root span was not sampled.");return}const r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);const o=this._activeRootSpanIds.size;o===1&&(de&&P.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${o}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;const r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);const o=this._activeRootSpanIds.size;de&&P.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(i=>{de&&P.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",i)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,ii().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),Rne);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=Z8();if(!t){de&&P.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{de&&P.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},One))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(de&&P.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=yne(n,this._client,this._profilerId),o=bne(r);if("reason"in o){de&&P.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),de&&P.log("[Profiling] Collected browser profile chunk.")}catch(n){de&&P.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=tl(n.getSdkMetadata?.()),o=n.getDsn(),i=n.getOptions().tunnel,s=Gn({event_id:jt(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!i&&o&&{dsn:Sr(o)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(s).then(null,l=>{de&&P.error("Error while sending profile chunk envelope:",l)})}}const Mne="BrowserProfiling",Dne=(()=>({name:Mne,setup(e){const t=e.getOptions(),n=new Pne;if(!Bu(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),Bu(t)&&!t.profilesSampleRate){de&&P.log("[Profiling] Profiling disabled, no profiling options found.");return}const r=wt(),o=r&&Tt(r);if(Bu(t)&&t.profileSessionSampleRate!==void 0&&de&&P.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),Bu(t))o&&Y8(o)&&Q8(o)&&eS(o),e.on("spanStart",i=>{i===Tt(i)&&Q8(i)&&eS(i)}),e.on("beforeEnvelope",i=>{if(!Nne())return;const s=vne(i);if(!s.length)return;const l=[];for(const c of s){const d=c?.contexts,f=d?.profile?.profile_id,u=d?.profile?.start_timestamp;if(typeof f!="string"){de&&P.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!f){de&&P.log("[Profiling] cannot find profile for a span without a profile context");continue}d?.profile&&delete d.profile;const p=Ine(f);if(!p){de&&P.log(`[Profiling] Could not retrieve profile for span: ${f}`);continue}const m=Ane(f,u,p,c);m&&l.push(m)}Sne(i,l)});else{const i=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),i==="manual")n.initialize(e);else if(i==="trace"){if(!Mn(t)){de&&P.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),o&&n.notifyRootSpanActive(o),be.setTimeout(()=>{const s=wt(),l=s&&Tt(s);l&&n.notifyRootSpanActive(l)},0)}}},processEvent(e){return xne(e)}})),Lne=()=>({name:"LaunchDarkly",processEvent(e,t,n){return os(e)}});function Fne(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{ui(e,t.value),fi(e,t.value)}}}const Bne=()=>({name:"OpenFeature",processEvent(e,t,n){return os(e)}});class Une{after(t,n){ui(n.flagKey,n.value),fi(n.flagKey,n.value)}error(t,n,r){ui(t.flagKey,t.defaultValue),fi(t.flagKey,t.defaultValue)}}const Vne=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Qt(t,"isEnabled",jne)},processEvent(t,n,r){return os(t)}});function jne(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(ui(n,r),fi(n,r)):de&&P.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const zne=(({growthbookClass:e})=>bq({growthbookClass:e})),qne=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{ui(n.gate.name,n.gate.value),fi(n.gate.name,n.gate.value)})},processEvent(t,n,r){return os(t)}});async function Hne(){const e=_e();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const r=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await s9(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const Wne="WebWorker",Gne=({worker:e})=>({name:Wne,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>tS(t))},addWorker:t=>tS(t)});function tS(e){e.addEventListener("message",t=>{if(Xne(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(de&&P.log("Sentry debugId web worker message received",t.data),be._sentryDebugIds={...t.data._sentryDebugIds,...be._sentryDebugIds}),t.data._sentryModuleMetadata&&(de&&P.log("Sentry module metadata web worker message received",t.data),be._sentryModuleMetadata={...t.data._sentryModuleMetadata,...be._sentryModuleMetadata}),t.data._sentryWasmImages){de&&P.log("Sentry WASM images web worker message received",t.data);const n=be._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(o=>An(o)&&typeof o.code_file=="string"&&!n.some(i=>i.code_file===o.code_file));be._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(de&&P.log("Sentry worker rejection message received",t.data._sentryWorkerError),Yne(t.data._sentryWorkerError))}})}function Yne(e){const t=_e();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,o=e.reason,i=Hr(o)?B6(o):jd(n,o,void 0,r,!0);i.level="error",e.filename&&(i.contexts={...i.contexts,worker:{filename:e.filename}}),rs(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),de&&P.log("Captured worker unhandled rejection",o)}function Kne({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:F6(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),de&&P.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),de&&P.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function Xne(e){if(!An(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,o="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!o||t&&!(An(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(An(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!An(e._sentryWorkerError)||o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(i=>An(i)&&typeof i.code_file=="string")))}const nS=["activate","mount"],rS=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Jne=/(?:^|[-_])(\w)/g,Zne=e=>e.replace(Jne,t=>t.toUpperCase()).replace(/[-_]/g,""),Qne="<Root>",G_="<Anonymous>",ere=(e,t)=>e.repeat(t),Vl=(e,t)=>{if(!e)return G_;if(e.$root===e)return Qne;if(!e.$options)return G_;const n=e.$options;let r=n.name||n._componentTag||n.__name;const o=n.__file;if(!r&&o){const i=o.match(/([^/\\]+)\.vue$/);i&&(r=i[1])}return(r?`<${Zne(r)}>`:G_)+(o&&t!==!1?` at ${o}`:"")},tre=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const o=t[t.length-1];if(o.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[o,n],n=0)}t.push(e),e=e.$parent}return`
|
|
527
|
+
or you can use record.mirror to access the mirror instance during recording.`;let h8={map:{},getId(){return console.error(Ds),-1},getNode(){return console.error(Ds),null},removeNodeFromMap(){console.error(Ds)},has(){return console.error(Ds),!1},reset(){console.error(Ds)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(h8=new Proxy(h8,{get(e,t,n){return t==="map"&&console.error(Ds),Reflect.get(e,t,n)}}));function L0(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){b8(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>L0(e,t,i||{},!0)}function F0(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function vte(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ou(e,t,n,r,o){if(!e)return!1;const i=vte(e);if(!i)return!1;const s=_8(t,n),l=D0(i,s);let c=-1;return l<0?!1:(r&&(c=D0(i,_8(null,r))),l>-1&&c<0?!0:l<c)}const g8={};function y8(e){const t=g8[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return g8[e]=r.bind(window)}function vi(...e){return y8("requestAnimationFrame")(...e)}function b8(...e){return y8("setTimeout")(...e)}var Ls=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ls||{});let Ru;function Tte(e){Ru=e}const B0=e=>Ru?(...n)=>{try{return e(...n)}catch(r){if(Ru&&Ru(r)===!0)return()=>{};throw r}}:e;for(var Fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wte=typeof Uint8Array>"u"?[]:new Uint8Array(256),Pu=0;Pu<Fs.length;Pu++)wte[Fs.charCodeAt(Pu)]=Pu;var kte=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Fs[t[n]>>2],o+=Fs[(t[n]&3)<<4|t[n+1]>>4],o+=Fs[(t[n+1]&15)<<2|t[n+2]>>6],o+=Fs[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const E8=new Map;function Ate(e,t){let n=E8.get(e);return n||(n=new Map,E8.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const $8=(e,t,n)=>{if(!e||!(v8(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=Ate(n,r);let i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function Mu(e,t,n){if(e instanceof Array)return e.map(r=>Mu(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=kte(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Mu(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Mu(e.data,t,n),e.width,e.height]};if(v8(e,t)||typeof e=="object"){const r=e.constructor.name,o=$8(e,t,n);return{rr_type:r,index:o}}}}return e}const S8=(e,t,n)=>e.map(r=>Mu(r,t,n)),v8=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function Nte(e,t,n,r,o){const i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const l of s)try{if(typeof t.CanvasRenderingContext2D.prototype[l]!="function")continue;const c=F0(t.CanvasRenderingContext2D.prototype,l,function(d){return function(...f){return Ou(this.canvas,n,r,o,!0)||b8(()=>{const u=S8(f,t,this);e(this.canvas,{type:Ls["2D"],property:l,args:u})},0),d.apply(this,f)}});i.push(c)}catch{const c=L0(t.CanvasRenderingContext2D.prototype,l,{set(d){e(this.canvas,{type:Ls["2D"],property:l,args:[d],setter:!0})}});i.push(c)}return()=>{i.forEach(l=>l())}}function Ite(e){return e==="experimental-webgl"?"webgl":e}function T8(e,t,n,r,o){const i=[];try{const s=F0(e.HTMLCanvasElement.prototype,"getContext",function(l){return function(c,...d){if(!Ou(this,t,n,r,!0)){const f=Ite(c);if("__context"in this||(this.__context=f),o&&["webgl","webgl2"].includes(f))if(d[0]&&typeof d[0]=="object"){const u=d[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[c,...d])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function w8(e,t,n,r,o,i,s,l){const c=[],d=Object.getOwnPropertyNames(e);for(const f of d)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const u=F0(e,f,function(p){return function(...m){const _=p.apply(this,m);if($8(_,l,this),"tagName"in this.canvas&&!Ou(this.canvas,r,o,i,!0)){const b=S8(m,l,this),g={type:t,property:f,args:b};n(this.canvas,g)}return _}});c.push(u)}catch{const u=L0(e,f,{set(p){n(this.canvas,{type:t,property:f,args:[p],setter:!0})}});c.push(u)}return c}function Cte(e,t,n,r,o,i){const s=[];return s.push(...w8(t.WebGLRenderingContext.prototype,Ls.WebGL,e,n,r,o,i,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...w8(t.WebGL2RenderingContext.prototype,Ls.WebGL2,e,n,r,o,i,t)),()=>{s.forEach(l=>l())}}const xte='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function Ote(){const e=new Blob([xte]);return URL.createObjectURL(e)}class Rte{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:o,recordCanvas:i,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&Tte(s),(i&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&B0(()=>{i&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:i,recordCanvas:s,enableManualSnapshot:l}=this.options;if(!this.windowsSet.has(t)){if(l){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}B0(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,o,i),s&&typeof n=="number"){const c=T8(t,r,o,i,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}vi(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(Ote());return t.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:i,type:s,width:l,height:c}=r;this.mutationCb({id:o,type:Ls["2D"],commands:[{property:"clearRect",args:[0,0,l,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:s}]},0,0,l,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=vi(n)};t=vi(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const i=T8(t,n,r,o,!1),s=Nte(this.processMutation.bind(this),t,n,r,o),l=Cte(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{i(),s(),l()})}getCanvasElements(t,n,r){const o=[],i=s=>{s.querySelectorAll("canvas").forEach(l=>{Ou(l,t,n,r)||o.push(l)})};for(const s of this.windows){const l=s.deref();let c;try{c=l&&l.document}catch{}c&&i(c)}for(const s of this.shadowDoms){const l=s.deref();l&&i(l)}return o}takeSnapshot(t,n,r){const{sampling:o,blockClass:i,blockSelector:s,unblockSelector:l,dataURLOptions:c,maxCanvasSize:d}=this.options,u=1e3/(o==="all"?2:o||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<u?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(i,s,l)).forEach(_=>{const b=this.mirror.getId(_);if(!(!this.mirror.hasNode(_)||!_.width||!_.height||this.snapshotInProgressMap.get(b))){if(this.snapshotInProgressMap.set(b,!0),!n&&["webgl","webgl2"].includes(_.__context)){const g=_.getContext(_.__context);g?.getContextAttributes()?.preserveDrawingBuffer===!1&&g.clear(g.COLOR_BUFFER_BIT)}createImageBitmap(_).then(g=>{this.worker?.postMessage({id:b,bitmap:g,width:_.width,height:_.height,dataURLOptions:c,maxCanvasSize:d},[g])}).catch(g=>{B0(()=>{throw this.snapshotInProgressMap.delete(b),g})()})}}),!0)}startPendingCanvasMutationFlusher(){vi(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,vi(t)};vi(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),vi(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(s=>{const{type:l,...c}=s;return c}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}$te();var k8;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(k8||(k8={}));const A8={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},Pte="ReplayCanvas",Du=1280,Mte=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Du):Du,n?Math.min(n,Du):Du]};let o,i;const s=new Promise(l=>i=l);return{name:Pte,getOptions(){const{quality:l,enableManualSnapshot:c,maxCanvasSize:d}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:f=>{const u=new Rte({...f,enableManualSnapshot:c,maxCanvasSize:d,errorHandler:p=>{try{typeof p=="object"&&(p.__rrweb__=!0)}catch{}}});return o=u,i(u),u},...A8[l]||A8.medium}},async snapshot(l,c){(o||await s).snapshot(l,c)}}});function Dte(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function N8(e){try{return new URL(e,be.location.origin).href}catch{return}}function Lte(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function I8(e){try{return new Headers(e)}catch{return}}const C8=new WeakMap,U0=new Map,V0={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function x8(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:l,onRequestSpanStart:c,onRequestSpanEnd:d}={...V0,...t},f=typeof i=="function"?i:_=>!0,u=_=>Bte(_,l),p={},m=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(_=>(_.type==="transaction"&&_.spans&&_.spans.forEach(b=>{if(b.op==="http.client"){const g=U0.get(b.span_id);g&&(b.timestamp=g/1e3,U0.delete(b.span_id))}}),_)),o&&XW(_=>{if(_.response){const b=C8.get(_.response);b&&_.endTimestamp&&U0.set(b,_.endTimestamp)}}),$_(_=>{const b=Sq(_,f,u,p,{propagateTraceparent:m,onRequestSpanEnd:d});if(_.response&&_.fetchData.__span&&C8.set(_.response,_.fetchData.__span),b){const g=N8(_.fetchData.url),h=g?di(g).host:void 0;b.setAttributes({"http.url":g?ko(g):void 0,"server.address":h}),s&&O8(b,e),c?.(b,{headers:_.headers})}})),r&&t0(_=>{const b=Ute(_,f,u,p,m,d);b&&(s&&O8(b,e),c?.(b,{headers:I8(_.xhr.__sentry_xhr_v3__?.request_headers)}))})}const Fte=300;function O8(e,t){const{url:n}=Me(e).data;if(!n||typeof n!="string")return;let r=()=>void setTimeout(o);if(Zr(t)){const i=e.end.bind(e);e.end=s=>{const l=s??ut();let c=!1;const d=()=>{c||(c=!0,setTimeout(o),i(l),clearTimeout(f))};r=d;const f=setTimeout(d,Fte)}}const o=$i("resource",({entries:i})=>{i.forEach(s=>{Lte(s)&&s.name.endsWith(n)&&(e.setAttributes(y6(s)),r())})})}function Bte(e,t){const n=ni();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const i=r.origin===o;return t?or(r.toString(),t)||i&&or(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?or(e,t):r}}function Ute(e,t,n,r,o,i){const s=e.xhr,l=s?.[ro];if(!s||s.__sentry_own_request__||!l)return;const{url:c,method:d}=l,f=Mn()&&t(c);if(e.endTimestamp){const h=s.__sentry_xhr_span_id__;if(!h)return;const y=r[h];y&&(f&&l.status_code!==void 0&&(Ja(y,l.status_code),y.end(),i?.(y,{headers:I8(w6(s)),error:e.error})),delete r[h]);return}const u=N8(c),p=di(u||c),m=ko(eE(c)),_=_e(),b=!!wt(),g=f&&b?Tr({name:`${d} ${m}`,attributes:{url:ko(c),type:"xhr","http.method":d,"http.url":u?ko(u):void 0,"server.address":p?.host,[We]:"auto.http.browser",[tt]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new Dn;return f&&!b&&_?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=g.spanContext().spanId,r[s.__sentry_xhr_span_id__]=g,n(c)&&Vte(s,Mn()&&b?g:void 0,o),_&&_.emit("beforeOutgoingRequestSpan",g,e),g}function Vte(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:i}=e_({span:t,propagateTraceparent:n});r&&jte(e,r,o,i)}function jte(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const i=o?.baggage;(!i||!Dte(i))&&e.setRequestHeader("baggage",n)}}catch{}}function zte(){be.document?be.document.addEventListener("visibilitychange",()=>{const e=wt();if(!e)return;const t=Tt(e);if(be.document.hidden&&t){const n="cancelled",{op:r,status:o}=Me(t);de&&P.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:Ge,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):de&&P.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const qte=3600,R8="sentry_previous_trace",Hte="sentry.previous_trace";function Wte(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?Kte():void 0;e.on("spanStart",s=>{if(Tt(s)!==s)return;const l=Re().getPropagationContext();o=Gte(o,s,l),r&&Yte(o)});let i=!0;n&&e.on("beforeSampling",s=>{if(!o)return;const l=Re(),c=l.getPropagationContext();if(i&&c.parentSpanId){i=!1;return}l.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(j0(o.spanContext))},sampleRand:o.sampleRand}),s.parentSampled=j0(o.spanContext),s.parentSampleRate=o.sampleRate,s.spanAttributes={...s.spanAttributes,[h4]:o.sampleRate}})}function Gte(e,t,n){const r=Me(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Wc])}catch{return 0}}const i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return i;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=qte&&(de&&P.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[NU]:"previous_trace"}}),t.setAttribute(Hte,`${s.traceId}-${s.spanId}-${j0(s)?1:0}`)),i)}function Yte(e){try{be.sessionStorage.setItem(R8,JSON.stringify(e))}catch(t){de&&P.warn("Could not store previous trace in sessionStorage",t)}}function Kte(){try{const e=be.sessionStorage?.getItem(R8);return JSON.parse(e)}catch{return}}function j0(e){return e.traceFlags===1}const Xte="BrowserTracing",Jte=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function P8(){const e=be.navigator;return e?.userAgent?Jte.test(e.userAgent):!1}const Zte={...od,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...V0},M8=((e={})=>{"enableElementTiming"in e&&nr(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t={name:void 0,source:void 0},n=be.document,{enableInp:r,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:s,enableStandaloneClsSpans:l,enableStandaloneLcpSpans:c},beforeStartSpan:d,idleTimeout:f,finalTimeout:u,childSpanTimeout:p,markBackgroundSpan:m,traceFetch:_,traceXHR:b,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:h,enableHTTPTimings:y,ignoreResourceSpans:E,ignorePerformanceApiSpans:$,instrumentPageLoad:O,instrumentNavigation:N,detectRedirects:v,linkPreviousTrace:B,consistentTraceSampling:H,enableReportPageLoaded:U,onRequestSpanStart:C,onRequestSpanEnd:A}={...Zte,...e},R=P8();let I,V,j;function F(M,Y,W=!0){const K=Y.op==="pageload",te=Y.name,X=d?d(Y):Y,oe=X.attributes||{};if(te!==X.name&&(oe[Pt]="custom",X.attributes=oe),!W){const ae=oi();Tr({...X,startTime:ae}).end(ae);return}t.name=X.name,t.source=oe[Pt];const fe=u9(X,{idleTimeout:f,finalTimeout:u,childSpanTimeout:p,disableAutoFinish:K,beforeSpanEnd:ae=>{I?.();const ye=Zr(M);SK(ae,{recordClsOnPageloadSpan:!ye&&!l,recordLcpOnPageloadSpan:!ye&&!c,ignoreResourceSpans:E,ignorePerformanceApiSpans:$,spanStreamingEnabled:ye}),U8(M,void 0);const $e=Re(),Ie=$e.getPropagationContext();$e.setPropagationContext({...Ie,traceId:fe.spanContext().traceId,sampled:Jr(fe),dsc:Wn(ae)}),K&&(j=void 0)},trimIdleSpanEndTimestamp:!U});K&&U&&(j=fe),U8(M,fe);function J(){n&&["interactive","complete"].includes(n.readyState)&&M.emit("idleSpanEnableAutoFinish",fe)}K&&!U&&n&&(n.addEventListener("readystatechange",()=>{J()}),J())}return{name:Xte,setup(M){if(R){de&&P.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}H4();const Y=Zr(M);if(I=_K({recordClsStandaloneSpans:Y?void 0:l||!1,recordLcpStandaloneSpans:Y?void 0:c||!1,client:M}),Y?(VK(M),zK(M),r&&HK()):r&&DK(),i&&Te.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?gK():o&&hK(),s&&yK(),v&&n){const K=()=>{V=ut()};addEventListener("click",K,{capture:!0}),addEventListener("keydown",K,{capture:!0,passive:!0})}function W(){const K=Ul(M);K&&!Me(K).timestamp&&(de&&P.log(`[Tracing] Finishing current active span with op: ${Me(K).op}`),K.setAttribute(Wa,"cancelled"),K.end())}M.on("startNavigationSpan",(K,te)=>{if(_e()!==M)return;if(te?.isRedirect){de&&P.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),F(M,{op:"navigation.redirect",...K},!1);return}V=void 0,W(),vt().setPropagationContext({traceId:Er(),sampleRand:Math.random(),propagationSpanId:Mn()?void 0:Kr()});const X=Re();X.setPropagationContext({traceId:Er(),sampleRand:Math.random(),propagationSpanId:Mn()?void 0:Kr()}),X.setSDKProcessingMetadata({normalizedRequest:void 0}),F(M,{op:"navigation",...K,parentSpan:null,forceTransaction:!0})}),M.on("startPageLoadSpan",(K,te={})=>{if(_e()!==M)return;W();const X=te.sentryTrace||L8("sentry-trace")||F8("sentry-trace"),oe=te.baggage||L8("baggage")||F8("baggage"),fe=N4(X,oe),J=Re();J.setPropagationContext(fe),Mn()||(J.getPropagationContext().propagationSpanId=Kr()),J.setSDKProcessingMetadata({normalizedRequest:Ud()}),F(M,{op:"pageload",...K})}),M.on("endPageloadSpan",()=>{U&&j&&(j.setAttribute(Wa,"reportPageLoaded"),j.end())})},afterAllSetup(M){if(R)return;let Y=ni();if(B!=="off"&&Wte(M,{linkPreviousTrace:B,consistentTraceSampling:H}),be.location){if(O){const W=Ft();D8(M,{name:be.location.pathname,startTime:W?W/1e3:void 0,attributes:{[Pt]:"url",[We]:"auto.pageload.browser"}})}N&&ou(({to:W,from:K})=>{if(K===void 0&&Y?.indexOf(W)!==-1){Y=void 0;return}Y=void 0;const te=Qm(W),X=Ul(M),oe=X&&v&&ene(X,V);z0(M,{name:te?.pathname||be.location.pathname,attributes:{[Pt]:"url",[We]:"auto.navigation.browser"}},{url:W,isRedirect:oe})})}m&&zte(),s&&Qte(M,f,u,p,t),r&&UK(),x8(M,{traceFetch:_,traceXHR:b,trackFetchStreamPerformance:g,tracePropagationTargets:M.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:h,enableHTTPTimings:y,onRequestSpanStart:C,onRequestSpanEnd:A})}}});function D8(e,t,n){e.emit("startPageLoadSpan",t,n),Re().setTransactionName(t.name);const r=Ul(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function z0(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});const i=Re();return i.setTransactionName(t.name),r&&!o&&i.setSDKProcessingMetadata({normalizedRequest:{...Ud(),url:r}}),Ul(e)}function L8(e){return be.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function F8(e){return be.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function Qte(e,t,n,r,o){const i=be.document;let s;const l=()=>{const c="ui.action.click",d=Ul(e);if(d){const f=Me(d).op;if(["navigation","pageload"].includes(f)){de&&P.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(Wa,"interactionInterrupted"),s.end(),s=void 0),!o.name){de&&P.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=u9({name:o.name,op:c,attributes:{[Pt]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",l,{capture:!0})}const B8="_sentry_idleSpan";function Ul(e){return e[B8]}function U8(e,t){en(e,B8,t)}const V8=1.5;function ene(e,t){const n=Me(e),r=oi(),o=n.start_timestamp;return!(r-o>V8||t&&r-t<=V8)}function tne(e=_e()){e?.emit("endPageloadSpan")}function nne(e){const t=wt();if(t===e)return;const n=Re();e.end=new Proxy(e.end,{apply(r,o,i){return $r(n,t),Reflect.apply(r,o,i)}}),$r(n,e)}const rne=()=>({name:"SpanStreaming",beforeSetup(e){const t=e.getOptions();t.traceLifecycle||(de&&P.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),t.traceLifecycle="stream")},setup(e){const t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!Zr(e)){r.traceLifecycle="static",de&&P.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}const o=r.beforeSendSpan;if(o&&!ed(o)){r.traceLifecycle="static",de&&P.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}const i=new WW(e);e.on("afterSpanEnd",s=>{Jr(s)&&i.add(UV(s,e))}),e.on("afterSegmentSpanEnd",s=>{const l=s.spanContext().traceId;setTimeout(()=>{i.flush(l)},500)})}});function Bs(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function one(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Bs(n);return o=>r.then(i=>o(i.transaction(t,"readwrite").objectStore(t)))}function q0(e){return Bs(e.getAllKeys())}function ine(e,t,n){return e(r=>q0(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),Bs(r.transaction)}))}function sne(e,t,n){return e(r=>q0(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),Bs(r.transaction)}))}function ane(e){return e(t=>q0(t).then(n=>{const r=n[0];if(r!=null)return Bs(t.get(r)).then(o=>(t.delete(r),Bs(t.transaction).then(()=>o)))}))}function lne(e){let t;function n(){return t==null&&(t=one(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=nd(r);await ine(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=nd(r);await sne(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await ane(n());if(r)return fV(r)}catch{}}}}function cne(e){return t=>{const n=e({...t,createStore:lne});return be.addEventListener("online",async r=>{await n.flush()}),n}}function dne(e=r0){return cne(Kj(e))}const j8=1e6,une="window"in Te&&Te.window===Te&&typeof importScripts>"u",Do=String(0),Lu=une?"main":"worker",Fu=be.navigator;let z8="",q8="",H8="",H0=Fu?.userAgent||"",W8="";const fne=Fu?.language||Fu?.languages?.[0]||"";function pne(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const G8=Fu?.userAgentData;pne(G8)&&G8.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(z8=e.platform||"",H8=e.architecture||"",W8=e.model||"",q8=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];H0=`${t.brand} ${t.version}`}}).catch(e=>{});function mne(e){return!("thread_metadata"in e)}function _ne(e){return mne(e)?$ne(e):e}function hne(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&de&&P.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function gne(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const o=hne(r),i=_ne(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:ut()*1e3),l=typeof r.timestamp=="number"?r.timestamp*1e3:ut()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Zc,runtime:{name:"javascript",version:be.navigator.userAgent},os:{name:z8,version:q8,build_number:H0},device:{locale:fne,model:W8,manufacturer:H0,architecture:H8,is_emulator:!1},debug_meta:{images:K8(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||jt(),trace_id:o,active_thread_id:Do,relative_start_ns:"0",relative_end_ns:((l-s)*1e6).toFixed(0)}]}}function yne(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=Ene(e),o=t.getOptions(),i=t.getSdkMetadata?.()?.sdk;return{chunk_id:jt(),client_sdk:{name:i?.name??"sentry.javascript.browser",version:i?.version??"0.0.0"},profiler_id:n||jt(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:K8(e.resources)},profile:r}}function bne(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};const n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:`unknown validation error: ${t}`}}}function Ene(e){const t=[];for(let l=0;l<e.frames.length;l++){const c=e.frames[l];c&&(t[l]={function:c.name,abs_path:typeof c.resourceId=="number"?e.resources[c.resourceId]:void 0,lineno:c.line,colno:c.column})}const n=[];for(let l=0;l<e.stacks.length;l++){const c=e.stacks[l];if(!c)continue;const d=[];let f=c;for(;f;)d.push(f.frameId),f=f.parentId===void 0?void 0:e.stacks[f.parentId];n[l]=d}const r=Ft(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,i=o-(r||o),s=[];for(let l=0;l<e.samples.length;l++){const c=e.samples[l];if(!c)continue;const d=(o+(c.timestamp-i))/1e3;s[l]={stack_id:c.stackId??0,thread_id:Do,timestamp:d}}return{frames:t,stacks:n,samples:s,thread_metadata:{[Do]:{name:Lu}}}}function Y8(e){return Me(e).op==="pageload"}function $ne(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Do]:{name:Lu}}},o=e.samples[0];if(!o)return r;const i=o.timestamp,s=Ft(),l=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=l-(s||l);return e.samples.forEach((d,f)=>{if(d.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[f]={elapsed_since_start_ns:((d.timestamp+c-i)*j8).toFixed(0),stack_id:t,thread_id:Do};return}let u=e.stacks[d.stackId];const p=[];for(;u;){p.push(u.frameId);const _=e.frames[u.frameId];_&&r.frames[u.frameId]===void 0&&(r.frames[u.frameId]={function:_.name,abs_path:typeof _.resourceId=="number"?e.resources[_.resourceId]:void 0,lineno:_.line,colno:_.column}),u=u.parentId===void 0?void 0:e.stacks[u.parentId]}const m={elapsed_since_start_ns:((d.timestamp+c-i)*j8).toFixed(0),stack_id:n,thread_id:Do};r.stacks[n]=p,r.samples[f]=m,n++}),r}function Sne(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function vne(e){const t=[];return li(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++)n[o]?.contexts?.profile?.profile_id&&t.push(n[o])}),t}function K8(e){const r=_e()?.getOptions()?.stackParser;return r?KV(r,e):[]}function X8(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(de&&P.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(de&&P.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function Tne(e){return e.samples.length<2?(de&&P.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(de&&P.log("[Profiling] Discarding profile because it contains no frames"),!1)}let W0=!1;const J8=3e4;function wne(e){return typeof e=="function"}function Z8(){const e=be.Profiler;if(!wne(e)){de&&P.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(J8/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{de&&(P.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),P.log("[Profiling] Disabling profiling for current user session.")),W0=!0}}function Q8(e){if(W0)return de&&P.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return de&&P.log("[Profiling] Discarding profile because root span was not sampled."),!1;const n=_e()?.getOptions();if(!n)return de&&P.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return X8(r)?r?(r===!0?!0:Math.random()<r)?!0:(de&&P.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(de&&P.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(de&&P.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function kne(e){if(W0)return de&&P.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return de&&P.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return X8(t)?t?Math.random()<=t:(de&&P.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(de&&P.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function Bu(e){return typeof e.profilesSampleRate<"u"}function Ane(e,t,n,r){return Tne(n)?gne(e,t,n,r):null}const Ti=new Map;function Nne(){return Ti.size}function Ine(e){const t=Ti.get(e);return t&&Ti.delete(e),t}function Cne(e,t){if(Ti.set(e,t),Ti.size>30){const n=Ti.keys().next().value;n!==void 0&&Ti.delete(n)}}function xne(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace?.trace_id&&(e.contexts.trace={...e.contexts.trace,data:{...e.contexts.trace.data??{},"thread.id":Do,"thread.name":Lu}}),e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Do,"thread.name":Lu}})),e}function eS(e){let t;Y8(e)&&(t=ut()*1e3);const n=Z8();if(!n)return;de&&P.log(`[Profiling] started profiling span: ${Me(e).description}`);const r=jt();let o=null;Re().setContext("profile",{profile_id:r,start_timestamp:t});async function i(){if(e&&n){if(o){de&&P.log("[Profiling] profile for:",Me(e).description,"already exists, returning early");return}return n.stop().then(d=>{if(s&&(be.clearTimeout(s),s=void 0),de&&P.log(`[Profiling] stopped profiling of span: ${Me(e).description}`),!d){de&&P.log(`[Profiling] profiler returned null profile for: ${Me(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}o=d,Cne(r,d)}).catch(d=>{de&&P.log("[Profiling] error while stopping profiler:",d)})}}let s=be.setTimeout(()=>{de&&P.log("[Profiling] max profile duration elapsed, stopping profiling for:",Me(e).description),i()},J8);const l=e.end.bind(e);function c(){return e?(i().then(()=>{l()},()=>{l()}),e):l()}e.end=c}const One=6e4,Rne=3e5;class Pne{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(t){const n=t.getOptions().profileLifecycle,r=kne(t.getOptions());de&&P.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||de&&P.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=jt(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t)}start(){if(this._lifecycleMode==="trace"){de&&P.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){de&&P.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){de&&P.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){de&&P.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){de&&P.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&(de&&P.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling())}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,de&&P.log("[Profiling] Started profiling with profiler ID:",this._profilerId),ii().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){de&&P.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{de&&P.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&ii().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){de&&P.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==Tt(n))return;if(!n.isRecording()){de&&P.log("[Profiling] Discarding profile because root span was not sampled.");return}const r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);const o=this._activeRootSpanIds.size;o===1&&(de&&P.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${o}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;const r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);const o=this._activeRootSpanIds.size;de&&P.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(i=>{de&&P.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",i)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,ii().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),Rne);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=Z8();if(!t){de&&P.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{de&&P.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},One))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(de&&P.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=yne(n,this._client,this._profilerId),o=bne(r);if("reason"in o){de&&P.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),de&&P.log("[Profiling] Collected browser profile chunk.")}catch(n){de&&P.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=tl(n.getSdkMetadata?.()),o=n.getDsn(),i=n.getOptions().tunnel,s=Gn({event_id:jt(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!i&&o&&{dsn:Sr(o)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(s).then(null,l=>{de&&P.error("Error while sending profile chunk envelope:",l)})}}const Mne="BrowserProfiling",Dne=(()=>({name:Mne,setup(e){const t=e.getOptions(),n=new Pne;if(!Bu(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),Bu(t)&&!t.profilesSampleRate){de&&P.log("[Profiling] Profiling disabled, no profiling options found.");return}const r=wt(),o=r&&Tt(r);if(Bu(t)&&t.profileSessionSampleRate!==void 0&&de&&P.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),Bu(t))o&&Y8(o)&&Q8(o)&&eS(o),e.on("spanStart",i=>{i===Tt(i)&&Q8(i)&&eS(i)}),e.on("beforeEnvelope",i=>{if(!Nne())return;const s=vne(i);if(!s.length)return;const l=[];for(const c of s){const d=c?.contexts,f=d?.profile?.profile_id,u=d?.profile?.start_timestamp;if(typeof f!="string"){de&&P.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!f){de&&P.log("[Profiling] cannot find profile for a span without a profile context");continue}d?.profile&&delete d.profile;const p=Ine(f);if(!p){de&&P.log(`[Profiling] Could not retrieve profile for span: ${f}`);continue}const m=Ane(f,u,p,c);m&&l.push(m)}Sne(i,l)});else{const i=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),i==="manual")n.initialize(e);else if(i==="trace"){if(!Mn(t)){de&&P.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),o&&n.notifyRootSpanActive(o),be.setTimeout(()=>{const s=wt(),l=s&&Tt(s);l&&n.notifyRootSpanActive(l)},0)}}},processEvent(e){return xne(e)}})),Lne=()=>({name:"LaunchDarkly",processEvent(e,t,n){return os(e)}});function Fne(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{ui(e,t.value),fi(e,t.value)}}}const Bne=()=>({name:"OpenFeature",processEvent(e,t,n){return os(e)}});class Une{after(t,n){ui(n.flagKey,n.value),fi(n.flagKey,n.value)}error(t,n,r){ui(t.flagKey,t.defaultValue),fi(t.flagKey,t.defaultValue)}}const Vne=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Qt(t,"isEnabled",jne)},processEvent(t,n,r){return os(t)}});function jne(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(ui(n,r),fi(n,r)):de&&P.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const zne=(({growthbookClass:e})=>bq({growthbookClass:e})),qne=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{ui(n.gate.name,n.gate.value),fi(n.gate.name,n.gate.value)})},processEvent(t,n,r){return os(t)}});async function Hne(){const e=_e();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const r=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await s9(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const Wne="WebWorker",Gne=({worker:e})=>({name:Wne,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>tS(t))},addWorker:t=>tS(t)});function tS(e){e.addEventListener("message",t=>{if(Xne(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(de&&P.log("Sentry debugId web worker message received",t.data),be._sentryDebugIds={...t.data._sentryDebugIds,...be._sentryDebugIds}),t.data._sentryModuleMetadata&&(de&&P.log("Sentry module metadata web worker message received",t.data),be._sentryModuleMetadata={...t.data._sentryModuleMetadata,...be._sentryModuleMetadata}),t.data._sentryWasmImages){de&&P.log("Sentry WASM images web worker message received",t.data);const n=be._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(o=>An(o)&&typeof o.code_file=="string"&&!n.some(i=>i.code_file===o.code_file));be._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(de&&P.log("Sentry worker rejection message received",t.data._sentryWorkerError),Yne(t.data._sentryWorkerError))}})}function Yne(e){const t=_e();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,o=e.reason,i=Hr(o)?B6(o):jd(n,o,void 0,r,!0);i.level="error",e.filename&&(i.contexts={...i.contexts,worker:{filename:e.filename}}),rs(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),de&&P.log("Captured worker unhandled rejection",o)}function Kne({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:F6(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),de&&P.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),de&&P.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function Xne(e){if(!An(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,o="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!o||t&&!(An(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(An(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!An(e._sentryWorkerError)||o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(i=>An(i)&&typeof i.code_file=="string")))}const nS=["activate","mount"],rS=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Jne=/(?:^|[-_])(\w)/g,Zne=e=>e.replace(Jne,t=>t.toUpperCase()).replace(/[-_]/g,""),Qne="<Root>",G0="<Anonymous>",ere=(e,t)=>e.repeat(t),Vl=(e,t)=>{if(!e)return G0;if(e.$root===e)return Qne;if(!e.$options)return G0;const n=e.$options;let r=n.name||n._componentTag||n.__name;const o=n.__file;if(!r&&o){const i=o.match(/([^/\\]+)\.vue$/);i&&(r=i[1])}return(r?`<${Zne(r)}>`:G0)+(o&&t!==!1?` at ${o}`:"")},tre=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const o=t[t.length-1];if(o.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[o,n],n=0)}t.push(e),e=e.$parent}return`
|
|
528
528
|
|
|
529
529
|
found in
|
|
530
530
|
|
|
531
531
|
${t.map((o,i)=>`${(i===0?"---> ":ere(" ",5+i*2))+(Array.isArray(o)?`${Vl(o[0])}... (${o[1]} recursive calls)`:Vl(o))}`).join(`
|
|
532
532
|
`)}`}return`
|
|
533
533
|
|
|
534
|
-
(found in ${Vl(e)})`},oS=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,o,i)=>{const s=Vl(o,!1),l=o?tre(o):"",c={componentName:s,lifecycleHook:i,trace:l};if(t?.attachProps!==!1&&o&&(o.$options?.propsData?c.propsData=o.$options.propsData:o.$props&&(c.propsData=o.$props)),setTimeout(()=>{lt(r,{captureContext:{contexts:{vue:c}},mechanism:{handled:!!n,type:"auto.function.vue.error_handler"}})}),typeof n=="function"&&e.config.errorHandler)n.call(e,r,o,i);else throw r}},iS="ui.vue",nre={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function
|
|
534
|
+
(found in ${Vl(e)})`},oS=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,o,i)=>{const s=Vl(o,!1),l=o?tre(o):"",c={componentName:s,lifecycleHook:i,trace:l};if(t?.attachProps!==!1&&o&&(o.$options?.propsData?c.propsData=o.$options.propsData:o.$props&&(c.propsData=o.$props)),setTimeout(()=>{lt(r,{captureContext:{contexts:{vue:c}},mechanism:{handled:!!n,type:"auto.function.vue.error_handler"}})}),typeof n=="function"&&e.config.errorHandler)n.call(e,r,o,i);else throw r}},iS="ui.vue",nre={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Y0(e,t,n){e.$_sentryRootComponentSpanTimer&&clearTimeout(e.$_sentryRootComponentSpanTimer),e.$_sentryRootComponentSpanTimer=setTimeout(()=>{e.$root?.$_sentryRootComponentSpan&&(e.$root.$_sentryRootComponentSpan.end(t),e.$root.$_sentryRootComponentSpan=void 0)},n)}function rre(e,t){function n(o){return o.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(o=>n(t)===n(o))}const sS=(e={})=>{const t=(e.hooks||[]).concat(nS).filter((o,i,s)=>s.indexOf(o)===i),n={},r=e.timeout||2e3;for(const o of t){const i=nre[o];if(!i){rS&&P.warn(`Unknown hook: ${o}`);continue}for(const s of i)n[s]=function(){const l=this.$root===this;l&&(this.$_sentryRootComponentSpan=this.$_sentryRootComponentSpan||Tr({name:"Application Render",op:`${iS}.render`,attributes:{[We]:"auto.ui.vue"},onlyIfParent:!0}),Y0(this,ut(),r));const c=Vl(this,!1);if(!(l||(Array.isArray(e.trackComponents)?rre(e.trackComponents,c):e.trackComponents))){Y0(this,ut(),r);return}this.$_sentryComponentSpans=this.$_sentryComponentSpans||{};const f=s===i[0],u=this.$root?.$_sentryRootComponentSpan||wt();if(f){if(u){const p=this.$_sentryComponentSpans[o];p&&p.end(),this.$_sentryComponentSpans[o]=Tr({name:`Vue ${c}`,op:`${iS}.${o}`,attributes:{[We]:"auto.ui.vue"},onlyIfParent:!0})}}else{const p=this.$_sentryComponentSpans[o];if(!p)return;p.end(),Y0(this,ut(),r)}}}return n},ore={Vue:Te.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:nS,timeout:2e3,trackComponents:!1}},ire="Vue",aS=(e={})=>({name:ire,setup(t){const n={...ore,...t.getOptions(),...e};if(!n.Vue&&!n.app){nr(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}n.app?(Array.isArray(n.app)?n.app:[n.app]).forEach(o=>lS(o,n)):n.Vue&&lS(n.Vue,n)}}),lS=(e,t)=>{rS&&e._instance?.isMounted===!0&&nr(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&oS(e,t),Mn(t)&&e.mixin(sS(t.tracingOptions))};function sre(e={}){const t={defaultIntegrations:[...o0(),aS()],...e};return oE(t,"vue"),oJ(t)}function are(e,t,n){let r=!1;const o="mode"in e;e.onError(i=>lt(i,{mechanism:{handled:!1}})),e.beforeEach((i,s,...l)=>{const c=r?void 0:lre(),d={};for(const p of Object.keys(i.params))d[`url.path.parameter.${p}`]=i.params[p],d[`params.${p}`]=i.params[p];for(const p of Object.keys(i.query)){const m=i.query[p];m&&(d[`query.${p}`]=m)}let f=i.path,u="url";if(i.name&&t.routeLabel!=="path")f=i.name.toString(),u="custom";else if(i.matched.length>0){const p=i.matched.length-1;f=i.matched[p].path,u="route"}if(Re().setTransactionName(f),t.instrumentPageLoad&&c&&(Me(c).data[Pt]!=="custom"&&(c.updateName(f),c.setAttribute(Pt,u)),c.setAttributes({...d,[We]:"auto.pageload.vue"}),r=!0),t.instrumentNavigation&&!c&&n({name:f,op:"navigation",attributes:{...d,[We]:"auto.navigation.vue",[Pt]:u}}),o){const p=l[0];typeof p=="function"&&p()}})}function lre(){const e=wt(),t=e&&Tt(e);return t&&Me(t).op==="pageload"?t:void 0}function cre(e={}){if(!e.router)return M8(e);const t=M8({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:o=!0,routeLabel:i="name"}=e;return{...t,afterAllSetup(s){t.afterAllSetup(s),are(n,{routeLabel:i,instrumentNavigation:r,instrumentPageLoad:o},c=>{z0(s,c)})}}}const dre={attachPiniaState:!0,addBreadcrumbs:!0,actionTransformer:e=>e,stateTransformer:e=>e},cS=(e,t)=>{const n={};try{return Object.keys(e.state.value).forEach(r=>{n[r]=e.state.value[r]}),t?t(n):n}catch{return n}},ure=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:s6,MULTIPLEXED_TRANSPORT_EXTRA_KEY:dd,OpenFeatureIntegrationHook:Une,SDK_VERSION:Vr,SEMANTIC_ATTRIBUTE_SENTRY_OP:tt,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:We,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:Wc,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:Pt,Scope:ir,WINDOW:be,addBreadcrumb:sr,addEventProcessor:v9,addIntegration:Um,attachErrorHandler:oS,breadcrumbsIntegration:x6,browserApiErrorsIntegration:O6,browserProfilingIntegration:Dne,browserSessionIntegration:P6,browserTracingIntegration:cre,buildLaunchDarklyFlagUsedHandler:Fne,captureConsoleIntegration:kz,captureEvent:rs,captureException:lt,captureFeedback:OE,captureMessage:b9,captureSession:id,chromeStackLineParser:k6,close:pj,consoleLoggingIntegration:Fq,contextLinesIntegration:wJ,continueTrace:kV,createConsolaReporter:zq,createLangChainCallbackHandler:g_,createSentryPiniaPlugin:e=>{const t={...dre,...e};return({store:r,pinia:o})=>{t.attachPiniaState!==!1&&ii().addEventProcessor((i,s)=>{try{const c=`pinia_state_all_stores_${new Date().toTimeString().split(" ")[0]}.json`;s.attachments?.some(f=>f.filename.startsWith("pinia_state_all_stores_"))||(s.attachments=[...s.attachments||[],{filename:c,data:JSON.stringify(cS(o,t.stateTransformer))}])}catch{}return i}),r.$onAction(i=>{i.after(()=>{const s=t.actionTransformer(i.name);typeof s<"u"&&s!==null&&t.addBreadcrumbs!==!1&&sr({category:"pinia.action",message:`Store: ${r.$id} | Action: ${s}`,level:"info"});const l=cS(o,t.stateTransformer),c=Re(),d=c.getScopeData().contexts.state;if(typeof l<"u"&&l!==null){const p=_e()?.getOptions()?.normalizeDepth||3,_={...d||{},state:{type:"pinia",value:l}};tV(_,3+p),c.setContext("state",_)}else c.setContext("state",{...d||{},state:{type:"pinia",value:"undefined"}})})})}},createTracingMixins:sS,createTransport:F9,createUserFeedbackEnvelope:wX,cultureContextIntegration:M6,dedupeIntegration:yE,defaultRequestInstrumentationOptions:V0,defaultStackLineParsers:N6,defaultStackParser:I6,diagnoseSdkConnectivity:Hne,elementTimingIntegration:MK,endSession:Bm,eventFiltersIntegration:lE,eventFromException:o6,eventFromMessage:i6,exceptionFromError:Vd,extraErrorDataIntegration:Rz,featureFlagsIntegration:yq,feedbackAsyncIntegration:vY,feedbackIntegration:n6,feedbackSyncIntegration:n6,flush:fj,forceLoad:iJ,functionToStringIntegration:aE,geckoStackLineParser:A6,getActiveSpan:wt,getClient:_e,getCurrentScope:Re,getDefaultIntegrations:o0,getFeedback:xG,getGlobalScope:ii,getIsolationScope:vt,getReplay:gte,getRootSpan:Tt,getSpanDescendants:Qa,getSpanStatusFromHttpCode:y4,getTraceData:e_,globalHandlersIntegration:L6,graphqlClientIntegration:RJ,growthbookIntegration:zne,httpClientIntegration:fJ,httpContextIntegration:j6,inboundFiltersIntegration:cE,init:sre,instrumentAnthropicAiClient:iW,instrumentCreateReactAgent:DW,instrumentGoogleGenAIClient:gW,instrumentLangChainEmbeddings:rG,instrumentLangGraph:LW,instrumentOpenAiClient:UH,instrumentOutgoingRequests:x8,instrumentSupabaseClient:NE,isBotUserAgent:P8,isEnabled:S9,isInitialized:mj,lastEventId:$9,launchDarklyIntegration:Lne,lazyLoadIntegration:t6,linkedErrorsIntegration:z6,logger:Mq,makeBrowserOfflineTransport:dne,makeFetchTransport:r0,makeMultiplexedTransport:Zj,metrics:Vq,moduleMetadataIntegration:vz,onLoad:sJ,openFeatureIntegration:Bne,opera10StackLineParser:SX,opera11StackLineParser:TX,parameterize:rE,registerSpanErrorInstrumentation:H4,registerWebWorker:Kne,replayCanvasIntegration:Mte,replayIntegration:mte,reportPageLoaded:tne,reportingObserverIntegration:dJ,rewriteFramesIntegration:Vz,sendFeedback:v$,setActiveSpanInBrowser:nne,setContext:E9,setConversationId:uj,setCurrentClient:Z9,setExtra:aj,setExtras:sj,setHttpStatus:Ja,setMeasurement:t9,setTag:cj,setTags:lj,setUser:dj,showReportDialog:aJ,spanStreamingIntegration:rne,spanToBaggageHeader:ZU,spanToJSON:Me,spanToTraceHeader:P4,spotlightBrowserIntegration:eJ,startBrowserTracingNavigationSpan:z0,startBrowserTracingPageLoadSpan:D8,startInactiveSpan:Tr,startNewTrace:a9,startSession:Fm,startSpan:vr,startSpanManual:Qr,statsigIntegration:qne,supabaseIntegration:tq,suppressTracing:s9,thirdPartyErrorFilterIntegration:dq,uiProfiler:aX,unleashIntegration:Vne,updateSpanName:YU,viewHierarchyIntegration:PJ,vueIntegration:aS,webWorkerIntegration:Gne,winjsStackLineParser:EX,withActiveSpan:nl,withIsolationScope:_U,withScope:Hn,withStreamedSpan:QU,zodErrorsIntegration:cq},Symbol.toStringTag,{value:"Module"}));Jn.FormBuilder=ob,Jn.HoustonForm=rb,Jn.captureException=da,Jn.default=ob,Jn.initSentry=O1,Object.defineProperties(Jn,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|