PageSourceSearch

https://www.sendbirdie.com/_next/static/chunks/6499.ab5d2f91b4c69442.js

js sendbirdie.com collected 2026-10-03 20:59:47 UTC 6,644 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="2e941361-92ff-435d-ac5d-c50b6b438be0",e._sentryDebugIdIdentifier="sentry-dbid-2e941361-92ff-435d-ac5d-c50b6b438be0")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6499],{86499:function(e,r,t){t.r(r),t.d(r,{default:function(){return b}});var n=t(85893),o=t(67294);let a="birdie:mock_payment_error",i="birdie:mock_payment_error_delay_ms",d=[{key:"processor_decline",label:"gift/ — processor decline",endpoint:"gift/",status:400,body:{processor_errors:{detail:"Your card was declined by the issuer."}},description:"processor_errors.detail branch"},{key:"processor_insufficient_funds",label:"gift/ — insufficient funds",endpoint:"gift/",status:400,body:{processor_errors:{detail:"Insufficient funds."}},description:"processor_errors.detail branch"},{key:"card_invalid",label:"gift/ — card invalid",endpoint:"gift/",status:400,body:{card:"Invalid card. Please use a different payment method."},description:"card branch"},{key:"detail_generic",label:"gift/ — server error (detail)",endpoint:"gift/",status:500,body:{detail:"A server error occurred. Please try again."},description:"detail branch"},{key:"gift_amount_form",label:"gift/ — form_errors.gift_amount",endpoint:"gift/",status:400,body:{form_errors:{gift_amount:["Amount exceeds the maximum allowed."]}},description:"form_errors.gift_amount branch"},{key:"payment_method_form",label:"gift/ — form_errors.payment_method",endpoint:"gift/",status:400,body:{form_errors:{payment_method:["Payment method is no longer valid. Please re-link."]}},description:"form_errors.payment_method (also triggers wallet reload)"},{key:"combined",label:"gift/ — combined (multiple branches)",endpoint:"gift/",status:400,body:{card:"Invalid card.",processor_errors:{detail:"Your card was declined by the issuer."},form_errors:{gift_amount:["Amount exceeds the maximum allowed."]}},description:"multiple branches at once (de-dup path)"},{key:"empty_fallback",label:"gift/ — empty body fallback",endpoint:"gift/",status:500,body:{},description:"generic fallback string"},{key:"network_error",label:"gift/ — network error",endpoint:"gift/",message:"Network Error",description:"err.message only (no response)"},{key:"card_add_processor",label:"add-card/ — processor decline",endpoint:"add-card/",status:400,body:{processor_errors:{detail:"Card issuer declined tokenization."}},description:"add-card path — UI currently shows generic copy"},{key:"card_add_card_field",label:"add-card/ — invalid card field",endpoint:"add-card/",status:400,body:{card:"Invalid card number."},description:"add-card path — UI currently shows generic copy"},{key:"card_add_network",label:"add-card/ — network error",endpoint:"add-card/",message:"Network Error",description:"add-card path — UI currently shows generic copy"}],l=Object.fromEntries(d.map(e=>[e.key,e]));function s(e){try{e?l[e]&&window.localStorage.setItem(a,e):window.localStorage.removeItem(a)}catch(e){}}function c(e){return Number.isFinite(e)?Math.max(0,Math.min(3e4,Math.round(e))):800}function u(e){try{null==e?window.localStorage.removeItem(i):window.localStorage.setItem(i,String(c(e)))}catch(e){}}let f={position:"fixed",right:12,bottom:12,zIndex:9998,fontFamily:"monospace",fontSize:12,color:"#111"},p={background:"#fff3a3",border:"1px solid #b8860b",borderRadius:16,padding:"4px 10px",cursor:"pointer",boxShadow:"0 1px 3px rgba(0,0,0,0.15)",userSelect:"none"},m={background:"#fffbe6",border:"1px solid #b8860b",borderRadius:8,padding:12,width:320,boxShadow:"0 2px 8px rgba(0,0,0,0.2)"},y={border:"1px solid #888",background:"#fff",padding:"4px 8px",cursor:"pointer",fontFamily:"monospace",fontSize:12};var b=()=>{let[e,r]=(0,o.useState)(!1),[t,b]=(0,o.useState)(null),[g,h]=(0,o.useState)(""),[_,x]=(0,o.useState)(800);return(0,o.useEffect)(()=>{let e=function(){try{let e=new URLSearchParams(window.location.search).get("mock_payment_error_delay_ms");if(null!=e&&""!==e){let r=Number(e);Number.isFinite(r)&&u(r)}}catch(e){}let e=function(){try{let e=new URLSearchParams(window.location.search).get("mock_payment_error");
1if(null==e)return null;if("off"===e||""===e)return"off";return l[e]?e:null}catch(e){return null}}();return null===e?function(){try{let e=window.localStorage.getItem(a);if(!e)return null;return l[e]?e:null}catch(e){return null}}():"off"===e?(s(null),null):(s(e),e)}();b(e),h(null!=e?e:""),x(function(){try{let e=window.localStorage.getItem(i);if(null==e)return 800;let r=Number(e);return c(r)}catch(e){return 800}}())},[]),(0,n.jsxs)("div",{style:f,"aria-hidden":"true",children:[!e&&(0,n.jsxs)("div",{style:p,onClick:()=>r(!0),role:"button",tabIndex:-1,children:["⚠ payment mock: ",null!=t?t:"off"]}),e&&(0,n.jsxs)("div",{style:m,children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,n.jsx)("strong",{children:"Payment error mock (dev)"}),(0,n.jsx)("button",{type:"button",style:y,onClick:()=>r(!1),children:"\xd7"})]}),(0,n.jsxs)("div",{style:{marginBottom:6},children:["Active: ",(0,n.jsx)("code",{children:null!=t?t:"off"})]}),(0,n.jsxs)("select",{value:g,onChange:e=>h(e.target.value),style:{width:"100%",padding:4,fontFamily:"monospace",fontSize:12,marginBottom:8},children:[(0,n.jsx)("option",{value:"",children:"(none)"}),d.map(e=>(0,n.jsx)("option",{value:e.key,children:e.label},e.key))]}),(0,n.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[(0,n.jsx)("span",{children:"Delay (ms):"}),(0,n.jsx)("input",{type:"number",min:0,max:3e4,step:100,value:_,onChange:e=>x(Number(e.target.value)||0),style:{width:80,padding:4,fontFamily:"monospace",fontSize:12}})]}),(0,n.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8},children:[(0,n.jsx)("button",{type:"button",style:y,onClick:()=>{let e=g||null;s(e),b(e),u(_)},children:"Apply"}),(0,n.jsx)("button",{type:"button",style:y,onClick:()=>{s(null),b(null),h("")},children:"Clear"})]}),(0,n.jsxs)("div",{style:{fontSize:11,color:"#555",lineHeight:1.4},children:["Refresh the page if a request was already in flight. The scenario and delay persist in ",(0,n.jsx)("code",{children:"localStorage"}),". You can also use",(0,n.jsx)("br",{}),(0,n.jsx)("code",{children:"?mock_payment_error=KEY"}),","," ",(0,n.jsx)("code",{children:"?mock_payment_error=off"}),", or"," ",(0,n.jsx)("code",{children:"?mock_payment_error_delay_ms=N"}),"."]})]})]})}}}]);

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