@duffel/components 3.1.9 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,33 +1,33 @@
1
- "use strict";var su=Object.create;var hn=Object.defineProperty;var cu=Object.getOwnPropertyDescriptor;var lu=Object.getOwnPropertyNames;var uu=Object.getPrototypeOf,fu=Object.prototype.hasOwnProperty;var Qi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),To=(t,e)=>{for(var r in e)hn(t,r,{get:e[r],enumerable:!0})},ea=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of lu(e))!fu.call(t,o)&&o!==r&&hn(t,o,{get:()=>e[o],enumerable:!(n=cu(e,o))||n.enumerable});return t};var P=(t,e,r)=>(r=t!=null?su(uu(t)):{},ea(e||!t||!t.__esModule?hn(r,"default",{value:t,enumerable:!0}):r,t)),du=t=>ea(hn({},"__esModule",{value:!0}),t);var Ne=Qi((Zy,ro)=>{(function(){"use strict";var t={}.hasOwnProperty,e="[native code]";function r(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var s=r.apply(null,i);s&&n.push(s)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var c in i)t.call(i,c)&&i[c]&&n.push(c)}}}return n.join(" ")}typeof ro<"u"&&ro.exports?(r.default=r,ro.exports=r):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return r}):window.classNames=r})()});var bl=Qi((So,vl)=>{(function(t,e){typeof So=="object"&&typeof vl<"u"?e(So,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],e):(t=t||self,e(t.ReactStripe={},t.React))})(So,function(t,e){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;function r(_,d){var g=Object.keys(_);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(_);d&&(E=E.filter(function(Y){return Object.getOwnPropertyDescriptor(_,Y).enumerable})),g.push.apply(g,E)}return g}function n(_){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?r(Object(g),!0).forEach(function(E){i(_,E,g[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(g)):r(Object(g)).forEach(function(E){Object.defineProperty(_,E,Object.getOwnPropertyDescriptor(g,E))})}return _}function o(_){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(d){return typeof d}:o=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},o(_)}function i(_,d,g){return d in _?Object.defineProperty(_,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):_[d]=g,_}function a(_,d){return s(_)||c(_,d)||l(_,d)||u()}function s(_){if(Array.isArray(_))return _}function c(_,d){var g=_&&(typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"]);if(g!=null){var E=[],Y=!0,x=!1,W,re;try{for(g=g.call(_);!(Y=(W=g.next()).done)&&(E.push(W.value),!(d&&E.length===d));Y=!0);}catch(I){x=!0,re=I}finally{try{!Y&&g.return!=null&&g.return()}finally{if(x)throw re}}return E}}function l(_,d){if(_){if(typeof _=="string")return f(_,d);var g=Object.prototype.toString.call(_).slice(8,-1);if(g==="Object"&&_.constructor&&(g=_.constructor.name),g==="Map"||g==="Set")return Array.from(_);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return f(_,d)}}function f(_,d){(d==null||d>_.length)&&(d=_.length);for(var g=0,E=new Array(d);g<d;g++)E[g]=_[g];return E}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(_,d){return d={exports:{}},_(d,d.exports),d.exports}var h="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",S=h;function y(){}function M(){}M.resetWarningCache=y;var N=function(){function _(E,Y,x,W,re,I){if(I!==S){var me=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw me.name="Invariant Violation",me}}_.isRequired=_;function d(){return _}var g={array:_,bool:_,func:_,number:_,object:_,string:_,symbol:_,any:_,arrayOf:d,element:_,elementType:_,instanceOf:d,node:_,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:M,resetWarningCache:y};return g.PropTypes=g,g},b=m(function(_){_.exports=N()}),ce=function(d){var g=e.useRef(d);return e.useEffect(function(){g.current=d},[d]),g.current},j=function(d){return d!==null&&o(d)==="object"},qe=function(d){return j(d)&&typeof d.then=="function"},ye=function(d){return j(d)&&typeof d.elements=="function"&&typeof d.createToken=="function"&&typeof d.createPaymentMethod=="function"&&typeof d.confirmCardPayment=="function"},Yt="[object Object]",K=function _(d,g){if(!j(d)||!j(g))return d===g;var E=Array.isArray(d),Y=Array.isArray(g);if(E!==Y)return!1;var x=Object.prototype.toString.call(d)===Yt,W=Object.prototype.toString.call(g)===Yt;if(x!==W)return!1;if(!x&&!E)return d===g;var re=Object.keys(d),I=Object.keys(g);if(re.length!==I.length)return!1;for(var me={},ze=0;ze<re.length;ze+=1)me[re[ze]]=!0;for(var Ze=0;Ze<I.length;Ze+=1)me[I[Ze]]=!0;var Me=Object.keys(me);if(Me.length!==re.length)return!1;var Or=d,Ar=g,ke=function(Wt){return _(Or[Wt],Ar[Wt])};return Me.every(ke)},X=function(d,g,E){return j(d)?Object.keys(d).reduce(function(Y,x){var W=!j(g)||!K(d[x],g[x]);return E.includes(x)?(W&&console.warn("Unsupported prop change: options.".concat(x," is not a mutable property.")),Y):W?n(n({},Y||{}),{},i({},x,d[x])):Y},null):null},De="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",$t=function(d){if(d===null||ye(d))return d;throw new Error(De)},xr=function(d){if(qe(d))return{tag:"async",stripePromise:Promise.resolve(d).then($t)};var g=$t(d);return g===null?{tag:"empty"}:{tag:"sync",stripe:g}},un=e.createContext(null);un.displayName="ElementsContext";var w=function(d,g){if(!d)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(g," in an <Elements> provider."));return d},le=e.createContext(null);le.displayName="CartElementContext";var Ir=function(d,g){if(!d)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(g," in an <Elements> provider."));return d},Nr=function(d){var g=d.stripe,E=d.options,Y=d.children,x=e.useMemo(function(){return xr(g)},[g]),W=e.useState(null),re=a(W,2),I=re[0],me=re[1],ze=e.useState(null),Ze=a(ze,2),Me=Ze[0],Or=Ze[1],Ar=e.useState(function(){return{stripe:x.tag==="sync"?x.stripe:null,elements:x.tag==="sync"?x.stripe.elements(E):null}}),ke=a(Ar,2),ne=ke[0],Wt=ke[1];e.useEffect(function(){var ue=!0,pn=function(mn){Wt(function(gn){return gn.stripe?gn:{stripe:mn,elements:mn.elements(E)}})};return x.tag==="async"&&!ne.stripe?x.stripePromise.then(function(At){At&&ue&&pn(At)}):x.tag==="sync"&&!ne.stripe&&pn(x.stripe),function(){ue=!1}},[x,ne,E]);var Pr=ce(g);e.useEffect(function(){Pr!==null&&Pr!==g&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[Pr,g]);var dn=ce(E);return e.useEffect(function(){if(ne.elements){var ue=X(E,dn,["clientSecret","fonts"]);ue&&ne.elements.update(ue)}},[E,dn,ne.elements]),e.useEffect(function(){var ue=ne.stripe;!ue||!ue._registerWrapper||!ue.registerAppInfo||(ue._registerWrapper({name:"react-stripe-js",version:"2.1.0"}),ue.registerAppInfo({name:"react-stripe-js",version:"2.1.0",url:"https://stripe.com/docs/stripe-js/react"}))},[ne.stripe]),e.createElement(un.Provider,{value:ne},e.createElement(le.Provider,{value:{cart:I,setCart:me,cartState:Me,setCartState:Or}},Y))};Nr.propTypes={stripe:b.any,options:b.object};var Ot=function(d){var g=e.useContext(un);return w(g,d)},fn=function(d){var g=e.useContext(le);return Ir(g,d)},Nl=function(){var d=Ot("calls useElements()"),g=d.elements;return g},Ol=function(){var d=Ot("calls useStripe()"),g=d.stripe;return g},Al=function(){var d=fn("calls useCartElement()"),g=d.cart;return g},Pl=function(){var d=fn("calls useCartElementState()"),g=d.cartState;return g},zi=function(d){var g=d.children,E=Ot("mounts <ElementsConsumer>");return g(E)};zi.propTypes={children:b.func.isRequired};var J=function(d,g,E){var Y=!!E,x=e.useRef(E);e.useEffect(function(){x.current=E},[E]),e.useEffect(function(){if(!Y||!d)return function(){};var W=function(){x.current&&x.current.apply(x,arguments)};return d.on(g,W),function(){d.off(g,W)}},[Y,g,d,x])},Dl=function(d){return d.charAt(0).toUpperCase()+d.slice(1)},B=function(d,g){var E="".concat(Dl(d),"Element"),Y=function(I){var me=I.id,ze=I.className,Ze=I.options,Me=Ze===void 0?{}:Ze,Or=I.onBlur,Ar=I.onFocus,ke=I.onReady,ne=I.onChange,Wt=I.onEscape,Pr=I.onClick,dn=I.onLoadError,ue=I.onLoaderStart,pn=I.onNetworksChange,At=I.onCheckout,mn=I.onLineItemClick,gn=I.onConfirm,Ql=I.onCancel,eu=I.onShippingAddressChange,tu=I.onShippingRateChange,ru=Ot("mounts <".concat(E,">")),Eo=ru.elements,nu=e.useState(null),Zi=a(nu,2),q=Zi[0],ou=Zi[1],Pt=e.useRef(null),vo=e.useRef(null),Ki=fn("mounts <".concat(E,">")),bo=Ki.setCart,Co=Ki.setCartState;J(q,"blur",Or),J(q,"focus",Ar),J(q,"escape",Wt),J(q,"click",Pr),J(q,"loaderror",dn),J(q,"loaderstart",ue),J(q,"networkschange",pn),J(q,"lineitemclick",mn),J(q,"confirm",gn),J(q,"cancel",Ql),J(q,"shippingaddresschange",eu),J(q,"shippingratechange",tu);var _n;d==="cart"?_n=function(Ji){Co(Ji),ke&&ke(Ji)}:ke&&(d==="expressCheckout"?_n=ke:_n=function(){ke(q)}),J(q,"ready",_n);var iu=d==="cart"?function(Q){Co(Q),ne&&ne(Q)}:ne;J(q,"change",iu);var au=d==="cart"?function(Q){Co(Q),At&&At(Q)}:At;J(q,"checkout",au),e.useLayoutEffect(function(){if(Pt.current===null&&Eo&&vo.current!==null){var Q=Eo.create(d,Me);d==="cart"&&bo&&bo(Q),Pt.current=Q,ou(Q),Q.mount(vo.current)}},[Eo,Me,bo]);var Xi=ce(Me);return e.useEffect(function(){if(Pt.current){var Q=X(Me,Xi,["paymentRequest"]);Q&&Pt.current.update(Q)}},[Me,Xi]),e.useLayoutEffect(function(){return function(){Pt.current&&(Pt.current.destroy(),Pt.current=null)}},[]),e.createElement("div",{id:me,className:ze,ref:vo})},x=function(I){Ot("mounts <".concat(E,">")),fn("mounts <".concat(E,">"));var me=I.id,ze=I.className;return e.createElement("div",{id:me,className:ze})},W=g?x:Y;return W.propTypes={id:b.string,className:b.string,onChange:b.func,onBlur:b.func,onFocus:b.func,onReady:b.func,onEscape:b.func,onClick:b.func,onLoadError:b.func,onLoaderStart:b.func,onNetworksChange:b.func,onCheckout:b.func,onLineItemClick:b.func,onConfirm:b.func,onCancel:b.func,onShippingAddressChange:b.func,onShippingRateChange:b.func,options:b.object},W.displayName=E,W.__elementType=d,W},L=typeof window>"u",Ml=B("auBankAccount",L),kl=B("card",L),wl=B("cardNumber",L),Bl=B("cardExpiry",L),Ll=B("cardCvc",L),Fl=B("fpxBank",L),Hl=B("iban",L),Ul=B("idealBank",L),Gl=B("p24Bank",L),Yl=B("epsBank",L),$l=B("payment",L),Wl=B("expressCheckout",L),Vl=B("paymentRequestButton",L),jl=B("linkAuthentication",L),ql=B("address",L),zl=B("shippingAddress",L),Zl=B("cart",L),Kl=B("paymentMethodMessaging",L),Xl=B("affirmMessage",L),Jl=B("afterpayClearpayMessage",L);t.AddressElement=ql,t.AffirmMessageElement=Xl,t.AfterpayClearpayMessageElement=Jl,t.AuBankAccountElement=Ml,t.CardCvcElement=Ll,t.CardElement=kl,t.CardExpiryElement=Bl,t.CardNumberElement=wl,t.CartElement=Zl,t.Elements=Nr,t.ElementsConsumer=zi,t.EpsBankElement=Yl,t.ExpressCheckoutElement=Wl,t.FpxBankElement=Fl,t.IbanElement=Hl,t.IdealBankElement=Ul,t.LinkAuthenticationElement=jl,t.P24BankElement=Gl,t.PaymentElement=$l,t.PaymentMethodMessagingElement=Kl,t.PaymentRequestButtonElement=Vl,t.ShippingAddressElement=zl,t.useCartElement=Al,t.useCartElementState=Pl,t.useElements=Nl,t.useStripe=Ol,Object.defineProperty(t,"__esModule",{value:!0})})});var Fp={};To(Fp,{DuffelAncillaries:()=>Cp,DuffelPayments:()=>Lp});module.exports=du(Fp);var ta=Object.prototype.toString;function Dr(t){switch(ta.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return fe(t,Error)}}function Vt(t,e){return ta.call(t)===`[object ${e}]`}function jt(t){return Vt(t,"ErrorEvent")}function Sn(t){return Vt(t,"DOMError")}function Ro(t){return Vt(t,"DOMException")}function oe(t){return Vt(t,"String")}function qt(t){return t===null||typeof t!="object"&&typeof t!="function"}function Ee(t){return Vt(t,"Object")}function Dt(t){return typeof Event<"u"&&fe(t,Event)}function xo(t){return typeof Element<"u"&&fe(t,Element)}function Io(t){return Vt(t,"RegExp")}function Mt(t){return!!(t&&t.then&&typeof t.then=="function")}function No(t){return Ee(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Mr(t){return typeof t=="number"&&t!==t}function fe(t,e){try{return t instanceof e}catch{return!1}}function kr(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function we(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function yn(t,e){if(!Array.isArray(t))return"";let r=[];for(let n=0;n<t.length;n++){let o=t[n];try{kr(o)?r.push("[VueViewModel]"):r.push(String(o))}catch{r.push("[value cannot be serialized]")}}return r.join(e)}function ra(t,e,r=!1){return oe(t)?Io(e)?e.test(t):oe(e)?r?t===e:t.includes(e):!1:!1}function _t(t,e=[],r=!1){return e.some(n=>ra(t,n,r))}function wr(t,e,r=250,n,o,i,a){if(!i.exception||!i.exception.values||!a||!fe(a.originalException,Error))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=pu(Oo(t,e,o,a.originalException,n,i.exception.values,s,0),r))}function Oo(t,e,r,n,o,i,a,s){if(i.length>=r+1)return i;let c=[...i];if(fe(n[o],Error)){na(a,s);let l=t(e,n[o]),f=c.length;oa(l,o,f,s),c=Oo(t,e,r,n[o],o,[l,...c],l,f)}return Array.isArray(n.errors)&&n.errors.forEach((l,f)=>{if(fe(l,Error)){na(a,s);let u=t(e,l),m=c.length;oa(u,`errors[${f}]`,m,s),c=Oo(t,e,r,l,o,[u,...c],u,m)}}),c}function na(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function oa(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:n}}function pu(t,e){return t.map(r=>(r.value&&(r.value=we(r.value,e)),r))}function En(t){return t&&t.Math==Math?t:void 0}var O=typeof globalThis=="object"&&En(globalThis)||typeof window=="object"&&En(window)||typeof self=="object"&&En(self)||typeof global=="object"&&En(global)||function(){return this}()||{};function ve(){return O}function Br(t,e,r){let n=r||O,o=n.__SENTRY__=n.__SENTRY__||{};return o[t]||(o[t]=e())}var vn=ve(),mu=80;function Be(t,e={}){if(!t)return"<unknown>";try{let r=t,n=5,o=[],i=0,a=0,s=" > ",c=s.length,l,f=Array.isArray(e)?e:e.keyAttrs,u=!Array.isArray(e)&&e.maxStringLength||mu;for(;r&&i++<n&&(l=gu(r,f),!(l==="html"||i>1&&a+o.length*c+l.length>=u));)o.push(l),a+=l.length,r=r.parentNode;return o.reverse().join(s)}catch{return"<unknown>"}}function gu(t,e){let r=t,n=[],o,i,a,s,c;if(!r||!r.tagName)return"";n.push(r.tagName.toLowerCase());let l=e&&e.length?e.filter(u=>r.getAttribute(u)).map(u=>[u,r.getAttribute(u)]):null;if(l&&l.length)l.forEach(u=>{n.push(`[${u[0]}="${u[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),o=r.className,o&&oe(o))for(i=o.split(/\s+/),c=0;c<i.length;c++)n.push(`.${i[c]}`);let f=["aria-label","type","name","title","alt"];for(c=0;c<f.length;c++)a=f[c],s=r.getAttribute(a),s&&n.push(`[${a}="${s}"]`);return n.join("")}function Ao(){try{return vn.document.location.href}catch{return""}}function Po(t){return vn.document&&vn.document.querySelector?vn.document.querySelector(t):null}var _u="Sentry Logger ",Lr=["debug","info","warn","error","log","assert","trace"],zt={};function bn(t){if(!("console"in O))return t();let e=O.console,r={},n=Object.keys(zt);n.forEach(o=>{let i=zt[o];r[o]=e[o],e[o]=i});try{return t()}finally{n.forEach(o=>{e[o]=r[o]})}}function hu(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Lr.forEach(r=>{e[r]=(...n)=>{t&&bn(()=>{O.console[r](`${_u}[${r}]:`,...n)})}}):Lr.forEach(r=>{e[r]=()=>{}}),e}var p=hu();var Su=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function yu(t){return t==="http"||t==="https"}function Le(t,e=!1){let{host:r,path:n,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=t;return`${s}://${c}${e&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${a}`}function ia(t){let e=Su.exec(t);if(!e){console.error(`Invalid Sentry Dsn: ${t}`);return}let[r,n,o="",i,a="",s]=e.slice(1),c="",l=s,f=l.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),l=f.pop()),l){let u=l.match(/^\d+/);u&&(l=u[0])}return aa({host:i,pass:o,path:c,projectId:l,port:a,protocol:r,publicKey:n})}function aa(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Eu(t){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:e,projectId:r,protocol:n}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(p.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:r.match(/^\d+$/)?yu(n)?e&&isNaN(parseInt(e,10))?(p.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(p.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Cn(t){let e=typeof t=="string"?ia(t):aa(t);if(!(!e||!Eu(e)))return e}var z=class extends Error{constructor(e,r="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}};function F(t,e,r){if(!(e in t))return;let n=t[e],o=r(n);typeof o=="function"&&Tn(o,n),t[e]=o}function Ke(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Tn(t,e){try{let r=e.prototype||{};t.prototype=e.prototype=r,Ke(t,"__sentry_original__",e)}catch{}}function kt(t){return t.__sentry_original__}function Mo(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function Rn(t){if(Dr(t))return{message:t.message,name:t.name,stack:t.stack,...ca(t)};if(Dt(t)){let e={type:t.type,target:sa(t.target),currentTarget:sa(t.currentTarget),...ca(t)};return typeof CustomEvent<"u"&&fe(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function sa(t){try{return xo(t)?Be(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function ca(t){if(typeof t=="object"&&t!==null){let e={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}else return{}}function ko(t,e=40){let r=Object.keys(Rn(t));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=e)return we(r[0],e);for(let n=r.length;n>0;n--){let o=r.slice(0,n).join(", ");if(!(o.length>e))return n===r.length?o:we(o,e)}return""}function ie(t){return Do(t,new Map)}function Do(t,e){if(Ee(t)){let r=e.get(t);if(r!==void 0)return r;let n={};e.set(t,n);for(let o of Object.keys(t))typeof t[o]<"u"&&(n[o]=Do(t[o],e));return n}if(Array.isArray(t)){let r=e.get(t);if(r!==void 0)return r;let n=[];return e.set(t,n),t.forEach(o=>{n.push(Do(o,e))}),n}return t}function D(){let t=O,e=t.crypto||t.msCrypto,r=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(r=()=>e.getRandomValues(new Uint8Array(1))[0])}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function la(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function be(t){let{message:e,event_id:r}=t;if(e)return e;let n=la(t);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Zt(t,e,r){let n=t.exception=t.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=e||""),i.type||(i.type=r||"Error")}function Xe(t,e){let r=la(t);if(!r)return;let n={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...n,...o,...e},e&&"data"in e){let i={...o&&o.data,...e.data};r.mechanism.data=i}}function xn(t){if(t&&t.__sentry_captured__)return!0;try{Ke(t,"__sentry_captured__",!0)}catch{}return!1}function Fr(t){return Array.isArray(t)?t:[t]}var da=50,ua=/\(error: (.*)\)/,fa=/captureMessage|captureException/;function In(...t){let e=t.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{let o=[],i=r.split(`
3
- `);for(let a=n;a<i.length;a++){let s=i[a];if(s.length>1024)continue;let c=ua.test(s)?s.replace(ua,"$1"):s;if(!c.match(/\S*Error: /)){for(let l of e){let f=l(c);if(f){o.push(f);break}}if(o.length>=da)break}}return pa(o)}}function Bo(t){return Array.isArray(t)?In(...t):t}function pa(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),fa.test(e[e.length-1].function||"")&&(e.pop(),fa.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,da).map(r=>({...r,filename:r.filename||e[e.length-1].filename,function:r.function||"?"}))}var wo="<anonymous>";function ae(t){try{return!t||typeof t!="function"?wo:t.name||wo}catch{return wo}}var Lo=ve();function Nn(){if(!("fetch"in Lo))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Hr(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Fo(){if(!Nn())return!1;if(Hr(Lo.fetch))return!0;let t=!1,e=Lo.document;if(e&&typeof e.createElement=="function")try{let r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=Hr(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}var On=ve();function ma(){let t=On.chrome,e=t&&t.app&&t.app.runtime,r="history"in On&&!!On.history.pushState&&!!On.history.replaceState;return!e&&r}var V=ve(),Je="__sentry_xhr_v2__",Ur={},ga={};function vu(t){if(!ga[t])switch(ga[t]=!0,t){case"console":bu();break;case"dom":va();break;case"xhr":Ea();break;case"fetch":Cu();break;case"history":Tu();break;case"error":Ou();break;case"unhandledrejection":Au();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("unknown instrumentation type:",t);return}}function H(t,e){Ur[t]=Ur[t]||[],Ur[t].push(e),vu(t)}function Ce(t,e){if(!(!t||!Ur[t]))for(let r of Ur[t]||[])try{r(e)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Error while triggering instrumentation handler.
1
+ "use strict";var fu=Object.create;var Sn=Object.defineProperty;var du=Object.getOwnPropertyDescriptor;var pu=Object.getOwnPropertyNames;var mu=Object.getPrototypeOf,gu=Object.prototype.hasOwnProperty;var ea=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ro=(t,e)=>{for(var r in e)Sn(t,r,{get:e[r],enumerable:!0})},ta=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of pu(e))!gu.call(t,o)&&o!==r&&Sn(t,o,{get:()=>e[o],enumerable:!(n=du(e,o))||n.enumerable});return t};var D=(t,e,r)=>(r=t!=null?fu(mu(t)):{},ta(e||!t||!t.__esModule?Sn(r,"default",{value:t,enumerable:!0}):r,t)),_u=t=>ta(Sn({},"__esModule",{value:!0}),t);var Ne=ea((tE,no)=>{(function(){"use strict";var t={}.hasOwnProperty,e="[native code]";function r(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var s=r.apply(null,i);s&&n.push(s)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var c in i)t.call(i,c)&&i[c]&&n.push(c)}}}return n.join(" ")}typeof no<"u"&&no.exports?(r.default=r,no.exports=r):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return r}):window.classNames=r})()});var bl=ea((yo,Cl)=>{(function(t,e){typeof yo=="object"&&typeof Cl<"u"?e(yo,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],e):(t=t||self,e(t.ReactStripe={},t.React))})(yo,function(t,e){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;function r(_,d){var g=Object.keys(_);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(_);d&&(E=E.filter(function(Y){return Object.getOwnPropertyDescriptor(_,Y).enumerable})),g.push.apply(g,E)}return g}function n(_){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?r(Object(g),!0).forEach(function(E){i(_,E,g[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(g)):r(Object(g)).forEach(function(E){Object.defineProperty(_,E,Object.getOwnPropertyDescriptor(g,E))})}return _}function o(_){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(d){return typeof d}:o=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},o(_)}function i(_,d,g){return d in _?Object.defineProperty(_,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):_[d]=g,_}function a(_,d){return s(_)||c(_,d)||l(_,d)||u()}function s(_){if(Array.isArray(_))return _}function c(_,d){var g=_&&(typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"]);if(g!=null){var E=[],Y=!0,x=!1,W,re;try{for(g=g.call(_);!(Y=(W=g.next()).done)&&(E.push(W.value),!(d&&E.length===d));Y=!0);}catch(N){x=!0,re=N}finally{try{!Y&&g.return!=null&&g.return()}finally{if(x)throw re}}return E}}function l(_,d){if(_){if(typeof _=="string")return f(_,d);var g=Object.prototype.toString.call(_).slice(8,-1);if(g==="Object"&&_.constructor&&(g=_.constructor.name),g==="Map"||g==="Set")return Array.from(_);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return f(_,d)}}function f(_,d){(d==null||d>_.length)&&(d=_.length);for(var g=0,E=new Array(d);g<d;g++)E[g]=_[g];return E}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(_,d){return d={exports:{}},_(d,d.exports),d.exports}var h="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",S=h;function y(){}function I(){}I.resetWarningCache=y;var O=function(){function _(E,Y,x,W,re,N){if(N!==S){var me=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw me.name="Invariant Violation",me}}_.isRequired=_;function d(){return _}var g={array:_,bool:_,func:_,number:_,object:_,string:_,symbol:_,any:_,arrayOf:d,element:_,elementType:_,instanceOf:d,node:_,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:I,resetWarningCache:y};return g.PropTypes=g,g},C=m(function(_){_.exports=O()}),ce=function(d){var g=e.useRef(d);return e.useEffect(function(){g.current=d},[d]),g.current},j=function(d){return d!==null&&o(d)==="object"},qe=function(d){return j(d)&&typeof d.then=="function"},ye=function(d){return j(d)&&typeof d.elements=="function"&&typeof d.createToken=="function"&&typeof d.createPaymentMethod=="function"&&typeof d.confirmCardPayment=="function"},$t="[object Object]",K=function _(d,g){if(!j(d)||!j(g))return d===g;var E=Array.isArray(d),Y=Array.isArray(g);if(E!==Y)return!1;var x=Object.prototype.toString.call(d)===$t,W=Object.prototype.toString.call(g)===$t;if(x!==W)return!1;if(!x&&!E)return d===g;var re=Object.keys(d),N=Object.keys(g);if(re.length!==N.length)return!1;for(var me={},ze=0;ze<re.length;ze+=1)me[re[ze]]=!0;for(var Ze=0;Ze<N.length;Ze+=1)me[N[Ze]]=!0;var Me=Object.keys(me);if(Me.length!==re.length)return!1;var Ar=d,Pr=g,we=function(Vt){return _(Ar[Vt],Pr[Vt])};return Me.every(we)},X=function(d,g,E){return j(d)?Object.keys(d).reduce(function(Y,x){var W=!j(g)||!K(d[x],g[x]);return E.includes(x)?(W&&console.warn("Unsupported prop change: options.".concat(x," is not a mutable property.")),Y):W?n(n({},Y||{}),{},i({},x,d[x])):Y},null):null},De="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",Wt=function(d){if(d===null||ye(d))return d;throw new Error(De)},xr=function(d){if(qe(d))return{tag:"async",stripePromise:Promise.resolve(d).then(Wt)};var g=Wt(d);return g===null?{tag:"empty"}:{tag:"sync",stripe:g}},fn=e.createContext(null);fn.displayName="ElementsContext";var k=function(d,g){if(!d)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(g," in an <Elements> provider."));return d},le=e.createContext(null);le.displayName="CartElementContext";var Nr=function(d,g){if(!d)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(g," in an <Elements> provider."));return d},Or=function(d){var g=d.stripe,E=d.options,Y=d.children,x=e.useMemo(function(){return xr(g)},[g]),W=e.useState(null),re=a(W,2),N=re[0],me=re[1],ze=e.useState(null),Ze=a(ze,2),Me=Ze[0],Ar=Ze[1],Pr=e.useState(function(){return{stripe:x.tag==="sync"?x.stripe:null,elements:x.tag==="sync"?x.stripe.elements(E):null}}),we=a(Pr,2),ne=we[0],Vt=we[1];e.useEffect(function(){var ue=!0,mn=function(gn){Vt(function(_n){return _n.stripe?_n:{stripe:gn,elements:gn.elements(E)}})};return x.tag==="async"&&!ne.stripe?x.stripePromise.then(function(At){At&&ue&&mn(At)}):x.tag==="sync"&&!ne.stripe&&mn(x.stripe),function(){ue=!1}},[x,ne,E]);var Dr=ce(g);e.useEffect(function(){Dr!==null&&Dr!==g&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[Dr,g]);var pn=ce(E);return e.useEffect(function(){if(ne.elements){var ue=X(E,pn,["clientSecret","fonts"]);ue&&ne.elements.update(ue)}},[E,pn,ne.elements]),e.useEffect(function(){var ue=ne.stripe;!ue||!ue._registerWrapper||!ue.registerAppInfo||(ue._registerWrapper({name:"react-stripe-js",version:"2.1.0"}),ue.registerAppInfo({name:"react-stripe-js",version:"2.1.0",url:"https://stripe.com/docs/stripe-js/react"}))},[ne.stripe]),e.createElement(fn.Provider,{value:ne},e.createElement(le.Provider,{value:{cart:N,setCart:me,cartState:Me,setCartState:Ar}},Y))};Or.propTypes={stripe:C.any,options:C.object};var Ot=function(d){var g=e.useContext(fn);return k(g,d)},dn=function(d){var g=e.useContext(le);return Nr(g,d)},Dl=function(){var d=Ot("calls useElements()"),g=d.elements;return g},Ml=function(){var d=Ot("calls useStripe()"),g=d.stripe;return g},wl=function(){var d=dn("calls useCartElement()"),g=d.cart;return g},kl=function(){var d=dn("calls useCartElementState()"),g=d.cartState;return g},Zi=function(d){var g=d.children,E=Ot("mounts <ElementsConsumer>");return g(E)};Zi.propTypes={children:C.func.isRequired};var J=function(d,g,E){var Y=!!E,x=e.useRef(E);e.useEffect(function(){x.current=E},[E]),e.useEffect(function(){if(!Y||!d)return function(){};var W=function(){x.current&&x.current.apply(x,arguments)};return d.on(g,W),function(){d.off(g,W)}},[Y,g,d,x])},Bl=function(d){return d.charAt(0).toUpperCase()+d.slice(1)},B=function(d,g){var E="".concat(Bl(d),"Element"),Y=function(N){var me=N.id,ze=N.className,Ze=N.options,Me=Ze===void 0?{}:Ze,Ar=N.onBlur,Pr=N.onFocus,we=N.onReady,ne=N.onChange,Vt=N.onEscape,Dr=N.onClick,pn=N.onLoadError,ue=N.onLoaderStart,mn=N.onNetworksChange,At=N.onCheckout,gn=N.onLineItemClick,_n=N.onConfirm,nu=N.onCancel,ou=N.onShippingAddressChange,iu=N.onShippingRateChange,au=Ot("mounts <".concat(E,">")),vo=au.elements,su=e.useState(null),Ki=a(su,2),q=Ki[0],cu=Ki[1],Pt=e.useRef(null),Co=e.useRef(null),Xi=dn("mounts <".concat(E,">")),bo=Xi.setCart,To=Xi.setCartState;J(q,"blur",Ar),J(q,"focus",Pr),J(q,"escape",Vt),J(q,"click",Dr),J(q,"loaderror",pn),J(q,"loaderstart",ue),J(q,"networkschange",mn),J(q,"lineitemclick",gn),J(q,"confirm",_n),J(q,"cancel",nu),J(q,"shippingaddresschange",ou),J(q,"shippingratechange",iu);var hn;d==="cart"?hn=function(Qi){To(Qi),we&&we(Qi)}:we&&(d==="expressCheckout"?hn=we:hn=function(){we(q)}),J(q,"ready",hn);var lu=d==="cart"?function(Q){To(Q),ne&&ne(Q)}:ne;J(q,"change",lu);var uu=d==="cart"?function(Q){To(Q),At&&At(Q)}:At;J(q,"checkout",uu),e.useLayoutEffect(function(){if(Pt.current===null&&vo&&Co.current!==null){var Q=vo.create(d,Me);d==="cart"&&bo&&bo(Q),Pt.current=Q,cu(Q),Q.mount(Co.current)}},[vo,Me,bo]);var Ji=ce(Me);return e.useEffect(function(){if(Pt.current){var Q=X(Me,Ji,["paymentRequest"]);Q&&Pt.current.update(Q)}},[Me,Ji]),e.useLayoutEffect(function(){return function(){Pt.current&&(Pt.current.destroy(),Pt.current=null)}},[]),e.createElement("div",{id:me,className:ze,ref:Co})},x=function(N){Ot("mounts <".concat(E,">")),dn("mounts <".concat(E,">"));var me=N.id,ze=N.className;return e.createElement("div",{id:me,className:ze})},W=g?x:Y;return W.propTypes={id:C.string,className:C.string,onChange:C.func,onBlur:C.func,onFocus:C.func,onReady:C.func,onEscape:C.func,onClick:C.func,onLoadError:C.func,onLoaderStart:C.func,onNetworksChange:C.func,onCheckout:C.func,onLineItemClick:C.func,onConfirm:C.func,onCancel:C.func,onShippingAddressChange:C.func,onShippingRateChange:C.func,options:C.object},W.displayName=E,W.__elementType=d,W},F=typeof window>"u",Fl=B("auBankAccount",F),Ll=B("card",F),Ul=B("cardNumber",F),Hl=B("cardExpiry",F),Gl=B("cardCvc",F),Yl=B("fpxBank",F),$l=B("iban",F),Wl=B("idealBank",F),Vl=B("p24Bank",F),jl=B("epsBank",F),ql=B("payment",F),zl=B("expressCheckout",F),Zl=B("paymentRequestButton",F),Kl=B("linkAuthentication",F),Xl=B("address",F),Jl=B("shippingAddress",F),Ql=B("cart",F),eu=B("paymentMethodMessaging",F),tu=B("affirmMessage",F),ru=B("afterpayClearpayMessage",F);t.AddressElement=Xl,t.AffirmMessageElement=tu,t.AfterpayClearpayMessageElement=ru,t.AuBankAccountElement=Fl,t.CardCvcElement=Gl,t.CardElement=Ll,t.CardExpiryElement=Hl,t.CardNumberElement=Ul,t.CartElement=Ql,t.Elements=Or,t.ElementsConsumer=Zi,t.EpsBankElement=jl,t.ExpressCheckoutElement=zl,t.FpxBankElement=Yl,t.IbanElement=$l,t.IdealBankElement=Wl,t.LinkAuthenticationElement=Kl,t.P24BankElement=Vl,t.PaymentElement=ql,t.PaymentMethodMessagingElement=eu,t.PaymentRequestButtonElement=Zl,t.ShippingAddressElement=Jl,t.useCartElement=wl,t.useCartElementState=kl,t.useElements=Dl,t.useStripe=Ml,Object.defineProperty(t,"__esModule",{value:!0})})});var Wp={};Ro(Wp,{DuffelAncillaries:()=>xp,DuffelCardForm:()=>$p,DuffelPayments:()=>Gp});module.exports=_u(Wp);var ra=Object.prototype.toString;function Mr(t){switch(ra.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return fe(t,Error)}}function jt(t,e){return ra.call(t)===`[object ${e}]`}function qt(t){return jt(t,"ErrorEvent")}function yn(t){return jt(t,"DOMError")}function Io(t){return jt(t,"DOMException")}function oe(t){return jt(t,"String")}function zt(t){return t===null||typeof t!="object"&&typeof t!="function"}function Ee(t){return jt(t,"Object")}function Dt(t){return typeof Event<"u"&&fe(t,Event)}function xo(t){return typeof Element<"u"&&fe(t,Element)}function No(t){return jt(t,"RegExp")}function Mt(t){return!!(t&&t.then&&typeof t.then=="function")}function Oo(t){return Ee(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function wr(t){return typeof t=="number"&&t!==t}function fe(t,e){try{return t instanceof e}catch{return!1}}function kr(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function ke(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function En(t,e){if(!Array.isArray(t))return"";let r=[];for(let n=0;n<t.length;n++){let o=t[n];try{kr(o)?r.push("[VueViewModel]"):r.push(String(o))}catch{r.push("[value cannot be serialized]")}}return r.join(e)}function na(t,e,r=!1){return oe(t)?No(e)?e.test(t):oe(e)?r?t===e:t.includes(e):!1:!1}function _t(t,e=[],r=!1){return e.some(n=>na(t,n,r))}function Br(t,e,r=250,n,o,i,a){if(!i.exception||!i.exception.values||!a||!fe(a.originalException,Error))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=hu(Ao(t,e,o,a.originalException,n,i.exception.values,s,0),r))}function Ao(t,e,r,n,o,i,a,s){if(i.length>=r+1)return i;let c=[...i];if(fe(n[o],Error)){oa(a,s);let l=t(e,n[o]),f=c.length;ia(l,o,f,s),c=Ao(t,e,r,n[o],o,[l,...c],l,f)}return Array.isArray(n.errors)&&n.errors.forEach((l,f)=>{if(fe(l,Error)){oa(a,s);let u=t(e,l),m=c.length;ia(u,`errors[${f}]`,m,s),c=Ao(t,e,r,l,o,[u,...c],u,m)}}),c}function oa(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function ia(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:n}}function hu(t,e){return t.map(r=>(r.value&&(r.value=ke(r.value,e)),r))}function vn(t){return t&&t.Math==Math?t:void 0}var A=typeof globalThis=="object"&&vn(globalThis)||typeof window=="object"&&vn(window)||typeof self=="object"&&vn(self)||typeof global=="object"&&vn(global)||function(){return this}()||{};function ve(){return A}function Fr(t,e,r){let n=r||A,o=n.__SENTRY__=n.__SENTRY__||{};return o[t]||(o[t]=e())}var Cn=ve(),Su=80;function Be(t,e={}){if(!t)return"<unknown>";try{let r=t,n=5,o=[],i=0,a=0,s=" > ",c=s.length,l,f=Array.isArray(e)?e:e.keyAttrs,u=!Array.isArray(e)&&e.maxStringLength||Su;for(;r&&i++<n&&(l=yu(r,f),!(l==="html"||i>1&&a+o.length*c+l.length>=u));)o.push(l),a+=l.length,r=r.parentNode;return o.reverse().join(s)}catch{return"<unknown>"}}function yu(t,e){let r=t,n=[],o,i,a,s,c;if(!r||!r.tagName)return"";n.push(r.tagName.toLowerCase());let l=e&&e.length?e.filter(u=>r.getAttribute(u)).map(u=>[u,r.getAttribute(u)]):null;if(l&&l.length)l.forEach(u=>{n.push(`[${u[0]}="${u[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),o=r.className,o&&oe(o))for(i=o.split(/\s+/),c=0;c<i.length;c++)n.push(`.${i[c]}`);let f=["aria-label","type","name","title","alt"];for(c=0;c<f.length;c++)a=f[c],s=r.getAttribute(a),s&&n.push(`[${a}="${s}"]`);return n.join("")}function Po(){try{return Cn.document.location.href}catch{return""}}function Do(t){return Cn.document&&Cn.document.querySelector?Cn.document.querySelector(t):null}var Eu="Sentry Logger ",Lr=["debug","info","warn","error","log","assert","trace"],Zt={};function bn(t){if(!("console"in A))return t();let e=A.console,r={},n=Object.keys(Zt);n.forEach(o=>{let i=Zt[o];r[o]=e[o],e[o]=i});try{return t()}finally{n.forEach(o=>{e[o]=r[o]})}}function vu(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Lr.forEach(r=>{e[r]=(...n)=>{t&&bn(()=>{A.console[r](`${Eu}[${r}]:`,...n)})}}):Lr.forEach(r=>{e[r]=()=>{}}),e}var p=vu();var Cu=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function bu(t){return t==="http"||t==="https"}function Fe(t,e=!1){let{host:r,path:n,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=t;return`${s}://${c}${e&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${a}`}function aa(t){let e=Cu.exec(t);if(!e){console.error(`Invalid Sentry Dsn: ${t}`);return}let[r,n,o="",i,a="",s]=e.slice(1),c="",l=s,f=l.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),l=f.pop()),l){let u=l.match(/^\d+/);u&&(l=u[0])}return sa({host:i,pass:o,path:c,projectId:l,port:a,protocol:r,publicKey:n})}function sa(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Tu(t){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:e,projectId:r,protocol:n}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(p.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:r.match(/^\d+$/)?bu(n)?e&&isNaN(parseInt(e,10))?(p.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(p.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Tn(t){let e=typeof t=="string"?aa(t):sa(t);if(!(!e||!Tu(e)))return e}var z=class extends Error{constructor(e,r="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}};function L(t,e,r){if(!(e in t))return;let n=t[e],o=r(n);typeof o=="function"&&Rn(o,n),t[e]=o}function Ke(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Rn(t,e){try{let r=e.prototype||{};t.prototype=e.prototype=r,Ke(t,"__sentry_original__",e)}catch{}}function wt(t){return t.__sentry_original__}function wo(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function In(t){if(Mr(t))return{message:t.message,name:t.name,stack:t.stack,...la(t)};if(Dt(t)){let e={type:t.type,target:ca(t.target),currentTarget:ca(t.currentTarget),...la(t)};return typeof CustomEvent<"u"&&fe(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function ca(t){try{return xo(t)?Be(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function la(t){if(typeof t=="object"&&t!==null){let e={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}else return{}}function ko(t,e=40){let r=Object.keys(In(t));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=e)return ke(r[0],e);for(let n=r.length;n>0;n--){let o=r.slice(0,n).join(", ");if(!(o.length>e))return n===r.length?o:ke(o,e)}return""}function ie(t){return Mo(t,new Map)}function Mo(t,e){if(Ee(t)){let r=e.get(t);if(r!==void 0)return r;let n={};e.set(t,n);for(let o of Object.keys(t))typeof t[o]<"u"&&(n[o]=Mo(t[o],e));return n}if(Array.isArray(t)){let r=e.get(t);if(r!==void 0)return r;let n=[];return e.set(t,n),t.forEach(o=>{n.push(Mo(o,e))}),n}return t}function M(){let t=A,e=t.crypto||t.msCrypto,r=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(r=()=>e.getRandomValues(new Uint8Array(1))[0])}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function ua(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Ce(t){let{message:e,event_id:r}=t;if(e)return e;let n=ua(t);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Kt(t,e,r){let n=t.exception=t.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=e||""),i.type||(i.type=r||"Error")}function Xe(t,e){let r=ua(t);if(!r)return;let n={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...n,...o,...e},e&&"data"in e){let i={...o&&o.data,...e.data};r.mechanism.data=i}}function xn(t){if(t&&t.__sentry_captured__)return!0;try{Ke(t,"__sentry_captured__",!0)}catch{}return!1}function Ur(t){return Array.isArray(t)?t:[t]}var pa=50,fa=/\(error: (.*)\)/,da=/captureMessage|captureException/;function Nn(...t){let e=t.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{let o=[],i=r.split(`
3
+ `);for(let a=n;a<i.length;a++){let s=i[a];if(s.length>1024)continue;let c=fa.test(s)?s.replace(fa,"$1"):s;if(!c.match(/\S*Error: /)){for(let l of e){let f=l(c);if(f){o.push(f);break}}if(o.length>=pa)break}}return ma(o)}}function Fo(t){return Array.isArray(t)?Nn(...t):t}function ma(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),da.test(e[e.length-1].function||"")&&(e.pop(),da.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,pa).map(r=>({...r,filename:r.filename||e[e.length-1].filename,function:r.function||"?"}))}var Bo="<anonymous>";function ae(t){try{return!t||typeof t!="function"?Bo:t.name||Bo}catch{return Bo}}var Lo=ve();function On(){if(!("fetch"in Lo))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Hr(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Uo(){if(!On())return!1;if(Hr(Lo.fetch))return!0;let t=!1,e=Lo.document;if(e&&typeof e.createElement=="function")try{let r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=Hr(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}var An=ve();function ga(){let t=An.chrome,e=t&&t.app&&t.app.runtime,r="history"in An&&!!An.history.pushState&&!!An.history.replaceState;return!e&&r}var V=ve(),Je="__sentry_xhr_v2__",Gr={},_a={};function Ru(t){if(!_a[t])switch(_a[t]=!0,t){case"console":Iu();break;case"dom":Ca();break;case"xhr":va();break;case"fetch":xu();break;case"history":Nu();break;case"error":Mu();break;case"unhandledrejection":wu();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("unknown instrumentation type:",t);return}}function U(t,e){Gr[t]=Gr[t]||[],Gr[t].push(e),Ru(t)}function be(t,e){if(!(!t||!Gr[t]))for(let r of Gr[t]||[])try{r(e)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Error while triggering instrumentation handler.
4
4
  Type: ${t}
5
5
  Name: ${ae(r)}
6
- Error:`,n)}}function bu(){"console"in O&&Lr.forEach(function(t){t in O.console&&F(O.console,t,function(e){return zt[t]=e,function(...r){Ce("console",{args:r,level:t});let n=zt[t];n&&n.apply(O.console,r)}})})}function Cu(){Fo()&&F(O,"fetch",function(t){return function(...e){let{method:r,url:n}=ya(e),o={args:e,fetchData:{method:r,url:n},startTimestamp:Date.now()};return Ce("fetch",{...o}),t.apply(O,e).then(i=>(Ce("fetch",{...o,endTimestamp:Date.now(),response:i}),i),i=>{throw Ce("fetch",{...o,endTimestamp:Date.now(),error:i}),i})}})}function Ho(t,e){return!!t&&typeof t=="object"&&!!t[e]}function _a(t){return typeof t=="string"?t:t?Ho(t,"url")?t.url:t.toString?t.toString():"":""}function ya(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[r,n]=t;return{url:_a(r),method:Ho(n,"method")?String(n.method).toUpperCase():"GET"}}let e=t[0];return{url:_a(e),method:Ho(e,"method")?String(e.method).toUpperCase():"GET"}}function Ea(){if(!V.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;F(t,"open",function(e){return function(...r){let n=Date.now(),o=r[1],i=this[Je]={method:oe(r[0])?r[0].toUpperCase():r[0],url:r[1],request_headers:{}};oe(o)&&i.method==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let a=()=>{let s=this[Je];if(s&&this.readyState===4){try{s.status_code=this.status}catch{}Ce("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?F(this,"onreadystatechange",function(s){return function(...c){return a(),s.apply(this,c)}}):this.addEventListener("readystatechange",a),F(this,"setRequestHeader",function(s){return function(...c){let[l,f]=c,u=this[Je];return u&&(u.request_headers[l.toLowerCase()]=f),s.apply(this,c)}}),e.apply(this,r)}}),F(t,"send",function(e){return function(...r){let n=this[Je];return n&&r[0]!==void 0&&(n.body=r[0]),Ce("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),e.apply(this,r)}})}var An;function Tu(){if(!ma())return;let t=V.onpopstate;V.onpopstate=function(...r){let n=V.location.href,o=An;if(An=n,Ce("history",{from:o,to:n}),t)try{return t.apply(this,r)}catch{}};function e(r){return function(...n){let o=n.length>2?n[2]:void 0;if(o){let i=An,a=String(o);An=a,Ce("history",{from:i,to:a})}return r.apply(this,n)}}F(V.history,"pushState",e),F(V.history,"replaceState",e)}var Ru=1e3,ha,Uo,Go;function xu(t){if(t.type!==Uo)return!1;try{if(!t.target||t.target._sentryId!==Go)return!1}catch{}return!0}function Iu(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Nu(t){try{return t.target}catch{return null}}function Sa(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;let n=Nu(r);if(Iu(r.type,n))return;Ke(r,"_sentryCaptured",!0),n&&!n._sentryId&&Ke(n,"_sentryId",D());let o=r.type==="keypress"?"input":r.type;xu(r)||(t({event:r,name:o,global:e}),Uo=r.type,Go=n?n._sentryId:void 0),clearTimeout(ha),ha=V.setTimeout(()=>{Go=void 0,Uo=void 0},Ru)}}function va(){if(!V.document)return;let t=Ce.bind(null,"dom"),e=Sa(t,!0);V.document.addEventListener("click",e,!1),V.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(r=>{let n=V[r]&&V[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(F(n,"addEventListener",function(o){return function(i,a,s){if(i==="click"||i=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},f=l[i]=l[i]||{refCount:0};if(!f.handler){let u=Sa(t);f.handler=u,o.call(this,i,u,s)}f.refCount++}catch{}return o.call(this,i,a,s)}}),F(n,"removeEventListener",function(o){return function(i,a,s){if(i==="click"||i=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__||{},f=l[i];f&&(f.refCount--,f.refCount<=0&&(o.call(this,i,f.handler,s),f.handler=void 0,delete l[i]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,a,s)}}))})}var Pn=null;function Ou(){Pn=V.onerror,V.onerror=function(t,e,r,n,o){return Ce("error",{column:n,error:o,line:r,msg:t,url:e}),Pn&&!Pn.__SENTRY_LOADER__?Pn.apply(this,arguments):!1},V.onerror.__SENTRY_INSTRUMENTED__=!0}var Dn=null;function Au(){Dn=V.onunhandledrejection,V.onunhandledrejection=function(t){return Ce("unhandledrejection",t),Dn&&!Dn.__SENTRY_LOADER__?Dn.apply(this,arguments):!0},V.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Yo(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function $o(){return"npm"}function ba(){return!Yo()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Ca(t,e){return t.require(e)}function Ta(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function r(o){if(t)return e.has(o)?!0:(e.add(o),!1);for(let i=0;i<e.length;i++)if(e[i]===o)return!0;return e.push(o),!1}function n(o){if(t)e.delete(o);else for(let i=0;i<e.length;i++)if(e[i]===o){e.splice(i,1);break}}return[r,n]}function Te(t,e=100,r=1/0){try{return Mn("",t,e,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function kn(t,e=3,r=100*1024){let n=Te(t,e);return ku(n)>r?kn(t,e-1,r):n}function Mn(t,e,r=1/0,n=1/0,o=Ta()){let[i,a]=o;if(e==null||["number","boolean","string"].includes(typeof e)&&!Mr(e))return e;let s=Pu(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;let c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:r;if(c===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let l=e;if(l&&typeof l.toJSON=="function")try{let h=l.toJSON();return Mn("",h,c-1,n,o)}catch{}let f=Array.isArray(e)?[]:{},u=0,m=Rn(e);for(let h in m){if(!Object.prototype.hasOwnProperty.call(m,h))continue;if(u>=n){f[h]="[MaxProperties ~]";break}let S=m[h];f[h]=Mn(h,S,c-1,n,o),u++}return a(e),f}function Pu(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(kr(e))return"[VueViewModel]";if(No(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${ae(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let r=Du(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function Du(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Mu(t){return~-encodeURI(t).split(/%..|./).length}function ku(t){return Mu(JSON.stringify(t))}var Qe;(function(t){t[t.PENDING=0]="PENDING";let r=1;t[t.RESOLVED=r]="RESOLVED";let n=2;t[t.REJECTED=n]="REJECTED"})(Qe||(Qe={}));function de(t){return new U(e=>{e(t)})}function wt(t){return new U((e,r)=>{r(t)})}var U=class{constructor(e){U.prototype.__init.call(this),U.prototype.__init2.call(this),U.prototype.__init3.call(this),U.prototype.__init4.call(this),this._state=Qe.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(r){this._reject(r)}}then(e,r){return new U((n,o)=>{this._handlers.push([!1,i=>{if(!e)n(i);else try{n(e(i))}catch(a){o(a)}},i=>{if(!r)o(i);else try{n(r(i))}catch(a){o(a)}}]),this._executeHandlers()})}catch(e){return this.then(r=>r,e)}finally(e){return new U((r,n)=>{let o,i;return this.then(a=>{i=!1,o=a,e&&e()},a=>{i=!0,o=a,e&&e()}).then(()=>{if(i){n(o);return}r(o)})})}__init(){this._resolve=e=>{this._setResult(Qe.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Qe.REJECTED,e)}}__init3(){this._setResult=(e,r)=>{if(this._state===Qe.PENDING){if(Mt(r)){r.then(this._resolve,this._reject);return}this._state=e,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Qe.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(r=>{r[0]||(this._state===Qe.RESOLVED&&r[1](this._value),this._state===Qe.REJECTED&&r[2](this._value),r[0]=!0)})}}};function Wo(t){let e=[];function r(){return t===void 0||e.length<t}function n(a){return e.splice(e.indexOf(a),1)[0]}function o(a){if(!r())return wt(new z("Not adding Promise because buffer limit was reached."));let s=a();return e.indexOf(s)===-1&&e.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s}function i(a){return new U((s,c)=>{let l=e.length;if(!l)return s(!0);let f=setTimeout(()=>{a&&a>0&&s(!1)},a);e.forEach(u=>{de(u).then(()=>{--l||(clearTimeout(f),s(!0))},c)})})}return{$:e,add:o,drain:i}}function Gr(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:n,relative:e[5]+r+n}}var Ra=["fatal","error","warning","log","info","debug"];function Vo(t){return t==="warn"?"warning":Ra.includes(t)?t:"log"}var Ia=ve(),qo={nowSeconds:()=>Date.now()/1e3};function wu(){let{performance:t}=Ia;if(!t||!t.now)return;let e=Date.now()-t.now();return{now:()=>t.now(),timeOrigin:e}}function Bu(){try{return Ca(module,"perf_hooks").performance}catch{return}}var jo=ba()?Bu():wu(),xa=jo===void 0?qo:{nowSeconds:()=>(jo.timeOrigin+jo.now())/1e3},et=qo.nowSeconds.bind(qo),Re=xa.nowSeconds.bind(xa);var Yr,se=(()=>{let{performance:t}=Ia;if(!t||!t.now){Yr="none";return}let e=3600*1e3,r=t.now(),n=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+r-n):e,i=o<e,a=t.timing&&t.timing.navigationStart,c=typeof a=="number"?Math.abs(a+r-n):e,l=c<e;return i||l?o<=c?(Yr="timeOrigin",t.timeOrigin):(Yr="navigationStart",a):(Yr="dateNow",n)})();var $r="baggage",zo="sentry-",Oa=/^sentry-/,Aa=8192;function Zo(t){if(!oe(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((n,o)=>{let i=Na(o);return{...n,...i}},{});else{if(!t)return;e=Na(t)}let r=Object.entries(e).reduce((n,[o,i])=>{if(o.match(Oa)){let a=o.slice(zo.length);n[a]=i}return n},{});if(Object.keys(r).length>0)return r}function Wr(t){if(!t)return;let e=Object.entries(t).reduce((r,[n,o])=>(o&&(r[`${zo}${n}`]=o),r),{});return Lu(e)}function Na(t){return t.split(",").map(e=>e.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((e,[r,n])=>(e[r]=n,e),{})}function Lu(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[r,n],o)=>{let i=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,a=o===0?i:`${e},${i}`;return a.length>Aa?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a},"")}var Pa=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Ko(t){if(!t)return;let e=t.match(Pa);if(!e)return;let r;return e[3]==="1"?r=!0:e[3]==="0"&&(r=!1),{traceId:e[1],parentSampled:r,parentSpanId:e[2]}}function Xo(t,e){let r=Ko(t),n=Zo(e),{traceId:o,parentSpanId:i,parentSampled:a}=r||{},s={traceId:o||D(),spanId:D().substring(16),sampled:a};return i&&(s.parentSpanId=i),n&&(s.dsc=n),{traceparentData:r,dynamicSamplingContext:n,propagationContext:s}}function Kt(t=D(),e=D().substring(16),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${t}-${e}${n}`}function Fe(t,e=[]){return[t,e]}function Qo(t,e){let[r,n]=t;return[r,[...n,e]]}function wn(t,e){let r=t[1];for(let n of r){let o=n[0].type;if(e(n,o))return!0}return!1}function Jo(t,e){return(e||new TextEncoder).encode(t)}function ei(t,e){let[r,n]=t,o=JSON.stringify(r);function i(a){typeof o=="string"?o=typeof a=="string"?o+a:[Jo(o,e),a]:o.push(typeof a=="string"?Jo(a,e):a)}for(let a of n){let[s,c]=a;if(i(`
6
+ Error:`,n)}}function Iu(){"console"in A&&Lr.forEach(function(t){t in A.console&&L(A.console,t,function(e){return Zt[t]=e,function(...r){be("console",{args:r,level:t});let n=Zt[t];n&&n.apply(A.console,r)}})})}function xu(){Uo()&&L(A,"fetch",function(t){return function(...e){let{method:r,url:n}=Ea(e),o={args:e,fetchData:{method:r,url:n},startTimestamp:Date.now()};return be("fetch",{...o}),t.apply(A,e).then(i=>(be("fetch",{...o,endTimestamp:Date.now(),response:i}),i),i=>{throw be("fetch",{...o,endTimestamp:Date.now(),error:i}),i})}})}function Ho(t,e){return!!t&&typeof t=="object"&&!!t[e]}function ha(t){return typeof t=="string"?t:t?Ho(t,"url")?t.url:t.toString?t.toString():"":""}function Ea(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[r,n]=t;return{url:ha(r),method:Ho(n,"method")?String(n.method).toUpperCase():"GET"}}let e=t[0];return{url:ha(e),method:Ho(e,"method")?String(e.method).toUpperCase():"GET"}}function va(){if(!V.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;L(t,"open",function(e){return function(...r){let n=Date.now(),o=r[1],i=this[Je]={method:oe(r[0])?r[0].toUpperCase():r[0],url:r[1],request_headers:{}};oe(o)&&i.method==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let a=()=>{let s=this[Je];if(s&&this.readyState===4){try{s.status_code=this.status}catch{}be("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?L(this,"onreadystatechange",function(s){return function(...c){return a(),s.apply(this,c)}}):this.addEventListener("readystatechange",a),L(this,"setRequestHeader",function(s){return function(...c){let[l,f]=c,u=this[Je];return u&&(u.request_headers[l.toLowerCase()]=f),s.apply(this,c)}}),e.apply(this,r)}}),L(t,"send",function(e){return function(...r){let n=this[Je];return n&&r[0]!==void 0&&(n.body=r[0]),be("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),e.apply(this,r)}})}var Pn;function Nu(){if(!ga())return;let t=V.onpopstate;V.onpopstate=function(...r){let n=V.location.href,o=Pn;if(Pn=n,be("history",{from:o,to:n}),t)try{return t.apply(this,r)}catch{}};function e(r){return function(...n){let o=n.length>2?n[2]:void 0;if(o){let i=Pn,a=String(o);Pn=a,be("history",{from:i,to:a})}return r.apply(this,n)}}L(V.history,"pushState",e),L(V.history,"replaceState",e)}var Ou=1e3,Sa,Go,Yo;function Au(t){if(t.type!==Go)return!1;try{if(!t.target||t.target._sentryId!==Yo)return!1}catch{}return!0}function Pu(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Du(t){try{return t.target}catch{return null}}function ya(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;let n=Du(r);if(Pu(r.type,n))return;Ke(r,"_sentryCaptured",!0),n&&!n._sentryId&&Ke(n,"_sentryId",M());let o=r.type==="keypress"?"input":r.type;Au(r)||(t({event:r,name:o,global:e}),Go=r.type,Yo=n?n._sentryId:void 0),clearTimeout(Sa),Sa=V.setTimeout(()=>{Yo=void 0,Go=void 0},Ou)}}function Ca(){if(!V.document)return;let t=be.bind(null,"dom"),e=ya(t,!0);V.document.addEventListener("click",e,!1),V.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(r=>{let n=V[r]&&V[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(L(n,"addEventListener",function(o){return function(i,a,s){if(i==="click"||i=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},f=l[i]=l[i]||{refCount:0};if(!f.handler){let u=ya(t);f.handler=u,o.call(this,i,u,s)}f.refCount++}catch{}return o.call(this,i,a,s)}}),L(n,"removeEventListener",function(o){return function(i,a,s){if(i==="click"||i=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__||{},f=l[i];f&&(f.refCount--,f.refCount<=0&&(o.call(this,i,f.handler,s),f.handler=void 0,delete l[i]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,a,s)}}))})}var Dn=null;function Mu(){Dn=V.onerror,V.onerror=function(t,e,r,n,o){return be("error",{column:n,error:o,line:r,msg:t,url:e}),Dn&&!Dn.__SENTRY_LOADER__?Dn.apply(this,arguments):!1},V.onerror.__SENTRY_INSTRUMENTED__=!0}var Mn=null;function wu(){Mn=V.onunhandledrejection,V.onunhandledrejection=function(t){return be("unhandledrejection",t),Mn&&!Mn.__SENTRY_LOADER__?Mn.apply(this,arguments):!0},V.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function $o(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Wo(){return"npm"}function ba(){return!$o()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Ta(t,e){return t.require(e)}function Ra(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function r(o){if(t)return e.has(o)?!0:(e.add(o),!1);for(let i=0;i<e.length;i++)if(e[i]===o)return!0;return e.push(o),!1}function n(o){if(t)e.delete(o);else for(let i=0;i<e.length;i++)if(e[i]===o){e.splice(i,1);break}}return[r,n]}function Te(t,e=100,r=1/0){try{return wn("",t,e,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function kn(t,e=3,r=100*1024){let n=Te(t,e);return Lu(n)>r?kn(t,e-1,r):n}function wn(t,e,r=1/0,n=1/0,o=Ra()){let[i,a]=o;if(e==null||["number","boolean","string"].includes(typeof e)&&!wr(e))return e;let s=ku(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;let c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:r;if(c===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let l=e;if(l&&typeof l.toJSON=="function")try{let h=l.toJSON();return wn("",h,c-1,n,o)}catch{}let f=Array.isArray(e)?[]:{},u=0,m=In(e);for(let h in m){if(!Object.prototype.hasOwnProperty.call(m,h))continue;if(u>=n){f[h]="[MaxProperties ~]";break}let S=m[h];f[h]=wn(h,S,c-1,n,o),u++}return a(e),f}function ku(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(kr(e))return"[VueViewModel]";if(Oo(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${ae(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let r=Bu(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function Bu(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Fu(t){return~-encodeURI(t).split(/%..|./).length}function Lu(t){return Fu(JSON.stringify(t))}var Qe;(function(t){t[t.PENDING=0]="PENDING";let r=1;t[t.RESOLVED=r]="RESOLVED";let n=2;t[t.REJECTED=n]="REJECTED"})(Qe||(Qe={}));function de(t){return new H(e=>{e(t)})}function kt(t){return new H((e,r)=>{r(t)})}var H=class{constructor(e){H.prototype.__init.call(this),H.prototype.__init2.call(this),H.prototype.__init3.call(this),H.prototype.__init4.call(this),this._state=Qe.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(r){this._reject(r)}}then(e,r){return new H((n,o)=>{this._handlers.push([!1,i=>{if(!e)n(i);else try{n(e(i))}catch(a){o(a)}},i=>{if(!r)o(i);else try{n(r(i))}catch(a){o(a)}}]),this._executeHandlers()})}catch(e){return this.then(r=>r,e)}finally(e){return new H((r,n)=>{let o,i;return this.then(a=>{i=!1,o=a,e&&e()},a=>{i=!0,o=a,e&&e()}).then(()=>{if(i){n(o);return}r(o)})})}__init(){this._resolve=e=>{this._setResult(Qe.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Qe.REJECTED,e)}}__init3(){this._setResult=(e,r)=>{if(this._state===Qe.PENDING){if(Mt(r)){r.then(this._resolve,this._reject);return}this._state=e,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Qe.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(r=>{r[0]||(this._state===Qe.RESOLVED&&r[1](this._value),this._state===Qe.REJECTED&&r[2](this._value),r[0]=!0)})}}};function Vo(t){let e=[];function r(){return t===void 0||e.length<t}function n(a){return e.splice(e.indexOf(a),1)[0]}function o(a){if(!r())return kt(new z("Not adding Promise because buffer limit was reached."));let s=a();return e.indexOf(s)===-1&&e.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s}function i(a){return new H((s,c)=>{let l=e.length;if(!l)return s(!0);let f=setTimeout(()=>{a&&a>0&&s(!1)},a);e.forEach(u=>{de(u).then(()=>{--l||(clearTimeout(f),s(!0))},c)})})}return{$:e,add:o,drain:i}}function Yr(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:n,relative:e[5]+r+n}}var Ia=["fatal","error","warning","log","info","debug"];function jo(t){return t==="warn"?"warning":Ia.includes(t)?t:"log"}var Na=ve(),zo={nowSeconds:()=>Date.now()/1e3};function Uu(){let{performance:t}=Na;if(!t||!t.now)return;let e=Date.now()-t.now();return{now:()=>t.now(),timeOrigin:e}}function Hu(){try{return Ta(module,"perf_hooks").performance}catch{return}}var qo=ba()?Hu():Uu(),xa=qo===void 0?zo:{nowSeconds:()=>(qo.timeOrigin+qo.now())/1e3},et=zo.nowSeconds.bind(zo),Re=xa.nowSeconds.bind(xa);var $r,se=(()=>{let{performance:t}=Na;if(!t||!t.now){$r="none";return}let e=3600*1e3,r=t.now(),n=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+r-n):e,i=o<e,a=t.timing&&t.timing.navigationStart,c=typeof a=="number"?Math.abs(a+r-n):e,l=c<e;return i||l?o<=c?($r="timeOrigin",t.timeOrigin):($r="navigationStart",a):($r="dateNow",n)})();var Wr="baggage",Zo="sentry-",Aa=/^sentry-/,Pa=8192;function Ko(t){if(!oe(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((n,o)=>{let i=Oa(o);return{...n,...i}},{});else{if(!t)return;e=Oa(t)}let r=Object.entries(e).reduce((n,[o,i])=>{if(o.match(Aa)){let a=o.slice(Zo.length);n[a]=i}return n},{});if(Object.keys(r).length>0)return r}function Vr(t){if(!t)return;let e=Object.entries(t).reduce((r,[n,o])=>(o&&(r[`${Zo}${n}`]=o),r),{});return Gu(e)}function Oa(t){return t.split(",").map(e=>e.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((e,[r,n])=>(e[r]=n,e),{})}function Gu(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[r,n],o)=>{let i=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,a=o===0?i:`${e},${i}`;return a.length>Pa?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a},"")}var Da=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Xo(t){if(!t)return;let e=t.match(Da);if(!e)return;let r;return e[3]==="1"?r=!0:e[3]==="0"&&(r=!1),{traceId:e[1],parentSampled:r,parentSpanId:e[2]}}function Jo(t,e){let r=Xo(t),n=Ko(e),{traceId:o,parentSpanId:i,parentSampled:a}=r||{},s={traceId:o||M(),spanId:M().substring(16),sampled:a};return i&&(s.parentSpanId=i),n&&(s.dsc=n),{traceparentData:r,dynamicSamplingContext:n,propagationContext:s}}function Xt(t=M(),e=M().substring(16),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${t}-${e}${n}`}function Le(t,e=[]){return[t,e]}function ei(t,e){let[r,n]=t;return[r,[...n,e]]}function Bn(t,e){let r=t[1];for(let n of r){let o=n[0].type;if(e(n,o))return!0}return!1}function Qo(t,e){return(e||new TextEncoder).encode(t)}function ti(t,e){let[r,n]=t,o=JSON.stringify(r);function i(a){typeof o=="string"?o=typeof a=="string"?o+a:[Qo(o,e),a]:o.push(typeof a=="string"?Qo(a,e):a)}for(let a of n){let[s,c]=a;if(i(`
7
7
  ${JSON.stringify(s)}
8
- `),typeof c=="string"||c instanceof Uint8Array)i(c);else{let l;try{l=JSON.stringify(c)}catch{l=JSON.stringify(Te(c))}i(l)}}return typeof o=="string"?o:Fu(o)}function Fu(t){let e=t.reduce((o,i)=>o+i.length,0),r=new Uint8Array(e),n=0;for(let o of t)r.set(o,n),n+=o.length;return r}function ti(t,e){let r=typeof t.data=="string"?Jo(t.data,e):t.data;return[ie({type:"attachment",length:r.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),r]}var Hu={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",statsd:"unknown"};function Bn(t){return Hu[t]}function Ln(t){if(!t||!t.sdk)return;let{name:e,version:r}=t.sdk;return{name:e,version:r}}function ri(t,e,r,n){let o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!r&&n&&{dsn:Le(n)},...o&&{trace:ie({...o})}}}function ni(t,e,r){let n=[{type:"client_report"},{timestamp:r||et(),discarded_events:t}];return Fe(e?{dsn:e}:{},[n])}function Da(t,e=Date.now()){let r=parseInt(`${t}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${t}`);return isNaN(n)?6e4:n-e}function Ma(t,e){return t[e]||t.all||0}function oi(t,e,r=Date.now()){return Ma(t,e)>r}function ii(t,{statusCode:e,headers:r},n=Date.now()){let o={...t},i=r&&r["x-sentry-rate-limits"],a=r&&r["retry-after"];if(i)for(let s of i.trim().split(",")){let[c,l]=s.split(":",2),f=parseInt(c,10),u=(isNaN(f)?60:f)*1e3;if(!l)o.all=n+u;else for(let m of l.split(";"))o[m]=n+u}else a?o.all=n+Da(a,n):e===429&&(o.all=n+60*1e3);return o}function ka(t,e){return t(e.stack||"",1)}function ai(t,e){let r={type:e.name||e.constructor.name,value:e.message},n=ka(t,e);return n.length&&(r.stacktrace={frames:n}),r}var Xt="production";function Vr(){return Br("globalEventProcessors",()=>[])}function si(t){Vr().push(t)}function Jt(t,e,r,n=0){return new U((o,i)=>{let a=t[n];if(e===null||typeof a!="function")o(e);else{let s=a({...e},r);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&a.id&&s===null&&p.log(`Event processor "${a.id}" dropped event`),Mt(s)?s.then(c=>Jt(t,c,r,n+1).then(o)).then(null,i):Jt(t,s,r,n+1).then(o).then(null,i)}})}function wa(t){let e=Re(),r={sid:D(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Uu(r)};return t&&tt(r,t),r}function tt(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Re(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:D()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let r=t.timestamp-t.started;t.duration=r>=0?r:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Ba(t,e){let r={};e?r={status:e}:t.status==="ok"&&(r={status:"exited"}),tt(t,r)}function Uu(t){return ie({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Gu=100,ge=class{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=La()}static clone(e){let r=new ge;return e&&(r._breadcrumbs=[...e._breadcrumbs],r._tags={...e._tags},r._extra={...e._extra},r._contexts={...e._contexts},r._user=e._user,r._level=e._level,r._span=e._span,r._session=e._session,r._transactionName=e._transactionName,r._fingerprint=e._fingerprint,r._eventProcessors=[...e._eventProcessors],r._requestSession=e._requestSession,r._attachments=[...e._attachments],r._sdkProcessingMetadata={...e._sdkProcessingMetadata},r._propagationContext={...e._propagationContext}),r}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&tt(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,r){return this._tags={...this._tags,[e]:r},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,r){return this._extra={...this._extra,[e]:r},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,r){return r===null?delete this._contexts[e]:this._contexts[e]=r,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();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;if(typeof e=="function"){let r=e(this);return r instanceof ge?r:this}return e instanceof ge?(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&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):Ee(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),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=La(),this}addBreadcrumb(e,r){let n=typeof r=="number"?r:Gu;if(n<=0)return this;let o={timestamp:et(),...e},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>n?i.slice(-n):i,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._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,r={},n){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let a=this._span.transaction;if(a){e.sdkProcessingMetadata={dynamicSamplingContext:a.getDynamicSamplingContext(),...e.sdkProcessingMetadata};let s=a.name;s&&(e.tags={transaction:s,...e.tags})}}this._applyFingerprint(e);let o=this._getBreadcrumbs(),i=[...e.breadcrumbs||[],...o];return e.breadcrumbs=i.length>0?i:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},Jt([...n||[],...Vr(),...this._eventProcessors],e,r)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Fr(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function La(){return{traceId:D(),spanId:D().substring(16)}}var Fa=4,Yu=100,Qt=class{constructor(e,r=new ge,n=Fa){this._version=n,this._stack=[{scope:r}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){let r=this.getStackTop();r.client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let e=ge.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){let r=this.pushScope();try{e(r)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,r){let n=this._lastEventId=r&&r.event_id?r.event_id:D(),o=new Error("Sentry syntheticException");return this._withClient((i,a)=>{i.captureException(e,{originalException:e,syntheticException:o,...r,event_id:n},a)}),n}captureMessage(e,r,n){let o=this._lastEventId=n&&n.event_id?n.event_id:D(),i=new Error(e);return this._withClient((a,s)=>{a.captureMessage(e,r,{originalException:e,syntheticException:i,...n,event_id:o},s)}),o}captureEvent(e,r){let n=r&&r.event_id?r.event_id:D();return e.type||(this._lastEventId=n),this._withClient((o,i)=>{o.captureEvent(e,{...r,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,r){let{scope:n,client:o}=this.getStackTop();if(!o)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Yu}=o.getOptions&&o.getOptions()||{};if(a<=0)return;let c={timestamp:et(),...e},l=i?bn(()=>i(c,r)):c;l!==null&&(o.emit&&o.emit("beforeAddBreadcrumb",l,r),n.addBreadcrumb(l,a))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,r){this.getScope().setTag(e,r)}setExtra(e,r){this.getScope().setExtra(e,r)}setContext(e,r){this.getScope().setContext(e,r)}configureScope(e){let{scope:r,client:n}=this.getStackTop();n&&e(r)}run(e){let r=Fn(this);try{e(this)}finally{Fn(r)}}getIntegration(e){let r=this.getClient();if(!r)return null;try{return r.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,r){let n=this._callExtensionMethod("startTransaction",e,r);if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!n){let o=this.getClient();console.warn(o?`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
8
+ `),typeof c=="string"||c instanceof Uint8Array)i(c);else{let l;try{l=JSON.stringify(c)}catch{l=JSON.stringify(Te(c))}i(l)}}return typeof o=="string"?o:Yu(o)}function Yu(t){let e=t.reduce((o,i)=>o+i.length,0),r=new Uint8Array(e),n=0;for(let o of t)r.set(o,n),n+=o.length;return r}function ri(t,e){let r=typeof t.data=="string"?Qo(t.data,e):t.data;return[ie({type:"attachment",length:r.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),r]}var $u={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",statsd:"unknown"};function Fn(t){return $u[t]}function Ln(t){if(!t||!t.sdk)return;let{name:e,version:r}=t.sdk;return{name:e,version:r}}function ni(t,e,r,n){let o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!r&&n&&{dsn:Fe(n)},...o&&{trace:ie({...o})}}}function oi(t,e,r){let n=[{type:"client_report"},{timestamp:r||et(),discarded_events:t}];return Le(e?{dsn:e}:{},[n])}function Ma(t,e=Date.now()){let r=parseInt(`${t}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${t}`);return isNaN(n)?6e4:n-e}function wa(t,e){return t[e]||t.all||0}function ii(t,e,r=Date.now()){return wa(t,e)>r}function ai(t,{statusCode:e,headers:r},n=Date.now()){let o={...t},i=r&&r["x-sentry-rate-limits"],a=r&&r["retry-after"];if(i)for(let s of i.trim().split(",")){let[c,l]=s.split(":",2),f=parseInt(c,10),u=(isNaN(f)?60:f)*1e3;if(!l)o.all=n+u;else for(let m of l.split(";"))o[m]=n+u}else a?o.all=n+Ma(a,n):e===429&&(o.all=n+60*1e3);return o}function ka(t,e){return t(e.stack||"",1)}function si(t,e){let r={type:e.name||e.constructor.name,value:e.message},n=ka(t,e);return n.length&&(r.stacktrace={frames:n}),r}var Jt="production";function jr(){return Fr("globalEventProcessors",()=>[])}function ci(t){jr().push(t)}function Qt(t,e,r,n=0){return new H((o,i)=>{let a=t[n];if(e===null||typeof a!="function")o(e);else{let s=a({...e},r);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&a.id&&s===null&&p.log(`Event processor "${a.id}" dropped event`),Mt(s)?s.then(c=>Qt(t,c,r,n+1).then(o)).then(null,i):Qt(t,s,r,n+1).then(o).then(null,i)}})}function Ba(t){let e=Re(),r={sid:M(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Wu(r)};return t&&tt(r,t),r}function tt(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Re(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:M()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let r=t.timestamp-t.started;t.duration=r>=0?r:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Fa(t,e){let r={};e?r={status:e}:t.status==="ok"&&(r={status:"exited"}),tt(t,r)}function Wu(t){return ie({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Vu=100,ge=class{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=La()}static clone(e){let r=new ge;return e&&(r._breadcrumbs=[...e._breadcrumbs],r._tags={...e._tags},r._extra={...e._extra},r._contexts={...e._contexts},r._user=e._user,r._level=e._level,r._span=e._span,r._session=e._session,r._transactionName=e._transactionName,r._fingerprint=e._fingerprint,r._eventProcessors=[...e._eventProcessors],r._requestSession=e._requestSession,r._attachments=[...e._attachments],r._sdkProcessingMetadata={...e._sdkProcessingMetadata},r._propagationContext={...e._propagationContext}),r}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&tt(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,r){return this._tags={...this._tags,[e]:r},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,r){return this._extra={...this._extra,[e]:r},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,r){return r===null?delete this._contexts[e]:this._contexts[e]=r,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();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;if(typeof e=="function"){let r=e(this);return r instanceof ge?r:this}return e instanceof ge?(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&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):Ee(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),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=La(),this}addBreadcrumb(e,r){let n=typeof r=="number"?r:Vu;if(n<=0)return this;let o={timestamp:et(),...e},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>n?i.slice(-n):i,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._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,r={},n){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let a=this._span.transaction;if(a){e.sdkProcessingMetadata={dynamicSamplingContext:a.getDynamicSamplingContext(),...e.sdkProcessingMetadata};let s=a.name;s&&(e.tags={transaction:s,...e.tags})}}this._applyFingerprint(e);let o=this._getBreadcrumbs(),i=[...e.breadcrumbs||[],...o];return e.breadcrumbs=i.length>0?i:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},Qt([...n||[],...jr(),...this._eventProcessors],e,r)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Ur(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function La(){return{traceId:M(),spanId:M().substring(16)}}var Ua=4,ju=100,er=class{constructor(e,r=new ge,n=Ua){this._version=n,this._stack=[{scope:r}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){let r=this.getStackTop();r.client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let e=ge.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){let r=this.pushScope();try{e(r)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,r){let n=this._lastEventId=r&&r.event_id?r.event_id:M(),o=new Error("Sentry syntheticException");return this._withClient((i,a)=>{i.captureException(e,{originalException:e,syntheticException:o,...r,event_id:n},a)}),n}captureMessage(e,r,n){let o=this._lastEventId=n&&n.event_id?n.event_id:M(),i=new Error(e);return this._withClient((a,s)=>{a.captureMessage(e,r,{originalException:e,syntheticException:i,...n,event_id:o},s)}),o}captureEvent(e,r){let n=r&&r.event_id?r.event_id:M();return e.type||(this._lastEventId=n),this._withClient((o,i)=>{o.captureEvent(e,{...r,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,r){let{scope:n,client:o}=this.getStackTop();if(!o)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=ju}=o.getOptions&&o.getOptions()||{};if(a<=0)return;let c={timestamp:et(),...e},l=i?bn(()=>i(c,r)):c;l!==null&&(o.emit&&o.emit("beforeAddBreadcrumb",l,r),n.addBreadcrumb(l,a))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,r){this.getScope().setTag(e,r)}setExtra(e,r){this.getScope().setExtra(e,r)}setContext(e,r){this.getScope().setContext(e,r)}configureScope(e){let{scope:r,client:n}=this.getStackTop();n&&e(r)}run(e){let r=Un(this);try{e(this)}finally{Un(r)}}getIntegration(e){let r=this.getClient();if(!r)return null;try{return r.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,r){let n=this._callExtensionMethod("startTransaction",e,r);if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!n){let o=this.getClient();console.warn(o?`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
9
9
  Sentry.addTracingExtensions();
10
10
  Sentry.init({...});
11
- `:"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(){let r=this.getStackTop().scope,n=r.getSession();n&&Ba(n),this._sendSessionUpdate(),r.setSession()}startSession(e){let{scope:r,client:n}=this.getStackTop(),{release:o,environment:i=Xt}=n&&n.getOptions()||{},{userAgent:a}=O.navigator||{},s=wa({release:o,environment:i,user:r.getUser(),...a&&{userAgent:a},...e}),c=r.getSession&&r.getSession();return c&&c.status==="ok"&&tt(c,{status:"exited"}),this.endSession(),r.setSession(s),s}shouldSendDefaultPii(){let e=this.getClient(),r=e&&e.getOptions();return!!(r&&r.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:r}=this.getStackTop(),n=e.getSession();n&&r&&r.captureSession&&r.captureSession(n)}_withClient(e){let{scope:r,client:n}=this.getStackTop();n&&e(n,r)}_callExtensionMethod(e,...r){let o=Bt().__SENTRY__;if(o&&o.extensions&&typeof o.extensions[e]=="function")return o.extensions[e].apply(this,r);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function Bt(){return O.__SENTRY__=O.__SENTRY__||{extensions:{},hub:void 0},O}function Fn(t){let e=Bt(),r=jr(e);return ci(e,t),r}function C(){let t=Bt();if(t.__SENTRY__&&t.__SENTRY__.acs){let e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return $u(t)}function $u(t=Bt()){return(!Wu(t)||jr(t).isOlderThan(Fa))&&ci(t,new Qt),jr(t)}function Wu(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function jr(t){return Br("hub",()=>new Qt,t)}function ci(t,e){if(!t)return!1;let r=t.__SENTRY__=t.__SENTRY__||{};return r.hub=e,!0}function xe(t){return(t||C()).getScope().getTransaction()}var Ha=!1;function Ua(){Ha||(Ha=!0,H("error",li),H("unhandledrejection",li))}function li(){let t=xe();if(t){let e="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}li.tag="sentry_tracingErrorCallback";var er=class{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},tr=class{constructor(e={}){this.traceId=e.traceId||D(),this.spanId=e.spanId||D().substring(16),this.startTimestamp=e.startTimestamp||Re(),this.tags=e.tags||{},this.data=e.data||{},this.instrumenter=e.instrumenter||"sentry",this.origin=e.origin||"manual",e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.name&&(this.description=e.name),e.status&&(this.status=e.status),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}get name(){return this.description||""}set name(e){this.setName(e)}startChild(e){let r=new tr({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r),r.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&r.transaction){let n=e&&e.op||"< unknown op >",o=r.transaction.name||"< unknown name >",i=r.transaction.spanId,a=`[Tracing] Starting '${n}' span on transaction '${o}' (${i}).`;r.transaction.metadata.spanMetadata[r.spanId]={logMessage:a},p.log(a)}return r}setTag(e,r){return this.tags={...this.tags,[e]:r},this}setData(e,r){return this.data={...this.data,[e]:r},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);let r=Ga(e);return r!=="unknown_error"&&this.setStatus(r),this}setName(e){this.description=e}isSuccess(){return this.status==="ok"}finish(e){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:r}=this.transaction.metadata.spanMetadata[this.spanId];r&&p.log(r.replace("Starting","Finishing"))}this.endTimestamp=typeof e=="number"?e:Re()}toTraceparent(){return Kt(this.traceId,this.spanId,this.sampled)}toContext(){return ie({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return ie({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return ie({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}};function Ga(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){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(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function ht(t,e,r){let n=e.getOptions(),{publicKey:o}=e.getDsn()||{},{segment:i}=r&&r.getUser()||{},a=ie({environment:n.environment||Xt,release:n.release,user_segment:i,public_key:o,trace_id:t});return e.emit&&e.emit("createDsc",a),a}var rr=class extends tr{constructor(e,r){super(e),delete this.description,this._measurements={},this._contexts={},this._hub=r||C(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;let n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,r="custom"){this._name=e,this.metadata.source=r}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new er(e)),this.spanRecorder.add(this)}setContext(e,r){r===null?delete this._contexts[e]:this._contexts[e]=r}setMeasurement(e,r,n=""){this._measurements[e]={value:r,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){let r=this._finishTransaction(e);if(r)return this._hub.captureEvent(r)}toContext(){let e=super.toContext();return ie({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let e=this._hub||C(),r=e.getClient();if(!r)return{};let n=e.getScope(),o=ht(this.traceId,r,n),i=this.metadata.sampleRate;i!==void 0&&(o.sample_rate=`${i}`);let a=this.metadata.source;return a&&a!=="url"&&(o.transaction=this.name),this.sampled!==void 0&&(o.sampled=String(this.sampled)),o}setHub(e){this._hub=e}_finishTransaction(e){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);let r=this._hub.getClient();if(r&&r.emit&&r.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),r&&r.recordDroppedEvent("sample_rate","transaction");return}let n=this.spanRecorder?this.spanRecorder.spans.filter(s=>s!==this&&s.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((s,c)=>s.endTimestamp&&c.endTimestamp?s.endTimestamp>c.endTimestamp?s:c:s).endTimestamp);let o=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...o,dynamicSamplingContext:this.getDynamicSamplingContext()},...o.source&&{transaction_info:{source:o.source}}};return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),i}};var or={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Vu="finishReason",nr=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],ui=class extends er{constructor(e,r,n,o){super(o),this._pushActivity=e,this._popActivity=r,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=r=>{e.endTimestamp=typeof r=="number"?r:Re(),this._popActivity(e.spanId)},e.endTimestamp===void 0&&this._pushActivity(e.spanId)),super.add(e)}},qr=class extends rr{constructor(e,r,n=or.idleTimeout,o=or.finalTimeout,i=or.heartbeatInterval,a=!1){super(e,r),this._idleHub=r,this._idleTimeout=n,this._finalTimeout=o,this._heartbeatInterval=i,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=nr[4],a&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),r.configureScope(s=>s.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=nr[3],this.finish())},this._finalTimeout)}finish(e=Re()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(Vu,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] finishing IdleTransaction",new Date(e*1e3).toISOString(),this.op);for(let r of this._beforeFinishCallbacks)r(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanId===this.spanId)return!0;r.endTimestamp||(r.endTimestamp=e,r.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));let n=r.startTimestamp<e,o=(this._finalTimeout+this._idleTimeout)/1e3,i=r.endTimestamp-this.startTimestamp<o;if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let a=JSON.stringify(r,void 0,2);n?i||p.log("[Tracing] discarding Span since it finished after Transaction final timeout",a):p.log("[Tracing] discarding Span since it happened after Transaction was finished",a)}return n&&i}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] No active IdleTransaction");if(this._onScope){let r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){let r=o=>{this._finished||this._pushActivity(o)},n=o=>{this._finished||this._popActivity(o)};this.spanRecorder=new ui(r,n,this.spanId,e),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:r}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=r===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=nr[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=nr[1],this.finish(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] popActivity ${e}`),delete this.activities[e],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let r=Re();this._idleTimeoutCanceledPermanently?(this._finishReason=nr[5],this.finish(r)):this._restartIdleTimeout(r+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=nr[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function ir(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let e=C().getClient(),r=t||e&&e.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}function fi(t,e,r){if(!ir(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let n;return typeof e.tracesSampler=="function"?(n=e.tracesSampler(r),t.setMetadata({sampleRate:Number(n)})):r.parentSampled!==void 0?n=r.parentSampled:typeof e.tracesSampleRate<"u"?(n=e.tracesSampleRate,t.setMetadata({sampleRate:Number(n)})):(n=1,t.setMetadata({sampleRate:n})),ju(n)?n?(t.sampled=Math.random()<n,t.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),t)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),t.sampled=!1,t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function ju(t){return Mr(t)||!(typeof t=="number"||typeof t=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t<0||t>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function qu(){let e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function zu(t,e){let r=this.getClient(),n=r&&r.getOptions()||{},o=n.instrumenter||"sentry",i=t.instrumenter||"sentry";o!==i&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${o}\` instrumenter.
12
- The transaction will not be sampled. Please use the ${o} instrumentation to start transactions.`),t.sampled=!1);let a=new rr(t,this);return a=fi(a,n,{parentSampled:t.parentSampled,transactionContext:t,...e}),a.sampled&&a.initSpanRecorder(n._experiments&&n._experiments.maxSpans),r&&r.emit&&r.emit("startTransaction",a),a}function Hn(t,e,r,n,o,i,a){let s=t.getClient(),c=s&&s.getOptions()||{},l=new qr(e,t,r,n,a,o);return l=fi(l,c,{parentSampled:e.parentSampled,transactionContext:e,...i}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),s&&s.emit&&s.emit("startTransaction",l),l}function Un(){let t=Bt();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=zu),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=qu),Ua())}function ar(t,e){return C().captureException(t,{captureContext:e})}function zr(t){C().addBreadcrumb(t)}function Gn(t,e){C().setContext(t,e)}function Yn(t){C().withScope(t)}var Zu="7";function Ku(t){let e=t.protocol?`${t.protocol}:`:"",r=t.port?`:${t.port}`:"";return`${e}//${t.host}${r}${t.path?`/${t.path}`:""}/api/`}function Xu(t){return`${Ku(t)}${t.projectId}/envelope/`}function Ju(t,e){return Mo({sentry_key:t.publicKey,sentry_version:Zu,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Ya(t,e={}){let r=typeof e=="string"?e:e.tunnel,n=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return r||`${Xu(t)}?${Ju(t,n)}`}function Qu(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function $a(t,e,r,n){let o=Ln(r),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&e&&{dsn:Le(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Fe(i,[a])}function Wa(t,e,r,n){let o=Ln(r),i=t.type&&t.type!=="replay_event"?t.type:"event";Qu(t,r&&r.sdk);let a=ri(t,o,n,e);return delete t.sdkProcessingMetadata,Fe(a,[[{type:i},t]])}var Va=[];function ef(t){let e={};return t.forEach(r=>{let{name:n}=r,o=e[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(e[n]=r)}),Object.keys(e).map(r=>e[r])}function di(t){let e=t.defaultIntegrations||[],r=t.integrations;e.forEach(a=>{a.isDefaultInstance=!0});let n;Array.isArray(r)?n=[...e,...r]:typeof r=="function"?n=Fr(r(e)):n=e;let o=ef(n),i=tf(o,a=>a.name==="Debug");if(i!==-1){let[a]=o.splice(i,1);o.push(a)}return o}function ja(t,e){let r={};return e.forEach(n=>{n&&pi(t,n,r)}),r}function pi(t,e,r){if(r[e.name]=e,Va.indexOf(e.name)===-1&&(e.setupOnce(si,C),Va.push(e.name)),t.on&&typeof e.preprocessEvent=="function"){let n=e.preprocessEvent.bind(e);t.on("preprocessEvent",(o,i)=>n(o,i,t))}if(t.addEventProcessor&&typeof e.processEvent=="function"){let n=e.processEvent.bind(e),o=Object.assign((i,a)=>n(i,a,t),{id:e.name});t.addEventProcessor(o)}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Integration installed: ${e.name}`)}function tf(t,e){for(let r=0;r<t.length;r++)if(e(t[r])===!0)return r;return-1}function za(t,e,r,n,o){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=t,s={...e,event_id:e.event_id||r.event_id||D(),timestamp:e.timestamp||et()},c=r.integrations||t.integrations.map(m=>m.name);rf(s,t),af(s,c),e.type===void 0&&nf(s,t.stackParser);let l=n;r.captureContext&&(l=ge.clone(l).update(r.captureContext));let f=de(s),u=o&&o.getEventProcessors?o.getEventProcessors():[];if(l){if(l.getAttachments){let m=[...r.attachments||[],...l.getAttachments()];m.length&&(r.attachments=m)}f=l.applyToEvent(s,r,u)}else f=Jt([...u,...Vr()],s,r);return f.then(m=>(m&&of(m),typeof i=="number"&&i>0?sf(m,i,a):m))}function rf(t,e){let{environment:r,release:n,dist:o,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?r:Xt),t.release===void 0&&n!==void 0&&(t.release=n),t.dist===void 0&&o!==void 0&&(t.dist=o),t.message&&(t.message=we(t.message,i));let a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=we(a.value,i));let s=t.request;s&&s.url&&(s.url=we(s.url,i))}var qa=new WeakMap;function nf(t,e){let r=O._sentryDebugIds;if(!r)return;let n,o=qa.get(e);o?n=o:(n=new Map,qa.set(e,n));let i=Object.keys(r).reduce((a,s)=>{let c,l=n.get(s);l?c=l:(c=e(s),n.set(s,c));for(let f=c.length-1;f>=0;f--){let u=c[f];if(u.filename){a[u.filename]=r[s];break}}return a},{});try{t.exception.values.forEach(a=>{a.stacktrace.frames.forEach(s=>{s.filename&&(s.debug_id=i[s.filename])})})}catch{}}function of(t){let e={};try{t.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?e[o.abs_path]=o.debug_id:o.filename&&(e[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let r=t.debug_meta.images;Object.keys(e).forEach(n=>{r.push({type:"sourcemap",code_file:n,debug_id:e[n]})})}function af(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function sf(t,e,r){if(!t)return null;let n={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(o=>({...o,...o.data&&{data:Te(o.data,e,r)}}))},...t.user&&{user:Te(t.user,e,r)},...t.contexts&&{contexts:Te(t.contexts,e,r)},...t.extra&&{extra:Te(t.extra,e,r)}};return t.contexts&&t.contexts.trace&&n.contexts&&(n.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(n.contexts.trace.data=Te(t.contexts.trace.data,e,r))),t.spans&&(n.spans=t.spans.map(o=>(o.data&&(o.data=Te(o.data,e,r)),o))),n}var Za="Not capturing exception because it's already been captured.",Zr=class{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Cn(e.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("No DSN provided, client will not send events."),this._dsn){let r=Ya(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}}captureException(e,r,n){if(xn(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(Za);return}let o=r&&r.event_id;return this._process(this.eventFromException(e,r).then(i=>this._captureEvent(i,r,n)).then(i=>{o=i})),o}captureMessage(e,r,n,o){let i=n&&n.event_id,a=qt(e)?this.eventFromMessage(String(e),r,n):this.eventFromException(e,n);return this._process(a.then(s=>this._captureEvent(s,n,o)).then(s=>{i=s})),i}captureEvent(e,r,n){if(r&&r.originalException&&xn(r.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(Za);return}let o=r&&r.event_id;return this._process(this._captureEvent(e,r,n).then(i=>{o=i})),o}captureSession(e){typeof e.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),tt(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let r=this._transport;return r?this._isClientDoneProcessing(e).then(n=>r.flush(e).then(o=>n&&o)):de(!0)}close(e){return this.flush(e).then(r=>(this.getOptions().enabled=!1,r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=ja(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){pi(this,e,this._integrations)}sendEvent(e,r={}){this.emit("beforeSendEvent",e,r);let n=Wa(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of r.attachments||[])n=Qo(n,ti(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));let o=this._sendEnvelope(n);o&&o.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let r=$a(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}recordDroppedEvent(e,r,n){if(this._options.sendClientReports){let o=`${e}:${r}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Adding outcome: "${o}"`),this._outcomes[o]=this._outcomes[o]+1||1}}on(e,r){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(r)}emit(e,...r){this._hooks[e]&&this._hooks[e].forEach(n=>n(...r))}_updateSessionFromEvent(e,r){let n=!1,o=!1,i=r.exception&&r.exception.values;if(i){o=!0;for(let c of i){let l=c.mechanism;if(l&&l.handled===!1){n=!0;break}}}let a=e.status==="ok";(a&&e.errors===0||a&&n)&&(tt(e,{...n&&{status:"crashed"},errors:e.errors||Number(o||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new U(r=>{let n=0,o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),r(!0)):(n+=o,e&&n>=e&&(clearInterval(i),r(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,r,n){let o=this.getOptions(),i=Object.keys(this._integrations);return!r.integrations&&i.length>0&&(r.integrations=i),this.emit("preprocessEvent",e,r),za(o,e,r,n,this).then(a=>{if(a===null)return a;let{propagationContext:s}=a.sdkProcessingMetadata||{};if(!(a.contexts&&a.contexts.trace)&&s){let{traceId:l,spanId:f,parentSpanId:u,dsc:m}=s;a.contexts={trace:{trace_id:l,span_id:f,parent_span_id:u},...a.contexts};let h=m||ht(l,this,n);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(e,r={},n){return this._processEvent(e,r,n).then(o=>o.event_id,o=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let i=o;i.logLevel==="log"?p.log(i.message):p.warn(i)}})}_processEvent(e,r,n){let o=this.getOptions(),{sampleRate:i}=o,a=Xa(e),s=Ka(e),c=e.type||"error",l=`before send for type \`${c}\``;if(s&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),wt(new z(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let f=c==="replay_event"?"replay":c;return this._prepareEvent(e,r,n).then(u=>{if(u===null)throw this.recordDroppedEvent("event_processor",f,e),new z("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return u;let h=lf(o,u,r);return cf(h,l)}).then(u=>{if(u===null)throw this.recordDroppedEvent("before_send",f,e),new z(`${l} returned \`null\`, will not send event.`,"log");let m=n&&n.getSession();!a&&m&&this._updateSessionFromEvent(m,u);let h=u.transaction_info;if(a&&h&&u.transaction!==e.transaction){let S="custom";u.transaction_info={...h,source:S}}return this.sendEvent(u,r),u}).then(null,u=>{throw u instanceof z?u:(this.captureException(u,{data:{__sentry__:!0},originalException:u}),new z(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
13
- Reason: ${u}`))})}_process(e){this._numProcessing++,e.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,r=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Error while sending event:",r)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(r=>{let[n,o]=r.split(":");return{reason:n,category:o,quantity:e[r]}})}};function cf(t,e){let r=`${e} must return \`null\` or a valid event.`;if(Mt(t))return t.then(n=>{if(!Ee(n)&&n!==null)throw new z(r);return n},n=>{throw new z(`${e} rejected with ${n}`)});if(!Ee(t)&&t!==null)throw new z(r);return t}function lf(t,e,r){let{beforeSend:n,beforeSendTransaction:o}=t;return Ka(e)&&n?n(e,r):Xa(e)&&o?o(e,r):e}function Ka(t){return t.type===void 0}function Xa(t){return t.type==="transaction"}function mi(t,e){e.debug===!0&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?p.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));let r=C();r.getScope().update(e.initialScope);let o=new t(e);r.bindClient(o)}var uf=30;function sr(t,e,r=Wo(t.bufferSize||uf)){let n={},o=a=>r.drain(a);function i(a){let s=[];if(wn(a,(u,m)=>{let h=Bn(m);if(oi(n,h)){let S=Ja(u,m);t.recordDroppedEvent("ratelimit_backoff",h,S)}else s.push(u)}),s.length===0)return de();let c=Fe(a[0],s),l=u=>{wn(c,(m,h)=>{let S=Ja(m,h);t.recordDroppedEvent(u,Bn(h),S)})},f=()=>e({body:ei(c,t.textEncoder)}).then(u=>(u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),n=ii(n,u),u),u=>{throw l("network_error"),u});return r.add(f).then(u=>u,u=>{if(u instanceof z)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Skipped sending event because buffer is full."),l("queue_overflow"),de();throw u})}return i.__sentry__baseTransport__=!0,{send:i,flush:o}}function Ja(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}var Kr="7.77.0";var Ft={};To(Ft,{FunctionToString:()=>St,InboundFilters:()=>yt,LinkedErrors:()=>Lt});var Qa,St=class{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=St.id}setupOnce(){Qa=Function.prototype.toString;try{Function.prototype.toString=function(...e){let r=kt(this)||this;return Qa.apply(r,e)}}catch{}}};St.__initStatic();var ff=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],df=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],yt=class{static __initStatic(){this.id="InboundFilters"}constructor(e={}){this.name=yt.id,this._options=e}setupOnce(e,r){}processEvent(e,r,n){let o=n.getOptions(),i=pf(this._options,o);return mf(e,i)?null:e}};yt.__initStatic();function pf(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:ff],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:df],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function mf(t,e){return e.ignoreInternal&&Ef(t)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being internal Sentry Error.
14
- Event: ${be(t)}`),!0):gf(t,e.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
15
- Event: ${be(t)}`),!0):_f(t,e.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
16
- Event: ${be(t)}`),!0):hf(t,e.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`denyUrls\` option.
17
- Event: ${be(t)}.
18
- Url: ${$n(t)}`),!0):Sf(t,e.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to not being matched by \`allowUrls\` option.
19
- Event: ${be(t)}.
20
- Url: ${$n(t)}`),!0)}function gf(t,e){return t.type||!e||!e.length?!1:yf(t).some(r=>_t(r,e))}function _f(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let r=t.transaction;return r?_t(r,e):!1}function hf(t,e){if(!e||!e.length)return!1;let r=$n(t);return r?_t(r,e):!1}function Sf(t,e){if(!e||!e.length)return!0;let r=$n(t);return r?_t(r,e):!0}function yf(t){let e=[];t.message&&e.push(t.message);let r;try{r=t.exception.values[t.exception.values.length-1]}catch{}return r&&r.value&&(e.push(r.value),r.type&&e.push(`${r.type}: ${r.value}`)),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&e.length===0&&p.error(`Could not extract message for event ${be(t)}`),e}function Ef(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function vf(t=[]){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function $n(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?vf(e):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Cannot extract url for event ${be(t)}`),null}}var bf="cause",Cf=5,Lt=class{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this._key=e.key||bf,this._limit=e.limit||Cf,this.name=Lt.id}setupOnce(){}preprocessEvent(e,r,n){let o=n.getOptions();wr(ai,o.stackParser,o.maxValueLength,this._key,this._limit,e,r)}};Lt.__initStatic();var T=O,gi=0;function _i(){return gi>0}function Lf(){gi++,setTimeout(()=>{gi--})}function Et(t,e={},r){if(typeof t!="function")return t;try{let o=t.__sentry_wrapped__;if(o)return o;if(kt(t))return t}catch{return t}let n=function(){let o=Array.prototype.slice.call(arguments);try{r&&typeof r=="function"&&r.apply(this,arguments);let i=o.map(a=>Et(a,e));return t.apply(this,i)}catch(i){throw Lf(),Yn(a=>{a.addEventProcessor(s=>(e.mechanism&&(Zt(s,void 0,void 0),Xe(s,e.mechanism)),s.extra={...s.extra,arguments:o},s)),ar(i)}),i}};try{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}catch{}Tn(n,t),Ke(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return t.name}})}catch{}return n}function yi(t,e){let r=Ei(t,e),n={type:e&&e.name,value:Gf(e)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Ff(t,e,r,n){let i=C().getClient(),a=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:Dt(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:Yf(e,{isUnhandledRejection:n})}]},extra:{__serialized__:kn(e,a)}};if(r){let c=Ei(t,r);c.length&&(s.exception.values[0].stacktrace={frames:c})}return s}function hi(t,e){return{exception:{values:[yi(t,e)]}}}function Ei(t,e){let r=e.stacktrace||e.stack||"",n=Uf(e);try{return t(r,n)}catch{}return[]}var Hf=/Minified React error #\d+;/i;function Uf(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(Hf.test(t.message))return 1}return 0}function Gf(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function es(t,e,r,n){let o=r&&r.syntheticException||void 0,i=Wn(t,e,o,n);return Xe(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),de(i)}function ts(t,e,r="info",n,o){let i=n&&n.syntheticException||void 0,a=Si(t,e,i,o);return a.level=r,n&&n.event_id&&(a.event_id=n.event_id),de(a)}function Wn(t,e,r,n,o){let i;if(jt(e)&&e.error)return hi(t,e.error);if(Sn(e)||Ro(e)){let a=e;if("stack"in e)i=hi(t,e);else{let s=a.name||(Sn(a)?"DOMError":"DOMException"),c=a.message?`${s}: ${a.message}`:s;i=Si(t,c,r,n),Zt(i,c)}return"code"in a&&(i.tags={...i.tags,"DOMException.code":`${a.code}`}),i}return Dr(e)?hi(t,e):Ee(e)||Dt(e)?(i=Ff(t,e,r,o),Xe(i,{synthetic:!0}),i):(i=Si(t,e,r,n),Zt(i,`${e}`,void 0),Xe(i,{synthetic:!0}),i)}function Si(t,e,r,n){let o={message:e};if(n&&r){let i=Ei(t,r);i.length&&(o.exception={values:[{value:e,stacktrace:{frames:i}}]})}return o}function Yf(t,{isUnhandledRejection:e}){let r=ko(t),n=e?"promise rejection":"exception";return jt(t)?`Event \`ErrorEvent\` captured as ${n} with message \`${t.message}\``:Dt(t)?`Event \`${$f(t)}\` (type=${t.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function $f(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function rs(t,{metadata:e,tunnel:r,dsn:n}){let o={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!r&&!!n&&{dsn:Le(n)}},i=Wf(t);return Fe(o,[i])}function Wf(t){return[{type:"user_report"},t]}var Vn=class extends Zr{constructor(e){let r=T.SENTRY_SDK_SOURCE||$o();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${r}:@sentry/browser`,version:Kr}],version:Kr},super(e),e.sendClientReports&&T.document&&T.document.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,r){return es(this._options.stackParser,e,r,this._options.attachStacktrace)}eventFromMessage(e,r="info",n){return ts(this._options.stackParser,e,r,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("SDK not enabled, will not capture user feedback.");return}let r=rs(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(r)}_prepareEvent(e,r,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,r,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("Sending outcomes:",e);let r=ni(e,this._options.tunnel&&Le(this._dsn));this._sendEnvelope(r)}};var Xr;function ns(){if(Xr)return Xr;if(Hr(T.fetch))return Xr=T.fetch.bind(T);let t=T.document,e=T.fetch;if(t&&typeof t.createElement=="function")try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r);let n=r.contentWindow;n&&n.fetch&&(e=n.fetch),t.head.removeChild(r)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return Xr=e.bind(T)}function os(){Xr=void 0}function is(t,e=ns()){let r=0,n=0;function o(i){let a=i.body.length;r+=a,n++;let s={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:r<=6e4&&n<15,...t.fetchOptions};try{return e(t.url,s).then(c=>(r-=a,n--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return os(),r-=a,n--,wt(c)}}return sr(t,o)}var Vf=4;function as(t){function e(r){return new U((n,o)=>{let i=new XMLHttpRequest;i.onerror=o,i.onreadystatechange=()=>{i.readyState===Vf&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(let a in t.headers)Object.prototype.hasOwnProperty.call(t.headers,a)&&i.setRequestHeader(a,t.headers[a]);i.send(r.body)})}return sr(t,e)}var jn="?";var jf=30,qf=40,zf=50;function vi(t,e,r,n){let o={filename:t,function:e,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}var Zf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Kf=/\((\S*)(?::(\d+))(?::(\d+))\)/,Xf=t=>{let e=Zf.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=Kf.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[n,o]=cs(e[1]||jn,e[2]);return vi(o,n,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},Jf=[jf,Xf],Qf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ed=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,td=t=>{let e=Qf.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=ed.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let n=e[3],o=e[1]||jn;return[o,n]=cs(o,n),vi(n,o,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},rd=[zf,td],nd=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,od=t=>{let e=nd.exec(t);return e?vi(e[2],e[1]||jn,+e[3],e[4]?+e[4]:void 0):void 0},id=[qf,od];var ad=[Jf,rd,id],ss=In(...ad),cs=(t,e)=>{let r=t.indexOf("safari-extension")!==-1,n=t.indexOf("safari-web-extension")!==-1;return r||n?[t.indexOf("@")!==-1?t.split("@")[0]:jn,r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Ie=class{static __initStatic(){this.id="GlobalHandlers"}constructor(e){this.name=Ie.id,this._options={onerror:!0,onunhandledrejection:!0,...e},this._installFunc={onerror:sd,onunhandledrejection:cd}}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let r in e){let n=this._installFunc[r];n&&e[r]&&(fd(r),n(),this._installFunc[r]=void 0)}}};Ie.__initStatic();function sd(){H("error",t=>{let[e,r,n]=fs();if(!e.getIntegration(Ie))return;let{msg:o,url:i,line:a,column:s,error:c}=t;if(_i()||c&&c.__sentry_own_request__)return;let l=c===void 0&&oe(o)?ud(o,i,a,s):ls(Wn(r,c||o,void 0,n,!1),i,a,s);l.level="error",us(e,c,l,"onerror")})}function cd(){H("unhandledrejection",t=>{let[e,r,n]=fs();if(!e.getIntegration(Ie))return;let o=t;try{"reason"in t?o=t.reason:"detail"in t&&"reason"in t.detail&&(o=t.detail.reason)}catch{}if(_i()||o&&o.__sentry_own_request__)return!0;let i=qt(o)?ld(o):Wn(r,o,void 0,n,!0);i.level="error",us(e,o,i,"onunhandledrejection")})}function ld(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function ud(t,e,r,n){let o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=jt(t)?t.message:t,a="Error",s=i.match(o);return s&&(a=s[1],i=s[2]),ls({exception:{values:[{type:a,value:i}]}},e,r,n)}function ls(t,e,r,n){let o=t.exception=t.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],l=isNaN(parseInt(n,10))?void 0:n,f=isNaN(parseInt(r,10))?void 0:r,u=oe(e)&&e.length>0?e:Ao();return c.length===0&&c.push({colno:l,filename:u,function:"?",in_app:!0,lineno:f}),t}function fd(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Global Handler attached: ${t}`)}function us(t,e,r,n){Xe(r,{handled:!1,type:n}),t.captureEvent(r,{originalException:e})}function fs(){let t=C(),e=t.getClient(),r=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,r.stackParser,r.attachStacktrace]}var dd=["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"],rt=class{static __initStatic(){this.id="TryCatch"}constructor(e){this.name=rt.id,this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&F(T,"setTimeout",ds),this._options.setInterval&&F(T,"setInterval",ds),this._options.requestAnimationFrame&&F(T,"requestAnimationFrame",pd),this._options.XMLHttpRequest&&"XMLHttpRequest"in T&&F(XMLHttpRequest.prototype,"send",md);let e=this._options.eventTarget;e&&(Array.isArray(e)?e:dd).forEach(gd)}};rt.__initStatic();function ds(t){return function(...e){let r=e[0];return e[0]=Et(r,{mechanism:{data:{function:ae(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function pd(t){return function(e){return t.apply(this,[Et(e,{mechanism:{data:{function:"requestAnimationFrame",handler:ae(t)},handled:!1,type:"instrument"}})])}}function md(t){return function(...e){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&F(r,o,function(i){let a={mechanism:{data:{function:o,handler:ae(i)},handled:!1,type:"instrument"}},s=kt(i);return s&&(a.mechanism.data.handler=ae(s)),Et(i,a)})}),t.apply(this,e)}}function gd(t){let e=T,r=e[t]&&e[t].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(F(r,"addEventListener",function(n){return function(o,i,a){try{typeof i.handleEvent=="function"&&(i.handleEvent=Et(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ae(i),target:t},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[o,Et(i,{mechanism:{data:{function:"addEventListener",handler:ae(i),target:t},handled:!1,type:"instrument"}}),a])}}),F(r,"removeEventListener",function(n){return function(o,i,a){let s=i;try{let c=s&&s.__sentry_wrapped__;c&&n.call(this,o,c,a)}catch{}return n.call(this,o,s,a)}}))}var qn=1024,nt=class{static __initStatic(){this.id="Breadcrumbs"}constructor(e){this.name=nt.id,this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){if(this.options.console&&H("console",Sd),this.options.dom&&H("dom",hd(this.options.dom)),this.options.xhr&&H("xhr",yd),this.options.fetch&&H("fetch",Ed),this.options.history&&H("history",vd),this.options.sentry){let e=C().getClient();e&&e.on&&e.on("beforeSendEvent",_d)}}};nt.__initStatic();function _d(t){C().addBreadcrumb({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:be(t)},{event:t})}function hd(t){function e(r){let n,o=typeof t=="object"?t.serializeAttribute:void 0,i=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;i&&i>qn&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`\`dom.maxStringLength\` cannot exceed ${qn}, but a value of ${i} was configured. Sentry will use ${qn} instead.`),i=qn),typeof o=="string"&&(o=[o]);try{let a=r.event;n=bd(a)?Be(a.target,{keyAttrs:o,maxStringLength:i}):Be(a,{keyAttrs:o,maxStringLength:i})}catch{n="<unknown>"}n.length!==0&&C().addBreadcrumb({category:`ui.${r.name}`,message:n},{event:r.event,name:r.name,global:r.global})}return e}function Sd(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:Vo(t.level),message:yn(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${yn(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;C().addBreadcrumb(e,{input:t.args,level:t.level})}function yd(t){let{startTimestamp:e,endTimestamp:r}=t,n=t.xhr[Je];if(!e||!r||!n)return;let{method:o,url:i,status_code:a,body:s}=n,c={method:o,url:i,status_code:a},l={xhr:t.xhr,input:s,startTimestamp:e,endTimestamp:r};C().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function Ed(t){let{startTimestamp:e,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let n=t.fetchData,o={data:t.error,input:t.args,startTimestamp:e,endTimestamp:r};C().addBreadcrumb({category:"fetch",data:n,level:"error",type:"http"},o)}else{let n={...t.fetchData,status_code:t.response&&t.response.status},o={input:t.args,response:t.response,startTimestamp:e,endTimestamp:r};C().addBreadcrumb({category:"fetch",data:n,type:"http"},o)}}function vd(t){let e=t.from,r=t.to,n=Gr(T.location.href),o=Gr(e),i=Gr(r);o.path||(o=n),n.protocol===i.protocol&&n.host===i.host&&(r=i.relative),n.protocol===o.protocol&&n.host===o.host&&(e=o.relative),C().addBreadcrumb({category:"navigation",data:{from:e,to:r}})}function bd(t){return!!t&&!!t.target}var Cd="cause",Td=5,ot=class{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this.name=ot.id,this._key=e.key||Cd,this._limit=e.limit||Td}setupOnce(){}preprocessEvent(e,r,n){let o=n.getOptions();wr(yi,o.stackParser,o.maxValueLength,this._key,this._limit,e,r)}};ot.__initStatic();var it=class{static __initStatic(){this.id="HttpContext"}constructor(){this.name=it.id}setupOnce(){}preprocessEvent(e){if(!T.navigator&&!T.location&&!T.document)return;let r=e.request&&e.request.url||T.location&&T.location.href,{referrer:n}=T.document||{},{userAgent:o}=T.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...o&&{"User-Agent":o}},a={...e.request,...r&&{url:r},headers:i};e.request=a}};it.__initStatic();var at=class{static __initStatic(){this.id="Dedupe"}constructor(){this.name=at.id}setupOnce(e,r){}processEvent(e){if(e.type)return e;try{if(Rd(e,this._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return this._previousEvent=e}};at.__initStatic();function Rd(t,e){return e?!!(xd(t,e)||Id(t,e)):!1}function xd(t,e){let r=t.message,n=e.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!_s(t,e)||!gs(t,e))}function Id(t,e){let r=ps(e),n=ps(t);return!(!r||!n||r.type!==n.type||r.value!==n.value||!_s(t,e)||!gs(t,e))}function gs(t,e){let r=ms(t),n=ms(e);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){let i=n[o],a=r[o];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function _s(t,e){let r=t.fingerprint,n=e.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function ps(t){return t.exception&&t.exception.values&&t.exception.values[0]}function ms(t){let e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}var Ss=[new Ft.InboundFilters,new Ft.FunctionToString,new rt,new nt,new Ie,new ot,new at,new it];function bi(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=Ss),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),T.SENTRY_RELEASE&&T.SENTRY_RELEASE.id&&(t.release=T.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);let e={...t,stackParser:Bo(t.stackParser||ss),integrations:di(t),transport:t.transport||(Nn()?is:as)};mi(Vn,e),t.autoSessionTracking&&Nd()}function hs(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function Nd(){if(typeof T.document>"u"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let t=C();t.captureSession&&(hs(t),H("history",({from:e,to:r})=>{e===void 0||e===r||hs(C())}))}var Ci={};To(Ci,{Breadcrumbs:()=>nt,Dedupe:()=>at,GlobalHandlers:()=>Ie,HttpContext:()=>it,LinkedErrors:()=>ot,TryCatch:()=>rt});var R=O;function ys(){R&&R.document?R.document.addEventListener("visibilitychange",()=>{let t=xe();if(R.document.hidden&&t){let e="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var cr=(t,e,r)=>{let n,o;return i=>{e.value>=0&&(i||r)&&(o=e.value-(n||0),(o||n===void 0)&&(n=e.value,e.delta=o,t(e)))}};var Es=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Od=()=>{let t=R.performance.timing,e=R.performance.navigation.type,r={entryType:"navigation",startTime:0,type:e==2?"back_forward":e===1?"reload":"navigate"};for(let n in t)n!=="navigationStart"&&n!=="toJSON"&&(r[n]=Math.max(t[n]-t.navigationStart,0));return r},zn=()=>R.__WEB_VITALS_POLYFILL__?R.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Od()):R.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var Zn=()=>{let t=zn();return t&&t.activationStart||0};var lr=(t,e)=>{let r=zn(),n="navigate";return r&&(R.document.prerendering||Zn()>0?n="prerender":n=r.type.replace(/_/g,"-")),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:Es(),navigationType:n}};var vt=(t,e,r)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){let n=new PerformanceObserver(o=>{e(o.getEntries())});return n.observe(Object.assign({type:t,buffered:!0},r||{})),n}}catch{}};var bt=(t,e)=>{let r=n=>{(n.type==="pagehide"||R.document.visibilityState==="hidden")&&(t(n),e&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)};var vs=t=>{let e=lr("CLS",0),r,n=0,o=[],i=s=>{s.forEach(c=>{if(!c.hadRecentInput){let l=o[0],f=o[o.length-1];n&&o.length!==0&&c.startTime-f.startTime<1e3&&c.startTime-l.startTime<5e3?(n+=c.value,o.push(c)):(n=c.value,o=[c]),n>e.value&&(e.value=n,e.entries=o,r&&r())}})},a=vt("layout-shift",i);if(a){r=cr(t,e);let s=()=>{i(a.takeRecords()),r(!0)};return bt(s),s}};var Kn=-1,Ad=()=>R.document.visibilityState==="hidden"&&!R.document.prerendering?0:1/0,Pd=()=>{bt(({timeStamp:t})=>{Kn=t},!0)},ur=()=>(Kn<0&&(Kn=Ad(),Pd()),{get firstHiddenTime(){return Kn}});var bs=t=>{let e=ur(),r=lr("FID"),n,o=s=>{s.startTime<e.firstHiddenTime&&(r.value=s.processingStart-s.startTime,r.entries.push(s),n(!0))},i=s=>{s.forEach(o)},a=vt("first-input",i);n=cr(t,r),a&&bt(()=>{i(a.takeRecords()),a.disconnect()},!0)};var Cs={},Ts=t=>{let e=ur(),r=lr("LCP"),n,o=a=>{let s=a[a.length-1];if(s){let c=Math.max(s.startTime-Zn(),0);c<e.firstHiddenTime&&(r.value=c,r.entries=[s],n())}},i=vt("largest-contentful-paint",o);if(i){n=cr(t,r);let a=()=>{Cs[r.id]||(o(i.takeRecords()),i.disconnect(),Cs[r.id]=!0,n(!0))};return["keydown","click"].forEach(s=>{addEventListener(s,a,{once:!0,capture:!0})}),bt(a,!0),a}};var Jr={},Xn={},Rs,xs,Is;function Ns(t){return Ti("cls",t,Dd,Rs)}function Os(t){return Ti("lcp",t,kd,Is)}function As(t){return Ti("fid",t,Md,xs)}function Qr(t,e){return Ps(t,e),Xn[t]||(wd(t),Xn[t]=!0),Ds(t,e)}function Jn(t,e){let r=Jr[t];if(!(!r||!r.length))for(let n of r)try{n(e)}catch(o){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Error while triggering instrumentation handler.
11
+ `:"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(){let r=this.getStackTop().scope,n=r.getSession();n&&Fa(n),this._sendSessionUpdate(),r.setSession()}startSession(e){let{scope:r,client:n}=this.getStackTop(),{release:o,environment:i=Jt}=n&&n.getOptions()||{},{userAgent:a}=A.navigator||{},s=Ba({release:o,environment:i,user:r.getUser(),...a&&{userAgent:a},...e}),c=r.getSession&&r.getSession();return c&&c.status==="ok"&&tt(c,{status:"exited"}),this.endSession(),r.setSession(s),s}shouldSendDefaultPii(){let e=this.getClient(),r=e&&e.getOptions();return!!(r&&r.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:r}=this.getStackTop(),n=e.getSession();n&&r&&r.captureSession&&r.captureSession(n)}_withClient(e){let{scope:r,client:n}=this.getStackTop();n&&e(n,r)}_callExtensionMethod(e,...r){let o=Bt().__SENTRY__;if(o&&o.extensions&&typeof o.extensions[e]=="function")return o.extensions[e].apply(this,r);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function Bt(){return A.__SENTRY__=A.__SENTRY__||{extensions:{},hub:void 0},A}function Un(t){let e=Bt(),r=qr(e);return li(e,t),r}function b(){let t=Bt();if(t.__SENTRY__&&t.__SENTRY__.acs){let e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return qu(t)}function qu(t=Bt()){return(!zu(t)||qr(t).isOlderThan(Ua))&&li(t,new er),qr(t)}function zu(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function qr(t){return Fr("hub",()=>new er,t)}function li(t,e){if(!t)return!1;let r=t.__SENTRY__=t.__SENTRY__||{};return r.hub=e,!0}function Ie(t){return(t||b()).getScope().getTransaction()}var Ha=!1;function Ga(){Ha||(Ha=!0,U("error",ui),U("unhandledrejection",ui))}function ui(){let t=Ie();if(t){let e="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}ui.tag="sentry_tracingErrorCallback";var tr=class{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},rr=class{constructor(e={}){this.traceId=e.traceId||M(),this.spanId=e.spanId||M().substring(16),this.startTimestamp=e.startTimestamp||Re(),this.tags=e.tags||{},this.data=e.data||{},this.instrumenter=e.instrumenter||"sentry",this.origin=e.origin||"manual",e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.name&&(this.description=e.name),e.status&&(this.status=e.status),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}get name(){return this.description||""}set name(e){this.setName(e)}startChild(e){let r=new rr({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r),r.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&r.transaction){let n=e&&e.op||"< unknown op >",o=r.transaction.name||"< unknown name >",i=r.transaction.spanId,a=`[Tracing] Starting '${n}' span on transaction '${o}' (${i}).`;r.transaction.metadata.spanMetadata[r.spanId]={logMessage:a},p.log(a)}return r}setTag(e,r){return this.tags={...this.tags,[e]:r},this}setData(e,r){return this.data={...this.data,[e]:r},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);let r=Ya(e);return r!=="unknown_error"&&this.setStatus(r),this}setName(e){this.description=e}isSuccess(){return this.status==="ok"}finish(e){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:r}=this.transaction.metadata.spanMetadata[this.spanId];r&&p.log(r.replace("Starting","Finishing"))}this.endTimestamp=typeof e=="number"?e:Re()}toTraceparent(){return Xt(this.traceId,this.spanId,this.sampled)}toContext(){return ie({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return ie({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return ie({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}};function Ya(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){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(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function ht(t,e,r){let n=e.getOptions(),{publicKey:o}=e.getDsn()||{},{segment:i}=r&&r.getUser()||{},a=ie({environment:n.environment||Jt,release:n.release,user_segment:i,public_key:o,trace_id:t});return e.emit&&e.emit("createDsc",a),a}var nr=class extends rr{constructor(e,r){super(e),delete this.description,this._measurements={},this._contexts={},this._hub=r||b(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;let n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,r="custom"){this._name=e,this.metadata.source=r}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new tr(e)),this.spanRecorder.add(this)}setContext(e,r){r===null?delete this._contexts[e]:this._contexts[e]=r}setMeasurement(e,r,n=""){this._measurements[e]={value:r,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){let r=this._finishTransaction(e);if(r)return this._hub.captureEvent(r)}toContext(){let e=super.toContext();return ie({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let e=this._hub||b(),r=e.getClient();if(!r)return{};let n=e.getScope(),o=ht(this.traceId,r,n),i=this.metadata.sampleRate;i!==void 0&&(o.sample_rate=`${i}`);let a=this.metadata.source;return a&&a!=="url"&&(o.transaction=this.name),this.sampled!==void 0&&(o.sampled=String(this.sampled)),o}setHub(e){this._hub=e}_finishTransaction(e){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);let r=this._hub.getClient();if(r&&r.emit&&r.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),r&&r.recordDroppedEvent("sample_rate","transaction");return}let n=this.spanRecorder?this.spanRecorder.spans.filter(s=>s!==this&&s.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((s,c)=>s.endTimestamp&&c.endTimestamp?s.endTimestamp>c.endTimestamp?s:c:s).endTimestamp);let o=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...o,dynamicSamplingContext:this.getDynamicSamplingContext()},...o.source&&{transaction_info:{source:o.source}}};return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),i}};var ir={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Zu="finishReason",or=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],fi=class extends tr{constructor(e,r,n,o){super(o),this._pushActivity=e,this._popActivity=r,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=r=>{e.endTimestamp=typeof r=="number"?r:Re(),this._popActivity(e.spanId)},e.endTimestamp===void 0&&this._pushActivity(e.spanId)),super.add(e)}},zr=class extends nr{constructor(e,r,n=ir.idleTimeout,o=ir.finalTimeout,i=ir.heartbeatInterval,a=!1){super(e,r),this._idleHub=r,this._idleTimeout=n,this._finalTimeout=o,this._heartbeatInterval=i,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=or[4],a&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),r.configureScope(s=>s.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=or[3],this.finish())},this._finalTimeout)}finish(e=Re()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(Zu,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] finishing IdleTransaction",new Date(e*1e3).toISOString(),this.op);for(let r of this._beforeFinishCallbacks)r(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanId===this.spanId)return!0;r.endTimestamp||(r.endTimestamp=e,r.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));let n=r.startTimestamp<e,o=(this._finalTimeout+this._idleTimeout)/1e3,i=r.endTimestamp-this.startTimestamp<o;if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let a=JSON.stringify(r,void 0,2);n?i||p.log("[Tracing] discarding Span since it finished after Transaction final timeout",a):p.log("[Tracing] discarding Span since it happened after Transaction was finished",a)}return n&&i}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] No active IdleTransaction");if(this._onScope){let r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){let r=o=>{this._finished||this._pushActivity(o)},n=o=>{this._finished||this._popActivity(o)};this.spanRecorder=new fi(r,n,this.spanId,e),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:r}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=r===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=or[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=or[1],this.finish(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] popActivity ${e}`),delete this.activities[e],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let r=Re();this._idleTimeoutCanceledPermanently?(this._finishReason=or[5],this.finish(r)):this._restartIdleTimeout(r+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=or[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function ar(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let e=b().getClient(),r=t||e&&e.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}function di(t,e,r){if(!ar(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let n;return typeof e.tracesSampler=="function"?(n=e.tracesSampler(r),t.setMetadata({sampleRate:Number(n)})):r.parentSampled!==void 0?n=r.parentSampled:typeof e.tracesSampleRate<"u"?(n=e.tracesSampleRate,t.setMetadata({sampleRate:Number(n)})):(n=1,t.setMetadata({sampleRate:n})),Ku(n)?n?(t.sampled=Math.random()<n,t.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),t)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),t.sampled=!1,t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function Ku(t){return wr(t)||!(typeof t=="number"||typeof t=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t<0||t>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function Xu(){let e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function Ju(t,e){let r=this.getClient(),n=r&&r.getOptions()||{},o=n.instrumenter||"sentry",i=t.instrumenter||"sentry";o!==i&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${o}\` instrumenter.
12
+ The transaction will not be sampled. Please use the ${o} instrumentation to start transactions.`),t.sampled=!1);let a=new nr(t,this);return a=di(a,n,{parentSampled:t.parentSampled,transactionContext:t,...e}),a.sampled&&a.initSpanRecorder(n._experiments&&n._experiments.maxSpans),r&&r.emit&&r.emit("startTransaction",a),a}function Hn(t,e,r,n,o,i,a){let s=t.getClient(),c=s&&s.getOptions()||{},l=new zr(e,t,r,n,a,o);return l=di(l,c,{parentSampled:e.parentSampled,transactionContext:e,...i}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),s&&s.emit&&s.emit("startTransaction",l),l}function Gn(){let t=Bt();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=Ju),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=Xu),Ga())}function sr(t,e){return b().captureException(t,{captureContext:e})}function Zr(t){b().addBreadcrumb(t)}function Yn(t,e){b().setContext(t,e)}function $n(t){b().withScope(t)}var Qu="7";function ef(t){let e=t.protocol?`${t.protocol}:`:"",r=t.port?`:${t.port}`:"";return`${e}//${t.host}${r}${t.path?`/${t.path}`:""}/api/`}function tf(t){return`${ef(t)}${t.projectId}/envelope/`}function rf(t,e){return wo({sentry_key:t.publicKey,sentry_version:Qu,...e&&{sentry_client:`${e.name}/${e.version}`}})}function $a(t,e={}){let r=typeof e=="string"?e:e.tunnel,n=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return r||`${tf(t)}?${rf(t,n)}`}function nf(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Wa(t,e,r,n){let o=Ln(r),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&e&&{dsn:Fe(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Le(i,[a])}function Va(t,e,r,n){let o=Ln(r),i=t.type&&t.type!=="replay_event"?t.type:"event";nf(t,r&&r.sdk);let a=ni(t,o,n,e);return delete t.sdkProcessingMetadata,Le(a,[[{type:i},t]])}var ja=[];function of(t){let e={};return t.forEach(r=>{let{name:n}=r,o=e[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(e[n]=r)}),Object.keys(e).map(r=>e[r])}function pi(t){let e=t.defaultIntegrations||[],r=t.integrations;e.forEach(a=>{a.isDefaultInstance=!0});let n;Array.isArray(r)?n=[...e,...r]:typeof r=="function"?n=Ur(r(e)):n=e;let o=of(n),i=af(o,a=>a.name==="Debug");if(i!==-1){let[a]=o.splice(i,1);o.push(a)}return o}function qa(t,e){let r={};return e.forEach(n=>{n&&mi(t,n,r)}),r}function mi(t,e,r){if(r[e.name]=e,ja.indexOf(e.name)===-1&&(e.setupOnce(ci,b),ja.push(e.name)),t.on&&typeof e.preprocessEvent=="function"){let n=e.preprocessEvent.bind(e);t.on("preprocessEvent",(o,i)=>n(o,i,t))}if(t.addEventProcessor&&typeof e.processEvent=="function"){let n=e.processEvent.bind(e),o=Object.assign((i,a)=>n(i,a,t),{id:e.name});t.addEventProcessor(o)}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Integration installed: ${e.name}`)}function af(t,e){for(let r=0;r<t.length;r++)if(e(t[r])===!0)return r;return-1}function Za(t,e,r,n,o){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=t,s={...e,event_id:e.event_id||r.event_id||M(),timestamp:e.timestamp||et()},c=r.integrations||t.integrations.map(m=>m.name);sf(s,t),uf(s,c),e.type===void 0&&cf(s,t.stackParser);let l=n;r.captureContext&&(l=ge.clone(l).update(r.captureContext));let f=de(s),u=o&&o.getEventProcessors?o.getEventProcessors():[];if(l){if(l.getAttachments){let m=[...r.attachments||[],...l.getAttachments()];m.length&&(r.attachments=m)}f=l.applyToEvent(s,r,u)}else f=Qt([...u,...jr()],s,r);return f.then(m=>(m&&lf(m),typeof i=="number"&&i>0?ff(m,i,a):m))}function sf(t,e){let{environment:r,release:n,dist:o,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?r:Jt),t.release===void 0&&n!==void 0&&(t.release=n),t.dist===void 0&&o!==void 0&&(t.dist=o),t.message&&(t.message=ke(t.message,i));let a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=ke(a.value,i));let s=t.request;s&&s.url&&(s.url=ke(s.url,i))}var za=new WeakMap;function cf(t,e){let r=A._sentryDebugIds;if(!r)return;let n,o=za.get(e);o?n=o:(n=new Map,za.set(e,n));let i=Object.keys(r).reduce((a,s)=>{let c,l=n.get(s);l?c=l:(c=e(s),n.set(s,c));for(let f=c.length-1;f>=0;f--){let u=c[f];if(u.filename){a[u.filename]=r[s];break}}return a},{});try{t.exception.values.forEach(a=>{a.stacktrace.frames.forEach(s=>{s.filename&&(s.debug_id=i[s.filename])})})}catch{}}function lf(t){let e={};try{t.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?e[o.abs_path]=o.debug_id:o.filename&&(e[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let r=t.debug_meta.images;Object.keys(e).forEach(n=>{r.push({type:"sourcemap",code_file:n,debug_id:e[n]})})}function uf(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function ff(t,e,r){if(!t)return null;let n={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(o=>({...o,...o.data&&{data:Te(o.data,e,r)}}))},...t.user&&{user:Te(t.user,e,r)},...t.contexts&&{contexts:Te(t.contexts,e,r)},...t.extra&&{extra:Te(t.extra,e,r)}};return t.contexts&&t.contexts.trace&&n.contexts&&(n.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(n.contexts.trace.data=Te(t.contexts.trace.data,e,r))),t.spans&&(n.spans=t.spans.map(o=>(o.data&&(o.data=Te(o.data,e,r)),o))),n}var Ka="Not capturing exception because it's already been captured.",Kr=class{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Tn(e.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("No DSN provided, client will not send events."),this._dsn){let r=$a(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}}captureException(e,r,n){if(xn(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(Ka);return}let o=r&&r.event_id;return this._process(this.eventFromException(e,r).then(i=>this._captureEvent(i,r,n)).then(i=>{o=i})),o}captureMessage(e,r,n,o){let i=n&&n.event_id,a=zt(e)?this.eventFromMessage(String(e),r,n):this.eventFromException(e,n);return this._process(a.then(s=>this._captureEvent(s,n,o)).then(s=>{i=s})),i}captureEvent(e,r,n){if(r&&r.originalException&&xn(r.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(Ka);return}let o=r&&r.event_id;return this._process(this._captureEvent(e,r,n).then(i=>{o=i})),o}captureSession(e){typeof e.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),tt(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let r=this._transport;return r?this._isClientDoneProcessing(e).then(n=>r.flush(e).then(o=>n&&o)):de(!0)}close(e){return this.flush(e).then(r=>(this.getOptions().enabled=!1,r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=qa(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){mi(this,e,this._integrations)}sendEvent(e,r={}){this.emit("beforeSendEvent",e,r);let n=Va(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of r.attachments||[])n=ei(n,ri(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));let o=this._sendEnvelope(n);o&&o.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let r=Wa(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}recordDroppedEvent(e,r,n){if(this._options.sendClientReports){let o=`${e}:${r}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Adding outcome: "${o}"`),this._outcomes[o]=this._outcomes[o]+1||1}}on(e,r){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(r)}emit(e,...r){this._hooks[e]&&this._hooks[e].forEach(n=>n(...r))}_updateSessionFromEvent(e,r){let n=!1,o=!1,i=r.exception&&r.exception.values;if(i){o=!0;for(let c of i){let l=c.mechanism;if(l&&l.handled===!1){n=!0;break}}}let a=e.status==="ok";(a&&e.errors===0||a&&n)&&(tt(e,{...n&&{status:"crashed"},errors:e.errors||Number(o||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new H(r=>{let n=0,o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),r(!0)):(n+=o,e&&n>=e&&(clearInterval(i),r(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,r,n){let o=this.getOptions(),i=Object.keys(this._integrations);return!r.integrations&&i.length>0&&(r.integrations=i),this.emit("preprocessEvent",e,r),Za(o,e,r,n,this).then(a=>{if(a===null)return a;let{propagationContext:s}=a.sdkProcessingMetadata||{};if(!(a.contexts&&a.contexts.trace)&&s){let{traceId:l,spanId:f,parentSpanId:u,dsc:m}=s;a.contexts={trace:{trace_id:l,span_id:f,parent_span_id:u},...a.contexts};let h=m||ht(l,this,n);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(e,r={},n){return this._processEvent(e,r,n).then(o=>o.event_id,o=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let i=o;i.logLevel==="log"?p.log(i.message):p.warn(i)}})}_processEvent(e,r,n){let o=this.getOptions(),{sampleRate:i}=o,a=Ja(e),s=Xa(e),c=e.type||"error",l=`before send for type \`${c}\``;if(s&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),kt(new z(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let f=c==="replay_event"?"replay":c;return this._prepareEvent(e,r,n).then(u=>{if(u===null)throw this.recordDroppedEvent("event_processor",f,e),new z("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return u;let h=pf(o,u,r);return df(h,l)}).then(u=>{if(u===null)throw this.recordDroppedEvent("before_send",f,e),new z(`${l} returned \`null\`, will not send event.`,"log");let m=n&&n.getSession();!a&&m&&this._updateSessionFromEvent(m,u);let h=u.transaction_info;if(a&&h&&u.transaction!==e.transaction){let S="custom";u.transaction_info={...h,source:S}}return this.sendEvent(u,r),u}).then(null,u=>{throw u instanceof z?u:(this.captureException(u,{data:{__sentry__:!0},originalException:u}),new z(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
13
+ Reason: ${u}`))})}_process(e){this._numProcessing++,e.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,r=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Error while sending event:",r)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(r=>{let[n,o]=r.split(":");return{reason:n,category:o,quantity:e[r]}})}};function df(t,e){let r=`${e} must return \`null\` or a valid event.`;if(Mt(t))return t.then(n=>{if(!Ee(n)&&n!==null)throw new z(r);return n},n=>{throw new z(`${e} rejected with ${n}`)});if(!Ee(t)&&t!==null)throw new z(r);return t}function pf(t,e,r){let{beforeSend:n,beforeSendTransaction:o}=t;return Xa(e)&&n?n(e,r):Ja(e)&&o?o(e,r):e}function Xa(t){return t.type===void 0}function Ja(t){return t.type==="transaction"}function gi(t,e){e.debug===!0&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?p.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));let r=b();r.getScope().update(e.initialScope);let o=new t(e);r.bindClient(o)}var mf=30;function cr(t,e,r=Vo(t.bufferSize||mf)){let n={},o=a=>r.drain(a);function i(a){let s=[];if(Bn(a,(u,m)=>{let h=Fn(m);if(ii(n,h)){let S=Qa(u,m);t.recordDroppedEvent("ratelimit_backoff",h,S)}else s.push(u)}),s.length===0)return de();let c=Le(a[0],s),l=u=>{Bn(c,(m,h)=>{let S=Qa(m,h);t.recordDroppedEvent(u,Fn(h),S)})},f=()=>e({body:ti(c,t.textEncoder)}).then(u=>(u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),n=ai(n,u),u),u=>{throw l("network_error"),u});return r.add(f).then(u=>u,u=>{if(u instanceof z)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Skipped sending event because buffer is full."),l("queue_overflow"),de();throw u})}return i.__sentry__baseTransport__=!0,{send:i,flush:o}}function Qa(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}var Xr="7.77.0";var Lt={};Ro(Lt,{FunctionToString:()=>St,InboundFilters:()=>yt,LinkedErrors:()=>Ft});var es,St=class{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=St.id}setupOnce(){es=Function.prototype.toString;try{Function.prototype.toString=function(...e){let r=wt(this)||this;return es.apply(r,e)}}catch{}}};St.__initStatic();var gf=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],_f=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],yt=class{static __initStatic(){this.id="InboundFilters"}constructor(e={}){this.name=yt.id,this._options=e}setupOnce(e,r){}processEvent(e,r,n){let o=n.getOptions(),i=hf(this._options,o);return Sf(e,i)?null:e}};yt.__initStatic();function hf(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:gf],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:_f],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function Sf(t,e){return e.ignoreInternal&&Tf(t)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being internal Sentry Error.
14
+ Event: ${Ce(t)}`),!0):yf(t,e.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
15
+ Event: ${Ce(t)}`),!0):Ef(t,e.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
16
+ Event: ${Ce(t)}`),!0):vf(t,e.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`denyUrls\` option.
17
+ Event: ${Ce(t)}.
18
+ Url: ${Wn(t)}`),!0):Cf(t,e.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to not being matched by \`allowUrls\` option.
19
+ Event: ${Ce(t)}.
20
+ Url: ${Wn(t)}`),!0)}function yf(t,e){return t.type||!e||!e.length?!1:bf(t).some(r=>_t(r,e))}function Ef(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let r=t.transaction;return r?_t(r,e):!1}function vf(t,e){if(!e||!e.length)return!1;let r=Wn(t);return r?_t(r,e):!1}function Cf(t,e){if(!e||!e.length)return!0;let r=Wn(t);return r?_t(r,e):!0}function bf(t){let e=[];t.message&&e.push(t.message);let r;try{r=t.exception.values[t.exception.values.length-1]}catch{}return r&&r.value&&(e.push(r.value),r.type&&e.push(`${r.type}: ${r.value}`)),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&e.length===0&&p.error(`Could not extract message for event ${Ce(t)}`),e}function Tf(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Rf(t=[]){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Wn(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Rf(e):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Cannot extract url for event ${Ce(t)}`),null}}var If="cause",xf=5,Ft=class{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this._key=e.key||If,this._limit=e.limit||xf,this.name=Ft.id}setupOnce(){}preprocessEvent(e,r,n){let o=n.getOptions();Br(si,o.stackParser,o.maxValueLength,this._key,this._limit,e,r)}};Ft.__initStatic();var T=A,_i=0;function hi(){return _i>0}function Gf(){_i++,setTimeout(()=>{_i--})}function Et(t,e={},r){if(typeof t!="function")return t;try{let o=t.__sentry_wrapped__;if(o)return o;if(wt(t))return t}catch{return t}let n=function(){let o=Array.prototype.slice.call(arguments);try{r&&typeof r=="function"&&r.apply(this,arguments);let i=o.map(a=>Et(a,e));return t.apply(this,i)}catch(i){throw Gf(),$n(a=>{a.addEventProcessor(s=>(e.mechanism&&(Kt(s,void 0,void 0),Xe(s,e.mechanism)),s.extra={...s.extra,arguments:o},s)),sr(i)}),i}};try{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}catch{}Rn(n,t),Ke(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return t.name}})}catch{}return n}function Ei(t,e){let r=vi(t,e),n={type:e&&e.name,value:Vf(e)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Yf(t,e,r,n){let i=b().getClient(),a=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:Dt(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:jf(e,{isUnhandledRejection:n})}]},extra:{__serialized__:kn(e,a)}};if(r){let c=vi(t,r);c.length&&(s.exception.values[0].stacktrace={frames:c})}return s}function Si(t,e){return{exception:{values:[Ei(t,e)]}}}function vi(t,e){let r=e.stacktrace||e.stack||"",n=Wf(e);try{return t(r,n)}catch{}return[]}var $f=/Minified React error #\d+;/i;function Wf(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if($f.test(t.message))return 1}return 0}function Vf(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function ts(t,e,r,n){let o=r&&r.syntheticException||void 0,i=Vn(t,e,o,n);return Xe(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),de(i)}function rs(t,e,r="info",n,o){let i=n&&n.syntheticException||void 0,a=yi(t,e,i,o);return a.level=r,n&&n.event_id&&(a.event_id=n.event_id),de(a)}function Vn(t,e,r,n,o){let i;if(qt(e)&&e.error)return Si(t,e.error);if(yn(e)||Io(e)){let a=e;if("stack"in e)i=Si(t,e);else{let s=a.name||(yn(a)?"DOMError":"DOMException"),c=a.message?`${s}: ${a.message}`:s;i=yi(t,c,r,n),Kt(i,c)}return"code"in a&&(i.tags={...i.tags,"DOMException.code":`${a.code}`}),i}return Mr(e)?Si(t,e):Ee(e)||Dt(e)?(i=Yf(t,e,r,o),Xe(i,{synthetic:!0}),i):(i=yi(t,e,r,n),Kt(i,`${e}`,void 0),Xe(i,{synthetic:!0}),i)}function yi(t,e,r,n){let o={message:e};if(n&&r){let i=vi(t,r);i.length&&(o.exception={values:[{value:e,stacktrace:{frames:i}}]})}return o}function jf(t,{isUnhandledRejection:e}){let r=ko(t),n=e?"promise rejection":"exception";return qt(t)?`Event \`ErrorEvent\` captured as ${n} with message \`${t.message}\``:Dt(t)?`Event \`${qf(t)}\` (type=${t.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function qf(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function ns(t,{metadata:e,tunnel:r,dsn:n}){let o={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!r&&!!n&&{dsn:Fe(n)}},i=zf(t);return Le(o,[i])}function zf(t){return[{type:"user_report"},t]}var jn=class extends Kr{constructor(e){let r=T.SENTRY_SDK_SOURCE||Wo();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${r}:@sentry/browser`,version:Xr}],version:Xr},super(e),e.sendClientReports&&T.document&&T.document.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,r){return ts(this._options.stackParser,e,r,this._options.attachStacktrace)}eventFromMessage(e,r="info",n){return rs(this._options.stackParser,e,r,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("SDK not enabled, will not capture user feedback.");return}let r=ns(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(r)}_prepareEvent(e,r,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,r,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("Sending outcomes:",e);let r=oi(e,this._options.tunnel&&Fe(this._dsn));this._sendEnvelope(r)}};var Jr;function os(){if(Jr)return Jr;if(Hr(T.fetch))return Jr=T.fetch.bind(T);let t=T.document,e=T.fetch;if(t&&typeof t.createElement=="function")try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r);let n=r.contentWindow;n&&n.fetch&&(e=n.fetch),t.head.removeChild(r)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return Jr=e.bind(T)}function is(){Jr=void 0}function as(t,e=os()){let r=0,n=0;function o(i){let a=i.body.length;r+=a,n++;let s={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:r<=6e4&&n<15,...t.fetchOptions};try{return e(t.url,s).then(c=>(r-=a,n--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return is(),r-=a,n--,kt(c)}}return cr(t,o)}var Zf=4;function ss(t){function e(r){return new H((n,o)=>{let i=new XMLHttpRequest;i.onerror=o,i.onreadystatechange=()=>{i.readyState===Zf&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(let a in t.headers)Object.prototype.hasOwnProperty.call(t.headers,a)&&i.setRequestHeader(a,t.headers[a]);i.send(r.body)})}return cr(t,e)}var qn="?";var Kf=30,Xf=40,Jf=50;function Ci(t,e,r,n){let o={filename:t,function:e,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}var Qf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ed=/\((\S*)(?::(\d+))(?::(\d+))\)/,td=t=>{let e=Qf.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=ed.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[n,o]=ls(e[1]||qn,e[2]);return Ci(o,n,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},rd=[Kf,td],nd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,od=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,id=t=>{let e=nd.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=od.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let n=e[3],o=e[1]||qn;return[o,n]=ls(o,n),Ci(n,o,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},ad=[Jf,id],sd=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,cd=t=>{let e=sd.exec(t);return e?Ci(e[2],e[1]||qn,+e[3],e[4]?+e[4]:void 0):void 0},ld=[Xf,cd];var ud=[rd,ad,ld],cs=Nn(...ud),ls=(t,e)=>{let r=t.indexOf("safari-extension")!==-1,n=t.indexOf("safari-web-extension")!==-1;return r||n?[t.indexOf("@")!==-1?t.split("@")[0]:qn,r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var xe=class{static __initStatic(){this.id="GlobalHandlers"}constructor(e){this.name=xe.id,this._options={onerror:!0,onunhandledrejection:!0,...e},this._installFunc={onerror:fd,onunhandledrejection:dd}}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let r in e){let n=this._installFunc[r];n&&e[r]&&(gd(r),n(),this._installFunc[r]=void 0)}}};xe.__initStatic();function fd(){U("error",t=>{let[e,r,n]=ds();if(!e.getIntegration(xe))return;let{msg:o,url:i,line:a,column:s,error:c}=t;if(hi()||c&&c.__sentry_own_request__)return;let l=c===void 0&&oe(o)?md(o,i,a,s):us(Vn(r,c||o,void 0,n,!1),i,a,s);l.level="error",fs(e,c,l,"onerror")})}function dd(){U("unhandledrejection",t=>{let[e,r,n]=ds();if(!e.getIntegration(xe))return;let o=t;try{"reason"in t?o=t.reason:"detail"in t&&"reason"in t.detail&&(o=t.detail.reason)}catch{}if(hi()||o&&o.__sentry_own_request__)return!0;let i=zt(o)?pd(o):Vn(r,o,void 0,n,!0);i.level="error",fs(e,o,i,"onunhandledrejection")})}function pd(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function md(t,e,r,n){let o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=qt(t)?t.message:t,a="Error",s=i.match(o);return s&&(a=s[1],i=s[2]),us({exception:{values:[{type:a,value:i}]}},e,r,n)}function us(t,e,r,n){let o=t.exception=t.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],l=isNaN(parseInt(n,10))?void 0:n,f=isNaN(parseInt(r,10))?void 0:r,u=oe(e)&&e.length>0?e:Po();return c.length===0&&c.push({colno:l,filename:u,function:"?",in_app:!0,lineno:f}),t}function gd(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Global Handler attached: ${t}`)}function fs(t,e,r,n){Xe(r,{handled:!1,type:n}),t.captureEvent(r,{originalException:e})}function ds(){let t=b(),e=t.getClient(),r=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,r.stackParser,r.attachStacktrace]}var _d=["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"],rt=class{static __initStatic(){this.id="TryCatch"}constructor(e){this.name=rt.id,this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&L(T,"setTimeout",ps),this._options.setInterval&&L(T,"setInterval",ps),this._options.requestAnimationFrame&&L(T,"requestAnimationFrame",hd),this._options.XMLHttpRequest&&"XMLHttpRequest"in T&&L(XMLHttpRequest.prototype,"send",Sd);let e=this._options.eventTarget;e&&(Array.isArray(e)?e:_d).forEach(yd)}};rt.__initStatic();function ps(t){return function(...e){let r=e[0];return e[0]=Et(r,{mechanism:{data:{function:ae(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function hd(t){return function(e){return t.apply(this,[Et(e,{mechanism:{data:{function:"requestAnimationFrame",handler:ae(t)},handled:!1,type:"instrument"}})])}}function Sd(t){return function(...e){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&L(r,o,function(i){let a={mechanism:{data:{function:o,handler:ae(i)},handled:!1,type:"instrument"}},s=wt(i);return s&&(a.mechanism.data.handler=ae(s)),Et(i,a)})}),t.apply(this,e)}}function yd(t){let e=T,r=e[t]&&e[t].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(L(r,"addEventListener",function(n){return function(o,i,a){try{typeof i.handleEvent=="function"&&(i.handleEvent=Et(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ae(i),target:t},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[o,Et(i,{mechanism:{data:{function:"addEventListener",handler:ae(i),target:t},handled:!1,type:"instrument"}}),a])}}),L(r,"removeEventListener",function(n){return function(o,i,a){let s=i;try{let c=s&&s.__sentry_wrapped__;c&&n.call(this,o,c,a)}catch{}return n.call(this,o,s,a)}}))}var zn=1024,nt=class{static __initStatic(){this.id="Breadcrumbs"}constructor(e){this.name=nt.id,this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){if(this.options.console&&U("console",Cd),this.options.dom&&U("dom",vd(this.options.dom)),this.options.xhr&&U("xhr",bd),this.options.fetch&&U("fetch",Td),this.options.history&&U("history",Rd),this.options.sentry){let e=b().getClient();e&&e.on&&e.on("beforeSendEvent",Ed)}}};nt.__initStatic();function Ed(t){b().addBreadcrumb({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Ce(t)},{event:t})}function vd(t){function e(r){let n,o=typeof t=="object"?t.serializeAttribute:void 0,i=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;i&&i>zn&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`\`dom.maxStringLength\` cannot exceed ${zn}, but a value of ${i} was configured. Sentry will use ${zn} instead.`),i=zn),typeof o=="string"&&(o=[o]);try{let a=r.event;n=Id(a)?Be(a.target,{keyAttrs:o,maxStringLength:i}):Be(a,{keyAttrs:o,maxStringLength:i})}catch{n="<unknown>"}n.length!==0&&b().addBreadcrumb({category:`ui.${r.name}`,message:n},{event:r.event,name:r.name,global:r.global})}return e}function Cd(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:jo(t.level),message:En(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${En(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;b().addBreadcrumb(e,{input:t.args,level:t.level})}function bd(t){let{startTimestamp:e,endTimestamp:r}=t,n=t.xhr[Je];if(!e||!r||!n)return;let{method:o,url:i,status_code:a,body:s}=n,c={method:o,url:i,status_code:a},l={xhr:t.xhr,input:s,startTimestamp:e,endTimestamp:r};b().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function Td(t){let{startTimestamp:e,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let n=t.fetchData,o={data:t.error,input:t.args,startTimestamp:e,endTimestamp:r};b().addBreadcrumb({category:"fetch",data:n,level:"error",type:"http"},o)}else{let n={...t.fetchData,status_code:t.response&&t.response.status},o={input:t.args,response:t.response,startTimestamp:e,endTimestamp:r};b().addBreadcrumb({category:"fetch",data:n,type:"http"},o)}}function Rd(t){let e=t.from,r=t.to,n=Yr(T.location.href),o=Yr(e),i=Yr(r);o.path||(o=n),n.protocol===i.protocol&&n.host===i.host&&(r=i.relative),n.protocol===o.protocol&&n.host===o.host&&(e=o.relative),b().addBreadcrumb({category:"navigation",data:{from:e,to:r}})}function Id(t){return!!t&&!!t.target}var xd="cause",Nd=5,ot=class{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this.name=ot.id,this._key=e.key||xd,this._limit=e.limit||Nd}setupOnce(){}preprocessEvent(e,r,n){let o=n.getOptions();Br(Ei,o.stackParser,o.maxValueLength,this._key,this._limit,e,r)}};ot.__initStatic();var it=class{static __initStatic(){this.id="HttpContext"}constructor(){this.name=it.id}setupOnce(){}preprocessEvent(e){if(!T.navigator&&!T.location&&!T.document)return;let r=e.request&&e.request.url||T.location&&T.location.href,{referrer:n}=T.document||{},{userAgent:o}=T.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...o&&{"User-Agent":o}},a={...e.request,...r&&{url:r},headers:i};e.request=a}};it.__initStatic();var at=class{static __initStatic(){this.id="Dedupe"}constructor(){this.name=at.id}setupOnce(e,r){}processEvent(e){if(e.type)return e;try{if(Od(e,this._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return this._previousEvent=e}};at.__initStatic();function Od(t,e){return e?!!(Ad(t,e)||Pd(t,e)):!1}function Ad(t,e){let r=t.message,n=e.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!hs(t,e)||!_s(t,e))}function Pd(t,e){let r=ms(e),n=ms(t);return!(!r||!n||r.type!==n.type||r.value!==n.value||!hs(t,e)||!_s(t,e))}function _s(t,e){let r=gs(t),n=gs(e);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){let i=n[o],a=r[o];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function hs(t,e){let r=t.fingerprint,n=e.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function ms(t){return t.exception&&t.exception.values&&t.exception.values[0]}function gs(t){let e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}var ys=[new Lt.InboundFilters,new Lt.FunctionToString,new rt,new nt,new xe,new ot,new at,new it];function bi(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=ys),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),T.SENTRY_RELEASE&&T.SENTRY_RELEASE.id&&(t.release=T.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);let e={...t,stackParser:Fo(t.stackParser||cs),integrations:pi(t),transport:t.transport||(On()?as:ss)};gi(jn,e),t.autoSessionTracking&&Dd()}function Ss(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function Dd(){if(typeof T.document>"u"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let t=b();t.captureSession&&(Ss(t),U("history",({from:e,to:r})=>{e===void 0||e===r||Ss(b())}))}var Ti={};Ro(Ti,{Breadcrumbs:()=>nt,Dedupe:()=>at,GlobalHandlers:()=>xe,HttpContext:()=>it,LinkedErrors:()=>ot,TryCatch:()=>rt});var R=A;function Es(){R&&R.document?R.document.addEventListener("visibilitychange",()=>{let t=Ie();if(R.document.hidden&&t){let e="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var lr=(t,e,r)=>{let n,o;return i=>{e.value>=0&&(i||r)&&(o=e.value-(n||0),(o||n===void 0)&&(n=e.value,e.delta=o,t(e)))}};var vs=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Md=()=>{let t=R.performance.timing,e=R.performance.navigation.type,r={entryType:"navigation",startTime:0,type:e==2?"back_forward":e===1?"reload":"navigate"};for(let n in t)n!=="navigationStart"&&n!=="toJSON"&&(r[n]=Math.max(t[n]-t.navigationStart,0));return r},Zn=()=>R.__WEB_VITALS_POLYFILL__?R.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Md()):R.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var Kn=()=>{let t=Zn();return t&&t.activationStart||0};var ur=(t,e)=>{let r=Zn(),n="navigate";return r&&(R.document.prerendering||Kn()>0?n="prerender":n=r.type.replace(/_/g,"-")),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:vs(),navigationType:n}};var vt=(t,e,r)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){let n=new PerformanceObserver(o=>{e(o.getEntries())});return n.observe(Object.assign({type:t,buffered:!0},r||{})),n}}catch{}};var Ct=(t,e)=>{let r=n=>{(n.type==="pagehide"||R.document.visibilityState==="hidden")&&(t(n),e&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)};var Cs=t=>{let e=ur("CLS",0),r,n=0,o=[],i=s=>{s.forEach(c=>{if(!c.hadRecentInput){let l=o[0],f=o[o.length-1];n&&o.length!==0&&c.startTime-f.startTime<1e3&&c.startTime-l.startTime<5e3?(n+=c.value,o.push(c)):(n=c.value,o=[c]),n>e.value&&(e.value=n,e.entries=o,r&&r())}})},a=vt("layout-shift",i);if(a){r=lr(t,e);let s=()=>{i(a.takeRecords()),r(!0)};return Ct(s),s}};var Xn=-1,wd=()=>R.document.visibilityState==="hidden"&&!R.document.prerendering?0:1/0,kd=()=>{Ct(({timeStamp:t})=>{Xn=t},!0)},fr=()=>(Xn<0&&(Xn=wd(),kd()),{get firstHiddenTime(){return Xn}});var bs=t=>{let e=fr(),r=ur("FID"),n,o=s=>{s.startTime<e.firstHiddenTime&&(r.value=s.processingStart-s.startTime,r.entries.push(s),n(!0))},i=s=>{s.forEach(o)},a=vt("first-input",i);n=lr(t,r),a&&Ct(()=>{i(a.takeRecords()),a.disconnect()},!0)};var Ts={},Rs=t=>{let e=fr(),r=ur("LCP"),n,o=a=>{let s=a[a.length-1];if(s){let c=Math.max(s.startTime-Kn(),0);c<e.firstHiddenTime&&(r.value=c,r.entries=[s],n())}},i=vt("largest-contentful-paint",o);if(i){n=lr(t,r);let a=()=>{Ts[r.id]||(o(i.takeRecords()),i.disconnect(),Ts[r.id]=!0,n(!0))};return["keydown","click"].forEach(s=>{addEventListener(s,a,{once:!0,capture:!0})}),Ct(a,!0),a}};var Qr={},Jn={},Is,xs,Ns;function Os(t){return Ri("cls",t,Bd,Is)}function As(t){return Ri("lcp",t,Ld,Ns)}function Ps(t){return Ri("fid",t,Fd,xs)}function en(t,e){return Ds(t,e),Jn[t]||(Ud(t),Jn[t]=!0),Ms(t,e)}function Qn(t,e){let r=Qr[t];if(!(!r||!r.length))for(let n of r)try{n(e)}catch(o){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Error while triggering instrumentation handler.
21
21
  Type: ${t}
22
22
  Name: ${ae(n)}
23
- Error:`,o)}}function Dd(){vs(t=>{Jn("cls",{metric:t}),Rs=t})}function Md(){bs(t=>{Jn("fid",{metric:t}),xs=t})}function kd(){Ts(t=>{Jn("lcp",{metric:t}),Is=t})}function Ti(t,e,r,n){return Ps(t,e),Xn[t]||(r(),Xn[t]=!0),n&&e({metric:n}),Ds(t,e)}function wd(t){let e={};t==="event"&&(e.durationThreshold=0),vt(t,r=>{Jn(t,{entries:r})},e)}function Ps(t,e){Jr[t]=Jr[t]||[],Jr[t].push(e)}function Ds(t,e){return()=>{let r=Jr[t];if(!r)return;let n=r.indexOf(e);n!==-1&&r.splice(n,1)}}function Qn(t){return typeof t=="number"&&isFinite(t)}function Ht(t,{startTimestamp:e,...r}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...r})}function $(t){return t/1e3}function ks(){return R&&R.addEventListener&&R.performance}var Ms=0,k={},He,en;function ws(){let t=ks();if(t&&se){t.mark&&R.performance.mark("sentry-tracing-init");let e=Fd(),r=Bd(),n=Ld();return()=>{e(),r(),n()}}return()=>{}}function Bs(){Qr("longtask",({entries:t})=>{for(let e of t){let r=xe();if(!r)return;let n=$(se+e.startTime),o=$(e.duration);r.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+o})}})}function Ls(){Qr("event",({entries:t})=>{for(let e of t){let r=xe();if(!r)return;if(e.name==="click"){let n=$(se+e.startTime),o=$(e.duration);r.startChild({description:Be(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+o})}}})}function Bd(){return Ns(({metric:t})=>{let e=t.entries.pop();e&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding CLS"),k.cls={value:t.value,unit:""},en=e)})}function Ld(){return Os(({metric:t})=>{let e=t.entries.pop();e&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding LCP"),k.lcp={value:t.value,unit:"millisecond"},He=e)})}function Fd(){return As(({metric:t})=>{let e=t.entries.pop();if(!e)return;let r=$(se),n=$(e.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FID"),k.fid={value:t.value,unit:"millisecond"},k["mark.fid"]={value:r+n,unit:"second"}})}function Fs(t){let e=ks();if(!e||!R.performance.getEntries||!se)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Adding & adjusting spans using Performance API");let r=$(se),n=e.getEntries(),o,i;if(n.slice(Ms).forEach(a=>{let s=$(a.startTime),c=$(a.duration);if(!(t.op==="navigation"&&r+s<t.startTimestamp))switch(a.entryType){case"navigation":{Ud(t,a,r),o=r+$(a.responseStart),i=r+$(a.requestStart);break}case"mark":case"paint":case"measure":{Hd(t,a,s,c,r);let l=ur(),f=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&f&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FP"),k.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&f&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FCP"),k.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{let l=a.name.replace(R.location.origin,"");Yd(t,a,l,s,c,r);break}}}),Ms=Math.max(n.length-1,0),$d(t),t.op==="pageload"){typeof o=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding TTFB"),k.ttfb={value:(o-t.startTimestamp)*1e3,unit:"millisecond"},typeof i=="number"&&i<=o&&(k["ttfb.requestTime"]={value:(o-i)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(s=>{if(!k[s]||r>=t.startTimestamp)return;let c=k[s].value,l=r+$(c),f=Math.abs((l-t.startTimestamp)*1e3),u=f-c;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Measurements] Normalized ${s} from ${c} to ${f} (${u})`),k[s].value=f});let a=k["mark.fid"];a&&k.fid&&(Ht(t,{description:"first input delay",endTimestamp:a.value+$(k.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:a.value}),delete k["mark.fid"]),"fcp"in k||delete k.cls,Object.keys(k).forEach(s=>{t.setMeasurement(s,k[s].value,k[s].unit)}),Wd(t)}He=void 0,en=void 0,k={}}function Hd(t,e,r,n,o){let i=o+r,a=i+n;return Ht(t,{description:e.name,endTimestamp:a,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function Ud(t,e,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{eo(t,e,n,r)}),eo(t,e,"secureConnection",r,"TLS/SSL","connectEnd"),eo(t,e,"fetch",r,"cache","domainLookupStart"),eo(t,e,"domainLookup",r,"DNS"),Gd(t,e,r)}function eo(t,e,r,n,o,i){let a=i?e[i]:e[`${r}End`],s=e[`${r}Start`];!s||!a||Ht(t,{op:"browser",origin:"auto.browser.browser.metrics",description:o||r,startTimestamp:n+$(s),endTimestamp:n+$(a)})}function Gd(t,e,r){Ht(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:r+$(e.requestStart),endTimestamp:r+$(e.responseEnd)}),Ht(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:r+$(e.responseStart),endTimestamp:r+$(e.responseEnd)})}function Yd(t,e,r,n,o,i){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;let a={};"transferSize"in e&&(a["http.response_transfer_size"]=e.transferSize),"encodedBodySize"in e&&(a["http.response_content_length"]=e.encodedBodySize),"decodedBodySize"in e&&(a["http.decoded_response_content_length"]=e.decodedBodySize),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);let s=i+n,c=s+o;Ht(t,{description:r,endTimestamp:c,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:s,data:a})}function $d(t){let e=R.navigator;if(!e)return;let r=e.connection;r&&(r.effectiveType&&t.setTag("effectiveConnectionType",r.effectiveType),r.type&&t.setTag("connectionType",r.type),Qn(r.rtt)&&(k["connection.rtt"]={value:r.rtt,unit:"millisecond"})),Qn(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),Qn(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}function Wd(t){He&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding LCP Data"),He.element&&t.setTag("lcp.element",Be(He.element)),He.id&&t.setTag("lcp.id",He.id),He.url&&t.setTag("lcp.url",He.url.trim().slice(0,200)),t.setTag("lcp.size",He.size)),en&&en.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding CLS Data"),en.sources.forEach((e,r)=>t.setTag(`cls.source.${r+1}`,Be(e.node))))}var Ri=["localhost",/^\/(?!\/)/],tn={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Ri,tracePropagationTargets:Ri};function xi(t){let{traceFetch:e,traceXHR:r,tracePropagationTargets:n,tracingOrigins:o,shouldCreateSpanForRequest:i,enableHTTPTimings:a}={traceFetch:tn.traceFetch,traceXHR:tn.traceXHR,...t},s=typeof i=="function"?i:f=>!0,c=f=>zd(f,n||o),l={};e&&H("fetch",f=>{let u=Zd(f,s,c,l);a&&u&&Hs(u)}),r&&H("xhr",f=>{let u=Xd(f,s,c,l);a&&u&&Hs(u)})}function Vd(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Hs(t){let e=t.data.url;if(!e)return;let r=Qr("resource",({entries:n})=>{n.forEach(o=>{Vd(o)&&o.name.endsWith(e)&&(qd(o).forEach(a=>t.setData(...a)),setTimeout(r))})})}function jd(t){let e="unknown",r="unknown",n="";for(let o of t){if(o==="/"){[e,r]=t.split("/");break}if(!isNaN(Number(o))){e=n==="h"?"http":n,r=t.split(n)[1];break}n+=o}return n===t&&(e=n),{name:e,version:r}}function Ue(t=0){return((se||performance.timeOrigin)+t)/1e3}function qd(t){let{name:e,version:r}=jd(t.nextHopProtocol),n=[];return n.push(["network.protocol.version",r],["network.protocol.name",e]),se?[...n,["http.request.redirect_start",Ue(t.redirectStart)],["http.request.fetch_start",Ue(t.fetchStart)],["http.request.domain_lookup_start",Ue(t.domainLookupStart)],["http.request.domain_lookup_end",Ue(t.domainLookupEnd)],["http.request.connect_start",Ue(t.connectStart)],["http.request.secure_connection_start",Ue(t.secureConnectionStart)],["http.request.connection_end",Ue(t.connectEnd)],["http.request.request_start",Ue(t.requestStart)],["http.request.response_start",Ue(t.responseStart)],["http.request.response_end",Ue(t.responseEnd)]]:n}function zd(t,e){return _t(t,e||Ri)}function Zd(t,e,r,n){if(!ir()||!t.fetchData)return;let o=e(t.fetchData.url);if(t.endTimestamp&&o){let m=t.fetchData.__span;if(!m)return;let h=n[m];if(h){if(t.response){h.setHttpStatus(t.response.status);let S=t.response&&t.response.headers&&t.response.headers.get("content-length"),y=parseInt(S);y>0&&h.setData("http.response_content_length",y)}else t.error&&h.setStatus("internal_error");h.finish(),delete n[m]}return}let i=C(),a=i.getScope(),s=i.getClient(),c=a.getSpan(),{method:l,url:f}=t.fetchData,u=o&&c?c.startChild({data:{url:f,type:"fetch","http.method":l},description:`${l} ${f}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(u&&(t.fetchData.__span=u.spanId,n[u.spanId]=u),r(t.fetchData.url)&&s){let m=t.args[0];t.args[1]=t.args[1]||{};let h=t.args[1];h.headers=Kd(m,s,a,h,u)}return u}function Kd(t,e,r,n,o){let i=o||r.getSpan(),a=i&&i.transaction,{traceId:s,sampled:c,dsc:l}=r.getPropagationContext(),f=i?i.toTraceparent():Kt(s,void 0,c),u=a?a.getDynamicSamplingContext():l||ht(s,e,r),m=Wr(u),h=typeof Request<"u"&&fe(t,Request)?t.headers:n.headers;if(h)if(typeof Headers<"u"&&fe(h,Headers)){let S=new Headers(h);return S.append("sentry-trace",f),m&&S.append($r,m),S}else if(Array.isArray(h)){let S=[...h,["sentry-trace",f]];return m&&S.push([$r,m]),S}else{let S="baggage"in h?h.baggage:void 0,y=[];return Array.isArray(S)?y.push(...S):S&&y.push(S),m&&y.push(m),{...h,"sentry-trace":f,baggage:y.length>0?y.join(","):void 0}}else return{"sentry-trace":f,baggage:m}}function Xd(t,e,r,n){let o=t.xhr,i=o&&o[Je];if(!ir()||o&&o.__sentry_own_request__||!o||!i)return;let a=e(i.url);if(t.endTimestamp&&a){let u=o.__sentry_xhr_span_id__;if(!u)return;let m=n[u];m&&(m.setHttpStatus(i.status_code),m.finish(),delete n[u]);return}let s=C(),c=s.getScope(),l=c.getSpan(),f=a&&l?l.startChild({data:{...i.data,type:"xhr","http.method":i.method,url:i.url},description:`${i.method} ${i.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(f&&(o.__sentry_xhr_span_id__=f.spanId,n[o.__sentry_xhr_span_id__]=f),o.setRequestHeader&&r(i.url))if(f){let u=f&&f.transaction,m=u&&u.getDynamicSamplingContext(),h=Wr(m);Us(o,f.toTraceparent(),h)}else{let u=s.getClient(),{traceId:m,sampled:h,dsc:S}=c.getPropagationContext(),y=Kt(m,void 0,h),M=S||(u?ht(m,u,c):void 0),N=Wr(M);Us(o,y,N)}return f}function Us(t,e,r){try{t.setRequestHeader("sentry-trace",e),r&&t.setRequestHeader($r,r)}catch{}}function Gs(t,e=!0,r=!0){if(!R||!R.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not initialize routing instrumentation due to invalid location");return}let n=R.location.href,o;e&&(o=t({name:R.location.pathname,startTimestamp:se?se/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),r&&H("history",({to:i,from:a})=>{if(a===void 0&&n&&n.indexOf(i)!==-1){n=void 0;return}a!==i&&(n=void 0,o&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Finishing current transaction with op: ${o.op}`),o.finish()),o=t({name:R.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}var $s="BrowserTracing",Jd={...or,markBackgroundTransactions:!0,routingInstrumentation:Gs,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...tn},fr=class{constructor(e){this.name=$s,this._hasSetTracePropagationTargets=!1,Un(),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...Jd,...e},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=ws(),this.options.enableLongTask&&Bs(),this.options._experiments.enableInteractions&&Ls()}setupOnce(e,r){this._getCurrentHub=r;let o=r().getClient(),i=o&&o.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:s,startTransactionOnPageLoad:c,markBackgroundTransactions:l,traceFetch:f,traceXHR:u,shouldCreateSpanForRequest:m,enableHTTPTimings:h,_experiments:S}=this.options,y=i&&i.tracePropagationTargets,M=y||this.options.tracePropagationTargets;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&y&&p.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."),a(N=>{let b=this._createRouteTransaction(N);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(b,N,r),b},c,s),l&&ys(),S.enableInteractions&&this._registerInteractionListener(),xi({traceFetch:f,traceXHR:u,tracePropagationTargets:M,shouldCreateSpanForRequest:m,enableHTTPTimings:h})}_createRouteTransaction(e){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}let r=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:o,finalTimeout:i,heartbeatInterval:a}=this.options,s=e.op==="pageload",c=s?Ys("sentry-trace"):"",l=s?Ys("baggage"):"",{traceparentData:f,dynamicSamplingContext:u,propagationContext:m}=Xo(c,l),h={...e,...f,metadata:{...e.metadata,dynamicSamplingContext:f&&!u?{}:u},trimEnd:!0},S=typeof n=="function"?n(h):h,y=S===void 0?{...h,sampled:!1}:S;y.metadata=y.name!==h.name?{...y.metadata,source:"custom"}:y.metadata,this._latestRouteName=y.name,this._latestRouteSource=y.metadata&&y.metadata.source,y.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Will not send ${y.op} transaction because of beforeNavigate.`),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Starting ${y.op} transaction on scope`);let{location:M}=R,N=Hn(r,y,o,i,!0,{location:M},a),b=r.getScope();return s&&f?b.setPropagationContext(m):b.setPropagationContext({traceId:N.traceId,spanId:N.spanId,parentSpanId:N.parentSpanId,sampled:N.sampled}),N.registerBeforeFinishCallback(ce=>{this._collectWebVitals(),Fs(ce)}),N}_registerInteractionListener(){let e,r=()=>{let{idleTimeout:n,finalTimeout:o,heartbeatInterval:i}=this.options,a="ui.action.click",s=xe();if(s&&s.op&&["navigation","pageload"].includes(s.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}let c=this._getCurrentHub(),{location:l}=R,f={name:this._latestRouteName,op:a,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=Hn(c,f,n,o,!0,{location:l},i)};["click"].forEach(n=>{addEventListener(n,r,{once:!1,capture:!0})})}};function Ys(t){let e=Po(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}var Ws={};T.Sentry&&T.Sentry.Integrations&&(Ws=T.Sentry.Integrations);var Fy={...Ws,...Ft,...Ci};var Qd=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Qd.SENTRY_RELEASE={id:"3.1.9"};var Vs=!1;function ep(){bi({dsn:"https://903950caba7d4802afe6c1e985ad5ebd@o128085.ingest.sentry.io/4504854496149504",release:"3.1.9",integrations:[new fr],tracesSampleRate:1}),Vs=!0}var _e=t=>(Vs||ep(),ar(t));var Js=P(require("react"));var Ni="[Duffel Ancillaries] ",qs="duffel-ancillaries-logger-state",js=!1,tp=t=>{localStorage.setItem(qs,t.toString())},zs=()=>localStorage.getItem(qs)==="true",to=t=>{tp(t),t&&!js&&console.info(Ni,`
23
+ Error:`,o)}}function Bd(){Cs(t=>{Qn("cls",{metric:t}),Is=t})}function Fd(){bs(t=>{Qn("fid",{metric:t}),xs=t})}function Ld(){Rs(t=>{Qn("lcp",{metric:t}),Ns=t})}function Ri(t,e,r,n){return Ds(t,e),Jn[t]||(r(),Jn[t]=!0),n&&e({metric:n}),Ms(t,e)}function Ud(t){let e={};t==="event"&&(e.durationThreshold=0),vt(t,r=>{Qn(t,{entries:r})},e)}function Ds(t,e){Qr[t]=Qr[t]||[],Qr[t].push(e)}function Ms(t,e){return()=>{let r=Qr[t];if(!r)return;let n=r.indexOf(e);n!==-1&&r.splice(n,1)}}function eo(t){return typeof t=="number"&&isFinite(t)}function Ut(t,{startTimestamp:e,...r}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...r})}function $(t){return t/1e3}function ks(){return R&&R.addEventListener&&R.performance}var ws=0,w={},Ue,tn;function Bs(){let t=ks();if(t&&se){t.mark&&R.performance.mark("sentry-tracing-init");let e=Yd(),r=Hd(),n=Gd();return()=>{e(),r(),n()}}return()=>{}}function Fs(){en("longtask",({entries:t})=>{for(let e of t){let r=Ie();if(!r)return;let n=$(se+e.startTime),o=$(e.duration);r.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+o})}})}function Ls(){en("event",({entries:t})=>{for(let e of t){let r=Ie();if(!r)return;if(e.name==="click"){let n=$(se+e.startTime),o=$(e.duration);r.startChild({description:Be(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+o})}}})}function Hd(){return Os(({metric:t})=>{let e=t.entries.pop();e&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding CLS"),w.cls={value:t.value,unit:""},tn=e)})}function Gd(){return As(({metric:t})=>{let e=t.entries.pop();e&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding LCP"),w.lcp={value:t.value,unit:"millisecond"},Ue=e)})}function Yd(){return Ps(({metric:t})=>{let e=t.entries.pop();if(!e)return;let r=$(se),n=$(e.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FID"),w.fid={value:t.value,unit:"millisecond"},w["mark.fid"]={value:r+n,unit:"second"}})}function Us(t){let e=ks();if(!e||!R.performance.getEntries||!se)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Adding & adjusting spans using Performance API");let r=$(se),n=e.getEntries(),o,i;if(n.slice(ws).forEach(a=>{let s=$(a.startTime),c=$(a.duration);if(!(t.op==="navigation"&&r+s<t.startTimestamp))switch(a.entryType){case"navigation":{Wd(t,a,r),o=r+$(a.responseStart),i=r+$(a.requestStart);break}case"mark":case"paint":case"measure":{$d(t,a,s,c,r);let l=fr(),f=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&f&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FP"),w.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&f&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FCP"),w.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{let l=a.name.replace(R.location.origin,"");jd(t,a,l,s,c,r);break}}}),ws=Math.max(n.length-1,0),qd(t),t.op==="pageload"){typeof o=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding TTFB"),w.ttfb={value:(o-t.startTimestamp)*1e3,unit:"millisecond"},typeof i=="number"&&i<=o&&(w["ttfb.requestTime"]={value:(o-i)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(s=>{if(!w[s]||r>=t.startTimestamp)return;let c=w[s].value,l=r+$(c),f=Math.abs((l-t.startTimestamp)*1e3),u=f-c;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Measurements] Normalized ${s} from ${c} to ${f} (${u})`),w[s].value=f});let a=w["mark.fid"];a&&w.fid&&(Ut(t,{description:"first input delay",endTimestamp:a.value+$(w.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:a.value}),delete w["mark.fid"]),"fcp"in w||delete w.cls,Object.keys(w).forEach(s=>{t.setMeasurement(s,w[s].value,w[s].unit)}),zd(t)}Ue=void 0,tn=void 0,w={}}function $d(t,e,r,n,o){let i=o+r,a=i+n;return Ut(t,{description:e.name,endTimestamp:a,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function Wd(t,e,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{to(t,e,n,r)}),to(t,e,"secureConnection",r,"TLS/SSL","connectEnd"),to(t,e,"fetch",r,"cache","domainLookupStart"),to(t,e,"domainLookup",r,"DNS"),Vd(t,e,r)}function to(t,e,r,n,o,i){let a=i?e[i]:e[`${r}End`],s=e[`${r}Start`];!s||!a||Ut(t,{op:"browser",origin:"auto.browser.browser.metrics",description:o||r,startTimestamp:n+$(s),endTimestamp:n+$(a)})}function Vd(t,e,r){Ut(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:r+$(e.requestStart),endTimestamp:r+$(e.responseEnd)}),Ut(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:r+$(e.responseStart),endTimestamp:r+$(e.responseEnd)})}function jd(t,e,r,n,o,i){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;let a={};"transferSize"in e&&(a["http.response_transfer_size"]=e.transferSize),"encodedBodySize"in e&&(a["http.response_content_length"]=e.encodedBodySize),"decodedBodySize"in e&&(a["http.decoded_response_content_length"]=e.decodedBodySize),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);let s=i+n,c=s+o;Ut(t,{description:r,endTimestamp:c,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:s,data:a})}function qd(t){let e=R.navigator;if(!e)return;let r=e.connection;r&&(r.effectiveType&&t.setTag("effectiveConnectionType",r.effectiveType),r.type&&t.setTag("connectionType",r.type),eo(r.rtt)&&(w["connection.rtt"]={value:r.rtt,unit:"millisecond"})),eo(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),eo(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}function zd(t){Ue&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding LCP Data"),Ue.element&&t.setTag("lcp.element",Be(Ue.element)),Ue.id&&t.setTag("lcp.id",Ue.id),Ue.url&&t.setTag("lcp.url",Ue.url.trim().slice(0,200)),t.setTag("lcp.size",Ue.size)),tn&&tn.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding CLS Data"),tn.sources.forEach((e,r)=>t.setTag(`cls.source.${r+1}`,Be(e.node))))}var Ii=["localhost",/^\/(?!\/)/],rn={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Ii,tracePropagationTargets:Ii};function xi(t){let{traceFetch:e,traceXHR:r,tracePropagationTargets:n,tracingOrigins:o,shouldCreateSpanForRequest:i,enableHTTPTimings:a}={traceFetch:rn.traceFetch,traceXHR:rn.traceXHR,...t},s=typeof i=="function"?i:f=>!0,c=f=>Jd(f,n||o),l={};e&&U("fetch",f=>{let u=Qd(f,s,c,l);a&&u&&Hs(u)}),r&&U("xhr",f=>{let u=tp(f,s,c,l);a&&u&&Hs(u)})}function Zd(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Hs(t){let e=t.data.url;if(!e)return;let r=en("resource",({entries:n})=>{n.forEach(o=>{Zd(o)&&o.name.endsWith(e)&&(Xd(o).forEach(a=>t.setData(...a)),setTimeout(r))})})}function Kd(t){let e="unknown",r="unknown",n="";for(let o of t){if(o==="/"){[e,r]=t.split("/");break}if(!isNaN(Number(o))){e=n==="h"?"http":n,r=t.split(n)[1];break}n+=o}return n===t&&(e=n),{name:e,version:r}}function He(t=0){return((se||performance.timeOrigin)+t)/1e3}function Xd(t){let{name:e,version:r}=Kd(t.nextHopProtocol),n=[];return n.push(["network.protocol.version",r],["network.protocol.name",e]),se?[...n,["http.request.redirect_start",He(t.redirectStart)],["http.request.fetch_start",He(t.fetchStart)],["http.request.domain_lookup_start",He(t.domainLookupStart)],["http.request.domain_lookup_end",He(t.domainLookupEnd)],["http.request.connect_start",He(t.connectStart)],["http.request.secure_connection_start",He(t.secureConnectionStart)],["http.request.connection_end",He(t.connectEnd)],["http.request.request_start",He(t.requestStart)],["http.request.response_start",He(t.responseStart)],["http.request.response_end",He(t.responseEnd)]]:n}function Jd(t,e){return _t(t,e||Ii)}function Qd(t,e,r,n){if(!ar()||!t.fetchData)return;let o=e(t.fetchData.url);if(t.endTimestamp&&o){let m=t.fetchData.__span;if(!m)return;let h=n[m];if(h){if(t.response){h.setHttpStatus(t.response.status);let S=t.response&&t.response.headers&&t.response.headers.get("content-length"),y=parseInt(S);y>0&&h.setData("http.response_content_length",y)}else t.error&&h.setStatus("internal_error");h.finish(),delete n[m]}return}let i=b(),a=i.getScope(),s=i.getClient(),c=a.getSpan(),{method:l,url:f}=t.fetchData,u=o&&c?c.startChild({data:{url:f,type:"fetch","http.method":l},description:`${l} ${f}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(u&&(t.fetchData.__span=u.spanId,n[u.spanId]=u),r(t.fetchData.url)&&s){let m=t.args[0];t.args[1]=t.args[1]||{};let h=t.args[1];h.headers=ep(m,s,a,h,u)}return u}function ep(t,e,r,n,o){let i=o||r.getSpan(),a=i&&i.transaction,{traceId:s,sampled:c,dsc:l}=r.getPropagationContext(),f=i?i.toTraceparent():Xt(s,void 0,c),u=a?a.getDynamicSamplingContext():l||ht(s,e,r),m=Vr(u),h=typeof Request<"u"&&fe(t,Request)?t.headers:n.headers;if(h)if(typeof Headers<"u"&&fe(h,Headers)){let S=new Headers(h);return S.append("sentry-trace",f),m&&S.append(Wr,m),S}else if(Array.isArray(h)){let S=[...h,["sentry-trace",f]];return m&&S.push([Wr,m]),S}else{let S="baggage"in h?h.baggage:void 0,y=[];return Array.isArray(S)?y.push(...S):S&&y.push(S),m&&y.push(m),{...h,"sentry-trace":f,baggage:y.length>0?y.join(","):void 0}}else return{"sentry-trace":f,baggage:m}}function tp(t,e,r,n){let o=t.xhr,i=o&&o[Je];if(!ar()||o&&o.__sentry_own_request__||!o||!i)return;let a=e(i.url);if(t.endTimestamp&&a){let u=o.__sentry_xhr_span_id__;if(!u)return;let m=n[u];m&&(m.setHttpStatus(i.status_code),m.finish(),delete n[u]);return}let s=b(),c=s.getScope(),l=c.getSpan(),f=a&&l?l.startChild({data:{...i.data,type:"xhr","http.method":i.method,url:i.url},description:`${i.method} ${i.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(f&&(o.__sentry_xhr_span_id__=f.spanId,n[o.__sentry_xhr_span_id__]=f),o.setRequestHeader&&r(i.url))if(f){let u=f&&f.transaction,m=u&&u.getDynamicSamplingContext(),h=Vr(m);Gs(o,f.toTraceparent(),h)}else{let u=s.getClient(),{traceId:m,sampled:h,dsc:S}=c.getPropagationContext(),y=Xt(m,void 0,h),I=S||(u?ht(m,u,c):void 0),O=Vr(I);Gs(o,y,O)}return f}function Gs(t,e,r){try{t.setRequestHeader("sentry-trace",e),r&&t.setRequestHeader(Wr,r)}catch{}}function Ys(t,e=!0,r=!0){if(!R||!R.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not initialize routing instrumentation due to invalid location");return}let n=R.location.href,o;e&&(o=t({name:R.location.pathname,startTimestamp:se?se/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),r&&U("history",({to:i,from:a})=>{if(a===void 0&&n&&n.indexOf(i)!==-1){n=void 0;return}a!==i&&(n=void 0,o&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Finishing current transaction with op: ${o.op}`),o.finish()),o=t({name:R.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}var Ws="BrowserTracing",rp={...ir,markBackgroundTransactions:!0,routingInstrumentation:Ys,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...rn},dr=class{constructor(e){this.name=Ws,this._hasSetTracePropagationTargets=!1,Gn(),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...rp,...e},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=Bs(),this.options.enableLongTask&&Fs(),this.options._experiments.enableInteractions&&Ls()}setupOnce(e,r){this._getCurrentHub=r;let o=r().getClient(),i=o&&o.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:s,startTransactionOnPageLoad:c,markBackgroundTransactions:l,traceFetch:f,traceXHR:u,shouldCreateSpanForRequest:m,enableHTTPTimings:h,_experiments:S}=this.options,y=i&&i.tracePropagationTargets,I=y||this.options.tracePropagationTargets;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&y&&p.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."),a(O=>{let C=this._createRouteTransaction(O);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(C,O,r),C},c,s),l&&Es(),S.enableInteractions&&this._registerInteractionListener(),xi({traceFetch:f,traceXHR:u,tracePropagationTargets:I,shouldCreateSpanForRequest:m,enableHTTPTimings:h})}_createRouteTransaction(e){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}let r=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:o,finalTimeout:i,heartbeatInterval:a}=this.options,s=e.op==="pageload",c=s?$s("sentry-trace"):"",l=s?$s("baggage"):"",{traceparentData:f,dynamicSamplingContext:u,propagationContext:m}=Jo(c,l),h={...e,...f,metadata:{...e.metadata,dynamicSamplingContext:f&&!u?{}:u},trimEnd:!0},S=typeof n=="function"?n(h):h,y=S===void 0?{...h,sampled:!1}:S;y.metadata=y.name!==h.name?{...y.metadata,source:"custom"}:y.metadata,this._latestRouteName=y.name,this._latestRouteSource=y.metadata&&y.metadata.source,y.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Will not send ${y.op} transaction because of beforeNavigate.`),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Starting ${y.op} transaction on scope`);let{location:I}=R,O=Hn(r,y,o,i,!0,{location:I},a),C=r.getScope();return s&&f?C.setPropagationContext(m):C.setPropagationContext({traceId:O.traceId,spanId:O.spanId,parentSpanId:O.parentSpanId,sampled:O.sampled}),O.registerBeforeFinishCallback(ce=>{this._collectWebVitals(),Us(ce)}),O}_registerInteractionListener(){let e,r=()=>{let{idleTimeout:n,finalTimeout:o,heartbeatInterval:i}=this.options,a="ui.action.click",s=Ie();if(s&&s.op&&["navigation","pageload"].includes(s.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}let c=this._getCurrentHub(),{location:l}=R,f={name:this._latestRouteName,op:a,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=Hn(c,f,n,o,!0,{location:l},i)};["click"].forEach(n=>{addEventListener(n,r,{once:!1,capture:!0})})}};function $s(t){let e=Do(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}var Vs={};T.Sentry&&T.Sentry.Integrations&&(Vs=T.Sentry.Integrations);var Wy={...Vs,...Lt,...Ti};var np=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};np.SENTRY_RELEASE={id:"3.3.0"};var js=!1;function op(){bi({dsn:"https://903950caba7d4802afe6c1e985ad5ebd@o128085.ingest.sentry.io/4504854496149504",release:"3.3.0",integrations:[new dr],tracesSampleRate:1}),js=!0}var _e=t=>(js||op(),sr(t));var Qs=D(require("react"));var Oi="[Duffel Ancillaries] ",zs="duffel-ancillaries-logger-state",qs=!1,ip=t=>{localStorage.setItem(zs,t.toString())},Zs=()=>localStorage.getItem(zs)==="true",ro=t=>{ip(t),t&&!qs&&console.info(Oi,`
24
24
 
25
25
  Debug mode is enabled. Information about your setup will be printed to the console.
26
26
 
27
27
  If you do not want to enable debug mode (for example in a production environment), pass "debug: false" when initializing this component.
28
28
 
29
29
  Learn more about the Ancillaries component:
30
- http://duffel.com/docs/guides/ancillaries-component`),js=!0},Zs=t=>{zs()?console.info(Ni,t):zr({category:"log",message:t})};function st(t,e){let r=[];Array.isArray(e)?r=e:r=Object.entries(e).map(([n,o])=>({property:n,value:o})),zs()?(console.groupCollapsed(Ni,t),r.forEach(n=>{console.info(n)}),console.groupEnd()):zr({category:"log.group",message:t,data:e})}var v=require("react/jsx-runtime"),Ks={add:(0,v.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),apartment:(0,v.jsx)("path",{d:"M3.8496 19.9752V7.2744H7.4496V3.6744H15.9504V10.8744H20.1504V19.9752H13.4496V16.3752H10.5504V19.9752H3.8496ZM5.1504 18.6744H7.4496V16.3752H5.1504V18.6744ZM5.1504 14.7744H7.4496V12.4752H5.1504V14.7744ZM5.1504 10.8744H7.4496V8.5752H5.1504V10.8744ZM8.7504 14.7744H11.0496V12.4752H8.7504V14.7744ZM8.7504 10.8744H11.0496V8.5752H8.7504V10.8744ZM8.7504 7.2744H11.0496V4.9752H8.7504V7.2744ZM12.3504 14.7744H14.6496V12.4752H12.3504V14.7744ZM12.3504 10.8744H14.6496V8.5752H12.3504V10.8744ZM12.3504 7.2744H14.6496V4.9752H12.3504V7.2744ZM16.5504 18.6744H18.8496V16.3752H16.5504V18.6744ZM16.5504 14.7744H18.8496V12.4752H16.5504V14.7744Z"}),arrow_forward:(0,v.jsx)("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"}),arrow_left:(0,v.jsx)("path",{d:"M9 19L2 12L9 5L10.425 6.4L5.825 11H22V13H5.825L10.4 17.6L9 19Z"}),arrow_right:(0,v.jsx)("path",{d:"M15 19L13.6 17.6L18.2 13H2V11H18.2L13.6 6.4L15 5L22 12L15 19Z"}),autorenew:(0,v.jsx)("path",{d:"M5.69728 14.4104C5.49326 13.9833 5.32604 13.5257 5.19562 13.0374C5.06521 12.5492 5 12.0367 5 11.5C5 9.56481 5.69083 7.91679 7.07249 6.55591C8.45416 5.19504 10.147 4.53946 12.1511 4.58918H12.7613L11.0742 2.92359L12.0097 2L15.2869 5.23549L12.0097 8.47099L11.0742 7.54739L12.7613 5.88181H12.1511C10.5021 5.84866 9.11624 6.38632 7.99347 7.49479C6.87069 8.60326 6.30931 9.93833 6.30931 11.5C6.30931 11.8455 6.33804 12.1824 6.3955 12.5106C6.45296 12.8389 6.53915 13.1573 6.65407 13.4658L5.69728 14.4104ZM11.9903 21L8.71309 17.7645L11.9903 14.529L12.9258 15.4526L11.2387 17.1182H11.8489C13.4979 17.1513 14.8838 16.6137 16.0065 15.5052C17.1293 14.3967 17.6907 13.0617 17.6907 11.5C17.6907 11.1545 17.662 10.8176 17.6045 10.4894C17.547 10.1611 17.4609 9.84273 17.3459 9.53421L18.3027 8.58959C18.5067 9.01665 18.674 9.47431 18.8044 9.96256C18.9348 10.4508 19 10.9633 19 11.5C19 13.4186 18.3092 15.0625 16.9275 16.4317C15.5458 17.8008 13.853 18.4605 11.8489 18.4108H11.2387L12.9258 20.0764L11.9903 21Z"}),bassinet:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("path",{d:"M19 12C19 14.1217 18.1571 16.1566 16.6569 17.6569C15.1566 19.1571 13.1217 20 11 20C8.87827 20 6.84344 19.1571 5.34315 17.6569C3.84286 16.1566 3 14.1217 3 12L11 12H19Z"}),(0,v.jsx)("path",{d:"M16.1347 5.86529L11 11V4C12.0506 4 13.0909 4.20693 14.0615 4.60896C14.8136 4.92052 15.5125 5.34451 16.1347 5.86529ZM16.8602 6.55405L12.4142 11H18.9373C18.8482 10.293 18.6649 9.59962 18.391 8.93853C18.0264 8.05823 17.5077 7.25087 16.8602 6.55405Z"})]}),cabin_bag:(0,v.jsx)("path",{d:"M7.3077 20.5C6.81058 20.5 6.38502 20.323 6.03102 19.969C5.67701 19.615 5.5 19.1894 5.5 18.6923V8.25007C5.5 7.76417 5.67019 7.35103 6.01057 7.01065C6.35096 6.67027 6.7641 6.50007 7.25 6.50007H9.25V3.6924C9.25 3.43631 9.33622 3.22166 9.50865 3.04842C9.68108 2.87519 9.89773 2.78857 10.1586 2.78857H13.8414C14.1022 2.78857 14.3189 2.87519 14.4913 3.04842C14.6637 3.22166 14.75 3.43631 14.75 3.6924V6.50007H16.6922C17.1894 6.50007 17.6149 6.67708 17.9689 7.0311C18.3229 7.3851 18.5 7.81066 18.5 8.30777V18.6923C18.5 19.1894 18.3229 19.615 17.9689 19.969C17.6149 20.323 17.1894 20.5 16.6922 20.5C16.6922 20.7507 16.6074 20.9608 16.4377 21.1303C16.2681 21.2999 16.0578 21.3846 15.807 21.3846C15.5561 21.3846 15.3461 21.2999 15.1769 21.1303C15.0077 20.9608 14.923 20.7507 14.923 20.5H9.0769C9.0769 20.7513 8.99206 20.9615 8.82237 21.1308C8.65271 21.3 8.44246 21.3846 8.19162 21.3846C7.94079 21.3846 7.73076 21.2999 7.56153 21.1303C7.39231 20.9608 7.3077 20.7507 7.3077 20.5ZM10.4423 6.50007H13.5577V3.98085H10.4423V6.50007ZM7.3077 19H16.6922C16.782 19 16.8557 18.9712 16.9134 18.9135C16.9711 18.8558 17 18.7821 17 18.6923V8.30777C17 8.21802 16.9711 8.1443 16.9134 8.0866C16.8557 8.0289 16.782 8.00005 16.6922 8.00005H7.3077C7.21795 8.00005 7.14423 8.0289 7.08652 8.0866C7.02882 8.1443 6.99997 8.21802 6.99997 8.30777V18.6923C6.99997 18.7821 7.02882 18.8558 7.08652 18.9135C7.14423 18.9712 7.21795 19 7.3077 19ZM8.15382 17.1539C8.15382 17.3261 8.21009 17.4685 8.32262 17.5811C8.43514 17.6937 8.57744 17.75 8.74952 17.75C8.92161 17.75 9.06407 17.6937 9.1769 17.5811C9.28972 17.4685 9.34613 17.3261 9.34613 17.1539V9.8462C9.34613 9.67398 9.28986 9.53157 9.17732 9.41897C9.06481 9.30637 8.92251 9.25007 8.75043 9.25007C8.57834 9.25007 8.43588 9.30637 8.32305 9.41897C8.21023 9.53157 8.15382 9.67398 8.15382 9.8462V17.1539ZM11.4038 17.1539C11.4038 17.3261 11.4601 17.4685 11.5726 17.5811C11.6851 17.6937 11.8274 17.75 11.9995 17.75C12.1716 17.75 12.3141 17.6937 12.4269 17.5811C12.5397 17.4685 12.5961 17.3261 12.5961 17.1539V9.8462C12.5961 9.67398 12.5399 9.53157 12.4273 9.41897C12.3148 9.30637 12.1725 9.25007 12.0004 9.25007C11.8283 9.25007 11.6859 9.30637 11.5731 9.41897C11.4602 9.53157 11.4038 9.67398 11.4038 9.8462V17.1539ZM14.6538 17.1539C14.6538 17.3261 14.7101 17.4685 14.8226 17.5811C14.9351 17.6937 15.0774 17.75 15.2495 17.75C15.4216 17.75 15.5641 17.6937 15.6769 17.5811C15.7897 17.4685 15.8461 17.3261 15.8461 17.1539V9.8462C15.8461 9.67398 15.7899 9.53157 15.6773 9.41897C15.5648 9.30637 15.4225 9.25007 15.2504 9.25007C15.0783 9.25007 14.9359 9.30637 14.823 9.41897C14.7102 9.53157 14.6538 9.67398 14.6538 9.8462V17.1539Z"}),check:(0,v.jsx)("path",{d:"M10.3333 15.8646L7 12.5313L8.0625 11.4688L10.3333 13.7396L15.9375 8.13544L17 9.19794L10.3333 15.8646Z"}),checked_bag:(0,v.jsx)("path",{d:"M22 19H2V21H22V19M4 15C4 15.5 4.2 16 4.6 16.4C5 16.8 5.5 17 6 17V6C5.5 6 5 6.2 4.6 6.6C4.2 7 4 7.5 4 8V15M13.5 6H10.5C10.5 5.6 10.6 5.2 10.9 4.9C11.2 4.6 11.5 4.5 12 4.5C12.4 4.5 12.8 4.6 13.1 4.9C13.3 5.2 13.5 5.6 13.5 6M7 6V17H17V6H15C15 5.2 14.7 4.5 14.1 3.9S12.8 3 12 3C11.2 3 10.5 3.3 9.9 3.9C9.3 4.5 9 5.2 9 6H7M18 17C18.5 17 19 16.8 19.4 16.4C19.8 16 20 15.5 20 15V8C20 7.5 19.8 7 19.4 6.6C19 6.2 18.5 6 18 6V17Z"}),chevron:(0,v.jsx)("path",{d:"M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z"}),close:(0,v.jsx)("path",{d:"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),closet:(0,v.jsx)("path",{d:"M12 4C11.0717 4 10.1815 4.36875 9.52513 5.02513C8.86875 5.6815 8.5 6.57174 8.5 7.5H10.5C10.5 7.10218 10.658 6.72064 10.9393 6.43934C11.2206 6.15804 11.6022 6 12 6C12.3978 6 12.7794 6.15804 13.0607 6.43934C13.342 6.72064 13.5 7.10218 13.5 7.5C13.5 7.89782 13.342 8.27936 13.0607 8.56066C12.7794 8.84196 12.3978 9 12 9C11.45 9 11 9.45 11 10V11.75L2.4 18.2C2.23209 18.3259 2.10807 18.5015 2.04549 18.7018C1.98291 18.9022 1.98495 19.1171 2.05132 19.3162C2.11769 19.5153 2.24502 19.6885 2.41529 19.8112C2.58556 19.934 2.79012 20 3 20H21C21.2099 20 21.4144 19.934 21.5847 19.8112C21.755 19.6885 21.8823 19.5153 21.9487 19.3162C22.0151 19.1171 22.0171 18.9022 21.9545 18.7018C21.8919 18.5015 21.7679 18.3259 21.6 18.2L13 11.75V10.85C13.7216 10.6349 14.3546 10.1927 14.805 9.58919C15.2554 8.98569 15.4991 8.25303 15.5 7.5C15.5 6.57174 15.1313 5.6815 14.4749 5.02513C13.8185 4.36875 12.9283 4 12 4ZM12 13.5L18 18H6L12 13.5Z"}),exit_row:(0,v.jsx)("path",{d:"M20 11H6.83001L9.71001 8.12001C10.1 7.73001 10.1 7.10001 9.71001 6.71001C9.32001 6.32001 8.69001 6.32001 8.30001 6.71001L3.71001 11.3C3.32001 11.69 3.32001 12.32 3.71001 12.71L8.30001 17.3C8.69001 17.69 9.32001 17.69 9.71001 17.3C10.1 16.91 10.1 16.28 9.71001 15.89L6.83001 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11Z"}),exit_row_right:(0,v.jsx)("path",{d:"M4 11H17.17L14.29 8.12001C13.9 7.73001 13.9 7.10001 14.29 6.71001C14.68 6.32001 15.31 6.32001 15.7 6.71001L20.29 11.3C20.68 11.69 20.68 12.32 20.29 12.71L15.7 17.3C15.31 17.69 14.68 17.69 14.29 17.3C13.9 16.91 13.9 16.28 14.29 15.89L17.17 13H4C3.45 13 3 12.55 3 12C3 11.45 3.45 11 4 11Z"}),expand_content:(0,v.jsx)("path",{d:"M5 19V13H7V17H11V19H5ZM17 11V7H13V5H19V11H17Z"}),flight_class:(0,v.jsx)("path",{d:"M14.2596 12.5C13.7737 12.5 13.3606 12.3298 13.0202 11.9894C12.6798 11.649 12.5096 11.2359 12.5096 10.75V6.25C12.5096 5.7641 12.6798 5.35096 13.0202 5.01058C13.3606 4.67019 13.7737 4.5 14.2596 4.5H15.75C16.2359 4.5 16.649 4.67019 16.9894 5.01058C17.3298 5.35096 17.5 5.7641 17.5 6.25V10.75C17.5 11.2359 17.3298 11.649 16.9894 11.9894C16.649 12.3298 16.2359 12.5 15.75 12.5H14.2596ZM14.2596 11H15.75C15.8205 11 15.8798 10.9759 15.9278 10.9279C15.9759 10.8798 16 10.8205 16 10.75V6.25C16 6.17948 15.9759 6.12018 15.9278 6.0721C15.8798 6.02402 15.8205 5.99998 15.75 5.99998H14.2596C14.1891 5.99998 14.1298 6.02402 14.0817 6.0721C14.0336 6.12018 14.0096 6.17948 14.0096 6.25V10.75C14.0096 10.8205 14.0336 10.8798 14.0817 10.9279C14.1298 10.9759 14.1891 11 14.2596 11ZM9.5673 17.5C9.21345 17.5 8.89678 17.398 8.6173 17.1942C8.33782 16.9903 8.14423 16.7198 8.03655 16.3827L5.5 8.02883V4.5H6.99997V7.99998L9.49997 16H17.7596V17.5H9.5673ZM8.25 20.5V19H17.75V20.5H8.25ZM14.2596 5.99998H16H14.0096H14.2596Z"}),flight_takeoff:(0,v.jsx)("path",{d:"M3.77521 20.1498V18.849H20.0748V20.1498H3.77521ZM5.45041 15.2742L2.94961 11.0994L4.05001 10.8246L5.90041 12.399L10.05 11.2998L6.27481 4.89902L7.72561 4.62422L14.1 10.1994L19.4004 8.77382C19.75 8.67462 20.0832 8.72062 20.4 8.91182C20.7168 9.10382 20.9252 9.37462 21.0252 9.72422C21.1084 10.0746 21.0624 10.4038 20.8872 10.7118C20.7128 11.0198 20.4504 11.2242 20.1 11.325L5.45041 15.2742Z"}),galley:(0,v.jsx)("path",{d:"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"}),lavatory:(0,v.jsx)("path",{d:"M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"}),lie_flat_seat:(0,v.jsx)("path",{d:"M6.16667 12.8333C6.81667 12.8333 7.45834 12.5833 7.95001 12.0833C8.91667 11.0916 8.90001 9.51659 7.91667 8.54992C7.42501 8.07492 6.79167 7.83325 6.16667 7.83325C5.51667 7.83325 4.87501 8.08325 4.38334 8.58325C3.41667 9.57492 3.43334 11.1499 4.41667 12.1166C4.90834 12.5916 5.54167 12.8333 6.16667 12.8333ZM5.57501 9.74992C5.73334 9.59159 5.94167 9.49992 6.16667 9.49992C6.38334 9.49992 6.59167 9.58325 6.75001 9.73325C7.08334 10.0583 7.08334 10.5749 6.76667 10.9083C6.60001 11.0749 6.39167 11.1666 6.16667 11.1666C5.95001 11.1666 5.74167 11.0833 5.58334 10.9333C5.25001 10.5999 5.25001 10.0833 5.57501 9.74992ZM17 7.83325H9.50001V12.8333H20.3333V11.1666C20.3333 9.32492 18.8417 7.83325 17 7.83325ZM11.1667 11.1666V9.49992H17C17.9167 9.49992 18.6667 10.2499 18.6667 11.1666H11.1667ZM3.66667 15.3333H8.66667V16.9999H15.3333V15.3333H20.3333V13.6666H3.66667V15.3333Z"}),minus:(0,v.jsx)("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"}),no_airplane:(0,v.jsx)("path",{d:"M14.6674 10.0001V2.66675C14.6674 1.56008 13.7741 0.666748 12.6674 0.666748C11.5607 0.666748 10.6674 1.56008 10.6674 2.66675V7.57341L21.1074 18.0134L25.3341 19.3334V16.6667L14.6674 10.0001ZM1.33407 5.02675L7.9874 11.6801L0.000732422 16.6667V19.3334L10.6674 16.0001V23.3334L8.00073 25.3334V27.3334L12.6674 26.0001L17.3341 27.3334V25.3334L14.6674 23.3334V18.3601L22.3074 26.0001L24.0007 24.3067L3.0274 3.33341L1.33407 5.02675Z"}),no_bag:(0,v.jsx)("path",{d:"M16.8992 6.12037H14.9392V3.18101C14.9385 2.92148 14.8351 2.67278 14.6516 2.48926C14.4681 2.30574 14.2194 2.20234 13.9599 2.20166H10.0399C9.78034 2.20234 9.53163 2.30574 9.34811 2.48926C9.16459 2.67278 9.06119 2.92148 9.06051 3.18101V6.12037H8.20711L8.34715 6.25804L14.3973 12.0871V9.06102H15.9676V13.6L17.3022 14.8859L18.8592 16.4748V8.08037C18.8579 7.56096 18.6509 7.06322 18.2836 6.69594C17.9164 6.32867 17.4186 6.12173 16.8992 6.12037ZM5.14051 8.09559L3.77173 6.71825L5.00821 5.48945L7.16586 7.6606L13.9581 14.4953L15.8932 16.4426L19.7441 20.3175L20.2279 20.8043L18.9914 22.0331L17.635 20.6683C17.4035 20.7625 17.154 20.8126 16.8992 20.8133C16.904 20.945 16.8822 21.0763 16.8351 21.1993C16.788 21.3224 16.7166 21.4347 16.6251 21.5296C16.5336 21.6244 16.424 21.6999 16.3027 21.7514C16.1814 21.8029 16.051 21.8295 15.9192 21.8295C15.7874 21.8295 15.657 21.8029 15.5357 21.7514C15.4145 21.6999 15.3048 21.6244 15.2133 21.5296C15.1219 21.4347 15.0504 21.3224 15.0034 21.1993C14.9563 21.0763 14.9344 20.945 14.9392 20.8133H9.06051C9.06529 20.945 9.04348 21.0763 8.99638 21.1993C8.94929 21.3224 8.87787 21.4347 8.7864 21.5296C8.69492 21.6244 8.58527 21.6999 8.46399 21.7514C8.34271 21.8029 8.21229 21.8295 8.08051 21.8295C7.94874 21.8295 7.81832 21.8029 7.69703 21.7514C7.57575 21.6999 7.4661 21.6244 7.37463 21.5296C7.28316 21.4347 7.21174 21.3224 7.16464 21.1993C7.11754 21.0763 7.09573 20.945 7.10051 20.8133C6.58222 20.8119 6.08545 20.6059 5.71835 20.24C5.35126 19.8741 5.14357 19.378 5.14051 18.8597V8.09559ZM14.8632 17.8791L14.3973 17.4103V17.8791H14.8632ZM9.596 12.579V17.8791H8.03083V11.004L9.596 12.579ZM10.5302 3.67134H13.4695V6.12295H10.5302V3.67134Z"}),no_seat:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("path",{d:"M25.1667 21.9733L23.4733 23.6667L2.5 2.69333L4.19333 1L7.16667 3.97333L16.5267 13.3333L19.1933 16L24.5 21.3067L25.1667 21.9733Z"}),(0,v.jsx)("path",{d:"M7.16667 24H3.16667V16H19.1933L24.5 21.3067V24H20.5V20H7.16667V24ZM27.1667 9.33333H23.1667V13.3333H27.1667V9.33333ZM4.5 9.33333H0.5V13.3333H4.5V9.33333ZM20.3333 13.3333H20.5V2.66667C20.5 1.2 19.3 0 17.8333 0H9.83333C9.05784 0 8.3569 0.335483 7.86848 0.868484L20.3333 13.3333ZM16.5267 13.3333L7.16667 3.97333V13.3333H16.5267Z"})]}),north_east:(0,v.jsx)("path",{d:"M4.69999 19.3C4.51665 19.1167 4.42499 18.8833 4.42499 18.6C4.42499 18.3167 4.51665 18.0833 4.69999 17.9L15.6 7H9.99999C9.71665 7 9.47915 6.90417 9.28749 6.7125C9.09582 6.52083 8.99999 6.28333 8.99999 6C8.99999 5.71667 9.09582 5.47917 9.28749 5.2875C9.47915 5.09583 9.71665 5 9.99999 5H18C18.2833 5 18.5208 5.09583 18.7125 5.2875C18.9042 5.47917 19 5.71667 19 6V14C19 14.2833 18.9042 14.5208 18.7125 14.7125C18.5208 14.9042 18.2833 15 18 15C17.7167 15 17.4792 14.9042 17.2875 14.7125C17.0958 14.5208 17 14.2833 17 14V8.4L6.09999 19.3C5.91665 19.4833 5.68332 19.575 5.39999 19.575C5.11665 19.575 4.88332 19.4833 4.69999 19.3Z"}),seat:(0,v.jsx)("path",{d:"M7.59 5.41012C6.81 4.63012 6.81 3.36012 7.59 2.58012C8.37 1.80012 9.64 1.80012 10.42 2.58012C11.2 3.36012 11.2 4.63012 10.42 5.41012C9.63 6.20012 8.37 6.20012 7.59 5.41012ZM6 16.0001V8.00012C6 7.45012 5.55 7.00012 5 7.00012C4.45 7.00012 4 7.45012 4 8.00012V16.0001C4 18.7601 6.24 21.0001 9 21.0001H14C14.55 21.0001 15 20.5501 15 20.0001C15 19.4501 14.55 19.0001 14 19.0001H9C7.34 19.0001 6 17.6601 6 16.0001ZM19.28 19.3501L15.51 15.5801C15.14 15.2101 14.63 15.0001 14.1 15.0001H11.5V11.3201C12.59 12.2101 14.16 13.0201 15.7 13.3401C16.37 13.4801 17 12.9801 17 12.3001C17 11.7701 16.61 11.3401 16.08 11.2501C14.66 11.0101 13.2 10.2401 12.33 9.28012L10.93 7.73012C10.74 7.52012 10.5 7.35012 10.24 7.23012C9.95 7.09012 9.62 7.00012 9.28 7.00012H9.25C8.01 7.00012 7 8.01012 7 9.25012V15.0001C7 16.6601 8.34 18.0001 10 18.0001H15.07L17.85 20.7801C18.24 21.1701 18.89 21.1701 19.28 20.7801C19.68 20.3901 19.68 19.7501 19.28 19.3501Z"}),seat_paid_indicator:(0,v.jsx)("path",{d:"M11.7686 0.731368C12.7766 -0.276576 14.5 0.437294 14.5 1.86274V10.8C14.5 12.5673 13.0673 14 11.3 14H2.36274C0.937294 14 0.223427 12.2766 1.23137 11.2686L11.7686 0.731368Z"}),shield_with_moon:(0,v.jsx)("path",{d:"M12.525 15.75C13.0814 15.75 13.6269 15.6408 14.1615 15.4222C14.6961 15.2036 15.166 14.8757 15.5711 14.4385C15.6749 14.3244 15.7032 14.2033 15.6557 14.0751C15.6083 13.9469 15.5077 13.8629 15.3538 13.8232C14.7269 13.6783 14.1477 13.4183 13.6163 13.0433C13.0849 12.6683 12.6474 12.1789 12.3038 11.5751C11.9769 11.0046 11.7682 10.393 11.6778 9.74048C11.5874 9.08791 11.6589 8.45458 11.8923 7.84048C11.9525 7.68663 11.9301 7.55586 11.8249 7.44817C11.7198 7.34049 11.5916 7.30332 11.4403 7.33665C10.4442 7.59177 9.65927 8.1142 9.08555 8.90395C8.51185 9.69368 8.225 10.5591 8.225 11.5001C8.225 12.6796 8.64519 13.6828 9.48558 14.5097C10.3259 15.3366 11.3391 15.75 12.525 15.75ZM12 21.4808C9.83716 20.8911 8.04646 19.618 6.62787 17.6616C5.20929 15.7052 4.5 13.518 4.5 11.1001V5.34625L12 2.53857L19.5 5.34625V11.1001C19.5 13.518 18.7907 15.7052 17.3721 17.6616C15.9535 19.618 14.1628 20.8911 12 21.4808ZM12 19.9001C13.7333 19.3501 15.1666 18.2501 16.3 16.6001C17.4333 14.9501 18 13.1167 18 11.1001V6.37507L12 4.1347L5.99997 6.37507V11.1001C5.99997 13.1167 6.56664 14.9501 7.69997 16.6001C8.83331 18.2501 10.2666 19.3501 12 19.9001Z"}),stairs:(0,v.jsx)("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,8h-2.42v3.33H13v3.33h-2.58 V18H6v-2h2.42v-3.33H11V9.33h2.58V6H18V8z"}),warning:(0,v.jsx)("path",{d:"M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM8.21071 9.25592L10.9548 12L8.21071 14.7441L9.38922 15.9226L12.1333 13.1785L14.8774 15.9226L16.0559 14.7441L13.3118 12L16.0559 9.25592L14.8774 8.07741L12.1333 10.8215L9.38922 8.07741L8.21071 9.25592Z"}),wifi:(0,v.jsx)("path",{d:"M2.83333 9.50005L4.49999 11.1667C8.64166 7.02505 15.3583 7.02505 19.5 11.1667L21.1667 9.50005C16.1083 4.44172 7.89999 4.44172 2.83333 9.50005ZM9.49999 16.1667L12 18.6667L14.5 16.1667C13.125 14.7834 10.8833 14.7834 9.49999 16.1667ZM6.16666 12.8334L7.83333 14.5C10.1333 12.2 13.8667 12.2 16.1667 14.5L17.8333 12.8334C14.6167 9.61672 9.39166 9.61672 6.16666 12.8334Z"})},rp=t=>t in Ks?Ks[t]:(Zs(`The icon "${t}" is missing from ICON_MAP`),null),A=({name:t,size:e,className:r,viewBox:n,style:o})=>(0,v.jsx)("svg",{className:r,width:e||24,height:e||24,viewBox:n||"0 0 24 24","aria-label":t,"data-testid":t,style:{display:"block",fill:"currentColor",...o},children:rp(t)});var Xs=P(Ne());var no=require("react/jsx-runtime"),np={primary:"button--primary",outlined:"button--outlined",destructive:"button--destructive"},op={32:"button--32",40:"button--40",48:"button--48"},ee=({iconBefore:t,variant:e="primary",size:r=40,children:n,className:o,type:i="button",...a})=>(0,no.jsxs)("button",{type:i,className:(0,Xs.default)("button",np[e],op[r],o),...a,children:[t&&(0,no.jsx)(A,{className:"duffel-button__icon duffel-button__icon--before",name:t}),n]});var Oi=require("react/jsx-runtime"),dr=({style:t,children:e})=>(0,Oi.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"dashed 1px var(--GREY-300)",borderRadius:"4px",paddingBlock:"32px",...t},children:(0,Oi.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"470px"},children:e})});var Ut=require("react/jsx-runtime"),pr=class extends Js.default.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){_e(e)}render(){return this.state.hasError?(0,Ut.jsxs)(dr,{children:[(0,Ut.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"We ran into an error"}),(0,Ut.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Please try reloading. If the problem persists reach out to our support team."}),(0,Ut.jsx)("div",{children:(0,Ut.jsx)(ee,{variant:"outlined",iconBefore:"autorenew",onClick:()=>location.reload(),children:"Try again"})})]}):this.props.children}};var Gt=require("react/jsx-runtime"),Qs=({height:t,message:e})=>(0,Gt.jsxs)(dr,{style:{minHeight:t},children:[(0,Gt.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Failed to load extras"}),(0,Gt.jsx)("p",{className:"p2--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:e||"Please try reloading. If the problem persists reach out to our support team."}),(0,Gt.jsx)("div",{children:(0,Gt.jsx)(ee,{variant:"outlined",onClick:()=>location.reload(),iconBefore:"autorenew",children:"Try again"})})]});var mr=t=>t.reduce((e,{id:r,total_amount:n,total_currency:o})=>({[r]:{total_amount:n,total_currency:o},...e}),{});var Ct=(t,e,r)=>{if(!t||!e||e.length===0)return 0;let n=mr(t.available_services);return rn(n,e,r)},rn=(t,e,r)=>(e||[]).reduce((n,{quantity:o,id:i})=>{let a=n;return i in t?a+=o*+t[i].total_amount:r?a+=o*ip(i,r):_e(new Error(`The service id (${i}) provided could not be found in neither the offer nor the seat maps.`)),a},0),ip=(t,e)=>{for(let r of e)for(let n of r.cabins)for(let o of n.rows)for(let i of o.sections)for(let a of i.elements)if(a.type==="seat"&&Array.isArray(a.available_services)){let s=a.available_services.find(c=>c.id===t);if(s)return+s.total_amount}return 0};var ec=({baggageSelectedServices:t,seatSelectedServices:e,cfarSelectedServices:r,offer:n,seatMaps:o,passengers:i})=>{let a=[...t||[],...e||[],...r||[]],s=+n.total_amount+Ct(n,a,o);return{...n&&{selected_offers:[n.id]},passengers:i,services:ap(a),...n&&{payments:[{type:"balance",amount:`${s}`,currency:n.total_currency}]},type:"instant",metadata:{source:"duffel-ancillaries@3.1.9"}}},ap=t=>Array.isArray(t)?t.filter(({quantity:e})=>e>0).map(({id:e,quantity:r})=>({id:e,quantity:r})):[];var Ai=t=>(e,r)=>{let{rate:n,amount:o}=t;return{amount:e*(1+n)+o,currency:r}},Pi="You cannot supply both markup and priceFormatters for the same service.",tc=(t,e)=>{let r={};if(e&&(e.bags&&(r.bags=e.bags),e.seats&&(r.seats=e.seats),e.cancel_for_any_reason&&(r.cancel_for_any_reason=e.cancel_for_any_reason)),t){if(t.bags){if(e&&e.bags)throw new Error(Pi);r.bags=Ai(t.bags)}if(t.seats){if(e&&e.seats)throw new Error(Pi);r.seats=Ai(t.seats)}if(t.cancel_for_any_reason){if(e&&e.cancel_for_any_reason)throw new Error(Pi);r.cancel_for_any_reason=Ai(t.cancel_for_any_reason)}}return r};var oo=t=>t.type==="baggage";var gr=t=>t.type==="cancel_for_any_reason";var sp=(t,e)=>`${t} must all have the same currency, but they have ${e.size} different currencies (${[...e].join(", ")}). Check the price formatters passed into the component's render function.`,rc=(t,e)=>{if(!e)return t;let r=t.available_services,n=new Set,o={baggage:e?.bags,cancel_for_any_reason:e?.cancel_for_any_reason},i=r.map(a=>{let s={...a};if(a.type in o&&o[a.type]){let{total_amount:c,total_currency:l}=a;if(oo(a)){let{amount:f,currency:u}=o[a.type](+a.total_amount,a.total_currency,a);c=f.toString(),u&&(l=u)}if(gr(a)){let{amount:f,currency:u}=o[a.type](+a.total_amount,a.total_currency,a);c=f.toString(),u&&(l=u)}if(n.add(l),n.size>1)throw new Error(sp(a.type,n));s.total_amount=c,s.total_currency=l}return s});return{...t,available_services:i}};function io(t){return t.type==="seat"}var cp=t=>`Seats must all have the same currency, but they have ${t.size} different currencies (${[...t].join(", ")}). Check the price formatters passed into the component's render function.`,lp=(t,e,r)=>{let n={...t};if(io(n)&&n.available_services.length>0){let o=n.available_services.map(i=>{let a={...i},{amount:s,currency:c}=e(+i.total_amount,i.total_currency,i);if(a.total_amount=s.toString(),c&&(a.total_currency=c,r.add(c),r.size>1))throw new Error(cp(r));return a});n.available_services=o}return n},nc=(t,e)=>{if(!e)return t;let r=new Set;return t.map(o=>{let i=o.cabins.map(a=>{let s=a.rows.map(c=>{let l=c.sections.map(f=>{let u=f.elements.map(m=>lp(m,e,r));return{...f,elements:u}});return{...c,sections:l}});return{...a,rows:s}});return{...o,cabins:i}})};var ao=t=>{let e=t.split(", ").map(n=>parseInt(n));return(.2126*e[0]+.7152*e[1]+.0722*e[2])/255>.5};var oc=t=>"selected_offers"in t&&"passengers"in t&&"services"in t&&"payments"in t&&"type"in t&&"metadata"in t;var ic=t=>t.expires_at&&new Date(t.expires_at)<new Date;var nn=t=>"data"in t&&Array.isArray(t.data.errors),up="https://api.duffel.com",fp="3.1.9";async function so(t,e,r="GET",n){st("Making request to the Duffel API",{path:e,method:r});let o=`${up}/ancillaries-component/${e}`,i=null;try{i=await fetch(o,{method:r,body:n,headers:{"Duffel-Version":"v1",Authorization:`Bearer ${t}`,"User-Agent":`Duffel/ancillaries-component@${fp}`}})}catch(s){throw st("Failed to make request to the Duffel API",{error:s}),s}let a=await i.json();if(Array.isArray(a.errors))throw st("Request to the Duffel API failed",{operation:`${r} ${o}`,method:r,request_id:a?.meta?.request_id,errors:a.errors,status:i.status}),{...i,data:a};return st("Request to the Duffel succeeded",{request_id:a?.meta?.request_id}),a}var ac="https://assets.duffel.com/components/3.1.9",sc=async t=>await(await fetch(ac+`/fixtures/offers/${t}.json`)).json(),cc=async t=>await(await fetch(ac+`/fixtures/seat-maps/${t}.json`)).json();var co=t=>t.startsWith("fixture_off_");async function lc(t,e){return(await so(e,`offers/${t}?return_available_services=true`)).data}async function uc(t,e,r,n,o){n(!0);let i=co(t);if(t=i?t.replace("fixture_",""):t,i)return sc(t).then(a=>{n(!1),o(a)});if(!e)throw new Error("Attempted to retrieve seat maps but the client key is missing.");try{let a=await lc(t,e);o(a)}catch(a){let s="An unknown error occurred while retrieving the offer.";a instanceof Error?(s=a.message,a.message.includes("Load failed")&&(s="The Duffel API is not available. Please try again later.")):nn(a)&&a.status===404&&(s="The offer you are looking for does not exist or has expired."),nn(a)&&a.status>=500&&a.status<600&&_e(new Error(s)),r(s)}finally{n(!1)}}async function fc(t,e){return(await so(e,`offers/${t}/seat_maps`)).data}async function dc(t,e,r,n,o){n(!0);let i=co(t);if(t=i?t.replace("fixture_",""):t,i)return cc(t).then(a=>{n(!1),o(a)});if(!e)throw new Error("Attemptted to retrieve seat maps but the client key is missing.");try{let a=await fc(t,e);o(a)}catch(a){let s="An unknown error occurred while retrieving the seat maps.";a instanceof Error?(s=a.message,a.message.includes("Load failed")&&(s="The Duffel API is not available. Please try again later.")):nn(a)&&(s=a.data.errors[0]?.message||"Received an unknown error from the Duffel API."),_e(new Error(s)),r()}finally{n(!1)}}var Di=t=>dp(t)&&(Mi(t)||ki(t)||wi(t)||Bi(t)),dp=t=>"onPayloadReady"in t&&"passengers"in t&&"services"in t,Mi=t=>"offer_id"in t&&t.offer_id.startsWith("fixture_"),ki=t=>"offer_id"in t&&"client_key"in t,wi=t=>"offer"in t&&"seat_maps"in t,Bi=t=>"offer"in t&&"client_key"in t;var pe=P(require("react"));var pc=require("react/jsx-runtime"),_r=()=>(0,pc.jsx)("span",{className:"textual-loading-indicator","aria-hidden":"true"});var mc=require("react/jsx-runtime"),ct=({backgroundColor:t,color:e,children:r})=>(0,mc.jsx)("div",{style:{backgroundColor:t,color:e,padding:"2px 8px",whiteSpace:"nowrap",borderRadius:"4px",fontWeight:"600",fontSize:"14px",lineHeight:"20px",textAlign:"center"},children:r});var hr=(t,e)=>{if(t.available_services.length===0)throw new Error("No services available");let r=t.available_services.find(n=>n.type===e);if(!r)throw new Error(`No ${e} services available`);return r.total_currency};var Ge=t=>(t||[]).reduce((e,{quantity:r})=>e+r,0);var pp={baggage:oo,cancel_for_any_reason:gr},Sr=(t,e)=>{let r=pp[e];if(!r)throw new Error(`Unknown service type: ${e}`);return t&&Array.isArray(t.available_services)&&t.available_services.some(n=>r(n)&&n.maximum_quantity>0)};var G=(t,e="en-GB",r={})=>n=>{try{let i=new Intl.NumberFormat(e,{style:"currency",currency:t,...r}).format(n);return r&&r.signDisplay&&(r.signDisplay==="always"||r.signDisplay==="exceptZero"&&n!==0)?i.replace(/^([+-])/,"$1 "):i}catch{return`${n} ${t}`}};var Oe=(t,e,r)=>t==1?`${t} ${e}`:`${t} ${r}`;var Dc=P(require("react"));var gc=P(Ne()),_c=P(require("react"));var he=require("react/jsx-runtime"),yr=({buttonTitle:t,title:e,icon:r,copy:n,onClick:o,children:i,isLoading:a,disabled:s,isSelected:c})=>{let l=_c.Children.toArray(i).length>0;return(0,he.jsxs)("button",{type:"button",title:t,...o&&{onClick:o},disabled:s,className:(0,gc.default)("ancillary-card",a&&"ancillary-card--loading"),style:{cursor:"pointer",background:"transparent",color:"var(--GREY-900)",border:"solid 1px rgba(226, 226, 232, 1)",display:"flex",rowGap:"4px",padding:"20px",borderRadius:"8px",justifyContent:"space-between",flexWrap:"wrap",flexDirection:"column",width:"100%",boxSizing:"border-box",fontSize:"16px",fontWeight:"400",lineHeight:"24px",letterSpacing:"0em",transition:"border-color 0.3s var(--TRANSITION-CUBIC-BEZIER) background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)"},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",marginBlock:"0",textAlign:"start",marginTop:"2px",columnGap:"12px",width:"100%"},children:[(0,he.jsx)("div",{children:c?(0,he.jsx)(A,{name:"check",className:"ancillary-card__selected-icon"}):(0,he.jsx)(A,{name:r})}),(0,he.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"start",width:"100%"},children:[(0,he.jsx)("p",{className:"p1--semibold",style:{marginBlock:"0"},children:e}),(0,he.jsx)("div",{className:"ancillary-card__children",children:l?i:(0,he.jsx)(A,{name:"expand_content",className:"ancillary-card__expand-icon"})})]})]}),(0,he.jsx)("p",{className:"p1--regular",style:{textAlign:"start",color:"var(--GREY-600)",marginLeft:"34px",marginBlock:"0"},children:n})]})};var Li=t=>{t?document.body.style.overflow="":document.body.style.overflow="hidden"};var Sc=P(Ne()),yc=P(require("react"));var hc=P(Ne());var Fi=require("react/jsx-runtime"),mp={primary:"icon-button--primary",outlined:"icon-button--outlined"},on=({icon:t,variant:e="primary",className:r,...n})=>(0,Fi.jsx)("button",{type:"button",className:(0,hc.default)("icon-button",mp[e],r),...n,children:(0,Fi.jsx)(A,{name:t})});var Er=require("react/jsx-runtime"),vr=({children:t,onClose:e,isOpen:r})=>(yc.useEffect(()=>(Li(!r),()=>Li(!0)),[r]),(0,Er.jsx)("div",{className:(0,Sc.default)("modal",r&&"modal--open"),style:{opacity:0},children:(0,Er.jsxs)("div",{role:"presentation",className:"modal--content",children:[t,(0,Er.jsx)(on,{icon:"close",onClick:e,title:"Close modal",className:"modal--close-button"})]})})),br=({children:t})=>(0,Er.jsx)("div",{className:"modal-body",children:t});var lo=t=>t.reduce((e,r)=>({[r.id]:r,...e}),{});var uo=t=>t.slices.reduce((e,r)=>[...e,...r.segments],new Array);var mo=P(require("react"));var fo=(t,e,r)=>t?t.given_name&&t.family_name?`${t.given_name} ${t.family_name}`:t.given_name?t.given_name:t.family_name?t.family_name:e?.given_name&&e?.family_name?`${e.given_name} ${e.family_name}`:e?.given_name?e.given_name:e?.family_name?e.family_name:`Passenger ${r}`:`Passenger ${r}`;var Ec=t=>{if(!t)return _e(new Error("getBaggageServiceDescription was not given any metadata")),null;if(!t.maximum_weight_kg&&!t.maximum_length_cm&&!t.maximum_height_cm&&!t.maximum_depth_cm)return null;let e=t.maximum_length_cm&&t.maximum_height_cm&&t.maximum_depth_cm,r="";e&&(r=` / ${t.maximum_height_cm} x ${t.maximum_length_cm} x ${t.maximum_depth_cm} cm`);let n="";return t.maximum_weight_kg&&(n=`Up to ${t.maximum_weight_kg}kg`),`${n}${r}`};var vc=(t,e,r,n)=>t.some(o=>o.id===n.id||o.serviceInformation?.type!=="carry_on"&&o.serviceInformation?.type!=="checked"||o.serviceInformation?.segmentId!==e||o.serviceInformation?.passengerId!==r?!1:o.serviceInformation?.type===n.metadata.type);var Cr=require("react/jsx-runtime"),bc=({id:t,min:e,max:r,value:n,onChange:o})=>(0,Cr.jsxs)("div",{className:"counter",id:t,children:[(0,Cr.jsx)(on,{icon:"minus",title:"Remove one",id:`${t}-minus`,"data-testid":`${t}-minus`,variant:"outlined",disabled:n<=e,onClick:()=>o(Math.max(n-1,e))}),(0,Cr.jsx)("div",{className:"counter__count-label",children:n}),(0,Cr.jsx)(on,{icon:"add",title:"Add one",id:`${t}-plus`,"data-testid":`${t}-plus`,variant:"outlined",disabled:n>=r,onClick:()=>o(Math.min(n+1,r))})]});var lt=require("react/jsx-runtime"),Cc=({segmentId:t,passengerId:e,availableService:r,quantity:n,onQuantityChanged:o,selectedServices:i})=>{let a=r.metadata.type==="carry_on"?"Cabin bag":"Checked bag",s=G(r.total_currency)(+r.total_amount),c=Ec(r.metadata),l=vc(i,t,e,r);return(0,lt.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,lt.jsxs)("div",{children:[(0,lt.jsxs)("p",{style:{margin:0},className:"p2--regular",children:[a,(0,lt.jsx)("span",{style:{marginInline:"4px",color:"var(--GREY-400)"},children:"\u2022"}),(0,lt.jsx)("span",{className:"p2--semibold","data-testid":`price-label--${r.id}--${e}`,children:s})]}),(0,lt.jsx)("p",{style:{margin:0,color:"var(--GREY-600)"},className:"p3--regular",children:c})]}),(0,lt.jsx)(bc,{id:`counter--${r.id}--${e}`,min:0,value:n,onChange:o,max:l?0:r.maximum_quantity})]})};var Rc=require("react/jsx-runtime"),Tc=({includedBaggage:t})=>{let{carryOnBagsQuantity:e,checkedBagsQuantity:r}=t.reduce((o,{type:i,quantity:a})=>({carryOnBagsQuantity:o.carryOnBagsQuantity+(i==="carry_on"?a:0),checkedBagsQuantity:o.checkedBagsQuantity+(i==="checked"?a:0)}),{carryOnBagsQuantity:0,checkedBagsQuantity:0}),n=new Array;return e>0&&n.push(Oe(e,"cabin bag","cabin bags")),r>0&&n.push(Oe(r,"checked bag","checked bags")),(0,Rc.jsxs)("div",{style:{marginBlock:"8px",padding:"8px 12px",color:" var(--GREEN-300)",backgroundColor:" var(--GREEN-100)",borderRadius:"6px"},className:"p2--regular",children:[n.join(" and ")," included with ticket"]})};var Tt=require("react/jsx-runtime"),xc=({segmentId:t,passengerId:e,passengerName:r,includedBaggage:n,passengerServicesForSegment:o,selectedServices:i,setSelectedServices:a})=>{let s=n.reduce((c,l)=>c+l.quantity,0);return(0,Tt.jsxs)("div",{style:{marginTop:"24px"},children:[(0,Tt.jsx)("h3",{style:{margin:0},className:"p1--semibold",children:r}),s?(0,Tt.jsx)(Tc,{includedBaggage:n}):null,(0,Tt.jsx)("div",{style:{display:"flex",rowGap:"8px",flexDirection:"column"},children:o.map(c=>(0,Tt.jsx)(Cc,{passengerId:e,segmentId:t,availableService:c,selectedServices:i,quantity:i.find(({id:l})=>l==c.id)?.quantity||0,onQuantityChanged:l=>gp(l,t,e,r,c,i,a)},c.id))}),o.length===0&&(0,Tt.jsx)("p",{style:{color:"var(--GREY-700)",margin:0},children:"Extra baggage is not available for this passenger on this flight"})]})},gp=(t,e,r,n,o,i,a)=>{let s=i.findIndex(({id:l})=>o.id===l),c=Array.from(i);s<0?c.push({id:o.id,quantity:t,serviceInformation:{segmentId:e,passengerId:r,passengerName:n,total_amount:o.total_amount,total_currency:o.total_currency,...o.metadata}}):c[s].quantity=t,a(c.filter(({quantity:l})=>l!==0))};var Hi=require("react/jsx-runtime"),Ic=({offer:t,segment:e,passengersById:r,selectedServices:n,setSelectedServices:o})=>(0,Hi.jsx)(br,{children:e.passengers.map(({passenger_id:i,baggages:a},s)=>(0,Hi.jsx)(xc,{segmentId:e.id,passengerId:i,passengerName:fo(r[i],t.passengers.find(({id:c})=>c===i),s+1),includedBaggage:a,passengerServicesForSegment:t.available_services.filter(({type:c,passenger_ids:l,segment_ids:f})=>c==="baggage"&&l.includes(i)&&f.includes(e.id)),selectedServices:n,setSelectedServices:o},i))});var ut=require("react/jsx-runtime"),Nc=({selectedServices:t,servicePrices:e,currency:r,isFirstSegment:n,isLastSegment:o,onNextSegmentButtonClicked:i,onPreviousSegmentButtonClicked:a,onClose:s})=>{let c=Ge(t),l=rn(e,t),f=G(r)(l),u=n&&n;return(0,ut.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,ut.jsxs)("div",{className:"flex--space-between",children:[(0,ut.jsxs)("div",{children:["Price for ",Oe(c,"extra bag","extra bags")]}),(0,ut.jsxs)("div",{className:"h3--semibold","data-testid":"baggage-total-amount-label",children:["+ ",f]})]}),(0,ut.jsxs)("div",{style:u?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!u&&(0,ut.jsx)(ee,{size:48,variant:"outlined",disabled:n,onClick:()=>a(),children:"Back"}),(0,ut.jsx)(ee,{size:48,"data-testid":"confirm-selection-for-baggage",onClick:()=>o?s():i(),children:o?"Confirm":"Next"})]})]})};var po=t=>{let e=new Date(t);if(isNaN(e.valueOf()))_e(new Error(`formatDateString attempted to parse an invalid date string: ${t}`));else return _p(e)},_p=t=>{let{format:e}=new Intl.DateTimeFormat(void 0,{dateStyle:"medium"});return e(t)};var Ye=require("react/jsx-runtime"),Oc=({segmentCount:t,currentSegmentIndex:e,currentSegment:r,setCurrentSegmentIndex:n})=>(0,Ye.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,Ye.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((o,i)=>i===e?(0,Ye.jsx)(hp,{},`segment_${i}`):(0,Ye.jsx)(Ac,{onClick:()=>n(i)},`segment_${i}`))}),(0,Ye.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginTop:"12px"}:{},children:["Flight to ",r.destination.iata_code,(0,Ye.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:po(r.departing_at)})]})]}),Ac=({onClick:t,style:e})=>(0,Ye.jsx)("button",{type:"button",onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...e}}),hp=()=>(0,Ye.jsx)(Ac,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var Tr=require("react/jsx-runtime"),Pc=({isOpen:t,offer:e,passengers:r,onClose:n,selectedServices:o})=>{let[i,a]=(0,mo.useState)(0),[s,c]=mo.default.useState(o);if(!e)return null;let l=uo(e),f=l[i],u=lo(r),m=mr(e.available_services),h=e.base_currency;return Sr(e,"baggage")&&(h=hr(e,"baggage")),(0,Tr.jsxs)(vr,{isOpen:t,onClose:()=>n(o),children:[(0,Tr.jsx)(Oc,{segmentCount:l.length,currentSegment:f,currentSegmentIndex:i,setCurrentSegmentIndex:S=>a(S)}),(0,Tr.jsx)(Ic,{offer:e,selectedServices:s,passengersById:u,segment:f,setSelectedServices:c}),(0,Tr.jsx)(Nc,{currency:h,selectedServices:s,servicePrices:m,isFirstSegment:i===0,isLastSegment:i+1===l.length,onNextSegmentButtonClicked:()=>a(i+1),onPreviousSegmentButtonClicked:()=>a(i-1),onClose:()=>n(s)})]})};var $e=require("react/jsx-runtime"),Mc=({isLoading:t,offer:e,passengers:r,selectedServices:n,setSelectedServices:o})=>{let[i,a]=Dc.default.useState(!1),s=Sr(e,"baggage"),c=Ge(n),l=c>0,f=Ct(e,n),u=e?.base_currency||"";s&&(u=hr(e,"baggage"));let m=e?G(u)(f):"0",h=s&&l?`${Oe(c,"bag","bags")} added for ${m}`:"Add any extra baggage you need for your trip";return(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsxs)(yr,{buttonTitle:"Select extra baggage",title:"Extra baggage",copy:h,icon:"cabin_bag",onClick:s?()=>a(!0):null,isLoading:t,disabled:!t&&!s,isSelected:l,children:[t&&(0,$e.jsxs)(ct,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,$e.jsx)(_r,{})]}),!t&&!s&&(0,$e.jsx)(ct,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,$e.jsx)(Pc,{isOpen:!!(i&&e),offer:e,passengers:r,onClose:S=>{let y=JSON.parse(JSON.stringify(S));o(y),a(!1)},selectedServices:n})]})};var Fc=P(require("react"));var an=require("react/jsx-runtime"),go=({children:t})=>(0,an.jsxs)("li",{className:"cfar-modal-list-item",children:[(0,an.jsx)(A,{name:"check"}),(0,an.jsx)("p",{children:t})]});var ft=require("react/jsx-runtime"),kc=({offerCurrency:t,service:e})=>(0,ft.jsxs)(br,{children:[(0,ft.jsxs)("ul",{style:{padding:0},children:[(0,ft.jsx)(go,{children:"Cancel your trip for any reason"}),(0,ft.jsxs)(go,{children:["Guaranteed refund of"," ",G(t)(+e.metadata.refund_amount)]}),(0,ft.jsx)(go,{children:"Redeemable up to 24 hours before first flight departure"})]}),(0,ft.jsxs)("a",{href:e.metadata.terms_and_conditions_url,rel:"noopener noreferrer",target:"_blank",className:"p2--regular",style:{color:"var(--GREY-600)"},children:["Terms and conditions",(0,ft.jsx)(A,{name:"north_east",size:16,style:{display:"inline",verticalAlign:"middle",marginLeft:"4px"}})]})]});var Rt=require("react/jsx-runtime"),wc=({service:t,selectedServices:e,onAddCfarService:r,onRemoveCfarService:n,onClose:o})=>{let i=e.some(({id:s})=>s==t.id),a=G(t.total_currency)(+t.total_amount);return(0,Rt.jsxs)("div",{className:"cfar-modal-footer",children:[(0,Rt.jsx)(ee,{size:48,variant:i?"destructive":"outlined",onClick:i?n:o,children:i?"Remove protection":"Don\u2019t protect trip"}),!i&&(0,Rt.jsxs)(ee,{size:48,"data-testid":"confirm-selection-for-cfar",onClick:r,children:["Add protection for ",a]}),i&&(0,Rt.jsx)(Sp,{})]})},Sp=()=>(0,Rt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",columnGap:"8px",backgroundColor:"var(--GREY-100)",padding:"var(--space-12)",borderRadius:"var(--BUTTON-RADIUS)"},children:[(0,Rt.jsx)(A,{size:20,name:"shield_with_moon",style:{fill:"var(--SECONDARY, rgb(var(--ACCENT)))"}}),"Your trip is protected"]});var Ui=require("react/jsx-runtime"),Bc=()=>(0,Ui.jsx)("div",{style:{padding:"24px 24px 16px"},children:(0,Ui.jsx)("h2",{className:"h3--semibold",style:{marginBlock:0},children:"Cancel for any reason"})});var dt=require("react/jsx-runtime"),Lc=({isOpen:t,offerCurrency:e,service:r,onClose:n,selectedServices:o})=>(0,dt.jsxs)(vr,{isOpen:t,onClose:()=>n(o),children:[(0,dt.jsx)(Bc,{}),r&&e&&(0,dt.jsxs)(dt.Fragment,{children:[(0,dt.jsx)(kc,{service:r,offerCurrency:e}),(0,dt.jsx)(wc,{service:r,selectedServices:o,onAddCfarService:()=>n([{id:r.id,quantity:1,serviceInformation:{type:"cancel_for_any_reason",total_amount:r.total_amount,total_currency:r.total_currency,...r.metadata}}]),onRemoveCfarService:()=>n([]),onClose:()=>n(o)})]})]});var We=require("react/jsx-runtime"),Hc=({isLoading:t,offer:e,selectedServices:r,setSelectedServices:n})=>{let[o,i]=Fc.default.useState(!1),a=Sr(e,"cancel_for_any_reason"),c=Ge(r)>0,l=e?.base_currency||"";a&&(l=hr(e,"cancel_for_any_reason"));let f=Ct(e,r),u=e?G(l)(f):"0",m=e?.available_services.find(gr),h=a&&c?`Your trip is protected for ${u}`:"Protect your purchase if you decide to cancel";return(0,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)(yr,{buttonTitle:"Add cancel for any reason",title:"Cancel for any reason",copy:h,icon:"shield_with_moon",onClick:a?()=>i(!0):null,isLoading:t,disabled:!t&&!a,isSelected:c,children:[t&&(0,We.jsxs)(ct,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,We.jsx)(_r,{})]}),!t&&!a&&(0,We.jsx)(ct,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,We.jsx)(Lc,{isOpen:!!(o&&e&&m),offerCurrency:e?.base_currency,service:m,onClose:S=>{i(!1),n(S)},selectedServices:r})]})};var Uc=(t,e)=>{for(let r of t)for(let n of r.cabins)for(let o of n.rows)for(let i of o.sections)for(let a of i.elements)if(e(a))return a};var _o=t=>Uc(t,r=>r.type==="seat"&&r.available_services.length>0)?.available_services[0]?.total_currency;var yl=P(require("react"));var Gc=t=>t.flatMap(e=>e.passengers.map((r,n)=>({passenger:r,passengerIndex:n,segment:e})));var qi=P(require("react"));var Yc=(t,e)=>e.cabins.filter(r=>r.deck===t);var $c=t=>{let e=new Set;for(let r of t)for(let n of r.rows)for(let o of n.sections)for(let i of o.elements)i.type!=="seat"&&i.type!=="empty"&&e.add(i.type);return e};var Wc=(t,e)=>!!(t.wings&&t.wings.first_row_index<=e&&t.wings.last_row_index>=e);var fl=P(Ne()),dl=P(require("react"));var Vc=P(Ne());var Gi=require("react/jsx-runtime"),jc=({value:t,onChange:e,options:r})=>(0,Gi.jsx)("div",{className:"seat-map__tab-select",children:r.map(n=>(0,Gi.jsx)("button",{type:"button",className:(0,Vc.default)("seat-map__tab-select-option",{"seat-map__tab-select-option--selected":n===t}),onClick:()=>t!==n&&e(n),children:n},n))});var zc=require("react/jsx-runtime"),qc=({value:t,setValue:e})=>{let r=["Lower deck","Upper deck"];return(0,zc.jsx)(jc,{options:r,value:r[t],onChange:n=>e(r.indexOf(n))})};var te=require("react/jsx-runtime"),Zc=({symbols:t})=>(0,te.jsxs)("div",{className:"seat-map__legend",children:[(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--fee-payable","aria-label":"Additional cost for seat",children:(0,te.jsx)(A,{name:"seat_paid_indicator",className:"seat-map__legend-seat--fee-payable-indicator",size:12})}),"Additional Cost"]}),(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--included","aria-label":"Included seat"}),"Included"]}),(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--selected","aria-label":"Selected seat"}),"Selected"]}),(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat","aria-label":"Unavailable seat",children:(0,te.jsx)(A,{name:"close",size:14})}),"Unavailable"]}),[...t].map(e=>(0,te.jsxs)("span",{className:"seat-map__legend-item seat-map__legend-item--symbol",children:[(0,te.jsx)(A,{name:e,size:20}),e.split("_")[0]]},e))]});var Kc=t=>{let e=Object.values(t.sections).map(r=>r.elements).reduce((r,n)=>r.concat(n),[]).filter(r=>r.type==="seat");return e.length>0?e[0].designator.substring(0,e[0].designator.length-1):null};var cl=P(Ne()),Wi=P(require("react"));var Xc=P(Ne());var Yi=require("react/jsx-runtime"),yp=["bassinet","exit_row"],Jc=({type:t})=>(0,Yi.jsx)("div",{className:(0,Xc.default)("map-element map-element--amenity",{"map-element--wrapped":!yp.includes(t)}),"aria-label":t.toString(),children:(0,Yi.jsx)(A,{name:t,size:16})});var Qc=require("react/jsx-runtime"),sn=()=>(0,Qc.jsx)("div",{className:"map-element map-element--empty"});var el=P(Ne());var ho=require("react/jsx-runtime"),tl=({isRight:t})=>(0,ho.jsx)("div",{className:(0,el.default)("map-element map-element--exit",{"map-element--exit--right":t}),children:t?(0,ho.jsx)(A,{name:"exit_row_right"}):(0,ho.jsx)(A,{name:"exit_row"})});var rl=(t="")=>t.split(" ").map(e=>e[0]).slice(0,2).join("");var il=P(Ne());var xt=require("react/jsx-runtime"),nl=({seat:t,service:e})=>{let r=e?G(e.total_currency)(+e.total_amount):"";return(0,xt.jsxs)("div",{className:"seat-info",children:[(0,xt.jsxs)("div",{className:"seat-info__details",children:[(0,xt.jsx)("strong",{children:t?.designator}),(0,xt.jsxs)("span",{children:[t?.name||"Seat"," "]}),(0,xt.jsx)("strong",{children:r})]}),t?.disclosures.map((n,o)=>(0,xt.jsx)("div",{className:"seat-info__disclosure",children:n},o))]})};var $i=require("react/jsx-runtime"),ol=({seat:t})=>(0,$i.jsx)("span",{className:"map-element map-element__seat","aria-label":`${t.designator} ${t.name||"Seat"} Unavailable`,children:(0,$i.jsx)(A,{name:"close",size:14})});var pt=require("react/jsx-runtime"),al=({element:t,currentPassengerId:e,currentSegmentId:r,currentPassengerName:n,onSeatToggled:o,selectedServicesMap:i})=>{let a=t.available_services.find(M=>M.passenger_id===e);if(!a)return(0,pt.jsx)(ol,{seat:t});let s=Object.values(i).find(M=>M.serviceInformation?.designator===t.designator&&M.serviceInformation?.segmentId===r),c=s!=null,l=c?rl(s.serviceInformation?.passengerName):t.designator.charAt(t.designator.length-1),f=!isNaN(+a?.total_amount)&&+a?.total_amount!=0,u=!c&&a.passenger_id===e,m=!c||c&&r===s.serviceInformation?.segmentId&&e===s.serviceInformation?.passengerId,h=(0,il.default)("map-element","map-element__seat",{"map-element--available":u,"map-element--selected":c,"map-element--actionable":m}),S=G(a.total_currency)(+a.total_amount),y=c&&r===s.serviceInformation?.segmentId&&e===s.serviceInformation?.passengerId;return(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsxs)("button",{type:"button","data-testid":`seat-${t.designator}`,id:t.designator,className:h,onClick:()=>{m&&o({quantity:c?0:1,id:a.id,serviceInformation:{type:"seat",segmentId:r,passengerId:e,passengerName:n,designator:t.designator,disclosures:t.disclosures,total_amount:a.total_amount,total_currency:a.total_currency}})},"aria-label":`${t.designator} ${t.name||"Seat"} ${S}`,children:[f&&(0,pt.jsx)(A,{name:"seat_paid_indicator",className:"map-element--fee-payable",size:16}),l]}),y&&(0,pt.jsx)(nl,{seat:t,service:a})]})};var It=require("react/jsx-runtime"),sl=({element:t,elementIndex:e,sectionIndex:r,onSeatToggled:n,selectedServicesMap:o,currentPassengerId:i,currentSegmentId:a,currentPassengerName:s})=>(0,It.jsx)(It.Fragment,{children:io(t)?(0,It.jsx)(al,{currentSegmentId:a,currentPassengerId:i,currentPassengerName:s,selectedServicesMap:o,element:t,onSeatToggled:n},e):t.type==="empty"?(0,It.jsx)(sn,{},e):t.type==="exit_row"?(0,It.jsx)(tl,{isRight:r>0},e):(0,It.jsx)(Jc,{type:t.type},e)});var mt=require("react/jsx-runtime"),ll=({row:t,rowNumber:e,hasWings:r,section:n,sectionIndex:o,onSeatToggled:i,selectedServicesMap:a,currentPassengerId:s,currentPassengerName:c,currentSegmentId:l})=>{let f=Object.keys(t.sections).length,u=f===1;return(0,mt.jsxs)(Wi.Fragment,{children:[(0,mt.jsx)("div",{className:(0,cl.default)("map-section",{"map-section--left":o===0,"map-section--right":u?!1:o===f-1,"map-section--wing":r}),children:n.elements.length>0?n.elements.map((m,h)=>(0,mt.jsx)(Wi.Fragment,{children:(0,mt.jsx)(sl,{sectionIndex:o,elementIndex:h,element:m,selectedServicesMap:a,onSeatToggled:i,currentPassengerId:s,currentSegmentId:l,currentPassengerName:c})},h)):(0,mt.jsx)(sn,{})}),(o<f-1||u&&o<f)&&(0,mt.jsx)("span",{className:"map-section__aisle",children:e}),u&&o===t.sections.length-1&&(0,mt.jsx)(sn,{})]},o)};var cn=require("react/jsx-runtime"),ul=({row:t,hasWings:e,onSeatToggled:r,selectedServicesMap:n,currentPassengerId:o,currentPassengerName:i,currentSegmentId:a})=>{let s=Kc(t);return(0,cn.jsx)(cn.Fragment,{children:t.sections.map((c,l)=>(0,cn.jsx)(ll,{row:t,rowNumber:s,hasWings:e,section:c,sectionIndex:l,selectedServicesMap:n,onSeatToggled:r,currentPassengerId:o,currentPassengerName:i,currentSegmentId:a},l))})};var ln=require("react/jsx-runtime"),Vi=()=>(0,ln.jsxs)(dr,{children:[(0,ln.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Seat selection unavailable"}),(0,ln.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Unfortunately seat selection is not available for this flight. A seat will be allocated by the airline."})]});var Ve=require("react/jsx-runtime"),pl=({seatMap:t,onSeatToggled:e,selectedServicesMap:r,currentPassengerId:n,currentPassengerName:o,currentSegmentId:i})=>{let[a,s]=dl.useState(0);if(!t||!t.cabins||!t.cabins.length)return(0,Ve.jsx)(Vi,{});let c=Yc(a,t),l=c.length!==t.cabins.length,f=t.cabins.some(m=>m.wings);if(!c||!c.length)return(0,Ve.jsx)(Vi,{});let u=$c(c);return(0,Ve.jsxs)("div",{className:(0,fl.default)("seat-map",{"seat-map--wings":f}),children:[l&&(0,Ve.jsx)(qc,{value:a,setValue:m=>{s(m)}}),(0,Ve.jsx)("div",{className:"seat-map__legend-container",children:(0,Ve.jsx)(Zc,{symbols:u})}),c.map((m,h)=>(0,Ve.jsx)("div",{className:"seat-map__map-container",style:{"--CABIN-AISLES":m.aisles},children:m.rows.map((S,y)=>(0,Ve.jsx)(ul,{row:S,hasWings:Wc(m,y),onSeatToggled:e,selectedServicesMap:r,currentPassengerId:n,currentPassengerName:o,currentSegmentId:i},y))},`cabin-${h}`))]})};var ji=require("react/jsx-runtime"),ml=t=>(0,ji.jsx)(br,{children:(0,ji.jsx)(pl,{...t})});var gt=require("react/jsx-runtime"),gl=({selectedServices:t,servicePrices:e,currency:r,isFirstSegment:n,isLastSegment:o,onNextSegmentButtonClicked:i,onPreviousSegmentButtonClicked:a,onClose:s,seatMaps:c})=>{let l=Ge(t),f=rn(e,t,c),u=G(r)(f),m=n&&o;return(0,gt.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,gt.jsxs)("div",{className:"flex--space-between",children:[(0,gt.jsxs)("div",{children:["Price for ",Oe(l,"seat","seats")]}),(0,gt.jsxs)("div",{className:"h3--semibold",children:["+ ",u]})]}),(0,gt.jsxs)("div",{style:m?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!m&&(0,gt.jsx)(ee,{size:48,disabled:n,variant:"outlined",onClick:()=>a(),children:"Back"}),(0,gt.jsx)(ee,{size:48,"data-testid":"confirm-selection-for-seats",onClick:()=>o?s():i(),children:o?"Confirm":"Next"})]})]})};var Ae=require("react/jsx-runtime"),_l=({segmentAndPassengerPermutationsCount:t,currentSegmentAndPassengerPermutationsIndex:e,currentSegment:r,currentPassengerName:n,setCurrentSegmentAndPassengerPermutationsIndex:o})=>(0,Ae.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,Ae.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((i,a)=>a===e?(0,Ae.jsx)(Ep,{},`segment_${a}`):(0,Ae.jsx)(hl,{onClick:()=>o(a)},`segment_${a}`))}),(0,Ae.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginBlock:"12px 0px"}:{},children:["Flight to ",r.destination.iata_code,(0,Ae.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:po(r.departing_at)})]}),(0,Ae.jsx)("p",{className:"h3--semibold",style:{color:"var(--GREY-600)",marginBlock:"0 4px"},children:n})]}),hl=({onClick:t,style:e})=>(0,Ae.jsx)("button",{type:"button",onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...e}}),Ep=()=>(0,Ae.jsx)(hl,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var Rr=require("react/jsx-runtime"),Sl=({isOpen:t,offer:e,passengers:r,seatMaps:n,selectedServices:o,onClose:i})=>{let[a,s]=qi.default.useState(0),[c,l]=qi.default.useState(o),f=c.reduce((K,X)=>({...K,[X.id]:X}),{});if(!e||!n)return null;let u=uo(e),m=lo(r),h=mr(e.available_services),S=Gc(u),{passenger:{passenger_id:y},passengerIndex:M,segment:{id:N}}=S[a],b=u.find(({id:K})=>K===N),ce=m[y],j=n.find(K=>K.segment_id===N),qe=fo(ce,e.passengers[M],M+1),ye=K=>{let X=new Array;for(let De of c){let $t=De.id===K.id&&K.quantity===0,xr=De.serviceInformation?.segmentId===N&&De.serviceInformation?.passengerId===y;!$t&&!xr&&(X=[...X,De])}K.quantity>0&&(X=[...X,K]),l(X)},Yt=_o(n)??e.total_currency;return(0,Rr.jsxs)(vr,{isOpen:t,onClose:()=>i(o),children:[(0,Rr.jsx)(_l,{segmentAndPassengerPermutationsCount:S.length,currentSegment:b,currentPassengerName:qe,currentSegmentAndPassengerPermutationsIndex:a,setCurrentSegmentAndPassengerPermutationsIndex:s}),(0,Rr.jsx)(ml,{selectedServicesMap:f,seatMap:j,onSeatToggled:ye,currentPassengerId:y,currentPassengerName:qe,currentSegmentId:N}),(0,Rr.jsx)(gl,{seatMaps:n,currency:Yt,selectedServices:c,servicePrices:h,isFirstSegment:a===0,isLastSegment:a+1===S.length,onNextSegmentButtonClicked:()=>{s(a+1)},onPreviousSegmentButtonClicked:()=>{s(a-1)},onClose:()=>i(c)})]})};var je=require("react/jsx-runtime"),El=({isLoading:t,offer:e,seatMaps:r,passengers:n,selectedServices:o,setSelectedServices:i})=>{let[a,s]=yl.default.useState(!1),c=Array.isArray(r)&&r.length>0,l=Ge(o),f=l>0,u=Ct(e,o,r),m=e?.base_currency??"";r&&(m=_o(r)??m);let h=e?G(m)(u):"0",S=c&&f?`${Oe(l,"seat","seats")} selected for ${h}`:"Specify where on the plane you\u2019d like to sit";return(0,je.jsxs)(je.Fragment,{children:[(0,je.jsxs)(yr,{buttonTitle:"Select seats",title:"Seat selection",copy:S,icon:"flight_class",onClick:c?()=>s(!0):null,isLoading:t,disabled:t&&!c,isSelected:f,children:[t&&(0,je.jsxs)(ct,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,je.jsx)(_r,{})]}),!t&&!c&&(0,je.jsx)(ct,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,je.jsx)(Sl,{isOpen:!!(e&&r&&a),seatMaps:r,offer:e,passengers:n,selectedServices:o,onClose:y=>{i(y),s(!1)}})]})};var Se=require("react/jsx-runtime"),vp="https://assets.duffel.com/components/3.1.9",bp=`${vp}/global.css`,Cp=t=>{if(to(t.debug||!1),st("Properties passed into the component:",t),!Di(t))throw new Error(`The props (${Object.keys(t)}) passed to DuffelAncillaries are invalid. \`onPayloadReady\`, \`passengers\` and \`services\` are always required. Then, depending on your use case you may have one of the following combinations of required props: \`offer_id\` and \`client_key\`, \`offer\` and \`seat_maps\` or \`offer\` and \`client_key\`.Please refer to the documentation for more information and working examples: https://duffel.com/docs/guides/ancillaries-component`);if(t.services.length===0)throw new Error('You must provide at least one service in the "services" prop. Valid services: ["bags", "seats", "cancel_for_any_reason"]');let e=Mi(t),r=ki(t),n=wi(t),o=Bi(t),i=t.services.includes("seats")&&!("seat_maps"in t)&&(e||r||o),[a,s]=pe.useState(t.passengers),[c,l]=pe.useState(t.offer),[f,u]=pe.useState(r),[m,h]=pe.useState(n?t.seat_maps:void 0),[S,y]=pe.useState(i),[M,N]=pe.useState(null),[b,ce]=pe.useState([]),[j,qe]=pe.useState([]),[ye,Yt]=pe.useState([]),K=tc(t.markup,t.priceFormatters),X=w=>{let le="This offer has expired.";if(ic(w)){N(le);return}else{let Nr=new Date(w?.expires_at)?.getTime()-Date.now(),Ot=1e3*60*60*24;Nr<Ot&&setTimeout(()=>N(le),Nr)}let Ir=rc(w,K);l(Ir)},De=w=>{let le=nc(w,K.seats);h(le)};if(pe.useEffect(()=>{Gn("props",{"props.services":t.services,"props.passengers.length":t.passengers.length,"props.offer_id":t.offer_id,"props.client_key":t.client_key,"props.offer?.id":t.offer?.id,"props.seat_maps?.[0]?.id":t.seat_maps?.[0]?.id}),(r||e)&&uc(t.offer_id,e?null:t.client_key,N,u,w=>{if(X(w),w.passengers.length!==a.length)throw new Error(`The number of passengers given to \`duffel-ancillaries\` (${t.passengers.length}) doesn't match the number of passengers on the given offer (${w.passengers.length}).`);e&&s(t.passengers.map((le,Ir)=>({...le,id:w.passengers[Ir].id})))}),i&&dc(r||e?t.offer_id:t.offer.id,e?null:t.client_key,()=>De([]),y,De),o&&X(t.offer),n&&(X(t.offer),De(t.seat_maps))},[t.offer_id,t.client_key,t.offer?.id,t.seat_maps?.[0]?.id]),pe.useEffect(()=>{if(!c)return;let w=ec({baggageSelectedServices:b,seatSelectedServices:j,cfarSelectedServices:ye,offer:c,passengers:a,seatMaps:m});if(oc(w)){let le={offer_total_amount:c.total_amount,offer_total_currency:c.total_currency,offer_tax_amount:c.tax_amount,offer_tax_currency:c.tax_currency,baggage_services:b,seat_services:j,cancel_for_any_reason_services:ye};st("Payload ready",{"Order creation payload":w,"Services metadata":le}),t.onPayloadReady(w,le)}},[b,j,ye]),!Di(t))return null;let $t=`${72*t.services.length+32*(t.services.length-1)}px`,xr={display:"flex",width:"100%",flexDirection:"column",rowGap:"12px",...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&ao(t.styles.accentColor)&&{"--SECONDARY":"var(--GREY-900)","--TERTIARY":"var(--GREY-400)"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return st("Component's internal state:",{isOfferLoading:f,isSeatMapLoading:S,baggageSelectedServices:b,seatSelectedServices:j,cfarSelectedServices:ye,offer:c,seatMaps:m,error:M}),(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)("link",{rel:"stylesheet",href:bp}),(0,Se.jsx)("div",{className:"duffel-components",style:xr,children:(0,Se.jsxs)(pr,{children:[M&&(0,Se.jsx)(Qs,{height:$t,message:M}),!M&&t.services.map(w=>{if(w==="bags")return(0,Se.jsx)(Mc,{isLoading:f,offer:c,passengers:a,selectedServices:b,setSelectedServices:ce},"bags");if(w==="seats")return(0,Se.jsx)(El,{isLoading:f||S,seatMaps:m,offer:c,passengers:a,selectedServices:j,setSelectedServices:qe},"seats");if(w==="cancel_for_any_reason")return(0,Se.jsx)(Hc,{isLoading:f,offer:c,selectedServices:ye,setSelectedServices:Yt},"cancel_for_any_reason")})]})})]})};var Nt=P(bl());var Tl="https://js.stripe.com/v3",Tp=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Cl="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Rp=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Tl,'"]')),r=0;r<e.length;r++){var n=e[r];if(Tp.test(n.src))return n}return null},xp=function(e){var r=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(Tl).concat(r);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(n),n},Ip=function(e,r){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"1.54.0",startTime:r})},yo=null,Np=function(e){return yo!==null||(yo=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&e&&console.warn(Cl),window.Stripe){r(window.Stripe);return}try{var o=Rp();o&&e?console.warn(Cl):o||(o=xp(e)),o.addEventListener("load",function(){window.Stripe?r(window.Stripe):n(new Error("Stripe.js not available"))}),o.addEventListener("error",function(){n(new Error("Failed to load Stripe.js"))})}catch(i){n(i);return}})),yo},Op=function(e,r,n){if(e===null)return null;var o=e.apply(void 0,r);return Ip(o,n),o},Rl=Promise.resolve().then(function(){return Np(null)}),xl=!1;Rl.catch(function(t){xl||console.warn(t)});var Il=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];xl=!0;var o=Date.now();return Rl.then(function(i){return Op(i,r,o)})};var Pe=P(require("react"));var Z=require("react/jsx-runtime"),Ap="https://assets.duffel.com/components/3.1.9",Pp=`${Ap}/global.css`,Dp="card",Mp="3.1.9",kp={color:"var(--GREY-900)",fontFamily:'"-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "sans-serif"',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#ababb4"}},wp={color:"#ef4444",iconColor:"#ef4444"},Bp=({styles:t,paymentIntentClientToken:e,onSuccessfulPayment:r,onFailedPayment:n})=>{let[o,i]=Pe.useState(null),[a,s]=Pe.useState(!1),[c,l]=Pe.useState(!1),[f,u]=Pe.useState(!1),[m,h]=Pe.useState(""),S=(0,Nt.useStripe)(),y=(0,Nt.useElements)();return Pe.useEffect(()=>{if(y&&!o){let N=y?.getElement(Dp);N&&i(N)}},[y,o]),Pe.useEffect(()=>{o&&o.on("change",N=>{let{error:b,complete:ce}=N;b?(l(!0),h(b.message)):l(!1),s(!!ce)})},[o]),e?(0,Z.jsx)("div",{className:"card-payment__container",children:(0,Z.jsxs)("form",{onSubmit:async N=>{if(N.preventDefault(),!(!S||!y)&&o){u(!0);let b=atob(e),ce=JSON.parse(b),{client_secret:j}=ce,qe=await S.confirmCardPayment(j,{payment_method:{card:o,metadata:{duffel_components_version:Mp||"failed-to-get-version"}}});if(u(!1),qe.error){let{error:ye}=qe;n(ye)}else r()}},children:[f&&(0,Z.jsx)("div",{className:"card-payment--in-progress","aria-live":"polite","aria-busy":"true"}),(0,Z.jsx)(Nt.CardElement,{className:"card-details",options:{style:{base:{...kp,...t?.fontFamily&&{fontFamily:t.fontFamily}},invalid:{...wp}}}}),(0,Z.jsx)("div",{className:"card-payment__container--invalid",role:"alert",children:c&&m}),(0,Z.jsx)(ee,{className:"card-payment__pay-button",type:"submit",disabled:!a||f,"aria-label":"Pay",children:f?"Processing...":"Pay"})]})}):null},Lp=t=>{let[e,r]=Pe.useState(null);to(t.debug||!1);let n=atob(t.paymentIntentClientToken),o;try{o=JSON.parse(n)}catch{throw new Error("Invalid Duffel payment intent client token provided")}let{publishable_key:i}=o;Pe.useEffect(()=>{if(!e&&i){let s=Il(i);s&&r(s)}},[e,i]);let a={...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&ao(t.styles.accentColor)&&{"--SECONDARY":"black","--TERTIARY":"grey"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("link",{rel:"stylesheet",href:Pp}),(0,Z.jsx)("div",{className:"duffel-components",style:a,children:(0,Z.jsx)(pr,{children:(0,Z.jsx)(Nt.Elements,{stripe:e,children:(0,Z.jsx)(Bp,{...t})})})})]})};
30
+ http://duffel.com/docs/guides/ancillaries-component`),qs=!0},Ks=t=>{Zs()?console.info(Oi,t):Zr({category:"log",message:t})};function st(t,e){let r=[];Array.isArray(e)?r=e:r=Object.entries(e).map(([n,o])=>({property:n,value:o})),Zs()?(console.groupCollapsed(Oi,t),r.forEach(n=>{console.info(n)}),console.groupEnd()):Zr({category:"log.group",message:t,data:e})}var v=require("react/jsx-runtime"),Xs={add:(0,v.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),apartment:(0,v.jsx)("path",{d:"M3.8496 19.9752V7.2744H7.4496V3.6744H15.9504V10.8744H20.1504V19.9752H13.4496V16.3752H10.5504V19.9752H3.8496ZM5.1504 18.6744H7.4496V16.3752H5.1504V18.6744ZM5.1504 14.7744H7.4496V12.4752H5.1504V14.7744ZM5.1504 10.8744H7.4496V8.5752H5.1504V10.8744ZM8.7504 14.7744H11.0496V12.4752H8.7504V14.7744ZM8.7504 10.8744H11.0496V8.5752H8.7504V10.8744ZM8.7504 7.2744H11.0496V4.9752H8.7504V7.2744ZM12.3504 14.7744H14.6496V12.4752H12.3504V14.7744ZM12.3504 10.8744H14.6496V8.5752H12.3504V10.8744ZM12.3504 7.2744H14.6496V4.9752H12.3504V7.2744ZM16.5504 18.6744H18.8496V16.3752H16.5504V18.6744ZM16.5504 14.7744H18.8496V12.4752H16.5504V14.7744Z"}),arrow_forward:(0,v.jsx)("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"}),arrow_left:(0,v.jsx)("path",{d:"M9 19L2 12L9 5L10.425 6.4L5.825 11H22V13H5.825L10.4 17.6L9 19Z"}),arrow_right:(0,v.jsx)("path",{d:"M15 19L13.6 17.6L18.2 13H2V11H18.2L13.6 6.4L15 5L22 12L15 19Z"}),autorenew:(0,v.jsx)("path",{d:"M5.69728 14.4104C5.49326 13.9833 5.32604 13.5257 5.19562 13.0374C5.06521 12.5492 5 12.0367 5 11.5C5 9.56481 5.69083 7.91679 7.07249 6.55591C8.45416 5.19504 10.147 4.53946 12.1511 4.58918H12.7613L11.0742 2.92359L12.0097 2L15.2869 5.23549L12.0097 8.47099L11.0742 7.54739L12.7613 5.88181H12.1511C10.5021 5.84866 9.11624 6.38632 7.99347 7.49479C6.87069 8.60326 6.30931 9.93833 6.30931 11.5C6.30931 11.8455 6.33804 12.1824 6.3955 12.5106C6.45296 12.8389 6.53915 13.1573 6.65407 13.4658L5.69728 14.4104ZM11.9903 21L8.71309 17.7645L11.9903 14.529L12.9258 15.4526L11.2387 17.1182H11.8489C13.4979 17.1513 14.8838 16.6137 16.0065 15.5052C17.1293 14.3967 17.6907 13.0617 17.6907 11.5C17.6907 11.1545 17.662 10.8176 17.6045 10.4894C17.547 10.1611 17.4609 9.84273 17.3459 9.53421L18.3027 8.58959C18.5067 9.01665 18.674 9.47431 18.8044 9.96256C18.9348 10.4508 19 10.9633 19 11.5C19 13.4186 18.3092 15.0625 16.9275 16.4317C15.5458 17.8008 13.853 18.4605 11.8489 18.4108H11.2387L12.9258 20.0764L11.9903 21Z"}),bassinet:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("path",{d:"M19 12C19 14.1217 18.1571 16.1566 16.6569 17.6569C15.1566 19.1571 13.1217 20 11 20C8.87827 20 6.84344 19.1571 5.34315 17.6569C3.84286 16.1566 3 14.1217 3 12L11 12H19Z"}),(0,v.jsx)("path",{d:"M16.1347 5.86529L11 11V4C12.0506 4 13.0909 4.20693 14.0615 4.60896C14.8136 4.92052 15.5125 5.34451 16.1347 5.86529ZM16.8602 6.55405L12.4142 11H18.9373C18.8482 10.293 18.6649 9.59962 18.391 8.93853C18.0264 8.05823 17.5077 7.25087 16.8602 6.55405Z"})]}),cabin_bag:(0,v.jsx)("path",{d:"M7.3077 20.5C6.81058 20.5 6.38502 20.323 6.03102 19.969C5.67701 19.615 5.5 19.1894 5.5 18.6923V8.25007C5.5 7.76417 5.67019 7.35103 6.01057 7.01065C6.35096 6.67027 6.7641 6.50007 7.25 6.50007H9.25V3.6924C9.25 3.43631 9.33622 3.22166 9.50865 3.04842C9.68108 2.87519 9.89773 2.78857 10.1586 2.78857H13.8414C14.1022 2.78857 14.3189 2.87519 14.4913 3.04842C14.6637 3.22166 14.75 3.43631 14.75 3.6924V6.50007H16.6922C17.1894 6.50007 17.6149 6.67708 17.9689 7.0311C18.3229 7.3851 18.5 7.81066 18.5 8.30777V18.6923C18.5 19.1894 18.3229 19.615 17.9689 19.969C17.6149 20.323 17.1894 20.5 16.6922 20.5C16.6922 20.7507 16.6074 20.9608 16.4377 21.1303C16.2681 21.2999 16.0578 21.3846 15.807 21.3846C15.5561 21.3846 15.3461 21.2999 15.1769 21.1303C15.0077 20.9608 14.923 20.7507 14.923 20.5H9.0769C9.0769 20.7513 8.99206 20.9615 8.82237 21.1308C8.65271 21.3 8.44246 21.3846 8.19162 21.3846C7.94079 21.3846 7.73076 21.2999 7.56153 21.1303C7.39231 20.9608 7.3077 20.7507 7.3077 20.5ZM10.4423 6.50007H13.5577V3.98085H10.4423V6.50007ZM7.3077 19H16.6922C16.782 19 16.8557 18.9712 16.9134 18.9135C16.9711 18.8558 17 18.7821 17 18.6923V8.30777C17 8.21802 16.9711 8.1443 16.9134 8.0866C16.8557 8.0289 16.782 8.00005 16.6922 8.00005H7.3077C7.21795 8.00005 7.14423 8.0289 7.08652 8.0866C7.02882 8.1443 6.99997 8.21802 6.99997 8.30777V18.6923C6.99997 18.7821 7.02882 18.8558 7.08652 18.9135C7.14423 18.9712 7.21795 19 7.3077 19ZM8.15382 17.1539C8.15382 17.3261 8.21009 17.4685 8.32262 17.5811C8.43514 17.6937 8.57744 17.75 8.74952 17.75C8.92161 17.75 9.06407 17.6937 9.1769 17.5811C9.28972 17.4685 9.34613 17.3261 9.34613 17.1539V9.8462C9.34613 9.67398 9.28986 9.53157 9.17732 9.41897C9.06481 9.30637 8.92251 9.25007 8.75043 9.25007C8.57834 9.25007 8.43588 9.30637 8.32305 9.41897C8.21023 9.53157 8.15382 9.67398 8.15382 9.8462V17.1539ZM11.4038 17.1539C11.4038 17.3261 11.4601 17.4685 11.5726 17.5811C11.6851 17.6937 11.8274 17.75 11.9995 17.75C12.1716 17.75 12.3141 17.6937 12.4269 17.5811C12.5397 17.4685 12.5961 17.3261 12.5961 17.1539V9.8462C12.5961 9.67398 12.5399 9.53157 12.4273 9.41897C12.3148 9.30637 12.1725 9.25007 12.0004 9.25007C11.8283 9.25007 11.6859 9.30637 11.5731 9.41897C11.4602 9.53157 11.4038 9.67398 11.4038 9.8462V17.1539ZM14.6538 17.1539C14.6538 17.3261 14.7101 17.4685 14.8226 17.5811C14.9351 17.6937 15.0774 17.75 15.2495 17.75C15.4216 17.75 15.5641 17.6937 15.6769 17.5811C15.7897 17.4685 15.8461 17.3261 15.8461 17.1539V9.8462C15.8461 9.67398 15.7899 9.53157 15.6773 9.41897C15.5648 9.30637 15.4225 9.25007 15.2504 9.25007C15.0783 9.25007 14.9359 9.30637 14.823 9.41897C14.7102 9.53157 14.6538 9.67398 14.6538 9.8462V17.1539Z"}),check:(0,v.jsx)("path",{d:"M10.3333 15.8646L7 12.5313L8.0625 11.4688L10.3333 13.7396L15.9375 8.13544L17 9.19794L10.3333 15.8646Z"}),checked_bag:(0,v.jsx)("path",{d:"M22 19H2V21H22V19M4 15C4 15.5 4.2 16 4.6 16.4C5 16.8 5.5 17 6 17V6C5.5 6 5 6.2 4.6 6.6C4.2 7 4 7.5 4 8V15M13.5 6H10.5C10.5 5.6 10.6 5.2 10.9 4.9C11.2 4.6 11.5 4.5 12 4.5C12.4 4.5 12.8 4.6 13.1 4.9C13.3 5.2 13.5 5.6 13.5 6M7 6V17H17V6H15C15 5.2 14.7 4.5 14.1 3.9S12.8 3 12 3C11.2 3 10.5 3.3 9.9 3.9C9.3 4.5 9 5.2 9 6H7M18 17C18.5 17 19 16.8 19.4 16.4C19.8 16 20 15.5 20 15V8C20 7.5 19.8 7 19.4 6.6C19 6.2 18.5 6 18 6V17Z"}),chevron:(0,v.jsx)("path",{d:"M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z"}),close:(0,v.jsx)("path",{d:"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),closet:(0,v.jsx)("path",{d:"M12 4C11.0717 4 10.1815 4.36875 9.52513 5.02513C8.86875 5.6815 8.5 6.57174 8.5 7.5H10.5C10.5 7.10218 10.658 6.72064 10.9393 6.43934C11.2206 6.15804 11.6022 6 12 6C12.3978 6 12.7794 6.15804 13.0607 6.43934C13.342 6.72064 13.5 7.10218 13.5 7.5C13.5 7.89782 13.342 8.27936 13.0607 8.56066C12.7794 8.84196 12.3978 9 12 9C11.45 9 11 9.45 11 10V11.75L2.4 18.2C2.23209 18.3259 2.10807 18.5015 2.04549 18.7018C1.98291 18.9022 1.98495 19.1171 2.05132 19.3162C2.11769 19.5153 2.24502 19.6885 2.41529 19.8112C2.58556 19.934 2.79012 20 3 20H21C21.2099 20 21.4144 19.934 21.5847 19.8112C21.755 19.6885 21.8823 19.5153 21.9487 19.3162C22.0151 19.1171 22.0171 18.9022 21.9545 18.7018C21.8919 18.5015 21.7679 18.3259 21.6 18.2L13 11.75V10.85C13.7216 10.6349 14.3546 10.1927 14.805 9.58919C15.2554 8.98569 15.4991 8.25303 15.5 7.5C15.5 6.57174 15.1313 5.6815 14.4749 5.02513C13.8185 4.36875 12.9283 4 12 4ZM12 13.5L18 18H6L12 13.5Z"}),exit_row:(0,v.jsx)("path",{d:"M20 11H6.83001L9.71001 8.12001C10.1 7.73001 10.1 7.10001 9.71001 6.71001C9.32001 6.32001 8.69001 6.32001 8.30001 6.71001L3.71001 11.3C3.32001 11.69 3.32001 12.32 3.71001 12.71L8.30001 17.3C8.69001 17.69 9.32001 17.69 9.71001 17.3C10.1 16.91 10.1 16.28 9.71001 15.89L6.83001 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11Z"}),exit_row_right:(0,v.jsx)("path",{d:"M4 11H17.17L14.29 8.12001C13.9 7.73001 13.9 7.10001 14.29 6.71001C14.68 6.32001 15.31 6.32001 15.7 6.71001L20.29 11.3C20.68 11.69 20.68 12.32 20.29 12.71L15.7 17.3C15.31 17.69 14.68 17.69 14.29 17.3C13.9 16.91 13.9 16.28 14.29 15.89L17.17 13H4C3.45 13 3 12.55 3 12C3 11.45 3.45 11 4 11Z"}),expand_content:(0,v.jsx)("path",{d:"M5 19V13H7V17H11V19H5ZM17 11V7H13V5H19V11H17Z"}),flight_class:(0,v.jsx)("path",{d:"M14.2596 12.5C13.7737 12.5 13.3606 12.3298 13.0202 11.9894C12.6798 11.649 12.5096 11.2359 12.5096 10.75V6.25C12.5096 5.7641 12.6798 5.35096 13.0202 5.01058C13.3606 4.67019 13.7737 4.5 14.2596 4.5H15.75C16.2359 4.5 16.649 4.67019 16.9894 5.01058C17.3298 5.35096 17.5 5.7641 17.5 6.25V10.75C17.5 11.2359 17.3298 11.649 16.9894 11.9894C16.649 12.3298 16.2359 12.5 15.75 12.5H14.2596ZM14.2596 11H15.75C15.8205 11 15.8798 10.9759 15.9278 10.9279C15.9759 10.8798 16 10.8205 16 10.75V6.25C16 6.17948 15.9759 6.12018 15.9278 6.0721C15.8798 6.02402 15.8205 5.99998 15.75 5.99998H14.2596C14.1891 5.99998 14.1298 6.02402 14.0817 6.0721C14.0336 6.12018 14.0096 6.17948 14.0096 6.25V10.75C14.0096 10.8205 14.0336 10.8798 14.0817 10.9279C14.1298 10.9759 14.1891 11 14.2596 11ZM9.5673 17.5C9.21345 17.5 8.89678 17.398 8.6173 17.1942C8.33782 16.9903 8.14423 16.7198 8.03655 16.3827L5.5 8.02883V4.5H6.99997V7.99998L9.49997 16H17.7596V17.5H9.5673ZM8.25 20.5V19H17.75V20.5H8.25ZM14.2596 5.99998H16H14.0096H14.2596Z"}),flight_takeoff:(0,v.jsx)("path",{d:"M3.77521 20.1498V18.849H20.0748V20.1498H3.77521ZM5.45041 15.2742L2.94961 11.0994L4.05001 10.8246L5.90041 12.399L10.05 11.2998L6.27481 4.89902L7.72561 4.62422L14.1 10.1994L19.4004 8.77382C19.75 8.67462 20.0832 8.72062 20.4 8.91182C20.7168 9.10382 20.9252 9.37462 21.0252 9.72422C21.1084 10.0746 21.0624 10.4038 20.8872 10.7118C20.7128 11.0198 20.4504 11.2242 20.1 11.325L5.45041 15.2742Z"}),galley:(0,v.jsx)("path",{d:"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"}),lavatory:(0,v.jsx)("path",{d:"M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"}),lie_flat_seat:(0,v.jsx)("path",{d:"M6.16667 12.8333C6.81667 12.8333 7.45834 12.5833 7.95001 12.0833C8.91667 11.0916 8.90001 9.51659 7.91667 8.54992C7.42501 8.07492 6.79167 7.83325 6.16667 7.83325C5.51667 7.83325 4.87501 8.08325 4.38334 8.58325C3.41667 9.57492 3.43334 11.1499 4.41667 12.1166C4.90834 12.5916 5.54167 12.8333 6.16667 12.8333ZM5.57501 9.74992C5.73334 9.59159 5.94167 9.49992 6.16667 9.49992C6.38334 9.49992 6.59167 9.58325 6.75001 9.73325C7.08334 10.0583 7.08334 10.5749 6.76667 10.9083C6.60001 11.0749 6.39167 11.1666 6.16667 11.1666C5.95001 11.1666 5.74167 11.0833 5.58334 10.9333C5.25001 10.5999 5.25001 10.0833 5.57501 9.74992ZM17 7.83325H9.50001V12.8333H20.3333V11.1666C20.3333 9.32492 18.8417 7.83325 17 7.83325ZM11.1667 11.1666V9.49992H17C17.9167 9.49992 18.6667 10.2499 18.6667 11.1666H11.1667ZM3.66667 15.3333H8.66667V16.9999H15.3333V15.3333H20.3333V13.6666H3.66667V15.3333Z"}),minus:(0,v.jsx)("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"}),no_airplane:(0,v.jsx)("path",{d:"M14.6674 10.0001V2.66675C14.6674 1.56008 13.7741 0.666748 12.6674 0.666748C11.5607 0.666748 10.6674 1.56008 10.6674 2.66675V7.57341L21.1074 18.0134L25.3341 19.3334V16.6667L14.6674 10.0001ZM1.33407 5.02675L7.9874 11.6801L0.000732422 16.6667V19.3334L10.6674 16.0001V23.3334L8.00073 25.3334V27.3334L12.6674 26.0001L17.3341 27.3334V25.3334L14.6674 23.3334V18.3601L22.3074 26.0001L24.0007 24.3067L3.0274 3.33341L1.33407 5.02675Z"}),no_bag:(0,v.jsx)("path",{d:"M16.8992 6.12037H14.9392V3.18101C14.9385 2.92148 14.8351 2.67278 14.6516 2.48926C14.4681 2.30574 14.2194 2.20234 13.9599 2.20166H10.0399C9.78034 2.20234 9.53163 2.30574 9.34811 2.48926C9.16459 2.67278 9.06119 2.92148 9.06051 3.18101V6.12037H8.20711L8.34715 6.25804L14.3973 12.0871V9.06102H15.9676V13.6L17.3022 14.8859L18.8592 16.4748V8.08037C18.8579 7.56096 18.6509 7.06322 18.2836 6.69594C17.9164 6.32867 17.4186 6.12173 16.8992 6.12037ZM5.14051 8.09559L3.77173 6.71825L5.00821 5.48945L7.16586 7.6606L13.9581 14.4953L15.8932 16.4426L19.7441 20.3175L20.2279 20.8043L18.9914 22.0331L17.635 20.6683C17.4035 20.7625 17.154 20.8126 16.8992 20.8133C16.904 20.945 16.8822 21.0763 16.8351 21.1993C16.788 21.3224 16.7166 21.4347 16.6251 21.5296C16.5336 21.6244 16.424 21.6999 16.3027 21.7514C16.1814 21.8029 16.051 21.8295 15.9192 21.8295C15.7874 21.8295 15.657 21.8029 15.5357 21.7514C15.4145 21.6999 15.3048 21.6244 15.2133 21.5296C15.1219 21.4347 15.0504 21.3224 15.0034 21.1993C14.9563 21.0763 14.9344 20.945 14.9392 20.8133H9.06051C9.06529 20.945 9.04348 21.0763 8.99638 21.1993C8.94929 21.3224 8.87787 21.4347 8.7864 21.5296C8.69492 21.6244 8.58527 21.6999 8.46399 21.7514C8.34271 21.8029 8.21229 21.8295 8.08051 21.8295C7.94874 21.8295 7.81832 21.8029 7.69703 21.7514C7.57575 21.6999 7.4661 21.6244 7.37463 21.5296C7.28316 21.4347 7.21174 21.3224 7.16464 21.1993C7.11754 21.0763 7.09573 20.945 7.10051 20.8133C6.58222 20.8119 6.08545 20.6059 5.71835 20.24C5.35126 19.8741 5.14357 19.378 5.14051 18.8597V8.09559ZM14.8632 17.8791L14.3973 17.4103V17.8791H14.8632ZM9.596 12.579V17.8791H8.03083V11.004L9.596 12.579ZM10.5302 3.67134H13.4695V6.12295H10.5302V3.67134Z"}),no_seat:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("path",{d:"M25.1667 21.9733L23.4733 23.6667L2.5 2.69333L4.19333 1L7.16667 3.97333L16.5267 13.3333L19.1933 16L24.5 21.3067L25.1667 21.9733Z"}),(0,v.jsx)("path",{d:"M7.16667 24H3.16667V16H19.1933L24.5 21.3067V24H20.5V20H7.16667V24ZM27.1667 9.33333H23.1667V13.3333H27.1667V9.33333ZM4.5 9.33333H0.5V13.3333H4.5V9.33333ZM20.3333 13.3333H20.5V2.66667C20.5 1.2 19.3 0 17.8333 0H9.83333C9.05784 0 8.3569 0.335483 7.86848 0.868484L20.3333 13.3333ZM16.5267 13.3333L7.16667 3.97333V13.3333H16.5267Z"})]}),north_east:(0,v.jsx)("path",{d:"M4.69999 19.3C4.51665 19.1167 4.42499 18.8833 4.42499 18.6C4.42499 18.3167 4.51665 18.0833 4.69999 17.9L15.6 7H9.99999C9.71665 7 9.47915 6.90417 9.28749 6.7125C9.09582 6.52083 8.99999 6.28333 8.99999 6C8.99999 5.71667 9.09582 5.47917 9.28749 5.2875C9.47915 5.09583 9.71665 5 9.99999 5H18C18.2833 5 18.5208 5.09583 18.7125 5.2875C18.9042 5.47917 19 5.71667 19 6V14C19 14.2833 18.9042 14.5208 18.7125 14.7125C18.5208 14.9042 18.2833 15 18 15C17.7167 15 17.4792 14.9042 17.2875 14.7125C17.0958 14.5208 17 14.2833 17 14V8.4L6.09999 19.3C5.91665 19.4833 5.68332 19.575 5.39999 19.575C5.11665 19.575 4.88332 19.4833 4.69999 19.3Z"}),seat:(0,v.jsx)("path",{d:"M7.59 5.41012C6.81 4.63012 6.81 3.36012 7.59 2.58012C8.37 1.80012 9.64 1.80012 10.42 2.58012C11.2 3.36012 11.2 4.63012 10.42 5.41012C9.63 6.20012 8.37 6.20012 7.59 5.41012ZM6 16.0001V8.00012C6 7.45012 5.55 7.00012 5 7.00012C4.45 7.00012 4 7.45012 4 8.00012V16.0001C4 18.7601 6.24 21.0001 9 21.0001H14C14.55 21.0001 15 20.5501 15 20.0001C15 19.4501 14.55 19.0001 14 19.0001H9C7.34 19.0001 6 17.6601 6 16.0001ZM19.28 19.3501L15.51 15.5801C15.14 15.2101 14.63 15.0001 14.1 15.0001H11.5V11.3201C12.59 12.2101 14.16 13.0201 15.7 13.3401C16.37 13.4801 17 12.9801 17 12.3001C17 11.7701 16.61 11.3401 16.08 11.2501C14.66 11.0101 13.2 10.2401 12.33 9.28012L10.93 7.73012C10.74 7.52012 10.5 7.35012 10.24 7.23012C9.95 7.09012 9.62 7.00012 9.28 7.00012H9.25C8.01 7.00012 7 8.01012 7 9.25012V15.0001C7 16.6601 8.34 18.0001 10 18.0001H15.07L17.85 20.7801C18.24 21.1701 18.89 21.1701 19.28 20.7801C19.68 20.3901 19.68 19.7501 19.28 19.3501Z"}),seat_paid_indicator:(0,v.jsx)("path",{d:"M11.7686 0.731368C12.7766 -0.276576 14.5 0.437294 14.5 1.86274V10.8C14.5 12.5673 13.0673 14 11.3 14H2.36274C0.937294 14 0.223427 12.2766 1.23137 11.2686L11.7686 0.731368Z"}),shield_with_moon:(0,v.jsx)("path",{d:"M12.525 15.75C13.0814 15.75 13.6269 15.6408 14.1615 15.4222C14.6961 15.2036 15.166 14.8757 15.5711 14.4385C15.6749 14.3244 15.7032 14.2033 15.6557 14.0751C15.6083 13.9469 15.5077 13.8629 15.3538 13.8232C14.7269 13.6783 14.1477 13.4183 13.6163 13.0433C13.0849 12.6683 12.6474 12.1789 12.3038 11.5751C11.9769 11.0046 11.7682 10.393 11.6778 9.74048C11.5874 9.08791 11.6589 8.45458 11.8923 7.84048C11.9525 7.68663 11.9301 7.55586 11.8249 7.44817C11.7198 7.34049 11.5916 7.30332 11.4403 7.33665C10.4442 7.59177 9.65927 8.1142 9.08555 8.90395C8.51185 9.69368 8.225 10.5591 8.225 11.5001C8.225 12.6796 8.64519 13.6828 9.48558 14.5097C10.3259 15.3366 11.3391 15.75 12.525 15.75ZM12 21.4808C9.83716 20.8911 8.04646 19.618 6.62787 17.6616C5.20929 15.7052 4.5 13.518 4.5 11.1001V5.34625L12 2.53857L19.5 5.34625V11.1001C19.5 13.518 18.7907 15.7052 17.3721 17.6616C15.9535 19.618 14.1628 20.8911 12 21.4808ZM12 19.9001C13.7333 19.3501 15.1666 18.2501 16.3 16.6001C17.4333 14.9501 18 13.1167 18 11.1001V6.37507L12 4.1347L5.99997 6.37507V11.1001C5.99997 13.1167 6.56664 14.9501 7.69997 16.6001C8.83331 18.2501 10.2666 19.3501 12 19.9001Z"}),stairs:(0,v.jsx)("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,8h-2.42v3.33H13v3.33h-2.58 V18H6v-2h2.42v-3.33H11V9.33h2.58V6H18V8z"}),warning:(0,v.jsx)("path",{d:"M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM8.21071 9.25592L10.9548 12L8.21071 14.7441L9.38922 15.9226L12.1333 13.1785L14.8774 15.9226L16.0559 14.7441L13.3118 12L16.0559 9.25592L14.8774 8.07741L12.1333 10.8215L9.38922 8.07741L8.21071 9.25592Z"}),wifi:(0,v.jsx)("path",{d:"M2.83333 9.50005L4.49999 11.1667C8.64166 7.02505 15.3583 7.02505 19.5 11.1667L21.1667 9.50005C16.1083 4.44172 7.89999 4.44172 2.83333 9.50005ZM9.49999 16.1667L12 18.6667L14.5 16.1667C13.125 14.7834 10.8833 14.7834 9.49999 16.1667ZM6.16666 12.8334L7.83333 14.5C10.1333 12.2 13.8667 12.2 16.1667 14.5L17.8333 12.8334C14.6167 9.61672 9.39166 9.61672 6.16666 12.8334Z"})},ap=t=>t in Xs?Xs[t]:(Ks(`The icon "${t}" is missing from ICON_MAP`),null),P=({name:t,size:e,className:r,viewBox:n,style:o})=>(0,v.jsx)("svg",{className:r,width:e||24,height:e||24,viewBox:n||"0 0 24 24","aria-label":t,"data-testid":t,style:{display:"block",fill:"currentColor",...o},children:ap(t)});var Js=D(Ne());var oo=require("react/jsx-runtime"),sp={primary:"button--primary",outlined:"button--outlined",destructive:"button--destructive"},cp={32:"button--32",40:"button--40",48:"button--48"},ee=({iconBefore:t,variant:e="primary",size:r=40,children:n,className:o,type:i="button",...a})=>(0,oo.jsxs)("button",{type:i,className:(0,Js.default)("button",sp[e],cp[r],o),...a,children:[t&&(0,oo.jsx)(P,{className:"duffel-button__icon duffel-button__icon--before",name:t}),n]});var Ai=require("react/jsx-runtime"),pr=({style:t,children:e})=>(0,Ai.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"dashed 1px var(--GREY-300)",borderRadius:"4px",paddingBlock:"32px",...t},children:(0,Ai.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"470px"},children:e})});var Ht=require("react/jsx-runtime"),mr=class extends Qs.default.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){_e(e)}render(){return this.state.hasError?(0,Ht.jsxs)(pr,{children:[(0,Ht.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"We ran into an error"}),(0,Ht.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Please try reloading. If the problem persists reach out to our support team."}),(0,Ht.jsx)("div",{children:(0,Ht.jsx)(ee,{variant:"outlined",iconBefore:"autorenew",onClick:()=>location.reload(),children:"Try again"})})]}):this.props.children}};var Gt=require("react/jsx-runtime"),ec=({height:t,message:e})=>(0,Gt.jsxs)(pr,{style:{minHeight:t},children:[(0,Gt.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Failed to load extras"}),(0,Gt.jsx)("p",{className:"p2--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:e||"Please try reloading. If the problem persists reach out to our support team."}),(0,Gt.jsx)("div",{children:(0,Gt.jsx)(ee,{variant:"outlined",onClick:()=>location.reload(),iconBefore:"autorenew",children:"Try again"})})]});var gr=t=>t.reduce((e,{id:r,total_amount:n,total_currency:o})=>({[r]:{total_amount:n,total_currency:o},...e}),{});var bt=(t,e,r)=>{if(!t||!e||e.length===0)return 0;let n=gr(t.available_services);return nn(n,e,r)},nn=(t,e,r)=>(e||[]).reduce((n,{quantity:o,id:i})=>{let a=n;return i in t?a+=o*+t[i].total_amount:r?a+=o*lp(i,r):_e(new Error(`The service id (${i}) provided could not be found in neither the offer nor the seat maps.`)),a},0),lp=(t,e)=>{for(let r of e)for(let n of r.cabins)for(let o of n.rows)for(let i of o.sections)for(let a of i.elements)if(a.type==="seat"&&Array.isArray(a.available_services)){let s=a.available_services.find(c=>c.id===t);if(s)return+s.total_amount}return 0};var tc=({baggageSelectedServices:t,seatSelectedServices:e,cfarSelectedServices:r,offer:n,seatMaps:o,passengers:i})=>{let a=[...t||[],...e||[],...r||[]],s=+n.total_amount+bt(n,a,o);return{...n&&{selected_offers:[n.id]},passengers:i,services:up(a),...n&&{payments:[{type:"balance",amount:`${s}`,currency:n.total_currency}]},type:"instant",metadata:{source:"duffel-ancillaries@3.3.0"}}},up=t=>Array.isArray(t)?t.filter(({quantity:e})=>e>0).map(({id:e,quantity:r})=>({id:e,quantity:r})):[];var Pi=t=>(e,r)=>{let{rate:n,amount:o}=t;return{amount:e*(1+n)+o,currency:r}},Di="You cannot supply both markup and priceFormatters for the same service.",rc=(t,e)=>{let r={};if(e&&(e.bags&&(r.bags=e.bags),e.seats&&(r.seats=e.seats),e.cancel_for_any_reason&&(r.cancel_for_any_reason=e.cancel_for_any_reason)),t){if(t.bags){if(e&&e.bags)throw new Error(Di);r.bags=Pi(t.bags)}if(t.seats){if(e&&e.seats)throw new Error(Di);r.seats=Pi(t.seats)}if(t.cancel_for_any_reason){if(e&&e.cancel_for_any_reason)throw new Error(Di);r.cancel_for_any_reason=Pi(t.cancel_for_any_reason)}}return r};var io=t=>t.type==="baggage";var _r=t=>t.type==="cancel_for_any_reason";var fp=(t,e)=>`${t} must all have the same currency, but they have ${e.size} different currencies (${[...e].join(", ")}). Check the price formatters passed into the component's render function.`,nc=(t,e)=>{if(!e)return t;let r=t.available_services||[],n=new Set,o={baggage:e?.bags,cancel_for_any_reason:e?.cancel_for_any_reason},i=r.map(a=>{let s={...a};if(a.type in o&&o[a.type]){let{total_amount:c,total_currency:l}=a;if(io(a)){let{amount:f,currency:u}=o[a.type](+a.total_amount,a.total_currency,a);c=f.toString(),u&&(l=u)}if(_r(a)){let{amount:f,currency:u}=o[a.type](+a.total_amount,a.total_currency,a);c=f.toString(),u&&(l=u)}if(n.add(l),n.size>1)throw new Error(fp(a.type,n));s.total_amount=c,s.total_currency=l}return s});return{...t,available_services:i}};function ao(t){return t.type==="seat"}var dp=t=>`Seats must all have the same currency, but they have ${t.size} different currencies (${[...t].join(", ")}). Check the price formatters passed into the component's render function.`,pp=(t,e,r)=>{let n={...t};if(ao(n)&&n.available_services.length>0){let o=n.available_services.map(i=>{let a={...i},{amount:s,currency:c}=e(+i.total_amount,i.total_currency,i);if(a.total_amount=s.toString(),c&&(a.total_currency=c,r.add(c),r.size>1))throw new Error(dp(r));return a});n.available_services=o}return n},oc=(t,e)=>{if(!e)return t;let r=new Set;return t.map(o=>{let i=o.cabins.map(a=>{let s=a.rows.map(c=>{let l=c.sections.map(f=>{let u=f.elements.map(m=>pp(m,e,r));return{...f,elements:u}});return{...c,sections:l}});return{...a,rows:s}});return{...o,cabins:i}})};var so=t=>{let e=t.split(", ").map(n=>parseInt(n));return(.2126*e[0]+.7152*e[1]+.0722*e[2])/255>.5};var ic=t=>"selected_offers"in t&&"passengers"in t&&"services"in t&&"payments"in t&&"type"in t&&"metadata"in t;var ac=t=>t.expires_at&&new Date(t.expires_at)<new Date;var on=t=>"data"in t&&Array.isArray(t.data.errors),mp="https://api.duffel.com",gp="3.3.0";async function co(t,e,r="GET",n){st("Making request to the Duffel API",{path:e,method:r});let o=`${mp}/ancillaries-component/${e}`,i=null;try{i=await fetch(o,{method:r,body:n,headers:{"Duffel-Version":"v1",Authorization:`Bearer ${t}`,"User-Agent":`Duffel/ancillaries-component@${gp}`}})}catch(s){throw st("Failed to make request to the Duffel API",{error:s}),s}let a=await i.json();if(Array.isArray(a.errors))throw st("Request to the Duffel API failed",{operation:`${r} ${o}`,method:r,request_id:a?.meta?.request_id,errors:a.errors,status:i.status}),{...i,data:a};return st("Request to the Duffel succeeded",{request_id:a?.meta?.request_id}),a}var sc="https://assets.duffel.com/components/3.3.0",cc=async t=>await(await fetch(sc+`/fixtures/offers/${t}.json`)).json(),lc=async t=>await(await fetch(sc+`/fixtures/seat-maps/${t}.json`)).json();var lo=t=>t.startsWith("fixture_off_");async function uc(t,e){return(await co(e,`offers/${t}?return_available_services=true`)).data}async function fc(t,e,r,n,o){n(!0);let i=lo(t);if(t=i?t.replace("fixture_",""):t,i)return cc(t).then(a=>{n(!1),o(a)});if(!e)throw new Error("Attempted to retrieve seat maps but the client key is missing.");try{let a=await uc(t,e);o(a)}catch(a){let s="An unknown error occurred while retrieving the offer.";a instanceof Error?(s=a.message,a.message.includes("Load failed")&&(s="The Duffel API is not available. Please try again later.")):on(a)&&a.status===404&&(s="The offer you are looking for does not exist or has expired."),on(a)&&a.status>=500&&a.status<600&&_e(new Error(s)),r(s)}finally{n(!1)}}async function dc(t,e){return(await co(e,`offers/${t}/seat_maps`)).data}async function pc(t,e,r,n,o){n(!0);let i=lo(t);if(t=i?t.replace("fixture_",""):t,i)return lc(t).then(a=>{n(!1),o(a)});if(!e)throw new Error("Attemptted to retrieve seat maps but the client key is missing.");try{let a=await dc(t,e);o(a)}catch(a){let s="An unknown error occurred while retrieving the seat maps.";a instanceof Error?(s=a.message,a.message.includes("Load failed")&&(s="The Duffel API is not available. Please try again later.")):on(a)&&(s=a.data.errors[0]?.message||"Received an unknown error from the Duffel API."),_e(new Error(s)),r()}finally{n(!1)}}var Mi=t=>_p(t)&&(wi(t)||ki(t)||Bi(t)||Fi(t)),_p=t=>"onPayloadReady"in t&&"passengers"in t&&"services"in t,wi=t=>"offer_id"in t&&t.offer_id.startsWith("fixture_"),ki=t=>"offer_id"in t&&"client_key"in t,Bi=t=>"offer"in t&&"seat_maps"in t,Fi=t=>"offer"in t&&"client_key"in t;var pe=D(require("react"));var mc=require("react/jsx-runtime"),hr=()=>(0,mc.jsx)("span",{className:"textual-loading-indicator","aria-hidden":"true"});var gc=require("react/jsx-runtime"),ct=({backgroundColor:t,color:e,children:r})=>(0,gc.jsx)("div",{style:{backgroundColor:t,color:e,padding:"2px 8px",whiteSpace:"nowrap",borderRadius:"4px",fontWeight:"600",fontSize:"14px",lineHeight:"20px",textAlign:"center"},children:r});var Sr=(t,e)=>{if(t.available_services.length===0)throw new Error("No services available");let r=t.available_services.find(n=>n.type===e);if(!r)throw new Error(`No ${e} services available`);return r.total_currency};var Ge=t=>(t||[]).reduce((e,{quantity:r})=>e+r,0);var hp={baggage:io,cancel_for_any_reason:_r},yr=(t,e)=>{let r=hp[e];if(!r)throw new Error(`Unknown service type: ${e}`);return t&&Array.isArray(t.available_services)&&t.available_services.some(n=>r(n)&&n.maximum_quantity>0)};var G=(t,e="en-GB",r={})=>n=>{try{let i=new Intl.NumberFormat(e,{style:"currency",currency:t,...r}).format(n);return r&&r.signDisplay&&(r.signDisplay==="always"||r.signDisplay==="exceptZero"&&n!==0)?i.replace(/^([+-])/,"$1 "):i}catch{return`${n} ${t}`}};var Oe=(t,e,r)=>t==1?`${t} ${e}`:`${t} ${r}`;var Mc=D(require("react"));var _c=D(Ne()),hc=D(require("react"));var he=require("react/jsx-runtime"),Er=({buttonTitle:t,title:e,icon:r,copy:n,onClick:o,children:i,isLoading:a,disabled:s,isSelected:c})=>{let l=hc.Children.toArray(i).length>0;return(0,he.jsxs)("button",{type:"button",title:t,...o&&{onClick:o},disabled:s,className:(0,_c.default)("ancillary-card",a&&"ancillary-card--loading"),style:{cursor:"pointer",background:"transparent",color:"var(--GREY-900)",border:"solid 1px rgba(226, 226, 232, 1)",display:"flex",rowGap:"4px",padding:"20px",borderRadius:"8px",justifyContent:"space-between",flexWrap:"wrap",flexDirection:"column",width:"100%",boxSizing:"border-box",fontSize:"16px",fontWeight:"400",lineHeight:"24px",letterSpacing:"0em",transition:"border-color 0.3s var(--TRANSITION-CUBIC-BEZIER) background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)"},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",marginBlock:"0",textAlign:"start",marginTop:"2px",columnGap:"12px",width:"100%"},children:[(0,he.jsx)("div",{children:c?(0,he.jsx)(P,{name:"check",className:"ancillary-card__selected-icon"}):(0,he.jsx)(P,{name:r})}),(0,he.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"start",width:"100%"},children:[(0,he.jsx)("p",{className:"p1--semibold",style:{marginBlock:"0"},children:e}),(0,he.jsx)("div",{className:"ancillary-card__children",children:l?i:(0,he.jsx)(P,{name:"expand_content",className:"ancillary-card__expand-icon"})})]})]}),(0,he.jsx)("p",{className:"p1--regular",style:{textAlign:"start",color:"var(--GREY-600)",marginLeft:"34px",marginBlock:"0"},children:n})]})};var Li=t=>{t?document.body.style.overflow="":document.body.style.overflow="hidden"};var yc=D(Ne()),Ec=D(require("react"));var Sc=D(Ne());var Ui=require("react/jsx-runtime"),Sp={primary:"icon-button--primary",outlined:"icon-button--outlined"},an=({icon:t,variant:e="primary",className:r,...n})=>(0,Ui.jsx)("button",{type:"button",className:(0,Sc.default)("icon-button",Sp[e],r),...n,children:(0,Ui.jsx)(P,{name:t})});var vr=require("react/jsx-runtime"),Cr=({children:t,onClose:e,isOpen:r})=>(Ec.useEffect(()=>(Li(!r),()=>Li(!0)),[r]),(0,vr.jsx)("div",{className:(0,yc.default)("modal",r&&"modal--open"),style:{opacity:0},children:(0,vr.jsxs)("div",{role:"presentation",className:"modal--content",children:[t,(0,vr.jsx)(an,{icon:"close",onClick:e,title:"Close modal",className:"modal--close-button"})]})})),br=({children:t})=>(0,vr.jsx)("div",{className:"modal-body",children:t});var uo=t=>t.reduce((e,r)=>({[r.id]:r,...e}),{});var fo=t=>t.slices.reduce((e,r)=>[...e,...r.segments],new Array);var go=D(require("react"));var po=(t,e,r)=>t?t.given_name&&t.family_name?`${t.given_name} ${t.family_name}`:t.given_name?t.given_name:t.family_name?t.family_name:e?.given_name&&e?.family_name?`${e.given_name} ${e.family_name}`:e?.given_name?e.given_name:e?.family_name?e.family_name:`Passenger ${r}`:`Passenger ${r}`;var vc=t=>{if(!t)return _e(new Error("getBaggageServiceDescription was not given any metadata")),null;if(!t.maximum_weight_kg&&!t.maximum_length_cm&&!t.maximum_height_cm&&!t.maximum_depth_cm)return null;let e=t.maximum_length_cm&&t.maximum_height_cm&&t.maximum_depth_cm,r="";e&&(r=` / ${t.maximum_height_cm} x ${t.maximum_length_cm} x ${t.maximum_depth_cm} cm`);let n="";return t.maximum_weight_kg&&(n=`Up to ${t.maximum_weight_kg}kg`),`${n}${r}`};var Cc=(t,e,r,n)=>t.some(o=>o.id===n.id||o.serviceInformation?.type!=="carry_on"&&o.serviceInformation?.type!=="checked"||o.serviceInformation?.segmentId!==e||o.serviceInformation?.passengerId!==r?!1:o.serviceInformation?.type===n.metadata.type);var Tr=require("react/jsx-runtime"),bc=({id:t,min:e,max:r,value:n,onChange:o})=>(0,Tr.jsxs)("div",{className:"counter",id:t,children:[(0,Tr.jsx)(an,{icon:"minus",title:"Remove one",id:`${t}-minus`,"data-testid":`${t}-minus`,variant:"outlined",disabled:n<=e,onClick:()=>o(Math.max(n-1,e))}),(0,Tr.jsx)("div",{className:"counter__count-label",children:n}),(0,Tr.jsx)(an,{icon:"add",title:"Add one",id:`${t}-plus`,"data-testid":`${t}-plus`,variant:"outlined",disabled:n>=r,onClick:()=>o(Math.min(n+1,r))})]});var lt=require("react/jsx-runtime"),Tc=({segmentId:t,passengerId:e,availableService:r,quantity:n,onQuantityChanged:o,selectedServices:i})=>{let a=r.metadata.type==="carry_on"?"Cabin bag":"Checked bag",s=G(r.total_currency)(+r.total_amount),c=vc(r.metadata),l=Cc(i,t,e,r);return(0,lt.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,lt.jsxs)("div",{children:[(0,lt.jsxs)("p",{style:{margin:0},className:"p2--regular",children:[a,(0,lt.jsx)("span",{style:{marginInline:"4px",color:"var(--GREY-400)"},children:"\u2022"}),(0,lt.jsx)("span",{className:"p2--semibold","data-testid":`price-label--${r.id}--${e}`,children:s})]}),(0,lt.jsx)("p",{style:{margin:0,color:"var(--GREY-600)"},className:"p3--regular",children:c})]}),(0,lt.jsx)(bc,{id:`counter--${r.id}--${e}`,min:0,value:n,onChange:o,max:l?0:r.maximum_quantity})]})};var Ic=require("react/jsx-runtime"),Rc=({includedBaggage:t})=>{let{carryOnBagsQuantity:e,checkedBagsQuantity:r}=t.reduce((o,{type:i,quantity:a})=>({carryOnBagsQuantity:o.carryOnBagsQuantity+(i==="carry_on"?a:0),checkedBagsQuantity:o.checkedBagsQuantity+(i==="checked"?a:0)}),{carryOnBagsQuantity:0,checkedBagsQuantity:0}),n=new Array;return e>0&&n.push(Oe(e,"cabin bag","cabin bags")),r>0&&n.push(Oe(r,"checked bag","checked bags")),(0,Ic.jsxs)("div",{style:{marginBlock:"8px",padding:"8px 12px",color:" var(--GREEN-300)",backgroundColor:" var(--GREEN-100)",borderRadius:"6px"},className:"p2--regular",children:[n.join(" and ")," included with ticket"]})};var Tt=require("react/jsx-runtime"),xc=({segmentId:t,passengerId:e,passengerName:r,includedBaggage:n,passengerServicesForSegment:o,selectedServices:i,setSelectedServices:a})=>{let s=n.reduce((c,l)=>c+l.quantity,0);return(0,Tt.jsxs)("div",{style:{marginTop:"24px"},children:[(0,Tt.jsx)("h3",{style:{margin:0},className:"p1--semibold",children:r}),s?(0,Tt.jsx)(Rc,{includedBaggage:n}):null,(0,Tt.jsx)("div",{style:{display:"flex",rowGap:"8px",flexDirection:"column"},children:o.map(c=>(0,Tt.jsx)(Tc,{passengerId:e,segmentId:t,availableService:c,selectedServices:i,quantity:i.find(({id:l})=>l==c.id)?.quantity||0,onQuantityChanged:l=>yp(l,t,e,r,c,i,a)},c.id))}),o.length===0&&(0,Tt.jsx)("p",{style:{color:"var(--GREY-700)",margin:0},children:"Extra baggage is not available for this passenger on this flight"})]})},yp=(t,e,r,n,o,i,a)=>{let s=i.findIndex(({id:l})=>o.id===l),c=Array.from(i);s<0?c.push({id:o.id,quantity:t,serviceInformation:{segmentId:e,passengerId:r,passengerName:n,total_amount:o.total_amount,total_currency:o.total_currency,...o.metadata}}):c[s].quantity=t,a(c.filter(({quantity:l})=>l!==0))};var Hi=require("react/jsx-runtime"),Nc=({offer:t,segment:e,passengersById:r,selectedServices:n,setSelectedServices:o})=>(0,Hi.jsx)(br,{children:e.passengers.map(({passenger_id:i,baggages:a},s)=>(0,Hi.jsx)(xc,{segmentId:e.id,passengerId:i,passengerName:po(r[i],t.passengers.find(({id:c})=>c===i),s+1),includedBaggage:a,passengerServicesForSegment:t.available_services.filter(({type:c,passenger_ids:l,segment_ids:f})=>c==="baggage"&&l.includes(i)&&f.includes(e.id)),selectedServices:n,setSelectedServices:o},i))});var ut=require("react/jsx-runtime"),Oc=({selectedServices:t,servicePrices:e,currency:r,isFirstSegment:n,isLastSegment:o,onNextSegmentButtonClicked:i,onPreviousSegmentButtonClicked:a,onClose:s})=>{let c=Ge(t),l=nn(e,t),f=G(r)(l),u=n&&n;return(0,ut.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,ut.jsxs)("div",{className:"flex--space-between",children:[(0,ut.jsxs)("div",{children:["Price for ",Oe(c,"extra bag","extra bags")]}),(0,ut.jsxs)("div",{className:"h3--semibold","data-testid":"baggage-total-amount-label",children:["+ ",f]})]}),(0,ut.jsxs)("div",{style:u?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!u&&(0,ut.jsx)(ee,{size:48,variant:"outlined",disabled:n,onClick:()=>a(),children:"Back"}),(0,ut.jsx)(ee,{size:48,"data-testid":"confirm-selection-for-baggage",onClick:()=>o?s():i(),children:o?"Confirm":"Next"})]})]})};var mo=t=>{let e=new Date(t);if(isNaN(e.valueOf()))_e(new Error(`formatDateString attempted to parse an invalid date string: ${t}`));else return Ep(e)},Ep=t=>{let{format:e}=new Intl.DateTimeFormat(void 0,{dateStyle:"medium"});return e(t)};var Ye=require("react/jsx-runtime"),Ac=({segmentCount:t,currentSegmentIndex:e,currentSegment:r,setCurrentSegmentIndex:n})=>(0,Ye.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,Ye.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((o,i)=>i===e?(0,Ye.jsx)(vp,{},`segment_${i}`):(0,Ye.jsx)(Pc,{onClick:()=>n(i)},`segment_${i}`))}),(0,Ye.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginTop:"12px"}:{},children:["Flight to ",r.destination.iata_code,(0,Ye.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:mo(r.departing_at)})]})]}),Pc=({onClick:t,style:e})=>(0,Ye.jsx)("button",{type:"button",onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...e}}),vp=()=>(0,Ye.jsx)(Pc,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var Rr=require("react/jsx-runtime"),Dc=({isOpen:t,offer:e,passengers:r,onClose:n,selectedServices:o})=>{let[i,a]=(0,go.useState)(0),[s,c]=go.default.useState(o);if(!e)return null;let l=fo(e),f=l[i],u=uo(r),m=gr(e.available_services),h=e.base_currency;return yr(e,"baggage")&&(h=Sr(e,"baggage")),(0,Rr.jsxs)(Cr,{isOpen:t,onClose:()=>n(o),children:[(0,Rr.jsx)(Ac,{segmentCount:l.length,currentSegment:f,currentSegmentIndex:i,setCurrentSegmentIndex:S=>a(S)}),(0,Rr.jsx)(Nc,{offer:e,selectedServices:s,passengersById:u,segment:f,setSelectedServices:c}),(0,Rr.jsx)(Oc,{currency:h,selectedServices:s,servicePrices:m,isFirstSegment:i===0,isLastSegment:i+1===l.length,onNextSegmentButtonClicked:()=>a(i+1),onPreviousSegmentButtonClicked:()=>a(i-1),onClose:()=>n(s)})]})};var $e=require("react/jsx-runtime"),wc=({isLoading:t,offer:e,passengers:r,selectedServices:n,setSelectedServices:o})=>{let[i,a]=Mc.default.useState(!1),s=yr(e,"baggage"),c=Ge(n),l=c>0,f=bt(e,n),u=e?.base_currency||"";s&&(u=Sr(e,"baggage"));let m=e?G(u)(f):"0",h=s&&l?`${Oe(c,"bag","bags")} added for ${m}`:"Add any extra baggage you need for your trip";return(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsxs)(Er,{buttonTitle:"Select extra baggage",title:"Extra baggage",copy:h,icon:"cabin_bag",onClick:s?()=>a(!0):null,isLoading:t,disabled:!t&&!s,isSelected:l,children:[t&&(0,$e.jsxs)(ct,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,$e.jsx)(hr,{})]}),!t&&!s&&(0,$e.jsx)(ct,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,$e.jsx)(Dc,{isOpen:!!(i&&e),offer:e,passengers:r,onClose:S=>{let y=JSON.parse(JSON.stringify(S));o(y),a(!1)},selectedServices:n})]})};var Uc=D(require("react"));var sn=require("react/jsx-runtime"),_o=({children:t})=>(0,sn.jsxs)("li",{className:"cfar-modal-list-item",children:[(0,sn.jsx)(P,{name:"check"}),(0,sn.jsx)("p",{children:t})]});var ft=require("react/jsx-runtime"),kc=({offerCurrency:t,service:e})=>(0,ft.jsxs)(br,{children:[(0,ft.jsxs)("ul",{style:{padding:0},children:[(0,ft.jsx)(_o,{children:"Cancel your trip for any reason"}),(0,ft.jsxs)(_o,{children:["Guaranteed refund of"," ",G(t)(+e.metadata.refund_amount)]}),(0,ft.jsx)(_o,{children:"Redeemable up to 24 hours before first flight departure"})]}),(0,ft.jsxs)("a",{href:e.metadata.terms_and_conditions_url,rel:"noopener noreferrer",target:"_blank",className:"p2--regular",style:{color:"var(--GREY-600)"},children:["Terms and conditions",(0,ft.jsx)(P,{name:"north_east",size:16,style:{display:"inline",verticalAlign:"middle",marginLeft:"4px"}})]})]});var Rt=require("react/jsx-runtime"),Bc=({service:t,selectedServices:e,onAddCfarService:r,onRemoveCfarService:n,onClose:o})=>{let i=e.some(({id:s})=>s==t.id),a=G(t.total_currency)(+t.total_amount);return(0,Rt.jsxs)("div",{className:"cfar-modal-footer",children:[(0,Rt.jsx)(ee,{size:48,variant:i?"destructive":"outlined",onClick:i?n:o,children:i?"Remove protection":"Don\u2019t protect trip"}),!i&&(0,Rt.jsxs)(ee,{size:48,"data-testid":"confirm-selection-for-cfar",onClick:r,children:["Add protection for ",a]}),i&&(0,Rt.jsx)(Cp,{})]})},Cp=()=>(0,Rt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",columnGap:"8px",backgroundColor:"var(--GREY-100)",padding:"var(--space-12)",borderRadius:"var(--BUTTON-RADIUS)"},children:[(0,Rt.jsx)(P,{size:20,name:"shield_with_moon",style:{fill:"var(--SECONDARY, rgb(var(--ACCENT)))"}}),"Your trip is protected"]});var Gi=require("react/jsx-runtime"),Fc=()=>(0,Gi.jsx)("div",{style:{padding:"24px 24px 16px"},children:(0,Gi.jsx)("h2",{className:"h3--semibold",style:{marginBlock:0},children:"Cancel for any reason"})});var dt=require("react/jsx-runtime"),Lc=({isOpen:t,offerCurrency:e,service:r,onClose:n,selectedServices:o})=>(0,dt.jsxs)(Cr,{isOpen:t,onClose:()=>n(o),children:[(0,dt.jsx)(Fc,{}),r&&e&&(0,dt.jsxs)(dt.Fragment,{children:[(0,dt.jsx)(kc,{service:r,offerCurrency:e}),(0,dt.jsx)(Bc,{service:r,selectedServices:o,onAddCfarService:()=>n([{id:r.id,quantity:1,serviceInformation:{type:"cancel_for_any_reason",total_amount:r.total_amount,total_currency:r.total_currency,...r.metadata}}]),onRemoveCfarService:()=>n([]),onClose:()=>n(o)})]})]});var We=require("react/jsx-runtime"),Hc=({isLoading:t,offer:e,selectedServices:r,setSelectedServices:n})=>{let[o,i]=Uc.default.useState(!1),a=yr(e,"cancel_for_any_reason"),c=Ge(r)>0,l=e?.base_currency||"";a&&(l=Sr(e,"cancel_for_any_reason"));let f=bt(e,r),u=e?G(l)(f):"0",m=e?.available_services.find(_r),h=a&&c?`Your trip is protected for ${u}`:"Protect your purchase if you decide to cancel";return(0,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)(Er,{buttonTitle:"Add cancel for any reason",title:"Cancel for any reason",copy:h,icon:"shield_with_moon",onClick:a?()=>i(!0):null,isLoading:t,disabled:!t&&!a,isSelected:c,children:[t&&(0,We.jsxs)(ct,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,We.jsx)(hr,{})]}),!t&&!a&&(0,We.jsx)(ct,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,We.jsx)(Lc,{isOpen:!!(o&&e&&m),offerCurrency:e?.base_currency,service:m,onClose:S=>{i(!1),n(S)},selectedServices:r})]})};var Gc=(t,e)=>{for(let r of t)for(let n of r.cabins)for(let o of n.rows)for(let i of o.sections)for(let a of i.elements)if(e(a))return a};var ho=t=>Gc(t,r=>r.type==="seat"&&r.available_services.length>0)?.available_services[0]?.total_currency;var El=D(require("react"));var Yc=t=>t.flatMap(e=>e.passengers.map((r,n)=>({passenger:r,passengerIndex:n,segment:e})));var zi=D(require("react"));var $c=(t,e)=>e.cabins.filter(r=>r.deck===t);var Wc=t=>{let e=new Set;for(let r of t)for(let n of r.rows)for(let o of n.sections)for(let i of o.elements)i.type!=="seat"&&i.type!=="empty"&&e.add(i.type);return e};var Vc=(t,e)=>!!(t.wings&&t.wings.first_row_index<=e&&t.wings.last_row_index>=e);var dl=D(Ne()),pl=D(require("react"));var jc=D(Ne());var Yi=require("react/jsx-runtime"),qc=({value:t,onChange:e,options:r})=>(0,Yi.jsx)("div",{className:"seat-map__tab-select",children:r.map(n=>(0,Yi.jsx)("button",{type:"button",className:(0,jc.default)("seat-map__tab-select-option",{"seat-map__tab-select-option--selected":n===t}),onClick:()=>t!==n&&e(n),children:n},n))});var Zc=require("react/jsx-runtime"),zc=({value:t,setValue:e})=>{let r=["Lower deck","Upper deck"];return(0,Zc.jsx)(qc,{options:r,value:r[t],onChange:n=>e(r.indexOf(n))})};var te=require("react/jsx-runtime"),Kc=({symbols:t})=>(0,te.jsxs)("div",{className:"seat-map__legend",children:[(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--fee-payable","aria-label":"Additional cost for seat",children:(0,te.jsx)(P,{name:"seat_paid_indicator",className:"seat-map__legend-seat--fee-payable-indicator",size:12})}),"Additional Cost"]}),(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--included","aria-label":"Included seat"}),"Included"]}),(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--selected","aria-label":"Selected seat"}),"Selected"]}),(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat","aria-label":"Unavailable seat",children:(0,te.jsx)(P,{name:"close",size:14})}),"Unavailable"]}),[...t].map(e=>(0,te.jsxs)("span",{className:"seat-map__legend-item seat-map__legend-item--symbol",children:[(0,te.jsx)(P,{name:e,size:20}),e.split("_")[0]]},e))]});var Xc=t=>{let e=Object.values(t.sections).map(r=>r.elements).reduce((r,n)=>r.concat(n),[]).filter(r=>r.type==="seat");return e.length>0?e[0].designator.substring(0,e[0].designator.length-1):null};var ll=D(Ne()),Vi=D(require("react"));var Jc=D(Ne());var $i=require("react/jsx-runtime"),bp=["bassinet","exit_row"],Qc=({type:t})=>(0,$i.jsx)("div",{className:(0,Jc.default)("map-element map-element--amenity",{"map-element--wrapped":!bp.includes(t)}),"aria-label":t.toString(),children:(0,$i.jsx)(P,{name:t,size:16})});var el=require("react/jsx-runtime"),cn=()=>(0,el.jsx)("div",{className:"map-element map-element--empty"});var tl=D(Ne());var So=require("react/jsx-runtime"),rl=({isRight:t})=>(0,So.jsx)("div",{className:(0,tl.default)("map-element map-element--exit",{"map-element--exit--right":t}),children:t?(0,So.jsx)(P,{name:"exit_row_right"}):(0,So.jsx)(P,{name:"exit_row"})});var nl=(t="")=>t.split(" ").map(e=>e[0]).slice(0,2).join("");var al=D(Ne());var It=require("react/jsx-runtime"),ol=({seat:t,service:e})=>{let r=e?G(e.total_currency)(+e.total_amount):"";return(0,It.jsxs)("div",{className:"seat-info",children:[(0,It.jsxs)("div",{className:"seat-info__details",children:[(0,It.jsx)("strong",{children:t?.designator}),(0,It.jsxs)("span",{children:[t?.name||"Seat"," "]}),(0,It.jsx)("strong",{children:r})]}),t?.disclosures.map((n,o)=>(0,It.jsx)("div",{className:"seat-info__disclosure",children:n},o))]})};var Wi=require("react/jsx-runtime"),il=({seat:t})=>(0,Wi.jsx)("span",{className:"map-element map-element__seat","aria-label":`${t.designator} ${t.name||"Seat"} Unavailable`,children:(0,Wi.jsx)(P,{name:"close",size:14})});var pt=require("react/jsx-runtime"),sl=({element:t,currentPassengerId:e,currentSegmentId:r,currentPassengerName:n,onSeatToggled:o,selectedServicesMap:i})=>{let a=t.available_services.find(I=>I.passenger_id===e);if(!a)return(0,pt.jsx)(il,{seat:t});let s=Object.values(i).find(I=>I.serviceInformation?.designator===t.designator&&I.serviceInformation?.segmentId===r),c=s!=null,l=c?nl(s.serviceInformation?.passengerName):t.designator.charAt(t.designator.length-1),f=!isNaN(+a?.total_amount)&&+a?.total_amount!=0,u=!c&&a.passenger_id===e,m=!c||c&&r===s.serviceInformation?.segmentId&&e===s.serviceInformation?.passengerId,h=(0,al.default)("map-element","map-element__seat",{"map-element--available":u,"map-element--selected":c,"map-element--actionable":m}),S=G(a.total_currency)(+a.total_amount),y=c&&r===s.serviceInformation?.segmentId&&e===s.serviceInformation?.passengerId;return(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsxs)("button",{type:"button","data-testid":`seat-${t.designator}`,id:t.designator,className:h,onClick:()=>{m&&o({quantity:c?0:1,id:a.id,serviceInformation:{type:"seat",segmentId:r,passengerId:e,passengerName:n,designator:t.designator,disclosures:t.disclosures,total_amount:a.total_amount,total_currency:a.total_currency}})},"aria-label":`${t.designator} ${t.name||"Seat"} ${S}`,children:[f&&(0,pt.jsx)(P,{name:"seat_paid_indicator",className:"map-element--fee-payable",size:16}),l]}),y&&(0,pt.jsx)(ol,{seat:t,service:a})]})};var xt=require("react/jsx-runtime"),cl=({element:t,elementIndex:e,sectionIndex:r,onSeatToggled:n,selectedServicesMap:o,currentPassengerId:i,currentSegmentId:a,currentPassengerName:s})=>(0,xt.jsx)(xt.Fragment,{children:ao(t)?(0,xt.jsx)(sl,{currentSegmentId:a,currentPassengerId:i,currentPassengerName:s,selectedServicesMap:o,element:t,onSeatToggled:n},e):t.type==="empty"?(0,xt.jsx)(cn,{},e):t.type==="exit_row"?(0,xt.jsx)(rl,{isRight:r>0},e):(0,xt.jsx)(Qc,{type:t.type},e)});var mt=require("react/jsx-runtime"),ul=({row:t,rowNumber:e,hasWings:r,section:n,sectionIndex:o,onSeatToggled:i,selectedServicesMap:a,currentPassengerId:s,currentPassengerName:c,currentSegmentId:l})=>{let f=Object.keys(t.sections).length,u=f===1;return(0,mt.jsxs)(Vi.Fragment,{children:[(0,mt.jsx)("div",{className:(0,ll.default)("map-section",{"map-section--left":o===0,"map-section--right":u?!1:o===f-1,"map-section--wing":r}),children:n.elements.length>0?n.elements.map((m,h)=>(0,mt.jsx)(Vi.Fragment,{children:(0,mt.jsx)(cl,{sectionIndex:o,elementIndex:h,element:m,selectedServicesMap:a,onSeatToggled:i,currentPassengerId:s,currentSegmentId:l,currentPassengerName:c})},h)):(0,mt.jsx)(cn,{})}),(o<f-1||u&&o<f)&&(0,mt.jsx)("span",{className:"map-section__aisle",children:e}),u&&o===t.sections.length-1&&(0,mt.jsx)(cn,{})]},o)};var ln=require("react/jsx-runtime"),fl=({row:t,hasWings:e,onSeatToggled:r,selectedServicesMap:n,currentPassengerId:o,currentPassengerName:i,currentSegmentId:a})=>{let s=Xc(t);return(0,ln.jsx)(ln.Fragment,{children:t.sections.map((c,l)=>(0,ln.jsx)(ul,{row:t,rowNumber:s,hasWings:e,section:c,sectionIndex:l,selectedServicesMap:n,onSeatToggled:r,currentPassengerId:o,currentPassengerName:i,currentSegmentId:a},l))})};var un=require("react/jsx-runtime"),ji=()=>(0,un.jsxs)(pr,{children:[(0,un.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Seat selection unavailable"}),(0,un.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Unfortunately seat selection is not available for this flight. A seat will be allocated by the airline."})]});var Ve=require("react/jsx-runtime"),ml=({seatMap:t,onSeatToggled:e,selectedServicesMap:r,currentPassengerId:n,currentPassengerName:o,currentSegmentId:i})=>{let[a,s]=pl.useState(0);if(!t||!t.cabins||!t.cabins.length)return(0,Ve.jsx)(ji,{});let c=$c(a,t),l=c.length!==t.cabins.length,f=t.cabins.some(m=>m.wings);if(!c||!c.length)return(0,Ve.jsx)(ji,{});let u=Wc(c);return(0,Ve.jsxs)("div",{className:(0,dl.default)("seat-map",{"seat-map--wings":f}),children:[l&&(0,Ve.jsx)(zc,{value:a,setValue:m=>{s(m)}}),(0,Ve.jsx)("div",{className:"seat-map__legend-container",children:(0,Ve.jsx)(Kc,{symbols:u})}),c.map((m,h)=>(0,Ve.jsx)("div",{className:"seat-map__map-container",style:{"--CABIN-AISLES":m.aisles},children:m.rows.map((S,y)=>(0,Ve.jsx)(fl,{row:S,hasWings:Vc(m,y),onSeatToggled:e,selectedServicesMap:r,currentPassengerId:n,currentPassengerName:o,currentSegmentId:i},y))},`cabin-${h}`))]})};var qi=require("react/jsx-runtime"),gl=t=>(0,qi.jsx)(br,{children:(0,qi.jsx)(ml,{...t})});var gt=require("react/jsx-runtime"),_l=({selectedServices:t,servicePrices:e,currency:r,isFirstSegment:n,isLastSegment:o,onNextSegmentButtonClicked:i,onPreviousSegmentButtonClicked:a,onClose:s,seatMaps:c})=>{let l=Ge(t),f=nn(e,t,c),u=G(r)(f),m=n&&o;return(0,gt.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,gt.jsxs)("div",{className:"flex--space-between",children:[(0,gt.jsxs)("div",{children:["Price for ",Oe(l,"seat","seats")]}),(0,gt.jsxs)("div",{className:"h3--semibold",children:["+ ",u]})]}),(0,gt.jsxs)("div",{style:m?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!m&&(0,gt.jsx)(ee,{size:48,disabled:n,variant:"outlined",onClick:()=>a(),children:"Back"}),(0,gt.jsx)(ee,{size:48,"data-testid":"confirm-selection-for-seats",onClick:()=>o?s():i(),children:o?"Confirm":"Next"})]})]})};var Ae=require("react/jsx-runtime"),hl=({segmentAndPassengerPermutationsCount:t,currentSegmentAndPassengerPermutationsIndex:e,currentSegment:r,currentPassengerName:n,setCurrentSegmentAndPassengerPermutationsIndex:o})=>(0,Ae.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,Ae.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((i,a)=>a===e?(0,Ae.jsx)(Tp,{},`segment_${a}`):(0,Ae.jsx)(Sl,{onClick:()=>o(a)},`segment_${a}`))}),(0,Ae.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginBlock:"12px 0px"}:{},children:["Flight to ",r.destination.iata_code,(0,Ae.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:mo(r.departing_at)})]}),(0,Ae.jsx)("p",{className:"h3--semibold",style:{color:"var(--GREY-600)",marginBlock:"0 4px"},children:n})]}),Sl=({onClick:t,style:e})=>(0,Ae.jsx)("button",{type:"button",onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...e}}),Tp=()=>(0,Ae.jsx)(Sl,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var Ir=require("react/jsx-runtime"),yl=({isOpen:t,offer:e,passengers:r,seatMaps:n,selectedServices:o,onClose:i})=>{let[a,s]=zi.default.useState(0),[c,l]=zi.default.useState(o),f=c.reduce((K,X)=>({...K,[X.id]:X}),{});if(!e||!n)return null;let u=fo(e),m=uo(r),h=gr(e.available_services),S=Yc(u),{passenger:{passenger_id:y},passengerIndex:I,segment:{id:O}}=S[a],C=u.find(({id:K})=>K===O),ce=m[y],j=n.find(K=>K.segment_id===O),qe=po(ce,e.passengers[I],I+1),ye=K=>{let X=new Array;for(let De of c){let Wt=De.id===K.id&&K.quantity===0,xr=De.serviceInformation?.segmentId===O&&De.serviceInformation?.passengerId===y;!Wt&&!xr&&(X=[...X,De])}K.quantity>0&&(X=[...X,K]),l(X)},$t=ho(n)??e.total_currency;return(0,Ir.jsxs)(Cr,{isOpen:t,onClose:()=>i(o),children:[(0,Ir.jsx)(hl,{segmentAndPassengerPermutationsCount:S.length,currentSegment:C,currentPassengerName:qe,currentSegmentAndPassengerPermutationsIndex:a,setCurrentSegmentAndPassengerPermutationsIndex:s}),(0,Ir.jsx)(gl,{selectedServicesMap:f,seatMap:j,onSeatToggled:ye,currentPassengerId:y,currentPassengerName:qe,currentSegmentId:O}),(0,Ir.jsx)(_l,{seatMaps:n,currency:$t,selectedServices:c,servicePrices:h,isFirstSegment:a===0,isLastSegment:a+1===S.length,onNextSegmentButtonClicked:()=>{s(a+1)},onPreviousSegmentButtonClicked:()=>{s(a-1)},onClose:()=>i(c)})]})};var je=require("react/jsx-runtime"),vl=({isLoading:t,offer:e,seatMaps:r,passengers:n,selectedServices:o,setSelectedServices:i})=>{let[a,s]=El.default.useState(!1),c=Array.isArray(r)&&r.length>0,l=Ge(o),f=l>0,u=bt(e,o,r),m=e?.base_currency??"";r&&(m=ho(r)??m);let h=e?G(m)(u):"0",S=c&&f?`${Oe(l,"seat","seats")} selected for ${h}`:"Specify where on the plane you\u2019d like to sit";return(0,je.jsxs)(je.Fragment,{children:[(0,je.jsxs)(Er,{buttonTitle:"Select seats",title:"Seat selection",copy:S,icon:"flight_class",onClick:c?()=>s(!0):null,isLoading:t,disabled:t&&!c,isSelected:f,children:[t&&(0,je.jsxs)(ct,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,je.jsx)(hr,{})]}),!t&&!c&&(0,je.jsx)(ct,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,je.jsx)(yl,{isOpen:!!(e&&r&&a),seatMaps:r,offer:e,passengers:n,selectedServices:o,onClose:y=>{i(y),s(!1)}})]})};var Se=require("react/jsx-runtime"),Rp="https://assets.duffel.com/components/3.3.0",Ip=`${Rp}/global.css`,xp=t=>{if(ro(t.debug||!1),st("Properties passed into the component:",t),!Mi(t))throw new Error(`The props (${Object.keys(t)}) passed to DuffelAncillaries are invalid. \`onPayloadReady\`, \`passengers\` and \`services\` are always required. Then, depending on your use case you may have one of the following combinations of required props: \`offer_id\` and \`client_key\`, \`offer\` and \`seat_maps\` or \`offer\` and \`client_key\`.Please refer to the documentation for more information and working examples: https://duffel.com/docs/guides/ancillaries-component`);if(t.services.length===0)throw new Error('You must provide at least one service in the "services" prop. Valid services: ["bags", "seats", "cancel_for_any_reason"]');let e=wi(t),r=ki(t),n=Bi(t),o=Fi(t),i=t.services.includes("seats")&&!("seat_maps"in t)&&(e||r||o),[a,s]=pe.useState(t.passengers),[c,l]=pe.useState(t.offer),[f,u]=pe.useState(r),[m,h]=pe.useState(n?t.seat_maps:void 0),[S,y]=pe.useState(i),[I,O]=pe.useState(null),[C,ce]=pe.useState([]),[j,qe]=pe.useState([]),[ye,$t]=pe.useState([]),K=rc(t.markup,t.priceFormatters),X=k=>{let le="This offer has expired.";if(ac(k)){O(le);return}else{let Or=new Date(k?.expires_at)?.getTime()-Date.now(),Ot=1e3*60*60*24;Or<Ot&&setTimeout(()=>O(le),Or)}let Nr=nc(k,K);l(Nr)},De=k=>{let le=oc(k,K.seats);h(le)};if(pe.useEffect(()=>{Yn("props",{"props.services":t.services,"props.passengers.length":t.passengers.length,"props.offer_id":t.offer_id,"props.client_key":t.client_key,"props.offer?.id":t.offer?.id,"props.seat_maps?.[0]?.id":t.seat_maps?.[0]?.id}),(r||e)&&fc(t.offer_id,e?null:t.client_key,O,u,k=>{if(X(k),k.passengers.length!==a.length)throw new Error(`The number of passengers given to \`duffel-ancillaries\` (${t.passengers.length}) doesn't match the number of passengers on the given offer (${k.passengers.length}).`);e&&s(t.passengers.map((le,Nr)=>({...le,id:k.passengers[Nr].id})))}),i&&pc(r||e?t.offer_id:t.offer.id,e?null:t.client_key,()=>De([]),y,De),o&&X(t.offer),n&&(X(t.offer),De(t.seat_maps))},[t.offer_id,t.client_key,t.offer?.id,t.seat_maps?.[0]?.id]),pe.useEffect(()=>{if(!c)return;let k=tc({baggageSelectedServices:C,seatSelectedServices:j,cfarSelectedServices:ye,offer:c,passengers:a,seatMaps:m});if(ic(k)){let le={offer_total_amount:c.total_amount,offer_total_currency:c.total_currency,offer_tax_amount:c.tax_amount,offer_tax_currency:c.tax_currency,baggage_services:C,seat_services:j,cancel_for_any_reason_services:ye};st("Payload ready",{"Order creation payload":k,"Services metadata":le}),t.onPayloadReady(k,le)}},[C,j,ye]),!Mi(t))return null;let Wt=`${72*t.services.length+32*(t.services.length-1)}px`,xr={display:"flex",width:"100%",flexDirection:"column",rowGap:"12px",...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&so(t.styles.accentColor)&&{"--SECONDARY":"var(--GREY-900)","--TERTIARY":"var(--GREY-400)"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return st("Component's internal state:",{isOfferLoading:f,isSeatMapLoading:S,baggageSelectedServices:C,seatSelectedServices:j,cfarSelectedServices:ye,offer:c,seatMaps:m,error:I}),(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)("link",{rel:"stylesheet",href:Ip}),(0,Se.jsx)("div",{className:"duffel-components",style:xr,children:(0,Se.jsxs)(mr,{children:[I&&(0,Se.jsx)(ec,{height:Wt,message:I}),!I&&t.services.map(k=>{if(k==="bags")return(0,Se.jsx)(wc,{isLoading:f,offer:c,passengers:a,selectedServices:C,setSelectedServices:ce},"bags");if(k==="seats")return(0,Se.jsx)(vl,{isLoading:f||S,seatMaps:m,offer:c,passengers:a,selectedServices:j,setSelectedServices:qe},"seats");if(k==="cancel_for_any_reason")return(0,Se.jsx)(Hc,{isLoading:f,offer:c,selectedServices:ye,setSelectedServices:$t},"cancel_for_any_reason")})]})})]})};var Nt=D(bl());var Rl="https://js.stripe.com/v3",Np=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Tl="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Op=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Rl,'"]')),r=0;r<e.length;r++){var n=e[r];if(Np.test(n.src))return n}return null},Ap=function(e){var r=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(Rl).concat(r);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(n),n},Pp=function(e,r){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"1.54.0",startTime:r})},Eo=null,Dp=function(e){return Eo!==null||(Eo=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&e&&console.warn(Tl),window.Stripe){r(window.Stripe);return}try{var o=Op();o&&e?console.warn(Tl):o||(o=Ap(e)),o.addEventListener("load",function(){window.Stripe?r(window.Stripe):n(new Error("Stripe.js not available"))}),o.addEventListener("error",function(){n(new Error("Failed to load Stripe.js"))})}catch(i){n(i);return}})),Eo},Mp=function(e,r,n){if(e===null)return null;var o=e.apply(void 0,r);return Pp(o,n),o},Il=Promise.resolve().then(function(){return Dp(null)}),xl=!1;Il.catch(function(t){xl||console.warn(t)});var Nl=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];xl=!0;var o=Date.now();return Il.then(function(i){return Mp(i,r,o)})};var Pe=D(require("react"));var Z=require("react/jsx-runtime"),wp="https://assets.duffel.com/components/3.3.0",kp=`${wp}/global.css`,Bp="card",Fp="3.3.0",Lp={color:"var(--GREY-900)",fontFamily:'"-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "sans-serif"',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#ababb4"}},Up={color:"#ef4444",iconColor:"#ef4444"},Hp=({styles:t,paymentIntentClientToken:e,onSuccessfulPayment:r,onFailedPayment:n})=>{let[o,i]=Pe.useState(null),[a,s]=Pe.useState(!1),[c,l]=Pe.useState(!1),[f,u]=Pe.useState(!1),[m,h]=Pe.useState(""),S=(0,Nt.useStripe)(),y=(0,Nt.useElements)();return Pe.useEffect(()=>{if(y&&!o){let O=y?.getElement(Bp);O&&i(O)}},[y,o]),Pe.useEffect(()=>{o&&o.on("change",O=>{let{error:C,complete:ce}=O;C?(l(!0),h(C.message)):l(!1),s(!!ce)})},[o]),e?(0,Z.jsx)("div",{className:"card-payment__container",children:(0,Z.jsxs)("form",{onSubmit:async O=>{if(O.preventDefault(),!(!S||!y)&&o){u(!0);let C=atob(e),ce=JSON.parse(C),{client_secret:j}=ce,qe=await S.confirmCardPayment(j,{payment_method:{card:o,metadata:{duffel_components_version:Fp||"failed-to-get-version"}}});if(u(!1),qe.error){let{error:ye}=qe;n(ye)}else r()}},children:[f&&(0,Z.jsx)("div",{className:"card-payment--in-progress","aria-live":"polite","aria-busy":"true"}),(0,Z.jsx)(Nt.CardElement,{className:"card-details",options:{style:{base:{...Lp,...t?.fontFamily&&{fontFamily:t.fontFamily}},invalid:{...Up}}}}),(0,Z.jsx)("div",{className:"card-payment__container--invalid",role:"alert",children:c&&m}),(0,Z.jsx)(ee,{className:"card-payment__pay-button",type:"submit",disabled:!a||f,"aria-label":"Pay",children:f?"Processing...":"Pay"})]})}):null},Gp=t=>{let[e,r]=Pe.useState(null);ro(t.debug||!1);let n=atob(t.paymentIntentClientToken),o;try{o=JSON.parse(n)}catch{throw new Error("Invalid Duffel payment intent client token provided")}let{publishable_key:i}=o;Pe.useEffect(()=>{if(!e&&i){let s=Nl(i);s&&r(s)}},[e,i]);let a={...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&so(t.styles.accentColor)&&{"--SECONDARY":"black","--TERTIARY":"grey"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("link",{rel:"stylesheet",href:kp}),(0,Z.jsx)("div",{className:"duffel-components",style:a,children:(0,Z.jsx)(mr,{children:(0,Z.jsx)(Nt.Elements,{stripe:e,children:(0,Z.jsx)(Hp,{...t})})})})]})};var Yt=D(require("react"));function Ol(t){if(!t)throw new Error("The client key is missing.");if(t.split(".").length!==3)throw new Error("Invalid clientKey attribute in DuffelCardForm. It must be a valid JWT.");let e=t.split(".")[1];try{return JSON.parse(atob(e)).token}catch{throw new Error("Invalid clientKey attribute in DuffelCardForm. It was not possible to read the payload.")}}function Al(t,{postMessageWithStyles:e,setIFrameHeight:r,onValidateSuccess:n,onValidateFailure:o,onCreateCardForTemporaryUseSuccess:i,onCreateCardForTemporaryUseFailure:a}){return function(c){if(!t?.startsWith(c.origin)||!c.data||!c.data.type)return;let l=c?.data?.type;switch(l){case"iframe-loaded":e();return;case"content-height-ready":r(c.data.height);return;case"validate-success":n();return;case"validate-failure":o();return;case"create-card-for-temporary-use-success":i(c.data.data);return;case"create-card-for-temporary-use-failure":a(c.data.error);return;default:console.log(`Unknown event type: ${l}`);return}}}var Pl=require("react/jsx-runtime"),Yp="https://localhost:8000/iframe.html",$p=({clientKey:t,styles:e,shouldUseLocalTokenProxy:r,actions:n,onValidateSuccess:o,onValidateFailure:i,onCreateCardForTemporaryUseSuccess:a,onCreateCardForTemporaryUseFailure:s})=>{let c=r?Yp:"https://api.duffel.cards/iframe.html";if(typeof c!="string")throw new Error("TOKEN_PROXY_IFRAME_BASE_URL is not defined");let l=new URL(c),[f,u]=Yt.useState("0px"),m=Yt.useRef(null),h=`${l}?${new URLSearchParams({token:Ol(t)}).toString()}`;function S(){if(!m.current)throw new Error("Attempted to call `sendMessageToStoreCardForTemporaryUse` with empty iFrameReference");let I=m.current;if(!I.contentWindow)throw new Error("Attempted to call `sendMessageToStoreCardForTemporaryUse` but the iFrame contentWindow is null");I.contentWindow.postMessage({type:"create-card-for-temporary-use"},l.origin)}function y(){if(!m.current)throw new Error("Attempted to call `postMessageWithStyles` with empty iFrameReference");let I=m.current;if(!I.contentWindow)throw new Error("Attempted to call `postMessageWithStyles` but the iFrame contentWindow is null");I.contentWindow.postMessage({type:"apply-styles",styles:e},l.origin)}return Yt.useEffect(()=>{n.includes("create-card-for-temporary-use")&&S()},[n]),Yt.useEffect(()=>{let I=Al(l.origin,{postMessageWithStyles:y,setIFrameHeight:u,onValidateSuccess:o,onValidateFailure:i,onCreateCardForTemporaryUseSuccess:a,onCreateCardForTemporaryUseFailure:s});return window.addEventListener("message",I),()=>window.removeEventListener("message",I)},[]),(0,Pl.jsx)("iframe",{ref:m,title:"Card Payment Form",src:h,style:{width:"100%",border:"none",height:f}})};
31
31
  /*! Bundled license information:
32
32
 
33
33
  classnames/index.js: