diff --git a/backend/static/js/main.bundle.js b/backend/static/js/main.bundle.js index 481472e..babbac9 100644 --- a/backend/static/js/main.bundle.js +++ b/backend/static/js/main.bundle.js @@ -1,5 +1,5 @@ /*! For license information please see main.bundle.js.LICENSE.txt */ -(()=>{var e,t,n,r,o={5246:(e,t,n)=>{e.exports=n(9711)},9711:function(e,t,n){(function(){var e,r,o,i,a,s,g,l,A,C,c,I,u,d,h,f,p,m,v,y,b,w=[].indexOf;({floor:h,max:p,min:m}=Math),r=n(5731),u=n(4148),l=function(e,t){return t?2*e/t:1},g=function(e,t){var n,r,o,i,a;for([o,i]=[e.length,t.length],n=r=0,a=m(o,i);0<=a?ra;n=0<=a?++r:--r){if(e[n]t[n])return 1}return o-i},I=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s=function(e){var t,n;for(t=0,n=e.length;t=200&&(l=h(g/100)+1,t.forEach((function(e,n){if(e.length>l)return A.set(n,!0),t.delete(n)}))),this.isbjunk=function(e){return i.has(e)},this.isbpopular=function(e){return A.has(e)}}findLongestMatch(e,t,n,r){var o,i,a,s,g,l,A,C,c,I,u,d,h,f,p,m,v,y;for([o,i,a,C]=[this.a,this.b,this.b2j,this.isbjunk],[s,g,l]=[e,n,0],I={},A=h=v=e,y=t;v<=y?hy;A=v<=y?++h:--h){for(m={},u=[],a.has(o[A])&&(u=a.get(o[A])),p=0,f=u.length;p=r)break;(d=m[c]=(I[c-1]||0)+1)>l&&([s,g,l]=[A-d+1,c-d+1,d])}I=m}for(;s>e&&g>n&&!C(i[g-1])&&o[s-1]===i[g-1];)[s,g,l]=[s-1,g-1,l+1];for(;s+le&&g>n&&C(i[g-1])&&o[s-1]===i[g-1];)[s,g,l]=[s-1,g-1,l+1];for(;s+lA&&(n.push([C,o,m(i,o+e),a,m(s,a+e)]),r.push(n),n=[],[o,a]=[p(o,i-e),p(a,s-e)]),n.push([C,o,i,a,s]);return!n.length||1===n.length&&"equal"===n[0][0]||r.push(n),r}ratio(){var e,t,n,r;for(n=0,e=0,t=(r=this.getMatchingBlocks()).length;e0&&s++;return l(s,this.a.length+this.b.length)}realQuickRatio(){var e,t;return[e,t]=[this.a.length,this.b.length],l(m(e,t),e+t)}},f=function(e,t,n=3,o=.6){var i,s,l,A,C,c,I,u,d;if(!(n>0))throw new Error(`n must be > 0: (${n})`);if(!(0<=o&&o<=1))throw new Error(`cutoff must be in [0.0, 1.0]: (${o})`);for(C=[],(I=new a).setSeq2(e),i=0,s=t.length;i=o&&I.quickRatio()>=o&&I.ratio()>=o&&C.push([I.ratio(),d]);for(c=[],A=0,l=(C=r.nlargest(C,n,g)).length;As;o=a<=s?++i:--i)g.push(`${e} ${t[o]}`);return g}_plainReplace(e,t,n,r,o,i){var a,s,g,l,A,C,c,I,d,h;for(u(tU;E=V<=U?++k:--k)for(h=r[E],v.setSeq2(h),x=L=Z=t,G=n;Z<=G?LG;x=Z<=G?++L:--L)(g=e[x])!==h?(v.setSeq1(g),v.realQuickRatio()>I&&v.quickRatio()>I&&v.ratio()>I&&([I,u,d]=[v.ratio(),x,E])):null===b&&([b,w]=[x,E]);if(I=0},c=function(e,t){var n,r;return n=e+1,1===(r=t-e)?`${n}`:(r||n--,`${n},${r}`)},b=function(e,t,{fromfile:n,tofile:r,fromfiledate:o,tofiledate:i,n:s,lineterm:g}={}){var l,A,C,I,u,d,h,f,p,m,v,y,b,w,x,E,k,S,T,O,N,R,P,D,M,_,L,j,F;for(null==n&&(n=""),null==r&&(r=""),null==o&&(o=""),null==i&&(i=""),null==s&&(s=3),null==g&&(g="\n"),S=[],L=!1,m=0,y=(P=new a(null,e,t).getGroupedOpcodes()).length;m=0&&i.push(o.slice(2));return i},t._arrayCmp=g,t.SequenceMatcher=a,t.getCloseMatches=f,t._countLeading=A,t.Differ=e,t.IS_LINE_JUNK=i,t.IS_CHARACTER_JUNK=o,t._formatRangeUnified=c,t.unifiedDiff=b,t._formatRangeContext=C,t.contextDiff=d,t.ndiff=v,t.restore=y}).call(this)},8341:(e,t,n)=>{"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function o(){return"npm"}n.d(t,{Z:()=>r,e:()=>o})},6284:(e,t,n)=>{"use strict";n.d(t,{wD:()=>o});var r=n(8341);function o(){return!(0,r.Z)()&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}e=n.hmd(e)},4148:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;n1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;te.length)&&(n=e.length),e.substring(n-t.length,n)===t}var m="",v="",y="",b="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function x(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function E(e){return h(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function k(e,t,n){var r="",o="",i=0,a="",s=!1,g=E(e),l=g.split("\n"),A=E(t).split("\n"),C=0,c="";if("strictEqual"===n&&"object"===d(e)&&"object"===d(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===l.length&&1===A.length&&l[0]!==A[0]){var I=l[0].length+A[0].length;if(I<=10){if(!("object"===d(e)&&null!==e||"object"===d(t)&&null!==t||0===e&&0===t))return"".concat(w[n],"\n\n")+"".concat(l[0]," !== ").concat(A[0],"\n")}else if("strictEqualObject"!==n){if(I<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;l[0][C]===A[0][C];)C++;C>2&&(c="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",C),"^"),C=0)}}}for(var u=l[l.length-1],h=A[A.length-1];u===h&&(C++<2?a="\n ".concat(u).concat(a):r=u,l.pop(),A.pop(),0!==l.length&&0!==A.length);)u=l[l.length-1],h=A[A.length-1];var f=Math.max(l.length,A.length);if(0===f){var x=g.split("\n");if(x.length>30)for(x[26]="".concat(m,"...").concat(b);x.length>27;)x.pop();return"".concat(w.notIdentical,"\n\n").concat(x.join("\n"),"\n")}C>3&&(a="\n".concat(m,"...").concat(b).concat(a),s=!0),""!==r&&(a="\n ".concat(r).concat(a),r="");var k=0,S=w[n]+"\n".concat(v,"+ actual").concat(b," ").concat(y,"- expected").concat(b),T=" ".concat(m,"...").concat(b," Lines skipped");for(C=0;C1&&C>2&&(O>4?(o+="\n".concat(m,"...").concat(b),s=!0):O>3&&(o+="\n ".concat(A[C-2]),k++),o+="\n ".concat(A[C-1]),k++),i=C,r+="\n".concat(y,"-").concat(b," ").concat(A[C]),k++;else if(A.length1&&C>2&&(O>4?(o+="\n".concat(m,"...").concat(b),s=!0):O>3&&(o+="\n ".concat(l[C-2]),k++),o+="\n ".concat(l[C-1]),k++),i=C,o+="\n".concat(v,"+").concat(b," ").concat(l[C]),k++;else{var N=A[C],R=l[C],P=R!==N&&(!p(R,",")||R.slice(0,-1)!==N);P&&p(N,",")&&N.slice(0,-1)===R&&(P=!1,R+=","),P?(O>1&&C>2&&(O>4?(o+="\n".concat(m,"...").concat(b),s=!0):O>3&&(o+="\n ".concat(l[C-2]),k++),o+="\n ".concat(l[C-1]),k++),i=C,o+="\n".concat(v,"+").concat(b," ").concat(R),r+="\n".concat(y,"-").concat(b," ").concat(N),k+=2):(o+=r,r="",1!==O&&0!==C||(o+="\n ".concat(R),k++))}if(k>20&&C30)for(c[26]="".concat(m,"...").concat(b);c.length>27;)c.pop();t=1===c.length?C.call(this,"".concat(A," ").concat(c[0])):C.call(this,"".concat(A,"\n\n").concat(c.join("\n"),"\n"))}else{var I=E(i),u="",h=w[r];"notDeepEqual"===r||"notEqual"===r?(I="".concat(w[r],"\n\n").concat(I)).length>1024&&(I="".concat(I.slice(0,1021),"...")):(u="".concat(E(a)),I.length>512&&(I="".concat(I.slice(0,509),"...")),u.length>512&&(u="".concat(u.slice(0,509),"...")),"deepEqual"===r||"equal"===r?I="".concat(h,"\n\n").concat(I,"\n\nshould equal\n\n"):u=" ".concat(r," ").concat(u)),t=C.call(this,"".concat(I).concat(u))}return Error.stackTraceLimit=s,t.generatedMessage=!n,Object.defineProperty(l(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=i,t.expected=a,t.operator=r,Error.captureStackTrace&&Error.captureStackTrace(l(t),o),t.stack,t.name="AssertionError",g(t)}return i=p,(s=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return h(this,o(o({},t),{},{customInspect:!1,depth:0}))}}])&&a(i.prototype,s),A&&a(i,A),Object.defineProperty(i,"prototype",{writable:!1}),p}(A(Error),h.custom);e.exports=S},9597:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;n2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}C("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),C("ERR_INVALID_ARG_TYPE",(function(e,t,o){var i,a,s,l;if(void 0===g&&(g=n(4148)),g("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(!s||s<0?0:+s,a.length)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))l="The ".concat(e," ").concat(i," ").concat(c(t,"type"));else{var A=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(A," ").concat(i," ").concat(c(t,"type"))}return l+=". Received type ".concat(r(o))}),TypeError),C("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===l&&(l=n(537));var o=l.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(o)}),TypeError,RangeError),C("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var o;return o=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")}),TypeError),C("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var o="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,i-1).join(", "),o+=", and ".concat(t[i-1]," arguments")}return"".concat(o," must be specified")}),TypeError),e.exports.codes=A},2299:(e,t,n)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],g=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;g=!1}else for(;!(g=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);g=!0);}catch(e){l=!0,o=e}finally{try{if(!g&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function D(e){return Object.keys(e).filter(P).concat(A(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function M(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o{"use strict";var r={};n.r(r),n.d(r,{hasBrowserEnv:()=>Ab,hasStandardBrowserEnv:()=>cb,hasStandardBrowserWebWorkerEnv:()=>Ib,navigator:()=>Cb,origin:()=>ub});const o="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function i(e){return e&&e.Math==Math?e:void 0}const a="object"==typeof globalThis&&i(globalThis)||"object"==typeof window&&i(window)||"object"==typeof self&&i(self)||"object"==typeof n.g&&i(n.g)||function(){return this}()||{};function s(){return a}function g(e,t,n){const r=n||a,o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}const l=["debug","info","warn","error","log","assert","trace"],A={};function C(e){if(!("console"in a))return e();const t=a.console,n={},r=Object.keys(A);r.forEach((e=>{const r=A[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const c=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return o?l.forEach((n=>{t[n]=(...t)=>{e&&C((()=>{a.console[n](`Sentry Logger [${n}]:`,...t)}))}})):l.forEach((e=>{t[e]=()=>{}})),t}(),I=Object.prototype.toString;function u(e){switch(I.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return E(e,Error)}}function d(e,t){return I.call(e)===`[object ${t}]`}function h(e){return d(e,"ErrorEvent")}function f(e){return d(e,"DOMError")}function p(e){return d(e,"String")}function m(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function v(e){return null===e||m(e)||"object"!=typeof e&&"function"!=typeof e}function y(e){return d(e,"Object")}function b(e){return"undefined"!=typeof Event&&E(e,Event)}function w(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function x(e){return"number"==typeof e&&e!=e}function E(e,t){try{return e instanceof t}catch(e){return!1}}function k(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const S=s();function T(e,t={}){if(!e)return"";try{let n=e;const r=5,o=[];let i=0,a=0;const s=" > ",g=s.length;let l;const A=Array.isArray(t)?t:t.keyAttrs,C=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++1&&a+o.length*g+l.length>=C));)o.push(l),a+=l.length,n=n.parentNode;return o.reverse().join(s)}catch(e){return""}}function O(e,t){const n=e,r=[];let o,i,a,s,g;if(!n||!n.tagName)return"";if(S.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(l&&l.length)l.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&p(o))for(i=o.split(/\s+/),g=0;gM(e,t,n)))}function L(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);"function"==typeof o&&F(o,r),e[t]=o}function j(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){o&&c.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function F(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,j(e,"__sentry_original__",t)}catch(e){}}function B(e){return e.__sentry_original__}function z(e){if(u(e))return{message:e.message,name:e.name,stack:e.stack,...U(e)};if(b(e)){const t={type:e.type,target:V(e.target),currentTarget:V(e.currentTarget),...U(e)};return"undefined"!=typeof CustomEvent&&E(e,CustomEvent)&&(t.detail=e.detail),t}return e}function V(e){try{return t=e,"undefined"!=typeof Element&&E(t,Element)?T(e):Object.prototype.toString.call(e)}catch(e){return""}var t}function U(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function Z(e){return G(e,new Map)}function G(e,t){if(function(e){if(!y(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))void 0!==e[n]&&(r[n]=G(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(G(e,t))})),r}return e}function W(){const e=a,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function H(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Y(e){const{message:t,event_id:n}=e;if(t)return t;const r=H(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function K(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function Q(e,t){const n=H(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function X(e){if(e&&e.__sentry_captured__)return!0;try{j(e,"__sentry_captured__",!0)}catch(e){}return!1}function q(e){return Array.isArray(e)?e:[e]}const J="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;var ee;function te(e){return new re((t=>{t(e)}))}function ne(e){return new re(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(ee||(ee={}));class re{constructor(e){re.prototype.__init.call(this),re.prototype.__init2.call(this),re.prototype.__init3.call(this),re.prototype.__init4.call(this),this._state=ee.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new re(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new re(((t,n)=>{let r,o;return this.then((t=>{o=!1,r=t,e&&e()}),(t=>{o=!0,r=t,e&&e()})).then((()=>{o?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(ee.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(ee.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===ee.PENDING&&(w(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===ee.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===ee.RESOLVED&&e[1](this._value),this._state===ee.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function oe(){return g("globalEventProcessors",(()=>[]))}function ie(e){oe().push(e)}function ae(e,t,n,r=0){return new re(((o,i)=>{const a=e[r];if(null===t||"function"!=typeof a)o(t);else{const s=a({...t},n);J&&a.id&&null===s&&c.log(`Event processor "${a.id}" dropped event`),w(s)?s.then((t=>ae(e,t,n,r+1).then(o))).then(null,i):ae(e,s,n,r+1).then(o).then(null,i)}}))}function se(){return Date.now()/1e3}const ge=function(){const{performance:e}=a;if(!e||!e.now)return se;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();let le;const Ae=(()=>{const{performance:e}=a;if(!e||!e.now)return void(le="none");const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=ofunction(e){return Z({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Ie(n,e),n}function Ie(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ge(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:W()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ue(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),Ie(e,n)}const de=/\(error: (.*)\)/,he=/captureMessage|captureException/;function fe(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0)=>{const r=[],o=e.split("\n");for(let e=n;e1024)continue;const i=de.test(n)?n.replace(de,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){r.push(t);break}}if(r.length>=50)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop();t.reverse(),he.test(t[t.length-1].function||"")&&(t.pop(),he.test(t[t.length-1].function||"")&&t.pop());return t.slice(0,50).map((e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"})))}(r)}}const pe="";function me(e){try{return e&&"function"==typeof e&&e.name||pe}catch(e){return pe}}function ve(e,t=100,n=1/0){try{return be("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function ye(e,t=3,n=102400){const r=ve(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?ye(e,t-1,n):r;var o}function be(e,t,r=1/0,o=1/0,i=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e=o){C[e]="[MaxProperties ~]";break}const t=I[e];C[e]=be(e,t,l-1,o,i),c++}return s(t),C}const we="baggage",xe="sentry-",Ee=/^sentry-/;function ke(e){if(!e)return;return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce(((e,[t,n],r)=>{const i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,a=0===r?i:`${e},${i}`;return a.length>8192?(o&&c.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a}),"")}(Object.entries(e).reduce(((e,[t,n])=>(n&&(e[`${xe}${t}`]=n),e)),{}))}function Se(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(e[t]=n,e)),{})}const Te=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Oe(e){if(!e)return;const t=e.match(Te);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Ne(e,t){const n=Oe(e),r=function(e){if(!p(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce(((e,t)=>{const n=Se(t);for(const t of Object.keys(n))e[t]=n[t];return e}),{});else{if(!e)return;t=Se(e)}const n=Object.entries(t).reduce(((e,[t,n])=>(t.match(Ee)&&(e[t.slice(7)]=n),e)),{});return Object.keys(n).length>0?n:void 0}(t),{traceId:o,parentSpanId:i,parentSampled:a}=n||{};return n?{traceId:o||W(),parentSpanId:i||W().substring(16),spanId:W().substring(16),sampled:a,dsc:r||{}}:{traceId:o||W(),spanId:W().substring(16)}}function Re(e=W(),t=W().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Pe(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:a,tags:s,origin:g}=Le(e);return Z({data:r,op:o,parent_span_id:i,span_id:t,status:a,tags:s,trace_id:n,origin:g})}function De(e){const{traceId:t,spanId:n}=e.spanContext();return Re(t,n,je(e))}function Me(e){return"number"==typeof e?_e(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?_e(e.getTime()):ge()}function _e(e){return e>9999999999?e/1e3:e}function Le(e){return function(e){return"function"==typeof e.getSpanJSON}(e)?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function je(e){const{traceFlags:t}=e.spanContext();return Boolean(1&t)}function Fe(e,t,n,r,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:g=1e3}=e,l={...t,event_id:t.event_id||n.event_id||W(),timestamp:t.timestamp||se()},A=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:Ce);void 0===e.release&&void 0!==r&&(e.release=r);void 0===e.dist&&void 0!==o&&(e.dist=o);e.message&&(e.message=P(e.message,i));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=P(a.value,i));const s=e.request;s&&s.url&&(s.url=P(s.url,i))}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,A),void 0===t.type&&function(e,t){const n=a._sentryDebugIds;if(!n)return;let r;const o=Be.get(t);o?r=o:(r=new Map,Be.set(t,r));const i=Object.keys(n).reduce(((e,o)=>{let i;const a=r.get(o);a?i=a:(i=t(o),r.set(o,i));for(let t=i.length-1;t>=0;t--){const r=i[t];if(r.filename){e[r.filename]=n[o];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=i[e.filename])}))}))}catch(e){}}(l,e.stackParser);const C=function(e,t){if(!t)return e;const n=e?e.clone():new it;return n.update(t),n}(r,n.captureContext);n.mechanism&&Q(l,n.mechanism);const c=o&&o.getEventProcessors?o.getEventProcessors():[],I=function(){ot||(ot=new it);return ot}().getScopeData();if(i){nt(I,i.getScopeData())}if(C){nt(I,C.getScopeData())}const u=[...n.attachments||[],...I.attachments];u.length&&(n.attachments=u),tt(l,I);return ae([...c,...oe(),...I.eventProcessors],l,n).then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach((e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})}))}(e),"number"==typeof s&&s>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:ve(e.data,t,n)}})))},...e.user&&{user:ve(e.user,t,n)},...e.contexts&&{contexts:ve(e.contexts,t,n)},...e.extra&&{extra:ve(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ve(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>{const r=Le(e).data;return r&&(e.data=ve(r,t,n)),e})));return r}(e,s,g):e)))}const Be=new WeakMap;function ze(e){if(e)return function(e){return e instanceof it||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>Ve.includes(e)))}(e)?{captureContext:e}:e}const Ve=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Ue(e,t){return It().captureException(e,ze(t))}function Ze(e,t){return It().captureEvent(e,t)}function Ge(e,t){It().addBreadcrumb(e,t)}function We(...e){const t=It();if(2===e.length){const[n,r]=e;return n?t.withScope((()=>(t.getStackTop().scope=n,r(n)))):t.withScope(r)}return t.withScope(e[0])}function He(){return It().getClient()}function Ye(){return It().getScope()}function Ke(e){const t=He(),n=ut(),r=Ye(),{release:o,environment:i=Ce}=t&&t.getOptions()||{},{userAgent:s}=a.navigator||{},g=ce({release:o,environment:i,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),l=n.getSession();return l&&"ok"===l.status&&Ie(l,{status:"exited"}),Qe(),n.setSession(g),r.setSession(g),g}function Qe(){const e=ut(),t=Ye(),n=t.getSession()||e.getSession();n&&ue(n),Xe(),e.setSession(),t.setSession()}function Xe(){const e=ut(),t=Ye(),n=He(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function qe(e=!1){e?Qe():Xe()}function Je(e){return e.transaction}function $e(e,t,n){const r=t.getOptions(),{publicKey:o}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},a=Z({environment:r.environment||Ce,release:r.release,user_segment:i,public_key:o,trace_id:e});return t.emit&&t.emit("createDsc",a),a}function et(e){const t=He();if(!t)return{};const n=$e(Le(e).trace_id||"",t,Ye()),r=Je(e);if(!r)return n;const o=r&&r._frozenDynamicSamplingContext;if(o)return o;const{sampleRate:i,source:a}=r.metadata;null!=i&&(n.sample_rate=`${i}`);const s=Le(r);return a&&"url"!==a&&(n.transaction=s.description),n.sampled=String(je(r)),t.emit&&t.emit("createDsc",n),n}function tt(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,transactionName:s}=t,g=Z(n);g&&Object.keys(g).length&&(e.extra={...g,...e.extra});const l=Z(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const A=Z(o);A&&Object.keys(A).length&&(e.user={...A,...e.user});const C=Z(i);C&&Object.keys(C).length&&(e.contexts={...C,...e.contexts});a&&(e.level=a);s&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:Pe(t),...e.contexts};const n=Je(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:et(t),...e.sdkProcessingMetadata};const r=Le(n).description;r&&(e.tags={transaction:r,...e.tags})}}(e,r),function(e,t){e.fingerprint=e.fingerprint?q(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,i)}function nt(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,sdkProcessingMetadata:s,breadcrumbs:g,fingerprint:l,eventProcessors:A,attachments:C,propagationContext:c,transactionName:I,span:u}=t;rt(e,"extra",n),rt(e,"tags",r),rt(e,"user",o),rt(e,"contexts",i),rt(e,"sdkProcessingMetadata",s),a&&(e.level=a),I&&(e.transactionName=I),u&&(e.span=u),g.length&&(e.breadcrumbs=[...e.breadcrumbs,...g]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),A.length&&(e.eventProcessors=[...e.eventProcessors,...A]),C.length&&(e.attachments=[...e.attachments,...C]),e.propagationContext={...e.propagationContext,...c}}function rt(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}let ot;class it{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=at()}static clone(e){return e?e.clone():new it}clone(){const e=new it;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Ie(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e;if(t instanceof it){const e=t.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else if(y(t)){const t=e;this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=at(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:se(),...e},o=this._breadcrumbs;return o.push(r),this._breadcrumbs=o.length>n?o.slice(-n):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:r,_extra:o,_user:i,_level:a,_fingerprint:s,_eventProcessors:g,_propagationContext:l,_sdkProcessingMetadata:A,_transactionName:C,_span:c}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:o,user:i,level:a,fingerprint:s||[],eventProcessors:g,propagationContext:l,sdkProcessingMetadata:A,transactionName:C,span:c}}applyToEvent(e,t={},n=[]){tt(e,this.getScopeData());return ae([...n,...oe(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:W();if(!this._client)return c.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:W();if(!this._client)return c.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:W();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(c.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}function at(){return{traceId:W(),spanId:W().substring(16)}}const st="7.119.2",gt=parseFloat(st),lt=100;class At{constructor(e,t,n,r=gt){let o,i;this._version=r,t?o=t:(o=new it,o.setClient(e)),n?i=n:(i=new it,i.setClient(e)),this._stack=[{scope:o}],e&&this.bindClient(e),this._isolationScope=i}isOlderThan(e){return this._version(this.popScope(),e)),(e=>{throw this.popScope(),e})):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:W(),r=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:n}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:W(),o=new Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:W();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=lt}=r.getOptions&&r.getOptions()||{};if(i<=0)return;const a={timestamp:se(),...e},s=o?C((()=>o(a,t))):a;null!==s&&(r.emit&&r.emit("beforeAddBreadcrumb",s,t),n.addBreadcrumb(s,i))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=ct(this);try{e(this)}finally{ct(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return J&&c.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);if(J&&!n){this.getClient()?c.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):c.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&ue(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:o=Ce}=n&&n.getOptions()||{},{userAgent:i}=a.navigator||{},s=ce({release:r,environment:o,user:t.getUser(),...i&&{userAgent:i},...e}),g=t.getSession&&t.getSession();return g&&"ok"===g.status&&Ie(g,{status:"exited"}),this.endSession(),t.setSession(s),s}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){const n=Ct().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);J&&c.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function Ct(){return a.__SENTRY__=a.__SENTRY__||{extensions:{},hub:void 0},a}function ct(e){const t=Ct(),n=ft(t);return pt(t,e),n}function It(){const e=Ct();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return dt(e)}function ut(){return It().getIsolationScope()}function dt(e=Ct()){return ht(e)&&!ft(e).isOlderThan(gt)||pt(e,new At),ft(e)}function ht(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function ft(e){return g("hub",(()=>new At),e)}function pt(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}const mt=[];function vt(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach((e=>{e.isDefaultInstance=!0})),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?q(n(t)):t;const o=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.keys(t).map((e=>t[e]))}(r),i=function(e,t){for(let n=0;n"Debug"===e.name));if(-1!==i){const[e]=o.splice(i,1);o.push(e)}return o}function yt(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function bt(e,t,n){if(n[t.name])J&&c.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===mt.indexOf(t.name)&&(t.setupOnce(ie,It),mt.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),e.on&&"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if(e.addEventProcessor&&"function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}J&&c.log(`Integration installed: ${t.name}`)}}function wt(e,t){return Object.assign((function(...e){return t(...e)}),{id:e})}const xt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],Et=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],kt="InboundFilters",St=(e={})=>({name:kt,setupOnce(){},processEvent(t,n,r){const o=r.getOptions(),i=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:xt],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:Et],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,o);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return J&&c.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Y(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(e){}n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`));J&&0===t.length&&c.error(`Could not extract message for event ${Y(e)}`);return t}(e).some((e=>_(e,t)))}(e,t.ignoreErrors))return J&&c.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Y(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&_(n,t)}(e,t.ignoreTransactions))return J&&c.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Y(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=Tt(e);return!!n&&_(n,t)}(e,t.denyUrls))return J&&c.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Y(e)}.\nUrl: ${Tt(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=Tt(e);return!n||_(n,t)}(e,t.allowUrls))return J&&c.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Y(e)}.\nUrl: ${Tt(e)}`),!0;return!1}(t,i)?null:t}});wt(kt,St);function Tt(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return J&&c.error(`Cannot extract url for event ${Y(e)}`),null}}let Ot;const Nt="FunctionToString",Rt=new WeakMap,Pt=()=>({name:Nt,setupOnce(){Ot=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=B(this),n=Rt.has(He())&&void 0!==t?t:this;return Ot.apply(n,e)}}catch(e){}},setup(e){Rt.set(e,!0)}});wt(Nt,Pt);function Dt(e,t){!0===t.debug&&(J?c.enable():C((()=>{})));Ye().update(t.initialScope);const n=new e(t);!function(e){const t=It().getStackTop();t.client=e,t.scope.setClient(e)}(n),function(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}(n)}const Mt=s();function _t(){if(!("fetch"in Mt))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function Lt(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const jt=s();const Ft={},Bt={};function zt(e,t){Ft[e]=Ft[e]||[],Ft[e].push(t)}function Vt(e,t){Bt[e]||(t(),Bt[e]=!0)}function Ut(e,t){const n=e&&Ft[e];if(n)for(const r of n)try{r(t)}catch(t){o&&c.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${me(r)}\nError:`,t)}}const Zt=a;let Gt;function Wt(e){const t="history";zt(t,e),Vt(t,Ht)}function Ht(){if(!function(){const e=jt.chrome,t=e&&e.app&&e.app.runtime,n="history"in jt&&!!jt.history.pushState&&!!jt.history.replaceState;return!t&&n}())return;const e=Zt.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=Gt,t=String(n);Gt=t;Ut("history",{from:e,to:t})}return e.apply(this,t)}}Zt.onpopstate=function(...t){const n=Zt.location.href,r=Gt;Gt=n;if(Ut("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},L(Zt.history,"pushState",t),L(Zt.history,"replaceState",t)}const Yt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Kt(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:g}=e;return`${s}://${g}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${a}`}function Qt(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Xt(e){const t="string"==typeof e?function(e){const t=Yt.exec(e);if(!t)return void C((()=>{}));const[n,r,o="",i,a="",s]=t.slice(1);let g="",l=s;const A=l.split("/");if(A.length>1&&(g=A.slice(0,-1).join("/"),l=A.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Qt({host:i,pass:o,path:g,projectId:l,port:a,protocol:n,publicKey:r})}(e):Qt(e);if(t&&function(e){if(!o)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(c.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(c.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(c.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(c.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function qt(e,t=[]){return[e,t]}function Jt(e,t){const[n,r]=e;return[n,[...r,t]]}function $t(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function en(e,t){return(t||new TextEncoder).encode(e)}function tn(e,t){const[n,r]=e;let o=JSON.stringify(n);function i(e){"string"==typeof o?o="string"==typeof e?o+e:[en(o,t),e]:o.push("string"==typeof e?en(e,t):e)}for(const e of r){const[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(ve(n))}i(e)}}return"string"==typeof o?o:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(o)}function nn(e,t){const n="string"==typeof e.data?en(e.data,t):e.data;return[Z({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const rn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function on(e){return rn[e]}function an(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function sn(e,t,n,r){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Kt(r)},...o&&{trace:Z({...o})}}}class gn extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}function ln(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function An(e,t){return function(e){return Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&")}({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}function Cn(e,t={}){const n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${ln(e)}${e.projectId}/envelope/`}(e)}?${An(e,r)}`}function cn(e,t,n,r){const o=an(n),i=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const a=sn(e,o,r,t);delete e.sdkProcessingMetadata;return qt(a,[[{type:i},e]])}function In(e,t,n,r){const o={sent_at:(new Date).toISOString()};n&&n.sdk&&(o.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(o.dsn=Kt(t));const i=function(e){const t=function(e){let t="";for(const n of e){const e=Object.entries(n.tags),r=e.length>0?`|#${e.map((([e,t])=>`${e}:${t}`)).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return t}(e);return[{type:"statsd",length:t.length},t]}(e);return qt(o,[i])}const un="Not capturing exception because it's already been captured.";class dn{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Xt(e.dsn):J&&c.warn("No DSN provided, client will not send events."),this._dsn){const t=Cn(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(X(e))return void(J&&c.log(un));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{r=e}))),r}captureMessage(e,t,n,r){let o=n&&n.event_id;const i=m(e)?e:String(e),a=v(e)?this.eventFromMessage(i,t,n):this.eventFromException(e,n);return this._process(a.then((e=>this._captureEvent(e,n,r))).then((e=>{o=e}))),o}captureEvent(e,t,n){if(t&&t.originalException&&X(t.originalException))return void(J&&c.log(un));let r=t&&t.event_id;const o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,o||n).then((e=>{r=e}))),r}captureSession(e){"string"!=typeof e.release?J&&c.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Ie(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):te(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return J&&c.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const t=this._integrations[e.name];bt(this,e,this._integrations),t||yt(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=cn(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Jt(n,nn(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=function(e,t,n,r){const o=an(n);return qt({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Kt(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,o=`${e}:${t}`;J&&c.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}captureAggregateMetrics(e){J&&c.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const t=In(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach((e=>e(...t)))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&bt(e,t,n)})),n}(this,e),yt(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let n=!1,r=!1;const o=t.exception&&t.exception.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const i="ok"===e.status;(i&&0===e.errors||i&&n)&&(Ie(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new re((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r=ut()){const o=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i.length>0&&(t.integrations=i),this.emit("preprocessEvent",e,t),Fe(o,e,t,n,this,r).then((e=>{if(null===e)return e;const t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){const{traceId:r,spanId:o,parentSpanId:i,dsc:a}=t;e.contexts={trace:{trace_id:r,span_id:o,parent_span_id:i},...e.contexts};const s=a||$e(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:s,...e.sdkProcessingMetadata}}return e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(J){const t=e;"log"===t.logLevel?c.log(t.message):c.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r,i=fn(e),a=hn(e),s=e.type||"error",g=`before send for type \`${s}\``;if(a&&"number"==typeof o&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",e),ne(new gn(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const l="replay_event"===s?"replay":s,A=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,A).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,e),new gn("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const o=function(e,t,n){const{beforeSend:r,beforeSendTransaction:o}=e;if(hn(t)&&r)return r(t,n);if(fn(t)&&o){if(t.spans){const e=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(t,n)}return t}(r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(w(e))return e.then((e=>{if(!y(e)&&null!==e)throw new gn(n);return e}),(e=>{throw new gn(`${t} rejected with ${e}`)}));if(!y(e)&&null!==e)throw new gn(n);return e}(o,g)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",l,e),i){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new gn(`${g} returned \`null\`, will not send event.`,"log")}const o=n&&n.getSession();if(!i&&o&&this._updateSessionFromEvent(o,r),i){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const a=r.transaction_info;if(i&&a&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...a,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof gn)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new gn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,(e=>{J&&c.error("Error while sending event:",e)}));J&&c.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}}function hn(e){return void 0===e.type}function fn(e){return"transaction"===e.type}function pn(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:st}))),version:st}),e._metadata=o}var mn=n(8341);const vn="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function yn(e,t){const n=wn(e,t),r={type:t&&t.name,value:En(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function bn(e,t){return{exception:{values:[yn(e,t)]}}}function wn(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(xn.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const xn=/Minified React error #\d+;/i;function En(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function kn(e,t,n,r,o){let i;if(h(t)&&t.error){return bn(e,t.error)}if(f(t)||d(t,"DOMException")){const o=t;if("stack"in t)i=bn(e,t);else{const t=o.name||(f(o)?"DOMError":"DOMException"),a=o.message?`${t}: ${o.message}`:t;i=Sn(e,a,n,r),K(i,a)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}if(u(t))return bn(e,t);if(y(t)||b(t)){return i=function(e,t,n,r){const o=He(),i=o&&o.getOptions().normalizeDepth,a={exception:{values:[{type:b(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Tn(t,{isUnhandledRejection:r})}]},extra:{__serialized__:ye(t,i)}};if(n){const t=wn(e,n);t.length&&(a.exception.values[0].stacktrace={frames:t})}return a}(e,t,n,o),Q(i,{synthetic:!0}),i}return i=Sn(e,t,n,r),K(i,`${t}`,void 0),Q(i,{synthetic:!0}),i}function Sn(e,t,n,r){const o={};if(r&&n){const r=wn(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]})}if(m(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function Tn(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(z(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return P(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:P(r,t)}return""}(e),r=t?"promise rejection":"exception";if(h(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(b(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}const On=a;let Nn=0;function Rn(){return Nn>0}function Pn(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(B(e))return e}catch(t){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const o=r.map((e=>Pn(e,t)));return e.apply(this,o)}catch(e){throw Nn++,setTimeout((()=>{Nn--})),We((n=>{n.addEventProcessor((e=>(t.mechanism&&(K(e,void 0,void 0),Q(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),Ue(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}F(r,e),j(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}class Dn extends dn{constructor(e){pn(e,"browser",["browser"],On.SENTRY_SDK_SOURCE||(0,mn.e)()),super(e),e.sendClientReports&&On.document&&On.document.addEventListener("visibilitychange",(()=>{"hidden"===On.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const o=kn(e,t,n&&n.syntheticException||void 0,r);return Q(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),te(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const i=Sn(e,t,r&&r.syntheticException||void 0,o);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),te(i)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(vn&&c.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Kt(r)}},i=function(e){return[{type:"user_report"},e]}(e);return qt(o,[i])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(vn&&c.log("No outcomes to send"));if(!this._dsn)return void(vn&&c.log("No dsn provided, will not send outcomes"));vn&&c.log("Sending outcomes:",e);const t=(n=e,qt((r=this._options.tunnel&&Kt(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||se(),discarded_events:n}]]));var n,r,o;this._sendEnvelope(t)}}function Mn(){"console"in a&&l.forEach((function(e){e in a.console&&L(a.console,e,(function(t){return A[e]=t,function(...t){Ut("console",{args:t,level:e});const n=A[e];n&&n.apply(a.console,t)}}))}))}const _n=a;let Ln,jn,Fn;function Bn(e){zt("dom",e),Vt("dom",zn)}function zn(){if(!_n.document)return;const e=Ut.bind(null,"dom"),t=Vn(e,!0);_n.document.addEventListener("click",t,!1),_n.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=_n[t]&&_n[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(L(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=i[n]=i[n]||{refCount:0};if(!a.handler){const r=Vn(e);a.handler=r,t.call(this,n,r,o)}a.refCount++}catch(e){}return t.call(this,n,r,o)}})),L(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,o=n.__sentry_instrumentation_handlers__||{},i=o[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}function Vn(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;j(n,"_sentryCaptured",!0),r&&!r._sentryId&&j(r,"_sentryId",W());const o="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==jn)return!1;try{if(!e.target||e.target._sentryId!==Fn)return!1}catch(e){}return!0}(n)){e({event:n,name:o,global:t}),jn=n.type,Fn=r?r._sentryId:void 0}clearTimeout(Ln),Ln=_n.setTimeout((()=>{Fn=void 0,jn=void 0}),1e3)}}const Un=a,Zn="__sentry_xhr_v3__";function Gn(e){zt("xhr",e),Vt("xhr",Wn)}function Wn(){if(!Un.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;L(e,"open",(function(e){return function(...t){const n=Date.now(),r=p(t[0])?t[0].toUpperCase():void 0,o=function(e){if(p(e))return e;try{return e.toString()}catch(e){}return}(t[1]);if(!r||!o)return e.apply(this,t);this[Zn]={method:r,url:o,request_headers:{}},"POST"===r&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const e=this[Zn];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}Ut("xhr",{args:[r,o],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?L(this,"onreadystatechange",(function(e){return function(...t){return i(),e.apply(this,t)}})):this.addEventListener("readystatechange",i),L(this,"setRequestHeader",(function(e){return function(...t){const[n,r]=t,o=this[Zn];return o&&p(n)&&p(r)&&(o.request_headers[n.toLowerCase()]=r),e.apply(this,t)}})),e.apply(this,t)}})),L(e,"send",(function(e){return function(...t){const n=this[Zn];if(!n)return e.apply(this,t);void 0!==t[0]&&(n.body=t[0]);return Ut("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}function Hn(e){const t="fetch";zt(t,e),Vt(t,Yn)}function Yn(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!_t())return!1;if(Lt(Mt.fetch))return!0;let e=!1;const t=Mt.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Lt(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){o&&c.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&L(a,"fetch",(function(e){return function(...t){const{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Qn(t),method:Kn(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Qn(t),method:Kn(t,"method")?String(t.method).toUpperCase():"GET"}}(t),o={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Ut("fetch",{...o}),e.apply(a,t).then((e=>(Ut("fetch",{...o,endTimestamp:Date.now(),response:e}),e)),(e=>{throw Ut("fetch",{...o,endTimestamp:Date.now(),error:e}),e}))}}))}function Kn(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Qn(e){return"string"==typeof e?e:e?Kn(e,"url")?e.url:e.toString?e.toString():"":""}const Xn=["fatal","error","warning","log","info","debug"];function qn(e){return"warn"===e?"warning":Xn.includes(e)?e:"log"}function Jn(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}}const $n=1024,er="Breadcrumbs",tr=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:er,setupOnce(){},setup(e){t.console&&function(e){const t="console";zt(t,e),Vt(t,Mn)}(function(e){return function(t){if(He()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:qn(t.level),message:D(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${D(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Ge(n,{input:t.args,level:t.level})}}(e)),t.dom&&Bn(function(e,t){return function(n){if(He()!==e)return;let r,o,i="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>$n&&(vn&&c.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=$n),"string"==typeof i&&(i=[i]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=T(t,{keyAttrs:i,maxStringLength:a}),o=R(t)}catch(e){r=""}if(0===r.length)return;const s={category:`ui.${n.name}`,message:r};o&&(s.data={"ui.component_name":o}),Ge(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&Gn(function(e){return function(t){if(He()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[Zn];if(!n||!r||!o)return;const{method:i,url:a,status_code:s,body:g}=o;Ge({category:"xhr",data:{method:i,url:a,status_code:s},type:"http"},{xhr:t.xhr,input:g,startTimestamp:n,endTimestamp:r})}}(e)),t.fetch&&Hn(function(e){return function(t){if(He()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){Ge({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response;Ge({category:"fetch",data:{...t.fetchData,status_code:e&&e.status},type:"http"},{input:t.args,response:e,startTimestamp:n,endTimestamp:r})}}}(e)),t.history&&Wt(function(e){return function(t){if(He()!==e)return;let n=t.from,r=t.to;const o=Jn(On.location.href);let i=n?Jn(n):void 0;const a=Jn(r);i&&i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Ge({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on&&e.on("beforeSendEvent",function(e){return function(t){He()===e&&Ge({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Y(t)},{event:t})}}(e))}}};wt(er,tr);const nr="Dedupe",rr=()=>{let e;return{name:nr,setupOnce(){},processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!ir(e,t))return!1;if(!or(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=ar(t),r=ar(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!ir(e,t))return!1;if(!or(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return vn&&c.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};wt(nr,rr);function or(e,t){let n=sr(e),r=sr(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:ur,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){lr((t=>{const{stackParser:n,attachStacktrace:r}=pr();if(He()!==e||Rn())return;const{msg:o,url:i,line:a,column:s,error:g}=t,l=void 0===g&&p(o)?function(e,t,n,r){const o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=h(e)?e.message:e,a="Error";const s=i.match(o);s&&(a=s[1],i=s[2]);const g={exception:{values:[{type:a,value:i}]}};return hr(g,t,n,r)}(o,i,a,s):hr(kn(n,g||o,void 0,r,!1),i,a,s);l.level="error",Ze(l,{originalException:g,mechanism:{handled:!1,type:"onerror"}})}))}(e),fr("onerror")),t.onunhandledrejection&&(!function(e){cr((t=>{const{stackParser:n,attachStacktrace:r}=pr();if(He()!==e||Rn())return;const o=function(e){if(v(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch(e){}return e}(t),i=v(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:kn(n,o,void 0,r,!0);i.level="error",Ze(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(e),fr("onunhandledrejection"))}}};wt(ur,dr);function hr(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},g=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,A=isNaN(parseInt(n,10))?void 0:n,C=p(t)&&t.length>0?t:N();return 0===g.length&&g.push({colno:l,filename:C,function:"?",in_app:!0,lineno:A}),e}function fr(e){vn&&c.log(`Global Handler attached: ${e}`)}function pr(){const e=He();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const mr="HttpContext",vr=()=>({name:mr,setupOnce(){},preprocessEvent(e){if(!On.navigator&&!On.location&&!On.document)return;const t=e.request&&e.request.url||On.location&&On.location.href,{referrer:n}=On.document||{},{userAgent:r}=On.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:o};e.request=i}});wt(mr,vr);function yr(e,t,n=250,r,o,i,a){if(!(i.exception&&i.exception.values&&a&&E(a.originalException,Error)))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;var g,l;s&&(i.exception.values=(g=br(e,t,o,a.originalException,r,i.exception.values,s,0),l=n,g.map((e=>(e.value&&(e.value=P(e.value,l)),e)))))}function br(e,t,n,r,o,i,a,s){if(i.length>=n+1)return i;let g=[...i];if(E(r[o],Error)){wr(a,s);const i=e(t,r[o]),l=g.length;xr(i,o,l,s),g=br(e,t,n,r[o],o,[i,...g],i,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if(E(r,Error)){wr(a,s);const l=e(t,r),A=g.length;xr(l,`errors[${i}]`,A,s),g=br(e,t,n,r,o,[l,...g],l,A)}})),g}function wr(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function xr(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const Er="LinkedErrors",kr=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:Er,setupOnce(){},preprocessEvent(e,r,o){const i=o.getOptions();yr(yn,i.stackParser,i.maxValueLength,n,t,e,r)}}},Sr=(wt(Er,kr),["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"]),Tr="TryCatch",Or=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Tr,setupOnce(){t.setTimeout&&L(On,"setTimeout",Nr),t.setInterval&&L(On,"setInterval",Nr),t.requestAnimationFrame&&L(On,"requestAnimationFrame",Rr),t.XMLHttpRequest&&"XMLHttpRequest"in On&&L(XMLHttpRequest.prototype,"send",Pr);const e=t.eventTarget;if(e){(Array.isArray(e)?e:Sr).forEach(Dr)}}}};wt(Tr,Or);function Nr(e){return function(...t){const n=t[0];return t[0]=Pn(n,{mechanism:{data:{function:me(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Rr(e){return function(t){return e.apply(this,[Pn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:me(e)},handled:!1,type:"instrument"}})])}}function Pr(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&L(n,e,(function(t){const n={mechanism:{data:{function:e,handler:me(t)},handled:!1,type:"instrument"}},r=B(t);return r&&(n.mechanism.data.handler=me(r)),Pn(t,n)}))})),e.apply(this,t)}}function Dr(e){const t=On,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(L(n,"addEventListener",(function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=Pn(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:me(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,Pn(r,{mechanism:{data:{function:"addEventListener",handler:me(r),target:e},handled:!1,type:"instrument"}}),o])}})),L(n,"removeEventListener",(function(e){return function(t,n,r){const o=n;try{const n=o&&o.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(e){}return e.call(this,t,o,r)}})))}const Mr="?";function _r(e,t,n,r){const o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Lr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,jr=/\((\S*)(?::(\d+))(?::(\d+))\)/,Fr=[30,e=>{const t=Lr.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=jr.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=Wr(t[1]||Mr,t[2]);return _r(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],Br=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,zr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Vr=[50,e=>{const t=Br.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=zr.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||Mr;return[n,e]=Wr(n,e),_r(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Ur=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Zr=[40,e=>{const t=Ur.exec(e);return t?_r(t[2],t[1]||Mr,+t[3],t[4]?+t[4]:void 0):void 0}],Gr=fe(...[Fr,Vr,Zr]),Wr=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Mr,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function Hr(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.lengthn(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(e){return new re(((n,r)=>{let o=t.length;if(!o)return n(!0);const i=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{te(e).then((()=>{--o||(clearTimeout(i),n(!0))}),r)}))}))}}}function Yr(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function Kr(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},i=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(i)for(const e of i.trim().split(",")){const[t,n,,,i]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(o[e]=r+s);else o.all=r+s}else a?o.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(o.all=r+6e4);return o}function Qr(e,t,n=Hr(e.bufferSize||30)){let r={};function o(o){const i=[];if($t(o,((t,n)=>{const o=on(n);if(Yr(r,o)){const r=Xr(t,n);e.recordDroppedEvent("ratelimit_backoff",o,r)}else i.push(t)})),0===i.length)return te();const a=qt(o[0],i),s=t=>{$t(a,((n,r)=>{const o=Xr(n,r);e.recordDroppedEvent(t,on(r),o)}))};return n.add((()=>t({body:tn(a,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&J&&c.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Kr(r,e),e)),(e=>{throw s("network_error"),e})))).then((e=>e),(e=>{if(e instanceof gn)return J&&c.error("Skipped sending event because buffer is full."),s("queue_overflow"),te();throw e}))}return o.__sentry__baseTransport__=!0,{send:o,flush:e=>n.drain(e)}}function Xr(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}let qr;function Jr(e,t=function(){if(qr)return qr;if(Lt(On.fetch))return qr=On.fetch.bind(On);const e=On.document;let t=On.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){vn&&c.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return qr=t.bind(On)}()){let n=0,r=0;return Qr(e,(function(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then((e=>(n-=i,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return qr=void 0,n-=i,r--,ne(e)}}))}function $r(e){return Qr(e,(function(t){return new re(((n,r)=>{const o=new XMLHttpRequest;o.onerror=r,o.onreadystatechange=()=>{4===o.readyState&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&o.setRequestHeader(t,e.headers[t]);o.send(t.body)}))}))}const eo=[St(),Pt(),Or(),tr(),dr(),kr(),rr(),vr()];function to(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=[...eo]),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),On.SENTRY_RELEASE&&On.SENTRY_RELEASE.id&&(e.release=On.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:(n=e.stackParser||Gr,Array.isArray(n)?fe(...n):n),integrations:vt(e),transport:e.transport||(_t()?Jr:$r)};var n;Dt(Dn,t),e.autoSessionTracking&&function(){if(void 0===On.document)return void(vn&&c.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));Ke({ignoreDuration:!0}),qe(),Wt((({from:e,to:t})=>{void 0!==e&&e!==t&&(Ke({ignoreDuration:!0}),qe())}))}()}let no;function ro(e){return no?no.get(e):void 0}function oo(e){const t=ro(e);if(!t)return;const n={};for(const[,[e,r]]of t)n[e]||(n[e]=[]),n[e].push(Z(r));return n}const io="sentry.source",ao="sentry.sample_rate",so="sentry.op",go="sentry.origin";var lo;function Ao(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}!function(e){e.Ok="ok";e.DeadlineExceeded="deadline_exceeded";e.Unauthenticated="unauthenticated";e.PermissionDenied="permission_denied";e.NotFound="not_found";e.ResourceExhausted="resource_exhausted";e.InvalidArgument="invalid_argument";e.Unimplemented="unimplemented";e.Unavailable="unavailable";e.InternalError="internal_error";e.UnknownError="unknown_error";e.Cancelled="cancelled";e.AlreadyExists="already_exists";e.FailedPrecondition="failed_precondition";e.Aborted="aborted";e.OutOfRange="out_of_range";e.DataLoss="data_loss"}(lo||(lo={}));function Co(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=Ao(t);"unknown_error"!==n&&e.setStatus(n)}class co{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class Io{constructor(e={}){this._traceId=e.traceId||W(),this._spanId=e.spanId||W().substring(16),this._startTime=e.startTimestamp||ge(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[go]:e.origin||"manual",[so]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),void 0!==e.exclusiveTime&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[so]}set op(e){this.setAttribute(so,e)}get origin(){return this._attributes[go]}set origin(e){this.setAttribute(go,e)}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}startChild(e){const t=new Io({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t);const n=Je(this);if(t.transaction=n,J&&n){const r=`[Tracing] Starting '${e&&e.op||"< unknown op >"}' span on transaction '${Le(t).description||"< unknown name >"}' (${n.spanContext().spanId}).`;c.log(r),this._logMessage=r}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setAttribute(e,t){void 0===t?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach((t=>this.setAttribute(t,e[t])))}setStatus(e){return this._status=e,this}setHttpStatus(e){return Co(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return"ok"===this._status}finish(e){return this.end(e)}end(e){if(this._endTime)return;const t=Je(this);if(J&&t&&t.spanContext().spanId!==this._spanId){const e=this._logMessage;e&&c.log(e.replace("Starting","Finishing"))}this._endTime=Me(e)}toTraceparent(){return De(this)}toContext(){return Z({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return Pe(this)}getSpanJSON(){return Z({data:this._getData(),description:this._name,op:this._attributes[so],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[go],_metrics_summary:oo(this),profile_id:this._attributes.profile_id,exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:e,_attributes:t}=this,n=Object.keys(e).length>0,r=Object.keys(t).length>0;if(n||r)return n&&r?{...e,...t}:n?e:t}}function uo(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=He(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function ho(e){if(!uo())return;const t=mo(e),n=It(),r=e.scope?e.scope.getSpan():fo();if(e.onlyIfParent&&!r)return;const o=(e.scope||Ye()).clone();return po(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:o})}function fo(){return Ye().getSpan()}function po(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:o}){if(!uo())return;const i=ut();let a;if(t&&!r)a=t.startChild(n);else if(t){const r=et(t),{traceId:o,spanId:i}=t.spanContext(),s=je(t);a=e.startTransaction({traceId:o,parentSpanId:i,parentSampled:s,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}else{const{traceId:t,dsc:r,parentSpanId:s,sampled:g}={...i.getPropagationContext(),...o.getPropagationContext()};a=e.startTransaction({traceId:t,parentSpanId:s,parentSampled:g,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}return o.setSpan(a),function(e,t,n){e&&(j(e,yo,n),j(e,vo,t))}(a,o,i),a}function mo(e){if(e.startTime){const t={...e};return t.startTimestamp=Me(e.startTime),delete t.startTime,t}return e}const vo="_sentryScope",yo="_sentryIsolationScope";class bo extends Io{constructor(e,t){super(e),this._contexts={},this._hub=t||It(),this._name=e.name||"",this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;const n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[io]&&{source:this._attributes[io]},...this._attributes[ao]&&{sampleRate:this._attributes[ao]}}}set metadata(e){this._metadata=e}setName(e,t="custom"){this._name=e,this.setAttribute(io,t)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new co(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){const t=Me(e),n=this._finishTransaction(t);if(n)return this._hub.captureEvent(n)}toContext(){return Z({...super.toContext(),name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return et(this)}setHub(e){this._hub=e}getProfileId(){if(void 0!==this._contexts&&void 0!==this._contexts.profile)return this._contexts.profile.profile_id}_finishTransaction(e){if(void 0!==this._endTime)return;this._name||(J&&c.warn("Transaction has no name, falling back to ``."),this._name=""),super.end(e);const t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this._sampled)return J&&c.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(t&&t.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((e=>e!==this&&Le(e).timestamp)):[];if(this._trimEnd&&n.length>0){const e=n.map((e=>Le(e).timestamp)).filter(Boolean);this._endTime=e.reduce(((e,t)=>e>t?e:t))}const{scope:r,isolationScope:o}={scope:(i=this)[vo],isolationScope:i[yo]};var i;const{metadata:a}=this,{source:s}=a,g={contexts:{...this._contexts,trace:Pe(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...a,capturedSpanScope:r,capturedSpanIsolationScope:o,...Z({dynamicSamplingContext:et(this)})},_metrics_summary:oo(this),...s&&{transaction_info:{source:s}}};return Object.keys(this._measurements).length>0&&(J&&c.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),g.measurements=this._measurements),J&&c.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),g}}const wo={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},xo=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Eo extends co{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){if(e.spanContext().spanId!==this.transactionSpanId){const t=e.end;e.end=(...n)=>(this._popActivity(e.spanContext().spanId),t.apply(e,n)),void 0===Le(e).timestamp&&this._pushActivity(e.spanContext().spanId)}super.add(e)}}class ko extends bo{constructor(e,t,n=wo.idleTimeout,r=wo.finalTimeout,o=wo.heartbeatInterval,i=!1,a=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=o,this._onScope=i,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=xo[4],this._autoFinishAllowed=!a,i&&(J&&c.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),t.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=xo[3],this.end())}),this._finalTimeout)}end(e){const t=Me(e);if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this._finishReason),this.spanRecorder){J&&c.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);for(const e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter((e=>{if(e.spanContext().spanId===this.spanContext().spanId)return!0;Le(e).timestamp||(e.setStatus("cancelled"),e.end(t),J&&c.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));const{start_timestamp:n,timestamp:r}=Le(e),o=n&&n{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new Eo(t,n,this.spanContext().spanId,e),J&&c.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=xo[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||(J&&c.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=xo[1],this.end(e))}),this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),J&&c.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,J&&c.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(J&&c.log(`[Tracing] popActivity ${e}`),delete this.activities[e],J&&c.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const e=ge();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=xo[5],this.end(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(J&&c.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=xo[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){J&&c.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function So(e){return(e||It()).getScope().getTransaction()}let To=!1;function Oo(){const e=So();if(e){const t="internal_error";J&&c.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}function No(e,t,n){if(!uo(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setAttribute(ao,Number(e.sampled)),e;let r;return"function"==typeof t.tracesSampler?(r=t.tracesSampler(n),e.setAttribute(ao,Number(r))):void 0!==n.parentSampled?r=n.parentSampled:void 0!==t.tracesSampleRate?(r=t.tracesSampleRate,e.setAttribute(ao,Number(r))):(r=1,e.setAttribute(ao,r)),Ro(r)?r?(e.sampled=Math.random()1)||(J&&c.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1)}function Po(){const e=this.getScope().getSpan();return e?{"sentry-trace":De(e)}:{}}function Do(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},o=r.instrumenter||"sentry",i=e.instrumenter||"sentry";o!==i&&(J&&c.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${o}\` instrumenter.\nThe transaction will not be sampled. Please use the ${o} instrumentation to start transactions.`),e.sampled=!1);let a=new bo(e,this);return a=No(a,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),a.isRecording()&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function Mo(e,t,n,r,o,i,a,s=!1){const g=e.getClient(),l=g&&g.getOptions()||{};let A=new ko(t,e,n,r,a,o,s);return A=No(A,l,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...i}),A.isRecording()&&A.initSpanRecorder(l._experiments&&l._experiments.maxSpans),g&&g.emit&&g.emit("startTransaction",A),A}function _o(){const e=Ct();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=Do),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Po),To||(To=!0,lr(Oo),cr(Oo)))}Oo.tag="sentry_tracingErrorCallback";const Lo="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,jo=a;const Fo=(e,t,n)=>{let r,o;return i=>{t.value>=0&&(i||n)&&(o=t.value-(r||0),(o||void 0===r)&&(r=t.value,t.delta=o,e(t)))}},Bo=()=>jo.__WEB_VITALS_POLYFILL__?jo.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const e=jo.performance.timing,t=jo.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(const t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n})()):jo.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],zo=()=>{const e=Bo();return e&&e.activationStart||0},Vo=(e,t)=>{const n=Bo();let r="navigate";return n&&(r=jo.document&&jo.document.prerendering||zo()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Uo=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{t(e.getEntries())}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},Zo=(e,t)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==jo.document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};jo.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))};let Go=-1;const Wo=()=>(Go<0&&(jo.document&&jo.document.visibilityState&&(Go="hidden"!==jo.document.visibilityState||jo.document.prerendering?1/0:0),Zo((({timeStamp:e})=>{Go=e}),!0)),{get firstHiddenTime(){return Go}});let Ho=0,Yo=1/0,Ko=0;const Qo=e=>{e.forEach((e=>{e.interactionId&&(Yo=Math.min(Yo,e.interactionId),Ko=Math.max(Ko,e.interactionId),Ho=Ko?(Ko-Yo)/7+1:0)}))};let Xo;const qo=()=>{"interactionCount"in performance||Xo||(Xo=Uo("event",Qo,{type:"event",buffered:!0,durationThreshold:0}))},Jo=()=>Xo?Ho:performance.interactionCount||0,$o=[],ei={},ti=e=>{const t=$o[$o.length-1],n=ei[e.interactionId];if(n||$o.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};ei[t.id]=t,$o.push(t)}$o.sort(((e,t)=>t.latency-e.latency)),$o.splice(10).forEach((e=>{delete ei[e.id]}))}},ni=(e,t)=>{t=t||{},qo();const n=Vo("INP");let r;const o=e=>{e.forEach((e=>{if(e.interactionId&&ti(e),"first-input"===e.entryType){!$o.some((t=>t.entries.some((t=>e.duration===t.duration&&e.startTime===t.startTime))))&&ti(e)}}));const t=(()=>{const e=Math.min($o.length-1,Math.floor(Jo()/50));return $o[e]})();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())},i=Uo("event",o,{durationThreshold:t.durationThreshold||40});r=Fo(e,n,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Zo((()=>{o(i.takeRecords()),n.value<0&&Jo()>0&&(n.value=0,n.entries=[]),r(!0)})))},ri={},oi=e=>{jo.document&&(jo.document.prerendering?addEventListener("prerenderingchange",(()=>oi(e)),!0):"complete"!==jo.document.readyState?addEventListener("load",(()=>oi(e)),!0):setTimeout(e,0))},ii={},ai={};let si,gi,li,Ai,Ci;function ci(e,t=!1){return vi("lcp",e,fi,li,t)}function Ii(e,t){return yi(e,t),ai[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);Uo(e,(t=>{ui(e,{entries:t})}),t)}(e),ai[e]=!0),bi(e,t)}function ui(e,t){const n=ii[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){Lo&&c.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${me(r)}\nError:`,t)}}function di(){return((e,t={})=>{const n=Vo("CLS",0);let r,o=0,i=[];const a=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=i[0],a=i[i.length-1];o&&0!==i.length&&e.startTime-a.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e]),o>n.value&&(n.value=o,n.entries=i,r&&r())}}))},s=Uo("layout-shift",a);if(s){r=Fo(e,n,t.reportAllChanges);const o=()=>{a(s.takeRecords()),r(!0)};return Zo(o),o}})((e=>{ui("cls",{metric:e}),si=e}),{reportAllChanges:!0})}function hi(){return(e=>{const t=Wo(),n=Vo("FID");let r;const o=e=>{e.startTime{e.forEach(o)},a=Uo("first-input",i);r=Fo(e,n),a&&Zo((()=>{i(a.takeRecords()),a.disconnect()}),!0)})((e=>{ui("fid",{metric:e}),gi=e}))}function fi(){return(e=>{const t=Wo(),n=Vo("LCP");let r;const o=e=>{const o=e[e.length-1];if(o){const e=Math.max(o.startTime-zo(),0);e{ri[n.id]||(o(i.takeRecords()),i.disconnect(),ri[n.id]=!0,r(!0))};return["keydown","click"].forEach((e=>{jo.document&&addEventListener(e,t,{once:!0,capture:!0})})),Zo(t,!0),t}})((e=>{ui("lcp",{metric:e}),li=e}))}function pi(){return((e,t)=>{t=t||{};const n=Vo("TTFB"),r=Fo(e,n,t.reportAllChanges);oi((()=>{const e=Bo();if(e){if(n.value=Math.max(e.responseStart-zo(),0),n.value<0||n.value>performance.now())return;n.entries=[e],r(!0)}}))})((e=>{ui("ttfb",{metric:e}),Ai=e}))}function mi(){return ni((e=>{ui("inp",{metric:e}),Ci=e}))}function vi(e,t,n,r,o=!1){let i;return yi(e,t),ai[e]||(i=n(),ai[e]=!0),r&&t({metric:r}),bi(e,t,o?i:void 0)}function yi(e,t){ii[e]=ii[e]||[],ii[e].push(t)}function bi(e,t,n){return()=>{n&&n();const r=ii[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}function wi(e){return[{type:"span"},e]}function xi(e){return"number"==typeof e&&isFinite(e)}function Ei(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function ki(e){return e/1e3}function Si(){return jo&&jo.addEventListener&&jo.performance}let Ti,Oi,Ni=0,Ri={};function Pi(){const e=Si();if(e&&Ae){e.mark&&jo.performance.mark("sentry-tracing-init");const t=vi("fid",(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=ki(Ae),r=ki(t.startTime);Lo&&c.log("[Measurements] Adding FID"),Ri.fid={value:e.value,unit:"millisecond"},Ri["mark.fid"]={value:n+r,unit:"second"}}),hi,gi),n=function(e,t=!1){return vi("cls",e,di,si,t)}((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Lo&&c.log("[Measurements] Adding CLS"),Ri.cls={value:e.value,unit:""},Oi=t)}),!0),r=ci((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Lo&&c.log("[Measurements] Adding LCP"),Ri.lcp={value:e.value,unit:"millisecond"},Ti=t)}),!0),o=function(e){return vi("ttfb",e,pi,Ai)}((({metric:e})=>{e.entries[e.entries.length-1]&&(Lo&&c.log("[Measurements] Adding TTFB"),Ri.ttfb={value:e.value,unit:"millisecond"})}));return()=>{t(),n(),r(),o()}}return()=>{}}function Di(e,t){if(Si()&&Ae){const n=function(e,t){return n=({metric:n})=>{if(void 0===n.value)return;const r=n.entries.find((e=>e.duration===n.value&&void 0!==Mi[e.name])),o=He();if(!r||!o)return;const i=Mi[r.name],a=o.getOptions(),s=ki(Ae+r.startTime),g=ki(n.value),l=void 0!==r.interactionId?e[r.interactionId]:void 0;if(void 0===l)return;const{routeName:A,parentContext:C,activeTransaction:I,user:u,replayId:d}=l,h=void 0!==u?u.email||u.id||u.ip_address:void 0,f=void 0!==I?I.getProfileId():void 0,p=new Io({startTimestamp:s,endTimestamp:s+g,op:`ui.interaction.${i}`,name:T(r.target),attributes:{release:a.release,environment:a.environment,transaction:A,...void 0!==h&&""!==h?{user:h}:{},...void 0!==f?{profile_id:f}:{},...void 0!==d?{replay_id:d}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),m=function(e,t,n){if(!uo(t))return!1;let r;return r=void 0!==e&&"function"==typeof t.tracesSampler?t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:jo.location}):void 0!==e&&void 0!==e.sampled?e.sampled:void 0!==t.tracesSampleRate?t.tracesSampleRate:1,Ro(r)?!0===r?n:!1===r?0:r*n:(Lo&&c.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}(C,a,t);if(m&&Math.random(){Lo&&c.error("Error while sending interaction:",e)}))}},vi("inp",n,mi,Ci);var n}(e,t);return()=>{n()}}return()=>{}}const Mi={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 _i(e){const t=Si();if(!t||!jo.performance.getEntries||!Ae)return;Lo&&c.log("[Tracing] Adding & adjusting spans using Performance API");const n=ki(Ae),r=t.getEntries(),{op:o,start_timestamp:i}=Le(e);if(r.slice(Ni).forEach((t=>{const r=ki(t.startTime),o=ki(t.duration);if(!("navigation"===e.op&&i&&n+r{Li(e,t,r,n)})),Li(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Li(e,t,"fetch",n,"cache","domainLookupStart"),Li(e,t,"domainLookup",n,"DNS"),function(e,t,n){t.responseEnd&&(Ei(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+ki(t.requestStart),endTimestamp:n+ki(t.responseEnd)}),Ei(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+ki(t.responseStart),endTimestamp:n+ki(t.responseEnd)}))}(e,t,n)}(e,t,n);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,o){const i=o+n,a=i+r;Ei(e,{description:t.name,endTimestamp:a,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i})}(e,t,r,o,n);const i=Wo(),a=t.startTime{if(!Ri[e]||!i||n>=i)return;const t=Ri[e].value,r=n+ki(t),o=Math.abs(1e3*(r-i)),a=o-t;Lo&&c.log(`[Measurements] Normalized ${e} from ${t} to ${o} (${a})`),Ri[e].value=o}));const t=Ri["mark.fid"];t&&Ri.fid&&(Ei(e,{description:"first input delay",endTimestamp:t.value+ki(Ri.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:t.value}),delete Ri["mark.fid"]),"fcp"in Ri||delete Ri.cls,Object.keys(Ri).forEach((e=>{!function(e,t,n){const r=So();r&&r.setMeasurement(e,t,n)}(e,Ri[e].value,Ri[e].unit)})),function(e){Ti&&(Lo&&c.log("[Measurements] Adding LCP Data"),Ti.element&&e.setTag("lcp.element",T(Ti.element)),Ti.id&&e.setTag("lcp.id",Ti.id),Ti.url&&e.setTag("lcp.url",Ti.url.trim().slice(0,200)),e.setTag("lcp.size",Ti.size));Oi&&Oi.sources&&(Lo&&c.log("[Measurements] Adding CLS Data"),Oi.sources.forEach(((t,n)=>e.setTag(`cls.source.${n+1}`,T(t.node)))))}(e)}Ti=void 0,Oi=void 0,Ri={}}function Li(e,t,n,r,o,i){const a=i?t[i]:t[`${n}End`],s=t[`${n}Start`];s&&a&&Ei(e,{op:"browser",origin:"auto.browser.browser.metrics",description:o||n,startTimestamp:r+ki(s),endTimestamp:r+ki(a)})}function ji(e,t,n,r){const o=t[n];null!=o&&o<2147483647&&(e[r]=o)}function Fi(e,t,n,r,o="auto.http.browser"){if(!uo()||!e.fetchData)return;const i=t(e.fetchData.url);if(e.endTimestamp&&i){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(!function(e,t){if(t.response){Co(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus("internal_error");e.end()}(n,e),delete r[t]))}const a=Ye(),s=He(),{method:g,url:l}=e.fetchData,A=function(e){try{return new URL(e).href}catch(e){return}}(l),C=A?Jn(A).host:void 0,c=i?ho({name:`${g} ${l}`,onlyIfParent:!0,attributes:{url:l,type:"fetch","http.method":g,"http.url":A,"server.address":C,[go]:o},op:"http.client"}):void 0;if(c&&(e.fetchData.__span=c.spanContext().spanId,r[c.spanContext().spanId]=c),n(e.fetchData.url)&&s){const t=e.args[0];e.args[1]=e.args[1]||{};const n=e.args[1];n.headers=function(e,t,n,r,o){const i=o||n.getSpan(),a=ut(),{traceId:s,spanId:g,sampled:l,dsc:A}={...a.getPropagationContext(),...n.getPropagationContext()},C=i?De(i):Re(s,g,l),c=ke(A||(i?et(i):$e(s,t,n))),I=r.headers||("undefined"!=typeof Request&&E(e,Request)?e.headers:void 0);if(I){if("undefined"!=typeof Headers&&E(I,Headers)){const e=new Headers(I);return e.append("sentry-trace",C),c&&e.append(we,c),e}if(Array.isArray(I)){const e=[...I,["sentry-trace",C]];return c&&e.push([we,c]),e}{const e="baggage"in I?I.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),c&&t.push(c),{...I,"sentry-trace":C,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":C,baggage:c}}(t,s,a,n,c)}return c}const Bi=["localhost",/^\/(?!\/)/],zi={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Bi,tracePropagationTargets:Bi};function Vi(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:o,shouldCreateSpanForRequest:i,enableHTTPTimings:a}={traceFetch:zi.traceFetch,traceXHR:zi.traceXHR,...e},s="function"==typeof i?i:e=>!0,g=e=>function(e,t){return _(e,t||Bi)}(e,r||o),l={};t&&Hn((e=>{const t=Fi(e,s,g,l);if(t){const n=Gi(e.fetchData.url),r=n?Jn(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}a&&t&&Ui(t)})),n&&Gn((e=>{const t=function(e,t,n,r){const o=e.xhr,i=o&&o[Zn];if(!uo()||!o||o.__sentry_own_request__||!i)return;const a=t(i.url);if(e.endTimestamp&&a){const e=o.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==i.status_code&&(Co(t,i.status_code),t.end(),delete r[e]))}const s=Ye(),g=ut(),l=Gi(i.url),A=l?Jn(l).host:void 0,C=a?ho({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":l,url:i.url,"server.address":A,[go]:"auto.http.browser"},op:"http.client"}):void 0;C&&(o.__sentry_xhr_span_id__=C.spanContext().spanId,r[o.__sentry_xhr_span_id__]=C);const c=He();if(o.setRequestHeader&&n(i.url)&&c){const{traceId:e,spanId:t,sampled:n,dsc:r}={...g.getPropagationContext(),...s.getPropagationContext()};!function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(we,n)}catch(e){}}(o,C?De(C):Re(e,t,n),ke(r||(C?et(C):$e(e,c,s))))}return C}(e,s,g,l);a&&t&&Ui(t)}))}function Ui(e){const{url:t}=Le(e).data||{};if(!t||"string"!=typeof t)return;const n=Ii("resource",(({entries:r})=>{r.forEach((r=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}(r)&&r.name.endsWith(t)){const t=function(e){const{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}r===e&&(t=r);return{name:t,version:n}}(e.nextHopProtocol),r=[];if(r.push(["network.protocol.version",n],["network.protocol.name",t]),!Ae)return r;return[...r,["http.request.redirect_start",Zi(e.redirectStart)],["http.request.fetch_start",Zi(e.fetchStart)],["http.request.domain_lookup_start",Zi(e.domainLookupStart)],["http.request.domain_lookup_end",Zi(e.domainLookupEnd)],["http.request.connect_start",Zi(e.connectStart)],["http.request.secure_connection_start",Zi(e.secureConnectionStart)],["http.request.connection_end",Zi(e.connectEnd)],["http.request.request_start",Zi(e.requestStart)],["http.request.response_start",Zi(e.responseStart)],["http.request.response_end",Zi(e.responseEnd)]]}(r);t.forEach((t=>e.setAttribute(...t))),setTimeout(n)}}))}))}function Zi(e=0){return((Ae||performance.timeOrigin)+e)/1e3}function Gi(e){try{return new URL(e,jo.location.origin).href}catch(e){return}}const Wi={...wo,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...zi},Hi=(e={})=>{const t=!!Lo&&!(!e.tracePropagationTargets&&!e.tracingOrigins);_o(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);const n={...Wi,...e},r=Pi(),o={};n.enableInp&&Di(o,n.interactionsSampleRate),n.enableLongTask&&Ii("longtask",(({entries:e})=>{for(const t of e){const e=So();if(!e)return;const n=ki(Ae+t.startTime),r=ki(t.duration);e.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r})}})),n._experiments.enableInteractions&&Ii("event",(({entries:e})=>{for(const t of e){const e=So();if(!e)return;if("click"===t.name){const n=ki(Ae+t.startTime),r=ki(t.duration),o={description:T(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r},i=R(t.target);i&&(o.attributes={"ui.component_name":i}),e.startChild(o)}}}));const i={name:void 0,context:void 0};function a(e){const t=It(),{beforeStartSpan:o,idleTimeout:a,finalTimeout:s,heartbeatInterval:g}=n,l="pageload"===e.op;let A;if(l){const t=l?Qi("sentry-trace"):"",n=l?Qi("baggage"):void 0,{traceId:r,dsc:o,parentSpanId:i,sampled:a}=Ne(t,n);A={traceId:r,parentSpanId:i,parentSampled:a,...e,metadata:{...e.metadata,dynamicSamplingContext:o},trimEnd:!0}}else A={trimEnd:!0,...e};const C=o?o(A):A;C.metadata=C.name!==A.name?{...C.metadata,source:"custom"}:C.metadata,i.name=C.name,i.context=C,!1===C.sampled&&Lo&&c.log(`[Tracing] Will not send ${C.op} transaction because of beforeNavigate.`),Lo&&c.log(`[Tracing] Starting ${C.op} transaction on scope`);const{location:I}=jo,u=Mo(t,C,a,s,!0,{location:I},g,l);return l&&jo.document&&(jo.document.addEventListener("readystatechange",(()=>{["interactive","complete"].includes(jo.document.readyState)&&u.sendAutoFinishSignal()})),["interactive","complete"].includes(jo.document.readyState)&&u.sendAutoFinishSignal()),u.registerBeforeFinishCallback((e=>{r(),_i(e)})),u}return{name:"BrowserTracing",setupOnce:()=>{},afterAllSetup(e){const r=e.getOptions(),{markBackgroundSpan:s,traceFetch:g,traceXHR:l,shouldCreateSpanForRequest:A,enableHTTPTimings:C,_experiments:I}=n,u=r&&r.tracePropagationTargets,d=u||n.tracePropagationTargets;let h;Lo&&t&&u&&c.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let f=jo.location&&jo.location.href;if(e.on&&(e.on("startNavigationSpan",(e=>{h&&(Lo&&c.log(`[Tracing] Finishing current transaction with op: ${Le(h).op}`),h.end()),h=a({op:"navigation",...e})})),e.on("startPageLoadSpan",(e=>{h&&(Lo&&c.log(`[Tracing] Finishing current transaction with op: ${Le(h).op}`),h.end()),h=a({op:"pageload",...e})}))),n.instrumentPageLoad&&e.emit&&jo.location){const t={name:jo.location.pathname,startTimestamp:Ae?Ae/1e3:void 0,origin:"auto.pageload.browser",attributes:{[io]:"url"}};Yi(e,t)}n.instrumentNavigation&&e.emit&&jo.location&&Wt((({to:t,from:n})=>{if(void 0===n&&f&&-1!==f.indexOf(t))f=void 0;else if(n!==t){f=void 0;const t={name:jo.location.pathname,origin:"auto.navigation.browser",attributes:{[io]:"url"}};Ki(e,t)}})),s&&(jo.document?jo.document.addEventListener("visibilitychange",(()=>{const e=So();if(jo.document.hidden&&e){const t="cancelled",{op:n,status:r}=Le(e);Lo&&c.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}})):Lo&&c.warn("[Tracing] Could not set up background tab detection due to lack of global document")),I.enableInteractions&&function(e,t){let n;const r=()=>{const{idleTimeout:r,finalTimeout:o,heartbeatInterval:i}=e,a="ui.action.click",s=So();if(s&&s.op&&["navigation","pageload"].includes(s.op))return void(Lo&&c.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`));if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name)return void(Lo&&c.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`));const{location:g}=jo,l={name:t.name,op:a,trimEnd:!0,data:{[io]:t.context?qi(t.context):"url"}};n=Mo(It(),l,r,o,!0,{location:g},i)};["click"].forEach((e=>{jo.document&&addEventListener(e,r,{once:!1,capture:!0})}))}(n,i),n.enableInp&&function(e,t){const n=({entries:n})=>{const r=He(),o=void 0!==r&&void 0!==r.getIntegrationByName?r.getIntegrationByName("Replay"):void 0,i=void 0!==o?o.getReplayId():void 0,a=So(),s=Ye(),g=void 0!==s?s.getUser():void 0;n.forEach((n=>{if(function(e){return"duration"in e}(n)){const r=n.interactionId;if(void 0===r)return;const o=e[r],s=n.duration,l=n.startTime,A=Object.keys(e),C=A.length>0?A.reduce(((t,n)=>e[t].duratione[t])).some((e=>e.duration===s&&e.startTime===l)))return}if(!r)return;if(o)o.duration=Math.max(o.duration,s);else if(A.lengthe[C].duration){const n=t.name,o=t.context;n&&o&&(C&&Object.keys(e).length>=Xi&&delete e[C],e[r]={routeName:n,duration:s,parentContext:o,user:g,activeTransaction:a,replayId:i,startTime:l})}}}))};Ii("event",n),Ii("first-input",n)}(o,i),Vi({traceFetch:g,traceXHR:l,tracePropagationTargets:d,shouldCreateSpanForRequest:A,enableHTTPTimings:C})},options:n}};function Yi(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);const n=fo();return"pageload"===(n&&Le(n).op)?n:void 0}function Ki(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);const n=fo();return"navigation"===(n&&Le(n).op)?n:void 0}function Qi(e){const t=(n=`meta[name=${e}]`,S.document&&S.document.querySelector?S.document.querySelector(n):null);var n;return t?t.getAttribute("content"):void 0}const Xi=10;function qi(e){const t=e.attributes&&e.attributes[io],n=e.data&&e.data[io],r=e.metadata&&e.metadata.source;return t||n||r}n(4146);var Ji=n(6540),$i=n.t(Ji,2);let ea,ta,na,ra,oa,ia,aa,sa=!1;var ga=n(6284);function la(){return"undefined"!=typeof window&&(!(0,ga.wD)()||void 0!==a.process&&"renderer"===a.process.type)}const Aa=a,Ca="#ffffff",ca="inherit",Ia="rgba(108, 95, 199, 1)",ua={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:Ca,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"25px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackground:"rgba(88, 74, 192, 1)",submitBackgroundHover:Ia,submitBorder:Ia,submitOutlineFocus:"#29232f",submitForeground:Ca,submitForegroundHover:Ca,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:ca,inputForeground:ca,inputBorder:"var(--border)",inputOutlineFocus:Ia,formBorderRadius:"20px",formContentBorderRadius:"6px"},da=ua,ha={...ua,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"},fa="widget",pa="api";async function ma({feedback:{message:e,email:t,name:n,source:r,url:o}},{includeReplay:i=!0}={}){const a=He(),s=a&&a.getTransport(),g=a&&a.getDsn();if(!a||!s||!g)return;const l={contexts:{feedback:{contact_email:t,name:n,message:e,url:o,source:r}},type:"feedback"};return We((async e=>{e.clearBreadcrumbs(),[pa,fa].includes(String(r))&&e.setLevel("info");const t=await async function({client:e,scope:t,event:n}){const r={};e.emit&&e.emit("preprocessEvent",n,r);const o=await Fe(e.getOptions(),n,r,t,e,ut());return null===o?(e.recordDroppedEvent("event_processor","feedback",n),null):(o.platform=o.platform||"javascript",o)}({scope:e,client:a,event:l});if(!t)return;a.emit&&a.emit("beforeSendFeedback",t,{includeReplay:Boolean(i)});const n=cn(t,g,a.getOptions()._metadata,a.getOptions().tunnel);let o;try{o=await s.send(n)}catch(e){const t=new Error("Unable to send Feedback");try{t.cause=e}catch(e){}throw t}if(o){if("number"==typeof o.statusCode&&(o.statusCode<200||o.statusCode>=300))throw new Error("Unable to send Feedback");return o}}))}const va="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function ya(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function ba(e){return`\n --background: ${e.background};\n --background-hover: ${e.backgroundHover};\n --foreground: ${e.foreground};\n --error: ${e.error};\n --success: ${e.success};\n --border: ${e.border};\n --border-radius: ${e.borderRadius};\n --box-shadow: ${e.boxShadow};\n\n --submit-background: ${e.submitBackground};\n --submit-background-hover: ${e.submitBackgroundHover};\n --submit-border: ${e.submitBorder};\n --submit-outline-focus: ${e.submitOutlineFocus};\n --submit-foreground: ${e.submitForeground};\n --submit-foreground-hover: ${e.submitForegroundHover};\n\n --cancel-background: ${e.cancelBackground};\n --cancel-background-hover: ${e.cancelBackgroundHover};\n --cancel-border: ${e.cancelBorder};\n --cancel-outline-focus: ${e.cancelOutlineFocus};\n --cancel-foreground: ${e.cancelForeground};\n --cancel-foreground-hover: ${e.cancelForegroundHover};\n\n --input-background: ${e.inputBackground};\n --input-foreground: ${e.inputForeground};\n --input-border: ${e.inputBorder};\n --input-outline-focus: ${e.inputOutlineFocus};\n\n --form-border-radius: ${e.formBorderRadius};\n --form-content-border-radius: ${e.formContentBorderRadius};\n `}function wa({id:e,colorScheme:t,themeDark:n,themeLight:r}){try{const o=Aa.document,i=o.createElement("div");i.id=e;const a=i.attachShadow({mode:"open"});return a.appendChild(function(e,t,n){const r=e.createElement("style");return r.textContent=`\n:host {\n --bottom: 1rem;\n --right: 1rem;\n --top: auto;\n --left: auto;\n --z-index: 100000;\n --font-family: ${n.light.fontFamily};\n --font-size: ${n.light.fontSize};\n\n position: fixed;\n left: var(--left);\n right: var(--right);\n bottom: var(--bottom);\n top: var(--top);\n z-index: var(--z-index);\n\n font-family: var(--font-family);\n font-size: var(--font-size);\n\n ${ba("dark"===t?n.dark:n.light)}\n}\n\n${"system"===t?`\n@media (prefers-color-scheme: dark) {\n :host {\n ${ba(n.dark)}\n }\n}`:""}\n}`,r}(o,t,{dark:n,light:r})),a.appendChild(function(e){const t=e.createElement("style");return t.textContent="\n.dialog {\n line-height: 25px;\n background-color: rgba(0, 0, 0, 0.05);\n border: none;\n position: fixed;\n inset: 0;\n z-index: 10000;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n}\n\n.dialog:not([open]) {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n position: fixed;\n left: var(--left);\n right: var(--right);\n bottom: var(--bottom);\n top: var(--top);\n\n border: var(--border);\n border-radius: var(--form-border-radius);\n background-color: var(--background);\n color: var(--foreground);\n\n width: 320px;\n max-width: 100%;\n max-height: calc(100% - 2rem);\n display: flex;\n flex-direction: column;\n box-shadow: var(--box-shadow);\n transition: transform 0.2s ease-in-out;\n transform: translate(0, 0) scale(1);\n}\n\n.dialog__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 20px;\n font-weight: 600;\n padding: 24px 24px 0 24px;\n margin: 0;\n margin-bottom: 16px;\n}\n\n.brand-link {\n display: inline-flex;\n}\n\n.error {\n color: var(--error);\n margin-bottom: 16px;\n}\n\n.form {\n display: grid;\n overflow: auto;\n flex-direction: column;\n gap: 16px;\n padding: 0 24px 24px;\n}\n\n.form__error-container {\n color: var(--error);\n}\n\n.form__error-container--hidden {\n display: none;\n}\n\n.form__label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0px;\n}\n\n.form__label__text {\n display: grid;\n gap: 4px;\n align-items: center;\n grid-auto-flow: column;\n grid-auto-columns: max-content;\n}\n\n.form__label__text--required {\n font-size: 0.85em;\n}\n\n.form__input {\n line-height: inherit;\n background-color: var(--input-background);\n box-sizing: border-box;\n border: var(--input-border);\n border-radius: var(--form-content-border-radius);\n color: var(--input-foreground);\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 500;\n padding: 6px 12px;\n}\n\n.form__input::placeholder {\n color: var(--input-foreground);\n opacity: 0.65;\n}\n\n.form__input:focus-visible {\n outline: 1px auto var(--input-outline-focus);\n}\n\n.form__input--textarea {\n font-family: inherit;\n resize: vertical;\n}\n\n.btn-group {\n display: grid;\n gap: 8px;\n margin-top: 8px;\n}\n\n.btn {\n line-height: inherit;\n border: var(--cancel-border);\n border-radius: var(--form-content-border-radius);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n padding: 6px 16px;\n}\n.btn[disabled] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.btn--primary {\n background-color: var(--submit-background);\n border-color: var(--submit-border);\n color: var(--submit-foreground);\n}\n.btn--primary:hover {\n background-color: var(--submit-background-hover);\n color: var(--submit-foreground-hover);\n}\n.btn--primary:focus-visible {\n outline: 1px auto var(--submit-outline-focus);\n}\n\n.btn--default {\n background-color: var(--cancel-background);\n color: var(--cancel-foreground);\n font-weight: 500;\n}\n.btn--default:hover {\n background-color: var(--cancel-background-hover);\n color: var(--cancel-foreground-hover);\n}\n.btn--default:focus-visible {\n outline: 1px auto var(--cancel-outline-focus);\n}\n\n.success-message {\n background-color: var(--background);\n border: var(--border);\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n font-weight: 600;\n color: var(--success);\n padding: 12px 24px;\n line-height: 25px;\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n gap: 6px;\n cursor: default;\n}\n\n.success-icon path {\n fill: var(--success);\n}\n",t}(o)),{shadow:a,host:i}}catch(e){throw c.warn("[Feedback] Browser does not support shadow DOM API"),new Error("Browser does not support shadow DOM API.")}}async function xa(e,t,n){if(!e)return;e.hideError();try{const e=await function({name:e,email:t,message:n,source:r=pa,url:o=N()},i={}){if(!n)throw new Error("Unable to submit feedback with empty message");return ma({feedback:{name:e,email:t,message:n,url:o,source:r}},i)}({...t,source:fa},n);return e}catch(t){va&&c.error(t),e&&e.showError("There was a problem submitting feedback, please wait and try again.")}}function Ea(e,t){return Object.entries(t).forEach((([t,n])=>{e.setAttributeNS(null,t,n)})),e}function ka(e,t,...n){const r=Aa.document.createElement(e);t&&Object.entries(t).forEach((([e,t])=>{"className"===e&&"string"==typeof t?r.setAttribute("class",t):"boolean"==typeof t&&t?r.setAttribute(e,""):"string"==typeof t?r.setAttribute(e,t):e.startsWith("on")&&"function"==typeof t&&r.addEventListener(e.substring(2).toLowerCase(),t)}));for(const e of n)Sa(r,e);return r}function Sa(e,t){const n=Aa.document;if(null!=t)if(Array.isArray(t))for(const n of t)Sa(e,n);else!1===t||("string"==typeof t?e.appendChild(n.createTextNode(t)):t instanceof Node?e.appendChild(t):e.appendChild(n.createTextNode(String(t))))}function Ta({buttonLabel:e,onClick:t}){const n=ka("button",{type:"button",className:"widget__actor","aria-label":e,"aria-hidden":"false"},function(){const e=e=>Aa.document.createElementNS("http://www.w3.org/2000/svg",e),t=Ea(e("svg"),{class:"feedback-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"}),n=Ea(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ea(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),i=Ea(e("clipPath"),{id:"clip0_57_80"}),a=Ea(e("rect"),{width:"20",height:"20",fill:"white"});return i.appendChild(a),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(a),{get el(){return t}}}().el,e?ka("span",{className:"widget__actor__text"},e):null);return n.addEventListener("click",(function(e){t&&t(e)})),{get el(){return n},show:()=>{n.classList.remove("widget__actor--hidden"),n.setAttribute("aria-hidden","false")},hide:()=>{n.classList.add("widget__actor--hidden"),n.setAttribute("aria-hidden","true")}}}function Oa(e,t){const n=e.get(t);return"string"==typeof n?n.trim():""}function Na({nameLabel:e,namePlaceholder:t,emailLabel:n,emailPlaceholder:r,messageLabel:o,messagePlaceholder:i,isRequiredLabel:a,cancelButtonLabel:s,submitButtonLabel:g,showName:l,showEmail:A,isNameRequired:C,isEmailRequired:c,defaultName:I,defaultEmail:u,onCancel:d,onSubmit:h}){const{el:f}=function({label:e}){return{el:ka("button",{type:"submit",className:"btn btn--primary","aria-label":e},e)}}({label:g});const p=ka("div",{className:"form__error-container form__error-container--hidden","aria-hidden":"true"});const m=ka("input",{id:"name",type:l?"text":"hidden","aria-hidden":l?"false":"true",name:"name",required:C,className:"form__input",placeholder:t,value:I}),v=ka("input",{id:"email",type:A?"text":"hidden","aria-hidden":A?"false":"true",name:"email",required:c,className:"form__input",placeholder:r,value:u}),y=ka("textarea",{id:"message",autoFocus:"true",rows:"5",name:"message",required:!0,className:"form__input form__input--textarea",placeholder:i}),b=ka("button",{type:"button",className:"btn btn--default","aria-label":s,onClick:e=>{d&&d(e)}},s),w=ka("form",{className:"form",onSubmit:function(e){if(e.preventDefault(),e.target instanceof HTMLFormElement)try{if(h){const t=new FormData(e.target),n={name:Oa(t,"name"),email:Oa(t,"email"),message:Oa(t,"message")};h(n)}}catch(e){}}},[p,l&&ka("label",{htmlFor:"name",className:"form__label"},[ka("span",{className:"form__label__text"},e,C&&ka("span",{className:"form__label__text--required"},` ${a}`)),m]),!l&&m,A&&ka("label",{htmlFor:"email",className:"form__label"},[ka("span",{className:"form__label__text"},n,c&&ka("span",{className:"form__label__text--required"},` ${a}`)),v]),!A&&v,ka("label",{htmlFor:"message",className:"form__label"},[ka("span",{className:"form__label__text"},o,ka("span",{className:"form__label__text--required"},` ${a}`)),y]),ka("div",{className:"btn-group"},[f,b])]);return{get el(){return w},showError:function(e){p.textContent=e,p.classList.remove("form__error-container--hidden"),p.setAttribute("aria-hidden","false")},hideError:function(){p.textContent="",p.classList.add("form__error-container--hidden"),p.setAttribute("aria-hidden","true")}}}function Ra({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:o,isEmailRequired:i,colorScheme:a,defaultName:s,defaultEmail:g,onClosed:l,onCancel:A,onSubmit:C,...c}){let I=null;function u(){I&&(I.open=!1)}const{el:d,showError:h,hideError:f}=Na({showEmail:r,showName:n,isEmailRequired:i,isNameRequired:o,defaultName:s,defaultEmail:g,onSubmit:C,onCancel:A,...c});return I=ka("dialog",{className:"dialog",open:!0,onClick:function(){u(),l&&l()}},ka("div",{className:"dialog__content",onClick:e=>{e.stopPropagation()}},ka("h2",{className:"dialog__header"},e,t&&ka("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},function({colorScheme:e}){const t=e=>Aa.document.createElementNS("http://www.w3.org/2000/svg",e),n=Ea(t("svg"),{class:"sentry-logo",width:"32",height:"30",viewBox:"0 0 72 66",fill:"none"}),r=Ea(t("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"});n.append(r);const o=t("defs"),i=t("style");return i.textContent=`\n path {\n fill: ${"dark"===e?"#fff":"#362d59"};\n }`,"system"===e&&(i.textContent+="\n @media (prefers-color-scheme: dark) {\n path: {\n fill: '#fff';\n }\n }\n "),o.append(i),n.append(o),{get el(){return n}}}({colorScheme:a}).el)),d)),{get el(){return I},showError:h,hideError:f,open:function(){I&&(I.open=!0)},close:u,checkIsOpen:function(){return I&&!0===I.open||!1}}}function Pa({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}const r=ka("div",{className:"success-message",onClick:n},function(){const e=e=>Aa.document.createElementNS("http://www.w3.org/2000/svg",e),t=Ea(e("svg"),{class:"success-icon",width:"16",height:"17",viewBox:"0 0 16 17",fill:"none"}),n=Ea(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ea(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=Ea(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"),a=Ea(e("clipPath"),{id:"clip0_57_156"}),s=Ea(e("rect"),{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"});return a.appendChild(s),i.appendChild(a),t.appendChild(i).appendChild(a).appendChild(s),{get el(){return t}}}().el,e);return{el:r,remove:n}}function Da({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let o,i,a=!1;async function s(t){if(!i)return;const r=[];if(n.isNameRequired&&!t.name&&r.push(n.nameLabel),n.isEmailRequired&&!t.email&&r.push(n.emailLabel),t.message||r.push(n.messageLabel),r.length>0)return void i.showError(`Please enter in the following required fields: ${r.join(", ")}`);await xa(i,t)?(u(),function(){if(e)try{const t=Pa({message:n.successMessageText,onRemove:()=>{r&&clearTimeout(r),l()}});if(!t.el)throw new Error("Unable to show success message");e.appendChild(t.el);const r=setTimeout((()=>{t&&t.remove()}),5e3)}catch(e){c.error(e)}}(),n.onSubmitSuccess&&n.onSubmitSuccess()):n.onSubmitError&&n.onSubmitError()}function g(){const e=He(),t=e&&e.getIntegrationByName&&e.getIntegrationByName("Replay");t&&t.flush().catch((e=>{va&&c.error(e)}))}function l(){o&&o.show()}function A(){o&&o.hide()}function C(){try{if(i)return i.open(),a=!0,n.onFormOpen&&n.onFormOpen(),void g();const t=n.useSentryUser,r=Ye(),o=r&&r.getUser();if(i=Ra({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:t&&o&&o[t.name]||"",defaultEmail:t&&o&&o[t.email]||"",onClosed:()=>{l(),a=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{I(),l()},onSubmit:s}),!i.el)throw new Error("Unable to open Feedback dialog");e.appendChild(i.el),A(),n.onFormOpen&&n.onFormOpen(),g()}catch(e){c.error(e)}}function I(){i&&(i.close(),a=!1,n.onFormClose&&n.onFormClose())}function u(){if(i){I();const e=i.el;e&&e.remove(),i=void 0}}function d(){a||C(),A()}return r?r.addEventListener("click",d):t&&(o=Ta({buttonLabel:n.buttonLabel,onClick:d}),o.el&&e.appendChild(o.el)),{get actor(){return o},get dialog(){return i},showActor:l,hideActor:A,removeActor:function(){o&&o.el&&o.el.remove()},openDialog:C,closeDialog:I,removeDialog:u}}const Ma=Aa.document;class _a{static __initStatic(){this.id="Feedback"}constructor({autoInject:e=!0,id:t="sentry-feedback",isEmailRequired:n=!1,isNameRequired:r=!1,showBranding:o=!0,showEmail:i=!0,showName:a=!0,useSentryUser:s={email:"email",name:"username"},themeDark:g,themeLight:l,colorScheme:A="system",buttonLabel:C="Report a Bug",cancelButtonLabel:c="Cancel",submitButtonLabel:I="Send Bug Report",formTitle:u="Report a Bug",emailPlaceholder:d="your.email@example.org",emailLabel:h="Email",messagePlaceholder:f="What's the bug? What did you expect?",messageLabel:p="Description",namePlaceholder:m="Your Name",nameLabel:v="Name",isRequiredLabel:y="(required)",successMessageText:b="Thank you for your report!",onFormClose:w,onFormOpen:x,onSubmitError:E,onSubmitSuccess:k}={}){this.name=_a.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:e,showBranding:o,id:t,isEmailRequired:n,isNameRequired:r,showEmail:i,showName:a,useSentryUser:s,colorScheme:A,themeDark:{...ha,...g},themeLight:{...da,...l},buttonLabel:C,cancelButtonLabel:c,submitButtonLabel:I,formTitle:u,emailLabel:h,emailPlaceholder:d,messageLabel:p,messagePlaceholder:f,nameLabel:v,namePlaceholder:m,isRequiredLabel:y,successMessageText:b,onFormClose:w,onFormOpen:x,onSubmitError:E,onSubmitSuccess:k}}setupOnce(){if(la())try{this._cleanupWidgetIfExists();const{autoInject:e}=this.options;if(!e)return;this._createWidget(this.options)}catch(e){va&&c.error(e)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(e,t){try{const n=ya(this.options,t||{});return this._ensureShadowHost(n,(({shadow:t})=>{const r="string"==typeof e?Ma.querySelector(e):"function"==typeof e.addEventListener?e:null;if(!r)return va&&c.error("[Feedback] Unable to attach to target element"),null;const o=Da({shadow:t,options:n,attachTo:r});return this._widgets.add(o),this._widget||(this._widget=o),o}))}catch(e){return va&&c.error(e),null}}createWidget(e){try{return this._createWidget(ya(this.options,e||{}))}catch(e){return va&&c.error(e),null}}removeWidget(e){if(!e)return!1;try{if(this._widgets.has(e))return e.removeActor(),e.removeDialog(),this._widgets.delete(e),this._widget===e&&(this._widget=null),!0}catch(e){va&&c.error(e)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();const e=Ma.querySelector(`#${this.options.id}`);e&&e.remove()}_createWidget(e){return this._ensureShadowHost(e,(({shadow:t})=>{const n=Da({shadow:t,options:e});return!this._hasInsertedActorStyles&&n.actor&&(t.appendChild(function(e){const t=e.createElement("style");return t.textContent="\n.widget__actor {\n position: fixed;\n left: var(--left);\n right: var(--right);\n bottom: var(--bottom);\n top: var(--top);\n z-index: var(--z-index);\n\n line-height: 16px;\n\n display: flex;\n align-items: center;\n gap: 8px;\n\n border-radius: var(--border-radius);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n padding: 16px;\n text-decoration: none;\n z-index: 9000;\n\n color: var(--foreground);\n background-color: var(--background);\n border: var(--border);\n box-shadow: var(--box-shadow);\n opacity: 1;\n transition: opacity 0.1s ease-in-out;\n}\n\n.widget__actor:hover {\n background-color: var(--background-hover);\n}\n\n.widget__actor svg {\n width: 16px;\n height: 16px;\n}\n\n.widget__actor--hidden {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n\n.widget__actor__text {\n}\n\n@media (max-width: 600px) {\n .widget__actor__text {\n display: none;\n }\n}\n\n.feedback-icon path {\n fill: var(--foreground);\n}\n",t}(Ma)),this._hasInsertedActorStyles=!0),this._widgets.add(n),this._widget||(this._widget=n),n}))}_ensureShadowHost(e,t){let n=!1;if(!this._shadow||!this._host){const{id:t,colorScheme:r,themeLight:o,themeDark:i}=e,{shadow:a,host:s}=wa({id:t,colorScheme:r,themeLight:o,themeDark:i});this._shadow=a,this._host=s,n=!0}this._host.dataset.sentryFeedbackColorscheme=e.colorScheme;const r=t({shadow:this._shadow,host:this._host});return n&&Ma.body.appendChild(this._host),r}}function La(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}function ja(e,t){const n=t&&function(e){return void 0!==e.getClient}(t)?t.getClient():t,r=n&&n.getDsn(),o=n&&n.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,r)||function(e,t){if(!t)return!1;return Fa(e)===Fa(t)}(e,o)}function Fa(e){return"/"===e[e.length-1]?e.slice(0,-1):e}_a.__initStatic();const Ba=a,za="sentryReplaySession",Va="Unable to send Replay",Ua=15e4,Za=5e3,Ga=2e7,Wa=36e5;function Ha(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}var Ya;function Ka(e){const t=Ha([e,"optionalAccess",e=>e.host]);return Boolean(Ha([t,"optionalAccess",e=>e.shadowRoot])===e)}function Qa(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Xa(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,qa).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function qa(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=Xa(e.styleSheet)||function(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(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(e.cssText);return t||e.cssText}!function(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"}(Ya||(Ya={}));class Ja{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;const t=Ha([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]);return r=()=>-1,null!=(n=t)?n:r();var n,r}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function $a({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function es({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function ts(e){return e.toLowerCase()}function ns(e){return e.toUpperCase()}const rs="__rrweb_original__";function os(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ts(t):null}function is(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}let as=1;const ss=new RegExp("[^a-z0-9-_:]");function gs(){return as++}let ls,As;const Cs=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,cs=/^(?:[a-z+]+:)?\/\//i,Is=/^www\..*/i,us=/^(data:)([^,]*),(.*)/i;function ds(e,t){return(e||"").replace(Cs,((e,n,r,o,i,a)=>{const s=r||i||a,g=n||o||"";if(!s)return e;if(cs.test(s)||Is.test(s))return`url(${g}${s}${g})`;if(us.test(s))return`url(${g}${s}${g})`;if("/"===s[0])return`url(${g}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+s}${g})`;const l=t.split("/"),A=s.split("/");l.pop();for(const e of A)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${g}${l.join("/")}${g})`}))}const hs=/^[^ \t\n\r\u000c]+/,fs=/^[, \t\n\r\u000c]+/;function ps(e,t){if(!t||""===t.trim())return t;const n=e.createElement("a");return n.href=t,n.href}function ms(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function vs(){const e=document.createElement("a");return e.href="",e.href}function ys(e,t,n,r,o,i){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?ps(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(fs),!(n>=t.length);){let i=r(hs);if(","===i.slice(-1))i=ps(e,i.substring(0,i.length-1)),o.push(i);else{let r="";i=ps(e,i);let a=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((i+r).trim());break}if(a)")"===e&&(a=!1);else{if(","===e){n+=1,o.push((i+r).trim());break}"("===e&&(a=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?ds(r,vs()):"object"===t&&"data"===n?ps(e,r):"function"==typeof i?i(n,r,o):r:ps(e,r):r}function bs(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function ws(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ws(e.parentNode,t,n,r+1):-1}function xs(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch(e){return!1}}}function Es(e,t,n,r,o,i){try{const a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===a)return!1;if("INPUT"===a.tagName){const e=a.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let s=-1,g=-1;if(i){if(g=ws(a,xs(r,o)),g<0)return!0;s=ws(a,xs(t,n),g>=0?g:1/0)}else{if(s=ws(a,xs(t,n)),s<0)return!1;g=ws(a,xs(r,o),s>=0?s:1/0)}return s>=0?!(g>=0)||s<=g:!(g>=0)&&!!i}catch(e){}return!!i}function ks(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:s,maskAttributeFn:g,maskTextClass:l,unmaskTextClass:A,maskTextSelector:C,unmaskTextSelector:c,inlineStylesheet:I,maskInputOptions:u={},maskTextFn:d,maskInputFn:h,dataURLOptions:f={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:v,newlyAddedElement:y=!1}=t,b=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Ya.Document,childNodes:[],compatMode:e.compatMode}:{type:Ya.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ya.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:a,maskInputOptions:s={},maskAttributeFn:g,maskInputFn:l,dataURLOptions:A={},inlineImages:C,recordCanvas:c,keepIframeSrcFn:I,newlyAddedElement:u=!1,rootId:d,maskAllText:h,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:v}=t,y=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,r,o,i),b=function(e){if(e instanceof HTMLFormElement)return"form";const t=ts(e.tagName);return ss.test(t)?"div":t}(e);let w={};const x=e.attributes.length;for(let t=0;tt.href===e.href));let r=null;t&&(r=Xa(t)),r&&(delete w.rel,delete w.href,w._cssText=ds(r,t.href))}if("style"===b&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=Xa(e.sheet);t&&(w._cssText=ds(t,vs()))}if("input"===b||"textarea"===b||"select"===b||"option"===b){const t=e,n=os(t),r=is(t,ns(b),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=Es(t,f,m,p,v,$a({type:n,tagName:ns(b),maskInputOptions:s}));w.value=es({isMasked:e,element:t,value:r,maskInputFn:l})}o&&(w.checked=o)}"option"===b&&(e.selected&&!s.select?w.selected=!0:delete w.selected);if("canvas"===b&&c)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n0!==e)))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(A.type,A.quality));else if(!("__context"in e)){const t=e.toDataURL(A.type,A.quality),n=document.createElement("canvas");n.width=e.width,n.height=e.height;t!==n.toDataURL(A.type,A.quality)&&(w.rr_dataURL=t)}if("img"===b&&C){ls||(ls=n.createElement("canvas"),As=ls.getContext("2d"));const t=e,r=t.crossOrigin;t.crossOrigin="anonymous";const o=()=>{t.removeEventListener("load",o);try{ls.width=t.naturalWidth,ls.height=t.naturalHeight,As.drawImage(t,0,0),w.rr_dataURL=ls.toDataURL(A.type,A.quality)}catch(e){}r?w.crossOrigin=r:t.removeAttribute("crossorigin")};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}"audio"!==b&&"video"!==b||(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime);u||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop));if(y){const{width:t,height:n}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==b||I(w.src)||(e.contentDocument||(w.rr_src=w.src),delete w.src);let E;try{customElements.get(b)&&(E=!0)}catch(e){}return{type:Ya.Element,tagName:b,attributes:w,childNodes:[],isSVG:ms(e)||void 0,needBlock:y,rootId:d,isCustom:E}}(e,{doc:n,blockClass:o,blockSelector:i,unblockSelector:a,inlineStylesheet:I,maskAttributeFn:g,maskInputOptions:u,maskInputFn:h,dataURLOptions:f,inlineImages:p,recordCanvas:m,keepIframeSrcFn:v,newlyAddedElement:y,rootId:b,maskAllText:s,maskTextClass:l,unmaskTextClass:A,maskTextSelector:C,unmaskTextSelector:c});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:a,maskTextFn:s,maskInputOptions:g,maskInputFn:l,rootId:A}=t,C=e.parentNode&&e.parentNode.tagName;let c=e.textContent;const I="STYLE"===C||void 0,u="SCRIPT"===C||void 0,d="TEXTAREA"===C||void 0;if(I&&c){try{e.nextSibling||e.previousSibling||Ha([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(c=Xa(e.parentNode.sheet))}catch(e){}c=ds(c,vs())}u&&(c="SCRIPT_PLACEHOLDER");const h=Es(e,r,i,o,a,n);I||u||d||!c||!h||(c=s?s(c,e.parentElement):c.replace(/[\S]/g,"*"));d&&c&&(g.textarea||h)&&(c=l?l(c,e.parentNode):c.replace(/[\S]/g,"*"));if("OPTION"===C&&c){c=es({isMasked:Es(e,r,i,o,a,$a({type:null,tagName:C,maskInputOptions:g})),element:e,value:c,maskInputFn:l})}return{type:Ya.Text,textContent:c||"",isStyle:I,rootId:A}}(e,{maskAllText:s,maskTextClass:l,unmaskTextClass:A,maskTextSelector:C,unmaskTextSelector:c,maskTextFn:d,maskInputOptions:u,maskInputFn:h,rootId:b});case e.CDATA_SECTION_NODE:return{type:Ya.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:Ya.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function Ss(e){return null==e?"":e.toLowerCase()}function Ts(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:s,maskTextClass:g,unmaskTextClass:l,maskTextSelector:A,unmaskTextSelector:C,skipChild:c=!1,inlineStylesheet:I=!0,maskInputOptions:u={},maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m={},inlineImages:v=!1,recordCanvas:y=!1,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:T=!1}=t;let{preserveWhiteSpace:O=!0}=t;const N=ks(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:s,unblockSelector:a,maskTextClass:g,unmaskTextClass:l,maskTextSelector:A,unmaskTextSelector:C,inlineStylesheet:I,maskInputOptions:u,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,dataURLOptions:m,inlineImages:v,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:T});if(!N)return null;let R;R=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===Ya.Comment)return!0;if(e.type===Ya.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Ss(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ss(e.attributes.name)||"icon"===Ss(e.attributes.rel)||"apple-touch-icon"===Ss(e.attributes.rel)||"shortcut icon"===Ss(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Ss(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ss(e.attributes.property).match(/^(og|twitter|fb):/)||Ss(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ss(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Ss(e.attributes.name)||"googlebot"===Ss(e.attributes.name)||"bingbot"===Ss(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Ss(e.attributes.name)||"generator"===Ss(e.attributes.name)||"framework"===Ss(e.attributes.name)||"publisher"===Ss(e.attributes.name)||"progid"===Ss(e.attributes.name)||Ss(e.attributes.property).match(/^article:/)||Ss(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Ss(e.attributes.name)||"yandex-verification"===Ss(e.attributes.name)||"csrf-token"===Ss(e.attributes.name)||"p:domain_verify"===Ss(e.attributes.name)||"verify-v1"===Ss(e.attributes.name)||"verification"===Ss(e.attributes.name)||"shopify-checkout-api-token"===Ss(e.attributes.name)))return!0}}return!1}(N,p)&&(O||N.type!==Ya.Text||N.isStyle||N.textContent.replace(/^\s+|\s+$/gm,"").length)?gs():-2;const P=Object.assign(N,{id:R});if(r.add(e,P),-2===R)return null;b&&b(e);let D=!c;if(P.type===Ya.Element){D=D&&!P.needBlock,delete P.needBlock;const t=e.shadowRoot;t&&Qa(t)&&(P.isShadowHost=!0)}if((P.type===Ya.Document||P.type===Ya.Element)&&D){p.headWhitespace&&P.type===Ya.Element&&"head"===P.tagName&&(O=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:s,unblockSelector:a,maskTextClass:g,unmaskTextClass:l,maskTextSelector:A,unmaskTextSelector:C,skipChild:c,inlineStylesheet:I,maskInputOptions:u,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:v,recordCanvas:y,preserveWhiteSpace:O,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:S};for(const n of Array.from(e.childNodes)){const e=Ts(n,t);e&&P.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Ts(n,t);r&&(Qa(e.shadowRoot)&&(r.isShadow=!0),P.childNodes.push(r))}}return e.parentNode&&Ka(e.parentNode)&&Qa(e.parentNode)&&(P.isShadow=!0),P.type===Ya.Element&&"iframe"===P.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=setTimeout((()=>{i||(t(),i=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(r),i=!0,t()}))}const a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&w){const n=Ts(t,{doc:t,mirror:r,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:s,maskTextClass:g,unmaskTextClass:l,maskTextSelector:A,unmaskTextSelector:C,skipChild:!1,inlineStylesheet:I,maskInputOptions:u,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:v,recordCanvas:y,preserveWhiteSpace:O,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:S});n&&w(e,n)}}),x),P.type===Ya.Element&&"link"===P.tagName&&"stylesheet"===P.attributes.rel&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const i=setTimeout((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),o=!0,t()}))}(e,(()=>{if(E){const t=Ts(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:s,maskTextClass:g,unmaskTextClass:l,maskTextSelector:A,unmaskTextSelector:C,skipChild:!1,inlineStylesheet:I,maskInputOptions:u,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:v,recordCanvas:y,preserveWhiteSpace:O,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:S});t&&E(e,t)}}),k),P}function Os(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}function Ns(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}let Rs={map:{},getId:()=>-1,getNode:()=>null,removeNodeFromMap(){},has:()=>!1,reset(){}};function Ps(e,t,n={}){let r=null,o=0;return function(...i){const a=Date.now();o||!1!==n.leading||(o=a);const s=t-(a-o),g=this;s<=0||s>t?(r&&(!function(...e){Js("clearTimeout")(...e)}(r),r=null),o=a,e.apply(g,i)):r||!1===n.trailing||(r=$s((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(g,i)}),s))}}function Ds(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){$s((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>Ds(e,t,i||{},!0)}function Ms(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Rs=new Proxy(Rs,{get:(e,t,n)=>Reflect.get(e,t,n)}));let _s=Date.now;function Ls(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:Os([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||Os([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||Os([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:Os([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||Os([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||Os([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function js(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Fs(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Bs(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}function zs(e,t,n,r,o){if(!e)return!1;const i=Bs(e);if(!i)return!1;const a=xs(t,n);if(!o){const e=r&&i.matches(r);return a(i)&&!e}const s=ws(i,a);let g=-1;return!(s<0)&&(r&&(g=ws(i,xs(null,r))),s>-1&&g<0||se.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(_s=()=>(new Date).getTime());class Ys{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return t=this.styleIDMap.get(e),n=()=>-1,null!=t?t:n();var t,n}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ks(e){let t=null;return Os([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Qs(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=Ks(n);)n=t;return n}(e);return t.contains(n)}function Xs(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||Qs(e))}const qs={};function Js(e){const t=qs[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return qs[e]=r.bind(window)}function $s(...e){return Js("setTimeout")(...e)}var eg=(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))(eg||{}),tg=(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))(tg||{}),ng=(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))(ng||{}),rg=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(rg||{});function og(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}function ig(e){return"__ln"in e}class ag{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;ne.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&ig(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&ig(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const sg=(e,t)=>`${e}@${t}`;class gg{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=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new ag,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!Xs(o))return;const i=Ka(o.parentNode)?this.mirror.getId(Ks(o)):this.mirror.getId(o.parentNode),a=r(o);if(-1===i||-1===a)return n.addNode(o);const s=Ts(o,{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:e=>{Gs(e,this.mirror)&&this.iframeManager.addIframe(e),Ws(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Hs(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});s&&(e.push({parentId:i,nextId:a,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Ag(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)cg(this.droppedSet,e)||Ag(this.removes,e,this.mirror)?cg(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let i=null;for(;n.length;){let e=null;if(i){const t=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==t&&-1!==n&&(e=i)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}i=e.previous,n.removeNode(e.value),o(e.value)}const a={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(a.texts.length||a.attributes.length||a.removes.length||a.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(a))},this.processMutation=e=>{if(!Vs(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;zs(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:Es(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Bs(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=os(t),o=t.tagName;r=is(t,o,n);const i=$a({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=es({isMasked:Es(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:t,value:r,maskInputFn:this.maskInputFn})}if(zs(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(t.contentDocument)return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!bs(t.tagName,n)&&(o.attributes[n]=ys(this.doc,ts(t.tagName),ts(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||i!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===i?r:[r,i]:o._unchangedStyles[e]=[r,i]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(zs(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=Ka(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);zs(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Vs(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(lg(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Us(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[sg(n,r)]?lg(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!Ka(e.target)||!Qa(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Vs(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[sg(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);zs(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),Hs(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["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"].forEach((t=>{this[t]=e[t]}))}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 lg(e,t){e.delete(t),t.childNodes.forEach((t=>lg(e,t)))}function Ag(e,t,n){return 0!==e.length&&Cg(e,t,n)}function Cg(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return!!e.some((e=>e.id===o))||Cg(e,r,n)}function cg(e,t){return 0!==e.size&&Ig(e,t)}function Ig(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Ig(e,n))}let ug;function dg(e){ug=e}function hg(){ug=void 0}const fg=e=>{if(!ug)return e;return(...t)=>{try{return e(...t)}catch(e){if(ug&&!0===ug(e))return()=>{};throw e}}};function pg(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const mg=[];function vg(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(e){}return e&&e.target}function yg(e,t){const n=new gg;mg.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=pg([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);o&&window[o]&&(r=window[o]);const i=new r(fg((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function bg({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,g=[];let l=null;return Object.keys(ng).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e])).forEach((a=>{let s=ts(a);const A=(t=>a=>{const s=vg(a);if(zs(s,r,o,i,!0))return;let g=null,A=t;if("pointerType"in a){switch(a.pointerType){case"mouse":g=rg.Mouse;break;case"touch":g=rg.Touch;break;case"pen":g=rg.Pen}g===rg.Touch?ng[t]===ng.MouseDown?A="TouchStart":ng[t]===ng.MouseUp&&(A="TouchEnd"):rg.Pen}else Zs(a)&&(g=rg.Touch);null!==g?(l=g,(A.startsWith("Touch")&&g===rg.Touch||A.startsWith("Mouse")&&g===rg.Mouse)&&(g=null)):ng[t]===ng.Click&&(g=l,l=null);const C=Zs(a)?a.changedTouches[0]:a;if(!C)return;const c=n.getId(s),{clientX:I,clientY:u}=C;fg(e)({type:ng[A],id:c,x:I,y:u,...null!==g&&{pointerType:g}})})(a);if(window.PointerEvent)switch(ng[a]){case ng.MouseDown:case ng.MouseUp:s=s.replace("mouse","pointer");break;case ng.TouchStart:case ng.TouchEnd:return}g.push(Ns(s,A,t))})),fg((()=>{g.forEach((e=>e()))}))}function wg({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:a}){const s=fg(Ps(fg((a=>{const s=vg(a);if(!s||zs(s,r,o,i,!0))return;const g=n.getId(s);if(s===t&&t.defaultView){const n=Ls(t.defaultView);e({id:g,x:n.left,y:n.top})}else e({id:g,x:s.scrollLeft,y:s.scrollTop})})),a.scroll||100));return Ns("scroll",s,t)}const xg=["INPUT","TEXTAREA","SELECT"],Eg=new WeakMap;function kg({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:a,ignoreSelector:s,maskInputOptions:g,maskInputFn:l,sampling:A,userTriggeredOnInput:C,maskTextClass:c,unmaskTextClass:I,maskTextSelector:u,unmaskTextSelector:d}){function h(e){let n=vg(e);const A=e.isTrusted,h=n&&ns(n.tagName);if("OPTION"===h&&(n=n.parentElement),!n||!h||xg.indexOf(h)<0||zs(n,r,o,i,!0))return;const p=n;if(p.classList.contains(a)||s&&p.matches(s))return;const m=os(n);let v=is(p,h,m),y=!1;const b=$a({maskInputOptions:g,tagName:h,type:m}),w=Es(n,c,u,I,d,b);"radio"!==m&&"checkbox"!==m||(y=n.checked),v=es({isMasked:w,element:n,value:v,maskInputFn:l}),f(n,C?{text:v,isChecked:y,userTriggered:A}:{text:v,isChecked:y});const x=n.name;"radio"===m&&x&&y&&t.querySelectorAll(`input[type="radio"][name="${x}"]`).forEach((e=>{if(e!==n){const t=es({isMasked:w,element:e,value:is(e,h,m),maskInputFn:l});f(e,C?{text:t,isChecked:!y,userTriggered:!1}:{text:t,isChecked:!y})}}))}function f(t,r){const o=Eg.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){Eg.set(t,r);const o=n.getId(t);fg(e)({...r,id:o})}}const p=("last"===A.input?["change"]:["input","change"]).map((e=>Ns(e,fg(h),t))),m=t.defaultView;if(!m)return()=>{p.forEach((e=>e()))};const v=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&p.push(...y.map((e=>Ds(e[0],e[1],{set(){fg(h)({target:this,isTrusted:!1})}},!1,m)))),fg((()=>{p.forEach((e=>e()))}))}function Sg(e){return function(e,t){if(Rg("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Rg("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Rg("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Rg("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Tg(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Og({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const o="#document"===n.nodeName?pg([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):pg([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),i=pg([o,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(pg([o,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&i?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return pg([i,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=pg([i,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),fg((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))):()=>{}}function Ng(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const r=yg(e,e.doc),o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let a,s=[];const g=Ps(fg((t=>{const n=Date.now()-a;e(s.map((e=>(e.timeOffset-=n,e))),t),s=[],a=null})),i),l=fg(Ps(fg((e=>{const t=vg(e),{clientX:n,clientY:o}=Zs(e)?e.changedTouches[0]:e;a||(a=_s()),s.push({x:n,y:o,id:r.getId(t),timeOffset:_s()-a}),g("undefined"!=typeof DragEvent&&e instanceof DragEvent?tg.Drag:e instanceof MouseEvent?tg.MouseMove:tg.TouchMove)})),o,{trailing:!1})),A=[Ns("mousemove",l,n),Ns("touchmove",l,n),Ns("drag",l,n)];return fg((()=>{A.forEach((e=>e()))}))}(e),i=bg(e),a=wg(e),s=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Ns("resize",fg(Ps(fg((()=>{const t=js(),o=Fs();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)})),200)),t)}(e,{win:n}),g=kg(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:a}){const s=fg((a=>Ps(fg((i=>{const s=vg(i);if(!s||zs(s,t,n,r,!0))return;const{currentTime:g,volume:l,muted:A,playbackRate:C}=s;e({type:a,id:o.getId(s),currentTime:g,volume:l,muted:A,playbackRate:C})})),i.media||500))),g=[Ns("play",s(0),a),Ns("pause",s(1),a),Ns("seeked",s(2),a),Ns("volumechange",s(3),a),Ns("ratechange",s(4),a)];return fg((()=>{g.forEach((e=>e()))}))}(e),A=function({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:fg(((r,o,i)=>{const[a,s]=i,{id:g,styleId:l}=Tg(o,t,n.styleMirror);return(g&&-1!==g||l&&-1!==l)&&e({id:g,styleId:l,adds:[{rule:a,index:s}]}),r.apply(o,i)}))});const i=r.CSSStyleSheet.prototype.deleteRule;let a,s;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:fg(((r,o,i)=>{const[a]=i,{id:s,styleId:g}=Tg(o,t,n.styleMirror);return(s&&-1!==s||g&&-1!==g)&&e({id:s,styleId:g,removes:[{index:a}]}),r.apply(o,i)}))}),r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:fg(((r,o,i)=>{const[a]=i,{id:s,styleId:g}=Tg(o,t,n.styleMirror);return(s&&-1!==s||g&&-1!==g)&&e({id:s,styleId:g,replace:a}),r.apply(o,i)}))})),r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:fg(((r,o,i)=>{const[a]=i,{id:s,styleId:g}=Tg(o,t,n.styleMirror);return(s&&-1!==s||g&&-1!==g)&&e({id:s,styleId:g,replaceSync:a}),r.apply(o,i)}))}));const g={};Pg("CSSGroupingRule")?g.CSSGroupingRule=r.CSSGroupingRule:(Pg("CSSMediaRule")&&(g.CSSMediaRule=r.CSSMediaRule),Pg("CSSConditionRule")&&(g.CSSConditionRule=r.CSSConditionRule),Pg("CSSSupportsRule")&&(g.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(g).forEach((([r,o])=>{l[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(l[r].insertRule,{apply:fg(((r,o,i)=>{const[a,s]=i,{id:g,styleId:l}=Tg(o.parentStyleSheet,t,n.styleMirror);return(g&&-1!==g||l&&-1!==l)&&e({id:g,styleId:l,adds:[{rule:a,index:[...Sg(o),s||0]}]}),r.apply(o,i)}))}),o.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:fg(((r,o,i)=>{const[a]=i,{id:s,styleId:g}=Tg(o.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||g&&-1!==g)&&e({id:s,styleId:g,removes:[{index:[...Sg(o),a]}]}),r.apply(o,i)}))})})),fg((()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,a&&(r.CSSStyleSheet.prototype.replace=a),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(g).forEach((([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule}))}))}(e,{win:n}),C=Og(e,e.doc),c=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:fg(((o,a,s)=>{const[g,l,A]=s;if(n.has(g))return i.apply(a,[g,l,A]);const{id:C,styleId:c}=Tg(pg([a,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(C&&-1!==C||c&&-1!==c)&&e({id:C,styleId:c,set:{property:g,value:l,priority:A},index:Sg(a.parentRule)}),o.apply(a,s)}))});const a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:fg(((o,i,s)=>{const[g]=s;if(n.has(g))return a.apply(i,[g]);const{id:l,styleId:A}=Tg(pg([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&-1!==l||A&&-1!==A)&&e({id:l,styleId:A,remove:{property:g},index:Sg(i.parentRule)}),o.apply(i,s)}))}),fg((()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}))}(e,{win:n}),I=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,n){const r=new i(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const a=Ms(t.fonts,"add",(function(t){return function(n){return $s(fg((()=>{const t=o.get(n);t&&(e(t),o.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=i})),r.push(a),fg((()=>{r.forEach((e=>e()))}))}(e):()=>{},u=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:a}=e;let s=!0;const g=fg((()=>{const e=t.getSelection();if(!e||s&&pg([e,"optionalAccess",e=>e.isCollapsed]))return;s=e.isCollapsed||!1;const g=[],l=e.rangeCount||0;for(let t=0;t{};const r=Ms(n.customElements,"define",(function(e){return function(n,r,o){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,r,o])}}));return r}(e),h=[];for(const t of e.plugins)h.push(t.observer(t.callback,n,t.options));return fg((()=>{mg.forEach((e=>e.reset())),r.disconnect(),o(),i(),a(),s(),g(),l(),A(),C(),c(),I(),u(),d(),h.forEach((e=>e()))}))}function Rg(e){return void 0!==window[e]}function Pg(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Dg{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),i.set(a,t)),a}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function Mg(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}class _g{constructor(){this.crossOriginIframeMirror=new Dg(gs),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Lg{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Dg(gs),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Dg(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Mg([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case eg.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:eg.IncrementalSnapshot,data:{source:tg.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case eg.Meta:case eg.Load:case eg.DomContentLoaded:return!1;case eg.Plugin:return t;case eg.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case eg.IncrementalSnapshot:switch(t.data.source){case tg.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case tg.Drag:case tg.TouchMove:case tg.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case tg.ViewportResize:return!1;case tg.MediaInteraction:case tg.MouseInteraction:case tg.Scroll:case tg.CanvasMutation:case tg.Input:return this.replaceIds(t.data,e,["id"]),t;case tg.StyleSheetRule:case tg.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case tg.Font:return t;case tg.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case tg.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),Mg([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===Ya.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class jg{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Fg{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Qa(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=yg({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(wg({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),$s((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Og({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Ms(e.prototype,"attachShadow",(function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&Xs(this)&&n.addShadowRoot(this.shadowRoot,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Bg{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class zg{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Ys,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:qa(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Vg{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...e){Js("requestAnimationFrame")(...e)}((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let Ug,Zg;const Gg=new Ja;function Wg(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:a=null,ignoreClass:s="rr-ignore",ignoreSelector:g=null,maskAllText:l=!1,maskTextClass:A="rr-mask",unmaskTextClass:C=null,maskTextSelector:c=null,unmaskTextSelector:I=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:h,slimDOMOptions:f,maskAttributeFn:p,maskInputFn:m,maskTextFn:v,maxCanvasSize:y=null,packFn:b,sampling:w={},dataURLOptions:x={},mousemoveWait:E,recordCanvas:k=!1,recordCrossOriginIframes:S=!1,recordAfter:T=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:N=!1,inlineImages:R=!1,plugins:P,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:_,onMutation:L,getCanvasManager:j}=e;dg(_);const F=!S||window.parent===window;let B=!1;if(!F)try{window.parent.document&&(B=!1)}catch(e){B=!0}if(F&&!t)throw new Error("emit function is required");void 0!==E&&void 0===w.mousemove&&(w.mousemove=E),Gg.reset();const z=!0===d?{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}:void 0!==h?h:{},V=!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===f,headMetaDescKeywords:"all"===f}:f||{};let U;!function(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=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let Z=0;const G=e=>{for(const t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return b&&!B&&(e=b(e)),e};Ug=(e,o)=>{const i=e;if(i.timestamp=_s(),!La([mg,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])||i.type===eg.FullSnapshot||i.type===eg.IncrementalSnapshot&&i.data.source===tg.Mutation||mg.forEach((e=>e.unfreeze())),F)La([t,"optionalCall",e=>e(G(i),o)]);else if(B){const e={type:"rrweb",event:G(i),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(i.type===eg.FullSnapshot)U=i,Z=0;else if(i.type===eg.IncrementalSnapshot){if(i.data.source===tg.Mutation&&i.data.isAttachIframe)return;Z++;const e=r&&Z>=r,t=n&&U&&i.timestamp-U.timestamp>n;(e||t)&&$(!0)}};const W=e=>{Ug({type:eg.IncrementalSnapshot,data:{source:tg.Mutation,...e}})},H=e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.Scroll,...e}}),Y=e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.CanvasMutation,...e}}),K=new zg({mutationCb:W,adoptedStyleSheetCb:e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.AdoptedStyleSheet,...e}})}),Q="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new _g:new Lg({mirror:Gg,mutationCb:W,stylesheetManager:K,recordCrossOriginIframes:S,wrappedEmit:Ug});for(const e of P||[])e.getMirror&&e.getMirror({nodeMirror:Gg,crossOriginIframeMirror:Q.crossOriginIframeMirror,crossOriginIframeStyleMirror:Q.crossOriginIframeStyleMirror});const X=new Vg,q=function(e,t){try{return e?e(t):new Bg}catch(e){return new Bg}}(j,{mirror:Gg,win:window,mutationCb:e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.CanvasMutation,...e}}),recordCanvas:k,blockClass:o,blockSelector:i,unblockSelector:a,maxCanvasSize:y,sampling:w.canvas,dataURLOptions:x,errorHandler:_}),J="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new jg:new Fg({mutationCb:W,scrollCb:H,bypassOptions:{onMutation:L,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:l,maskTextClass:A,unmaskTextClass:C,maskTextSelector:c,unmaskTextSelector:I,inlineStylesheet:u,maskInputOptions:z,dataURLOptions:x,maskAttributeFn:p,maskTextFn:v,maskInputFn:m,recordCanvas:k,inlineImages:R,sampling:w,slimDOMOptions:V,iframeManager:Q,stylesheetManager:K,canvasManager:q,keepIframeSrcFn:D,processedNodeManager:X},mirror:Gg}),$=(e=!1)=>{Ug({type:eg.Meta,data:{href:window.location.href,width:Fs(),height:js()}},e),K.reset(),J.init(),mg.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new Ja,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:a=!1,maskTextClass:s="rr-mask",unmaskTextClass:g=null,maskTextSelector:l=null,unmaskTextSelector:A=null,inlineStylesheet:C=!0,inlineImages:c=!1,recordCanvas:I=!1,maskAllInputs:u=!1,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:v,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:k=()=>!1}=t||{};return Ts(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:s,unmaskTextClass:g,maskTextSelector:l,unmaskTextSelector:A,skipChild:!1,inlineStylesheet:C,maskInputOptions:!0===u?{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===u?{}:u,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:m,inlineImages:c,recordCanvas:I,preserveWhiteSpace:v,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:k,newlyAddedElement:!1})}(document,{mirror:Gg,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:l,maskTextClass:A,unmaskTextClass:C,maskTextSelector:c,unmaskTextSelector:I,inlineStylesheet:u,maskAllInputs:z,maskAttributeFn:p,maskInputFn:m,maskTextFn:v,slimDOM:V,dataURLOptions:x,recordCanvas:k,inlineImages:R,onSerialize:e=>{Gs(e,Gg)&&Q.addIframe(e),Ws(e,Gg)&&K.trackLinkElement(e),Hs(e)&&J.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Q.attachIframe(e,t),J.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{K.attachLinkElement(e,t)},keepIframeSrcFn:D});t&&(Ug({type:eg.FullSnapshot,data:{node:t,initialOffset:Ls(window)}}),mg.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,Gg.getId(document)))};Zg=$;try{const e=[],t=e=>fg(Ng)({onMutation:L,mutationCb:W,mousemoveCb:(e,t)=>Ug({type:eg.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.MouseInteraction,...e}}),scrollCb:H,viewportResizeCb:e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.ViewportResize,...e}}),inputCb:e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.Input,...e}}),mediaInteractionCb:e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.MediaInteraction,...e}}),styleSheetRuleCb:e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.StyleSheetRule,...e}}),styleDeclarationCb:e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.StyleDeclaration,...e}}),canvasMutationCb:Y,fontCb:e=>Ug({type:eg.IncrementalSnapshot,data:{source:tg.Font,...e}}),selectionCb:e=>{Ug({type:eg.IncrementalSnapshot,data:{source:tg.Selection,...e}})},customElementCb:e=>{Ug({type:eg.IncrementalSnapshot,data:{source:tg.CustomElement,...e}})},blockClass:o,ignoreClass:s,ignoreSelector:g,maskAllText:l,maskTextClass:A,unmaskTextClass:C,maskTextSelector:c,unmaskTextSelector:I,maskInputOptions:z,inlineStylesheet:u,sampling:w,recordCanvas:k,inlineImages:R,userTriggeredOnInput:O,collectFonts:N,doc:e,maskAttributeFn:p,maskInputFn:m,maskTextFn:v,keepIframeSrcFn:D,blockSelector:i,unblockSelector:a,slimDOMOptions:V,dataURLOptions:x,mirror:Gg,iframeManager:Q,stylesheetManager:K,shadowDomManager:J,processedNodeManager:X,canvasManager:q,ignoreCSSAttributes:M,plugins:La([P,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>Ug({type:eg.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});Q.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){}}));const n=()=>{$(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Ns("DOMContentLoaded",(()=>{Ug({type:eg.DomContentLoaded,data:{}}),"DOMContentLoaded"===T&&n()}))),e.push(Ns("load",(()=>{Ug({type:eg.Load,data:{}}),"load"===T&&n()}),window))),()=>{e.forEach((e=>e())),X.destroy(),Zg=void 0,hg()}}catch(e){}}Wg.mirror=Gg,Wg.takeFullSnapshot=function(e){if(!Zg)throw new Error("please take full snapshot after start recording");Zg(e)};function Hg(e){return e>9999999999?e:1e3*e}function Yg(e){return e>9999999999?e/1e3:e}function Kg(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:eg.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:ve(t,10,1e3)}}),"console"===t.category))))}function Qg(e){return e.closest("button,a")||e}function Xg(e){const t=qg(e);return t&&t instanceof Element?Qg(t):t}function qg(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let Jg;function $g(e){return Jg||(Jg=[],L(Ba,"open",(function(e){return function(...t){if(Jg)try{Jg.forEach((e=>e()))}catch(e){}return e.apply(Ba,t)}}))),Jg.push(e),()=>{const t=Jg?Jg.indexOf(e):-1;t>-1&&Jg.splice(t,1)}}class el{constructor(e,t,n=Kg){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=$g((()=>{this._lastMutation=nl()}));this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!tl.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:Yg(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Yg(e)}registerScroll(e=Date.now()){this._lastScroll=Yg(e)}registerClick(e){const t=Qg(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=nl();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:i,clickBreadcrumb:a}=e;if(o){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Ba.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this._addBreadcrumbEvent(t,o)}else if(i>1){const e={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Ba.location.href,route:t.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const tl=["A","BUTTON","INPUT"];function nl(){return Date.now()/1e3}function rl(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(n===tg.Mutation&&e.registerMutation(t.timestamp),n===tg.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===tg.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=Wg.mirror.getNode(r);o instanceof HTMLElement&&n===ng.Click&&e.registerClick(o)}}catch(e){}}function ol(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var il;!function(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"}(il||(il={}));const al=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function sl(e){const t={};for(const n in e)if(al.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}const gl=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?Xg(e.event):qg(e.event),n=T(r,{maxStringLength:200})||""}catch(e){n=""}return{target:r,message:n}}(e);return ol({category:`ui.${e.name}`,...ll(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;!(r&&e.clickDetector&&o&&o.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||function(e,t,n){e.handleClick(t,n)}(e.clickDetector,n,Xg(t.event)),Kg(e,n)};function ll(e,t){const n=Wg.mirror.getId(e),r=n&&Wg.mirror.getNode(n),o=r&&Wg.mirror.getMeta(r),i=o&&function(e){return e.type===il.Element}(o)?o:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map((e=>e.type===il.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:sl(i.attributes)}}:{}}}function Al(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:a}=e;if(!a||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(a)||!i)return null;const s=t||r||o,g=1===i.length;if(!s&&g)return null;const l=T(a,{maxStringLength:200})||"",A=ll(a,l);return ol({category:"ui.keyDown",message:l,data:{...A.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i}})}(t);n&&Kg(e,n)}const Cl={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:a,encodedBodySize:s,responseStatus:g,transferSize:l}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:Il(i),end:Il(o),name:r,data:{size:l,statusCode:g,decodedBodySize:a,encodedBodySize:s}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,i=Il(o);return{type:n,name:r,start:i,end:i+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:a,domContentLoadedEventStart:s,domContentLoadedEventEnd:g,domInteractive:l,loadEventStart:A,loadEventEnd:C,redirectCount:c,startTime:I,transferSize:u,type:d}=e;if(0===o)return null;return{type:`${t}.${d}`,start:Il(I),end:Il(i),name:n,data:{size:u,decodedBodySize:r,encodedBodySize:a,duration:o,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:g,loadEventStart:A,loadEventEnd:C,domComplete:i,redirectCount:c}}}};function cl(e){return Cl[e.entryType]?Cl[e.entryType](e):null}function Il(e){return((Ae||Ba.performance.timeOrigin)+e)/1e3}function ul(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(Ii(e,n))})),r.push(ci((({metric:t})=>{e.replayPerformanceEntries.push(function(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,o=e.value,i=Il(o);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:o,size:o,nodeId:r?Wg.mirror.getId(r):void 0}}}(t))}))),()=>{r.forEach((e=>e()))}}const dl="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function hl(e,t){dl&&(c.info(e),t&&pl(e))}function fl(e,t){dl&&(c.info(e),t&&setTimeout((()=>{pl(e)}),0))}function pl(e){Ge({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class ml extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class vl{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Ga)throw new ml;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?Hg(e):null}}class yl{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){hl("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,o)=>{const i=({data:t})=>{const a=t;if(a.method===e&&a.id===n){if(this._worker.removeEventListener("message",i),!a.success)return dl&&c.error("[Replay]",a.response),void o(new Error("Error in compression worker"));r(a.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class bl{constructor(e){this._worker=new yl(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=Hg(e.timestamp);(!this._earliestTimestamp||tGa?Promise.reject(new ml):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{dl&&c.warn('[Replay] Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class wl{constructor(e){this._fallback=new vl,this._compression=new bl(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void hl("[Replay] Failed to load the compression worker, falling back to simple buffer")}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t}=this._fallback,n=[];for(const t of e)n.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(n)}catch(e){dl&&c.warn("[Replay] Failed to add events when switching buffers.",e)}}}function xl({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const e=new Blob(['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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<>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,a=0,s=new n(r);a>h]=l}else for(o=new n(i),a=0;a>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(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},A=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},_=function(r,e){for(var i=[],a=0;ad&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<e))break;p+=m-(1<>=y;p>0;){var M=o[a].s;g[M]=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(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,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+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+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B255){A(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;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=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,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s>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(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),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(a[j+Q]==a[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,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 a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),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(a),32768),this.s.z=n.length-a+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}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.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)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}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}(),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(r){for(var e=new t(n.length),i=0;i>1)),o=0,f=function(t){s[o++]=t};for(i=0;is.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}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(let r=0,e=t.length;r{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});']);return URL.createObjectURL(e)}();return""}();if(!t)return;hl("[Replay] Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new wl(n)}catch(e){hl("[Replay] Failed to create compression worker")}}(t);if(e)return e}return hl("[Replay] Using simple buffer"),new vl}function El(){try{return"sessionStorage"in Ba&&!!Ba.sessionStorage}catch(e){return!1}}function kl(e){!function(){if(!El())return;try{Ba.sessionStorage.removeItem(za)}catch(e){}}(),e.session=void 0}function Sl(e){return void 0!==e&&Math.random()e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(hl(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1))}function Fl(e){return!e.type}function Bl(e){return"transaction"===e.type}function zl(e){return"feedback"===e.type}function Vl(e){const t=function(){const e=He();if(!e)return!1;const t=e.getTransport();if(!t)return!1;return t.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!e.isEnabled()||!Fl(n)&&!Bl(n))return;const o=r&&r.statusCode;t&&(!o||o<200||o>=300)||(Bl(n)?function(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,n):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);if("buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();if("function"==typeof r&&!r(t))return;setTimeout((()=>{e.sendBufferedReplayOrFlush()}))}(e,n))}}function Ul(e){return t=>{e.isEnabled()&&Fl(t)&&function(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;if("string"!=typeof n)return;if(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){Kg(e,ol({category:"replay.hydrate-error"}))}}(e,t)}}function Zl(e,t=!1){const n=t?Vl(e):void 0;return Object.assign(((t,r)=>{if(!e.isEnabled())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!Fl(t)&&!Bl(t)&&!zl(t))return t;if(!e.checkAndHandleExpiredSession())return t;if(zl(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:eg.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}(e,t),t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length||!t.originalException||!t.originalException.__rrweb__)}(t,r)&&!e.getOptions()._experiments.captureExceptions)return dl&&c.log("[Replay] Ignoring error from rrweb internals",t),null;const o=function(e,t){return"buffer"===e.recordingMode&&t.message!==Va&&!(!t.exception||t.type)&&Sl(e.getOptions().errorSampleRate)}(e,t);return(o||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&n(t,{statusCode:200}),t}),{id:"Replay"})}function Gl(e,t){return t.map((({type:t,start:n,end:r,name:o,data:i})=>{const a=e.throttledAddEvent({type:eg.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:o,startTimestamp:n,endTimestamp:r,data:i}}});return"string"==typeof a?Promise.resolve(null):a}))}function Wl(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(Gl(e,[n]),!1))))}}function Hl(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!dl||!e.getOptions()._experiments.traceInternals)&&ja(t,He())}(e,t.name)||e.addUpdate((()=>(Gl(e,[t]),!0))))}function Yl(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,xhr:r}=e,o=r[Zn];if(!t||!n||!o)return null;const{method:i,url:a,status_code:s}=o;return void 0===a?null:{type:"resource.xhr",name:a,start:t/1e3,end:n/1e3,data:{method:i,statusCode:s}}}(t);Hl(e,n)}}function Kl(e,t){if(e)try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=nA(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function Ql(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Xl(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[nA(e)];if(!e)return[void 0]}catch(t){return dl&&c.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return dl&&c.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function ql(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 Jl(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:a,request:s,response:g}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:Z({method:i,statusCode:a,request:s,response:g})}}function $l(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function eA(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:i}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>Ua,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,Ua);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(e){}return{body:e}}(n);return r.body=o,i&&i.length>0&&(r._meta={warnings:i}),r}function tA(e,t){return Object.keys(e).reduce(((n,r)=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=e[r]),n}),{})}function nA(e){return new URLSearchParams(e).toString()}function rA(e,t){const n=function(e,t=Ba.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Ba.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;if(!e.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(e);return _(n,t)}async function oA(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=t,{url:a,method:s,status_code:g=0,request_body_size:l,response_body_size:A}=e.data,C=rA(a,n.networkDetailAllowUrls)&&!rA(a,n.networkDetailDenyUrls),I=C?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?function(e,t){if(1===e.length&&"string"!=typeof e[0])return sA(e[0],t);if(2===e.length)return sA(e[1],t);return{}}(n,t):{};if(!e)return eA(o,r,void 0);const i=iA(n),[a,s]=Xl(i),g=eA(o,r,a);if(s)return ql(g,s);return g}(n,t.input,l):$l(l),u=await async function(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},o,i){if(!e&&void 0!==i)return $l(i);const a=o?aA(o.headers,r):{};if(!o||!t&&void 0!==i)return eA(a,i,void 0);const[s,g]=await async function(e){const t=function(e){try{return e.clone()}catch(e){dl&&c.warn("[Replay] Failed to clone response body",e)}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise(((t,n)=>{const r=setTimeout((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(e){return await e.text()})(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}(t);return[e]}catch(e){return dl&&c.warn("[Replay] Failed to get text body from response",e),[void 0,"BODY_PARSE_ERROR"]}}(o),l=function(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:o,headers:i}){try{const a=e&&e.length&&void 0===r?Kl(e,n):r;return o?eA(i,a,t?e:void 0):$l(a)}catch(e){return dl&&c.warn("[Replay] Failed to serialize response body",e),eA(i,r,void 0)}}(s,{networkCaptureBodies:t,textEncoder:n,responseBodySize:i,captureDetails:e,headers:a});if(g)return ql(l,g);return l}(C,n,t.response,A);return{startTimestamp:o,endTimestamp:i,url:a,method:s,statusCode:g,request:I,response:u}}(e,t,n),o=Jl("resource.fetch",r);Hl(n.replay,o)}catch(e){dl&&c.error("[Replay] Failed to capture fetch breadcrumb",e)}}function iA(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function aA(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function sA(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?aA(n,t):Array.isArray(n)?{}:tA(n,t):{}}async function gA(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:a,xhr:s}=t,{url:g,method:l,status_code:A=0,request_body_size:C,response_body_size:I}=e.data;if(!g)return null;if(!s||!rA(g,n.networkDetailAllowUrls)||rA(g,n.networkDetailDenyUrls)){return{startTimestamp:o,endTimestamp:i,url:g,method:l,statusCode:A,request:$l(C),response:$l(I)}}const u=s[Zn],d=u?tA(u.request_headers,n.networkRequestHeaders):{},h=tA(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return e[n.toLowerCase()]=r,e}),{})}(s),n.networkResponseHeaders),[f,p]=n.networkCaptureBodies?Xl(a):[void 0],[m,v]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return dl&&c.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return dl&&c.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return dl&&c.warn("[Replay] Failed to get xhr response body",...t),[void 0]}(s):[void 0],y=eA(d,C,f),b=eA(h,I,m);return{startTimestamp:o,endTimestamp:i,url:g,method:l,statusCode:A,request:p?ql(y,p):y,response:v?ql(b,v):b}}(e,t,n),o=Jl("resource.xhr",r);Hl(n.replay,o)}catch(e){dl&&c.error("[Replay] Failed to capture xhr breadcrumb",e)}}function lA(e,t,n){const{xhr:r,input:o}=t;if(!r)return;const i=Kl(o,n.textEncoder),a=r.getResponseHeader("content-length")?Ql(r.getResponseHeader("content-length")):function(e,t,n){try{return Kl("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e,n)}catch(e){return}}(r.response,r.responseType,n.textEncoder);void 0!==i&&(e.data.request_body_size=i),void 0!==a&&(e.data.response_body_size=a)}function AA(e){const t=He();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:s}=e.getOptions(),g={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:s};t&&t.on?t.on("beforeAddBreadcrumb",((e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return e&&e.xhr}(n)&&(lA(t,n,e),gA(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(!function(e,t,n){const{input:r,response:o}=t,i=Kl(r?iA(r):void 0,n.textEncoder),a=o?Ql(o.headers.get("content-length")):void 0;void 0!==i&&(e.data.request_body_size=i),void 0!==a&&(e.data.response_body_size=a)}(t,n,e),oA(t,n,e))}catch(e){dl&&c.warn("Error when enriching network breadcrumb")}}(g,e,t))):(Hn(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,fetchData:r,response:o}=e;if(!n)return null;const{method:i,url:a}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:a,data:{method:i,statusCode:o?o.status:void 0}}}(t);Hl(e,n)}}(e)),Gn(Yl(e)))}catch(e){}}let CA=null;const cA=e=>t=>{if(!e.isEnabled())return;const n=function(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();if(CA===t||!t)return null;if(CA=t,!function(e){return!!e.category}(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))return null;if("console"===t.category)return function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return ol(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>Za?(n=!0,`${e.slice(0,Za)}…`):e;if("object"==typeof e)try{const t=ve(e,7);return JSON.stringify(t).length>Za?(n=!0,`${JSON.stringify(t,null,2).slice(0,Za)}…`):t}catch(e){}return e}));return ol({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t);return ol(t)}(t);n&&Kg(e,n)};function IA(e){const t=Ye(),n=He();t.addScopeListener(cA(e)),Bn(gl(e)),Wt(Wl(e)),AA(e);const r=Zl(e,!uA(n));n&&n.addEventProcessor?n.addEventProcessor(r):function(e){const t=He();t&&t.addEventProcessor&&t.addEventProcessor(e)}(r),uA(n)&&(n.on("beforeSendEvent",Ul(e)),n.on("afterSendEvent",Vl(e)),n.on("createDsc",(t=>{const n=e.getSessionId();if(n&&e.isEnabled()&&"session"===e.recordingMode){e.checkAndHandleExpiredSession()&&(t.replay_id=n)}})),n.on("startTransaction",(t=>{e.lastTransaction=t})),n.on("finishTransaction",(t=>{e.lastTransaction=t})),n.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}function uA(e){return!(!e||!e.on)}function dA(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 hA(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(dl&&c.warn("[Replay] Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&rl(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!_l(e,n,o))return!0;if(!o)return!1;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;_l(e,function(e){const t=e.getOptions();return{type:eg.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&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),e.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){const t=e.eventBuffer.getEarliestTimestamp();t&&(hl(`[Replay] Updating session start time to earliest event in buffer to ${new Date(t)}`,e.getOptions()._experiments.traceInternals),e.session.started=t,e.getOptions().stickySession&&Ol(e.session))}return"session"===e.recordingMode&&e.flush(),!0}))}}async function fA({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:i}){const a=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:g,traceIds:l,initialTimestamp:A}=r,C=He(),c=Ye(),I=C&&C.getTransport(),u=C&&C.getDsn();if(!(C&&I&&u&&i.sampled))return;const d={type:"replay_event",replay_start_timestamp:A/1e3,timestamp:o/1e3,error_ids:g,trace_ids:l,urls:s,replay_id:t,segment_id:n,replay_type:i.sampled},h=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit&&e.emit("preprocessEvent",r,o);const i=await Fe(e.getOptions(),r,o,t,e,ut());if(!i)return null;i.platform=i.platform||"javascript";const a=e.getSdkMetadata&&e.getSdkMetadata(),{name:s,version:g}=a&&a.sdk||{};return i.sdk={...i.sdk,name:s||"sentry.javascript.unknown",version:g||"0.0.0"},i}({scope:c,client:C,replayId:t,event:d});if(!h)return C.recordDroppedEvent("event_processor","replay",d),void hl("An event processor returned `null`, will not send event.");delete h.sdkProcessingMetadata;const f=function(e,t,n,r){return qt(sn(e,an(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(h,a,u,C.getOptions().tunnel);let p;try{p=await I.send(f)}catch(e){const t=new Error(Va);try{t.cause=e}catch(e){}throw t}if(!p)return p;if("number"==typeof p.statusCode&&(p.statusCode<200||p.statusCode>=300))throw new pA(p.statusCode);const m=Kr({},p);if(Yr(m,"replay"))throw new mA(m);return p}class pA extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class mA extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function vA(e,t={count:0,interval:5e3}){const{recordingData:n,options:r}=e;var o,i;if(n.length)try{return await fA(e),!0}catch(n){if(n instanceof pA||n instanceof mA)throw n;if(o="Replays",i={_retryCount:t.count},It().setContext(o,i),dl&&r._experiments&&r._experiments.captureExceptions&&Ue(n),t.count>=3){const e=new Error(`${Va} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{setTimeout((async()=>{try{await vA(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const yA="__THROTTLED";function bA(e,t,n){const r=new Map;let o=!1;return(...i)=>{const a=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{ne+t),0)>=t){const e=o;return o=!0,e?"__SKIPPED":yA}o=!1;const s=r.get(a)||0;return r.set(a,s+1),e(...i)}}class wA{constructor({options:e,recordingOptions:t}){wA.prototype.__init.call(this),wA.prototype.__init2.call(this),wA.prototype.__init3.call(this),wA.prototype.__init4.call(this),wA.prototype.__init5.call(this),wA.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let r,o,i;const a=n&&n.maxWait?Math.max(n.maxWait,t):0;function s(){return g(),r=e(),r}function g(){void 0!==o&&clearTimeout(o),void 0!==i&&clearTimeout(i),o=i=void 0}function l(){return o&&clearTimeout(o),o=setTimeout(s,t),a&&void 0===i&&(i=setTimeout(s,a)),r}return l.cancel=g,l.flush=function(){return void 0!==o||void 0!==i?s():r},l}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=bA(((e,t)=>function(e,t,n){return jl(e,t)?Ll(e,t,n):Promise.resolve(null)}(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;o&&(this.clickDetector=new el(this,o))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options;t<=0&&n<=0||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",fl(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");fl("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const e=Ml({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");fl("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const e=Ml({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=Wg({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:hA(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{hl("[Replay] Stopping Replay"+(t?` triggered by ${t}`:""),this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,kl(this)}catch(e){this._handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),hl("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),hl("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();hl("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Rl(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Ba.location.pathname}${Ba.location.hash}${Ba.location.search}`,t=`${Ba.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===yA){const e=ol({category:"replay.throttled"});this.addUpdate((()=>!_l(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastTransaction||Ye().getTransaction(),t=(e&&Le(e).data||{})[io];if(e&&t&&["route","custom"].includes(t))return Le(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=xl({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){dl&&c.error("[Replay]",e),dl&&this._options._experiments&&this._options._experiments.captureExceptions&&Ue(e)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Ml({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!Dl(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Ba.document.addEventListener("visibilitychange",this._handleVisibilityChange),Ba.addEventListener("blur",this._handleWindowBlur),Ba.addEventListener("focus",this._handleWindowFocus),Ba.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(IA(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=ul(this)}_removeListeners(){try{Ba.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Ba.removeEventListener("blur",this._handleWindowBlur),Ba.removeEventListener("focus",this._handleWindowFocus),Ba.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===Ba.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=ol({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=ol({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Al(this,e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;Pl(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):hl("[Replay] Document has become active, but session has expired")}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:eg.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){const e=function(e){return e.map(cl).filter(Boolean)}(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Gl(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&nthis._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await vA({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(e){this._handleException(e),this.stop({reason:"sendReplay"});const t=He();t&&t.recordDroppedEvent("send_error","replay")}}else dl&&c.error("[Replay] No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(dl&&c.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=nthis._options.maxReplayDuration+5e3;if(r||o)return hl(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),void(r&&this._debouncedFlush());const i=this.eventBuffer;if(i&&0===this.session.segmentId&&!i.hasCheckout&&hl("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=void 0);try{await this._flushLock}catch(e){dl&&c.error(e)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Ol(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=ol({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function xA(e,t,n,r){const o=[...e,..."string"==typeof r?r.split(","):[],...t];return void 0!==n&&("string"==typeof n&&o.push(`.${n}`),C((()=>{}))),o.join(",")}const EA='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',kA=["content-length","content-type","accept"];let SA=!1;const TA=e=>new OA(e);class OA{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:i=!0,workerUrl:a,_experiments:s={},sessionSampleRate:g,errorSampleRate:l,maskAllText:A=!0,maskAllInputs:C=!0,blockAllMedia:c=!0,mutationBreadcrumbLimit:I=750,mutationLimit:u=1e4,slowClickTimeout:d=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:p=[],networkCaptureBodies:m=!0,networkRequestHeaders:v=[],networkResponseHeaders:y=[],mask:b=[],maskAttributes:w=["title","placeholder"],unmask:x=[],block:E=[],unblock:k=[],ignore:S=[],maskFn:T,beforeAddRecordingEvent:O,beforeErrorSampling:N,blockClass:R,blockSelector:P,maskInputOptions:D,maskTextClass:M,maskTextSelector:_,ignoreClass:L}={}){this.name=OA.id;const j=function({mask:e,unmask:t,block:n,unblock:r,ignore:o,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:g,ignoreClass:l}){const A={maskTextSelector:xA(e,[".sentry-mask","[data-sentry-mask]"],s,g),unmaskTextSelector:xA(t,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:xA(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],i,a),unblockSelector:xA(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:xA(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return i instanceof RegExp&&(A.blockClass=i),s instanceof RegExp&&(A.maskTextClass=s),A}({mask:b,unmask:x,block:E,unblock:k,ignore:S,blockClass:R,blockSelector:P,maskTextClass:M,maskTextSelector:_,ignoreClass:L});if(this._recordingOptions={maskAllInputs:C,maskAllText:A,maskInputOptions:{...D||{},password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){return r?o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?i:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i:i}({maskAttributes:w,maskAllText:A,privacyOptions:j,key:e,value:t,el:n}),...j,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,Wa),stickySession:o,sessionSampleRate:g,errorSampleRate:l,useCompression:i,workerUrl:a,blockAllMedia:c,maskAllInputs:C,maskAllText:A,mutationBreadcrumbLimit:I,mutationLimit:u,slowClickTimeout:d,slowClickIgnoreSelectors:h,networkDetailAllowUrls:f,networkDetailDenyUrls:p,networkCaptureBodies:m,networkRequestHeaders:NA(v),networkResponseHeaders:NA(y),beforeAddRecordingEvent:O,beforeErrorSampling:N,_experiments:s},"number"==typeof g&&(this._initialOptions.sessionSampleRate=g),"number"==typeof l&&(this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${EA}`:EA),this._isInitialized&&la())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return SA}set _isInitialized(e){SA=e}setupOnce(){la()&&(this._setup(),setTimeout((()=>this._initialize())))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const e=function(e){const t=He(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Z(e)};if(!n)return C((()=>{})),r;null==e.sessionSampleRate&&null==e.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&C((()=>{}));"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate);"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate);return r}(this._initialOptions);this._replay=new wA({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const e=He().getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch(e){}}}function NA(e){return[...kA,...e.map((e=>e.toLowerCase()))]}OA.__initStatic();function RA(){return RA=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zA(e,t,n,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=PA.Pop,g=null,l=A();function A(){return(a.state||{idx:null}).idx}function C(){s=PA.Pop;let e=A(),t=null==e?null:e-l;l=e,g&&g({action:s,location:I.location,delta:t})}function c(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"==typeof e?e:FA(e);return n=n.replace(/ $/,"%20"),MA(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==l&&(l=0,a.replaceState(RA({},a.state,{idx:l}),""));let I={get action(){return s},get location(){return e(o,a)},listen(e){if(g)throw new Error("A history only accepts one active listener");return o.addEventListener(DA,C),g=e,()=>{o.removeEventListener(DA,C),g=null}},createHref:e=>t(o,e),createURL:c,encodeLocation(e){let t=c(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=PA.Push;let r=jA(I.location,e,t);n&&n(r,e),l=A()+1;let C=LA(r,l),c=I.createHref(r);try{a.pushState(C,"",c)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(c)}i&&g&&g({action:s,location:I.location,delta:1})},replace:function(e,t){s=PA.Replace;let r=jA(I.location,e,t);n&&n(r,e),l=A();let o=LA(r,l),C=I.createHref(r);a.replaceState(o,"",C),i&&g&&g({action:s,location:I.location,delta:0})},go:e=>a.go(e)};return I}var VA;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(VA||(VA={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function UA(e,t,n){return void 0===n&&(n="/"),ZA(e,t,n,!1)}function ZA(e,t,n,r){let o=rC(("string"==typeof t?BA(t):t).pathname||"/",n);if(null==o)return null;let i=GA(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(MA(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=gC([r,a.relativePath]),g=n.concat(a);e.children&&e.children.length>0&&(MA(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),GA(e.children,t,g,s)),(null!=e.path||e.index)&&t.push({path:s,score:$A(s,e.index),routesMeta:g})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of WA(e.path))o(e,t,n);else o(e,t)})),t}function WA(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=WA(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const HA=/^:[\w-]+$/,YA=3,KA=2,QA=1,XA=10,qA=-2,JA=e=>"*"===e;function $A(e,t){let n=e.split("/"),r=n.length;return n.some(JA)&&(r+=qA),t&&(r+=KA),n.filter((e=>!JA(e))).reduce(((e,t)=>e+(HA.test(t)?YA:""===t?QA:XA)),r)}function eC(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1),g=r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const g=s[n];return e[r]=o&&!g?void 0:(g||"").replace(/%2F/g,"/"),e}),{});return{params:g,pathname:i,pathnameBase:a,pattern:e}}function nC(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return _A(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function rC(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function oC(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function iC(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function aC(e,t){let n=iC(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function sC(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=BA(e):(o=RA({},e),MA(!o.pathname||!o.pathname.includes("?"),oC("?","pathname","search",o)),MA(!o.pathname||!o.pathname.includes("#"),oC("#","pathname","hash",o)),MA(!o.search||!o.search.includes("#"),oC("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let g=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?BA(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:AC(r),hash:CC(o)}}(o,i),l=s&&"/"!==s&&s.endsWith("/"),A=(a||"."===s)&&n.endsWith("/");return g.pathname.endsWith("/")||!l&&!A||(g.pathname+="/"),g}const gC=e=>e.join("/").replace(/\/\/+/g,"/"),lC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),AC=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",CC=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function cC(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const IC=["post","put","patch","delete"],uC=(new Set(IC),["get",...IC]);new Set(uC),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function dC(){return dC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0}));let r=Ji.useCallback((function(r,o){void 0===o&&(o={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,dC({fromRouteId:t},o)))}),[e,t]);return r}():function(){bC()||MA(!1);let e=Ji.useContext(hC),{basename:t,future:n,navigator:r}=Ji.useContext(pC),{matches:o}=Ji.useContext(vC),{pathname:i}=wC(),a=JSON.stringify(aC(o,n.v7_relativeSplatPath)),s=Ji.useRef(!1);xC((()=>{s.current=!0}));let g=Ji.useCallback((function(n,o){if(void 0===o&&(o={}),!s.current)return;if("number"==typeof n)return void r.go(n);let g=sC(n,JSON.parse(a),i,"path"===o.relative);null==e&&"/"!==t&&(g.pathname="/"===g.pathname?t:gC([t,g.pathname])),(o.replace?r.replace:r.push)(g,o.state,o)}),[t,r,a,i,e]);return g}()}const kC=Ji.createContext(null);function SC(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=Ji.useContext(pC),{matches:o}=Ji.useContext(vC),{pathname:i}=wC(),a=JSON.stringify(aC(o,r.v7_relativeSplatPath));return Ji.useMemo((()=>sC(e,JSON.parse(a),i,"path"===n)),[e,a,i,n])}function TC(e,t,n,r){bC()||MA(!1);let{navigator:o}=Ji.useContext(pC),{matches:i}=Ji.useContext(vC),a=i[i.length-1],s=a?a.params:{},g=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let l,A=wC();if(t){var C;let e="string"==typeof t?BA(t):t;"/"===g||(null==(C=e.pathname)?void 0:C.startsWith(g))||MA(!1),l=e}else l=A;let c=l.pathname||"/",I=c;if("/"!==g){let e=g.replace(/^\//,"").split("/");I="/"+c.replace(/^\//,"").split("/").slice(e.length).join("/")}let u=UA(e,{pathname:I});let d=DC(u&&u.map((e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:gC([g,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?g:gC([g,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),i,n,r);return t&&d?Ji.createElement(mC.Provider,{value:{location:dC({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:PA.Pop}},d):d}function OC(){let e=function(){var e;let t=Ji.useContext(yC),n=jC(_C.UseRouteError),r=FC(_C.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=cC(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r};return Ji.createElement(Ji.Fragment,null,Ji.createElement("h2",null,"Unexpected Application Error!"),Ji.createElement("h3",{style:{fontStyle:"italic"}},t),n?Ji.createElement("pre",{style:o},n):null,null)}const NC=Ji.createElement(OC,null);class RC extends Ji.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){}render(){return void 0!==this.state.error?Ji.createElement(vC.Provider,{value:this.props.routeContext},Ji.createElement(yC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function PC(e){let{routeContext:t,match:n,children:r}=e,o=Ji.useContext(hC);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),Ji.createElement(vC.Provider,{value:t},r)}function DC(e,t,n,r){var o;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var i;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(i=r)&&i.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let a=e,s=null==(o=n)?void 0:o.errors;if(null!=s){let e=a.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||MA(!1),a=a.slice(0,Math.min(a.length,e+1))}let g=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e=0?a.slice(0,l+1):[a[0]];break}}}return a.reduceRight(((e,r,o)=>{let i,A=!1,C=null,c=null;var I;n&&(i=s&&r.route.id?s[r.route.id]:void 0,C=r.route.errorElement||NC,g&&(l<0&&0===o?(I="route-fallback",!1||BC[I]||(BC[I]=!0),A=!0,c=null):l===o&&(A=!0,c=r.route.hydrateFallbackElement||null)));let u=t.concat(a.slice(0,o+1)),d=()=>{let t;return t=i?C:A?c:r.route.Component?Ji.createElement(r.route.Component,null):r.route.element?r.route.element:e,Ji.createElement(PC,{match:r,routeContext:{outlet:e,matches:u,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?Ji.createElement(RC,{location:n.location,revalidation:n.revalidation,component:C,error:i,children:d(),routeContext:{outlet:null,matches:u,isDataRoute:!0}}):d()}),null)}var MC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(MC||{}),_C=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(_C||{});function LC(e){let t=Ji.useContext(hC);return t||MA(!1),t}function jC(e){let t=Ji.useContext(fC);return t||MA(!1),t}function FC(e){let t=function(){let e=Ji.useContext(vC);return e||MA(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||MA(!1),n.route.id}const BC={};const zC={};const VC=(e,t,n)=>{var r;zC[r="⚠️ React Router Future Flag Warning: "+t+". You can use the `"+e+"` future flag to opt-in early. For more information, see "+n+"."]||(zC[r]=!0)};function UC(e,t){null!=e&&e.v7_startTransition||VC("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),null!=e&&e.v7_relativeSplatPath||t&&t.v7_relativeSplatPath||VC("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist||VC("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod||VC("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration||VC("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation||VC("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}$i.startTransition;function ZC(e){return function(e){let t=Ji.useContext(vC).outlet;return t?Ji.createElement(kC.Provider,{value:e},t):t}(e.context)}function GC(e){MA(!1)}function WC(e){let{basename:t="/",children:n=null,location:r,navigationType:o=PA.Pop,navigator:i,static:a=!1,future:s}=e;bC()&&MA(!1);let g=t.replace(/^\/*/,"/"),l=Ji.useMemo((()=>({basename:g,navigator:i,static:a,future:dC({v7_relativeSplatPath:!1},s)})),[g,s,i,a]);"string"==typeof r&&(r=BA(r));let{pathname:A="/",search:C="",hash:c="",state:I=null,key:u="default"}=r,d=Ji.useMemo((()=>{let e=rC(A,g);return null==e?null:{location:{pathname:e,search:C,hash:c,state:I,key:u},navigationType:o}}),[g,A,C,c,I,u,o]);return null==d?null:Ji.createElement(pC.Provider,{value:l},Ji.createElement(mC.Provider,{children:n,value:d}))}function HC(e){let{children:t,location:n}=e;return TC(YC(t),n)}new Promise((()=>{}));Ji.Component;function YC(e,t){void 0===t&&(t=[]);let n=[];return Ji.Children.forEach(e,((e,r)=>{if(!Ji.isValidElement(e))return;let o=[...t,r];if(e.type===Ji.Fragment)return void n.push.apply(n,YC(e.props.children,o));e.type!==GC&&MA(!1),e.props.index&&e.props.children&&MA(!1);let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=YC(e.props.children,o)),n.push(i)})),n}!function(e){const t={...e};pn(t,"react"),to(t)}({dsn:"https://6fe214881fe5713445937c8f65357ee5@o4505458059116544.ingest.us.sentry.io/4507697059135488",integrations:[function(e){const t=Hi({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:o,createRoutesFromChildren:i,matchRoutes:a,stripBasename:s,instrumentPageLoad:g=!0,instrumentNavigation:l=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e);const A=On&&On.location&&On.location.pathname;g&&A&&Yi(e,{name:A,attributes:{[io]:"url",[so]:"pageload",[go]:"auto.pageload.react.reactrouter_v6"}}),ea=n,ta=r,na=o,oa=a,ra=i,sa=s||!1,ia=t=>{Ki(e,t)},aa=l}}}({createRoutesFromChildren:YC,matchRoutes:UA,useEffect:Ji.useEffect,useLocation:wC,useNavigationType:function(){return Ji.useContext(mC).navigationType}}),(e=>new _a(e))({colorScheme:"system",isEmailRequired:!0,isNameRequired:!0}),TA()],profilesSampleRate:1,replaysOnErrorSampleRate:1,replaysSessionSampleRate:.1,tracePropagationTargets:[/^https:\/\/bom-squad\.com\/api/],tracesSampleRate:1});n(1323);var KC=n(115),QC=n.n(KC),XC=n(311),qC=n.n(XC),JC=n(2833),$C=n.n(JC),ec=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(ec||{}),tc={rel:["amphtml","canonical","alternate"]},nc={type:["application/ld+json"]},rc={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},oc=Object.values(ec),ic={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},ac=Object.entries(ic).reduce(((e,[t,n])=>(e[n]=t,e)),{}),sc="data-rh",gc="defaultTitle",lc="defer",Ac="encodeSpecialCharacters",Cc="onChangeClientState",cc="titleTemplate",Ic="prioritizeSeoTags",uc=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},dc=e=>{let t=uc(e,"title");const n=uc(e,cc);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,(()=>t));const r=uc(e,gc);return t||r||void 0},hc=e=>uc(e,Cc)||(()=>{}),fc=(e,t)=>t.filter((t=>void 0!==t[e])).map((t=>t[e])).reduce(((e,t)=>({...e,...t})),{}),pc=(e,t)=>t.filter((e=>void 0!==e.base)).map((e=>e.base)).reverse().reduce(((t,n)=>{if(!t.length){const r=Object.keys(n);for(let o=0;o{const r={};return n.filter((t=>!!Array.isArray(t[e])||(void 0!==t[e]&&(t[e],console&&console.warn),!1))).map((t=>t[e])).reverse().reduce(((e,n)=>{const o={};n.filter((e=>{let n;const i=Object.keys(e);for(let r=0;re.push(t)));const i=Object.keys(o);for(let e=0;e{if(Array.isArray(e)&&e.length)for(let n=0;nArray.isArray(e)?e.join(""):e,bc=(e,t)=>Array.isArray(e)?e.reduce(((e,n)=>(((e,t)=>{const n=Object.keys(e);for(let r=0;r({...e,[t]:void 0}),xc=["noscript","script","style"],Ec=(e,t=!0)=>!1===t?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),kc=e=>Object.keys(e).reduce(((t,n)=>{const r=void 0!==e[n]?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r}),""),Sc=(e,t={})=>Object.keys(e).reduce(((t,n)=>(t[ic[n]||n]=e[n],t)),t),Tc=(e,t)=>t.map(((t,n)=>{const r={key:n,[sc]:!0};return Object.keys(t).forEach((e=>{const n=ic[e]||e;if("innerHTML"===n||"cssText"===n){const e=t.innerHTML||t.cssText;r.dangerouslySetInnerHTML={__html:e}}else r[n]=t[e]})),Ji.createElement(e,r)})),Oc=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>((e,t,n)=>{const r=Sc(n,{key:t,[sc]:!0});return[Ji.createElement("title",r,t)]})(0,t.title,t.titleAttributes),toString:()=>((e,t,n,r)=>{const o=kc(n),i=yc(t);return o?`<${e} ${sc}="true" ${o}>${Ec(i,r)}`:`<${e} ${sc}="true">${Ec(i,r)}`})(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Sc(t),toString:()=>kc(t)};default:return{toComponent:()=>Tc(e,t),toString:()=>((e,t,n=!0)=>t.reduce(((t,r)=>{const o=r,i=Object.keys(o).filter((e=>!("innerHTML"===e||"cssText"===e))).reduce(((e,t)=>{const r=void 0===o[t]?t:`${t}="${Ec(o[t],n)}"`;return e?`${e} ${r}`:r}),""),a=o.innerHTML||o.cssText||"",s=-1===xc.indexOf(e);return`${t}<${e} ${sc}="true" ${i}${s?"/>":`>${a}`}`}),""))(e,t,n)}}},Nc=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:o,noscriptTags:i,styleTags:a,title:s="",titleAttributes:g,prioritizeSeoTags:l}=e;let{linkTags:A,metaTags:C,scriptTags:c}=e,I={toComponent:()=>{},toString:()=>""};return l&&({priorityMethods:I,linkTags:A,metaTags:C,scriptTags:c}=(({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const o=bc(e,rc),i=bc(t,tc),a=bc(n,nc);return{priorityMethods:{toComponent:()=>[...Tc("meta",o.priority),...Tc("link",i.priority),...Tc("script",a.priority)],toString:()=>`${Oc("meta",o.priority,r)} ${Oc("link",i.priority,r)} ${Oc("script",a.priority,r)}`},metaTags:o.default,linkTags:i.default,scriptTags:a.default}})(e)),{priority:I,base:Oc("base",t,r),bodyAttributes:Oc("bodyAttributes",n,r),htmlAttributes:Oc("htmlAttributes",o,r),link:Oc("link",A,r),meta:Oc("meta",C,r),noscript:Oc("noscript",i,r),script:Oc("script",c,r),style:Oc("style",a,r),title:Oc("title",{title:s,titleAttributes:g},r)}},Rc=[],Pc=!("undefined"==typeof window||!window.document||!window.document.createElement),Dc=class{instances=[];canUseDOM=Pc;context;value={setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Rc:this.instances,add:e=>{(this.canUseDOM?Rc:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Rc:this.instances).indexOf(e);(this.canUseDOM?Rc:this.instances).splice(t,1)}}};constructor(e,t){this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Nc({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Mc=Ji.createContext({}),_c=class e extends Ji.Component{static canUseDOM=Pc;helmetData;constructor(t){super(t),this.helmetData=new Dc(this.props.context||{},e.canUseDOM)}render(){return Ji.createElement(Mc.Provider,{value:this.helmetData.value},this.props.children)}},Lc=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${sc}]`),o=[].slice.call(r),i=[];let a;return t&&t.length&&t.forEach((t=>{const n=document.createElement(e);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))if("innerHTML"===e)n.innerHTML=t.innerHTML;else if("cssText"===e)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{const r=e,o=void 0===t[r]?"":t[r];n.setAttribute(e,o)}n.setAttribute(sc,"true"),o.some(((e,t)=>(a=t,n.isEqualNode(e))))?o.splice(a,1):i.push(n)})),o.forEach((e=>e.parentNode?.removeChild(e))),i.forEach((e=>n.appendChild(e))),{oldTags:o,newTags:i}},jc=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(sc),o=r?r.split(","):[],i=[...o],a=Object.keys(t);for(const e of a){const r=t[e]||"";n.getAttribute(e)!==r&&n.setAttribute(e,r),-1===o.indexOf(e)&&o.push(e);const a=i.indexOf(e);-1!==a&&i.splice(a,1)}for(let e=i.length-1;e>=0;e-=1)n.removeAttribute(i[e]);o.length===i.length?n.removeAttribute(sc):n.getAttribute(sc)!==a.join(",")&&n.setAttribute(sc,a.join(","))},Fc=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:o,linkTags:i,metaTags:a,noscriptTags:s,onChangeClientState:g,scriptTags:l,styleTags:A,title:C,titleAttributes:c}=e;jc("body",r),jc("html",o),((e,t)=>{void 0!==e&&document.title!==e&&(document.title=yc(e)),jc("title",t)})(C,c);const I={baseTag:Lc("base",n),linkTags:Lc("link",i),metaTags:Lc("meta",a),noscriptTags:Lc("noscript",s),scriptTags:Lc("script",l),styleTags:Lc("style",A)},u={},d={};Object.keys(I).forEach((e=>{const{newTags:t,oldTags:n}=I[e];t.length&&(u[e]=t),n.length&&(d[e]=I[e].oldTags)})),t&&t(),g(e,u,d)},Bc=null,zc=e=>{Bc&&cancelAnimationFrame(Bc),e.defer?Bc=requestAnimationFrame((()=>{Fc(e,(()=>{Bc=null}))})):(Fc(e),Bc=null)},Vc=class extends Ji.Component{rendered=!1;shouldComponentUpdate(e){return!$C()(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:t}=this.props.context;let n=null;const r=(o=e.get().map((e=>{const t={...e.props};return delete t.context,t})),{baseTag:pc(["href"],o),bodyAttributes:fc("bodyAttributes",o),defer:uc(o,lc),encode:uc(o,Ac),htmlAttributes:fc("htmlAttributes",o),linkTags:mc("link",["rel","href"],o),metaTags:mc("meta",["name","charset","http-equiv","property","itemprop"],o),noscriptTags:mc("noscript",["innerHTML"],o),onChangeClientState:hc(o),scriptTags:mc("script",["src","innerHTML"],o),styleTags:mc("style",["cssText"],o),title:dc(o),titleAttributes:fc("titleAttributes",o),prioritizeSeoTags:vc(o,Ic)});var o;_c.canUseDOM?zc(r):Nc&&(n=Nc(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Uc=class extends Ji.Component{static defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1};shouldComponentUpdate(e){return!QC()(wc(this.props,"helmetData"),wc(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach((t=>{n={...n,[t]:e[t]}})),n}warnOnInvalidChildren(e,t){return qC()(oc.some((t=>e.type===t)),"function"==typeof e.type?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${oc.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),qC()(!t||"string"==typeof t||Array.isArray(t)&&!t.some((e=>"string"!=typeof e)),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`} ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return Ji.Children.forEach(e,(e=>{if(!e||!e.props)return;const{children:r,...o}=e.props,i=Object.keys(o).reduce(((e,t)=>(e[ac[t]||t]=o[t],e)),{});let{type:a}=e;switch("symbol"==typeof a?a=a.toString():this.warnOnInvalidChildren(e,r),a){case"Symbol(react.fragment)":t=this.mapChildrenToProps(r,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(e,n,i,r);break;default:t=this.mapObjectTypeChildren(e,t,i,r)}})),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Dc)){r=new Dc(r.context,!0),delete n.helmetData}return r?Ji.createElement(Vc,{...n,context:r.value}):Ji.createElement(Mc.Consumer,null,(e=>Ji.createElement(Vc,{...n,context:e})))}},Zc="undefined"==typeof window||"Deno"in globalThis;function Gc(){}function Wc(e){return"number"==typeof e&&e>=0&&e!==1/0}function Hc(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yc(e,t){return"function"==typeof e?e(t):e}function Kc(e,t){return"function"==typeof e?e(t):e}function Qc(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a)if(r){if(t.queryHash!==qc(a,t.options))return!1}else if(!$c(t.queryKey,a))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!o||o===t.state.fetchStatus)&&!(i&&!i(t)))}function Xc(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Jc(t.options.mutationKey)!==Jc(i))return!1}else if(!$c(t.options.mutationKey,i))return!1}return(!r||t.state.status===r)&&!(o&&!o(t))}function qc(e,t){return((null==t?void 0:t.queryKeyHashFn)||Jc)(e)}function Jc(e){return JSON.stringify(e,((e,t)=>rI(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function $c(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!$c(e[n],t[n]))))}function eI(e,t){if(e===t)return e;const n=nI(e)&&nI(t);if(n||rI(e)&&rI(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let g=0;for(let o=0;o2&&void 0!==arguments[2]?arguments[2]:0;const r=[...e,t];return n&&r.length>n?r.slice(1):r}function sI(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var gI=Symbol();function lI(e,t){return!e.queryFn&&null!=t&&t.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==gI?e.queryFn:()=>Promise.reject(new Error("Missing queryFn: '".concat(e.queryHash,"'")))}var AI,CI,cI,II=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},o=e=>setTimeout(e,0);const i=r=>{t?e.push(r):o((()=>{n(r)}))};return{batch:i=>{let a;t++;try{a=i()}finally{t--,t||(()=>{const t=e;e=[],t.length&&o((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))})()}return a},batchCalls:e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r{e(...n)}))},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{o=e}}}(),uI=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};function dI(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function hI(e,t){return e.get(pI(e,t))}function fI(e,t,n){return e.set(pI(e,t),n),n}function pI(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var mI,vI,yI,bI=new(AI=new WeakMap,CI=new WeakMap,cI=new WeakMap,class extends uI{constructor(){super(),dI(this,AI,void 0),dI(this,CI,void 0),dI(this,cI,void 0),fI(cI,this,(e=>{if(!Zc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}))}onSubscribe(){hI(CI,this)||this.setEventListener(hI(cI,this))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=hI(CI,this))||void 0===e||e.call(this),fI(CI,this,void 0))}setEventListener(e){var t;fI(cI,this,e),null===(t=hI(CI,this))||void 0===t||t.call(this),fI(CI,this,e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})))}setFocused(e){hI(AI,this)!==e&&(fI(AI,this,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){var e;return"boolean"==typeof hI(AI,this)?hI(AI,this):"hidden"!==(null===(e=globalThis.document)||void 0===e?void 0:e.visibilityState)}});function wI(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function xI(e,t){return e.get(kI(e,t))}function EI(e,t,n){return e.set(kI(e,t),n),n}function kI(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var SI=new(mI=new WeakMap,vI=new WeakMap,yI=new WeakMap,class extends uI{constructor(){super(),wI(this,mI,!0),wI(this,vI,void 0),wI(this,yI,void 0),EI(yI,this,(e=>{if(!Zc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}))}onSubscribe(){xI(vI,this)||this.setEventListener(xI(yI,this))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=xI(vI,this))||void 0===e||e.call(this),EI(vI,this,void 0))}setEventListener(e){var t;EI(yI,this,e),null===(t=xI(vI,this))||void 0===t||t.call(this),EI(vI,this,e(this.setOnline.bind(this)))}setOnline(e){xI(mI,this)!==e&&(EI(mI,this,e),this.listeners.forEach((t=>{t(e)})))}isOnline(){return xI(mI,this)}});function TI(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch((()=>{})),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}function OI(e){return Math.min(1e3*2**e,3e4)}function NI(e){return"online"!==(null!=e?e:"online")||SI.isOnline()}var RI,PI=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function DI(e){return e instanceof PI}function MI(e){let t,n=!1,r=0,o=!1;const i=TI(),a=()=>bI.isFocused()&&("always"===e.networkMode||SI.isOnline())&&e.canRun(),s=()=>NI(e.networkMode)&&e.canRun(),g=n=>{var r,a;o||(o=!0,null===(r=e.onSuccess)||void 0===r||r.call(e,n),null===(a=t)||void 0===a||a(),i.resolve(n))},l=n=>{var r,a;o||(o=!0,null===(r=e.onError)||void 0===r||r.call(e,n),null===(a=t)||void 0===a||a(),i.reject(n))},A=()=>new Promise((n=>{var r;t=e=>{(o||a())&&n(e)},null===(r=e.onPause)||void 0===r||r.call(e)})).then((()=>{var n;(t=void 0,o)||(null===(n=e.onContinue)||void 0===n||n.call(e))})),C=()=>{if(o)return;let t;const i=0===r?e.initialPromise:void 0;try{t=null!=i?i:e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(g).catch((t=>{var i,s,g;if(o)return;const c=null!==(i=e.retry)&&void 0!==i?i:Zc?0:3,I=null!==(s=e.retryDelay)&&void 0!==s?s:OI,u="function"==typeof I?I(r,t):I,d=!0===c||"number"==typeof c&&r{setTimeout(e,h)}))).then((()=>a()?void 0:A())).then((()=>{n?l(t):C()}))):l(t)}))};return{promise:i,cancel:t=>{var n;o||(l(new PI(t)),null===(n=e.abort)||void 0===n||n.call(e))},continue:()=>{var e;return null===(e=t)||void 0===e||e(),i},cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:s,start:()=>(s()?C():A().then(C),i)}}function _I(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function LI(e,t){return e.get(FI(e,t))}function jI(e,t,n){return e.set(FI(e,t),n),n}function FI(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var BI,zI,VI,UI,ZI,GI,WI,HI=(RI=new WeakMap,class{constructor(){_I(this,RI,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wc(this.gcTime)&&jI(RI,this,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,null!=e?e:Zc?1/0:3e5)}clearGcTimeout(){LI(RI,this)&&(clearTimeout(LI(RI,this)),jI(RI,this,void 0))}});function YI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KI(e){for(var t=1;t!1!==Kc(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===gI||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.state.isInvalidated||void 0===this.state.data||!Hc(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));null==t||t.refetch({cancelRefetch:!1}),null===(e=JI(UI,this))||void 0===e||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));null==t||t.refetch({cancelRefetch:!1}),null===(e=JI(UI,this))||void 0===e||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),JI(VI,this).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(JI(UI,this)&&(JI(GI,this)?JI(UI,this).cancel({revert:!0}):JI(UI,this).cancelRetry()),this.scheduleGc()),JI(VI,this).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||eu(WI,this,ru).call(this,{type:"invalidate"})}fetch(e,t){var n,r;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(JI(UI,this))return JI(UI,this).continueRetry(),JI(UI,this).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const o=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>($I(GI,this,!0),o.signal)})},a={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=lI(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return i(n),$I(GI,this,!1),this.options.persister?this.options.persister(e,n,this):e(n)}};var s;(i(a),null===(n=this.options.behavior)||void 0===n||n.onFetch(a,this),$I(zI,this,this.state),"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null===(r=a.fetchOptions)||void 0===r?void 0:r.meta))&&eu(WI,this,ru).call(this,{type:"fetch",meta:null===(s=a.fetchOptions)||void 0===s?void 0:s.meta});const g=e=>{var t,n,r,o;(DI(e)&&e.silent||eu(WI,this,ru).call(this,{type:"error",error:e}),DI(e))||(null===(t=(n=JI(VI,this).config).onError)||void 0===t||t.call(n,e,this),null===(r=(o=JI(VI,this).config).onSettled)||void 0===r||r.call(o,this.state.data,e,this));this.scheduleGc()};return $I(UI,this,MI({initialPromise:null==t?void 0:t.initialPromise,fn:a.fetchFn,abort:o.abort.bind(o),onSuccess:e=>{var t,n,r,o;if(void 0!==e){try{this.setData(e)}catch(e){return void g(e)}null===(t=(n=JI(VI,this).config).onSuccess)||void 0===t||t.call(n,e,this),null===(r=(o=JI(VI,this).config).onSettled)||void 0===r||r.call(o,e,this.state.error,this),this.scheduleGc()}else g(new Error("".concat(this.queryHash," data is undefined")))},onError:g,onFail:(e,t)=>{eu(WI,this,ru).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{eu(WI,this,ru).call(this,{type:"pause"})},onContinue:()=>{eu(WI,this,ru).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),JI(UI,this).start()}});function ru(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return KI(KI({},t),{},{fetchFailureCount:e.failureCount,fetchFailureReason:e.error});case"pause":return KI(KI({},t),{},{fetchStatus:"paused"});case"continue":return KI(KI({},t),{},{fetchStatus:"fetching"});case"fetch":return KI(KI(KI({},t),ou(t.data,this.options)),{},{fetchMeta:null!==(n=e.meta)&&void 0!==n?n:null});case"success":return KI(KI({},t),{},{data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!==(r=e.dataUpdatedAt)&&void 0!==r?r:Date.now(),error:null,isInvalidated:!1,status:"success"},!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const o=e.error;return DI(o)&&o.revert&&JI(zI,this)?KI(KI({},JI(zI,this)),{},{fetchStatus:"idle"}):KI(KI({},t),{},{error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"});case"invalidate":return KI(KI({},t),{},{isInvalidated:!0});case"setState":return KI(KI({},t),e.state)}})(this.state),II.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),JI(VI,this).notify({query:this,type:"updated",action:e})}))}function ou(e,t){return KI({fetchFailureCount:0,fetchFailureReason:null,fetchStatus:NI(t.networkMode)?"fetching":"paused"},void 0===e&&{error:null,status:"pending"})}function iu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function au(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function su(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function gu(e,t){return e.get(lu(e,t))}function lu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Au,Cu,cu,Iu,uu=(tu=new WeakMap,class extends uI{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),su(this,tu,void 0),this.config=e,function(e,t,n){e.set(lu(e,t),n)}(tu,this,new Map)}build(e,t,n){var r;const o=t.queryKey,i=null!==(r=t.queryHash)&&void 0!==r?r:qc(o,t);let a=this.get(i);return a||(a=new nu({cache:this,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(a)),a}add(e){gu(tu,this).has(e.queryHash)||(gu(tu,this).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=gu(tu,this).get(e.queryHash);t&&(e.destroy(),t===e&&gu(tu,this).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){II.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return gu(tu,this).get(e)}getAll(){return[...gu(tu,this).values()]}find(e){const t=function(e){for(var t=1;tQc(t,e)))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>Qc(e,t))):t}notify(e){II.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){II.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){II.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}});function du(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hu(e){for(var t=1;tt!==e))),this.scheduleGc(),vu(Cu,this).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){vu(Au,this).length||("pending"===this.state.status?this.scheduleGc():vu(Cu,this).remove(this))}continue(){var e,t;return null!==(e=null===(t=vu(cu,this))||void 0===t?void 0:t.continue())&&void 0!==e?e:this.execute(this.state.variables)}async execute(e){var t;yu(cu,this,MI({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{bu(Iu,this,ku).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{bu(Iu,this,ku).call(this,{type:"pause"})},onContinue:()=>{bu(Iu,this,ku).call(this,{type:"continue"})},retry:null!==(t=this.options.retry)&&void 0!==t?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>vu(Cu,this).canRun(this)}));const n="pending"===this.state.status,r=!vu(cu,this).canStart();try{var o,i,a,s,g,l,A,C;if(!n){var c,I,u,d;bu(Iu,this,ku).call(this,{type:"pending",variables:e,isPaused:r}),await(null===(c=(I=vu(Cu,this).config).onMutate)||void 0===c?void 0:c.call(I,e,this));const t=await(null===(u=(d=this.options).onMutate)||void 0===u?void 0:u.call(d,e));t!==this.state.context&&bu(Iu,this,ku).call(this,{type:"pending",context:t,variables:e,isPaused:r})}const t=await vu(cu,this).start();return await(null===(o=(i=vu(Cu,this).config).onSuccess)||void 0===o?void 0:o.call(i,t,e,this.state.context,this)),await(null===(a=(s=this.options).onSuccess)||void 0===a?void 0:a.call(s,t,e,this.state.context)),await(null===(g=(l=vu(Cu,this).config).onSettled)||void 0===g?void 0:g.call(l,t,null,this.state.variables,this.state.context,this)),await(null===(A=(C=this.options).onSettled)||void 0===A?void 0:A.call(C,t,null,e,this.state.context)),bu(Iu,this,ku).call(this,{type:"success",data:t}),t}catch(t){try{var h,f,p,m,v,y,b,w;throw await(null===(h=(f=vu(Cu,this).config).onError)||void 0===h?void 0:h.call(f,t,e,this.state.context,this)),await(null===(p=(m=this.options).onError)||void 0===p?void 0:p.call(m,t,e,this.state.context)),await(null===(v=(y=vu(Cu,this).config).onSettled)||void 0===v?void 0:v.call(y,void 0,t,this.state.variables,this.state.context,this)),await(null===(b=(w=this.options).onSettled)||void 0===b?void 0:b.call(w,void 0,t,e,this.state.context)),t}finally{bu(Iu,this,ku).call(this,{type:"error",error:t})}}finally{vu(Cu,this).runNext(this)}}});function ku(e){this.state=(t=>{switch(e.type){case"failed":return hu(hu({},t),{},{failureCount:e.failureCount,failureReason:e.error});case"pause":return hu(hu({},t),{},{isPaused:!0});case"continue":return hu(hu({},t),{},{isPaused:!1});case"pending":return hu(hu({},t),{},{context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()});case"success":return hu(hu({},t),{},{data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return hu(hu({},t),{},{data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"})}})(this.state),II.batch((()=>{vu(Au,this).forEach((t=>{t.onMutationUpdate(e)})),vu(Cu,this).notify({mutation:this,type:"updated",action:e})}))}function Su(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tu(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ou(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Nu(e,t){return e.get(Pu(e,t))}function Ru(e,t,n){return e.set(Pu(e,t),n),n}function Pu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Du,Mu,_u,Lu,ju,Fu,Bu,zu,Vu=(wu=new WeakMap,xu=new WeakMap,class extends uI{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),Ou(this,wu,void 0),Ou(this,xu,void 0),this.config=e,Ru(wu,this,new Map),Ru(xu,this,Date.now())}build(e,t,n){var r;const o=new Eu({mutationCache:this,mutationId:Ru(xu,this,(r=Nu(xu,this),++r)),options:e.defaultMutationOptions(t),state:n});return this.add(o),o}add(e){var t;const n=Uu(e),r=null!==(t=Nu(wu,this).get(n))&&void 0!==t?t:[];r.push(e),Nu(wu,this).set(n,r),this.notify({type:"added",mutation:e})}remove(e){const t=Uu(e);if(Nu(wu,this).has(t)){var n;const r=null===(n=Nu(wu,this).get(t))||void 0===n?void 0:n.filter((t=>t!==e));r&&(0===r.length?Nu(wu,this).delete(t):Nu(wu,this).set(t,r))}this.notify({type:"removed",mutation:e})}canRun(e){var t;const n=null===(t=Nu(wu,this).get(Uu(e)))||void 0===t?void 0:t.find((e=>"pending"===e.state.status));return!n||n===e}runNext(e){var t,n;const r=null===(t=Nu(wu,this).get(Uu(e)))||void 0===t?void 0:t.find((t=>t!==e&&t.state.isPaused));return null!==(n=null==r?void 0:r.continue())&&void 0!==n?n:Promise.resolve()}clear(){II.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...Nu(wu,this).values()].flat()}find(e){const t=function(e){for(var t=1;tXc(t,e)))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getAll().filter((t=>Xc(e,t)))}notify(e){II.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return II.batch((()=>Promise.all(e.map((e=>e.continue().catch(Gc))))))}});function Uu(e){var t,n;return null!==(t=null===(n=e.options.scope)||void 0===n?void 0:n.id)&&void 0!==t?t:String(e.mutationId)}function Zu(e){return{onFetch:(t,n)=>{var r,o,i,a,s;const g=t.options,l=null===(r=t.fetchOptions)||void 0===r||null===(o=r.meta)||void 0===o||null===(i=o.fetchMore)||void 0===i?void 0:i.direction,A=(null===(a=t.state.data)||void 0===a?void 0:a.pages)||[],C=(null===(s=t.state.data)||void 0===s?void 0:s.pageParams)||[];let c={pages:[],pageParams:[]},I=0;const u=async()=>{let n=!1;const r=lI(t.options,t.fetchOptions),o=async(e,o,i)=>{if(n)return Promise.reject();if(null==o&&e.pages.length)return Promise.resolve(e);const a={queryKey:t.queryKey,pageParam:o,direction:i?"backward":"forward",meta:t.options.meta};(e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",(()=>{n=!0})),t.signal)})})(a);const s=await r(a),{maxPages:g}=t.options,l=i?sI:aI;return{pages:l(e.pages,s,g),pageParams:l(e.pageParams,o,g)}};if(l&&A.length){const e="backward"===l,t={pages:A,pageParams:C},n=(e?Wu:Gu)(g,t);c=await o(t,n,e)}else{const t=null!=e?e:A.length;do{var i;const e=0===I?null!==(i=C[0])&&void 0!==i?i:g.initialPageParam:Gu(g,c);if(I>0&&null==e)break;c=await o(c,e),I++}while(I{var e,r;return null===(e=(r=t.options).persister)||void 0===e?void 0:e.call(r,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Gu(e,t){let{pages:n,pageParams:r}=t;const o=n.length-1;return n.length>0?e.getNextPageParam(n[o],n,r[o],r):void 0}function Wu(e,t){var n;let{pages:r,pageParams:o}=t;return r.length>0?null===(n=e.getPreviousPageParam)||void 0===n?void 0:n.call(e,r[0],r,o[0],o):void 0}function Hu(e,t){return!!t&&null!=Gu(e,t)}function Yu(e,t){return!(!t||!e.getPreviousPageParam)&&null!=Wu(e,t)}function Ku(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qu(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};qu(this,Du,void 0),qu(this,Mu,void 0),qu(this,_u,void 0),qu(this,Lu,void 0),qu(this,ju,void 0),qu(this,Fu,void 0),qu(this,Bu,void 0),qu(this,zu,void 0),$u(Du,this,e.queryCache||new uu),$u(Mu,this,e.mutationCache||new Vu),$u(_u,this,e.defaultOptions||{}),$u(Lu,this,new Map),$u(ju,this,new Map),$u(Fu,this,0)}mount(){var e;$u(Fu,this,(e=Ju(Fu,this),e++,e)),1===Ju(Fu,this)&&($u(Bu,this,bI.subscribe((async e=>{e&&(await this.resumePausedMutations(),Ju(Du,this).onFocus())}))),$u(zu,this,SI.subscribe((async e=>{e&&(await this.resumePausedMutations(),Ju(Du,this).onOnline())}))))}unmount(){var e,t,n;$u(Fu,this,(e=Ju(Fu,this),e--,e)),0===Ju(Fu,this)&&(null===(t=Ju(Bu,this))||void 0===t||t.call(this),$u(Bu,this,void 0),null===(n=Ju(zu,this))||void 0===n||n.call(this),$u(zu,this,void 0))}isFetching(e){return Ju(Du,this).findAll(Qu(Qu({},e),{},{fetchStatus:"fetching"})).length}isMutating(e){return Ju(Mu,this).findAll(Qu(Qu({},e),{},{status:"pending"})).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null===(t=Ju(Du,this).get(n.queryHash))||void 0===t?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=Ju(Du,this).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Yc(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return Ju(Du,this).findAll(e).map((e=>{let{queryKey:t,state:n}=e;return[t,n.data]}))}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=Ju(Du,this).get(r.queryHash),i=function(e,t){return"function"==typeof e?e(t):e}(t,null==o?void 0:o.state.data);if(void 0!==i)return Ju(Du,this).build(this,r).setData(i,Qu(Qu({},n),{},{manual:!0}))}setQueriesData(e,t,n){return II.batch((()=>Ju(Du,this).findAll(e).map((e=>{let{queryKey:r}=e;return[r,this.setQueryData(r,t,n)]}))))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null===(t=Ju(Du,this).get(n.queryHash))||void 0===t?void 0:t.state}removeQueries(e){const t=Ju(Du,this);II.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=Ju(Du,this),r=Qu({type:"active"},e);return II.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(r,t))))}cancelQueries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Qu({revert:!0},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),n=II.batch((()=>Ju(Du,this).findAll(e).map((e=>e.cancel(t)))));return Promise.all(n).then(Gc).catch(Gc)}invalidateQueries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return II.batch((()=>{var n,r;if(Ju(Du,this).findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const o=Qu(Qu({},e),{},{type:null!==(n=null!==(r=e.refetchType)&&void 0!==r?r:e.type)&&void 0!==n?n:"active"});return this.refetchQueries(o,t)}))}refetchQueries(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=Qu(Qu({},n),{},{cancelRefetch:null===(e=null==n?void 0:n.cancelRefetch)||void 0===e||e}),o=II.batch((()=>Ju(Du,this).findAll(t).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(Gc)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(o).then(Gc)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=Ju(Du,this).build(this,t);return n.isStaleByTime(Yc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Gc).catch(Gc)}fetchInfiniteQuery(e){return e.behavior=Zu(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Gc).catch(Gc)}ensureInfiniteQueryData(e){return e.behavior=Zu(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return SI.isOnline()?Ju(Mu,this).resumePausedMutations():Promise.resolve()}getQueryCache(){return Ju(Du,this)}getMutationCache(){return Ju(Mu,this)}getDefaultOptions(){return Ju(_u,this)}setDefaultOptions(e){$u(_u,this,e)}setQueryDefaults(e,t){Ju(Lu,this).set(Jc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Ju(Lu,this).values()];let n={};return t.forEach((t=>{$c(e,t.queryKey)&&(n=Qu(Qu({},n),t.defaultOptions))})),n}setMutationDefaults(e,t){Ju(ju,this).set(Jc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Ju(ju,this).values()];let n={};return t.forEach((t=>{$c(e,t.mutationKey)&&(n=Qu(Qu({},n),t.defaultOptions))})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t=Qu(Qu(Qu(Qu({},Ju(_u,this).queries),this.getQueryDefaults(e.queryKey)),e),{},{_defaulted:!0});return t.queryHash||(t.queryHash=qc(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===gI&&(t.enabled=!1),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:Qu(Qu(Qu(Qu({},Ju(_u,this).mutations),(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey)),e),{},{_defaulted:!0})}clear(){Ju(Du,this).clear(),Ju(Mu,this).clear()}}),nd=n(4848),rd=Ji.createContext(void 0),od=e=>{const t=Ji.useContext(rd);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},id=e=>{let{client:t,children:n}=e;return Ji.useEffect((()=>(t.mount(),()=>{t.unmount()})),[t]),(0,nd.jsx)(rd.Provider,{value:t,children:n})},ad=(n(6259),n(3757)),sd=n(6942),gd=n.n(sd);const ld=Object.freeze({INVENTORY:"inventory",SHOPPING:"shopping",SHOPPING_ANON:"shopping_anon"}),Ad=e=>{let{useHook:t,hookArgs:n,replaceZero:r=!0,classNames:o="",hideLoadingTag:i=!1}=e;const[a,s]=Ji.useState(),{data:g,isLoading:l,error:A}=t(...Object.values(n));return(0,Ji.useEffect)((()=>{s(g)}),[g]),l&&!i?Ji.createElement("div",{className:"text-center text-gray-500 animate-pulse"},"Loading..."):l&&i?Ji.createElement("div",{className:"text-center text-gray-500 animate-pulse"},"-"):A?Ji.createElement("div",null,"Error: ",A.message):Ji.createElement("span",{className:gd()("font-bold",o,{"text-[#548a6a]":0!==a,"text-gray-500":0===a})},0===a&&r?"-":a)};function Cd({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const cd=Ji.forwardRef(Cd);function Id(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function ud(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return Id((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=ud();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function dd(){let[e]=(0,Ji.useState)(ud);return(0,Ji.useEffect)((()=>()=>e.dispose()),[e]),e}var hd=Object.defineProperty,fd=(e,t,n)=>(((e,t,n)=>{t in e?hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let pd=new class{constructor(){fd(this,"current",this.detect()),fd(this,"handoffState","pending"),fd(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},md=(e,t)=>{pd.isServer?(0,Ji.useEffect)(e,t):(0,Ji.useLayoutEffect)(e,t)};function vd(e){let t=(0,Ji.useRef)(e);return md((()=>{t.current=e}),[e]),t}let yd=function(e){let t=vd(e);return Ji.useCallback(((...e)=>t.current(...e)),[t])};function bd(){let e=(0,Ji.useRef)(!1);return md((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function wd(e=0){let[t,n]=(0,Ji.useState)(e),r=bd(),o=(0,Ji.useCallback)((e=>{r.current&&n((t=>t|e))}),[t,r]),i=(0,Ji.useCallback)((e=>Boolean(t&e)),[t]),a=(0,Ji.useCallback)((e=>{r.current&&n((t=>t&~e))}),[n,r]),s=(0,Ji.useCallback)((e=>{r.current&&n((t=>t^e))}),[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:a,toggleFlag:s}}function xd(){let e=function(){let e="undefined"==typeof document;return(e=>e.useSyncExternalStore)($i)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=Ji.useState(pd.isHandoffComplete);return t&&!1===pd.isHandoffComplete&&n(!1),Ji.useEffect((()=>{!0!==t&&n(!0)}),[t]),Ji.useEffect((()=>pd.handoff()),[]),!e&&t}let Ed=Symbol();function kd(...e){let t=(0,Ji.useRef)(e);(0,Ji.useEffect)((()=>{t.current=e}),[e]);let n=yd((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Ed])))?void 0:n}function Sd(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Sd),r}function Td(e,...t){e&&t.length>0&&e.classList.add(...t)}function Od(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Nd(e,t,n,r){let o=n?"enter":"leave",i=ud(),a=void 0!==r?function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let s=Sd(o,{enter:()=>t.enter,leave:()=>t.leave}),g=Sd(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=Sd(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Od(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Td(e,...t.base,...s,...l),i.nextFrame((()=>{Od(e,...t.base,...s,...l),Td(e,...t.base,...s,...g),function(e,t){let n=ud();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,a]=[r,o].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),s=i+a;if(0!==s){n.group((n=>{n.setTimeout((()=>{t(),n.dispose()}),s),n.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&n.dispose()}))}));let r=n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),r())}))}else t();n.add((()=>t())),n.dispose}(e,(()=>(Od(e,...t.base,...s),Td(e,...t.base,...t.entered),a())))})),i.dispose}function Rd({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let a=bd(),s=dd(),g=vd(n);md((()=>{e&&(g.current="enter")}),[e]),md((()=>{let e=ud();s.add(e.dispose);let n=t.current;if(n&&"idle"!==g.current&&a.current)return e.dispose(),o.current(g.current),e.add(Nd(n,r.current,"enter"===g.current,(()=>{e.dispose(),i.current(g.current)}))),e.dispose}),[n])}let Pd=(0,Ji.createContext)(null);Pd.displayName="OpenClosedContext";var Dd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Dd||{});function Md(){return(0,Ji.useContext)(Pd)}function _d({value:e,children:t}){return Ji.createElement(Pd.Provider,{value:e},t)}function Ld(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var jd=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(jd||{}),Fd=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Fd||{});function Bd({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a,mergeRefs:s}){s=null!=s?s:Vd;let g=Ud(t,e);if(i)return zd(g,n,r,a,s);let l=null!=o?o:0;if(2&l){let{static:e=!1,...t}=g;if(e)return zd(t,n,r,a,s)}if(1&l){let{unmount:e=!0,...t}=g;return Sd(e?0:1,{0:()=>null,1:()=>zd({...t,hidden:!0,style:{display:"none"}},n,r,a,s)})}return zd(g,n,r,a,s)}function zd(e,t={},n,r,o){let{as:i=n,children:a,refName:s="ref",...g}=Wd(e,["unmount","static"]),l=void 0!==e.ref?{[s]:e.ref}:{},A="function"==typeof a?a(t):a;"className"in g&&g.className&&"function"==typeof g.className&&(g.className=g.className(t));let C={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r);e&&(C["data-headlessui-state"]=n.join(" "))}if(i===Ji.Fragment&&Object.keys(Gd(g)).length>0){if(!(0,Ji.isValidElement)(A)||Array.isArray(A)&&A.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(g).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=A.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>Ld(null==e?void 0:e.className(...t),g.className):Ld(null==e?void 0:e.className,g.className),n=t?{className:t}:{};return(0,Ji.cloneElement)(A,Object.assign({},Ud(A.props,Gd(Wd(g,["ref"]))),C,l,{ref:o(A.ref,l.ref)},n))}return(0,Ji.createElement)(i,Object.assign({},Wd(g,["ref"]),i!==Ji.Fragment&&l,i!==Ji.Fragment&&C),A)}function Vd(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Ud(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let e in n)Object.assign(t,{[e](t,...r){let o=n[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function Zd(e){var t;return Object.assign((0,Ji.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Gd(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function Wd(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function Hd(e=""){return e.split(/\s+/).filter((e=>e.length>1))}let Yd=(0,Ji.createContext)(null);Yd.displayName="TransitionContext";var Kd=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Kd||{});let Qd=(0,Ji.createContext)(null);function Xd(e){return"children"in e?Xd(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function qd(e,t){let n=vd(e),r=(0,Ji.useRef)([]),o=bd(),i=dd(),a=yd(((e,t=Fd.Hidden)=>{let a=r.current.findIndex((({el:t})=>t===e));-1!==a&&(Sd(t,{[Fd.Unmount](){r.current.splice(a,1)},[Fd.Hidden](){r.current[a].state="hidden"}}),i.microTask((()=>{var e;!Xd(r)&&o.current&&(null==(e=n.current)||e.call(n))})))})),s=yd((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>a(e,Fd.Unmount)})),g=(0,Ji.useRef)([]),l=(0,Ji.useRef)(Promise.resolve()),A=(0,Ji.useRef)({enter:[],leave:[],idle:[]}),C=yd(((e,n,r)=>{g.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{g.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(A.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?l.current=l.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),c=yd(((e,t,n)=>{Promise.all(A.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=g.current.shift())||e()})).then((()=>n(t)))}));return(0,Ji.useMemo)((()=>({children:r,register:s,unregister:a,onStart:C,onStop:c,wait:l,chains:A})),[s,a,r,C,c,A,l])}function Jd(){}Qd.displayName="NestingContext";let $d=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function eh(e){var t;let n={};for(let r of $d)n[r]=null!=(t=e[r])?t:Jd;return n}let th=jd.RenderStrategy;let nh=Zd((function(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,a=(0,Ji.useRef)(null),s=kd(a,t);xd();let g=Md();if(void 0===n&&null!==g&&(n=(g&Dd.Open)===Dd.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[l,A]=(0,Ji.useState)(n?"visible":"hidden"),C=qd((()=>{A("hidden")})),[c,I]=(0,Ji.useState)(!0),u=(0,Ji.useRef)([n]);md((()=>{!1!==c&&u.current[u.current.length-1]!==n&&(u.current.push(n),I(!1))}),[u,n]);let d=(0,Ji.useMemo)((()=>({show:n,appear:r,initial:c})),[n,r,c]);(0,Ji.useEffect)((()=>{if(n)A("visible");else if(Xd(C)){let e=a.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&A("hidden")}else A("hidden")}),[n,C]);let h={unmount:o},f=yd((()=>{var t;c&&I(!1),null==(t=e.beforeEnter)||t.call(e)})),p=yd((()=>{var t;c&&I(!1),null==(t=e.beforeLeave)||t.call(e)}));return Ji.createElement(Qd.Provider,{value:C},Ji.createElement(Yd.Provider,{value:d},Bd({ourProps:{...h,as:Ji.Fragment,children:Ji.createElement(rh,{ref:s,...h,...i,beforeEnter:f,beforeLeave:p})},theirProps:{},defaultTag:Ji.Fragment,features:th,visible:"visible"===l,name:"Transition"})))})),rh=Zd((function(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s,enter:g,enterFrom:l,enterTo:A,entered:C,leave:c,leaveFrom:I,leaveTo:u,...d}=e,h=(0,Ji.useRef)(null),f=kd(h,t),p=null==(n=d.unmount)||n?Fd.Unmount:Fd.Hidden,{show:m,appear:v,initial:y}=function(){let e=(0,Ji.useContext)(Yd);if(null===e)throw new Error("A is used but it is missing a parent or .");return e}(),[b,w]=(0,Ji.useState)(m?"visible":"hidden"),x=function(){let e=(0,Ji.useContext)(Qd);if(null===e)throw new Error("A is used but it is missing a parent or .");return e}(),{register:E,unregister:k}=x;(0,Ji.useEffect)((()=>E(h)),[E,h]),(0,Ji.useEffect)((()=>{if(p===Fd.Hidden&&h.current)return m&&"visible"!==b?void w("visible"):Sd(b,{hidden:()=>k(h),visible:()=>E(h)})}),[b,h,E,k,m,p]);let S=vd({base:Hd(d.className),enter:Hd(g),enterFrom:Hd(l),enterTo:Hd(A),entered:Hd(C),leave:Hd(c),leaveFrom:Hd(I),leaveTo:Hd(u)}),T=function(e){let t=(0,Ji.useRef)(eh(e));return(0,Ji.useEffect)((()=>{t.current=eh(e)}),[e]),t}({beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s}),O=xd();(0,Ji.useEffect)((()=>{if(O&&"visible"===b&&null===h.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[h,b,O]);let N=v&&m&&y,R=!O||y&&!v?"idle":m?"enter":"leave",P=wd(0),D=yd((e=>Sd(e,{enter:()=>{P.addFlag(Dd.Opening),T.current.beforeEnter()},leave:()=>{P.addFlag(Dd.Closing),T.current.beforeLeave()},idle:()=>{}}))),M=yd((e=>Sd(e,{enter:()=>{P.removeFlag(Dd.Opening),T.current.afterEnter()},leave:()=>{P.removeFlag(Dd.Closing),T.current.afterLeave()},idle:()=>{}}))),_=qd((()=>{w("hidden"),k(h)}),x),L=(0,Ji.useRef)(!1);Rd({immediate:N,container:h,classes:S,direction:R,onStart:vd((e=>{L.current=!0,_.onStart(h,e,D)})),onStop:vd((e=>{L.current=!1,_.onStop(h,e,M),"leave"===e&&!Xd(_)&&(w("hidden"),k(h))}))});let j=d,F={ref:f};return N?j={...j,className:Ld(d.className,...S.current.enter,...S.current.enterFrom)}:L.current&&(j.className=Ld(d.className,null==(r=h.current)?void 0:r.className),""===j.className&&delete j.className),Ji.createElement(Qd.Provider,{value:_},Ji.createElement(_d,{value:Sd(b,{visible:Dd.Open,hidden:Dd.Closed})|P.flags},Bd({ourProps:F,theirProps:j,defaultTag:"div",features:th,visible:"visible"===b,name:"Transition.Child"})))})),oh=Zd((function(e,t){let n=null!==(0,Ji.useContext)(Yd),r=null!==Md();return Ji.createElement(Ji.Fragment,null,!n&&r?Ji.createElement(nh,{ref:t,...e}):Ji.createElement(rh,{ref:t,...e}))})),ih=Object.assign(nh,{Child:oh,Root:nh});function ah(e,t,n,r){let o=vd(n);(0,Ji.useEffect)((()=>{function n(e){o.current(e)}return(e=null!=e?e:window).addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}),[e,t,r])}function sh(e){let t=yd(e),n=(0,Ji.useRef)(!1);(0,Ji.useEffect)((()=>(n.current=!1,()=>{n.current=!0,Id((()=>{n.current&&t()}))})),[t])}function gh(e){return pd.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function lh(...e){return(0,Ji.useMemo)((()=>gh(...e)),[...e])}function Ah(e,t,n){let r=vd(t);(0,Ji.useEffect)((()=>{function t(e){r.current(e)}return window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)}),[e,n])}var Ch=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ch||{});function ch(e,t){let n=(0,Ji.useRef)([]),r=yd(e);(0,Ji.useEffect)((()=>{let e=[...n.current];for(let[o,i]of t.entries())if(n.current[o]!==i){let o=r(t,e);return n.current=t,o}}),[r,...t])}var Ih=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ih||{});let uh=Zd((function(e,t){var n;let{features:r=1,...o}=e;return Bd({ourProps:{ref:t,"aria-hidden":!(2&~r)||(null!=(n=o["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}},theirProps:o,slot:{},defaultTag:"div",name:"Hidden"})}));let dh=[];!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}((()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&dh[0]!==e.target&&(dh.unshift(e.target),dh=dh.filter((e=>null!=e&&e.isConnected)),dh.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})}));let hh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var fh=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(fh||{}),ph=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(ph||{}),mh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(mh||{});function vh(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(hh)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var yh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(yh||{});function bh(e,t=0){var n;return e!==(null==(n=gh(e))?void 0:n.body)&&Sd(t,{0:()=>e.matches(hh),1(){let t=e;for(;null!==t;){if(t.matches(hh))return!0;t=t.parentElement}return!1}})}var wh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(wh||{});function xh(e){null==e||e.focus({preventScroll:!0})}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let Eh=["textarea","input"].join(",");function kh(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?function(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(e):e:vh(e);o.length>0&&a.length>1&&(a=a.filter((e=>!o.includes(e)))),r=null!=r?r:i.activeElement;let s,g=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,a.indexOf(r))-1;if(4&t)return Math.max(0,a.indexOf(r))+1;if(8&t)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),A=32&t?{preventScroll:!0}:{},C=0,c=a.length;do{if(C>=c||C+c<=0)return 0;let e=l+C;if(16&t)e=(e+c)%c;else{if(e<0)return 3;if(e>=c)return 1}s=a[e],null==s||s.focus(A),C+=g}while(s!==i.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,Eh))&&n}(s)&&s.select(),2}function Sh(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}var Th=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Th||{});let Oh=Zd((function(e,t){let n=(0,Ji.useRef)(null),r=kd(n,t),{initialFocus:o,containers:i,features:a=30,...s}=e;xd()||(a=1);let g=lh(n);!function({ownerDocument:e},t){let n=function(e=!0){let t=(0,Ji.useRef)(dh.slice());return ch((([e],[n])=>{!0===n&&!1===e&&Id((()=>{t.current.splice(0)})),!1===n&&!0===e&&(t.current=dh.slice())}),[e,dh,t]),yd((()=>{var e;return null!=(e=t.current.find((e=>null!=e&&e.isConnected)))?e:null}))}(t);ch((()=>{t||(null==e?void 0:e.activeElement)===(null==e?void 0:e.body)&&xh(n())}),[t]),sh((()=>{t&&xh(n())}))}({ownerDocument:g},Boolean(16&a));let l=function({ownerDocument:e,container:t,initialFocus:n},r){let o=(0,Ji.useRef)(null),i=bd();return ch((()=>{if(!r)return;let a=t.current;a&&Id((()=>{if(!i.current)return;let t=null==e?void 0:e.activeElement;if(null!=n&&n.current){if((null==n?void 0:n.current)===t)return void(o.current=t)}else if(a.contains(t))return void(o.current=t);null!=n&&n.current?xh(n.current):(kh(a,fh.First),ph.Error),o.current=null==e?void 0:e.activeElement}))}),[r]),o}({ownerDocument:g,container:n,initialFocus:o},Boolean(2&a));!function({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=bd();ah(null==e?void 0:e.defaultView,"focus",(e=>{if(!o||!i.current)return;let a=Sh(n);t.current instanceof HTMLElement&&a.add(t.current);let s=r.current;if(!s)return;let g=e.target;g&&g instanceof HTMLElement?Rh(a,g)?(r.current=g,xh(g)):(e.preventDefault(),e.stopPropagation(),xh(s)):xh(r.current)}),!0)}({ownerDocument:g,container:n,containers:i,previousActiveElement:l},Boolean(8&a));let A=function(){let e=(0,Ji.useRef)(0);return Ah("keydown",(t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)}),!0),e}(),C=yd((e=>{let t=n.current;t&&Sd(A.current,{[Ch.Forwards]:()=>{kh(t,fh.First,{skipElements:[e.relatedTarget]})},[Ch.Backwards]:()=>{kh(t,fh.Last,{skipElements:[e.relatedTarget]})}})})),c=dd(),I=(0,Ji.useRef)(!1),u={ref:r,onKeyDown(e){"Tab"==e.key&&(I.current=!0,c.requestAnimationFrame((()=>{I.current=!1})))},onBlur(e){let t=Sh(i);n.current instanceof HTMLElement&&t.add(n.current);let r=e.relatedTarget;r instanceof HTMLElement&&"true"!==r.dataset.headlessuiFocusGuard&&(Rh(t,r)||(I.current?kh(n.current,Sd(A.current,{[Ch.Forwards]:()=>fh.Next,[Ch.Backwards]:()=>fh.Previous})|fh.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&xh(e.target)))}};return Ji.createElement(Ji.Fragment,null,Boolean(4&a)&&Ji.createElement(uh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:C,features:Ih.Focusable}),Bd({ourProps:u,theirProps:s,defaultTag:"div",name:"FocusTrap"}),Boolean(4&a)&&Ji.createElement(uh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:C,features:Ih.Focusable}))})),Nh=Object.assign(Oh,{features:Th});function Rh(e,t){for(let n of e)if(n.contains(t))return!0;return!1}var Ph=n(961),Dh=n.t(Ph,2);let Mh=(0,Ji.createContext)(!1);function _h(e){return Ji.createElement(Mh.Provider,{value:e.force},e.children)}function Lh(e){let t=(0,Ji.useContext)(Mh),n=(0,Ji.useContext)(Bh),r=lh(e),[o,i]=(0,Ji.useState)((()=>{if(!t&&null!==n||pd.isServer)return null;let e=null==r?void 0:r.getElementById("headlessui-portal-root");if(e)return e;if(null===r)return null;let o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)}));return(0,Ji.useEffect)((()=>{null!==o&&(null!=r&&r.body.contains(o)||null==r||r.body.appendChild(o))}),[o,r]),(0,Ji.useEffect)((()=>{t||null!==n&&i(n.current)}),[n,i,t]),o}let jh=Ji.Fragment;let Fh=Ji.Fragment,Bh=(0,Ji.createContext)(null);let zh=(0,Ji.createContext)(null);let Vh=Zd((function(e,t){let n=e,r=(0,Ji.useRef)(null),o=kd(function(e,t=!0){return Object.assign(e,{[Ed]:t})}((e=>{r.current=e})),t),i=lh(r),a=Lh(r),[s]=(0,Ji.useState)((()=>{var e;return pd.isServer?null:null!=(e=null==i?void 0:i.createElement("div"))?e:null})),g=(0,Ji.useContext)(zh),l=xd();return md((()=>{!a||!s||a.contains(s)||(s.setAttribute("data-headlessui-portal",""),a.appendChild(s))}),[a,s]),md((()=>{if(s&&g)return g.register(s)}),[g,s]),sh((()=>{var e;!a||!s||(s instanceof Node&&a.contains(s)&&a.removeChild(s),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))})),l&&a&&s?(0,Ph.createPortal)(Bd({ourProps:{ref:o},theirProps:n,defaultTag:jh,name:"Portal"}),s):null})),Uh=Zd((function(e,t){let{target:n,...r}=e,o={ref:kd(t)};return Ji.createElement(Bh.Provider,{value:n},Bd({ourProps:o,theirProps:r,defaultTag:Fh,name:"Popover.Group"}))})),Zh=Object.assign(Vh,{Group:Uh});const Gh="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},{useState:Wh,useEffect:Hh,useLayoutEffect:Yh,useDebugValue:Kh}=$i;function Qh(e){const t=e.getSnapshot,n=e.value;try{const e=t();return!Gh(n,e)}catch{return!0}}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;const Xh=(e=>e.useSyncExternalStore)($i);function qh(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=(null!=(n=t.defaultView)?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function Jh(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function $h(){return Jh()||/Android/gi.test(window.navigator.userAgent)}function ef(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let tf=function(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...o){let i=t[e].call(n,...o);i&&(n=i,r.forEach((e=>e())))}}}((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:ud(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:ef(n)},o=[Jh()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=ud();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let o=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),a=e.querySelector(o);a&&!r(a)&&(i=a)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)}))}))}}:{},qh(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];o.forEach((({before:e})=>null==e?void 0:e(r))),o.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function nf(e,t,n){let r=function(e){return Xh(e.subscribe,e.getSnapshot,e.getSnapshot)}(tf),o=e?r.get(e):void 0,i=!!o&&o.count>0;return md((()=>{if(e&&t)return tf.dispatch("PUSH",e,n),()=>tf.dispatch("POP",e,n)}),[t,e]),i}var rf;tf.subscribe((()=>{let e=tf.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&tf.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&tf.dispatch("TEARDOWN",n)}}));let of=null!=(rf=Ji.useId)?rf:function(){let e=xd(),[t,n]=Ji.useState(e?()=>pd.nextId():null);return md((()=>{null===t&&n(pd.nextId())}),[t]),null!=t?""+t:void 0},af=new Map,sf=new Map;function gf(e,t=!0){md((()=>{var n;if(!t)return;let r="function"==typeof e?e():e.current;if(!r)return;let o=null!=(n=sf.get(r))?n:0;return sf.set(r,o+1),0!==o||(af.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),function(){var e;if(!r)return;let t=null!=(e=sf.get(r))?e:1;if(1===t?sf.delete(r):sf.set(r,t-1),1!==t)return;let n=af.get(r);n&&(null===n["aria-hidden"]?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,af.delete(r))}}),[e,t])}function lf(e,t,n){let r=vd(t);(0,Ji.useEffect)((()=>{function t(e){r.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)}),[e,n])}function Af(e,t,n=!0){let r=(0,Ji.useRef)(!1);function o(n,o){if(!r.current||n.defaultPrevented)return;let i=o(n);if(null===i||!i.getRootNode().contains(i)||!i.isConnected)return;let a=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e);for(let e of a){if(null===e)continue;let t=e instanceof HTMLElement?e:e.current;if(null!=t&&t.contains(i)||n.composed&&n.composedPath().includes(t))return}return!bh(i,yh.Loose)&&-1!==i.tabIndex&&n.preventDefault(),t(n,i)}(0,Ji.useEffect)((()=>{requestAnimationFrame((()=>{r.current=n}))}),[n]);let i=(0,Ji.useRef)(null);lf("pointerdown",(e=>{var t,n;r.current&&(i.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),lf("mousedown",(e=>{var t,n;r.current&&(i.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),lf("click",(e=>{$h()||i.current&&(o(e,(()=>i.current)),i.current=null)}),!0),lf("touchend",(e=>o(e,(()=>e.target instanceof HTMLElement?e.target:null))),!0),Ah("blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}let Cf=(0,Ji.createContext)((()=>{}));Cf.displayName="StackContext";var cf=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(cf||{});function If({children:e,onUpdate:t,type:n,element:r,enabled:o}){let i=(0,Ji.useContext)(Cf),a=yd(((...e)=>{null==t||t(...e),i(...e)}));return md((()=>{let e=void 0===o||!0===o;return e&&a(0,n,r),()=>{e&&a(1,n,r)}}),[a,n,r,o]),Ji.createElement(Cf.Provider,{value:a},e)}function uf(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}let df=(0,Ji.createContext)(null);function hf(){let e=(0,Ji.useContext)(df);if(null===e){let e=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,hf),e}return e}function ff(){let[e,t]=(0,Ji.useState)([]);return[e.length>0?e.join(" "):void 0,(0,Ji.useMemo)((()=>function(e){let n=yd((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),r=(0,Ji.useMemo)((()=>({register:n,slot:e.slot,name:e.name,props:e.props})),[n,e.slot,e.name,e.props]);return Ji.createElement(df.Provider,{value:r},e.children)}),[t])]}let pf=Zd((function(e,t){let n=of(),{id:r=`headlessui-description-${n}`,...o}=e,i=hf(),a=kd(t);return md((()=>i.register(r)),[r,i.register]),Bd({ourProps:{ref:a,...i.props,id:r},theirProps:o,slot:i.slot||{},defaultTag:"p",name:i.name||"Description"})})),mf=Object.assign(pf,{});var vf=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(vf||{}),yf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(yf||{}),bf=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(bf||{});let wf={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},xf=(0,Ji.createContext)(null);function Ef(e){let t=(0,Ji.useContext)(xf);if(null===t){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ef),t}return t}function kf(e,t){return Sd(t.type,wf,e,t)}xf.displayName="DialogContext";let Sf=jd.RenderStrategy|jd.Static;let Tf=Zd((function(e,t){let n=of(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:i,initialFocus:a,role:s="dialog",__demoMode:g=!1,...l}=e,[A,C]=(0,Ji.useState)(0),c=(0,Ji.useRef)(!1);s="dialog"===s||"alertdialog"===s?s:(c.current||(c.current=!0),"dialog");let I=Md();void 0===o&&null!==I&&(o=(I&Dd.Open)===Dd.Open);let u=(0,Ji.useRef)(null),d=kd(u,t),h=lh(u),f=e.hasOwnProperty("open")||null!==I,p=e.hasOwnProperty("onClose");if(!f&&!p)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!f)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!p)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof o)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if("function"!=typeof i)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let m=o?0:1,[v,y]=(0,Ji.useReducer)(kf,{titleId:null,descriptionId:null,panelRef:(0,Ji.createRef)()}),b=yd((()=>i(!1))),w=yd((e=>y({type:0,id:e}))),x=!!xd()&&(!g&&0===m),E=A>1,k=null!==(0,Ji.useContext)(xf),[S,T]=function(){let e=(0,Ji.useContext)(zh),t=(0,Ji.useRef)([]),n=yd((n=>(t.current.push(n),e&&e.register(n),()=>r(n)))),r=yd((n=>{let r=t.current.indexOf(n);-1!==r&&t.current.splice(r,1),e&&e.unregister(n)})),o=(0,Ji.useMemo)((()=>({register:n,unregister:r,portals:t})),[n,r,t]);return[t,(0,Ji.useMemo)((()=>function({children:e}){return Ji.createElement(zh.Provider,{value:o},e)}),[o])]}(),O={get current(){var e;return null!=(e=v.panelRef.current)?e:u.current}},{resolveContainers:N,mainTreeNodeRef:R,MainTreeNode:P}=function({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=(0,Ji.useRef)(null!=(r=null==n?void 0:n.current)?r:null),i=lh(o),a=yd((()=>{var n,r,a;let s=[];for(let t of e)null!==t&&(t instanceof HTMLElement?s.push(t):"current"in t&&t.current instanceof HTMLElement&&s.push(t.current));if(null!=t&&t.current)for(let e of t.current)s.push(e);for(let e of null!=(n=null==i?void 0:i.querySelectorAll("html > *, body > *"))?n:[])e!==document.body&&e!==document.head&&e instanceof HTMLElement&&"headlessui-portal-root"!==e.id&&(e.contains(o.current)||e.contains(null==(a=null==(r=o.current)?void 0:r.getRootNode())?void 0:a.host)||s.some((t=>e.contains(t)))||s.push(e));return s}));return{resolveContainers:a,contains:yd((e=>a().some((t=>t.contains(e))))),mainTreeNodeRef:o,MainTreeNode:(0,Ji.useMemo)((()=>function(){return null!=n?null:Ji.createElement(uh,{features:Ih.Hidden,ref:o})}),[o,n])}}({portals:S,defaultContainers:[O]}),D=E?"parent":"leaf",M=null!==I&&(I&Dd.Closing)===Dd.Closing,_=!k&&!M&&x,L=(0,Ji.useCallback)((()=>{var e,t;return null!=(t=Array.from(null!=(e=null==h?void 0:h.querySelectorAll("body > *"))?e:[]).find((e=>"headlessui-portal-root"!==e.id&&(e.contains(R.current)&&e instanceof HTMLElement))))?t:null}),[R]);gf(L,_);let j=!!E||x,F=(0,Ji.useCallback)((()=>{var e,t;return null!=(t=Array.from(null!=(e=null==h?void 0:h.querySelectorAll("[data-headlessui-portal]"))?e:[]).find((e=>e.contains(R.current)&&e instanceof HTMLElement)))?t:null}),[R]);gf(F,j),Af(N,(e=>{e.preventDefault(),b()}),!(!x||E));let B=!(E||0!==m);ah(null==h?void 0:h.defaultView,"keydown",(e=>{B&&(e.defaultPrevented||e.key===vf.Escape&&(e.preventDefault(),e.stopPropagation(),b()))})),function(e,t,n=()=>[document.body]){nf(e,t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}(h,!(M||0!==m||k),N),(0,Ji.useEffect)((()=>{if(0!==m||!u.current)return;let e=new ResizeObserver((e=>{for(let t of e){let e=t.target.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&b()}}));return e.observe(u.current),()=>e.disconnect()}),[m,u,b]);let[z,V]=ff(),U=(0,Ji.useMemo)((()=>[{dialogState:m,close:b,setTitleId:w},v]),[m,v,b,w]),Z=(0,Ji.useMemo)((()=>({open:0===m})),[m]),G={ref:d,id:r,role:s,"aria-modal":0===m||void 0,"aria-labelledby":v.titleId,"aria-describedby":z};return Ji.createElement(If,{type:"Dialog",enabled:0===m,element:u,onUpdate:yd(((e,t)=>{"Dialog"===t&&Sd(e,{[cf.Add]:()=>C((e=>e+1)),[cf.Remove]:()=>C((e=>e-1))})}))},Ji.createElement(_h,{force:!0},Ji.createElement(Zh,null,Ji.createElement(xf.Provider,{value:U},Ji.createElement(Zh.Group,{target:u},Ji.createElement(_h,{force:!1},Ji.createElement(V,{slot:Z,name:"Dialog.Description"},Ji.createElement(Nh,{initialFocus:a,containers:N,features:x?Sd(D,{parent:Nh.features.RestoreFocus,leaf:Nh.features.All&~Nh.features.FocusLock}):Nh.features.None},Ji.createElement(T,null,Bd({ourProps:G,theirProps:l,slot:Z,defaultTag:"div",features:Sf,visible:0===m,name:"Dialog"}))))))))),Ji.createElement(P,null))})),Of=Zd((function(e,t){let n=of(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:i},a]=Ef("Dialog.Backdrop"),s=kd(t);(0,Ji.useEffect)((()=>{if(null===a.panelRef.current)throw new Error("A component is being used, but a component is missing.")}),[a.panelRef]);let g=(0,Ji.useMemo)((()=>({open:0===i})),[i]);return Ji.createElement(_h,{force:!0},Ji.createElement(Zh,null,Bd({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:g,defaultTag:"div",name:"Dialog.Backdrop"})))})),Nf=Zd((function(e,t){let n=of(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:i},a]=Ef("Dialog.Panel"),s=kd(t,a.panelRef),g=(0,Ji.useMemo)((()=>({open:0===i})),[i]),l=yd((e=>{e.stopPropagation()}));return Bd({ourProps:{ref:s,id:r,onClick:l},theirProps:o,slot:g,defaultTag:"div",name:"Dialog.Panel"})})),Rf=Zd((function(e,t){let n=of(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:i,close:a}]=Ef("Dialog.Overlay"),s=kd(t),g=yd((e=>{if(e.target===e.currentTarget){if(uf(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),a()}}));return Bd({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:g},theirProps:o,slot:(0,Ji.useMemo)((()=>({open:0===i})),[i]),defaultTag:"div",name:"Dialog.Overlay"})})),Pf=Zd((function(e,t){let n=of(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:a}]=Ef("Dialog.Title"),s=kd(t);(0,Ji.useEffect)((()=>(a(r),()=>a(null))),[r,a]);let g=(0,Ji.useMemo)((()=>({open:0===i})),[i]);return Bd({ourProps:{ref:s,id:r},theirProps:o,slot:g,defaultTag:"h2",name:"Dialog.Title"})})),Df=Object.assign(Tf,{Backdrop:Of,Panel:Nf,Overlay:Rf,Title:Pf,Description:mf});function Mf({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const _f=Ji.forwardRef(Mf);function Lf({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const jf=Ji.forwardRef(Lf);function Ff(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Bf(e){return e instanceof Ff(e).Element||e instanceof Element}function zf(e){return e instanceof Ff(e).HTMLElement||e instanceof HTMLElement}function Vf(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Ff(e).ShadowRoot||e instanceof ShadowRoot)}var Uf=Math.max,Zf=Math.min,Gf=Math.round;function Wf(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Hf(){return!/^((?!chrome|android).)*safari/i.test(Wf())}function Yf(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&zf(e)&&(o=e.offsetWidth>0&&Gf(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Gf(r.height)/e.offsetHeight||1);var a=(Bf(e)?Ff(e):window).visualViewport,s=!Hf()&&n,g=(r.left+(s&&a?a.offsetLeft:0))/o,l=(r.top+(s&&a?a.offsetTop:0))/i,A=r.width/o,C=r.height/i;return{width:A,height:C,top:l,right:g+A,bottom:l+C,left:g,x:g,y:l}}function Kf(e){var t=Ff(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Qf(e){return e?(e.nodeName||"").toLowerCase():null}function Xf(e){return((Bf(e)?e.ownerDocument:e.document)||window.document).documentElement}function qf(e){return Yf(Xf(e)).left+Kf(e).scrollLeft}function Jf(e){return Ff(e).getComputedStyle(e)}function $f(e){var t=Jf(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function ep(e,t,n){void 0===n&&(n=!1);var r=zf(t),o=zf(t)&&function(e){var t=e.getBoundingClientRect(),n=Gf(t.width)/e.offsetWidth||1,r=Gf(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Xf(t),a=Yf(e,o,n),s={scrollLeft:0,scrollTop:0},g={x:0,y:0};return(r||!r&&!n)&&(("body"!==Qf(t)||$f(i))&&(s=function(e){return e!==Ff(e)&&zf(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Kf(e);var t}(t)),zf(t)?((g=Yf(t,!0)).x+=t.clientLeft,g.y+=t.clientTop):i&&(g.x=qf(i))),{x:a.left+s.scrollLeft-g.x,y:a.top+s.scrollTop-g.y,width:a.width,height:a.height}}function tp(e){var t=Yf(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function np(e){return"html"===Qf(e)?e:e.assignedSlot||e.parentNode||(Vf(e)?e.host:null)||Xf(e)}function rp(e){return["html","body","#document"].indexOf(Qf(e))>=0?e.ownerDocument.body:zf(e)&&$f(e)?e:rp(np(e))}function op(e,t){var n;void 0===t&&(t=[]);var r=rp(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Ff(r),a=o?[i].concat(i.visualViewport||[],$f(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(op(np(a)))}function ip(e){return["table","td","th"].indexOf(Qf(e))>=0}function ap(e){return zf(e)&&"fixed"!==Jf(e).position?e.offsetParent:null}function sp(e){for(var t=Ff(e),n=ap(e);n&&ip(n)&&"static"===Jf(n).position;)n=ap(n);return n&&("html"===Qf(n)||"body"===Qf(n)&&"static"===Jf(n).position)?t:n||function(e){var t=/firefox/i.test(Wf());if(/Trident/i.test(Wf())&&zf(e)&&"fixed"===Jf(e).position)return null;var n=np(e);for(Vf(n)&&(n=n.host);zf(n)&&["html","body"].indexOf(Qf(n))<0;){var r=Jf(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var gp="top",lp="bottom",Ap="right",Cp="left",cp="auto",Ip=[gp,lp,Ap,Cp],up="start",dp="end",hp="viewport",fp="popper",pp=Ip.reduce((function(e,t){return e.concat([t+"-"+up,t+"-"+dp])}),[]),mp=[].concat(Ip,[cp]).reduce((function(e,t){return e.concat([t,t+"-"+up,t+"-"+dp])}),[]),vp=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function yp(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var bp={placement:"bottom",modifiers:[],strategy:"absolute"};function wp(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Np(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Sp(o):null,a=o?Tp(o):null,s=n.x+n.width/2-r.width/2,g=n.y+n.height/2-r.height/2;switch(i){case gp:t={x:s,y:n.y-r.height};break;case lp:t={x:s,y:n.y+n.height};break;case Ap:t={x:n.x+n.width,y:g};break;case Cp:t={x:n.x-r.width,y:g};break;default:t={x:n.x,y:n.y}}var l=i?Op(i):null;if(null!=l){var A="y"===l?"height":"width";switch(a){case up:t[l]=t[l]-(n[A]/2-r[A]/2);break;case dp:t[l]=t[l]+(n[A]/2-r[A]/2)}}return t}const Rp={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Np({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Pp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dp(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,g=e.gpuAcceleration,l=e.adaptive,A=e.roundOffsets,C=e.isFixed,c=a.x,I=void 0===c?0:c,u=a.y,d=void 0===u?0:u,h="function"==typeof A?A({x:I,y:d}):{x:I,y:d};I=h.x,d=h.y;var f=a.hasOwnProperty("x"),p=a.hasOwnProperty("y"),m=Cp,v=gp,y=window;if(l){var b=sp(n),w="clientHeight",x="clientWidth";if(b===Ff(n)&&"static"!==Jf(b=Xf(n)).position&&"absolute"===s&&(w="scrollHeight",x="scrollWidth"),o===gp||(o===Cp||o===Ap)&&i===dp)v=lp,d-=(C&&b===y&&y.visualViewport?y.visualViewport.height:b[w])-r.height,d*=g?1:-1;if(o===Cp||(o===gp||o===lp)&&i===dp)m=Ap,I-=(C&&b===y&&y.visualViewport?y.visualViewport.width:b[x])-r.width,I*=g?1:-1}var E,k=Object.assign({position:s},l&&Pp),S=!0===A?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Gf(n*o)/o||0,y:Gf(r*o)/o||0}}({x:I,y:d},Ff(n)):{x:I,y:d};return I=S.x,d=S.y,g?Object.assign({},k,((E={})[v]=p?"0":"",E[m]=f?"0":"",E.transform=(y.devicePixelRatio||1)<=1?"translate("+I+"px, "+d+"px)":"translate3d("+I+"px, "+d+"px, 0)",E)):Object.assign({},k,((t={})[v]=p?d+"px":"",t[m]=f?I+"px":"",t.transform="",t))}const Mp={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,g=void 0===s||s,l={placement:Sp(t.placement),variation:Tp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Dp(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:g})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Dp(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:g})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};const _p={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];zf(o)&&Qf(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});zf(r)&&Qf(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};const Lp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=mp.reduce((function(e,n){return e[n]=function(e,t,n){var r=Sp(e),o=[Cp,gp].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Cp,Ap].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],g=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=g,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}};var jp={left:"right",right:"left",bottom:"top",top:"bottom"};function Fp(e){return e.replace(/left|right|bottom|top/g,(function(e){return jp[e]}))}var Bp={start:"end",end:"start"};function zp(e){return e.replace(/start|end/g,(function(e){return Bp[e]}))}function Vp(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Vf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Up(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Zp(e,t,n){return t===hp?Up(function(e,t){var n=Ff(e),r=Xf(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,g=0;if(o){i=o.width,a=o.height;var l=Hf();(l||!l&&"fixed"===t)&&(s=o.offsetLeft,g=o.offsetTop)}return{width:i,height:a,x:s+qf(e),y:g}}(e,n)):Bf(t)?function(e,t){var n=Yf(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Up(function(e){var t,n=Xf(e),r=Kf(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Uf(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Uf(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+qf(e),g=-r.scrollTop;return"rtl"===Jf(o||n).direction&&(s+=Uf(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:g}}(Xf(e)))}function Gp(e,t,n,r){var o="clippingParents"===t?function(e){var t=op(np(e)),n=["absolute","fixed"].indexOf(Jf(e).position)>=0&&zf(e)?sp(e):e;return Bf(n)?t.filter((function(e){return Bf(e)&&Vp(e,n)&&"body"!==Qf(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=Zp(e,n,r);return t.top=Uf(o.top,t.top),t.right=Zf(o.right,t.right),t.bottom=Zf(o.bottom,t.bottom),t.left=Uf(o.left,t.left),t}),Zp(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Wp(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Hp(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Yp(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,g=void 0===s?"clippingParents":s,l=n.rootBoundary,A=void 0===l?hp:l,C=n.elementContext,c=void 0===C?fp:C,I=n.altBoundary,u=void 0!==I&&I,d=n.padding,h=void 0===d?0:d,f=Wp("number"!=typeof h?h:Hp(h,Ip)),p=c===fp?"reference":fp,m=e.rects.popper,v=e.elements[u?p:c],y=Gp(Bf(v)?v:v.contextElement||Xf(e.elements.popper),g,A,a),b=Yf(e.elements.reference),w=Np({reference:b,element:m,strategy:"absolute",placement:o}),x=Up(Object.assign({},m,w)),E=c===fp?x:b,k={top:y.top-E.top+f.top,bottom:E.bottom-y.bottom+f.bottom,left:y.left-E.left+f.left,right:E.right-y.right+f.right},S=e.modifiersData.offset;if(c===fp&&S){var T=S[o];Object.keys(k).forEach((function(e){var t=[Ap,lp].indexOf(e)>=0?1:-1,n=[gp,lp].indexOf(e)>=0?"y":"x";k[e]+=T[n]*t}))}return k}const Kp={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,g=n.fallbackPlacements,l=n.padding,A=n.boundary,C=n.rootBoundary,c=n.altBoundary,I=n.flipVariations,u=void 0===I||I,d=n.allowedAutoPlacements,h=t.options.placement,f=Sp(h),p=g||(f===h||!u?[Fp(h)]:function(e){if(Sp(e)===cp)return[];var t=Fp(e);return[zp(e),t,zp(t)]}(h)),m=[h].concat(p).reduce((function(e,n){return e.concat(Sp(n)===cp?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,g=n.allowedAutoPlacements,l=void 0===g?mp:g,A=Tp(r),C=A?s?pp:pp.filter((function(e){return Tp(e)===A})):Ip,c=C.filter((function(e){return l.indexOf(e)>=0}));0===c.length&&(c=C);var I=c.reduce((function(t,n){return t[n]=Yp(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Sp(n)],t}),{});return Object.keys(I).sort((function(e,t){return I[e]-I[t]}))}(t,{placement:n,boundary:A,rootBoundary:C,padding:l,flipVariations:u,allowedAutoPlacements:d}):n)}),[]),v=t.rects.reference,y=t.rects.popper,b=new Map,w=!0,x=m[0],E=0;E=0,N=O?"width":"height",R=Yp(t,{placement:k,boundary:A,rootBoundary:C,altBoundary:c,padding:l}),P=O?T?Ap:Cp:T?lp:gp;v[N]>y[N]&&(P=Fp(P));var D=Fp(P),M=[];if(i&&M.push(R[S]<=0),s&&M.push(R[P]<=0,R[D]<=0),M.every((function(e){return e}))){x=k,w=!1;break}b.set(k,M)}if(w)for(var _=function(e){var t=m.find((function(t){var n=b.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return x=t,"break"},L=u?3:1;L>0;L--){if("break"===_(L))break}t.placement!==x&&(t.modifiersData[r]._skip=!0,t.placement=x,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Qp(e,t,n){return Uf(e,Zf(t,n))}const Xp={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,g=n.boundary,l=n.rootBoundary,A=n.altBoundary,C=n.padding,c=n.tether,I=void 0===c||c,u=n.tetherOffset,d=void 0===u?0:u,h=Yp(t,{boundary:g,rootBoundary:l,padding:C,altBoundary:A}),f=Sp(t.placement),p=Tp(t.placement),m=!p,v=Op(f),y="x"===v?"y":"x",b=t.modifiersData.popperOffsets,w=t.rects.reference,x=t.rects.popper,E="function"==typeof d?d(Object.assign({},t.rects,{placement:t.placement})):d,k="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(b){if(i){var O,N="y"===v?gp:Cp,R="y"===v?lp:Ap,P="y"===v?"height":"width",D=b[v],M=D+h[N],_=D-h[R],L=I?-x[P]/2:0,j=p===up?w[P]:x[P],F=p===up?-x[P]:-w[P],B=t.elements.arrow,z=I&&B?tp(B):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=V[N],Z=V[R],G=Qp(0,w[P],z[P]),W=m?w[P]/2-L-G-U-k.mainAxis:j-G-U-k.mainAxis,H=m?-w[P]/2+L+G+Z+k.mainAxis:F+G+Z+k.mainAxis,Y=t.elements.arrow&&sp(t.elements.arrow),K=Y?"y"===v?Y.clientTop||0:Y.clientLeft||0:0,Q=null!=(O=null==S?void 0:S[v])?O:0,X=D+H-Q,q=Qp(I?Zf(M,D+W-Q-K):M,D,I?Uf(_,X):_);b[v]=q,T[v]=q-D}if(s){var J,$="x"===v?gp:Cp,ee="x"===v?lp:Ap,te=b[y],ne="y"===y?"height":"width",re=te+h[$],oe=te-h[ee],ie=-1!==[gp,Cp].indexOf(f),ae=null!=(J=null==S?void 0:S[y])?J:0,se=ie?re:te-w[ne]-x[ne]-ae+k.altAxis,ge=ie?te+w[ne]+x[ne]-ae-k.altAxis:oe,le=I&&ie?function(e,t,n){var r=Qp(e,t,n);return r>n?n:r}(se,te,ge):Qp(I?se:re,te,I?ge:oe);b[y]=le,T[y]=le-te}t.modifiersData[r]=T}},requiresIfExists:["offset"]};const qp={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Sp(n.placement),g=Op(s),l=[Cp,Ap].indexOf(s)>=0?"height":"width";if(i&&a){var A=function(e,t){return Wp("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Hp(e,Ip))}(o.padding,n),C=tp(i),c="y"===g?gp:Cp,I="y"===g?lp:Ap,u=n.rects.reference[l]+n.rects.reference[g]-a[g]-n.rects.popper[l],d=a[g]-n.rects.reference[g],h=sp(i),f=h?"y"===g?h.clientHeight||0:h.clientWidth||0:0,p=u/2-d/2,m=A[c],v=f-C[l]-A[I],y=f/2-C[l]/2+p,b=Qp(m,y,v),w=g;n.modifiersData[r]=((t={})[w]=b,t.centerOffset=b-y,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Vp(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Jp(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function $p(e){return[gp,Ap,lp,Cp].some((function(t){return e[t]>=0}))}const em={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Yp(t,{elementContext:"reference"}),s=Yp(t,{altBoundary:!0}),g=Jp(a,r),l=Jp(s,o,i),A=$p(g),C=$p(l);t.modifiersData[n]={referenceClippingOffsets:g,popperEscapeOffsets:l,isReferenceHidden:A,hasPopperEscaped:C},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":A,"data-popper-escaped":C})}};var tm=xp({defaultModifiers:[kp,Rp,Mp,_p,Lp,Kp,Xp,qp,em]}),nm="tippy-content",rm="tippy-backdrop",om="tippy-arrow",im="tippy-svg-arrow",am={passive:!0,capture:!0},sm=function(){return document.body};function gm(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function lm(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Am(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Cm(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function cm(e){return[].concat(e)}function Im(e,t){-1===e.indexOf(t)&&e.push(t)}function um(e){return e.split("-")[0]}function dm(e){return[].slice.call(e)}function hm(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function fm(){return document.createElement("div")}function pm(e){return["Element","Fragment"].some((function(t){return lm(e,t)}))}function mm(e){return lm(e,"MouseEvent")}function vm(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function ym(e){return pm(e)?[e]:function(e){return lm(e,"NodeList")}(e)?dm(e):Array.isArray(e)?e:dm(document.querySelectorAll(e))}function bm(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function wm(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function xm(e){var t,n=cm(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function Em(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function km(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Sm={isTouch:!1},Tm=0;function Om(){Sm.isTouch||(Sm.isTouch=!0,window.performance&&document.addEventListener("mousemove",Nm))}function Nm(){var e=performance.now();e-Tm<20&&(Sm.isTouch=!1,document.removeEventListener("mousemove",Nm)),Tm=e}function Rm(){var e=document.activeElement;if(vm(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Pm=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Dm={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Mm=Object.assign({appendTo:sm,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Dm,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),_m=Object.keys(Mm);function Lm(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=Mm[o])?r:i);return t}),{});return Object.assign({},e,t)}function jm(e,t){var n=Object.assign({},t,{content:Am(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Lm(Object.assign({},Mm,{plugins:t}))):_m).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Mm.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Fm(e,t){e.innerHTML=t}function Bm(e){var t=fm();return!0===e?t.className=om:(t.className=im,pm(e)?t.appendChild(e):Fm(t,e)),t}function zm(e,t){pm(t.content)?(Fm(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Fm(e,t.content):e.textContent=t.content)}function Vm(e){var t=e.firstElementChild,n=dm(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(nm)})),arrow:n.find((function(e){return e.classList.contains(om)||e.classList.contains(im)})),backdrop:n.find((function(e){return e.classList.contains(rm)}))}}function Um(e){var t=fm(),n=fm();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=fm();function o(n,r){var o=Vm(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||zm(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(Bm(r.arrow))):i.appendChild(Bm(r.arrow)):s&&i.removeChild(s)}return r.className=nm,r.setAttribute("data-state","hidden"),zm(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}Um.$$tippy=!0;var Zm=1,Gm=[],Wm=[];function Hm(e,t){var n,r,o,i,a,s,g,l,A=jm(e,Object.assign({},Mm,Lm(hm(t)))),C=!1,c=!1,I=!1,u=!1,d=[],h=Cm(Y,A.interactiveDebounce),f=Zm++,p=(l=A.plugins).filter((function(e,t){return l.indexOf(e)===t})),m={id:f,reference:e,popper:fm(),popperInstance:null,props:A,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:p,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){0;if(m.state.isDestroyed)return;D("onBeforeUpdate",[m,t]),W();var n=m.props,r=jm(e,Object.assign({},n,hm(t),{ignoreAttributes:!0}));m.props=r,G(),n.interactiveDebounce!==r.interactiveDebounce&&(L(),h=Cm(Y,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?cm(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");_(),P(),b&&b(n,r);m.popperInstance&&(q(),$().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));D("onAfterUpdate",[m,t])},setContent:function(e){m.setProps({content:e})},show:function(){0;var e=m.state.isVisible,t=m.state.isDestroyed,n=!m.state.isEnabled,r=Sm.isTouch&&!m.props.touch,o=gm(m.props.duration,0,Mm.duration);if(e||t||n||r)return;if(T().hasAttribute("disabled"))return;if(D("onShow",[m],!1),!1===m.props.onShow(m))return;m.state.isVisible=!0,S()&&(y.style.visibility="visible");P(),z(),m.state.isMounted||(y.style.transition="none");if(S()){var i=N();bm([i.box,i.content],0)}s=function(){var e;if(m.state.isVisible&&!u){if(u=!0,y.offsetHeight,y.style.transition=m.props.moveTransition,S()&&m.props.animation){var t=N(),n=t.box,r=t.content;bm([n,r],o),wm([n,r],"visible")}M(),_(),Im(Wm,m),null==(e=m.popperInstance)||e.forceUpdate(),D("onMount",[m]),m.props.animation&&S()&&function(e,t){U(e,t)}(o,(function(){m.state.isShown=!0,D("onShown",[m])}))}},function(){var e,t=m.props.appendTo,n=T();e=m.props.interactive&&t===sm||"parent"===t?n.parentNode:Am(t,[n]);e.contains(y)||e.appendChild(y);m.state.isMounted=!0,q(),!1}()},hide:function(){0;var e=!m.state.isVisible,t=m.state.isDestroyed,n=!m.state.isEnabled,r=gm(m.props.duration,1,Mm.duration);if(e||t||n)return;if(D("onHide",[m],!1),!1===m.props.onHide(m))return;m.state.isVisible=!1,m.state.isShown=!1,u=!1,C=!1,S()&&(y.style.visibility="hidden");if(L(),V(),P(!0),S()){var o=N(),i=o.box,a=o.content;m.props.animation&&(bm([i,a],r),wm([i,a],"hidden"))}M(),_(),m.props.animation?S()&&function(e,t){U(e,(function(){!m.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&t()}))}(r,m.unmount):m.unmount()},hideWithInteractivity:function(e){0;O().addEventListener("mousemove",h),Im(Gm,h),h(e)},enable:function(){m.state.isEnabled=!0},disable:function(){m.hide(),m.state.isEnabled=!1},unmount:function(){0;m.state.isVisible&&m.hide();if(!m.state.isMounted)return;J(),$().forEach((function(e){e._tippy.unmount()})),y.parentNode&&y.parentNode.removeChild(y);Wm=Wm.filter((function(e){return e!==m})),m.state.isMounted=!1,D("onHidden",[m])},destroy:function(){0;if(m.state.isDestroyed)return;m.clearDelayTimeouts(),m.unmount(),W(),delete e._tippy,m.state.isDestroyed=!0,D("onDestroy",[m])}};if(!A.render)return m;var v=A.render(m),y=v.popper,b=v.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+m.id,m.popper=y,e._tippy=m,y._tippy=m;var w=p.map((function(e){return e.fn(m)})),x=e.hasAttribute("aria-expanded");return G(),_(),P(),D("onCreate",[m]),A.showOnCreate&&ee(),y.addEventListener("mouseenter",(function(){m.props.interactive&&m.state.isVisible&&m.clearDelayTimeouts()})),y.addEventListener("mouseleave",(function(){m.props.interactive&&m.props.trigger.indexOf("mouseenter")>=0&&O().addEventListener("mousemove",h)})),m;function E(){var e=m.props.touch;return Array.isArray(e)?e:[e,0]}function k(){return"hold"===E()[0]}function S(){var e;return!(null==(e=m.props.render)||!e.$$tippy)}function T(){return g||e}function O(){var e=T().parentNode;return e?xm(e):document}function N(){return Vm(y)}function R(e){return m.state.isMounted&&!m.state.isVisible||Sm.isTouch||i&&"focus"===i.type?0:gm(m.props.delay,e?0:1,Mm.delay)}function P(e){void 0===e&&(e=!1),y.style.pointerEvents=m.props.interactive&&!e?"":"none",y.style.zIndex=""+m.props.zIndex}function D(e,t,n){var r;(void 0===n&&(n=!0),w.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=m.props)[e].apply(r,t)}function M(){var t=m.props.aria;if(t.content){var n="aria-"+t.content,r=y.id;cm(m.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(m.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function _(){!x&&m.props.aria.expanded&&cm(m.props.triggerTarget||e).forEach((function(e){m.props.interactive?e.setAttribute("aria-expanded",m.state.isVisible&&e===T()?"true":"false"):e.removeAttribute("aria-expanded")}))}function L(){O().removeEventListener("mousemove",h),Gm=Gm.filter((function(e){return e!==h}))}function j(t){if(!Sm.isTouch||!I&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!m.props.interactive||!km(y,n)){if(cm(m.props.triggerTarget||e).some((function(e){return km(e,n)}))){if(Sm.isTouch)return;if(m.state.isVisible&&m.props.trigger.indexOf("click")>=0)return}else D("onClickOutside",[m,t]);!0===m.props.hideOnClick&&(m.clearDelayTimeouts(),m.hide(),c=!0,setTimeout((function(){c=!1})),m.state.isMounted||V())}}}function F(){I=!0}function B(){I=!1}function z(){var e=O();e.addEventListener("mousedown",j,!0),e.addEventListener("touchend",j,am),e.addEventListener("touchstart",B,am),e.addEventListener("touchmove",F,am)}function V(){var e=O();e.removeEventListener("mousedown",j,!0),e.removeEventListener("touchend",j,am),e.removeEventListener("touchstart",B,am),e.removeEventListener("touchmove",F,am)}function U(e,t){var n=N().box;function r(e){e.target===n&&(Em(n,"remove",r),t())}if(0===e)return t();Em(n,"remove",a),Em(n,"add",r),a=r}function Z(t,n,r){void 0===r&&(r=!1),cm(m.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),d.push({node:e,eventType:t,handler:n,options:r})}))}function G(){var e;k()&&(Z("touchstart",H,{passive:!0}),Z("touchend",K,{passive:!0})),(e=m.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(Z(e,H),e){case"mouseenter":Z("mouseleave",K);break;case"focus":Z(Pm?"focusout":"blur",Q);break;case"focusin":Z("focusout",Q)}}))}function W(){d.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),d=[]}function H(e){var t,n=!1;if(m.state.isEnabled&&!X(e)&&!c){var r="focus"===(null==(t=i)?void 0:t.type);i=e,g=e.currentTarget,_(),!m.state.isVisible&&mm(e)&&Gm.forEach((function(t){return t(e)})),"click"===e.type&&(m.props.trigger.indexOf("mouseenter")<0||C)&&!1!==m.props.hideOnClick&&m.state.isVisible?n=!0:ee(e),"click"===e.type&&(C=!n),n&&!r&&te(e)}}function Y(e){var t=e.target,n=T().contains(t)||y.contains(t);if("mousemove"!==e.type||!n){var r=$().concat(y).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:A}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=um(o.placement),s=o.modifiersData.offset;if(!s)return!0;var g="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,A="right"===a?s.left.x:0,C="left"===a?s.right.x:0,c=t.top-r+g>i,I=r-t.bottom-l>i,u=t.left-n+A>i,d=n-t.right-C>i;return c||I||u||d}))})(r,e)&&(L(),te(e))}}function K(e){X(e)||m.props.trigger.indexOf("click")>=0&&C||(m.props.interactive?m.hideWithInteractivity(e):te(e))}function Q(e){m.props.trigger.indexOf("focusin")<0&&e.target!==T()||m.props.interactive&&e.relatedTarget&&y.contains(e.relatedTarget)||te(e)}function X(e){return!!Sm.isTouch&&k()!==e.type.indexOf("touch")>=0}function q(){J();var t=m.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,g=S()?Vm(y).arrow:null,l=i?{getBoundingClientRect:i,contextElement:i.contextElement||T()}:e,A={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var n=N().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},C=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},A];S()&&g&&C.push({name:"arrow",options:{element:g,padding:3}}),C.push.apply(C,(null==n?void 0:n.modifiers)||[]),m.popperInstance=tm(l,y,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:C}))}function J(){m.popperInstance&&(m.popperInstance.destroy(),m.popperInstance=null)}function $(){return dm(y.querySelectorAll("[data-tippy-root]"))}function ee(e){m.clearDelayTimeouts(),e&&D("onTrigger",[m,e]),z();var t=R(!0),r=E(),o=r[0],i=r[1];Sm.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){m.show()}),t):m.show()}function te(e){if(m.clearDelayTimeouts(),D("onUntrigger",[m,e]),m.state.isVisible){if(!(m.props.trigger.indexOf("mouseenter")>=0&&m.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&C)){var t=R(!1);t?r=setTimeout((function(){m.state.isVisible&&m.hide()}),t):o=requestAnimationFrame((function(){m.hide()}))}}else V()}}function Ym(e,t){void 0===t&&(t={});var n=Mm.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Om,am),window.addEventListener("blur",Rm);var r=Object.assign({},t,{plugins:n}),o=ym(e).reduce((function(e,t){var n=t&&Hm(t,r);return n&&e.push(n),e}),[]);return pm(e)?o[0]:o}Ym.defaultProps=Mm,Ym.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Mm[t]=e[t]}))},Ym.currentInput=Sm;Object.assign({},_p,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Ym.setDefaultProps({render:Um});const Km=Ym;function Qm(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var Xm="undefined"!=typeof window&&"undefined"!=typeof document;function qm(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function Jm(){return Xm&&document.createElement("div")}function $m(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!$m(e[n],t[n]))return!1}return!0}return!1}function ev(e){var t=[];return e.forEach((function(e){t.find((function(t){return $m(e,t)}))||t.push(e)})),t}function tv(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:ev([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var nv=Xm?Ji.useLayoutEffect:Ji.useEffect;function rv(e){var t=(0,Ji.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function ov(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var iv={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||ov(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&ov(t,"remove",e.props.className)},onAfterUpdate:r}}};function av(e){return function(t){var n=t.children,r=t.content,o=t.visible,i=t.singleton,a=t.render,s=t.reference,g=t.disabled,l=void 0!==g&&g,A=t.ignoreAttributes,C=void 0===A||A,c=(t.__source,t.__self,Qm(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),I=void 0!==o,u=void 0!==i,d=(0,Ji.useState)(!1),h=d[0],f=d[1],p=(0,Ji.useState)({}),m=p[0],v=p[1],y=(0,Ji.useState)(),b=y[0],w=y[1],x=rv((function(){return{container:Jm(),renders:1}})),E=Object.assign({ignoreAttributes:C},c,{content:x.container});I&&(E.trigger="manual",E.hideOnClick=!1),u&&(l=!0);var k=E,S=E.plugins||[];a&&(k=Object.assign({},E,{plugins:u&&null!=i.data?[].concat(S,[{fn:function(){return{onTrigger:function(e,t){var n=i.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,w(n.content)}}}}]):S,render:function(){return{popper:x.container}}}));var T=[s].concat(n?[n.type]:[]);return nv((function(){var t=s;s&&s.hasOwnProperty("current")&&(t=s.current);var n=e(t||x.ref||Jm(),Object.assign({},k,{plugins:[iv].concat(E.plugins||[])}));return x.instance=n,l&&n.disable(),o&&n.show(),u&&i.hook({instance:n,content:r,props:k,setSingletonContent:w}),f(!0),function(){n.destroy(),null==i||i.cleanup(n)}}),T),nv((function(){var e;if(1!==x.renders){var t=x.instance;t.setProps(tv(t.props,k)),null==(e=t.popperInstance)||e.forceUpdate(),l?t.disable():t.enable(),I&&(o?t.show():t.hide()),u&&i.hook({instance:t,content:r,props:k,setSingletonContent:w})}else x.renders++})),nv((function(){var e;if(a){var t=x.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;m.placement===n.placement&&m.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&m.escaped===(null==r?void 0:r.hasPopperEscaped)||v({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[m.placement,m.referenceHidden,m.escaped].concat(T)),Ji.createElement(Ji.Fragment,null,n?(0,Ji.cloneElement)(n,{ref:function(e){x.ref=e,qm(n.ref,e)}}):null,h&&(0,Ph.createPortal)(a?a(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(m),b,x.instance):r,x.container))}}var sv=function(e,t){return(0,Ji.forwardRef)((function(n,r){var o=n.children,i=Qm(n,["children"]);return Ji.createElement(e,Object.assign({},t,i),o?(0,Ji.cloneElement)(o,{ref:function(e){qm(r,e),qm(o.ref,e)}}):null)}))};const gv=sv(av(Km)),lv=e=>{let{title:t,children:n,backgroundColor:r="bg-gray-100",borderColor:o="border border-gray-300",rounded:i=!0,innerPadding:a="p-4",isOpenByDefault:s=!1,notice:g,infoIcon:l=!1}=e;const[A,C]=(0,Ji.useState)(s);return Ji.createElement("div",{className:gd()("transition-all duration-300 overflow-hidden",r,o,i&&"rounded-md")},Ji.createElement("button",{className:gd()("w-full flex justify-between items-center py-2 px-4 focus:outline-none",r),onClick:()=>C(!A)},Ji.createElement("div",{className:"flex items-center space-x-2"},Ji.createElement("h4",{className:"font-medium text-gray-800"},t),l&&g&&Ji.createElement(gv,{content:Ji.createElement("span",{className:"text-sm"},g)},Ji.createElement(_f,{className:"w-5 h-5 text-gray-500 hover:text-gray-700"}))),Ji.createElement(jf,{className:"h-5 w-5 transform transition-transform duration-300 ".concat(A?"rotate-180":"rotate-0")})),Ji.createElement("div",{className:gd()("transition-all duration-300",{"max-h-0":!A,"max-h-[400px]":A},A&&a),style:{overflowY:"hidden"}},A&&n))},Av={lg:"rounded-md px-3 py-2 text-sm",md:"rounded-md px-2.5 py-1.5 text-sm",sm:"rounded px-2 py-1 text-sm",xl:"rounded-md px-3.5 py-2.5 text-sm",xs:"rounded px-2 py-1 text-xs"},Cv={lg:"rounded-md p-3",md:"rounded-md p-2.5",sm:"rounded p-2",xl:"rounded-md p-3.5",xs:"rounded p-1.5"},cv={lg:"w-6 h-6",md:"w-5 h-5",sm:"w-4 h-4",xl:"w-7 h-7",xs:"w-3 h-3"},Iv={danger:"bg-red-500 hover:bg-red-700 text-white",light:"bg-white border-2 border-gray-400 text-gray-500 hover:border-gray-600 hover:text-gray-700",link:"text-gray-500 hover:text-red-500",linkBlue:"text-blue-500 hover:text-blue-700",muted:"bg-gray-400 text-white hover:bg-gray-500",mutedHoverPrimary:"bg-gray-400 text-white hover:bg-[#548a6a]",none:"text-white",primary:"bg-[#548a6a] hover:bg-[#406a4c] text-white",submit:"bg-blue-500 hover:bg-blue-700 text-white"},uv=e=>{let{size:t="md",variant:n="primary",onClick:r,classNames:o="",Icon:i,Image:a,imageAlt:s="",iconLocation:g="left",iconOnly:l=!1,tooltipText:A,expandOnHover:C=!1,children:c}=e;const I=l?Cv[t]:Av[t],u=Iv[n];return l||C?Ji.createElement(gv,{content:A,disabled:!A},Ji.createElement("button",{"aria-label":c?c.toString():"",className:gd()("flex items-center justify-center group transition-all duration-700 overflow-hidden",I,u,o,C&&"w-auto min-w-[2.5rem] max-w-fit px-2 group-hover:px-4"),onClick:r,style:{transition:"width 0.7s ease, padding 0.7s ease"},type:"button"},i&&Ji.createElement(i,{className:gd()(cv[t],"group-hover:mr-2 transition-all duration-200")}),Ji.createElement("span",{className:gd()("transition-opacity duration-700 opacity-0 group-hover:opacity-100 whitespace-nowrap",C&&"hidden group-hover:inline")},c))):Ji.createElement("button",{className:gd()("flex gap-2 font-semibold h-min whitespace-nowrap items-center",I,u,o),onClick:r,type:"button"},i&&"left"===g&&Ji.createElement(i,{className:"w-4 h-4"}),a&&"left"===g&&Ji.createElement("img",{alt:s,className:"h-5 w-fit",src:a}),Ji.createElement("span",null,c),i&&"right"===g&&Ji.createElement(i,{className:"w-4 h-4"}),a&&"right"===g&&Ji.createElement("img",{alt:s,className:"h-5 w-fit",src:a}))};function dv({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const hv=Ji.forwardRef(dv);function fv({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const pv=Ji.forwardRef(fv),mv={danger:Ji.createElement(hv,{"aria-hidden":"true",className:"w-6 h-6 text-red-600"}),info:Ji.createElement(pv,{"aria-hidden":"true",className:"w-6 h-6 text-blue-600"}),warning:Ji.createElement(hv,{"aria-hidden":"true",className:"w-6 h-6 text-yellow-500"})},vv=e=>{let{open:t,setOpen:n,title:r,submitButtonText:o,onSubmit:i=()=>{},type:a="danger",buttons:s,bgOpacity:g="bg-opacity-75",backdropBlur:l,disabled:A=!1,onlyCancelButton:C=!1,children:c}=e;const I=(0,Ji.useRef)(null),u=Ji.createElement("div",{className:"w-full mt-5 sm:mt-4 sm:flex sm:flex-row-reverse"},!C&&Ji.createElement("button",{className:gd()("inline-flex justify-center w-full px-3 py-2 text-sm font-semibold text-white rounded-md shadow-sm sm:ml-3 sm:w-auto",{"bg-red-500 hover:bg-red-700":"danger"===a,"bg-slate-500 hover:bg-slate-600":"danger"!==a}),disabled:A,onClick:()=>{i(),n(!1)},type:"button"},o),Ji.createElement("button",{className:"inline-flex justify-center w-full px-3 py-2 mt-3 text-sm font-semibold text-gray-900 bg-white rounded-md shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",onClick:()=>n(!1),ref:I,type:"button"},"Cancel"));return Ji.createElement(ih.Root,{as:Ji.Fragment,show:t},Ji.createElement(Df,{as:"div",className:"relative",initialFocus:I,onClose:()=>n(!1)},Ji.createElement(ih.Child,{as:Ji.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},Ji.createElement("div",{className:gd()("fixed inset-0 z-50 transition-opacity bg-gray-500",g,l)})),Ji.createElement("div",{className:"fixed inset-0 z-50 overflow-y-auto"},Ji.createElement("div",{className:"flex items-end justify-center w-full min-h-full p-4 text-center sm:items-center sm:p-0"},Ji.createElement(ih.Child,{as:Ji.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},Ji.createElement(Df.Panel,{className:"relative px-4 pt-5 pb-4 overflow-hidden text-left transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:w-full sm:max-w-lg md:max-w-2xl sm:p-6"},Ji.createElement("div",{className:"w-full sm:flex sm:items-start"},Ji.createElement("div",{className:gd()("flex items-center justify-center flex-shrink-0 w-12 h-12 mx-auto rounded-full sm:mx-0 sm:h-10 sm:w-10",{"bg-blue-100":"info"===a,"bg-red-100":"danger"===a,"bg-yellow-100":"warning"===a})},mv[a]),Ji.createElement("div",{className:"w-full mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left"},Ji.createElement(Df.Title,{as:"h3",className:"text-base font-semibold leading-6 text-gray-900"},r),Ji.createElement("div",{className:"w-full mt-2"},Ji.createElement("p",{className:"text-sm text-gray-500"},c)))),s||u))))))},yv=()=>{window.location.href="".concat(window.location.origin,"/support/")},bv=e=>{let{open:t,onClickSupport:n=()=>yv(),onClickCancel:r,title:o="This is a feature for our subscribers",message:i="BOM Squad depends on our the support of our subscribers to keep our servers online. Please help support the project and get access to version history."}=e;return Ji.createElement(vv,{open:t,title:o,type:"info",backdropBlur:"backdrop-blur-sm",buttons:Ji.createElement("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse"},Ji.createElement("button",{type:"button",className:"inline-flex justify-center w-full px-3 py-2 text-sm font-semibold text-white rounded-md shadow-sm bg-slate-500 hover:bg-slate-600 sm:ml-3 sm:w-auto",onClick:n},"Support"),Ji.createElement("button",{type:"button",className:"inline-flex justify-center w-full px-3 py-2 mt-3 text-sm font-semibold text-gray-900 bg-white rounded-md shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",onClick:r},"Cancel"))},i)};function wv({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{fillRule:"evenodd",d:"M16.72 7.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1 0 1.06l-3.75 3.75a.75.75 0 1 1-1.06-1.06l2.47-2.47H3a.75.75 0 0 1 0-1.5h16.19l-2.47-2.47a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const xv=Ji.forwardRef(wv),Ev=e=>{let{color:t="bg-slate-500",border:n="border-slate-500",textColor:r="text-white",textSize:o="text-xs",showArrow:i=!0,showXMark:a=!0,onClick:s,children:g}=e;return Ji.createElement("li",{className:"flex my-0.5"},Ji.createElement("div",{className:gd()("flex pt-1 pb-1 pl-2 pr-2 no-underline rounded-full font-sans font-semibold btn-primary",n,t,r,o)},g),i&&Ji.createElement("div",{className:"flex flex-col justify-center h-full"},Ji.createElement(xv,{className:"w-5 h-5"})))},kv=e=>{var t;let{row:n,pointerEvents:r}=e;const o=null!==(t=null==n?void 0:n.locations)&&void 0!==t?t:[];return Ji.createElement("div",{className:gd()("flex",r)},o.length>0?o.map(((e,t)=>Ji.createElement(Ev,{border:"border-1",color:"bg-white",key:t,showArrow:t!==o.length-1,showXMark:!1,textColor:"text-slate-500"},e))):Ji.createElement("span",{className:"font-mono"},"[no location specified]"))},Sv=e=>{let{data:t,onRowClicked:n,pointerEvents:r="pointer-events-auto"}=e;const o=[{cell:e=>Ji.createElement(kv,{pointerEvents:r,row:e}),grow:3,name:"Location",pointerOnHover:!0,sortable:!1,wrap:!1},{maxWidth:"50px",name:"Quantity",pointerOnHover:!0,selector:e=>e.quantity,sortable:!1,wrap:!1}];return Ji.createElement(ad.Ay,{columns:o,data:t,dense:!0,highlightOnHover:!0,noHeader:!0,onRowClicked:n})};var Tv=n(1099),Ov=n.n(Tv);function Nv({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))}const Rv=Ji.forwardRef(Nv),Pv=e=>{let{locationArray:t,submitLocationChange:n,showSeparateLocationsWithCommas:r=!0}=e;const[o,i]=(0,Ji.useState)([]),[a,s]=(0,Ji.useState)(!0);(0,Ji.useEffect)((()=>{t.length>0&&(i(t.join(", ")),s(!1))}),[t]);return Ji.createElement("div",{className:"flex justify-between w-full"},a?Ji.createElement("div",{className:"flex flex-col"},Ji.createElement("div",{className:"flex gap-1.5 pb-1 pt-2"},Ji.createElement("form",{className:"flex content-center w-full gap-1 align-middle"},Ji.createElement("input",{className:"block w-full rounded-md border-0 px-2 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brandgreen-600 sm:text-sm sm:leading-6",onChange:e=>i(e.target.value),type:"text",value:o}),Ji.createElement(uv,{onClick:()=>{i([]),n([]),s(!1)},variant:"muted"},"Cancel"),Ji.createElement(uv,{onClick:e=>{e.preventDefault();const t=o.split(",").map((e=>e.trim())).filter((e=>e));t.length>0?n(t):n([]),s(!1)},type:"submit",variant:"primary"},"Update"))),r&&Ji.createElement("p",{className:"text-xs text-gray-500"},"Separate locations with commas.")):Ji.createElement("ul",{className:"flex flex-wrap w-full"},(null!=t?t:[]).length?t.map(((e,n)=>Ji.createElement(Ev,{key:n,onClick:()=>{},showArrow:n!==t.length-1,textSize:"text-xs"},e))):"-"),!a&&Ji.createElement("div",{className:"flex flex-col justify-center",onClick:()=>{s(!0)},role:"button"},Ji.createElement(Rv,{className:"w-4 h-4 stroke-slate-300 hover:stroke-pink-500"})))};var Dv,Mv,_v,Lv,jv;function Fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bv(e){for(var t=1;t{if(Zv(Lv,this)&&this.hasListeners()){const l=Zv(Mv,this).variables,A=Zv(Mv,this).context;var t,n,r,o;if("success"===(null==e?void 0:e.type))null===(t=(n=Zv(Lv,this)).onSuccess)||void 0===t||t.call(n,e.data,l,A),null===(r=(o=Zv(Lv,this)).onSettled)||void 0===r||r.call(o,e.data,null,l,A);else if("error"===(null==e?void 0:e.type)){var i,a,s,g;null===(i=(a=Zv(Lv,this)).onError)||void 0===i||i.call(a,e.error,l,A),null===(s=(g=Zv(Lv,this)).onSettled)||void 0===s||s.call(g,void 0,e.error,l,A)}}this.listeners.forEach((e=>{e(Zv(Mv,this))}))}))}function Qv(e,t){return"function"==typeof e?e(...t):!!e}function Xv(){}function qv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jv(e){for(var t=1;tnew Hv(n,e)));Ji.useEffect((()=>{r.setOptions(e)}),[r,e]);const o=Ji.useSyncExternalStore(Ji.useCallback((e=>r.subscribe(II.batchCalls(e))),[r]),(()=>r.getCurrentResult()),(()=>r.getCurrentResult())),i=Ji.useCallback(((e,t)=>{r.mutate(e,t).catch(Xv)}),[r]);if(o.error&&Qv(r.options.throwOnError,[o.error]))throw o.error;return Jv(Jv({},o),{},{mutate:i,mutateAsync:o.mutate})}function ty(e){for(var t=1;t{const t=oy.call(e);return sy[t]||(sy[t]=t.slice(8,-1).toLowerCase())});var sy;const gy=e=>(e=e.toLowerCase(),t=>ay(t)===e),ly=e=>t=>typeof t===e,{isArray:Ay}=Array,Cy=ly("undefined");const cy=gy("ArrayBuffer");const Iy=ly("string"),uy=ly("function"),dy=ly("number"),hy=e=>null!==e&&"object"==typeof e,fy=e=>{if("object"!==ay(e))return!1;const t=iy(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},py=gy("Date"),my=gy("File"),vy=gy("Blob"),yy=gy("FileList"),by=gy("URLSearchParams"),[wy,xy,Ey,ky]=["ReadableStream","Request","Response","Headers"].map(gy);function Sy(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Ay(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Oy="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ny=e=>!Cy(e)&&e!==Oy;const Ry=(Py="undefined"!=typeof Uint8Array&&iy(Uint8Array),e=>Py&&e instanceof Py);var Py;const Dy=gy("HTMLFormElement"),My=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_y=gy("RegExp"),Ly=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Sy(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},jy="abcdefghijklmnopqrstuvwxyz",Fy="0123456789",By={DIGIT:Fy,ALPHA:jy,ALPHA_DIGIT:jy+jy.toUpperCase()+Fy};const zy=gy("AsyncFunction"),Vy=(Uy="function"==typeof setImmediate,Zy=uy(Oy.postMessage),Uy?setImmediate:Zy?((e,t)=>(Oy.addEventListener("message",(({source:n,data:r})=>{n===Oy&&r===e&&t.length&&t.shift()()}),!1),n=>{t.push(n),Oy.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var Uy,Zy;const Gy="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Oy):"undefined"!=typeof process&&process.nextTick||Vy,Wy={isArray:Ay,isArrayBuffer:cy,isBuffer:function(e){return null!==e&&!Cy(e)&&null!==e.constructor&&!Cy(e.constructor)&&uy(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||uy(e.append)&&("formdata"===(t=ay(e))||"object"===t&&uy(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&cy(e.buffer),t},isString:Iy,isNumber:dy,isBoolean:e=>!0===e||!1===e,isObject:hy,isPlainObject:fy,isReadableStream:wy,isRequest:xy,isResponse:Ey,isHeaders:ky,isUndefined:Cy,isDate:py,isFile:my,isBlob:vy,isRegExp:_y,isFunction:uy,isStream:e=>hy(e)&&uy(e.pipe),isURLSearchParams:by,isTypedArray:Ry,isFileList:yy,forEach:Sy,merge:function e(){const{caseless:t}=Ny(this)&&this||{},n={},r=(r,o)=>{const i=t&&Ty(n,o)||o;fy(n[i])&&fy(r)?n[i]=e(n[i],r):fy(r)?n[i]=e({},r):Ay(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e(Sy(t,((t,r)=>{n&&uy(t)?e[r]=ry(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&iy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:ay,kindOfTest:gy,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Ay(e))return e;let t=e.length;if(!dy(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Dy,hasOwnProperty:My,hasOwnProp:My,reduceDescriptors:Ly,freezeMethods:e=>{Ly(e,((t,n)=>{if(uy(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];uy(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return Ay(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Ty,global:Oy,isContextDefined:Ny,ALPHABET:By,generateString:(e=16,t=By.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&uy(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(hy(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=Ay(e)?[]:{};return Sy(e,((e,t)=>{const i=n(e,r+1);!Cy(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:zy,isThenable:e=>e&&(hy(e)||uy(e))&&uy(e.then)&&uy(e.catch),setImmediate:Vy,asap:Gy};function Hy(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Wy.inherits(Hy,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Wy.toJSONObject(this.config),code:this.code,status:this.status}}});const Yy=Hy.prototype,Ky={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Ky[e]={value:e}})),Object.defineProperties(Hy,Ky),Object.defineProperty(Yy,"isAxiosError",{value:!0}),Hy.from=(e,t,n,r,o,i)=>{const a=Object.create(Yy);return Wy.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Hy.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const Qy=Hy;function Xy(e){return Wy.isPlainObject(e)||Wy.isArray(e)}function qy(e){return Wy.endsWith(e,"[]")?e.slice(0,-2):e}function Jy(e,t,n){return e?e.concat(t).map((function(e,t){return e=qy(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const $y=Wy.toFlatObject(Wy,{},null,(function(e){return/^is[A-Z]/.test(e)}));const eb=function(e,t,n){if(!Wy.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Wy.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Wy.isUndefined(t[e])}))).metaTokens,o=n.visitor||l,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Wy.isSpecCompliantForm(t);if(!Wy.isFunction(o))throw new TypeError("visitor must be a function");function g(e){if(null===e)return"";if(Wy.isDate(e))return e.toISOString();if(!s&&Wy.isBlob(e))throw new Qy("Blob is not supported. Use a Buffer instead.");return Wy.isArrayBuffer(e)||Wy.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(Wy.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Wy.isArray(e)&&function(e){return Wy.isArray(e)&&!e.some(Xy)}(e)||(Wy.isFileList(e)||Wy.endsWith(n,"[]"))&&(s=Wy.toArray(e)))return n=qy(n),s.forEach((function(e,r){!Wy.isUndefined(e)&&null!==e&&t.append(!0===a?Jy([n],r,i):null===a?n:n+"[]",g(e))})),!1;return!!Xy(e)||(t.append(Jy(o,n,i),g(e)),!1)}const A=[],C=Object.assign($y,{defaultVisitor:l,convertValue:g,isVisitable:Xy});if(!Wy.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Wy.isUndefined(n)){if(-1!==A.indexOf(n))throw Error("Circular reference detected in "+r.join("."));A.push(n),Wy.forEach(n,(function(n,i){!0===(!(Wy.isUndefined(n)||null===n)&&o.call(t,n,Wy.isString(i)?i.trim():i,r,C))&&e(n,r?r.concat(i):[i])})),A.pop()}}(e),t};function tb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function nb(e,t){this._pairs=[],e&&eb(e,this,t)}const rb=nb.prototype;rb.append=function(e,t){this._pairs.push([e,t])},rb.toString=function(e){const t=e?function(t){return e.call(this,t,tb)}:tb;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ob=nb;function ib(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ab(e,t,n){if(!t)return e;const r=n&&n.encode||ib,o=n&&n.serialize;let i;if(i=o?o(t,n):Wy.isURLSearchParams(t)?t.toString():new ob(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const sb=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Wy.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},gb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lb={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ob,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ab="undefined"!=typeof window&&"undefined"!=typeof document,Cb="object"==typeof navigator&&navigator||void 0,cb=Ab&&(!Cb||["ReactNative","NativeScript","NS"].indexOf(Cb.product)<0),Ib="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ub=Ab&&window.location.href||"http://localhost",db={...r,...lb};const hb=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&Wy.isArray(r)?r.length:i,s)return Wy.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&Wy.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&Wy.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r{t(function(e){return Wy.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const fb={transitional:gb,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Wy.isObject(e);o&&Wy.isHTMLForm(e)&&(e=new FormData(e));if(Wy.isFormData(e))return r?JSON.stringify(hb(e)):e;if(Wy.isArrayBuffer(e)||Wy.isBuffer(e)||Wy.isStream(e)||Wy.isFile(e)||Wy.isBlob(e)||Wy.isReadableStream(e))return e;if(Wy.isArrayBufferView(e))return e.buffer;if(Wy.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return eb(e,new db.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return db.isNode&&Wy.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Wy.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return eb(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Wy.isString(e))try{return(t||JSON.parse)(e),Wy.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||fb.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Wy.isResponse(e)||Wy.isReadableStream(e))return e;if(e&&Wy.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Qy.from(e,Qy.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:db.classes.FormData,Blob:db.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Wy.forEach(["delete","get","head","post","put","patch"],(e=>{fb.headers[e]={}}));const pb=fb,mb=Wy.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),vb=Symbol("internals");function yb(e){return e&&String(e).trim().toLowerCase()}function bb(e){return!1===e||null==e?e:Wy.isArray(e)?e.map(bb):String(e)}function wb(e,t,n,r,o){return Wy.isFunction(r)?r.call(this,t,n):(o&&(t=n),Wy.isString(t)?Wy.isString(r)?-1!==t.indexOf(r):Wy.isRegExp(r)?r.test(t):void 0:void 0)}class xb{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=yb(t);if(!o)throw new Error("header name must be a non-empty string");const i=Wy.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=bb(e))}const i=(e,t)=>Wy.forEach(e,((e,n)=>o(e,n,t)));if(Wy.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Wy.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&mb[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Wy.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=yb(e)){const n=Wy.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Wy.isFunction(t))return t.call(this,e,n);if(Wy.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=yb(e)){const n=Wy.findKey(this,e);return!(!n||void 0===this[n]||t&&!wb(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=yb(e)){const o=Wy.findKey(n,e);!o||t&&!wb(0,n[o],o,t)||(delete n[o],r=!0)}}return Wy.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!wb(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Wy.forEach(this,((r,o)=>{const i=Wy.findKey(n,o);if(i)return t[i]=bb(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=bb(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Wy.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Wy.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[vb]=this[vb]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=yb(e);t[r]||(!function(e,t){const n=Wy.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return Wy.isArray(e)?e.forEach(r):r(e),this}}xb.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Wy.reduceDescriptors(xb.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Wy.freezeMethods(xb);const Eb=xb;function kb(e,t){const n=this||pb,r=t||n,o=Eb.from(r.headers);let i=r.data;return Wy.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Sb(e){return!(!e||!e.__CANCEL__)}function Tb(e,t,n){Qy.call(this,null==e?"canceled":e,Qy.ERR_CANCELED,t,n),this.name="CanceledError"}Wy.inherits(Tb,Qy,{__CANCEL__:!0});const Ob=Tb;function Nb(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Qy("Request failed with status code "+n.status,[Qy.ERR_BAD_REQUEST,Qy.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Rb=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const g=Date.now(),l=r[a];o||(o=g),n[i]=s,r[i]=g;let A=a,C=0;for(;A!==i;)C+=n[A++],A%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),g-o{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),i-s)))},()=>n&&a(n)]},Db=(e,t,n=3)=>{let r=0;const o=Rb(50,250);return Pb((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,g=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:g||void 0,estimated:g&&a&&i<=a?(a-i)/g:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Mb=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},_b=e=>(...t)=>Wy.asap((()=>e(...t))),Lb=db.hasStandardBrowserEnv?function(){const e=db.navigator&&/(msie|trident)/i.test(db.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Wy.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},jb=db.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Wy.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Wy.isString(r)&&a.push("path="+r),Wy.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Fb(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Bb=e=>e instanceof Eb?{...e}:e;function zb(e,t){t=t||{};const n={};function r(e,t,n){return Wy.isPlainObject(e)&&Wy.isPlainObject(t)?Wy.merge.call({caseless:n},e,t):Wy.isPlainObject(t)?Wy.merge({},t):Wy.isArray(t)?t.slice():t}function o(e,t,n){return Wy.isUndefined(t)?Wy.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!Wy.isUndefined(t))return r(void 0,t)}function a(e,t){return Wy.isUndefined(t)?Wy.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const g={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>o(Bb(e),Bb(t),!0)};return Wy.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=g[r]||o,a=i(e[r],t[r],r);Wy.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Vb=e=>{const t=zb({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:g}=t;if(t.headers=s=Eb.from(s),t.url=ab(Fb(t.baseURL,t.url),e.params,e.paramsSerializer),g&&s.set("Authorization","Basic "+btoa((g.username||"")+":"+(g.password?unescape(encodeURIComponent(g.password)):""))),Wy.isFormData(r))if(db.hasStandardBrowserEnv||db.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(db.hasStandardBrowserEnv&&(o&&Wy.isFunction(o)&&(o=o(t)),o||!1!==o&&Lb(t.url))){const e=i&&a&&jb.read(a);e&&s.set(i,e)}return t},Ub="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Vb(e);let o=r.data;const i=Eb.from(r.headers).normalize();let a,s,g,l,A,{responseType:C,onUploadProgress:c,onDownloadProgress:I}=r;function u(){l&&l(),A&&A(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let d=new XMLHttpRequest;function h(){if(!d)return;const r=Eb.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders());Nb((function(e){t(e),u()}),(function(e){n(e),u()}),{data:C&&"text"!==C&&"json"!==C?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:e,request:d}),d=null}d.open(r.method.toUpperCase(),r.url,!0),d.timeout=r.timeout,"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(h)},d.onabort=function(){d&&(n(new Qy("Request aborted",Qy.ECONNABORTED,e,d)),d=null)},d.onerror=function(){n(new Qy("Network Error",Qy.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||gb;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Qy(t,o.clarifyTimeoutError?Qy.ETIMEDOUT:Qy.ECONNABORTED,e,d)),d=null},void 0===o&&i.setContentType(null),"setRequestHeader"in d&&Wy.forEach(i.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),Wy.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),C&&"json"!==C&&(d.responseType=r.responseType),I&&([g,A]=Db(I,!0),d.addEventListener("progress",g)),c&&d.upload&&([s,l]=Db(c),d.upload.addEventListener("progress",s),d.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(a=t=>{d&&(n(!t||t.type?new Ob(null,e,d):t),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);f&&-1===db.protocols.indexOf(f)?n(new Qy("Unsupported protocol "+f+":",Qy.ERR_BAD_REQUEST,e)):d.send(o||null)}))},Zb=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Qy?t:new Ob(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Qy(`timeout ${t} of ms exceeded`,Qy.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=r;return s.unsubscribe=()=>Wy.asap(a),s}},Gb=function*(e,t){let n=e.byteLength;if(!t||n{const o=async function*(e,t){for await(const n of Wb(e))yield*Gb(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},Yb="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Kb=Yb&&"function"==typeof ReadableStream,Qb=Yb&&("function"==typeof TextEncoder?(Xb=new TextEncoder,e=>Xb.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Xb;const qb=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Jb=Kb&&qb((()=>{let e=!1;const t=new Request(db.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),$b=Kb&&qb((()=>Wy.isReadableStream(new Response("").body))),ew={stream:$b&&(e=>e.body)};var tw;Yb&&(tw=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!ew[e]&&(ew[e]=Wy.isFunction(tw[e])?t=>t[e]():(t,n)=>{throw new Qy(`Response type '${e}' is not supported`,Qy.ERR_NOT_SUPPORT,n)})})));const nw=async(e,t)=>{const n=Wy.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Wy.isBlob(e))return e.size;if(Wy.isSpecCompliantForm(e)){const t=new Request(db.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Wy.isArrayBufferView(e)||Wy.isArrayBuffer(e)?e.byteLength:(Wy.isURLSearchParams(e)&&(e+=""),Wy.isString(e)?(await Qb(e)).byteLength:void 0)})(t):n},rw=Yb&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:g,responseType:l,headers:A,withCredentials:C="same-origin",fetchOptions:c}=Vb(e);l=l?(l+"").toLowerCase():"text";let I,u=Zb([o,i&&i.toAbortSignal()],a);const d=u&&u.unsubscribe&&(()=>{u.unsubscribe()});let h;try{if(g&&Jb&&"get"!==n&&"head"!==n&&0!==(h=await nw(A,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Wy.isFormData(r)&&(e=n.headers.get("content-type"))&&A.setContentType(e),n.body){const[e,t]=Mb(h,Db(_b(g)));r=Hb(n.body,65536,e,t)}}Wy.isString(C)||(C=C?"include":"omit");const o="credentials"in Request.prototype;I=new Request(t,{...c,signal:u,method:n.toUpperCase(),headers:A.normalize().toJSON(),body:r,duplex:"half",credentials:o?C:void 0});let i=await fetch(I);const a=$b&&("stream"===l||"response"===l);if($b&&(s||a&&d)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Wy.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&Mb(t,Db(_b(s),!0))||[];i=new Response(Hb(i.body,65536,n,(()=>{r&&r(),d&&d()})),e)}l=l||"text";let f=await ew[Wy.findKey(ew,l)||"text"](i,e);return!a&&d&&d(),await new Promise(((t,n)=>{Nb(t,n,{data:f,headers:Eb.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:I})}))}catch(t){if(d&&d(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Qy("Network Error",Qy.ERR_NETWORK,e,I),{cause:t.cause||t});throw Qy.from(t,t&&t.code,e,I)}}),ow={http:null,xhr:Ub,fetch:rw};Wy.forEach(ow,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const iw=e=>`- ${e}`,aw=e=>Wy.isFunction(e)||null===e||!1===e,sw=e=>{e=Wy.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(iw).join("\n"):" "+iw(e[0]):"as no adapter specified";throw new Qy("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function gw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ob(null,e)}function lw(e){gw(e),e.headers=Eb.from(e.headers),e.data=kb.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return sw(e.adapter||pb.adapter)(e).then((function(t){return gw(e),t.data=kb.call(e,e.transformResponse,t),t.headers=Eb.from(t.headers),t}),(function(t){return Sb(t)||(gw(e),t&&t.response&&(t.response.data=kb.call(e,e.transformResponse,t.response),t.response.headers=Eb.from(t.response.headers))),Promise.reject(t)}))}const Aw="1.7.7",Cw={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Cw[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const cw={};Cw.transitional=function(e,t,n){return(r,o,i)=>{if(!1===e)throw new Qy(function(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}(o," has been removed"+(t?" in "+t:"")),Qy.ERR_DEPRECATED);return t&&!cw[o]&&(cw[o]=!0),!e||e(r,o,i)}};const Iw={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Qy("options must be an object",Qy.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Qy("option "+i+" must be "+n,Qy.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Qy("Unknown option "+i,Qy.ERR_BAD_OPTION)}},validators:Cw},uw=Iw.validators;class dw{constructor(e){this.defaults=e,this.interceptors={request:new sb,response:new sb}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=zb(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Iw.assertOptions(n,{silentJSONParsing:uw.transitional(uw.boolean),forcedJSONParsing:uw.transitional(uw.boolean),clarifyTimeoutError:uw.transitional(uw.boolean)},!1),null!=r&&(Wy.isFunction(r)?t.paramsSerializer={serialize:r}:Iw.assertOptions(r,{encode:uw.function,serialize:uw.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Wy.merge(o.common,o[t.method]);o&&Wy.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Eb.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const g=[];let l;this.interceptors.response.forEach((function(e){g.push(e.fulfilled,e.rejected)}));let A,C=0;if(!s){const e=[lw.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,g),A=e.length,l=Promise.resolve(t);C{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Ob(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;const t=new fw((function(t){e=t}));return{token:t,cancel:e}}}const pw=fw;const mw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mw).forEach((([e,t])=>{mw[t]=e}));const vw=mw;const yw=function e(t){const n=new hw(t),r=ry(hw.prototype.request,n);return Wy.extend(r,hw.prototype,n,{allOwnKeys:!0}),Wy.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(zb(t,n))},r}(pb);yw.Axios=hw,yw.CanceledError=Ob,yw.CancelToken=pw,yw.isCancel=Sb,yw.VERSION=Aw,yw.toFormData=eb,yw.AxiosError=Qy,yw.Cancel=yw.CanceledError,yw.all=function(e){return Promise.all(e)},yw.spread=function(e){return function(t){return e.apply(null,t)}},yw.isAxiosError=function(e){return Wy.isObject(e)&&!0===e.isAxiosError},yw.mergeConfig=zb,yw.AxiosHeaders=Eb,yw.formToJSON=e=>hb(Wy.isHTMLForm(e)?new FormData(e):e),yw.getAdapter=sw,yw.HttpStatusCode=vw,yw.default=yw;const bw=yw,ww=e=>{try{return null==e?void 0:e.split("_")[0]}catch(e){}},xw=()=>{const e=ny.get("csrftoken"),t=od(),n=ey({mutationFn:t=>{let{componentId:n,quantity:r,editMode:o}=t;const i=ww(n);return bw.post("/api/shopping-list/".concat(i,"/anonymous-create-or-update/"),{quantity:r,editMode:o},{headers:{"X-CSRFToken":e},withCredentials:!0})},onSuccess:()=>{t.invalidateQueries(["shoppingList"])}});return n},Ew=()=>{const e=ny.get("csrftoken")||"",t=od(),n=ey({mutationFn:t=>{let{componentId:n,data:r}=t;const o=ww(n);return bw.post("/api/inventory/".concat(o,"/create-or-update/"),r,{headers:{"X-CSRFToken":e},withCredentials:!0})},onSuccess:()=>{t.invalidateQueries({queryKey:["inventory"]}),t.invalidateQueries({queryKey:["authenticatedUserHistory"]})}});return n},kw=["componentId"];function Sw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tw(e){for(var t=1;t{const e=ny.get("csrftoken"),t=od(),n=ey({mutationFn:t=>{let{componentId:n}=t,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{t.invalidateQueries(["shoppingList"])}});return n};var Rw,Pw,Dw,Mw,_w,Lw,jw,Fw,Bw,zw,Vw,Uw,Zw,Gw,Ww,Hw;function Yw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kw(e){for(var t=1;t{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),null==t||t(r),e[r])})})),n}trackProp(e){$w(Ww,this).add(e)}getCurrentQuery(){return $w(Pw,this)}refetch(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Xw({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return this.fetch(Kw({},t))}fetchOptimistic(e){const t=$w(Rw,this).defaultQueryOptions(e),n=$w(Rw,this).getQueryCache().build($w(Rw,this),t);return n.fetch().then((()=>this.createResult(n,t)))}fetch(e){var t;return tx(Hw,this,rx).call(this,Kw(Kw({},e),{},{cancelRefetch:null===(t=e.cancelRefetch)||void 0===t||t})).then((()=>(this.updateResult(),$w(Mw,this))))}createResult(e,t){const n=$w(Pw,this),r=this.options,o=$w(Mw,this),i=$w(_w,this),a=$w(Lw,this),s=e!==n?e.state:$w(Dw,this),{state:g}=e;let l,A=Kw({},g),C=!1;if(t._optimisticResults){const o=this.hasListeners(),i=!o&&cx(e,t),a=o&&ux(e,n,t,r);(i||a)&&(A=Kw(Kw({},A),ou(g.data,e.options))),"isRestoring"===t._optimisticResults&&(A.fetchStatus="idle")}let{error:c,errorUpdatedAt:I,status:u}=A;if(t.select&&void 0!==A.data)if(o&&A.data===(null==i?void 0:i.data)&&t.select===$w(Bw,this))l=$w(zw,this);else try{ex(Bw,this,t.select),l=t.select(A.data),l=iI(null==o?void 0:o.data,l,t),ex(zw,this,l),ex(Fw,this,null)}catch(e){ex(Fw,this,e)}else l=A.data;if(void 0!==t.placeholderData&&void 0===l&&"pending"===u){let e;var d;if(null!=o&&o.isPlaceholderData&&t.placeholderData===(null==a?void 0:a.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(null===(d=$w(Vw,this))||void 0===d?void 0:d.state.data,$w(Vw,this)):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),ex(Fw,this,null)}catch(e){ex(Fw,this,e)}void 0!==e&&(u="success",l=iI(null==o?void 0:o.data,e,t),C=!0)}$w(Fw,this)&&(c=$w(Fw,this),l=$w(zw,this),I=Date.now(),u="error");const h="fetching"===A.fetchStatus,f="pending"===u,p="error"===u,m=f&&h,v=void 0!==l,y={status:u,fetchStatus:A.fetchStatus,isPending:f,isSuccess:"success"===u,isError:p,isInitialLoading:m,isLoading:m,data:l,dataUpdatedAt:A.dataUpdatedAt,error:c,errorUpdatedAt:I,failureCount:A.fetchFailureCount,failureReason:A.fetchFailureReason,errorUpdateCount:A.errorUpdateCount,isFetched:A.dataUpdateCount>0||A.errorUpdateCount>0,isFetchedAfterMount:A.dataUpdateCount>s.dataUpdateCount||A.errorUpdateCount>s.errorUpdateCount,isFetching:h,isRefetching:h&&!f,isLoadingError:p&&!v,isPaused:"paused"===A.fetchStatus,isPlaceholderData:C,isRefetchError:p&&v,isStale:dx(e,t),refetch:this.refetch,promise:$w(jw,this)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===y.status?e.reject(y.error):void 0!==y.data&&e.resolve(y.data)},r=()=>{const e=ex(jw,this,y.promise=TI());t(e)},o=$w(jw,this);switch(o.status){case"pending":e.queryHash===n.queryHash&&t(o);break;case"fulfilled":"error"!==y.status&&y.data===o.value||r();break;case"rejected":"error"===y.status&&y.error===o.reason||r()}}return y}updateResult(e){const t=$w(Mw,this),n=this.createResult($w(Pw,this),this.options);if(ex(_w,this,$w(Pw,this).state),ex(Lw,this,this.options),void 0!==$w(_w,this).data&&ex(Vw,this,$w(Pw,this)),tI(n,t))return;ex(Mw,this,n);const r={};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!$w(Ww,this).size)return!0;const r=new Set(null!=n?n:$w(Ww,this));return this.options.throwOnError&&r.add("error"),Object.keys($w(Mw,this)).some((e=>{const n=e;return $w(Mw,this)[n]!==t[n]&&r.has(n)}))})()&&(r.listeners=!0),tx(Hw,this,Cx).call(this,Kw(Kw({},r),e))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tx(Hw,this,sx).call(this)}});function rx(e){tx(Hw,this,Ax).call(this);let t=$w(Pw,this).fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(Gc)),t}function ox(){tx(Hw,this,gx).call(this);const e=Yc(this.options.staleTime,$w(Pw,this));if(Zc||$w(Mw,this).isStale||!Wc(e))return;const t=Hc($w(Mw,this).dataUpdatedAt,e);ex(Uw,this,setTimeout((()=>{$w(Mw,this).isStale||this.updateResult()}),t+1))}function ix(){var e;return null!==(e="function"==typeof this.options.refetchInterval?this.options.refetchInterval($w(Pw,this)):this.options.refetchInterval)&&void 0!==e&&e}function ax(e){tx(Hw,this,lx).call(this),ex(Gw,this,e),!Zc&&!1!==Kc(this.options.enabled,$w(Pw,this))&&Wc($w(Gw,this))&&0!==$w(Gw,this)&&ex(Zw,this,setInterval((()=>{(this.options.refetchIntervalInBackground||bI.isFocused())&&tx(Hw,this,rx).call(this)}),$w(Gw,this)))}function sx(){tx(Hw,this,ox).call(this),tx(Hw,this,ax).call(this,tx(Hw,this,ix).call(this))}function gx(){$w(Uw,this)&&(clearTimeout($w(Uw,this)),ex(Uw,this,void 0))}function lx(){$w(Zw,this)&&(clearInterval($w(Zw,this)),ex(Zw,this,void 0))}function Ax(){const e=$w(Rw,this).getQueryCache().build($w(Rw,this),this.options);if(e===$w(Pw,this))return;const t=$w(Pw,this);ex(Pw,this,e),ex(Dw,this,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}function Cx(e){II.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e($w(Mw,this))})),$w(Rw,this).getQueryCache().notify({query:$w(Pw,this),type:"observerResultsUpdated"})}))}function cx(e,t){return function(e,t){return!1!==Kc(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Ix(e,t,t.refetchOnMount)}function Ix(e,t,n){if(!1!==Kc(t.enabled,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&dx(e,t)}return!1}function ux(e,t,n,r){return(e!==t||!1===Kc(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&dx(e,n)}function dx(e,t){return!1!==Kc(t.enabled,e)&&e.isStaleByTime(Yc(t.staleTime,e))}function hx(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var fx=Ji.createContext(hx()),px=Ji.createContext(!1),mx=(px.Provider,(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()})));function vx(e,t,n){var r,o,i,a;const s=od(n),g=Ji.useContext(px),l=Ji.useContext(fx),A=s.defaultQueryOptions(e);null===(r=s.getDefaultOptions().queries)||void 0===r||null===(o=r._experimental_beforeQuery)||void 0===o||o.call(r,A),A._optimisticResults=g?"isRestoring":"optimistic",(e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))})(A),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(A,l),(e=>{Ji.useEffect((()=>{e.clearReset()}),[e])})(l);const C=!s.getQueryCache().get(A.queryHash),[c]=Ji.useState((()=>new t(s,A))),I=c.getOptimisticResult(A);if(Ji.useSyncExternalStore(Ji.useCallback((e=>{const t=g?()=>{}:c.subscribe(II.batchCalls(e));return c.updateResult(),t}),[c,g]),(()=>c.getCurrentResult()),(()=>c.getCurrentResult())),Ji.useEffect((()=>{c.setOptions(A,{listeners:!1})}),[A,c]),((e,t)=>(null==e?void 0:e.suspense)&&t.isPending)(A,I))throw mx(A,c,l);if((e=>{let{result:t,errorResetBoundary:n,throwOnError:r,query:o}=e;return t.isError&&!n.isReset()&&!t.isFetching&&o&&Qv(r,[t.error,o])})({result:I,errorResetBoundary:l,throwOnError:A.throwOnError,query:s.getQueryCache().get(A.queryHash)}))throw I.error;if(null===(i=s.getDefaultOptions().queries)||void 0===i||null===(a=i._experimental_afterQuery)||void 0===a||a.call(i,A,I),A.experimental_prefetchInRender&&!Zc&&((e,t)=>e.isLoading&&e.isFetching&&!t)(I,g)){var u;const e=C?mx(A,c,l):null===(u=s.getQueryCache().get(A.queryHash))||void 0===u?void 0:u.promise;null==e||e.catch(Xv).finally((()=>{c.updateResult()}))}return A.notifyOnChangeProps?I:c.trackResult(I)}function yx(e,t){return vx(e,nx,t)}const bx=()=>{const{data:e,isLoading:t,isError:n}=yx({queryFn:async()=>{try{return(await bw.get("/api/get-user-me/",{withCredentials:!0})).data}catch(e){throw new Error("Failed to fetch authenticated user")}},queryKey:["authenticatedUser"]});return{user:e,userIsError:n,userIsLoading:t}},wx=e=>{const t=ww(e),{data:n,isLoading:r,isError:o,error:i}=yx({queryFn:async()=>{try{return(await bw.get("/api/inventory/".concat(t,"/locations/"))).data}catch(e){throw new Error(e.response.data.error)}},queryKey:["componentLocations",t]});return{data:n,error:i,isError:o,isLoading:r}},xx=e=>{const t=ww(e),{data:n,isLoading:r,isError:o}=yx({enabled:!!t,queryFn:async()=>{try{return(await bw.get("/api/shopping-list/".concat(t,"/component-quantity/"))).data.quantity}catch(e){throw new Error(e.response.data.error)}},queryKey:["userAnonymousInventoryQuantity",t]});return{data:n,isError:o,isLoading:r}},Ex=e=>{const t=ww(e),{data:n,isLoading:r,isError:o,error:i}=yx({queryKey:["userInventoryQuantity",t],queryFn:async()=>{try{return(await bw.get("/api/inventory/".concat(t,"/component-quantity/"))).data.quantity}catch(e){throw new Error(e.response.data.error)}}});return{data:n,isLoading:r,isError:o,error:i}},kx=(e,t,n)=>{const r=ww(e),o=ww(t),i=ww(n);return yx({queryFn:async()=>{try{return(await bw.get("/api/shopping-list/".concat(r,"/").concat(o,"/").concat(i,"/component-quantity/"))).data.quantity}catch(n){var e,t;throw new Error((null===(e=n.response)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error)||"Error fetching data")}},queryKey:["userInventoryQuantity",r,o,i]})};function Sx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tx(e){for(var t=1;t{let{open:t,setOpen:n,title:r,text:o,type:i,componentId:a,hookArgs:s,quantityRequired:g,componentName:l}=e;const[A,C]=(0,Ji.useState)(),[c,I]=(0,Ji.useState)(!1),[u,d]=(0,Ji.useState)(),[h,f]=(0,Ji.useState)(!1),[p,m]=(0,Ji.useState)(""),[v,y]=(0,Ji.useState)(!0),{userIsLoading:b,userIsError:w}=bx(),x=Ew(),E=Nw(),k=xw(),{data:S}=Ex(a),{data:T}=xx(a),{data:O}=void 0!==s?kx(...Object.values(s)):{data:void 0},{data:N}=wx(a),R=null!=N?N:[],P=(0,Ji.useCallback)((async()=>{try{i===ld.INVENTORY?await x.mutateAsync({componentId:a,editMode:h,location:Array.isArray(p)?p.join(","):"",quantity:u},{onError:e=>{C("Failed to update inventory: ".concat(e.message))},onSuccess:()=>{n(!1)}}):i===ld.SHOPPING?await E.mutateAsync(Tx(Tx({componentId:a},s),{},{editMode:h,quantity:u}),{onError:e=>{C("Failed to update shopping list: ".concat(e.message))},onSuccess:()=>{n(!1)}}):i===ld.SHOPPING_ANON&&await k.mutateAsync({componentId:a,editMode:h,quantity:u},{onError:e=>{C("Failed to update anonymous shopping list: ".concat(e.message))},onSuccess:()=>{n(!1)}})}catch(e){C("Unexpected error: ".concat(e.message))}}),[i,a,h,p,u,s,x,E,k,n]);(0,Ji.useEffect)((()=>{let e=parseInt(g);h&&(i===ld.SHOPPING?e=parseInt(O):i===ld.SHOPPING_ANON?e=parseInt(T):i===ld.INVENTORY&&(e=parseInt(S))),d(e)}),[g,h,i]);const D=!!S&&i===ld.INVENTORY||!!T&&i===ld.SHOPPING_ANON||!!O&&i===ld.SHOPPING;if(w)return Ji.createElement("div",null,"Error loading user");if(b)return Ji.createElement("div",{className:"text-center text-gray-500 animate-pulse"},"Loading...");const M=Array.isArray(R)?R.map((e=>({locations:e.location||[],quantity:e.quantity}))):[];return Ji.createElement(Ji.Fragment,null,Ji.createElement(ih.Root,{as:Ji.Fragment,show:t&&!c},Ji.createElement(Df,{as:"div",className:"relative",onClose:n},Ji.createElement(ih.Child,{as:Ji.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},Ji.createElement("div",{className:"fixed inset-0 transition-opacity bg-gray-500 bg-opacity-50"})),Ji.createElement("div",{className:"fixed inset-0 overflow-y-auto"},Ji.createElement("div",{className:"flex items-end justify-center min-h-full p-4 text-center sm:items-center sm:p-0"},Ji.createElement(ih.Child,{as:Ji.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},Ji.createElement(Df.Panel,{className:"relative px-4 pt-5 pb-4 overflow-hidden text-left transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:w-full sm:p-6 md:max-w-lg"},Ji.createElement("div",null,Ji.createElement("div",{className:"mt-3 text-center sm:text-left"},Ji.createElement(Df.Title,{as:"h3",className:"text-base font-semibold leading-6 text-gray-900"},r),Ji.createElement("div",{className:"mt-2"},o&&Ji.createElement("p",{className:"pt-3 text-sm text-gray-500"},o),D&&Ji.createElement("div",{className:"pt-3 text-gray-700"},"Your"," ","shopping_anon"===i?"shopping list":i," ","already contains"," ",Ji.createElement(Ad,{hookArgs:s?Object.values(s):[a],replaceZero:!1,type:i,useHook:i===ld.INVENTORY?Ex:i===ld.SHOPPING?kx:xx}),h?". Edit quantity to be ".concat(u,"?"):". Add ".concat(u," more?")),h?Ji.createElement("div",{className:"my-6"},Ji.createElement("label",{className:"block mb-1 font-medium text-gray-700",htmlFor:"quantityInput"},"Edit ".concat(i===ld.INVENTORY?"inventory":"shopping list"," quantity:")),Ji.createElement("div",{className:"flex items-center w-full gap-2"},Ji.createElement("div",null,Ji.createElement("div",{className:"sm:w-2/5 md:w-1/5"},Ji.createElement(Ov(),{className:"h-8 pl-2 border border-gray-300 rounded-md focus:border-brandgreen-500 focus:ring-1 focus:ring-brandgreen-500",id:"quantityInput",min:1,onChange:e=>d(e),type:"number",value:null!=u?u:1}))),Ji.createElement("div",{className:"text-blue-500 hover:text-blue-700",onClick:()=>f((e=>!e)),role:"button"},"or add to ".concat(i===ld.INVENTORY?"inventory":"shopping list")))):Ji.createElement("div",{className:"my-6"},Ji.createElement("label",{className:"block mb-1 font-medium text-gray-700",htmlFor:"quantityInput"},"Quantity to add:"),Ji.createElement("div",{className:"flex items-center w-full gap-2"},Ji.createElement("div",null,Ji.createElement("div",{className:"sm:w-2/5 md:w-1/5"},Ji.createElement(Ov(),{className:"h-8 pl-2 border border-gray-300 rounded-md focus:border-brandgreen-500 focus:ring-1 focus:ring-brandgreen-500",id:"quantityInput",min:1,onChange:e=>d(e),type:"number",value:null!=u?u:1}))),Ji.createElement("div",{className:"text-blue-500 hover:text-blue-700",onClick:()=>f((e=>!e)),role:"button"},"or edit ".concat(i===ld.INVENTORY?"inventory":"shopping list"))))))),i===ld.INVENTORY&&Ji.createElement("div",{className:"p-4 mt-4 mb-2 bg-gray-100 rounded-md"},Ji.createElement("p",{className:"my-2 text-xs text-slate-500"},"Specify the location where you will store this item in your inventory. Separate locations with commas."),Ji.createElement(Pv,{isEditable:v,locationArray:p,setIsEditable:y,showSeparateLocationsWithCommas:!1,submitLocationChange:m})),i===ld.INVENTORY&&M.length>0&&Ji.createElement("div",null,Ji.createElement(lv,{title:"Your inventory locations for ".concat(l)},Ji.createElement("div",{className:"p-4 rounded-md bg-blue-50"},Ji.createElement("p",{className:"mb-4 text-xs text-slate-500"},"It looks like you already have this component in your inventory. Click to select a pre-existing location."),Ji.createElement(Sv,{data:M,onRowClicked:e=>{m(e.locations),y(!1)},pointerEvents:"pointer-events-none"})))),Ji.createElement("div",{className:"flex gap-2 mt-5 sm:mt-4 sm:flex-row-reverse flex-nowrap"},Ji.createElement(uv,{onClick:()=>{P()},variant:"primary"},h?"Update":"Add"),Ji.createElement(uv,{onClick:()=>n(!1),variant:"muted"},"Cancel")),Ji.createElement("div",{className:"bg-red-500"},A))))))),Ji.createElement(bv,{message:"Please become a subscriber to add more than 3 modules to your shopping list.",onClickCancel:()=>I(!1),onClickSupport:()=>yv(),open:c,title:"Limit reached: three modules already in shopping list"}))};var Rx=Object.defineProperty,Px=(e,t,n)=>((e,t,n)=>t in e?Rx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Dx=new Map,Mx=new WeakMap,_x=0,Lx=void 0;function jx(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(Mx.has(n)||(_x+=1,Mx.set(n,_x.toString())),Mx.get(n)):"0"):e[t]}`;var n})).toString()}function Fx(e,t,n={},r=Lx){if(void 0===window.IntersectionObserver&&void 0!==r){const o=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:o,observer:i,elements:a}=function(e){const t=jx(e);let n=Dx.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver((t=>{t.forEach((t=>{var n;const i=t.isIntersecting&&o.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=r.get(t.target))||n.forEach((e=>{e(i,t)}))}))}),e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},Dx.set(t,n)}return n}(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),i.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),i.unobserve(e)),0===a.size&&(i.disconnect(),Dx.delete(o))}}Ji.Component;var Bx=tE(),zx=e=>qx(e,Bx),Vx=tE();zx.write=e=>qx(e,Vx);var Ux=tE();zx.onStart=e=>qx(e,Ux);var Zx=tE();zx.onFrame=e=>qx(e,Zx);var Gx=tE();zx.onFinish=e=>qx(e,Gx);var Wx=[];zx.setTimeout=(e,t)=>{const n=zx.now()+t,r=()=>{const e=Wx.findIndex((e=>e.cancel==r));~e&&Wx.splice(e,1),Qx-=~e?1:0},o={time:n,handler:e,cancel:r};return Wx.splice(Hx(n),0,o),Qx+=1,Jx(),o};var Hx=e=>~(~Wx.findIndex((t=>t.time>e))||~Wx.length);zx.cancel=e=>{Ux.delete(e),Zx.delete(e),Gx.delete(e),Bx.delete(e),Vx.delete(e)},zx.sync=e=>{Xx=!0,zx.batchedUpdates(e),Xx=!1},zx.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,zx.onStart(n)}return r.handler=e,r.cancel=()=>{Ux.delete(n),t=null},r};var Yx="undefined"!=typeof window?window.requestAnimationFrame:()=>{};zx.use=e=>Yx=e,zx.now="undefined"!=typeof performance?()=>performance.now():Date.now,zx.batchedUpdates=e=>e(),zx.catch=console.error,zx.frameLoop="always",zx.advance=()=>{"demand"!==zx.frameLoop||eE()};var Kx=-1,Qx=0,Xx=!1;function qx(e,t){Xx?(t.delete(e),e(0)):(t.add(e),Jx())}function Jx(){Kx<0&&(Kx=0,"demand"!==zx.frameLoop&&Yx($x))}function $x(){~Kx&&(Yx($x),zx.batchedUpdates(eE))}function eE(){const e=Kx;Kx=zx.now();const t=Hx(Kx);t&&(nE(Wx.splice(0,t),(e=>e.handler())),Qx-=t),Qx?(Ux.flush(),Bx.flush(e?Math.min(64,Kx-e):16.667),Zx.flush(),Vx.flush(),Gx.flush()):Kx=-1}function tE(){let e=new Set,t=e;return{add(n){Qx+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Qx-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Qx-=t.size,nE(t,(t=>t(n)&&e.add(t))),Qx+=e.size,t=e)}}}function nE(e,t){e.forEach((e=>{try{t(e)}catch(e){zx.catch(e)}}))}var rE=Object.defineProperty,oE={};function iE(){}((e,t)=>{for(var n in t)rE(e,n,{get:t[n],enumerable:!0})})(oE,{assign:()=>mE,colors:()=>hE,createStringInterpolator:()=>cE,skipAnimation:()=>fE,to:()=>IE,willAdvance:()=>pE});var aE={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function sE(e,t){if(aE.arr(e)){if(!aE.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function lE(e,t,n){if(aE.arr(e))for(let r=0;raE.und(e)?[]:aE.arr(e)?e:[e];function CE(e,t){if(e.size){const n=Array.from(e);e.clear(),gE(n,t)}}var cE,IE,uE=(e,...t)=>CE(e,(e=>e(...t))),dE=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),hE=null,fE=!1,pE=iE,mE=e=>{e.to&&(IE=e.to),e.now&&(zx.now=e.now),void 0!==e.colors&&(hE=e.colors),null!=e.skipAnimation&&(fE=e.skipAnimation),e.createStringInterpolator&&(cE=e.createStringInterpolator),e.requestAnimationFrame&&zx.use(e.requestAnimationFrame),e.batchedUpdates&&(zx.batchedUpdates=e.batchedUpdates),e.willAdvance&&(pE=e.willAdvance),e.frameLoop&&(zx.frameLoop=e.frameLoop)},vE=new Set,yE=[],bE=[],wE=0,xE={get idle(){return!vE.size&&!yE.length},start(e){wE>e.priority?(vE.add(e),zx.onStart(EE)):(kE(e),zx(TE))},advance:TE,sort(e){if(wE)zx.onFrame((()=>xE.sort(e)));else{const t=yE.indexOf(e);~t&&(yE.splice(t,1),SE(e))}},clear(){yE=[],vE.clear()}};function EE(){vE.forEach(kE),vE.clear(),zx(TE)}function kE(e){yE.includes(e)||SE(e)}function SE(e){yE.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(yE,(t=>t.priority>e.priority)),0,e)}function TE(e){const t=bE;for(let n=0;n0}var OE="[-+]?\\d*\\.?\\d+",NE=OE+"%";function RE(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var PE=new RegExp("rgb"+RE(OE,OE,OE)),DE=new RegExp("rgba"+RE(OE,OE,OE,OE)),ME=new RegExp("hsl"+RE(OE,NE,NE)),_E=new RegExp("hsla"+RE(OE,NE,NE,OE)),LE=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,jE=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,FE=/^#([0-9a-fA-F]{6})$/,BE=/^#([0-9a-fA-F]{8})$/;function zE(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function VE(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=zE(o,r,e+1/3),a=zE(o,r,e),s=zE(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function UE(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ZE(e){return(parseFloat(e)%360+360)%360/360}function GE(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function WE(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function HE(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=FE.exec(e))?parseInt(t[1]+"ff",16)>>>0:hE&&void 0!==hE[e]?hE[e]:(t=PE.exec(e))?(UE(t[1])<<24|UE(t[2])<<16|UE(t[3])<<8|255)>>>0:(t=DE.exec(e))?(UE(t[1])<<24|UE(t[2])<<16|UE(t[3])<<8|GE(t[4]))>>>0:(t=LE.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=BE.exec(e))?parseInt(t[1],16)>>>0:(t=jE.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ME.exec(e))?(255|VE(ZE(t[1]),WE(t[2]),WE(t[3])))>>>0:(t=_E.exec(e))?(VE(ZE(t[1]),WE(t[2]),WE(t[3]))|GE(t[4]))>>>0:null}(e);if(null===t)return e;t=t||0;return`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`}var YE=(e,t,n)=>{if(aE.fun(e))return e;if(aE.arr(e))return YE({range:e,output:t,extrapolate:n});if(aE.str(e.output[0]))return cE(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",g=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,s,g){let l=g?g(e):e;if(ln){if("identity"===s)return l;"clamp"===s&&(l=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=i(l),r===-1/0?l=-l:o===1/0?l+=r:l=l*(o-r)+r;return l}(e,i[t],i[t+1],o[t],o[t+1],g,a,s,r.map)}};var KE=1.70158,QE=1.525*KE,XE=KE+1,qE=2*Math.PI/3,JE=2*Math.PI/4.5,$E=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},ek={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>XE*e*e*e-KE*e*e,easeOutBack:e=>1+XE*Math.pow(e-1,3)+KE*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-QE)/2:(Math.pow(2*e-2,2)*((QE+1)*(2*e-2)+QE)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*qE),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*qE)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*JE)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*JE)/2+1,easeInBounce:e=>1-$E(1-e),easeOutBounce:$E,easeInOutBounce:e=>e<.5?(1-$E(1-2*e))/2:(1+$E(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}},tk=Symbol.for("FluidValue.get"),nk=Symbol.for("FluidValue.observers"),rk=e=>Boolean(e&&e[tk]),ok=e=>e&&e[tk]?e[tk]():e,ik=e=>e[nk]||null;function ak(e,t){const n=e[nk];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var sk=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");gk(this,e)}},gk=(e,t)=>ck(e,tk,t);function lk(e,t){if(e[tk]){let n=e[nk];n||ck(e,nk,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ak(e,t){const n=e[nk];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[nk]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Ck,ck=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ik=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,uk=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,dk=new RegExp(`(${Ik.source})(%|[a-z]+)`,"i"),hk=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,fk=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,pk=e=>{const[t,n]=mk(e);if(!t||dE())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&fk.test(n)?pk(n):n||e},mk=e=>{const t=fk.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},vk=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,yk=e=>{Ck||(Ck=hE?new RegExp(`(${Object.keys(hE).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>ok(e).replace(fk,pk).replace(uk,HE).replace(Ck,HE))),n=t.map((e=>e.match(Ik).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),o=r.map((t=>YE({...e,output:t})));return e=>{const n=!dk.test(t[0])&&t.find((e=>dk.test(e)))?.replace(Ik,"");let r=0;return t[0].replace(Ik,(()=>`${o[r++](e)}${n||""}`)).replace(hk,vk)}},bk="react-spring: ",wk=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${bk}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},xk=wk(console.warn);var Ek=wk(console.warn);function kk(e){return aE.str(e)&&("#"==e[0]||/\d/.test(e)||!dE()&&fk.test(e)||e in(hE||{}))}var Sk=dE()?Ji.useEffect:Ji.useLayoutEffect;function Tk(){const e=(0,Ji.useState)()[1],t=(()=>{const e=(0,Ji.useRef)(!1);return Sk((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var Ok=e=>(0,Ji.useEffect)(e,Nk),Nk=[];function Rk(e){const t=(0,Ji.useRef)();return(0,Ji.useEffect)((()=>{t.current=e})),t.current}var Pk=Symbol.for("Animated:node"),Dk=e=>e&&e[Pk],Mk=(e,t)=>{return n=e,r=Pk,o=t,Object.defineProperty(n,r,{value:o,writable:!0,configurable:!0});var n,r,o},_k=e=>e&&e[Pk]&&e[Pk].getPayload(),Lk=class{constructor(){Mk(this,this)}getPayload(){return this.payload||[]}},jk=class extends Lk{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,aE.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new jk(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return aE.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,aE.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Fk=class extends jk{constructor(e){super(0),this._string=null,this._toString=YE({output:[e,e]})}static create(e){return new Fk(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(aE.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=YE({output:[this.getValue(),e]})),this._value=0,super.reset()}},Bk={dependencies:null},zk=class extends Lk{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return lE(this.source,((n,r)=>{var o;(o=n)&&o[Pk]===o?t[r]=n.getValue(e):rk(n)?t[r]=ok(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&gE(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return lE(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Bk.dependencies&&rk(e)&&Bk.dependencies.add(e);const t=_k(e);t&&gE(t,(e=>this.add(e)))}},Vk=class extends zk{constructor(e){super(e)}static create(e){return new Vk(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Uk)),!0)}};function Uk(e){return(kk(e)?Fk:jk).create(e)}function Zk(e){const t=Dk(e);return t?t.constructor:aE.arr(e)?Vk:kk(e)?Fk:jk}var Gk=(e,t)=>{const n=!aE.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ji.forwardRef)(((r,o)=>{const i=(0,Ji.useRef)(null),a=n&&(0,Ji.useCallback)((e=>{i.current=function(e,t){e&&(aE.fun(e)?e(t):e.current=t);return t}(o,e)}),[o]),[s,g]=function(e,t){const n=new Set;Bk.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)});return e=new zk(e),Bk.dependencies=null,[e,n]}(r,t),l=Tk(),A=()=>{const e=i.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&l()},C=new Wk(A,g),c=(0,Ji.useRef)();Sk((()=>(c.current=C,gE(g,(e=>lk(e,C))),()=>{c.current&&(gE(c.current.deps,(e=>Ak(e,c.current))),zx.cancel(c.current.update))}))),(0,Ji.useEffect)(A,[]),Ok((()=>()=>{const e=c.current;gE(e.deps,(t=>Ak(t,e)))}));const I=t.getComponentProps(s.getValue());return Ji.createElement(e,{...I,ref:a})}))},Wk=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&zx.write(this.update)}};var Hk=Symbol.for("AnimatedComponent"),Yk=e=>aE.str(e)?e:e&&aE.str(e.displayName)?e.displayName:aE.fun(e)&&e.name||null;function Kk(e,...t){return aE.fun(e)?e(...t):e}var Qk=(e,t)=>!0===e||!!(t&&e&&(aE.fun(e)?e(t):AE(e).includes(t))),Xk=(e,t)=>aE.obj(e)?t&&e[t]:e,qk=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Jk=e=>e,$k=(e,t=Jk)=>{let n=eS;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);aE.und(n)||(r[o]=n)}return r},eS=["config","onProps","onStart","onChange","onPause","onResume","onRest"],tS={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function nS(e){const t=function(e){const t={};let n=0;if(lE(e,((e,r)=>{tS[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return lE(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function rS(e){return e=ok(e),aE.arr(e)?e.map(rS):kk(e)?oE.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function oS(e){for(const t in e)return!0;return!1}function iS(e){return aE.fun(e)||aE.arr(e)&&aE.obj(e[0])}function aS(e,t){e.ref?.delete(e),t?.delete(e)}function sS(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var gS={tension:170,friction:26,mass:1,damping:1,easing:ek.linear,clamp:!1},lS=class{constructor(){this.velocity=0,Object.assign(this,gS)}};function AS(e,t){if(aE.und(t.decay)){const n=!aE.und(t.tension)||!aE.und(t.friction);!n&&aE.und(t.frequency)&&aE.und(t.damping)&&aE.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var CS=[],cS=class{constructor(){this.changed=!1,this.values=CS,this.toValues=null,this.fromValues=CS,this.config=new lS,this.immediate=!1}};function IS(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise(((a,s)=>{let g,l,A=Qk(n.cancel??r?.cancel,t);if(A)I();else{aE.und(n.pause)||(o.paused=Qk(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||Qk(e,t)),g=Kk(n.delay||0,t),e?(o.resumeQueue.add(c),i.pause()):(i.resume(),c())}function C(){o.resumeQueue.add(c),o.timeouts.delete(l),l.cancel(),g=l.time-zx.now()}function c(){g>0&&!oE.skipAnimation?(o.delayed=!0,l=zx.setTimeout(I,g),o.pauseQueue.add(C),o.timeouts.add(l)):I()}function I(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(C),o.timeouts.delete(l),e<=(o.cancelId||0)&&(A=!0);try{i.start({...n,callId:e,cancel:A},a)}catch(e){s(e)}}}))}var uS=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?fS(e.get()):t.every((e=>e.noop))?dS(e.get()):hS(e.get(),t.every((e=>e.finished))),dS=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),hS=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),fS=e=>({value:e,cancelled:!0,finished:!1});function pS(e,t,n,r){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:s,promise:g}=n;return i||e!==s||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const l=$k(t,((e,t)=>"onRest"===t?void 0:e));let A,C;const c=new Promise(((e,t)=>(A=e,C=t))),I=e=>{const t=o<=(n.cancelId||0)&&fS(r)||o!==n.asyncId&&hS(r,!1);if(t)throw e.result=t,C(e),e},u=(e,t)=>{const i=new vS,a=new yS;return(async()=>{if(oE.skipAnimation)throw mS(n),a.result=hS(r,!1),C(a),a;I(i);const s=aE.obj(e)?{...e}:{...t,to:e};s.parentId=o,lE(l,((e,t)=>{aE.und(s[t])&&(s[t]=e)}));const g=await r.start(s);return I(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),g})()};let d;if(oE.skipAnimation)return mS(n),hS(r,!1);try{let t;t=aE.arr(e)?(async e=>{for(const t of e)await u(t)})(e):Promise.resolve(e(u,r.stop.bind(r))),await Promise.all([t.then(A),c]),d=hS(r.get(),!0,!1)}catch(e){if(e instanceof vS)d=e.result;else{if(!(e instanceof yS))throw e;d=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?g:void 0)}return aE.fun(a)&&zx.batchedUpdates((()=>{a(d,r,r.item)})),d})():g}function mS(e,t){CE(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var vS=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},yS=class extends Error{constructor(){super("SkipAnimationSignal")}},bS=e=>e instanceof xS,wS=1,xS=class extends sk{constructor(){super(...arguments),this.id=wS++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Dk(this);return e&&e.getValue()}to(...e){return oE.to(this,e)}interpolate(...e){return xk(`${bk}The "interpolate" function is deprecated in v9 (use "to" instead)`),oE.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){ak(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||xE.sort(this),ak(this,{type:"priority",parent:this,priority:e})}},ES=Symbol.for("SpringPhase"),kS=e=>(1&e[ES])>0,SS=e=>(2&e[ES])>0,TS=e=>(4&e[ES])>0,OS=(e,t)=>t?e[ES]|=3:e[ES]&=-3,NS=(e,t)=>t?e[ES]|=4:e[ES]&=-5,RS=class extends xS{constructor(e,t){if(super(),this.animation=new cS,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!aE.und(e)||!aE.und(t)){const n=aE.obj(e)?{...e}:{...t,from:e};aE.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(SS(this)||this._state.asyncTo)||TS(this)}get goal(){return ok(this.animation.to)}get velocity(){const e=Dk(this);return e instanceof jk?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return kS(this)}get isAnimating(){return SS(this)}get isPaused(){return TS(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=_k(r.to);!a&&rk(r.to)&&(o=AE(ok(r.to))),r.values.forEach(((s,g)=>{if(s.done)return;const l=s.constructor==Fk?1:a?a[g].lastPosition:o[g];let A=r.immediate,C=l;if(!A){if(C=s.lastPosition,i.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=r.fromValues[g],o=null!=s.v0?s.v0:s.v0=aE.arr(i.velocity)?i.velocity[g]:i.velocity;let a;const c=i.precision||(n==l?.005:Math.min(1,.001*Math.abs(l-n)));if(aE.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);C=n+o/(1-e)*(1-r),A=Math.abs(s.lastPosition-C)<=c,a=o*r}else{a=null==s.lastVelocity?o:s.lastVelocity;const t=i.restVelocity||c/10,r=i.clamp?0:i.bounce,g=!aE.und(r),I=n==l?s.v0>0:nt,u||(A=Math.abs(l-C)<=c,!A));++e){g&&(d=C==l||C>l==I,d&&(a=-a*r,C=l));a+=(1e-6*-i.tension*(C-l)+.001*-i.friction*a)/i.mass*h,C+=a*h}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),C=n+i.easing(r)*(l-n),a=(C-s.lastPosition)/e,A=1==r}s.lastVelocity=a,Number.isNaN(C)&&(A=!0)}a&&!a[g].done&&(A=!1),A?s.done=!0:t=!1,s.setValue(C,i.round)&&(n=!0)}));const s=Dk(this),g=s.getValue();if(t){const e=ok(r.to);g===e&&!n||i.decay?n&&i.decay&&this._onChange(g):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(g)}set(e){return zx.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(SS(this)){const{to:e,config:t}=this.animation;zx.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return aE.und(e)?(n=this.queue||[],this.queue=[]):n=[aE.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>uS(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),mS(this._state,e&&this._lastCallId),zx.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=aE.obj(n)?n[t]:n,(null==n||iS(n))&&(n=void 0),r=aE.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return kS(this)||(e.reverse&&([n,r]=[r,n]),r=ok(r),aE.und(r)?Dk(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,$k(e,((e,t)=>/^on/.test(t)?Xk(e,n):e))),FS(this,e,"onProps"),BS(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return IS(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{TS(this)||(NS(this,!0),uE(i.pauseQueue),BS(this,"onPause",hS(this,PS(this,this.animation.to)),this))},resume:()=>{TS(this)&&(NS(this,!1),SS(this)&&this._resume(),uE(i.resumeQueue),BS(this,"onResume",hS(this,PS(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=DS(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(fS(this));const r=!aE.und(e.to),o=!aE.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(fS(this));this._lastToId=t.callId}const{key:i,defaultProps:a,animation:s}=this,{to:g,from:l}=s;let{to:A=g,from:C=l}=e;!o||r||t.default&&!aE.und(A)||(A=C),t.reverse&&([A,C]=[C,A]);const c=!sE(C,l);c&&(s.from=C),C=ok(C);const I=!sE(A,g);I&&this._focus(A);const u=iS(t.to),{config:d}=s,{decay:h,velocity:f}=d;(r||o)&&(d.velocity=0),t.config&&!u&&function(e,t,n){n&&(AS(n={...n},t),t={...n,...t}),AS(e,t),Object.assign(e,t);for(const t in gS)null==e[t]&&(e[t]=gS[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;aE.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(d,Kk(t.config,i),t.config!==a.config?Kk(a.config,i):void 0);let p=Dk(this);if(!p||aE.und(A))return n(hS(this,!0));const m=aE.und(t.reset)?o&&!t.default:!aE.und(C)&&Qk(t.reset,i),v=m?C:this.get(),y=rS(A),b=aE.num(y)||aE.arr(y)||kk(y),w=!u&&(!b||Qk(a.immediate||t.immediate,i));if(I){const e=Zk(A);if(e!==p.constructor){if(!w)throw Error(`Cannot animate between ${p.constructor.name} and ${e.name}, as the "to" prop suggests`);p=this._set(y)}}const x=p.constructor;let E=rk(A),k=!1;if(!E){const e=m||!kS(this)&&c;(I||e)&&(k=sE(rS(v),y),E=!k),(sE(s.immediate,w)||w)&&sE(d.decay,h)&&sE(d.velocity,f)||(E=!0)}if(k&&SS(this)&&(s.changed&&!m?E=!0:E||this._stop(g)),!u&&((E||rk(g))&&(s.values=p.getPayload(),s.toValues=rk(A)?null:x==Fk?[1]:AE(y)),s.immediate!=w&&(s.immediate=w,w||m||this._set(g)),E)){const{onRest:e}=s;gE(jS,(e=>FS(this,t,e)));const r=hS(this,PS(this,g));uE(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&zx.batchedUpdates((()=>{s.changed=!m,e?.(r,this),m?Kk(a.onRest,r):s.onStart?.(r,this)}))}m&&this._set(v),u?n(pS(t.to,t,this._state,this)):E?this._start():SS(this)&&!I?this._pendingCalls.add(n):n(dS(v))}_focus(e){const t=this.animation;e!==t.to&&(ik(this)&&this._detach(),t.to=e,ik(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;rk(t)&&(lk(t,this),bS(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;rk(e)&&Ak(e,this)}_set(e,t=!0){const n=ok(e);if(!aE.und(n)){const e=Dk(this);if(!e||!sE(n,e.getValue())){const r=Zk(n);e&&e.constructor==r?e.setValue(n):Mk(this,r.create(n)),e&&zx.batchedUpdates((()=>{this._onChange(n,t)}))}}return Dk(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,BS(this,"onStart",hS(this,PS(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Kk(this.animation.onChange,e,this)),Kk(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Dk(this).reset(ok(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),SS(this)||(OS(this,!0),TS(this)||this._resume())}_resume(){oE.skipAnimation?this.finish():xE.start(this)}_stop(e,t){if(SS(this)){OS(this,!1);const n=this.animation;gE(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),ak(this,{type:"idle",parent:this});const r=t?fS(this.get()):hS(this.get(),PS(this,e??n.to));uE(this._pendingCalls,r),n.changed&&(n.changed=!1,BS(this,"onRest",r,this))}}};function PS(e,t){const n=rS(t);return sE(rS(e.get()),n)}function DS(e,t=e.loop,n=e.to){const r=Kk(t);if(r){const o=!0!==r&&nS(r),i=(o||e).reverse,a=!o||o.reset;return MS({...e,loop:t,default:!1,pause:void 0,to:!i||iS(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function MS(e){const{to:t,from:n}=e=nS(e),r=new Set;return aE.obj(t)&&LS(t,r),aE.obj(n)&&LS(n,r),e.keys=r.size?Array.from(r):null,e}function _S(e){const t=MS(e);return aE.und(t.default)&&(t.default=$k(t)),t}function LS(e,t){lE(e,((e,n)=>null!=e&&t.add(n)))}var jS=["onStart","onRest","onChange","onPause","onResume"];function FS(e,t,n){e.animation[n]=t[n]!==qk(t,n)?Xk(t[n],e.key):void 0}function BS(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var zS=["onStart","onChange","onRest"],VS=1,US=class{constructor(e,t){this.id=VS++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];aE.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(MS(e)),this}start(e){let{queue:t}=this;return e?t=AE(e).map(MS):this.queue=[],this._flush?this._flush(this,t):(QS(this,t),ZS(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;gE(AE(t),(t=>n[t].stop(!!e)))}else mS(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(aE.und(e))this.start({pause:!0});else{const t=this.springs;gE(AE(e),(e=>t[e].pause()))}return this}resume(e){if(aE.und(e))this.start({pause:!1});else{const t=this.springs;gE(AE(e),(e=>t[e].resume()))}return this}each(e){lE(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,CE(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&t.size&&CE(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),i&&(this._started=!1,CE(n,(([e,t])=>{t.value=a,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}zx.onFrame(this._onFrame)}};function ZS(e,t){return Promise.all(t.map((t=>GS(e,t)))).then((t=>uS(e,t)))}async function GS(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:g}=t,l=aE.obj(t.default)&&t.default;a&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const A=aE.arr(o)||aE.fun(o)?o:void 0;A?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):gE(zS,(n=>{const r=t[n];if(aE.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},l&&(l[n]=t[n])}}));const C=e._state;t.pause===!C.paused?(C.paused=t.pause,uE(t.pause?C.pauseQueue:C.resumeQueue)):C.paused&&(t.pause=!0);const c=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),I=!0===t.cancel||!0===qk(t,"cancel");(A||I&&C.asyncId)&&c.push(IS(++e._lastAsyncId,{props:t,state:C,actions:{pause:iE,resume:iE,start(t,n){I?(mS(C,e._lastAsyncId),n(fS(e))):(t.onRest=s,n(pS(A,t,C,e)))}}})),C.paused&&await new Promise((e=>{C.resumeQueue.add(e)}));const u=uS(e,await Promise.all(c));if(a&&u.finished&&(!n||!u.noop)){const n=DS(t,a,o);if(n)return QS(e,[n]),GS(e,n,!0)}return g&&zx.batchedUpdates((()=>g(u,e,e.item))),u}function WS(e,t){const n={...e.springs};return t&&gE(AE(t),(e=>{aE.und(e.keys)&&(e=MS(e)),aE.obj(e.to)||(e={...e,to:void 0}),KS(n,e,(e=>YS(e)))})),HS(e,n),n}function HS(e,t){lE(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,lk(t,e))}))}function YS(e,t){const n=new RS;return n.key=e,t&&lk(n,t),n}function KS(e,t,n){t.keys&&gE(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function QS(e,t){gE(t,(t=>{KS(e.springs,t,(t=>YS(t,e)))}))}var XS=({children:e,...t})=>{const n=(0,Ji.useContext)(qS),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,Ji.useState)((()=>({inputs:t,result:e()}))),r=(0,Ji.useRef)(),o=r.current;let i=o;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:o})),[r,o]);const{Provider:i}=qS;return Ji.createElement(i,{value:t},e)},qS=function(e,t){return Object.assign(e,Ji.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(XS,{});XS.Provider=qS.Provider,XS.Consumer=qS.Consumer;var JS=()=>{const e=[],t=function(t){Ek(`${bk}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return gE(e,((e,o)=>{if(aE.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return gE(e,(e=>e.pause(...arguments))),this},t.resume=function(){return gE(e,(e=>e.resume(...arguments))),this},t.set=function(t){gE(e,((e,n)=>{const r=aE.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){const n=[];return gE(e,((e,r)=>{if(aE.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return gE(e,(e=>e.stop(...arguments))),this},t.update=function(t){return gE(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return aE.fun(e)?e(n,t):e};return t._getProps=n,t};function $S(e,t,n){const r=aE.fun(t)&&t;r&&!n&&(n=[]);const o=(0,Ji.useMemo)((()=>r||3==arguments.length?JS():void 0),[]),i=(0,Ji.useRef)(0),a=Tk(),s=(0,Ji.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=WS(e,t);return i.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?ZS(e,t):new Promise((r=>{HS(e,n),s.queue.push((()=>{r(ZS(e,t))})),a()}))}})),[]),g=(0,Ji.useRef)([...s.ctrls]),l=[],A=Rk(e)||0;function C(e,n){for(let o=e;o{gE(g.current.slice(e,A),(e=>{aS(e,o),e.stop(!0)})),g.current.length=e,C(A,e)}),[e]),(0,Ji.useMemo)((()=>{C(0,Math.min(A,e))}),n);const c=g.current.map(((e,t)=>WS(e,l[t]))),I=(0,Ji.useContext)(XS),u=Rk(I),d=I!==u&&oS(I);Sk((()=>{i.current++,s.ctrls=g.current;const{queue:e}=s;e.length&&(s.queue=[],gE(e,(e=>e()))),gE(g.current,((e,t)=>{o?.add(e),d&&e.start({default:I});const n=l[t];n&&(sS(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),Ok((()=>()=>{gE(s.ctrls,(e=>e.stop(!0)))}));const h=c.map((e=>({...e})));return o?[h,o]:h}function eT(e,t){const n=aE.fun(e),[[r],o]=$S(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}var tT=class extends xS{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=YE(...t);const n=this._get(),r=Zk(n);Mk(this,r.create(n))}advance(e){const t=this._get();sE(t,this.get())||(Dk(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&rT(this._active)&&oT(this)}_get(){const e=aE.arr(this.source)?this.source.map(ok):AE(ok(this.source));return this.calc(...e)}_start(){this.idle&&!rT(this._active)&&(this.idle=!1,gE(_k(this),(e=>{e.done=!1})),oE.skipAnimation?(zx.batchedUpdates((()=>this.advance())),oT(this)):xE.start(this))}_attach(){let e=1;gE(AE(this.source),(t=>{rk(t)&&lk(t,this),bS(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){gE(AE(this.source),(e=>{rk(e)&&Ak(e,this)})),this._active.clear(),oT(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=AE(this.source).reduce(((e,t)=>Math.max(e,(bS(t)?t.priority:0)+1)),0))}};function nT(e){return!1!==e.idle}function rT(e){return!e.size||Array.from(e).every(nT)}function oT(e){e.idle||(e.idle=!0,gE(_k(e),(e=>{e.done=!0})),ak(e,{type:"idle",parent:e}))}oE.assign({createStringInterpolator:yk,to:(e,t)=>new tT(e,t)});xE.advance;var iT=/^--/;function aT(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||iT.test(e)||gT.hasOwnProperty(e)&&gT[e]?(""+t).trim():t+"px"}var sT={};var gT={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lT=["Webkit","Ms","Moz","O"];gT=Object.keys(gT).reduce(((e,t)=>(lT.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),gT);var AT=/^(matrix|translate|scale|rotate|skew)/,CT=/^(translate)/,cT=/^(rotate|skew)/,IT=(e,t)=>aE.num(e)&&0!==e?e+t:e,uT=(e,t)=>aE.arr(e)?e.every((e=>uT(e,t))):aE.num(e)?e===t:parseFloat(e)===t,dT=class extends zk{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>IT(e,"px"))).join(",")})`,uT(e,0)]))),lE(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(AT.test(t)){if(delete r[t],aE.und(e))return;const n=CT.test(t)?"px":cT.test(t)?"deg":"";o.push(AE(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${IT(o,n)})`,uT(o,0)]:e=>[`${t}(${e.map((e=>IT(e,n))).join(",")})`,uT(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new hT(o,i)),super(r)}},hT=class extends sk{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return gE(this.inputs,((n,r)=>{const o=ok(n[0]),[i,a]=this.transforms[r](aE.arr(o)?o:n.map(ok));e+=" "+i,t=t&&a})),t?"none":e}observerAdded(e){1==e&&gE(this.inputs,(e=>gE(e,(e=>rk(e)&&lk(e,this)))))}observerRemoved(e){0==e&&gE(this.inputs,(e=>gE(e,(e=>rk(e)&&Ak(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),ak(this,e)}};oE.assign({batchedUpdates:Ph.unstable_batchedUpdates,createStringInterpolator:yk,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var fT=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new zk(e),getComponentProps:r=e=>e}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=Yk(e)||"Anonymous";return(e=aE.str(e)?i[e]||(i[e]=Gk(e,o)):e[Hk]||(e[Hk]=Gk(e,o))).displayName=`Animated(${t})`,e};return lE(e,((t,n)=>{aE.arr(e)&&(n=Yk(t)),i[n]=i(t)})),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{className:r,style:o,children:i,scrollTop:a,scrollLeft:s,viewBox:g,...l}=t,A=Object.values(l),C=Object.keys(l).map((t=>n||e.hasAttribute(t)?t:sT[t]||(sT[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==i&&(e.textContent=i);for(const t in o)if(o.hasOwnProperty(t)){const n=aT(t,o[t]);iT.test(t)?e.style.setProperty(t,n):e.style[t]=n}C.forEach(((t,n)=>{e.setAttribute(t,A[n])})),void 0!==r&&(e.className=r),void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s),void 0!==g&&e.setAttribute("viewBox",g)},createAnimatedStyle:e=>new dT(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),pT=fT.animated;function mT({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0 3-3m-3 3V2.25"}))}const vT=Ji.forwardRef(mT),yT=e=>{let{title:t,onButtonClick:n,buttonText:r,icon:o=Ji.createElement(vT,{className:"w-5 h-5"})}=e;const[i,a]=(0,Ji.useState)(!1),s=(0,Ji.useRef)(null),{ref:g,inView:l}=function({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:a,initialInView:s,fallbackInView:g,onChange:l}={}){var A;const[C,c]=Ji.useState(null),I=Ji.useRef(),[u,d]=Ji.useState({inView:!!s,entry:void 0});I.current=l,Ji.useEffect((()=>{if(a||!C)return;let s;return s=Fx(C,((e,t)=>{d({inView:e,entry:t}),I.current&&I.current(e,t),t.isIntersecting&&i&&s&&(s(),s=void 0)}),{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},g),()=>{s&&s()}}),[Array.isArray(e)?e.toString():e,C,o,r,i,a,n,g,t]);const h=null==(A=u.entry)?void 0:A.target,f=Ji.useRef();C||!h||i||a||f.current===h||(f.current=h,d({inView:!!s,entry:void 0}));const p=[c,u.inView,u.entry];return p.ref=p[0],p.inView=p[1],p.entry=p[2],p}({triggerOnce:!0}),A=e=>{if(s.current){const t=s.current.getBoundingClientRect(),n=t.left+t.width/2,r=t.top+t.height/2,o=Math.sqrt(Math.pow(e.clientX-n,2)+Math.pow(e.clientY-r,2));a(o<300)}};(0,Ji.useEffect)((()=>(window.addEventListener("mousemove",A),()=>{window.removeEventListener("mousemove",A)})),[]);const C=eT({config:{bounce:.4,friction:12,tension:180},opacity:l?1:0,transform:l?"translateX(0px)":"translateX(300px)"});return Ji.createElement("div",{className:"relative mb-6"},Ji.createElement("div",{"aria-hidden":"true",className:"absolute inset-0 flex items-center"},Ji.createElement("div",{className:"w-full border-t border-gray-300"})),Ji.createElement("div",{className:"relative flex flex-wrap items-center justify-between gap-y-4 md:flex-nowrap"},Ji.createElement("div",{className:"w-full md:w-auto"},Ji.createElement("h1",{className:"pr-3 text-3xl font-semibold text-center text-gray-900 bg-white font-display"},t)),Ji.createElement("div",{className:gd()("flex justify-center w-full md:w-auto",{"animate-bounce":i}),ref:s},Ji.createElement(pT.button,{className:gd()("justify-center md:justify-start text-gray-600 hover:bg-gray-600 ring-gray-600 inline-flex items-center gap-x-1.5 rounded-md md:rounded-full bg-white px-3 py-1.5 text-md ring-1 ring-inset font-semibold shadow-sm hover:text-white transition-all duration-500 w-full mt-10 md:mt-0 md:w-auto",{"text-pink-600 hover:bg-pink-600 ring-pink-600":i}),onClick:n,ref:g,style:C,type:"button"},o,Ji.createElement("span",null,r)))))};var bT=n(5556),wT=n.n(bT),xT=["color","size","title","className"];function ET(){return ET=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ST=(0,Ji.forwardRef)((function(e,t){var n=e.color,r=e.size,o=e.title,i=e.className,a=kT(e,xT);return Ji.createElement("svg",ET({ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:r,height:r,fill:n,className:["bi","bi-shuffle",i].filter(Boolean).join(" ")},a),o?Ji.createElement("title",null,o):null,Ji.createElement("path",{fillRule:"evenodd",d:"M0 3.5A.5.5 0 0 1 .5 3H1c2.202 0 3.827 1.24 4.874 2.418.49.552.865 1.102 1.126 1.532.26-.43.636-.98 1.126-1.532C9.173 4.24 10.798 3 13 3v1c-1.798 0-3.173 1.01-4.126 2.082A9.6 9.6 0 0 0 7.556 8a9.6 9.6 0 0 0 1.317 1.918C9.828 10.99 11.204 12 13 12v1c-2.202 0-3.827-1.24-4.874-2.418A10.6 10.6 0 0 1 7 9.05c-.26.43-.636.98-1.126 1.532C4.827 11.76 3.202 13 1 13H.5a.5.5 0 0 1 0-1H1c1.798 0 3.173-1.01 4.126-2.082A9.6 9.6 0 0 0 6.444 8a9.6 9.6 0 0 0-1.317-1.918C4.172 5.01 2.796 4 1 4H.5a.5.5 0 0 1-.5-.5"}),Ji.createElement("path",{d:"M13 5.466V1.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384l-2.36 1.966a.25.25 0 0 1-.41-.192m0 9v-3.932a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384l-2.36 1.966a.25.25 0 0 1-.41-.192"}))}));ST.propTypes={color:wT().string,size:wT().oneOfType([wT().string,wT().number]),title:wT().string,className:wT().string},ST.defaultProps={color:"currentColor",size:"1em",title:null,className:""};const TT=ST;var OT=["color","size","title","className"];function NT(){return NT=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var PT=(0,Ji.forwardRef)((function(e,t){var n=e.color,r=e.size,o=e.title,i=e.className,a=RT(e,OT);return Ji.createElement("svg",NT({ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:r,height:r,fill:n,className:["bi","bi-cone-striped",i].filter(Boolean).join(" ")},a),o?Ji.createElement("title",null,o):null,Ji.createElement("path",{d:"m9.97 4.88.953 3.811C10.159 8.878 9.14 9 8 9s-2.158-.122-2.923-.309L6.03 4.88C6.635 4.957 7.3 5 8 5s1.365-.043 1.97-.12m-.245-.978L8.97.88C8.718-.13 7.282-.13 7.03.88L6.275 3.9C6.8 3.965 7.382 4 8 4s1.2-.036 1.725-.098m4.396 8.613a.5.5 0 0 1 .037.96l-6 2a.5.5 0 0 1-.316 0l-6-2a.5.5 0 0 1 .037-.96l2.391-.598.565-2.257c.862.212 1.964.339 3.165.339s2.303-.127 3.165-.339l.565 2.257z"}))}));PT.propTypes={color:wT().string,size:wT().oneOfType([wT().string,wT().number]),title:wT().string,className:wT().string},PT.defaultProps={color:"currentColor",size:"1em",title:null,className:""};const DT=PT;function MT({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{d:"M2 4.25A2.25 2.25 0 0 1 4.25 2h2.5A2.25 2.25 0 0 1 9 4.25v2.5A2.25 2.25 0 0 1 6.75 9h-2.5A2.25 2.25 0 0 1 2 6.75v-2.5ZM2 13.25A2.25 2.25 0 0 1 4.25 11h2.5A2.25 2.25 0 0 1 9 13.25v2.5A2.25 2.25 0 0 1 6.75 18h-2.5A2.25 2.25 0 0 1 2 15.75v-2.5ZM11 4.25A2.25 2.25 0 0 1 13.25 2h2.5A2.25 2.25 0 0 1 18 4.25v2.5A2.25 2.25 0 0 1 15.75 9h-2.5A2.25 2.25 0 0 1 11 6.75v-2.5ZM15.25 11.75a.75.75 0 0 0-1.5 0v2h-2a.75.75 0 0 0 0 1.5h2v2a.75.75 0 0 0 1.5 0v-2h2a.75.75 0 0 0 0-1.5h-2v-2Z"}))}const _T=Ji.forwardRef(MT),LT={addComponent:"bg-transparent text-sky-500 hover:bg-sky-200 hover:text-blue-700 rounded-lg",info:"bg-blue-50 text-blue-700",muted:"bg-gray-100 text-gray-500",sky:"bg-sky-200 text-blue-900",transparent:"bg-transparent text-gray-500",underConstruction:"bg-yellow-100 text-yellow-800",warning:"bg-yellow-100 text-yellow-800"},jT={compact:"p-3",normal:"p-6"},FT={addComponent:Ji.createElement("div",{className:"flex-shrink-0"},Ji.createElement(_T,{"aria-hidden":"true",className:"w-5 h-5 text-sky-500 group-hover:text-blue-700"})),info:Ji.createElement("div",{className:"flex-shrink-0"},Ji.createElement(_f,{"aria-hidden":"true",className:"w-5 h-5 text-blue-400"})),sky:Ji.createElement("div",{className:"flex-shrink-0",style:{paddingTop:"2px"}},Ji.createElement(TT,{"aria-hidden":"true",className:"w-5 h-5 text-blue-900"})),underConstruction:Ji.createElement("div",{className:"flex-shrink-0"},Ji.createElement(DT,{"aria-hidden":"true",className:"w-6 h-6 text-yellow-800"}))},BT={around:"justify-around",between:"justify-between",center:"justify-center",end:"justify-end",start:"justify-start"},zT=e=>{let{variant:t="muted",icon:n=!1,padding:r="normal",align:o="between",expand:i=!0,children:a}=e;const s="addComponent"===t;return Ji.createElement("div",{className:gd()("rounded w-full",LT[t],jT[r],{group:s}),role:"alert"},Ji.createElement("div",{className:gd()("flex w-full",BT[o])},n&&Ji.createElement("div",{className:gd()({"flex-shrink-0 text-sky-500 group-hover:text-blue-700":s})},FT[t]),Ji.createElement("div",{className:gd()({"flex-1":i,"group-hover:text-blue-700":s,"ml-3":n})},a)))};function VT({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const UT=Ji.forwardRef(VT);function ZT({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))}const GT=Ji.forwardRef(ZT),WT=e=>{let{show:t,setShow:n,title:r,message:o}=e;return(0,Ji.useEffect)((()=>{if(t){const e=setTimeout((()=>{n(!1)}),6e3);return()=>clearTimeout(e)}}),[t,n]),Ji.createElement(Ji.Fragment,null,Ji.createElement("div",{"aria-live":"assertive",className:"fixed inset-0 flex items-start justify-end px-4 py-6 pointer-events-none sm:p-6",style:{top:"75px",zIndex:9999999}},Ji.createElement("div",{className:"flex flex-col items-center w-full space-y-4 sm:items-end"},Ji.createElement(ih,{as:Ji.Fragment,enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",show:t},Ji.createElement("div",{className:"w-full max-w-sm overflow-hidden bg-white rounded-lg shadow-lg pointer-events-auto ring-1 ring-black ring-opacity-5"},Ji.createElement("div",{className:"p-4"},Ji.createElement("div",{className:"flex items-start"},Ji.createElement("div",{className:"flex-shrink-0"},Ji.createElement(UT,{"aria-hidden":"true",className:"w-6 h-6 text-brandgreen-400"})),Ji.createElement("div",{className:"ml-3 w-0 flex-1 pt-0.5"},Ji.createElement("p",{className:"text-sm font-medium text-gray-900"},r),Ji.createElement("p",{className:"mt-1 text-sm text-gray-500"},o)),Ji.createElement("div",{className:"flex flex-shrink-0 ml-4"},Ji.createElement("button",{className:"inline-flex text-gray-400 bg-white rounded-md hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:()=>n(!1),type:"button"},Ji.createElement("span",{className:"sr-only"},"Close"),Ji.createElement(GT,{"aria-hidden":"true",className:"w-5 h-5"}))))))))))},HT=e=>{let{open:t,setOpen:n,subtitle:r,subsubtitle:o="",title:i,submitButtonText:a,onSubmit:s=()=>{},customButtons:g,bgOpacity:l="bg-opacity-75",backdropBlur:A,disabled:C=!1,onlyCancelButton:c=!1,children:I}=e;const u=(0,Ji.useRef)(null),d=Ji.createElement("div",{className:"w-full mt-5 sm:mt-4 sm:flex sm:flex-row-reverse"},!c&&Ji.createElement("button",{className:"inline-flex justify-center w-full px-3 py-2 text-sm font-semibold text-white rounded-md shadow-sm sm:ml-3 sm:w-auto",disabled:C,onClick:()=>{s(),n(!1)},type:"button"},a),Ji.createElement("button",{className:"inline-flex justify-center w-full px-3 py-2 mt-3 text-sm font-semibold text-gray-900 bg-white rounded-md shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",onClick:()=>n(!1),ref:u,type:"button"},"Cancel"));return Ji.createElement(ih.Root,{as:Ji.Fragment,show:t},Ji.createElement(Df,{as:"div",className:"relative",initialFocus:u,onClose:()=>n(!1)},Ji.createElement(ih.Child,{as:Ji.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},Ji.createElement("div",{className:gd()("fixed inset-0 z-50 transition-opacity bg-gray-500",l,A)})),Ji.createElement("div",{className:"fixed inset-0 z-50 overflow-y-auto"},Ji.createElement("div",{className:"flex items-center justify-center w-full min-h-full p-4"},Ji.createElement(ih.Child,{as:Ji.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},Ji.createElement(Df.Panel,{className:gd()("relative w-full max-w-7xl overflow-hidden text-left transition-all transform bg-white rounded-lg shadow-xl sm:my-8","flex flex-col max-h-[90vh]")},Ji.createElement("div",{className:"flex-1 p-8 overflow-y-auto",id:"modal-content-container"},Ji.createElement(Df.Title,{as:"h3",className:"py-4 text-2xl font-semibold leading-6 text-left text-gray-900 font-display"},i),o&&Ji.createElement("div",{className:"mb-4 text-xs"},Ji.createElement("small",null,o)),Ji.createElement("div",{className:"mb-4 text-sm"},r),Ji.createElement("div",{className:"w-full mt-2"},I)),Ji.createElement("div",{className:"p-4 border-t border-gray-300"},g||d)))))))},YT=()=>{const{protocol:e,hostname:t,port:n}=window.location;return"".concat(e,"//").concat(t).concat(n?":".concat(n):"")},KT=e=>{let{id:t,left:n="-37px",user_submitted_status:r,children:o}=e;return Ji.createElement("div",{className:"relative"},"pending"===r&&Ji.createElement(gv,{content:"This component is a user submission. User submissions are reviewed for accuracy and relevance, typically within 24 hours."},Ji.createElement("div",{className:"flex justify-center align-middle text-2xl",style:{backgroundColor:"#db2777",borderRadius:"12px",color:"#ffffff",fontSize:"8px",fontWeight:"bold",height:"20px",left:n,overflow:"visible",padding:"0.1rem 0.1rem",position:"absolute",top:"50%",transform:"translateY(-50%) rotate(-90deg)",whiteSpace:"nowrap",width:"45px",zIndex:1}},Ji.createElement("div",{style:{transform:"translateY(-45%)"}},"verifying"))),Ji.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:"".concat(YT(),"/components/").concat(t)},o))};function QT({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"}))}const XT=Ji.forwardRef(QT);function qT({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const JT=Ji.forwardRef(qT);function $T({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const eO=Ji.forwardRef($T),tO=e=>{let{currentPage:t,totalPages:n,navigate:r}=e;const o=Array.from({length:n},((e,t)=>t+1));return Ji.createElement("nav",{"aria-label":"Pagination",className:"inline-flex -space-x-px rounded-md shadow-sm isolate"},Ji.createElement("a",{className:"relative inline-flex items-center px-2 py-2 text-gray-400 rounded-l-md ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0",href:"#",onClick:e=>{e.preventDefault(),r(Math.max(1,t-1))}},Ji.createElement("span",{className:"sr-only"},"Previous"),Ji.createElement(JT,{"aria-hidden":"true",className:"w-5 h-5"})),o.map((e=>1===e||2===e||e===n||e>=t-1&&e<=t+1?Ji.createElement("a",{"aria-current":t===e?"page":void 0,className:gd()("relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:outline-offset-0",{"bg-brandgreen-500 text-white":t===e,"text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-100":t!==e}),href:"#",key:e,onClick:t=>{t.preventDefault(),r(e)}},e):3===e||e===n-1?Ji.createElement("span",{className:"relative inline-flex items-center px-4 py-2 text-sm font-semibold text-gray-900",key:e},"..."):null)),Ji.createElement("a",{className:"relative inline-flex items-center px-2 py-2 text-gray-400 rounded-r-md ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0",href:"#",onClick:e=>{e.preventDefault(),r(Math.min(n,t+1))}},Ji.createElement("span",{className:"sr-only"},"Next"),Ji.createElement(eO,{"aria-hidden":"true",className:"w-5 h-5"})))};var nO=e=>"checkbox"===e.type,rO=e=>e instanceof Date,oO=e=>null==e;const iO=e=>"object"==typeof e;var aO=e=>!oO(e)&&!Array.isArray(e)&&iO(e)&&!rO(e),sO=e=>aO(e)&&e.target?nO(e.target)?e.target.checked:e.target.value:e,gO=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),lO="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function AO(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(lO&&(e instanceof Blob||e instanceof FileList)||!n&&!aO(e))return e;if(t=n?[]:{},n||(e=>{const t=e.constructor&&e.constructor.prototype;return aO(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=AO(e[n]));else t=e}return t}var CO=e=>Array.isArray(e)?e.filter(Boolean):[],cO=e=>void 0===e,IO=(e,t,n)=>{if(!t||!aO(e))return n;const r=CO(t.split(/[,[\].]+?/)).reduce(((e,t)=>oO(e)?e:e[t]),e);return cO(r)||r===e?cO(e[t])?n:e[t]:r},uO=e=>"boolean"==typeof e,dO=e=>/^\w*$/.test(e),hO=e=>CO(e.replace(/["|']|\]/g,"").split(/\.|\[/)),fO=(e,t,n)=>{let r=-1;const o=dO(t)?[t]:hO(t),i=o.length,a=i-1;for(;++rJi.useContext(DO);var _O=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==EO&&(t._proxyFormState[o]=!r||EO),n&&(n[o]=!0),e[o]}});return o},LO=e=>aO(e)&&!Object.keys(e).length,jO=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return LO(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!r||EO)))},FO=e=>Array.isArray(e)?e:[e],BO=(e,t,n)=>!e||!t||e===t||FO(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function zO(e){const t=Ji.useRef(e);t.current=e,Ji.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var VO=e=>"string"==typeof e,UO=(e,t,n,r,o)=>VO(e)?(r&&t.watch.add(e),IO(n,e,o)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),IO(n,e)))):(r&&(t.watchAll=!0),n);function ZO(e){const t=MO(),{control:n=t.control,name:r,defaultValue:o,disabled:i,exact:a}=e||{},s=Ji.useRef(r);s.current=r,zO({disabled:i,subject:n._subjects.values,next:e=>{BO(s.current,e.name,a)&&l(AO(UO(s.current,n._names,e.values||n._formValues,!1,o)))}});const[g,l]=Ji.useState(n._getWatch(r,o));return Ji.useEffect((()=>n._removeUnmounted())),g}function GO(e){const t=MO(),{name:n,disabled:r,control:o=t.control,shouldUnregister:i}=e,a=gO(o._names.array,n),s=ZO({control:o,name:n,defaultValue:IO(o._formValues,n,IO(o._defaultValues,n,e.defaultValue)),exact:!0}),g=function(e){const t=MO(),{control:n=t.control,disabled:r,name:o,exact:i}=e||{},[a,s]=Ji.useState(n._formState),g=Ji.useRef(!0),l=Ji.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),A=Ji.useRef(o);return A.current=o,zO({disabled:r,next:e=>g.current&&BO(A.current,e.name,i)&&jO(e,l.current,n._updateFormState)&&s({...n._formState,...e}),subject:n._subjects.state}),Ji.useEffect((()=>(g.current=!0,l.current.isValid&&n._updateValid(!0),()=>{g.current=!1})),[n]),_O(a,n,l.current,!1)}({control:o,name:n,exact:!0}),l=Ji.useRef(o.register(n,{...e.rules,value:s,...uO(e.disabled)?{disabled:e.disabled}:{}}));return Ji.useEffect((()=>{const e=o._options.shouldUnregister||i,t=(e,t)=>{const n=IO(o._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=AO(IO(o._options.defaultValues,n));fO(o._defaultValues,n,e),cO(IO(o._formValues,n))&&fO(o._formValues,n,e)}return()=>{(a?e&&!o._state.action:e)?o.unregister(n):t(n,!1)}}),[n,o,a,i]),Ji.useEffect((()=>{IO(o._fields,n)&&o._updateDisabledField({disabled:r,fields:o._fields,name:n,value:IO(o._fields,n)._f.value})}),[r,n,o]),{field:{name:n,value:s,...uO(r)||g.disabled?{disabled:g.disabled||r}:{},onChange:Ji.useCallback((e=>l.current.onChange({target:{value:sO(e),name:n},type:vO})),[n]),onBlur:Ji.useCallback((()=>l.current.onBlur({target:{value:IO(o._formValues,n),name:n},type:pO})),[n,o]),ref:Ji.useCallback((e=>{const t=IO(o._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[o._fields,n])},formState:g,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!IO(g.errors,n)},isDirty:{enumerable:!0,get:()=>!!IO(g.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!IO(g.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!IO(g.validatingFields,n)},error:{enumerable:!0,get:()=>IO(g.errors,n)}})}}const WO=e=>e.render(GO(e));var HO=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},YO=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)}))},KO=(e,t,n={})=>n.shouldFocus||cO(n.shouldFocus)?n.focusName||`${e}.${cO(n.focusIndex)?t:n.focusIndex}.`:"",QO=e=>({isOnSubmit:!e||e===wO,isOnBlur:e===yO,isOnChange:e===bO,isOnAll:e===EO,isOnTouch:e===xO}),XO=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const qO=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const n=IO(e,o);if(n){const{_f:e,...i}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(qO(i,t))break}else if(aO(i)&&qO(i,t))break}}};var JO=(e,t,n)=>{const r=FO(IO(e,n));return fO(r,"root",t[n]),fO(e,n,r),e},$O=e=>"file"===e.type,eN=e=>"function"==typeof e,tN=e=>{if(!lO)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},nN=e=>VO(e),rN=e=>"radio"===e.type,oN=e=>e instanceof RegExp;const iN={value:!1,isValid:!1},aN={value:!0,isValid:!0};var sN=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!cO(e[0].attributes.value)?cO(e[0].value)||""===e[0].value?aN:{value:e[0].value,isValid:!0}:aN:iN}return iN};const gN={isValid:!1,value:null};var lN=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),gN):gN;function AN(e,t,n="validate"){if(nN(e)||Array.isArray(e)&&e.every(nN)||uO(e)&&!e)return{type:n,message:nN(e)?e:"",ref:t}}var CN=e=>aO(e)&&!oN(e)?e:{value:e,message:""},cN=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:s,maxLength:g,minLength:l,min:A,max:C,pattern:c,validate:I,name:u,valueAsNumber:d,mount:h,disabled:f}=e._f,p=IO(t,u);if(!h||f)return{};const m=a?a[0]:i,v=e=>{r&&m.reportValidity&&(m.setCustomValidity(uO(e)?"":e||""),m.reportValidity())},y={},b=rN(i),w=nO(i),x=b||w,E=(d||$O(i))&&cO(i.value)&&cO(p)||tN(i)&&""===i.value||""===p||Array.isArray(p)&&!p.length,k=HO.bind(null,u,n,y),S=(e,t,n,r=TO,o=OO)=>{const a=e?t:n;y[u]={type:e?r:o,message:a,ref:i,...k(e?r:o,a)}};if(o?!Array.isArray(p)||!p.length:s&&(!x&&(E||oO(p))||uO(p)&&!p||w&&!sN(a).isValid||b&&!lN(a).isValid)){const{value:e,message:t}=nN(s)?{value:!!s,message:s}:CN(s);if(e&&(y[u]={type:RO,message:t,ref:m,...k(RO,t)},!n))return v(t),y}if(!(E||oO(A)&&oO(C))){let e,t;const r=CN(C),o=CN(A);if(oO(p)||isNaN(p)){const n=i.valueAsDate||new Date(p),a=e=>new Date((new Date).toDateString()+" "+e),s="time"==i.type,g="week"==i.type;VO(r.value)&&p&&(e=s?a(p)>a(r.value):g?p>r.value:n>new Date(r.value)),VO(o.value)&&p&&(t=s?a(p)r.value),oO(o.value)||(t=n+e.value,o=!oO(t.value)&&p.length<+t.value;if((r||o)&&(S(r,e.message,t.message),!n))return v(y[u].message),y}if(c&&!E&&VO(p)){const{value:e,message:t}=CN(c);if(oN(e)&&!p.match(e)&&(y[u]={type:NO,message:t,ref:i,...k(NO,t)},!n))return v(t),y}if(I)if(eN(I)){const e=AN(await I(p,t),m);if(e&&(y[u]={...e,...k(PO,e.message)},!n))return v(e.message),y}else if(aO(I)){let e={};for(const r in I){if(!LO(e)&&!n)break;const o=AN(await I[r](p,t),m,r);o&&(e={...o,...k(r,o.message)},v(o.message),n&&(y[u]=e))}if(!LO(e)&&(y[u]={ref:m,...e},!n))return y}return v(!0),y},IN=(e,t)=>[...e,...FO(t)],uN=e=>Array.isArray(e)?e.map((()=>{})):void 0;function dN(e,t,n){return[...e.slice(0,t),...FO(n),...e.slice(t)]}var hN=(e,t,n)=>Array.isArray(e)?(cO(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],fN=(e,t)=>[...FO(t),...FO(e)];var pN=(e,t)=>cO(t)?[]:function(e,t){let n=0;const r=[...e];for(const e of t)r.splice(e-n,1),n++;return CO(r).length?r:[]}(e,FO(t).sort(((e,t)=>e-t))),mN=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function vN(e,t){const n=Array.isArray(t)?t:dO(t)?[t]:hO(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r(e[t]=n,e);function bN(e){const t=MO(),{control:n=t.control,name:r,keyName:o="id",shouldUnregister:i}=e,[a,s]=Ji.useState(n._getFieldArray(r)),g=Ji.useRef(n._getFieldArray(r).map(YO)),l=Ji.useRef(a),A=Ji.useRef(r),C=Ji.useRef(!1);A.current=r,l.current=a,n._names.array.add(r),e.rules&&n.register(r,e.rules),zO({next:({values:e,name:t})=>{if(t===A.current||!t){const t=IO(e,A.current);Array.isArray(t)&&(s(t),g.current=t.map(YO))}},subject:n._subjects.array});const c=Ji.useCallback((e=>{C.current=!0,n._updateFieldArray(r,e)}),[n,r]);return Ji.useEffect((()=>{if(n._state.action=!1,XO(r,n._names)&&n._subjects.state.next({...n._formState}),C.current&&(!QO(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then((e=>{const t=IO(e.errors,r),o=IO(n._formState.errors,r);(o?!t&&o.type||t&&(o.type!==t.type||o.message!==t.message):t&&t.type)&&(t?fO(n._formState.errors,r,t):vN(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))}));else{const e=IO(n._fields,r);!e||!e._f||QO(n._options.reValidateMode).isOnSubmit&&QO(n._options.mode).isOnSubmit||cN(e,n._formValues,n._options.criteriaMode===EO,n._options.shouldUseNativeValidation,!0).then((e=>!LO(e)&&n._subjects.state.next({errors:JO(n._formState.errors,e,r)})))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&qO(n._fields,((e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1})),n._names.focus="",n._updateValid(),C.current=!1}),[a,r,n]),Ji.useEffect((()=>(!IO(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||i)&&n.unregister(r)})),[r,n,o,i]),{swap:Ji.useCallback(((e,t)=>{const o=n._getFieldArray(r);mN(o,e,t),mN(g.current,e,t),c(o),s(o),n._updateFieldArray(r,o,mN,{argA:e,argB:t},!1)}),[c,r,n]),move:Ji.useCallback(((e,t)=>{const o=n._getFieldArray(r);hN(o,e,t),hN(g.current,e,t),c(o),s(o),n._updateFieldArray(r,o,hN,{argA:e,argB:t},!1)}),[c,r,n]),prepend:Ji.useCallback(((e,t)=>{const o=FO(AO(e)),i=fN(n._getFieldArray(r),o);n._names.focus=KO(r,0,t),g.current=fN(g.current,o.map(YO)),c(i),s(i),n._updateFieldArray(r,i,fN,{argA:uN(e)})}),[c,r,n]),append:Ji.useCallback(((e,t)=>{const o=FO(AO(e)),i=IN(n._getFieldArray(r),o);n._names.focus=KO(r,i.length-1,t),g.current=IN(g.current,o.map(YO)),c(i),s(i),n._updateFieldArray(r,i,IN,{argA:uN(e)})}),[c,r,n]),remove:Ji.useCallback((e=>{const t=pN(n._getFieldArray(r),e);g.current=pN(g.current,e),c(t),s(t),n._updateFieldArray(r,t,pN,{argA:e})}),[c,r,n]),insert:Ji.useCallback(((e,t,o)=>{const i=FO(AO(t)),a=dN(n._getFieldArray(r),e,i);n._names.focus=KO(r,e,o),g.current=dN(g.current,e,i.map(YO)),c(a),s(a),n._updateFieldArray(r,a,dN,{argA:e,argB:uN(t)})}),[c,r,n]),update:Ji.useCallback(((e,t)=>{const o=AO(t),i=yN(n._getFieldArray(r),e,o);g.current=[...i].map(((t,n)=>t&&n!==e?g.current[n]:YO())),c(i),s([...i]),n._updateFieldArray(r,i,yN,{argA:e,argB:o},!0,!1)}),[c,r,n]),replace:Ji.useCallback((e=>{const t=FO(AO(e));g.current=t.map(YO),c([...t]),s([...t]),n._updateFieldArray(r,[...t],(e=>e),{},!0,!1)}),[c,r,n]),fields:Ji.useMemo((()=>a.map(((e,t)=>({...e,[o]:g.current[t]||YO()})))),[a,o])}}var wN=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},xN=e=>oO(e)||!iO(e);function EN(e,t){if(xN(e)||xN(t))return e===t;if(rO(e)&&rO(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const n=e[o];if(!r.includes(o))return!1;if("ref"!==o){const e=t[o];if(rO(n)&&rO(e)||aO(n)&&aO(e)||Array.isArray(n)&&Array.isArray(e)?!EN(n,e):n!==e)return!1}}return!0}var kN=e=>"select-multiple"===e.type,SN=e=>tN(e)&&e.isConnected,TN=e=>{for(const t in e)if(eN(e[t]))return!0;return!1};function ON(e,t={}){const n=Array.isArray(e);if(aO(e)||n)for(const n in e)Array.isArray(e[n])||aO(e[n])&&!TN(e[n])?(t[n]=Array.isArray(e[n])?[]:{},ON(e[n],t[n])):oO(e[n])||(t[n]=!0);return t}function NN(e,t,n){const r=Array.isArray(e);if(aO(e)||r)for(const r in e)Array.isArray(e[r])||aO(e[r])&&!TN(e[r])?cO(t)||xN(n[r])?n[r]=Array.isArray(e[r])?ON(e[r],[]):{...ON(e[r])}:NN(e[r],oO(t)?{}:t[r],n[r]):n[r]=!EN(e[r],t[r]);return n}var RN=(e,t)=>NN(e,t,ON(t)),PN=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>cO(e)?e:t?""===e?NaN:e?+e:e:n&&VO(e)?new Date(e):r?r(e):e;function DN(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return $O(t)?t.files:rN(t)?lN(e.refs).value:kN(t)?[...t.selectedOptions].map((({value:e})=>e)):nO(t)?sN(e.refs).value:PN(cO(t.value)?e.ref.value:t.value,e)}var MN=e=>cO(e)?e:oN(e)?e.source:aO(e)?oN(e.value)?e.value.source:e.value:e;const _N="AsyncFunction";function LN(e,t,n){const r=IO(e,n);if(r||dO(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),i=IO(t,r),a=IO(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};o.pop()}return{name:n}}const jN={mode:wO,reValidateMode:bO,shouldFocusError:!0};function FN(e={}){let t,n={...jN,...e},r={submitCount:0,isDirty:!1,isLoading:eN(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},o={},i=(aO(n.defaultValues)||aO(n.values))&&AO(n.defaultValues||n.values)||{},a=n.shouldUnregister?{}:AO(i),s={action:!1,mount:!1,watch:!1},g={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l=0;const A={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},C={values:wN(),array:wN(),state:wN()},c=QO(n.mode),I=QO(n.reValidateMode),u=n.criteriaMode===EO,d=async e=>{if(!n.disabled&&(A.isValid||e)){const e=n.resolver?LO((await v()).errors):await y(o,!0);e!==r.isValid&&C.state.next({isValid:e})}},h=(e,t)=>{n.disabled||!A.isValidating&&!A.validatingFields||((e||Array.from(g.mount)).forEach((e=>{e&&(t?fO(r.validatingFields,e,t):vN(r.validatingFields,e))})),C.state.next({validatingFields:r.validatingFields,isValidating:!LO(r.validatingFields)}))},f=(e,t,n,r)=>{const g=IO(o,e);if(g){const o=IO(a,e,cO(n)?IO(i,e):n);cO(o)||r&&r.defaultChecked||t?fO(a,e,t?o:DN(g._f)):x(e,o),s.mount&&d()}},p=(e,t,a,s,g)=>{let l=!1,c=!1;const I={name:e};if(!n.disabled){const n=!!(IO(o,e)&&IO(o,e)._f&&IO(o,e)._f.disabled);if(!a||s){A.isDirty&&(c=r.isDirty,r.isDirty=I.isDirty=b(),l=c!==I.isDirty);const o=n||EN(IO(i,e),t);c=!(n||!IO(r.dirtyFields,e)),o||n?vN(r.dirtyFields,e):fO(r.dirtyFields,e,!0),I.dirtyFields=r.dirtyFields,l=l||A.dirtyFields&&c!==!o}if(a){const t=IO(r.touchedFields,e);t||(fO(r.touchedFields,e,a),I.touchedFields=r.touchedFields,l=l||A.touchedFields&&t!==a)}l&&g&&C.state.next(I)}return l?I:{}},m=(n,o,i,a)=>{const s=IO(r.errors,n),g=A.isValid&&uO(o)&&r.isValid!==o;var c;if(e.delayError&&i?(c=()=>((e,t)=>{fO(r.errors,e,t),C.state.next({errors:r.errors})})(n,i),t=e=>{clearTimeout(l),l=setTimeout(c,e)},t(e.delayError)):(clearTimeout(l),t=null,i?fO(r.errors,n,i):vN(r.errors,n)),(i?!EN(s,i):s)||!LO(a)||g){const e={...a,...g&&uO(o)?{isValid:o}:{},errors:r.errors,name:n};r={...r,...e},C.state.next(e)}},v=async e=>{h(e,!0);const t=await n.resolver(a,n.context,((e,t,n,r)=>{const o={};for(const n of e){const e=IO(t,n);e&&fO(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}})(e||g.mount,o,n.criteriaMode,n.shouldUseNativeValidation));return h(e),t},y=async(e,t,o={valid:!0})=>{for(const s in e){const l=e[s];if(l){const{_f:e,...C}=l;if(e){const C=g.array.has(e.name),c=l._f&&!((i=l._f)&&i.validate||!(eN(i.validate)&&i.validate.constructor.name===_N||aO(i.validate)&&Object.values(i.validate).find((e=>e.constructor.name===_N))));c&&A.validatingFields&&h([s],!0);const I=await cN(l,a,u,n.shouldUseNativeValidation&&!t,C);if(c&&A.validatingFields&&h([s]),I[e.name]&&(o.valid=!1,t))break;!t&&(IO(I,e.name)?C?JO(r.errors,I,e.name):fO(r.errors,e.name,I[e.name]):vN(r.errors,e.name))}!LO(C)&&await y(C,t,o)}}var i;return o.valid},b=(e,t)=>!n.disabled&&(e&&t&&fO(a,e,t),!EN(N(),i)),w=(e,t,n)=>UO(e,g,{...s.mount?a:cO(t)?i:VO(e)?{[e]:t}:t},n,t),x=(e,t,n={})=>{const r=IO(o,e);let i=t;if(r){const n=r._f;n&&(!n.disabled&&fO(a,e,PN(t,n)),i=tN(n.ref)&&oO(t)?"":t,kN(n.ref)?[...n.ref.options].forEach((e=>e.selected=i.includes(e.value))):n.refs?nO(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(i)?!!i.find((t=>t===e.value)):i===e.value))):n.refs[0]&&(n.refs[0].checked=!!i):n.refs.forEach((e=>e.checked=e.value===i)):$O(n.ref)?n.ref.value="":(n.ref.value=i,n.ref.type||C.values.next({name:e,values:{...a}})))}(n.shouldDirty||n.shouldTouch)&&p(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&O(e)},E=(e,t,n)=>{for(const r in t){const i=t[r],a=`${e}.${r}`,s=IO(o,a);(g.array.has(e)||aO(i)||s&&!s._f)&&!rO(i)?E(a,i,n):x(a,i,n)}},k=(e,t,n={})=>{const l=IO(o,e),c=g.array.has(e),I=AO(t);fO(a,e,I),c?(C.array.next({name:e,values:{...a}}),(A.isDirty||A.dirtyFields)&&n.shouldDirty&&C.state.next({name:e,dirtyFields:RN(i,a),isDirty:b(e,I)})):!l||l._f||oO(I)?x(e,I,n):E(e,I,n),XO(e,g)&&C.state.next({...r}),C.values.next({name:s.mount?e:void 0,values:{...a}})},S=async i=>{s.mount=!0;const l=i.target;let f=l.name,b=!0;const w=IO(o,f),x=e=>{b=Number.isNaN(e)||rO(e)&&isNaN(e.getTime())||EN(e,IO(a,f,e))};if(w){let s,E;const k=l.type?DN(w._f):sO(i),S=i.type===pO||i.type===mO,T=!(e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate))(w._f)&&!n.resolver&&!IO(r.errors,f)&&!w._f.deps||((e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e))(S,IO(r.touchedFields,f),r.isSubmitted,I,c),N=XO(f,g,S);fO(a,f,k),S?(w._f.onBlur&&w._f.onBlur(i),t&&t(0)):w._f.onChange&&w._f.onChange(i);const R=p(f,k,S,!1),P=!LO(R)||N;if(!S&&C.values.next({name:f,type:i.type,values:{...a}}),T)return A.isValid&&("onBlur"===e.mode?S&&d():d()),P&&C.state.next({name:f,...N?{}:R});if(!S&&N&&C.state.next({...r}),n.resolver){const{errors:e}=await v([f]);if(x(k),b){const t=LN(r.errors,o,f),n=LN(e,o,t.name||f);s=n.error,f=n.name,E=LO(e)}}else h([f],!0),s=(await cN(w,a,u,n.shouldUseNativeValidation))[f],h([f]),x(k),b&&(s?E=!1:A.isValid&&(E=await y(o,!0)));b&&(w._f.deps&&O(w._f.deps),m(f,E,s,R))}},T=(e,t)=>{if(IO(r.errors,t)&&e.focus)return e.focus(),1},O=async(e,t={})=>{let i,a;const s=FO(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await v(e);if(e)for(const n of e){const e=IO(t,n);e?fO(r.errors,n,e):vN(r.errors,n)}else r.errors=t;return t})(cO(e)?e:s);i=LO(t),a=e?!s.some((e=>IO(t,e))):i}else e?(a=(await Promise.all(s.map((async e=>{const t=IO(o,e);return await y(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&d()):a=i=await y(o);return C.state.next({...!VO(e)||A.isValid&&i!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:i}:{},errors:r.errors}),t.shouldFocus&&!a&&qO(o,T,e?s:g.mount),a},N=e=>{const t={...s.mount?a:i};return cO(e)?t:VO(e)?IO(t,e):e.map((e=>IO(t,e)))},R=(e,t)=>({invalid:!!IO((t||r).errors,e),isDirty:!!IO((t||r).dirtyFields,e),error:IO((t||r).errors,e),isValidating:!!IO(r.validatingFields,e),isTouched:!!IO((t||r).touchedFields,e)}),P=(e,t,n)=>{const i=(IO(o,e,{_f:{}})._f||{}).ref,a=IO(r.errors,e)||{},{ref:s,message:g,type:l,...A}=a;fO(r.errors,e,{...A,...t,ref:i}),C.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&i&&i.focus&&i.focus()},D=(e,t={})=>{for(const s of e?FO(e):g.mount)g.mount.delete(s),g.array.delete(s),t.keepValue||(vN(o,s),vN(a,s)),!t.keepError&&vN(r.errors,s),!t.keepDirty&&vN(r.dirtyFields,s),!t.keepTouched&&vN(r.touchedFields,s),!t.keepIsValidating&&vN(r.validatingFields,s),!n.shouldUnregister&&!t.keepDefaultValue&&vN(i,s);C.values.next({values:{...a}}),C.state.next({...r,...t.keepDirty?{isDirty:b()}:{}}),!t.keepIsValid&&d()},M=({disabled:e,name:t,field:n,fields:r,value:o})=>{if(uO(e)&&s.mount||e){const i=e?void 0:cO(o)?DN(n?n._f:IO(r,t)._f):o;fO(a,t,i),p(t,i,!1,!1,!0)}},_=(e,t={})=>{let r=IO(o,e);const a=uO(t.disabled)||uO(n.disabled);return fO(o,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),g.mount.add(e),r?M({field:r,disabled:uO(t.disabled)?t.disabled:n.disabled,name:e,value:t.value}):f(e,!0,t.value),{...a?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:MN(t.min),max:MN(t.max),minLength:MN(t.minLength),maxLength:MN(t.maxLength),pattern:MN(t.pattern)}:{},name:e,onChange:S,onBlur:S,ref:a=>{if(a){_(e,t),r=IO(o,e);const n=cO(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=(e=>rN(e)||nO(e))(n),g=r._f.refs||[];if(s?g.find((e=>e===n)):n===r._f.ref)return;fO(o,e,{_f:{...r._f,...s?{refs:[...g.filter(SN),n,...Array.isArray(IO(i,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),f(e,!1,void 0,n)}else r=IO(o,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!gO(g.array,e)||!s.action)&&g.unMount.add(e)}}},L=()=>n.shouldFocusError&&qO(o,T,g.mount),j=(e,t)=>async i=>{let s;if(i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist()),n.disabled)return void(t&&await t({...r.errors},i));let g=AO(a);if(C.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await v();r.errors=e,g=t}else await y(o);if(vN(r.errors,"root"),LO(r.errors)){C.state.next({errors:{}});try{await e(g,i)}catch(e){s=e}}else t&&await t({...r.errors},i),L(),setTimeout(L);if(C.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:LO(r.errors)&&!s,submitCount:r.submitCount+1,errors:r.errors}),s)throw s},F=(t,n={})=>{const l=t?AO(t):i,c=AO(l),I=LO(t),u=I?i:c;if(n.keepDefaultValues||(i=l),!n.keepValues){if(n.keepDirtyValues){const e=new Set([...g.mount,...Object.keys(RN(i,a))]);for(const t of Array.from(e))IO(r.dirtyFields,t)?fO(u,t,IO(a,t)):k(t,IO(u,t))}else{if(lO&&cO(t))for(const e of g.mount){const t=IO(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(tN(e)){const t=e.closest("form");if(t){t.reset();break}}}}o={}}a=e.shouldUnregister?n.keepDefaultValues?AO(i):{}:AO(u),C.array.next({values:{...u}}),C.values.next({values:{...u}})}g={mount:n.keepDirtyValues?g.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!A.isValid||!!n.keepIsValid||!!n.keepDirtyValues,s.watch=!!e.shouldUnregister,C.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!I&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||EN(t,i))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:I?{}:n.keepDirtyValues?n.keepDefaultValues&&a?RN(i,a):r.dirtyFields:n.keepDefaultValues&&t?RN(i,t):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(e,t)=>F(eN(e)?e(a):e,t);return{control:{register:_,unregister:D,getFieldState:R,handleSubmit:j,setError:P,_executeSchema:v,_getWatch:w,_getDirty:b,_updateValid:d,_removeUnmounted:()=>{for(const e of g.unMount){const t=IO(o,e);t&&(t._f.refs?t._f.refs.every((e=>!SN(e))):!SN(t._f.ref))&&D(e)}g.unMount=new Set},_updateFieldArray:(e,t=[],g,l,c=!0,I=!0)=>{if(l&&g&&!n.disabled){if(s.action=!0,I&&Array.isArray(IO(o,e))){const t=g(IO(o,e),l.argA,l.argB);c&&fO(o,e,t)}if(I&&Array.isArray(IO(r.errors,e))){const t=g(IO(r.errors,e),l.argA,l.argB);c&&fO(r.errors,e,t),((e,t)=>{!CO(IO(e,t)).length&&vN(e,t)})(r.errors,e)}if(A.touchedFields&&I&&Array.isArray(IO(r.touchedFields,e))){const t=g(IO(r.touchedFields,e),l.argA,l.argB);c&&fO(r.touchedFields,e,t)}A.dirtyFields&&(r.dirtyFields=RN(i,a)),C.state.next({name:e,isDirty:b(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else fO(a,e,t)},_updateDisabledField:M,_getFieldArray:t=>CO(IO(s.mount?a:i,t,e.shouldUnregister?IO(i,t,[]):[])),_reset:F,_resetDefaultValues:()=>eN(n.defaultValues)&&n.defaultValues().then((e=>{B(e,n.resetOptions),C.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{uO(e)&&(C.state.next({disabled:e}),qO(o,((t,n)=>{const r=IO(o,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach((t=>{t.disabled=r._f.disabled||e})))}),0,!1))},_subjects:C,_proxyFormState:A,_setErrors:e=>{r.errors=e,C.state.next({errors:r.errors,isValid:!1})},get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(e){s=e},get _defaultValues(){return i},get _names(){return g},set _names(e){g=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:O,register:_,handleSubmit:j,watch:(e,t)=>eN(e)?C.values.subscribe({next:n=>e(w(void 0,t),n)}):w(e,t,!0),setValue:k,getValues:N,reset:B,resetField:(e,t={})=>{IO(o,e)&&(cO(t.defaultValue)?k(e,AO(IO(i,e))):(k(e,t.defaultValue),fO(i,e,AO(t.defaultValue))),t.keepTouched||vN(r.touchedFields,e),t.keepDirty||(vN(r.dirtyFields,e),r.isDirty=t.defaultValue?b(e,AO(IO(i,e))):b()),t.keepError||(vN(r.errors,e),A.isValid&&d()),C.state.next({...r}))},clearErrors:e=>{e&&FO(e).forEach((e=>vN(r.errors,e))),C.state.next({errors:e?r.errors:{}})},unregister:D,setError:P,setFocus:(e,t={})=>{const n=IO(o,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&eN(e.select)&&e.select())}},getFieldState:R}}function BN(e={}){const t=Ji.useRef(),n=Ji.useRef(),[r,o]=Ji.useState({isDirty:!1,isValidating:!1,isLoading:eN(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:eN(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...FN(e),formState:r});const i=t.current.control;return i._options=e,zO({subject:i._subjects.state,next:e=>{jO(e,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),Ji.useEffect((()=>i._disableForm(e.disabled)),[i,e.disabled]),Ji.useEffect((()=>{if(i._proxyFormState.isDirty){const e=i._getDirty();e!==r.isDirty&&i._subjects.state.next({isDirty:e})}}),[i,r.isDirty]),Ji.useEffect((()=>{e.values&&!EN(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o((e=>({...e})))):i._resetDefaultValues()}),[e.values,i]),Ji.useEffect((()=>{e.errors&&i._setErrors(e.errors)}),[e.errors,i]),Ji.useEffect((()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()})),Ji.useEffect((()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})}),[e.shouldUnregister,i]),t.current.formState=_O(r,i),t.current}function zN(e){return zN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zN(e)}function VN(e){var t=function(e,t){if("object"!=zN(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=zN(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zN(t)?t:t+""}function UN(e,t,n){return(t=VN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function GN(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0?IR(wR,--yR):0,mR--,10===bR&&(mR=1,pR--),bR}function SR(){return bR=yR2||RR(bR)>3?"":" "}function LR(e,t){for(;--t&&SR()&&!(bR<48||bR>102||bR>57&&bR<65||bR>70&&bR<97););return NR(e,OR()+(t<6&&32==TR()&&32==SR()))}function jR(e){for(;SR();)switch(bR){case e:return yR;case 34:case 39:34!==e&&39!==e&&jR(bR);break;case 40:41===e&&jR(e);break;case 92:SR()}return yR}function FR(e,t){for(;SR()&&e+bR!==57&&(e+bR!==84||47!==TR()););return"/*"+NR(t,yR-1)+"*"+gR(47===e?e:SR())}function BR(e){for(;!RR(TR());)SR();return NR(e,yR)}var zR="-ms-",VR="-moz-",UR="-webkit-",ZR="comm",GR="rule",WR="decl",HR="@keyframes";function YR(e,t){for(var n="",r=hR(e),o=0;o0&&dR(w)-C&&fR(I>32?$R(w+";",r,n,C-1):$R(CR(w," ","")+";",r,n,C-2),g);break;case 59:w+=";";default:if(fR(b=qR(w,t,n,l,A,o,s,m,v=[],y=[],C),i),123===p)if(0===A)XR(w,t,b,b,v,i,C,s,y);else switch(99===c&&110===IR(w,3)?100:c){case 100:case 108:case 109:case 115:XR(e,b,b,r&&fR(qR(e,b,b,0,0,o,s,m,o,v=[],C),y),o,y,C,s,r?v:y);break;default:XR(w,b,b,b,[""],y,0,s,y)}}l=A=I=0,d=f=1,m=w="",C=a;break;case 58:C=1+dR(w),I=u;default:if(d<1)if(123==p)--d;else if(125==p&&0==d++&&125==kR())continue;switch(w+=gR(p),p*d){case 38:f=A>0?1:(w+="\f",-1);break;case 44:s[l++]=(dR(w)-1)*f,f=1;break;case 64:45===TR()&&(w+=MR(SR())),c=TR(),A=C=dR(m=w+=BR(OR())),p++;break;case 45:45===u&&2==dR(w)&&(d=0)}}return i}function qR(e,t,n,r,o,i,a,s,g,l,A){for(var C=o-1,c=0===o?i:[""],I=hR(c),u=0,d=0,h=0;u0?c[f]+" "+p:CR(p,/&\f/g,c[f])))&&(g[h++]=m);return xR(e,t,n,0===o?GR:s,g,l,A)}function JR(e,t,n){return xR(e,t,n,ZR,gR(bR),uR(e,2,-2),0)}function $R(e,t,n,r){return xR(e,t,n,WR,uR(e,0,r),uR(e,r+1,-1),r)}var eP=function(e,t,n){for(var r=0,o=0;r=o,o=TR(),38===r&&12===o&&(t[n]=1),!RR(o);)SR();return NR(e,yR)},tP=function(e,t){return DR(function(e,t){var n=-1,r=44;do{switch(RR(r)){case 0:38===r&&12===TR()&&(t[n]=1),e[n]+=eP(yR-1,t,n);break;case 2:e[n]+=MR(r);break;case 4:if(44===r){e[++n]=58===TR()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=gR(r)}}while(r=SR());return e}(PR(e),t))},nP=new WeakMap,rP=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||nP.get(n))&&!r){nP.set(e,!0);for(var o=[],i=tP(t,o),a=n.props,s=0,g=0;s6)switch(IR(e,t+1)){case 109:if(45!==IR(e,t+4))break;case 102:return CR(e,/(.+:)(.+)-([^]+)/,"$1"+UR+"$2-$3$1"+VR+(108==IR(e,t+3)?"$3":"$2-$3"))+e;case 115:return~cR(e,"stretch")?iP(CR(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==IR(e,t+1))break;case 6444:switch(IR(e,dR(e)-3-(~cR(e,"!important")&&10))){case 107:return CR(e,":",":"+UR)+e;case 101:return CR(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+UR+(45===IR(e,14)?"inline-":"")+"box$3$1"+UR+"$2$3$1"+zR+"$2box$3")+e}break;case 5936:switch(IR(e,t+11)){case 114:return UR+e+zR+CR(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return UR+e+zR+CR(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return UR+e+zR+CR(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return UR+e+zR+e+e}return e}var aP=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case WR:e.return=iP(e.value,e.length);break;case HR:return YR([ER(e,{value:CR(e.value,"@","@"+UR)})],r);case GR:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return YR([ER(e,{props:[CR(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return YR([ER(e,{props:[CR(t,/:(plac\w+)/,":"+UR+"input-$1")]}),ER(e,{props:[CR(t,/:(plac\w+)/,":-moz-$1")]}),ER(e,{props:[CR(t,/:(plac\w+)/,zR+"input-$1")]})],r)}return""}))}}],sP=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||aP,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+g;return{name:l,styles:o,next:pP}}var yP=!!$i.useInsertionEffect&&$i.useInsertionEffect,bP=yP||function(e){return e()},wP=(yP||Ji.useLayoutEffect,Ji.createContext("undefined"!=typeof HTMLElement?sP({key:"css"}):null)),xP=(wP.Provider,function(e){return(0,Ji.forwardRef)((function(t,n){var r=(0,Ji.useContext)(wP);return e(t,r,n)}))}),EP=Ji.createContext({});var kP={}.hasOwnProperty,SP="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",TP=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return gP(t,n,r),bP((function(){return function(e,t,n){gP(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)})),null},OP=xP((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[SP],i=[r],a="";"string"==typeof e.className?a=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=vP(i,void 0,Ji.useContext(EP));a+=t.key+"-"+s.name;var g={};for(var l in e)kP.call(e,l)&&"css"!==l&&l!==SP&&(g[l]=e[l]);return g.className=a,n&&(g.ref=n),Ji.createElement(Ji.Fragment,null,Ji.createElement(TP,{cache:t,serialized:s,isStringTag:"string"==typeof o}),Ji.createElement(o,g))})),NP=OP,RP=function(e,t){var n=arguments;if(null==t||!kP.call(t,"css"))return Ji.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=NP,o[1]=function(e,t){var n={};for(var r in t)kP.call(t,r)&&(n[r]=t[r]);return n[SP]=e,n}(e,t);for(var i=2;i({x:e,y:e});function FP(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function BP(){return"undefined"!=typeof window}function zP(e){return ZP(e)?(e.nodeName||"").toLowerCase():"#document"}function VP(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function UP(e){var t;return null==(t=(ZP(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ZP(e){return!!BP()&&(e instanceof Node||e instanceof VP(e).Node)}function GP(e){return!!BP()&&(e instanceof Element||e instanceof VP(e).Element)}function WP(e){return!!BP()&&(e instanceof HTMLElement||e instanceof VP(e).HTMLElement)}function HP(e){return!(!BP()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof VP(e).ShadowRoot)}function YP(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=XP(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function KP(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function QP(e){return["html","body","#document"].includes(zP(e))}function XP(e){return VP(e).getComputedStyle(e)}function qP(e){if("html"===zP(e))return e;const t=e.assignedSlot||e.parentNode||HP(e)&&e.host||UP(e);return HP(t)?t.host:t}function JP(e){const t=qP(e);return QP(t)?e.ownerDocument?e.ownerDocument.body:e.body:WP(t)&&YP(t)?t:JP(t)}function $P(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=JP(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=VP(o);if(i){const e=eD(a);return t.concat(a,a.visualViewport||[],YP(o)?o:[],e&&n?$P(e):[])}return t.concat(o,$P(o,[],n))}function eD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tD(e){const t=XP(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=WP(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=_P(n)!==i||_P(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function nD(e){return GP(e)?e:e.contextElement}function rD(e){const t=nD(e);if(!WP(t))return jP(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=tD(t);let a=(i?_P(n.width):n.width)/r,s=(i?_P(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const oD=jP(0);function iD(e){const t=VP(e);return KP()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:oD}function aD(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=nD(e);let a=jP(1);t&&(r?GP(r)&&(a=rD(r)):a=rD(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==VP(e))&&t}(i,n,r)?iD(i):jP(0);let g=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,A=o.width/a.x,C=o.height/a.y;if(i){const e=VP(i),t=r&&GP(r)?VP(r):r;let n=e,o=eD(n);for(;o&&r&&t!==n;){const e=rD(o),t=o.getBoundingClientRect(),r=XP(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;g*=e.x,l*=e.y,A*=e.x,C*=e.y,g+=i,l+=a,n=VP(o),o=eD(n)}}return FP({width:A,height:C,x:g,y:l})}function sD(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:g=!1}=r,l=nD(e),A=o||i?[...l?$P(l):[],...$P(t)]:[];A.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const C=l&&s?function(e,t){let n,r=null;const o=UP(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,g){void 0===s&&(s=!1),void 0===g&&(g=1),i();const{left:l,top:A,width:C,height:c}=e.getBoundingClientRect();if(s||t(),!C||!c)return;const I={rootMargin:-LP(A)+"px "+-LP(o.clientWidth-(l+C))+"px "+-LP(o.clientHeight-(A+c))+"px "+-LP(l)+"px",threshold:MP(0,DP(1,g))||1};let u=!0;function d(e){const t=e[0].intersectionRatio;if(t!==g){if(!u)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}u=!1}try{r=new IntersectionObserver(d,{...I,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(d,I)}r.observe(e)}(!0),i}(l,n):null;let c,I=-1,u=null;a&&(u=new ResizeObserver((e=>{let[r]=e;r&&r.target===l&&u&&(u.unobserve(t),cancelAnimationFrame(I),I=requestAnimationFrame((()=>{var e;null==(e=u)||e.observe(t)}))),n()})),l&&!g&&u.observe(l),u.observe(t));let d=g?aD(e):null;return g&&function t(){const r=aD(e);!d||r.x===d.x&&r.y===d.y&&r.width===d.width&&r.height===d.height||n();d=r,c=requestAnimationFrame(t)}(),n(),()=>{var e;A.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==C||C(),null==(e=u)||e.disconnect(),u=null,g&&cancelAnimationFrame(c)}}const gD=Ji.useLayoutEffect;var lD=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],AD=function(){};function CD(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function cD(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o-1}function fD(e){return hD(e)?window.pageYOffset:e.scrollTop}function pD(e,t){hD(e)?window.scrollTo(0,t):e.scrollTop=t}function mD(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:AD,o=fD(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);pD(e,s),an.bottom?pD(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o=u)return{placement:"bottom",maxHeight:t};if(x>=u&&!a)return i&&mD(g,E,S),{placement:"bottom",maxHeight:t};if(!a&&x>=r||a&&b>=r)return i&&mD(g,E,S),{placement:"bottom",maxHeight:a?b-m:x-m};if("auto"===o||a){var T=t,O=a?y:w;return O>=r&&(T=Math.min(O-m-s,t)),{placement:"top",maxHeight:T}}if("bottom"===o)return i&&pD(g,E),{placement:"bottom",maxHeight:t};break;case"top":if(y>=u)return{placement:"top",maxHeight:t};if(w>=u&&!a)return i&&mD(g,k,S),{placement:"top",maxHeight:t};if(!a&&w>=r||a&&y>=r){var N=t;return(!a&&w>=r||a&&y>=r)&&(N=a?y-v:w-v),i&&mD(g,k,S),{placement:"top",maxHeight:N}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}var RD,PD=function(e){return"auto"===e?"bottom":e},DD=(0,Ji.createContext)(null),MD=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,g=((0,Ji.useContext)(DD)||{}).setPortalPlacement,l=(0,Ji.useRef)(null),A=YN((0,Ji.useState)(r),2),C=A[0],c=A[1],I=YN((0,Ji.useState)(null),2),u=I[0],d=I[1],h=s.spacing.controlHeight;return gD((function(){var e=l.current;if(e){var t="fixed"===i,s=ND({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:h});c(s.maxHeight),d(s.placement),null==g||g(s.placement)}}),[r,o,i,a,n,g,h]),t({ref:l,placerProps:GN(GN({},e),{},{placement:u||PD(o),maxHeight:C})})},_D=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return RP("div",JN({},dD(e,"menu",{menu:!0}),{ref:n},r),t)},LD=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return GN({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},jD=LD,FD=LD,BD=["size"],zD=["innerProps","isRtl","size"];var VD={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},UD=function(e){var t=e.size,n=QN(e,BD);return RP("svg",JN({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:VD},n))},ZD=function(e){return RP(UD,JN({size:20},e),RP("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},GD=function(e){return RP(UD,JN({size:20},e),RP("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},WD=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return GN({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},HD=WD,YD=WD,KD=function(){var e=PP.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(RD||(RD=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),QD=function(e){var t=e.delay,n=e.offset;return RP("span",{css:PP({animation:"".concat(KD," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},XD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return RP("div",JN({ref:o},dD(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},qD=["data"],JD=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,g=e.label,l=e.theme,A=e.selectProps;return RP("div",JN({},dD(e,"group",{group:!0}),s),RP(i,JN({},a,{selectProps:A,theme:l,getStyles:r,getClassNames:o,cx:n}),g),RP("div",null,t))},$D=["innerRef","isDisabled","isHidden","inputClassName"],eM={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},tM={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":GN({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},eM)},nM=function(e){return GN({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},eM)},rM=function(e){var t=e.children,n=e.innerProps;return RP("div",n,t)};var oM=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,g=n.Container,l=n.Label,A=n.Remove;return RP(g,{data:r,innerProps:GN(GN({},dD(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},RP(l,{data:r,innerProps:GN({},dD(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),RP(A,{data:r,innerProps:GN(GN({},dD(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},iM={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return RP("div",JN({},dD(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||RP(ZD,null))},Control:XD,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return RP("div",JN({},dD(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||RP(GD,null))},DownChevron:GD,CrossIcon:ZD,Group:JD,GroupHeading:function(e){var t=uD(e);t.data;var n=QN(t,qD);return RP("div",JN({},dD(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return RP("div",JN({},dD(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return RP("span",JN({},t,dD(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=uD(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,g=QN(r,$D);return RP("div",JN({},dD(e,"input",{"input-container":!0}),{"data-value":n||""}),RP("input",JN({className:t({input:!0},s),ref:o,style:nM(a),disabled:i},g)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=QN(e,zD);return RP("div",JN({},dD(GN(GN({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),RP(QD,{delay:0,offset:n}),RP(QD,{delay:160,offset:!0}),RP(QD,{delay:320,offset:!n}))},Menu:_D,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return RP("div",JN({},dD(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=(0,Ji.useRef)(null),g=(0,Ji.useRef)(null),l=YN((0,Ji.useState)(PD(i)),2),A=l[0],C=l[1],c=(0,Ji.useMemo)((function(){return{setPortalPlacement:C}}),[]),I=YN((0,Ji.useState)(null),2),u=I[0],d=I[1],h=(0,Ji.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===a?0:window.pageYOffset,n=e[A]+t;n===(null==u?void 0:u.offset)&&e.left===(null==u?void 0:u.rect.left)&&e.width===(null==u?void 0:u.rect.width)||d({offset:n,rect:e})}}),[r,a,A,null==u?void 0:u.offset,null==u?void 0:u.rect.left,null==u?void 0:u.rect.width]);gD((function(){h()}),[h]);var f=(0,Ji.useCallback)((function(){"function"==typeof g.current&&(g.current(),g.current=null),r&&s.current&&(g.current=sD(r,s.current,h,{elementResize:"ResizeObserver"in window}))}),[r,h]);gD((function(){f()}),[f]);var p=(0,Ji.useCallback)((function(e){s.current=e,f()}),[f]);if(!t&&"fixed"!==a||!u)return null;var m=RP("div",JN({ref:p},dD(GN(GN({},e),{},{offset:u.offset,position:a,rect:u.rect}),"menuPortal",{"menu-portal":!0}),o),n);return RP(DD.Provider,{value:c},t?(0,Ph.createPortal)(m,t):m)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=QN(e,OD);return RP("div",JN({},dD(GN(GN({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=QN(e,TD);return RP("div",JN({},dD(GN(GN({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:oM,MultiValueContainer:rM,MultiValueLabel:rM,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return RP("div",JN({role:"button"},n),t||RP(ZD,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return RP("div",JN({},dD(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return RP("div",JN({},dD(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return RP("div",JN({},dD(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return RP("div",JN({},dD(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return RP("div",JN({},dD(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},aM=function(e){return GN(GN({},iM),e.components)},sM=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function gM(e,t){return e===t||!(!sM(e)||!sM(t))}function lM(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,g=e.isSelected,l=e.isAppleDevice,A=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(A(a,n),".");if("menu"===t&&l){var C=s?" disabled":"",c="".concat(g?" selected":"").concat(C);return"".concat(i).concat(c,", ").concat(A(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},uM=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,g=e.id,l=e.isAppleDevice,A=s.ariaLiveMessages,C=s.getOptionLabel,c=s.inputValue,I=s.isMulti,u=s.isOptionDisabled,d=s.isSearchable,h=s.menuIsOpen,f=s.options,p=s.screenReaderStatus,m=s.tabSelectsValue,v=s.isLoading,y=s["aria-label"],b=s["aria-live"],w=(0,Ji.useMemo)((function(){return GN(GN({},IM),A||{})}),[A]),x=(0,Ji.useMemo)((function(){var e,n="";if(t&&w.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,g=t.value,l=i||r||(e=g,Array.isArray(e)?null:e),A=l?C(l):"",c=o||s||void 0,I=c?c.map(C):[],d=GN({isDisabled:l&&u(l,a),label:A,labels:I},t);n=w.onChange(d)}return n}),[t,w,u,a,C]),E=(0,Ji.useMemo)((function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&w.onFocus){var s={focused:t,label:C(t),isDisabled:u(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:l};e=w.onFocus(s)}return e}),[n,r,C,u,w,o,a,l]),k=(0,Ji.useMemo)((function(){var e="";if(h&&f.length&&!v&&w.onFilter){var t=p({count:o.length});e=w.onFilter({inputValue:c,resultsMessage:t})}return e}),[o,c,h,w,f,p,v]),S="initial-input-focus"===(null==t?void 0:t.action),T=(0,Ji.useMemo)((function(){var e="";if(w.guidance){var t=r?"value":h?"menu":"input";e=w.guidance({"aria-label":y,context:t,isDisabled:n&&u(n,a),isMulti:I,isSearchable:d,tabSelectsValue:m,isInitialFocus:S})}return e}),[y,n,r,I,u,d,h,w,a,m,S]),O=RP(Ji.Fragment,null,RP("span",{id:"aria-selection"},x),RP("span",{id:"aria-focused"},E),RP("span",{id:"aria-results"},k),RP("span",{id:"aria-guidance"},T));return RP(Ji.Fragment,null,RP(cM,{id:g},S&&O),RP(cM,{"aria-live":b,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!S&&O))},dM=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],hM=new RegExp("["+dM.map((function(e){return e.letters})).join("")+"]","g"),fM={},pM=0;pM1?t-1:0),r=1;r0,d=C-c-A,h=!1;d>t&&a.current&&(r&&r(e),a.current=!1),u&&s.current&&(i&&i(e),s.current=!1),u&&t>d?(n&&!a.current&&n(e),I.scrollTop=C,h=!0,a.current=!0):!u&&-t>A&&(o&&!s.current&&o(e),I.scrollTop=0,h=!0,s.current=!0),h&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),C=(0,Ji.useCallback)((function(e){A(e,e.deltaY)}),[A]),c=(0,Ji.useCallback)((function(e){g.current=e.changedTouches[0].clientY}),[]),I=(0,Ji.useCallback)((function(e){var t=g.current-e.changedTouches[0].clientY;A(e,t)}),[A]),u=(0,Ji.useCallback)((function(e){if(e){var t=!!ED&&{passive:!1};e.addEventListener("wheel",C,t),e.addEventListener("touchstart",c,t),e.addEventListener("touchmove",I,t)}}),[I,c,C]),d=(0,Ji.useCallback)((function(e){e&&(e.removeEventListener("wheel",C,!1),e.removeEventListener("touchstart",c,!1),e.removeEventListener("touchmove",I,!1))}),[I,c,C]);return(0,Ji.useEffect)((function(){if(t){var e=l.current;return u(e),function(){d(e)}}}),[t,u,d]),function(e){l.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,Ji.useRef)({}),i=(0,Ji.useRef)(null),a=(0,Ji.useCallback)((function(e){if(DM){var t=document.body,n=t&&t.style;if(r&&SM.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&MM<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(TM).forEach((function(e){var t=TM[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&PM()&&(t.addEventListener("touchmove",OM,_M),e&&(e.addEventListener("touchstart",RM,_M),e.addEventListener("touchmove",NM,_M))),MM+=1}}),[r]),s=(0,Ji.useCallback)((function(e){if(DM){var t=document.body,n=t&&t.style;MM=Math.max(MM-1,0),r&&MM<1&&SM.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&PM()&&(t.removeEventListener("touchmove",OM,_M),e&&(e.removeEventListener("touchstart",RM,_M),e.removeEventListener("touchmove",NM,_M)))}}),[r]);return(0,Ji.useEffect)((function(){if(t){var e=i.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){i.current=e}}({isEnabled:n});return RP(Ji.Fragment,null,n&&RP("div",{onClick:LM,css:jM}),t((function(e){o(e),i(e)})))}var BM={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},zM=function(e){var t=e.name,n=e.onFocus;return RP("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:BM,value:"",onChange:function(){}})};function VM(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function UM(){return VM(/^Mac/i)}function ZM(){return VM(/^iPhone/i)||VM(/^iPad/i)||UM()&&navigator.maxTouchPoints>1}var GM={clearIndicator:YD,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return GN({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:HD,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return GN({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return GN({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return GN(GN({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},tM),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return GN({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:FD,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return GN((UN(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),UN(n,"position","absolute"),UN(n,"width","100%"),UN(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return GN({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return GN({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return GN({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return GN({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:jD,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return GN({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return GN({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return GN({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return GN({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var WM={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},HM={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:yD(),captureMenuScroll:!yD(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=GN({ignoreCase:!0,ignoreAccents:!0,stringify:xM,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,s=r.trim,g=r.matchFrom,l=s?wM(n):n,A=s?wM(a(t)):a(t);return o&&(l=l.toLowerCase(),A=A.toLowerCase()),i&&(l=bM(l),A=yM(A)),"start"===g?A.substr(0,l.length)===l:A.indexOf(l)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function YM(e,t,n,r){return{type:"option",data:t,isDisabled:t_(e,t,n),isSelected:n_(e,t,n),label:$M(e,t),value:e_(e,t),index:r}}function KM(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return YM(e,n,t,r)})).filter((function(t){return qM(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=YM(e,n,t,r);return qM(e,i)?i:void 0})).filter(kD)}function QM(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,iR(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function XM(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,iR(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function qM(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!o_(e)||!i)&&r_(e,{label:a,value:s,data:o},r)}var JM=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},$M=function(e,t){return e.getOptionLabel(t)},e_=function(e,t){return e.getOptionValue(t)};function t_(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function n_(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=e_(e,t);return n.some((function(t){return e_(e,t)===r}))}function r_(e,t,n){return!e.filterOption||e.filterOption(t,n)}var o_=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},i_=1,a_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eR(e,t)}(n,e);var t=oR(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=UM()||ZM(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),g=r.isOptionDisabled(e,a);if(s){var l=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==l})),"deselect-option",e)}else{if(g)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(iR(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=SD(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(SD(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=SD(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return JM(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return XM(KM(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return o_(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,g=t.isDisabled,l=t.menuIsOpen,A=t.onKeyDown,C=t.tabSelectsValue,c=t.openMenuOnFocus,I=r.state,u=I.focusedOption,d=I.focusedValue,h=I.selectValue;if(!(g||"function"==typeof A&&(A(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(d)r.removeValue(d);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!l||!C||!u||c&&r.isOptionSelected(u,h))return;r.selectOption(u);break;case"Enter":if(229===e.keyCode)break;if(l){if(!u)return;if(r.isComposing)return;r.selectOption(u);break}return;case"Escape":l?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!l){r.openMenu("first");break}if(!u)return;r.selectOption(u);break;case"ArrowUp":l?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":l?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!l)return;r.focusOption("pageup");break;case"PageDown":if(!l)return;r.focusOption("pagedown");break;case"Home":if(!l)return;r.focusOption("first");break;case"End":if(!l)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++i_),r.state.selectValue=ID(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=JM(o,i[a])}return r}return function(e,t,n){t&&$N(e.prototype,t),n&&$N(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&vD(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(vD(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(WM):GN(GN({},WM),this.props.theme):WM}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,g=s.isMulti,l=s.isRtl,A=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:g,isRtl:l,options:A,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return t_(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return n_(this.props,e,t)}},{key:"filterOption",value:function(e,t){return r_(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=e.form,s=e.menuIsOpen,g=e.required,l=this.getComponents().Input,A=this.state,C=A.inputIsHidden,c=A.ariaSelection,I=this.commonProps,u=r||this.getElementId("input"),d=GN(GN(GN({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":g,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==c?void 0:c.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?Ji.createElement(l,JN({},I,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:u,innerRef:this.getInputRef,isDisabled:t,isHidden:C,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},d)):Ji.createElement(kM,JN({id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:AD,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,g=this.commonProps,l=this.props,A=l.controlShouldRenderValue,C=l.isDisabled,c=l.isMulti,I=l.inputValue,u=l.placeholder,d=this.state,h=d.selectValue,f=d.focusedValue,p=d.isFocused;if(!this.hasValue()||!A)return I?null:Ji.createElement(s,JN({},g,{key:"placeholder",isDisabled:C,isFocused:p,innerProps:{id:this.getElementId("placeholder")}}),u);if(c)return h.map((function(t,a){var s=t===f,l="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return Ji.createElement(n,JN({},g,{components:{Container:r,Label:o,Remove:i},isFocused:s,isDisabled:C,key:l,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(I)return null;var m=h[0];return Ji.createElement(a,JN({},g,{data:m,isDisabled:C}),this.formatOptionLabel(m,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Ji.createElement(e,JN({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return Ji.createElement(e,JN({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return Ji.createElement(n,JN({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Ji.createElement(e,JN({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,g=t.NoOptionsMessage,l=t.Option,A=this.commonProps,C=this.state.focusedOption,c=this.props,I=c.captureMenuScroll,u=c.inputValue,d=c.isLoading,h=c.loadingMessage,f=c.minMenuHeight,p=c.maxMenuHeight,m=c.menuIsOpen,v=c.menuPlacement,y=c.menuPosition,b=c.menuPortalTarget,w=c.menuShouldBlockScroll,x=c.menuShouldScrollIntoView,E=c.noOptionsMessage,k=c.onMenuScrollToTop,S=c.onMenuScrollToBottom;if(!m)return null;var T,O=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,g=t.value,c=C===o,I=i?void 0:function(){return e.onOptionHover(o)},u=i?void 0:function(){return e.selectOption(o)},d="".concat(e.getElementId("option"),"-").concat(n),h={id:d,onClick:u,onMouseMove:I,onMouseOver:I,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return Ji.createElement(l,JN({},A,{innerProps:h,data:o,isDisabled:i,isSelected:a,key:d,label:s,type:r,value:g,isFocused:c,innerRef:c?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())T=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),g="".concat(s,"-heading");return Ji.createElement(n,JN({},A,{key:s,data:o,options:i,Heading:r,headingProps:{id:g,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return O(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return O(t,"".concat(t.index))}));else if(d){var N=h({inputValue:u});if(null===N)return null;T=Ji.createElement(s,A,N)}else{var R=E({inputValue:u});if(null===R)return null;T=Ji.createElement(g,A,R)}var P={minMenuHeight:f,maxMenuHeight:p,menuPlacement:v,menuPosition:y,menuShouldScrollIntoView:x},D=Ji.createElement(MD,JN({},A,P),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return Ji.createElement(o,JN({},A,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:d,placement:a}),Ji.createElement(FM,{captureEnabled:I,onTopArrive:k,onBottomArrive:S,lockEnabled:w},(function(t){return Ji.createElement(i,JN({},A,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":A.isMulti,id:e.getElementId("listbox")},isLoading:d,maxHeight:s,focusedOption:C}),T)})))}));return b||"fixed"===y?Ji.createElement(a,JN({},A,{appendTo:b,controlElement:this.controlRef,menuPlacement:v,menuPosition:y}),D):D}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!r)return Ji.createElement(zM,{name:i,onFocus:this.onValueInputFocus});if(i&&!r){if(o){if(n){var g=s.map((function(t){return e.getOptionValue(t)})).join(n);return Ji.createElement("input",{name:i,type:"hidden",value:g})}var l=s.length>0?s.map((function(t,n){return Ji.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):Ji.createElement("input",{name:i,type:"hidden",value:""});return Ji.createElement("div",null,l)}var A=s[0]?this.getOptionValue(s[0]):"";return Ji.createElement("input",{name:i,type:"hidden",value:A})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return Ji.createElement(uM,JN({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,s=i.id,g=i.isDisabled,l=i.menuIsOpen,A=this.state.isFocused,C=this.commonProps=this.getCommonProps();return Ji.createElement(r,JN({},C,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:A}),this.renderLiveRegion(),Ji.createElement(t,JN({},C,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:A,menuIsOpen:l}),Ji.createElement(o,JN({},C,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),Ji.createElement(n,JN({},C,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,g=t.instancePrefix,l=e.options,A=e.value,C=e.menuIsOpen,c=e.inputValue,I=e.isMulti,u=ID(A),d={};if(n&&(A!==n.value||l!==n.options||C!==n.menuIsOpen||c!==n.inputValue)){var h=C?function(e,t){return QM(KM(e,t))}(e,u):[],f=C?XM(KM(e,u),"".concat(g,"-option")):[],p=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,h);d={selectValue:u,focusedOption:m,focusedOptionId:JM(f,m),focusableOptionsWithIds:f,focusedValue:p,clearFocusValueOnUpdate:!1}}var v=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},y=i,b=a&&s;return a&&!b&&(y={value:SD(I,u,u[0]||null),options:u,action:"initial-input-focus"},b=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(y=null),GN(GN(GN({},d),v),{},{prevProps:e,ariaSelection:y,prevWasFocused:b})}}]),n}(Ji.Component);a_.defaultProps=HM;var s_=(0,Ji.forwardRef)((function(e,t){var n=qN(e);return Ji.createElement(a_,JN({ref:t},n))}));function g_(){return g_=Object.assign?Object.assign.bind():function(e){for(var t=1;te.map((e=>({label:e,value:e}))),A_=e=>{let{type:t,manufacturer:n,supplier:r,mounting_style:o,farads:i,ohms:a,register:s,handleSubmit:g,control:l,onSubmit:A}=e;const C=ZO({control:l,defaultValue:"",name:"type"}),c=(e,t,n,r)=>Ji.createElement("div",{className:"flex flex-col w-full",key:t},Ji.createElement("label",{className:"block mb-2 font-semibold text-gray-700 text-md",htmlFor:t},e),Ji.createElement(WO,{control:r,defaultValue:null,name:t,render:e=>{let{field:t}=e;return Ji.createElement(s_,{isClearable:!0,onChange:e=>t.onChange(null==e?void 0:e.value),options:[{label:"All",value:"all"},...n],value:n.find((e=>e.value===t.value))})}}));return Ji.createElement("form",{onSubmit:g(A)},Ji.createElement("div",{className:"flex flex-col w-full gap-6 -mx-2"},Ji.createElement("div",{className:"w-full px-2"},Ji.createElement("label",{className:"block mb-2 font-semibold text-gray-700 text-md",htmlFor:"search"},"Search"),Ji.createElement("input",g_({type:"text"},s("search"),{autoComplete:"off",className:"w-full h-10 pl-2 border border-gray-300 rounded-md focus:border-brandgreen-500 focus:ring-1 focus:ring-brandgreen-500",id:"search",placeholder:"Search"}))),Ji.createElement("div",{className:"grid w-full grid-cols-1 gap-4 px-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"},c("Type","type",l_(t),l),c("Manufacturer","manufacturer",n,l),c("Supplier","supplier",r,l),c("Mounting Style","mounting_style",o,l),"Capacitor"===C&&c("Farads","farads",l_(i),l),"Resistor"===C&&c("Ohms","ohms",l_(a),l)),Ji.createElement("div",{className:"w-full px-2 md:w-1/2 lg:w-1/3"},Ji.createElement("button",{className:"inline-flex items-center px-4 py-2 text-base font-medium text-white border border-transparent rounded-md bg-brandgreen-500 hover:bg-brandgreen-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brandgreen-500",type:"submit"},"Search"))))},C_=(Object.freeze({AUD:"Australian Dollar",BRL:"Brazilian Real",CAD:"Canadian Dollar",CHF:"Swiss Franc",CNH:"Chinese Yuan",CZK:"Czech Koruna",DKK:"Danish Krone",EUR:"Euro",GBP:"British Pound",HKD:"Hong Kong Dollar",HUF:"Hungarian Forint",IDR:"Indonesian Rupiah",INR:"Indian Rupee",ILS:"Israeli New Shekel",JPY:"Japanese Yen",KRW:"South Korean Won",MXN:"Mexican Peso",MYR:"Malaysian Ringgit",NOK:"Norwegian Krone",NZD:"New Zealand Dollar",PHP:"Philippine Peso",PLN:"Polish Złoty",QAR:"Qatari Riyal",RUB:"Russian Ruble",SAR:"Saudi Riyal",SEK:"Swedish Krona",SGD:"Singapore Dollar",THB:"Thai Baht",TRY:"Turkish Lira",USD:"US Dollar",ZAR:"South African Rand",AED:"UAE Dirham"}),function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD";"number"!=typeof e&&(e=parseFloat(e)),isNaN(e)&&(e=0);const r=null!==(t={AUD:2,BRL:2,CAD:2,CHF:2,CNH:2,CZK:2,DKK:2,EUR:2,GBP:2,HKD:2,HUF:0,IDR:0,INR:2,ILS:2,JPY:0,KRW:0,MXN:2,MYR:2,NOK:2,NZD:2,PHP:2,PLN:2,QAR:2,RUB:2,SAR:2,SEK:2,SGD:2,THB:2,TRY:2,USD:2,ZAR:2,AED:2}[n])&&void 0!==t?t:2;return e.toFixed(r)});function c_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I_(e){for(var t=1;t{let{page:t=1,search:n,filters:r={},order:o}=e;const i=od(),{data:a,isLoading:s,isError:g}=yx({queryFn:async()=>(await bw.get("/api/components/",{params:I_(I_({page:t,search:n},r),{},{order:o})})).data,queryKey:["getComponents",JSON.stringify({filters:r,order:o,page:t,search:n})]});return{componentsAreError:g,componentsAreLoading:s,componentsData:a,refetchComponents:e=>{let{newPage:t,newSearch:n,newFilters:r,newOrder:o}=e;const a=["getComponents",JSON.stringify({filters:r,order:o,page:t,search:n})];i.invalidateQueries({queryKey:a})}}};let h_=function(e){return e.USD="USD",e.EUR="EUR",e.JPY="JPY",e.GBP="GBP",e.AUD="AUD",e.CAD="CAD",e.CHF="CHF",e.CNY="CNY",e.HKD="HKD",e.NZD="NZD",e.SEK="SEK",e.KRW="KRW",e.SGD="SGD",e.NOK="NOK",e.INR="INR",e}({});const f_={AUD:{name:"Australian Dollar",symbol:"A$"},CAD:{name:"Canadian Dollar",symbol:"C$"},CHF:{name:"Swiss Franc",symbol:"CHF"},CNY:{name:"Chinese Yuan",symbol:"¥"},EUR:{name:"Euro",symbol:"€"},GBP:{name:"British Pound",symbol:"£"},HKD:{name:"Hong Kong Dollar",symbol:"HK$"},INR:{name:"Indian Rupee",symbol:"₹"},JPY:{name:"Japanese Yen",symbol:"¥"},KRW:{name:"South Korean Won",symbol:"₩"},NOK:{name:"Norwegian Krone",symbol:"kr"},NZD:{name:"New Zealand Dollar",symbol:"NZ$"},SEK:{name:"Swedish Krona",symbol:"kr"},SGD:{name:"Singapore Dollar",symbol:"S$"},USD:{name:"US Dollar",symbol:"$"}};function p_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m_(e){for(var t=1;tObject.keys(f_).includes(e),b_=()=>{const e=ny.get("csrftoken");return yx({queryFn:async()=>{try{const t=await bw.get("/api/currency/",{headers:{"X-CSRFToken":e||""},withCredentials:!0}),n=t.data.default_currency;if(!y_(n))throw new Error("Invalid currency received from the server.");return localStorage.setItem("currency",n),m_(m_({},t.data),{},{currency_name:f_[n].name,currency_symbol:f_[n].symbol})}catch(e){const t=localStorage.getItem("currency")||"USD";if(!y_(t))throw new Error("Invalid currency found in localStorage");return{currency_name:f_[t].name,currency_symbol:f_[t].symbol,default_currency:t,exchange_rate:1}}},queryKey:["userCurrency"],retry:!1,staleTime:0})};function w_(){return w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function E_(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const k_=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}new Map;const S_=$i.startTransition;Dh.flushSync,$i.useId;function T_(e){let{basename:t,children:n,future:r,window:o}=e,i=Ji.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),zA((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return jA("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:FA(t)}),null,e)}({window:o,v5Compat:!0}));let a=i.current,[s,g]=Ji.useState({action:a.action,location:a.location}),{v7_startTransition:l}=r||{},A=Ji.useCallback((e=>{l&&S_?S_((()=>g(e))):g(e)}),[g,l]);return Ji.useLayoutEffect((()=>a.listen(A)),[a,A]),Ji.useEffect((()=>UC(r)),[r]),Ji.createElement(WC,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const O_="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,N_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,R_=Ji.forwardRef((function(e,t){let n,{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:g,to:l,preventScrollReset:A,viewTransition:C}=e,c=x_(e,k_),{basename:I}=Ji.useContext(pC),u=!1;if("string"==typeof l&&N_.test(l)&&(n=l,O_))try{let e=new URL(window.location.href),t=l.startsWith("//")?new URL(e.protocol+l):new URL(l),n=rC(t.pathname,I);t.origin===e.origin&&null!=n?l=n+t.search+t.hash:u=!0}catch(e){}let d=function(e,t){let{relative:n}=void 0===t?{}:t;bC()||MA(!1);let{basename:r,navigator:o}=Ji.useContext(pC),{hash:i,pathname:a,search:s}=SC(e,{relative:n}),g=a;return"/"!==r&&(g="/"===a?r:gC([r,a])),o.createHref({pathname:g,search:s,hash:i})}(l,{relative:o}),h=function(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}=void 0===t?{}:t,g=EC(),l=wC(),A=SC(e,{relative:a});return Ji.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:FA(l)===FA(A);g(e,{replace:n,state:o,preventScrollReset:i,relative:a,viewTransition:s})}}),[l,g,A,r,o,n,e,i,a,s])}(l,{replace:a,state:s,target:g,preventScrollReset:A,relative:o,viewTransition:C});return Ji.createElement("a",w_({},c,{href:n||d,onClick:u||i?r:function(e){r&&r(e),e.defaultPrevented||h(e)},ref:t,target:g}))}));var P_,D_;function M_(e){let t=Ji.useRef(E_(e)),n=Ji.useRef(!1),r=wC(),o=Ji.useMemo((()=>function(e,t){let n=E_(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),i=EC(),a=Ji.useCallback(((e,t)=>{const r=E_("function"==typeof e?e(o):e);n.current=!0,i("?"+r,t)}),[i,o]);return[o,a]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(P_||(P_={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(D_||(D_={}));function __(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,eR(e,t)}const L_=!1,j_=Ji.createContext(null);var F_="unmounted",B_="exited",z_="entering",V_="entered",U_="exiting",Z_=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=B_,r.appearStatus=z_):o=V_:o=t.unmountOnExit||t.mountOnEnter?F_:B_,r.state={status:o},r.nextCallback=null,r}__(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===F_?{status:B_}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==z_&&n!==V_&&(t=z_):n!==z_&&n!==V_||(t=U_)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===z_){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Ph.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===B_&&this.setState({status:F_})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Ph.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),g=r?s.appear:s.enter;!e&&!n||L_?this.safeSetState({status:V_},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:z_},(function(){t.props.onEntering(i,a),t.onTransitionEnd(g,(function(){t.safeSetState({status:V_},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Ph.findDOMNode(this);t&&!L_?(this.props.onExit(r),this.safeSetState({status:U_},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:B_},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:B_},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Ph.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===F_)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,KN(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return Ji.createElement(j_.Provider,{value:null},"function"==typeof n?n(e,r):Ji.cloneElement(Ji.Children.only(n),r))},t}(Ji.Component);function G_(){}Z_.contextType=j_,Z_.propTypes={},Z_.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:G_,onEntering:G_,onEntered:G_,onExit:G_,onExiting:G_,onExited:G_},Z_.UNMOUNTED=F_,Z_.EXITED=B_,Z_.ENTERING=z_,Z_.ENTERED=V_,Z_.EXITING=U_;const W_=Z_;function H_(e,t){var n=Object.create(null);return e&&Ji.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,Ji.isValidElement)(e)?t(e):e}(e)})),n}function Y_(e,t,n){return null!=n[t]?n[t]:e.props[t]}function K_(e,t,n){var r=H_(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var g in t){if(o[g])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{}}),t=e.Input,n=e.MultiValue,r=e.Placeholder,o=e.SingleValue,i=e.ValueContainer,a=QN(e,cL);return GN({Input:$_(t),MultiValue:oL(n),Placeholder:iL(r),SingleValue:aL(o),ValueContainer:CL(i)},a)},uL=IL(),dL=(uL.Input,uL.MultiValue,uL.Placeholder,uL.SingleValue,uL.ValueContainer,AM(IL));function hL({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const fL=Ji.forwardRef(hL);function pL(){return pL=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t,n;let{clearErrors:r,control:o,register:i,suppliers:a,errors:s}=e;const{fields:g,append:l,remove:A}=bN({control:o,name:"supplier_items"}),C=Ji.createElement("span",{className:"text-red-500"},"*");return Ji.createElement("div",{className:"md:col-span-2"},Ji.createElement("h4",{className:"text-sm font-medium text-gray-700 mb-1.5"},"Supplier Items ",C),(null===(t=s.supplier_items)||void 0===t?void 0:t.message)&&Ji.createElement("p",{className:"text-red-500 text-sm"},s.supplier_items.message),(null!=g?g:[]).map(((e,t)=>{var n,r,g,l,c,I,u,d,h,f;return Ji.createElement("div",{className:"border p-4 rounded-md mb-4",key:e.id},0===t&&Ji.createElement("div",{className:"mb-3"},Ji.createElement(zT,{icon:!0,padding:"compact",variant:"info"},Ji.createElement("p",{className:"text-xs text-blue-500"},"Suppliers are vendors where you can purchase components, such as Mouser or DigiKey, in contrast to manufacturers who produce the components. Please add one or more suppliers."))),Ji.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6"},Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"supplier_items.".concat(t,".supplier")},"Supplier ",C),Ji.createElement(WO,{control:o,name:"supplier_items.".concat(t,".supplier"),render:e=>{let{field:t}=e;return Ji.createElement(s_,pL({},t,{className:"react-select-container",classNamePrefix:"react-select",options:a.map((e=>({label:e.name,value:e.id}))),placeholder:"Select Supplier"}))},rules:{required:"Supplier is required"}}),(null==s||null===(n=s.supplier_items)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.supplier)&&Ji.createElement("p",{className:"text-red-500 text-sm"}," ",s.supplier_items[t].supplier.message," ")),Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"supplier_items.".concat(t,".supplier_item_no")},"Supplier Item No. ",C),Ji.createElement("input",pL({},i("supplier_items.".concat(t,".supplier_item_no"),{required:"Supplier Item No. is required"}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"supplier_items.".concat(t,".supplier_item_no"),type:"text"})),(null==s||null===(g=s.supplier_items)||void 0===g||null===(l=g[t])||void 0===l?void 0:l.supplier_item_no)&&Ji.createElement("p",{className:"text-red-500 text-sm"},s.supplier_items[t].supplier_item_no.message)),Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"supplier_items.".concat(t,".price")},"Price ",C),Ji.createElement("input",pL({},i("supplier_items.".concat(t,".price"),{min:{message:"Price must be greater than 0",value:.01},required:"Price is required"}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"supplier_items.".concat(t,".price"),step:"0.01",type:"number"})),(null===(c=s.supplier_items)||void 0===c||null===(I=c[t])||void 0===I?void 0:I.price)&&Ji.createElement("p",{className:"text-red-500 text-sm"},s.supplier_items[t].price.message)),Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"supplier_items.".concat(t,".currency")},"Currency ",C),Ji.createElement("select",pL({},i("supplier_items.".concat(t,".currency"),{required:"Currency is required"}),{className:"w-full p-2 border border-gray-300 rounded"}),Object.entries(f_).map((e=>{let[t,{name:n}]=e;return Ji.createElement("option",{key:t,value:t},n," (",t,")")}))),(null===(u=s.supplier_items)||void 0===u||null===(d=u[t])||void 0===d?void 0:d.currency)&&Ji.createElement("p",{className:"text-red-500 text-sm"},s.supplier_items[t].currency.message)),Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"supplier_items.".concat(t,".link")},"Link ",C),Ji.createElement("input",pL({},i("supplier_items.".concat(t,".link"),{pattern:{message:"Invalid URL",value:/^(https?:\/\/)?([\w\d\-]+\.)+[\w\d]{2,}(\/.*)?\/?$/},required:"Link is required"}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"supplier_items.".concat(t,".link"),type:"url"})),(null===(h=s.supplier_items)||void 0===h||null===(f=h[t])||void 0===f?void 0:f.link)&&Ji.createElement("p",{className:"text-red-500 text-sm"},s.supplier_items[t].link.message)),Ji.createElement("div",{className:"md:col-span-3 flex justify-end"},Ji.createElement("button",{className:"mt-2 text-sm text-red-500 hover:text-red-700",onClick:()=>A(t),type:"button"},Ji.createElement(fL,{className:"w-5 h-5"})))))})),Ji.createElement("button",{className:"mt-2 px-4 py-2 text-sm text-white bg-brandgreen-600 rounded-md hover:bg-brandgreen-500",onClick:()=>{r("supplier_items"),l({currency:"USD",link:"",pcs:1,price:0,supplier:"",supplier_item_no:""})},type:"button"},(null!=g?g:[]).length>=1?"Add another supplier":"Add supplier"),(null===(n=s.supplier_items)||void 0===n?void 0:n.root)&&Ji.createElement("p",{className:"text-red-500 text-sm mt-2"},s.supplier_items.root.message))};var vL=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function yL(e,t){return e===t||!(!vL(e)||!vL(t))}function bL(e,t){if(e.length!==t.length)return!1;for(var n=0;n=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var SL=-1;function TL(e){if(void 0===e&&(e=!1),-1===SL||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),SL=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return SL}var OL=null;function NL(e){if(void 0===e&&(e=!1),null===OL||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?OL="positive-descending":(t.scrollLeft=1,OL=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),OL}return OL}var RL=function(e,t){return e};function PL(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,g=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,A=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=g(r.props,rR(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:rR(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=wL((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=wL((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,g=i.layout,A=r._getItemStyleCache(l&&s,l&&g,l&&a);if(A.hasOwnProperty(e))t=A[e];else{var C=n(r.props,e,r._instanceProps),c=o(r.props,e,r._instanceProps),I="horizontal"===a||"horizontal"===g,u="rtl"===a,d=I?C:0;A[e]=t={position:"absolute",left:u?void 0:d,right:u?d:void 0,top:I?0:C,height:I?"100%":c,width:I?c:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=wL((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(NL()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffsetg.clientWidth?TL():0:g.scrollHeight>g.clientHeight?TL():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},C.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},C.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(NL()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},C.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&EL(this._resetIsScrollingTimeoutId)},C.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,g=e.innerTagName,l=e.itemCount,A=e.itemData,C=e.itemKey,c=void 0===C?RL:C,I=e.layout,u=e.outerElementType,d=e.outerTagName,h=e.style,f=e.useIsScrolling,p=e.width,m=this.state.isScrolling,v="horizontal"===o||"horizontal"===I,y=v?this._onScrollHorizontal:this._onScrollVertical,b=this._getRangeToRender(),w=b[0],x=b[1],E=[];if(l>0)for(var k=w;k<=x;k++)E.push((0,Ji.createElement)(t,{data:A,key:c(k,A),index:k,isScrolling:f?m:void 0,style:this._getItemStyle(k)}));var S=r(this.props,this._instanceProps);return(0,Ji.createElement)(u||d||"div",{className:n,onScroll:y,ref:this._outerRefSetter,style:JN({position:"relative",height:i,width:p,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},h)},(0,Ji.createElement)(s||g||"div",{children:E,ref:a,style:{height:v?"100%":S,pointerEvents:m?"none":void 0,width:v?S:"100%"}}))},C._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,g=i.scrollUpdateWasRequested;this._callOnScroll(a,s,g)}},C._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,g=r.scrollOffset;if(0===t)return[0,0,0,0];var l=a(this.props,g,this._instanceProps),A=s(this.props,l,g,this._instanceProps),C=o&&"backward"!==i?1:Math.max(1,n),c=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,l-C),Math.max(0,Math.min(t-1,A+c)),l,A]},t}(Ji.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var DL=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ML=PL({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,g=e.itemCount,l=e.itemSize,A=e.layout,C=e.width,c="horizontal"===a||"horizontal"===A?C:s,I=Math.max(0,g*l-c),u=Math.min(I,t*l),d=Math.max(0,t*l-c+l+i);switch("smart"===n&&(n=r>=d-c&&r<=u+c?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var h=Math.round(d+(u-d)/2);return hI+Math.floor(c/2)?I:h;default:return r>=d&&r<=u?r:r{var t;const{options:n,children:r,maxHeight:o,getValue:i}=e,a=(null===(t=i())||void 0===t?void 0:t[0])||null,s=35*n.findIndex((e=>e.value===(null==a?void 0:a.value)));return Ji.createElement(ML,{height:Math.min(o,35*n.length),initialScrollOffset:s,itemCount:n.length,itemSize:35,style:{overflow:"auto"}},(e=>{let{index:t,style:n}=e;return Ji.createElement("div",{style:n},r[t])}))};function LL(){return LL=Object.assign?Object.assign.bind():function(e){for(var t=1;tvoid 0!==e&&e>0||"Farads must be a positive number"}},ohms:{relevantTypes:["Resistor","Photoresistor (LDR)","Potentiometer","Trimpot"],rules:{required:"Ohms is required",validate:e=>void 0!==e&&e>0||"Ohms must be a positive number"}},tolerance:{relevantTypes:["Capacitor","Resistor","Potentiometer","Trimpot"],rules:{rules:{validate:e=>!e||/^(\+\/-|\+|-|\+-|-+)?\d+(\.\d+)?%$/.test(e)||"Invalid tolerance format (e.g., '+5%', '+/-10%', '-+3%')"}}},voltage_rating:{relevantTypes:["Resistor","Capacitor","Jack","Potentiometer","Trimpot"],rules:{validate:e=>{if(!e)return!0;const t=e.match(/^(\d+(\.\d+)?)(V|kV|mV)$/);if(!t)return"Invalid voltage rating format (e.g., '5V', '0.3kV', '120mV')";return!(parseFloat(t[1])<=0)||"Voltage must be greater than 0"}}},wattage:{relevantTypes:["Resistor","Potentiometer","Trimpot"],rules:{validate:e=>{if(!e)return!0;const t=e.match(/^(\d+(\.\d+)?)W$/);if(!t)return"Invalid wattage format (e.g., '5W', '0.3W')";return!(parseFloat(t[1])<=0)||"Wattage must be greater than 0"}}}},GL={farads:["Capacitor"],ohms:["Resistor","Photoresistor (LDR)","Potentiometer","Trimpot"],tolerance:["Capacitor","Resistor","Potentiometer","Trimpot"],voltage_rating:["Resistor","Capacitor","Jack","Potentiometer","Trimpot"],wattage:["Resistor","Potentiometer","Trimpot"]},WL=e=>{var t,n,r;let{formRef:o,isSubmitting:i,setIsSubmitting:a,handleSuccess:s,allowInventoryOption:g=!1}=e;const[l,A]=(0,Ji.useState)(null),[C,c]=(0,Ji.useState)(!1),{clearErrors:I,control:u,register:d,handleSubmit:h,setError:f,formState:{errors:p}}=BN({defaultValues:{supplier_items:[]},mode:"onSubmit",reValidateMode:"onChange"}),{user:m,userIsLoading:v,userIsError:y}=bx(),{data:b,isLoading:w,isError:x}=(()=>{const e=ny.get("csrftoken");return yx({queryFn:async()=>{try{return(await bw.get("/api/components/options/",{headers:{"X-CSRFToken":e||""},withCredentials:!0})).data}catch(e){throw new Error("Failed to fetch dropdown options.")}},queryKey:["componentDropdownOptions"]})})(),E=(()=>{const e=ny.get("csrftoken"),t=od();return ey({mutationFn:async t=>{try{return(await bw.post("/api/components/create/",t,{headers:{"Content-Type":"application/json","X-CSRFToken":e||""},withCredentials:!0})).data}catch(e){if(e.response&&e.response.data)throw{fieldErrors:e.response.data,message:"Failed to submit component."};throw new Error("An unexpected error occurred while submitting the component.")}},onError:e=>{},onSuccess:()=>{t.invalidateQueries({queryKey:["inventory"]})}})})(),k=(null==b||null===(t=b.types)||void 0===t?void 0:t.map((e=>({label:e.name,value:e.id}))))||[],S=(null===(n=ZO({control:u,name:"type"}))||void 0===n?void 0:n.label)||"",T=e=>{var t;return(null===(t=GL[e])||void 0===t?void 0:t.includes(S))||!1},O=Ji.createElement("span",{className:"text-red-500"},"*");return w?Ji.createElement("div",null,"Loading..."):x?Ji.createElement("div",null,"Error loading dropdown options."):v?Ji.createElement("div",{className:"text-center text-gray-500 animate-pulse"},"Loading..."):y||!m?Ji.createElement(zT,{icon:!0,variant:"warning"},Ji.createElement("p",null,"Please"," ",Ji.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:"https://bom-squad.com/accounts/login/"},Ji.createElement("b",null,"login"))," ","or"," ",Ji.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:"https://bom-squad.com/accounts/signup/"},Ji.createElement("b",null,"create an account"))," ","to add components.")):Ji.createElement(Ji.Fragment,null,Ji.createElement("div",{className:"mb-6"},l&&Ji.createElement(zT,{variant:"warning"},Ji.createElement("p",null,l.message),l.detailedMessage&&Ji.createElement("pre",{className:"text-xs text-gray-500 whitespace-pre-wrap"},l.detailedMessage))),Ji.createElement("form",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",onSubmit:h((async e=>{if(i)return;if(a(!0),!e.supplier_items||0===e.supplier_items.length)return f("supplier_items",{message:"At least one supplier item is required.",type:"manual"}),void a(!1);const t=(e=>{const t=e=>e&&e.value?e.value:e;return{component:{farads:e.farads||null,farads_unit:t(e.farads_unit),manufacturer:t(e.manufacturer),manufacturer_part_no:e.manufacturer_part_no,mounting_style:t(e.mounting_style),ohms:t(e.ohms),ohms_unit:t(e.ohms_unit),tolerance:e.tolerance||null,type:t(e.type),voltage_rating:e.voltage_rating||null,wattage:e.wattage||null},quantity:e.quantity,supplier_items:e.supplier_items.map((e=>({currency:e.currency,link:e.link||"",pcs:e.pcs?parseInt(e.pcs,1):null,price:parseFloat(e.price||0),supplier:t(e.supplier),supplier_item_no:e.supplier_item_no||""})))}})(e);try{await E.mutateAsync(t),s()}catch(e){if(e.fieldErrors){const t=e.fieldErrors;t.component_errors&&Object.entries(t.component_errors).forEach((e=>{let[t,n]=e;Array.isArray(n)&&n.length>0&&f(t,{message:n.join(" "),type:"server"})})),t.supplier_item_no&&t.supplier_item_no.forEach(((e,t)=>{f("supplier_items.".concat(t,".supplier_item_no"),{message:e,type:"server"})}));const n=Object.entries(t).flatMap((e=>{let[t,n]=e;return"fieldErrors"===t&&"object"==typeof n?Object.entries(n).flatMap((e=>{let[t,n]=e;return"object"==typeof n?Object.entries(n).map((e=>{let[n,r]=e;return"".concat(t,".").concat(n,": ").concat(Array.isArray(r)?r.join(", "):r)})):"".concat(t,": ").concat(n)})):"object"==typeof n?Object.entries(n).map((e=>{let[n,r]=e;return"".concat(t,".").concat(n,": ").concat(Array.isArray(r)?r.join(", "):r)})):"".concat(t,": ").concat(n)})).join("\n");A({detailedMessage:n,message:e.message||"An error occurred while submitting the component.",type:"error"})}}finally{a(!1)}})),ref:o},Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"manufacturer"},"Manufacturer ",O),Ji.createElement(WO,{control:u,name:"manufacturer",render:e=>{var t;let{field:n}=e;return Ji.createElement(s_,LL({},n,{className:"react-select-container",classNamePrefix:"react-select",components:FL({MenuList:_L},zL),options:(null==b||null===(t=b.manufacturers)||void 0===t?void 0:t.map((e=>({label:e.name,value:e.id}))))||[],placeholder:"Select Manufacturer"}))},rules:{required:'Manufacturer is required. If no specific manufacturer, select "Various."'}}),p.manufacturer&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.manufacturer.message)),Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"manufacturer_part_no"},"Manufacturer Part No. ",O),Ji.createElement("input",LL({},d("manufacturer_part_no",{required:"Manufacturer Part Number is required"}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"manufacturer_part_no",type:"text"})),p.manufacturer_part_no&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.manufacturer_part_no.message)),Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"mounting_style"},"Mounting Style ",O),Ji.createElement(WO,{control:u,name:"mounting_style",render:e=>{let{field:t}=e;return Ji.createElement(s_,LL({},t,{className:"react-select-container",classNamePrefix:"react-select",options:VL}))},rules:{required:"Mounting Style is required."}}),p.mounting_style&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.mounting_style.message)),Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"type"},"Type ",O),Ji.createElement(WO,{control:u,name:"type",render:e=>{let{field:t}=e;return Ji.createElement(s_,LL({},t,{className:"react-select-container",classNamePrefix:"react-select",options:k}))},rules:{required:"Type is required."}}),p.type&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.type.message)),T("ohms")&&Ji.createElement(Ji.Fragment,null,Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"ohms"},"Ohms ",O),Ji.createElement("input",LL({},d("ohms"),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"ohms",min:0,type:"number"}))),Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"ohms_unit"},"Ohms Unit ",O),Ji.createElement(WO,{control:u,name:"ohms_unit",render:e=>{let{field:t}=e;return Ji.createElement(s_,LL({},t,{className:"react-select-container",classNamePrefix:"react-select",options:UL.ohms}))}}),p.ohms&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.ohms.message))),T("farads")&&Ji.createElement(Ji.Fragment,null,Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"farads"},"Farads ",O),Ji.createElement("input",LL({},d("farads",T("farads")?ZL.farads.rules:{}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"farads",min:0,type:"number"})),p.farads&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.farads.message)),Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"farads_unit"},"Farads Unit ",O),Ji.createElement(WO,{control:u,name:"farads_unit",render:e=>{let{field:t}=e;return Ji.createElement(s_,LL({},t,{className:"react-select-container",classNamePrefix:"react-select",options:UL.farads}))}}),p.farads_unit&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.farads_unit.message))),T("tolerance")&&Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"tolerance"},"Tolerance"),Ji.createElement("input",LL({},d("tolerance"),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"tolerance",type:"text"})),p.tolerance&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.tolerance.message)),T("voltage_rating")&&Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"voltage_rating"},"Voltage Rating"),Ji.createElement("input",LL({},d("voltage_rating"),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"voltage_rating",type:"text"})),p.voltage_rating&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.voltage_rating.message)),T("wattage")&&Ji.createElement("div",null,Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"wattage"},"Wattage"),Ji.createElement("input",LL({},d("wattage",T("wattage")?ZL.wattage.rules:{}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"wattage",type:"text"})),p.wattage&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.wattage.message)),Ji.createElement(mL,{clearErrors:I,control:u,errors:p,register:d,suppliers:null!==(r=null==b?void 0:b.suppliers)&&void 0!==r?r:[]}),g&&Ji.createElement("div",{className:"col-span-full"},Ji.createElement("div",{className:"flex items-center"},Ji.createElement("input",{checked:C,className:"mr-2",id:"add_to_inventory",onChange:e=>c(e.target.checked),type:"checkbox"}),Ji.createElement("label",{className:"text-sm font-medium text-gray-700",htmlFor:"add_to_inventory"},"Add this component to your inventory")),C&&Ji.createElement("div",{className:"mt-4"},Ji.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"quantity"},"Quantity"),Ji.createElement("input",LL({},d("quantity",{validate:e=>(null!=e?e:1)>0||"Quantity must be a positive number",valueAsNumber:!0}),{className:"block w-full md:w-24 mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"quantity",min:1,type:"number"})),p.quantity&&Ji.createElement("p",{className:"text-red-500 text-sm"},p.quantity.message)))))},HL=["search","type","manufacturer","supplier","mounting_style"];function YL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KL(e){for(var t=1;t{var e,t,n,r,o,i,a,s,g,l,A,C,c,I,u,d;const[h,f]=(0,Ji.useState)({message:"",show:!1,title:""}),[p,m]=(0,Ji.useState)(),[v,y]=(0,Ji.useState)(),[b,w]=(0,Ji.useState)(!1),[x,E]=(0,Ji.useState)(1),[k,S]=(0,Ji.useState)(!1),[T,O]=M_(),{register:N,control:R,handleSubmit:P,setValue:D}=BN({defaultValues:{filters:JSON.parse(T.get("filters")||"{}"),search:T.get("search")||""}}),M=(0,Ji.useRef)(null),{componentsData:_,componentsAreLoading:L,componentsAreError:j,refetchComponents:F}=d_({filters:JSON.parse(T.get("filters")||"{}"),page:Number(T.get("page")||x),search:T.get("search")||""}),B=(0,Ji.useMemo)((()=>{if(null==_||!_.results)return[];const e=new Map;return _.results.forEach((t=>{e.has(t.id)||e.set(t.id,t)})),Array.from(e.values())}),[null==_?void 0:_.results]),{data:z}=b_(),{user:V}=bx();if((0,Ji.useEffect)((()=>{D("filters",JSON.parse(T.get("filters")||"{}")),D("search",T.get("search")||""),E(Number(T.get("page")||1))}),[T,D]),(0,Ji.useEffect)((()=>{const e=document.getElementById("table__wrapper");e&&e.children&&Array.from(e.children).forEach((e=>{e instanceof HTMLElement&&(e.style.overflow="visible")}))}),[_]),(0,Ji.useEffect)((()=>{null!=_&&_.page&&E(_.page)}),[null==_?void 0:_.page]),j)return Ji.createElement("div",{className:"p-3 ml-[47px] bg-gray-100"},"Error");const U=30,Z=Math.ceil(((null==_?void 0:_.count)||0)/U),G=[{cell:e=>{var t;return Ji.createElement(KT,{id:e.id,user_submitted_status:null!==(t=e.user_submitted_status)&&void 0!==t?t:"approved"},e.discontinued?Ji.createElement("span",null,Ji.createElement("s",null,e.description)," ",Ji.createElement("span",{className:"italic font-bold text-red-500"},"DISCONTINUED")):Ji.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:"".concat(YT(),"/components/").concat(e.id)},e.description))},grow:1,minWidth:"250px",name:"Name",sortable:!0,wrap:!0},{hide:1700,name:Ji.createElement("div",null,"Type"),selector:e=>{var t;return null===(t=e.type)||void 0===t?void 0:t.name},sortable:!0,wrap:!0},{hide:1700,name:Ji.createElement("div",null,"Manufacturer"),selector:e=>{var t;return(null===(t=e.manufacturer)||void 0===t?void 0:t.name)||""},sortable:!0,wrap:!0},{cell:e=>{var t;return(e.supplier_items||[]).length>0?Ji.createElement("ul",{className:"pl-5 list-disc"},null===(t=e.supplier_items)||void 0===t?void 0:t.map((e=>{var t;return Ji.createElement("li",{key:e.id},Ji.createElement("b",null,null===(t=e.supplier)||void 0===t?void 0:t.short_name,": "),e.supplier_item_no?Ji.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:e.link,rel:"noreferrer",target:"_blank"},e.supplier_item_no):Ji.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:e.link,rel:"noreferrer",target:"_blank"},Ji.createElement(XT,{className:"inline-block w-4 h-4"})),e.unit_price&&Ji.createElement("span",{className:"text-xs text-gray-600"}," ","(",(e=>{if(!z||null==e)return"N/A";const t=e*z.exchange_rate;return"".concat(z.currency_symbol).concat(C_(t,z.default_currency))})(e.unit_price),")"))}))):"No supplier items"},name:"Suppliers",sortable:!1,width:"210px"},{cell:e=>e.qualities||"",name:Ji.createElement("div",null,"Qualities"),sortable:!1,wrap:!0},{cell:e=>Ji.createElement(Ad,{hideLoadingTag:!0,hookArgs:{componentId:e.id},useHook:Ex}),name:Ji.createElement("div",null,"Qty in User Inv."),omit:!(null!=V&&V.username),sortable:!1,width:"80px"},{cell:e=>Ji.createElement(Ad,{hideLoadingTag:!0,hookArgs:{componentId:e.id},useHook:xx}),name:Ji.createElement("div",null,"Qty in Shopping List"),omit:!(null!=V&&V.username),sortable:!1,width:"80px"},{button:!0,cell:e=>{var t,n,r;return Ji.createElement(Ji.Fragment,null,Ji.createElement(uv,{onClick:()=>m(e.id),size:"xs",variant:"primary"},"+ Inventory"),Ji.createElement(Nx,{componentId:e.id,componentName:e.supplier_item_no?"".concat(null===(t=e.supplier)||void 0===t?void 0:t.short_name," ").concat(e.supplier_item_no):e.description,open:p===e.id,quantityRequired:1,setOpen:m,text:"Add ".concat(e.description," (").concat(null===(n=e.supplier)||void 0===n?void 0:n.short_name," ").concat(e.supplier_item_no,") to your inventory?"),title:e.supplier_item_no?"Add ".concat(null===(r=e.supplier)||void 0===r?void 0:r.short_name," ").concat(e.supplier_item_no," to Inventory?"):"Add ".concat(e.description," to Inventory?"),type:ld.INVENTORY}))},ignoreRowClick:!0,name:"",omit:!(null!=V&&V.username),sortable:!1,width:"95px"},{button:!0,cell:e=>{var t,n;return Ji.createElement(Ji.Fragment,null,Ji.createElement(uv,{onClick:()=>{y(e.id)},size:"xs",variant:"primary"},"+ Shopping List"),Ji.createElement(Nx,{componentId:e.id,componentName:"".concat(null===(t=e.supplier)||void 0===t?void 0:t.short_name," ").concat(e.supplier_item_no),open:v===e.id,quantityRequired:1,setOpen:y,text:"",title:"Add ".concat(null===(n=e.supplier)||void 0===n?void 0:n.short_name," ").concat(e.supplier_item_no," to Shopping List?"),type:ld.SHOPPING_ANON}))},ignoreRowClick:!0,name:"",omit:!(null!=V&&V.username),sortable:!1,width:"115px"}];return Ji.createElement(Ji.Fragment,null,Ji.createElement(Uc,null,Ji.createElement("title",null,"Browse Components for DIY Synth Projects | BOM Squad"),Ji.createElement("meta",{content:"Explore a vast library of components for DIY synth projects. Filter by type, manufacturer, supplier, and more. Add components to your inventory and shopping list.",name:"description"}),Ji.createElement("meta",{content:"DIY synth components, modular synth parts, guitar pedal components, build your own synth",name:"keywords"})),Ji.createElement("div",{className:"mb-8"},Ji.createElement("div",{className:"w-full py-12"},Ji.createElement("div",{className:"p-10 bg-gray-100 rounded-lg",id:"dataElem"},Ji.createElement(A_,{control:R,farads:null!==(e=null==_||null===(t=_.unique_values)||void 0===t?void 0:t.farads)&&void 0!==e?e:[],handleSubmit:P,manufacturer:null!==(n=null==_||null===(r=_.unique_values)||void 0===r?void 0:r.manufacturer)&&void 0!==n?n:[],mounting_style:null!==(o=null==_||null===(i=_.unique_values)||void 0===i?void 0:i.mounting_style)&&void 0!==o?o:[],ohms:null!==(a=null==_||null===(s=_.unique_values)||void 0===s?void 0:s.ohms)&&void 0!==a?a:[],onSubmit:e=>{const{search:t,type:n,manufacturer:r,supplier:o,mounting_style:i}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{let[,t]=e;return"all"!==t&&""!==t&&void 0!==t})))),g={filters:s,search:t||""};F({newFilters:s,newPage:1,newSearch:g.search}),O({filters:JSON.stringify(s),page:"1",search:g.search}),E(1)},register:N,supplier:null!==(g=null==_||null===(l=_.unique_values)||void 0===l?void 0:l.supplier)&&void 0!==g?g:[],tolerance:null!==(A=null==_||null===(C=_.unique_values)||void 0===C?void 0:C.tolerance)&&void 0!==A?A:[],type:null!==(c=null==_||null===(I=_.unique_values)||void 0===I?void 0:I.type)&&void 0!==c?c:[],voltage_rating:null!==(u=null==_||null===(d=_.unique_values)||void 0===d?void 0:d.voltage_rating)&&void 0!==u?u:[]}))),Ji.createElement(yT,{buttonText:"Add a Component",icon:Ji.createElement(cd,{className:"w-5 h-5"}),onButtonClick:()=>S(!0),title:"Components"}),L?Ji.createElement("div",{className:"text-center animate-pulse"},"Loading..."):Ji.createElement(Ji.Fragment,null,Ji.createElement(Ji.Fragment,null,!(null!=V&&V.username)&&Ji.createElement("div",{className:"mb-8"},Ji.createElement(zT,{variant:"warning"},Ji.createElement("div",{className:"alert alert-warning",role:"alert"},Ji.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:"/accounts/login/"},Ji.createElement("b",null,"Login"))," ","to add components to your shopping list and inventory.")))),Ji.createElement("div",{id:"table__wrapper",style:{overflowX:"visible"}},Ji.createElement(ad.Ay,{columns:G,conditionalRowStyles:[{style:{borderRadius:"8px",boxShadow:"inset 0 0 0 2px #db2777",overflow:"visible"},when:e=>"pending"===e.user_submitted_status}],customStyles:XL,data:B,progressPending:L,responsive:!0})),(null==_?void 0:_.results)&&Ji.createElement("div",{className:"flex items-center justify-between py-4 bg-white border-t border-gray-200"},Ji.createElement(tO,{currentPage:x,navigate:e=>{const t=Math.ceil(((null==_?void 0:_.count)||0)/U);e<1||e>t||(O({filters:T.get("filters")||"{}",page:String(e),search:T.get("search")||""}),F({newFilters:JSON.parse(T.get("filters")||"{}"),newPage:e,newSearch:T.get("search")||""}),E(e))},totalPages:Z})))),Ji.createElement(HT,{customButtons:Ji.createElement("div",{className:"flex justify-end space-x-4"},Ji.createElement("button",{className:"px-4 py-2 mt-4 text-sm font-medium text-gray-900 bg-gray-200 rounded-md hover:bg-gray-300",onClick:()=>S(!1)},"Cancel"),Ji.createElement("button",{className:"px-4 py-2 mt-4 text-sm font-medium text-white border border-transparent rounded-md shadow-sm bg-brandgreen-600 hover:bg-brandgreen-700",onClick:()=>{M.current&&M.current.dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0}))}},Ji.createElement("p",{className:gd()({"animate-pulse":b})},b?"Submiting...":"Submit"))),onSubmit:()=>{S(!1)},open:k,setOpen:S,submitButtonText:"Save",subtitle:Ji.createElement("p",null,'New components can be added to your inventory and shopping list. They can be suggested as options for BOM list items. New components will be marked as "pending" until reviewed by the BOM Squad team.'),title:"Add a Component"},Ji.createElement("div",null,Ji.createElement(WL,{formRef:M,handleSuccess:()=>{S(!1),f({message:"Your new component has been successfully submitted.",show:!0,title:"Component Added"})},isSubmitting:b,setIsSubmitting:w}))),Ji.createElement(WT,{message:h.message,setShow:e=>f((t=>KL(KL({},t),{},{show:"function"==typeof e?e(t.show):e}))),show:h.show,title:h.title}))};function JL({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"}))}const $L=Ji.forwardRef(JL);function ej({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0 1 20.25 6v12A2.25 2.25 0 0 1 18 20.25H6A2.25 2.25 0 0 1 3.75 18V6A2.25 2.25 0 0 1 6 3.75h1.5m9 0h-9"}))}const tj=Ji.forwardRef(ej);function nj({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 13.5 3 3m0 0 3-3m-3 3v-6m1.06-4.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const rj=Ji.forwardRef(nj),oj=["value","onChange"];function ij(){return ij=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{value:t,onChange:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{const e=a.current;e&&null!==o&&e.setSelectionRange(o,o)}),[a,o,t]);return Ji.createElement("input",ij({onChange:e=>{i(e.target.selectionStart||0),n&&n(e)},ref:a,value:t},r))},sj=e=>{let{row:t,locationIdToEdit:n,updatedLocationToSubmit:r,handleLocationChange:o,setLocationIdToEdit:i,handleSubmitLocation:a,handlePillClick:s,handleClick:g,setUpdatedLocationToSubmit:l,showSeparateLocationsWithCommas:A=!0,textSize:C=""}=e;const c=t.location?t.location.filter(Boolean):[];return Ji.createElement("div",{className:"flex justify-between w-full"},t.id===n?Ji.createElement("div",{className:"flex flex-col"},Ji.createElement("div",{className:"flex gap-1.5 pb-1 pt-6"},Ji.createElement("form",{className:"flex content-center w-full gap-1",onSubmit:e=>e.preventDefault()},Ji.createElement(aj,{className:"block w-full rounded-md border-0 px-2 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brandgreen-600 sm:text-sm sm:leading-6",onChange:e=>o(e),type:"text",value:null!=r?r:t.location}),Ji.createElement(uv,{onClick:()=>i(void 0),variant:"muted"},"Cancel"),Ji.createElement(uv,{onClick:()=>a(t.id),type:"submit",variant:"primary"},"Update"))),A&&Ji.createElement("p",{className:"text-xs text-gray-500"},"Separate locations with commas.")):Ji.createElement("ul",{className:"flex flex-wrap w-full"},c.length>0?c.map(((e,n)=>Ji.createElement(Ev,{key:n,onClick:()=>s(t.id,n),showArrow:n!==c.length-1,textSize:C},e))):Ji.createElement("li",{className:"text-gray-500"},"-")),t.id!==n&&Ji.createElement("div",{className:"flex flex-col justify-center",onClick:()=>{i(t.id),g(t,"location",n,i,l)},role:"button"},Ji.createElement(Rv,{className:"w-4 h-4 stroke-slate-300 hover:stroke-pink-500"})))};function gj({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const lj=Ji.forwardRef(gj);function Aj({title:e,titleId:t,...n},r){return Ji.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Ji.createElement("title",{id:t},e):null,Ji.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const Cj=Ji.forwardRef(Aj),cj=e=>{let{row:t,quantityIdToEdit:n,updatedQuantityToSubmit:r,handleQuantityChange:o,handleSubmitQuantity:i,setQuantityIdToEdit:a,setUpdatedQuantityToSubmit:s,handleClick:g}=e;const{id:l,quantity:A}=t;return Ji.createElement("div",{className:"flex content-center justify-between w-full"},l===n?Ji.createElement("div",null,Ji.createElement("form",{className:"flex content-center w-full gap-1",onSubmit:e=>e.preventDefault()},Ji.createElement(Ov(),{className:"block w-16 rounded-md border-0 px-2 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brandgreen-600 sm:text-sm sm:leading-6",onChange:e=>o(e),type:"number",value:null!=r?r:A}),Ji.createElement("div",{className:"flex justify-around gap-1"},Ji.createElement(uv,{className:"h-full",Icon:lj,iconOnly:!0,onClick:()=>{a(void 0),s(void 0)},size:"xs",variant:"muted"},"Cancel"),Ji.createElement(uv,{className:"h-full",Icon:Cj,iconOnly:!0,onClick:()=>i(l),size:"xs",variant:"primary"},"Update")))):Ji.createElement("span",{className:"font-bold"},A),l!==n&&Ji.createElement("div",{onClick:()=>g(t,"quantity",n,a,s),role:"button"},Ji.createElement(Rv,{className:"w-4 h-4 stroke-slate-300 hover:stroke-pink-500"})))};function Ij(e){return Array.isArray?Array.isArray(e):"[object Array]"===vj(e)}function uj(e){return"string"==typeof e}function dj(e){return"number"==typeof e}function hj(e){return!0===e||!1===e||function(e){return fj(e)&&null!==e}(e)&&"[object Boolean]"==vj(e)}function fj(e){return"object"==typeof e}function pj(e){return null!=e}function mj(e){return!e.trim().length}function vj(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const yj=Object.prototype.hasOwnProperty;class bj{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=wj(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function wj(e){let t=null,n=null,r=null,o=1,i=null;if(uj(e)||Ij(e))r=e,t=xj(e),n=Ej(e);else{if(!yj.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const a=e.name;if(r=a,yj.call(e,"weight")&&(o=e.weight,o<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(a));t=xj(a),n=Ej(a),i=e.getFn}return{path:t,id:n,weight:o,src:r,getFn:i}}function xj(e){return Ij(e)?e:e.split(".")}function Ej(e){return Ij(e)?e.join("."):e}const kj={useExtendedSearch:!1,getFn:function(e,t){let n=[],r=!1;const o=(e,t,i)=>{if(pj(e))if(t[i]){const a=e[t[i]];if(!pj(a))return;if(i===t.length-1&&(uj(a)||dj(a)||hj(a)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(a));else if(Ij(a)){r=!0;for(let e=0,n=a.length;ee.score===t.score?e.idx{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,uj(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();uj(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t{let o=t.getFn?t.getFn(e):this.getFn(e,t.path);if(pj(o))if(Ij(o)){let e=[];const t=[{nestedArrIndex:-1,value:o}];for(;t.length;){const{nestedArrIndex:n,value:r}=t.pop();if(pj(r))if(uj(r)&&!mj(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else Ij(r)&&r.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[r]=e}else if(uj(o)&&!mj(o)){let e={v:o,n:this.norm.get(o)};n.$[r]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function Nj(e,t,{getFn:n=Sj.getFn,fieldNormWeight:r=Sj.fieldNormWeight}={}){const o=new Oj({getFn:n,fieldNormWeight:r});return o.setKeys(e.map(wj)),o.setSources(t),o.create(),o}function Rj(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:o=Sj.distance,ignoreLocation:i=Sj.ignoreLocation}={}){const a=t/e.length;if(i)return a;const s=Math.abs(r-n);return o?a+s/o:s?1:a}const Pj=32;function Dj(e,t,n,{location:r=Sj.location,distance:o=Sj.distance,threshold:i=Sj.threshold,findAllMatches:a=Sj.findAllMatches,minMatchCharLength:s=Sj.minMatchCharLength,includeMatches:g=Sj.includeMatches,ignoreLocation:l=Sj.ignoreLocation}={}){if(t.length>Pj)throw new Error((e=>`Pattern length exceeds max of ${e}.`)(Pj));const A=t.length,C=e.length,c=Math.max(0,Math.min(r,C));let I=i,u=c;const d=s>1||g,h=d?Array(C):[];let f;for(;(f=e.indexOf(t,u))>-1;){let e=Rj(t,{currentLocation:f,expectedLocation:c,distance:o,ignoreLocation:l});if(I=Math.min(e,I),u=f+A,d){let e=0;for(;e=g;i-=1){let a=i-1,s=n[e.charAt(a)];if(d&&(h[a]=+!!s),b[i]=(b[i+1]<<1|1)&s,r&&(b[i]|=(p[i+1]|p[i])<<1|1|p[i+1]),b[i]&y&&(m=Rj(t,{errors:r,currentLocation:a,expectedLocation:c,distance:o,ignoreLocation:l}),m<=I)){if(I=m,u=a,u<=c)break;g=Math.max(1,2*c-u)}}if(Rj(t,{errors:r+1,currentLocation:c,expectedLocation:c,distance:o,ignoreLocation:l})>I)break;p=b}const b={isMatch:u>=0,score:Math.max(.001,m)};if(d){const e=function(e=[],t=Sj.minMatchCharLength){let n=[],r=-1,o=-1,i=0;for(let a=e.length;i=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}(h,s);e.length?g&&(b.indices=e):b.isMatch=!1}return b}function Mj(e){let t={};for(let n=0,r=e.length;n{this.chunks.push({pattern:e,alphabet:Mj(e),startIndex:t})},A=this.pattern.length;if(A>Pj){let e=0;const t=A%Pj,n=A-t;for(;e{const{isMatch:u,score:d,indices:h}=Dj(e,t,c,{location:r+I,distance:o,threshold:i,findAllMatches:a,minMatchCharLength:s,includeMatches:n,ignoreLocation:g});u&&(C=!0),A+=d,u&&h&&(l=[...l,...h])}));let c={isMatch:C,score:C?A/this.chunks.length:1};return C&&n&&(c.indices=l),c}}class Lj{constructor(e){this.pattern=e}static isMultiMatch(e){return jj(e,this.multiRegex)}static isSingleMatch(e){return jj(e,this.singleRegex)}search(){}}function jj(e,t){const n=e.match(t);return n?n[1]:null}class Fj extends Lj{constructor(e,{location:t=Sj.location,threshold:n=Sj.threshold,distance:r=Sj.distance,includeMatches:o=Sj.includeMatches,findAllMatches:i=Sj.findAllMatches,minMatchCharLength:a=Sj.minMatchCharLength,isCaseSensitive:s=Sj.isCaseSensitive,ignoreLocation:g=Sj.ignoreLocation}={}){super(e),this._bitapSearch=new _j(e,{location:t,threshold:n,distance:r,includeMatches:o,findAllMatches:i,minMatchCharLength:a,isCaseSensitive:s,ignoreLocation:g})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Bj extends Lj{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const r=[],o=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+o,r.push([t,n-1]);const i=!!r.length;return{isMatch:i,score:i?0:1,indices:r}}}const zj=[class extends Lj{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},Bj,class extends Lj{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends Lj{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends Lj{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends Lj{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends Lj{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},Fj],Vj=zj.length,Uj=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const Zj=new Set([Fj.type,Bj.type]);class Gj{constructor(e,{isCaseSensitive:t=Sj.isCaseSensitive,includeMatches:n=Sj.includeMatches,minMatchCharLength:r=Sj.minMatchCharLength,ignoreLocation:o=Sj.ignoreLocation,findAllMatches:i=Sj.findAllMatches,location:a=Sj.location,threshold:s=Sj.threshold,distance:g=Sj.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:r,findAllMatches:i,ignoreLocation:o,location:a,threshold:s,distance:g},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let n=e.trim().split(Uj).filter((e=>e&&!!e.trim())),r=[];for(let e=0,o=n.length;e!(!e[Yj]&&!e[Kj]),Jj=e=>({[Yj]:Object.keys(e).map((t=>({[t]:e[t]})))});function $j(e,t,{auto:n=!0}={}){const r=e=>{let o=Object.keys(e);const i=(e=>!!e[Qj])(e);if(!i&&o.length>1&&!qj(e))return r(Jj(e));if((e=>!Ij(e)&&fj(e)&&!qj(e))(e)){const r=i?e[Qj]:o[0],a=i?e[Xj]:e[r];if(!uj(a))throw new Error((e=>`Invalid value for key ${e}`)(r));const s={keyId:Ej(r),pattern:a};return n&&(s.searcher=Hj(a,t)),s}let a={children:[],operator:o[0]};return o.forEach((t=>{const n=e[t];Ij(n)&&n.forEach((e=>{a.children.push(r(e))}))})),a};return qj(e)||(e=Jj(e)),r(e)}function eF(e,t){const n=e.matches;t.matches=[],pj(n)&&n.forEach((e=>{if(!pj(e.indices)||!e.indices.length)return;const{indices:n,value:r}=e;let o={indices:n,value:r};e.key&&(o.key=e.key.src),e.idx>-1&&(o.refIndex=e.idx),t.matches.push(o)}))}function tF(e,t){t.score=e.score}class nF{constructor(e,t={},n){this.options={...Sj,...t},this.options.useExtendedSearch,this._keyStore=new bj(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Oj))throw new Error("Incorrect 'index' type");this._myIndex=t||Nj(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){pj(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let n=0,r=this._docs.length;n{let n=1;e.matches.forEach((({key:e,norm:r,score:o})=>{const i=e?e.weight:null;n*=Math.pow(0===o&&i?Number.EPSILON:o,(i||1)*(t?1:r))})),e.score=n}))}(s,{ignoreFieldNorm:a}),o&&s.sort(i),dj(t)&&t>-1&&(s=s.slice(0,t)),function(e,t,{includeMatches:n=Sj.includeMatches,includeScore:r=Sj.includeScore}={}){const o=[];return n&&o.push(eF),r&&o.push(tF),e.map((e=>{const{idx:n}=e,r={item:t[n],refIndex:n};return o.length&&o.forEach((t=>{t(e,r)})),r}))}(s,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const t=Hj(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:e,i:n,n:o})=>{if(!pj(e))return;const{isMatch:i,score:a,indices:s}=t.searchIn(e);i&&r.push({item:e,idx:n,matches:[{score:a,value:e,norm:o,indices:s}]})})),r}_searchLogical(e){const t=$j(e,this.options),n=(e,t,r)=>{if(!e.children){const{keyId:n,searcher:o}=e,i=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:o});return i&&i.length?[{idx:r,item:t,matches:i}]:[]}const o=[];for(let i=0,a=e.children.length;i{if(pj(e)){let a=n(t,e,r);a.length&&(o[r]||(o[r]={idx:r,item:e,matches:[]},i.push(o[r])),a.forEach((({matches:e})=>{o[r].matches.push(...e)})))}})),i}_searchObjectList(e){const t=Hj(e,this.options),{keys:n,records:r}=this._myIndex,o=[];return r.forEach((({$:e,i:r})=>{if(!pj(e))return;let i=[];n.forEach(((n,r)=>{i.push(...this._findMatches({key:n,value:e[r],searcher:t}))})),i.length&&o.push({idx:r,item:e,matches:i})})),o}_findMatches({key:e,value:t,searcher:n}){if(!pj(t))return[];let r=[];if(Ij(t))t.forEach((({v:t,i:o,n:i})=>{if(!pj(t))return;const{isMatch:a,score:s,indices:g}=n.searchIn(t);a&&r.push({score:s,key:e,value:t,idx:o,norm:i,indices:g})}));else{const{v:o,n:i}=t,{isMatch:a,score:s,indices:g}=n.searchIn(o);a&&r.push({score:s,key:e,value:o,norm:i,indices:g})}return r}}nF.version="6.6.2",nF.createIndex=Nj,nF.parseIndex=function(e,{getFn:t=Sj.getFn,fieldNormWeight:n=Sj.fieldNormWeight}={}){const{keys:r,records:o}=e,i=new Oj({getFn:t,fieldNormWeight:n});return i.setKeys(r),i.setIndexRecords(o),i},nF.config=Sj,nF.parseQuery=$j,function(...e){Wj.push(...e)}(Gj);const rF=e=>{let{searchTerm:t,setSearchTerm:n}=e;return Ji.createElement("input",{className:"block w-full rounded-md border-0 p-2 h-[32px] text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brandgreen-600 sm:text-sm sm:leading-6",id:"search",name:"search",onChange:e=>n(e.target.value),placeholder:"Search",type:"text",value:t})};var oF=["color","size","title","className"];function iF(){return iF=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sF=(0,Ji.forwardRef)((function(e,t){var n=e.color,r=e.size,o=e.title,i=e.className,a=aF(e,oF);return Ji.createElement("svg",iF({ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:r,height:r,fill:n,className:["bi","bi-signpost-split",i].filter(Boolean).join(" ")},a),o?Ji.createElement("title",null,o):null,Ji.createElement("path",{d:"M7 7V1.414a1 1 0 0 1 2 0V2h5a1 1 0 0 1 .8.4l.975 1.3a.5.5 0 0 1 0 .6L14.8 5.6a1 1 0 0 1-.8.4H9v10H7v-5H2a1 1 0 0 1-.8-.4L.225 9.3a.5.5 0 0 1 0-.6L1.2 7.4A1 1 0 0 1 2 7zm1 3V8H2l-.75 1L2 10zm0-5h6l.75-1L14 3H8z"}))}));sF.propTypes={color:wT().string,size:wT().oneOfType([wT().string,wT().number]),title:wT().string,className:wT().string},sF.defaultProps={color:"currentColor",size:"1em",title:null,className:""};const gF=sF;function lF(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function AF(e,t){let[n,r]=(0,Ji.useState)((()=>lF(e)));return md((()=>{r(lF(e))}),[e.type,e.as]),md((()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")}),[n,t]),n}let CF=(0,Ji.createContext)(null);function cF(){let e=(0,Ji.useContext)(CF);if(null===e){let e=new Error("You used a