PageSourceSearch

https://breeze-payment-page-demo.vercel.app/_next/static/chunks/app/buy/page-a032acf577a67f2a.js

js breeze-payment-page-demo.vercel.app collected 2026-10-03 06:18:55 UTC 12,401 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[542],{4262:function(e,t,r){Promise.resolve().then(r.bind(r,3414))},3414:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return j}});var n=r(7437),a=r(6070),s=r(2265),i=r(5293),o=r(535),c=r(4508);let l=(0,o.j)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function d(e){let{className:t,variant:r,asChild:a=!1,...s}=e,o=a?i.g7:"span";return(0,n.jsx)(o,{"data-slot":"badge",className:(0,c.cn)(l({variant:r}),t),...s})}let u=(0,r(9205).Z)("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var m=r(3714),f=r(9376),p=r(8694);function h(){return(0,n.jsx)("div",{className:"aspect-square bg-card rounded-lg overflow-hidden border border-border",children:(0,n.jsx)("img",{src:"/premium-wireless-headphones-product-shot.jpg",alt:"Premium Wireless Headphones",className:"w-full h-full object-cover"})})}function g(){return(0,n.jsxs)("div",{className:"flex items-center space-x-1",children:[[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(u,{className:"w-4 h-4 fill-secondary text-secondary"},t)),(0,n.jsx)("span",{className:"text-sm text-muted-foreground ml-2",children:"(4.9)"})]})}function x(){return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("h4",{className:"font-semibold text-card-foreground",children:"Key Features:"}),(0,n.jsxs)("ul",{className:"space-y-1 text-sm text-muted-foreground",children:[(0,n.jsx)("li",{children:"• Active Noise Cancellation (ANC)"}),(0,n.jsx)("li",{children:"• 30-hour battery life with quick charge"}),(0,n.jsx)("li",{children:"• Premium leather and aluminum construction"}),(0,n.jsx)("li",{children:"• Hi-Res Audio certified"}),(0,n.jsx)("li",{children:"• Multipoint Bluetooth connectivity"})]})]})}function v(){return(0,n.jsxs)(a.Zb,{className:"bg-card border-border",children:[(0,n.jsxs)(a.Ol,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(d,{variant:"secondary",className:"bg-secondary text-secondary-foreground",children:"Premium Audio"}),(0,n.jsx)(g,{})]}),(0,n.jsx)(a.ll,{className:"text-3xl font-bold text-card-foreground text-balance",children:"Premium Wireless Headphones"}),(0,n.jsxs)(a.SZ,{className:"text-lg",children:[(0,n.jsx)("span",{className:"text-3xl font-bold text-secondary",children:"$299.99"}),(0,n.jsx)("span",{className:"text-muted-foreground line-through ml-2",children:"$399.99"})]})]}),(0,n.jsxs)(a.aY,{className:"space-y-4",children:[(0,n.jsx)("p",{className:"text-card-foreground leading-relaxed",children:"Experience premium sound quality with our flagship wireless headphones. Featuring active noise cancellation, 30-hour battery life, and premium materials for the ultimate listening experience."}),(0,n.jsx)(x,{})]})]})}function y(){let e=(0,f.useRouter)(),[t,r]=(0,s.useState)(),i=(0,f.useSearchParams)(),o=(null==i?void 0:i.get("iframe"))==="true";return((0,s.useCallback)(()=>
1{if(o){let e=document.getElementById("breeze-payment-page");e&&e.contentWindow&&e.contentWindow.postMessage({type:"request-global-config",config:{applePayEnabled:!0,crossDomainName:location.host}},"*")}},[o]),(0,s.useEffect)(()=>{},[]),(0,s.useEffect)(()=>{(async()=>{let e=await fetch("/api/payment_page",{method:"POST"}),t=await e.json();r({pageId:t.id,clientSecret:t.clientSecret})})()},[]),t)?(0,n.jsxs)(a.Zb,{className:"bg-card border-border",children:[(0,n.jsxs)(a.Ol,{children:[(0,n.jsx)(a.ll,{className:"text-xl text-card-foreground",children:"Secure Checkout"}),(0,n.jsx)(a.SZ,{children:"Complete your purchase securely with our trusted payment system"})]}),(0,n.jsx)(a.aY,{children:(0,n.jsx)("div",{className:"border border-border rounded-lg overflow-hidden bg-background h-[100vh]",children:o?(0,n.jsx)("iframe",{id:"breeze-payment-page",src:"https://pay.qa.breeze.cash/".concat(t.pageId,"/").concat(t.clientSecret,"/web?cross_domain_name=breeze-payment-page-demo.vercel.app"),className:"w-full h-[100dvh]"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("iframe",{style:{display:"none"}}),(0,n.jsx)(m.BreezePaymentPage,{sandbox:!0,pageId:t.pageId,clientSecret:t.clientSecret,style:{width:"100%",height:"100%"},onPaymentStatusChange:r=>{switch(r){case"PAID":(0,p.d)(t.pageId),e.push("/success");break;case"EXPIRED":e.push("/expired")}}})]})})})]}):null}function b(){return(0,n.jsx)("main",{className:"container mx-auto px-4 py-8",children:(0,n.jsxs)("div",{className:"grid lg:grid-cols-2 gap-12 max-w-6xl mx-auto",children:[(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsx)(h,{}),(0,n.jsx)(v,{})]}),(0,n.jsx)("div",{className:"space-y-6",children:(0,n.jsx)(s.Suspense,{children:(0,n.jsx)(y,{})})})]})})}function j(){return(0,n.jsx)(b,{})}},8694:function(e,t,r){"use strict";r.d(t,{d:function(){return i},f:function(){return s}});var n=r(4508);let a={PAID_PAGE_IDS:"paid_page_ids"},s=()=>{var e;return null===(e=(0,n.W)())||void 0===e?void 0:e.getItem(a.PAID_PAGE_IDS)},i=e=>{var t,r,i;let o=s();if(null==o?void 0:o.includes(e))return;let c=null===(t=(0,n.W)())||void 0===t?void 0:t.getItem(a.PAID_PAGE_IDS);c?null===(r=(0,n.W)())||void 0===r||r.setItem(a.PAID_PAGE_IDS,c+","+e):null===(i=(0,n.W)())||void 0===i||i.setItem(a.PAID_PAGE_IDS,e)}},6070:function(e,t,r){"use strict";r.d(t,{Ol:function(){return i},SZ:function(){return c},Zb:function(){return s},aY:function(){return l},ll:function(){return o}});var n=r(7437);r(2265);var a=r(4508);function s(e){let{className:t,...r}=e;return(0,n.jsx)("div",{"data-slot":"card",className:(0,a.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...r})}function i(e){let{className:t,...r}=e;return(0,n.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...r})}function o(e){let{className:t,...r}=e;return(0,n.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("leading-none font-semibold",t),...r})}function c(e){let{className:t,...r}=e;return(0,n.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-muted-foreground text-sm",t),...r})}function l(e){let{className:t,...r}=e;return(0,n.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-6",t),...r})}},4508:function(e,t,r){"use strict";r.d(t,{W:function(){return i},cn:function(){return s}});var n=r(1994),a=r(3335);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.m6)((0,n.W)(t))}let i=()=>{try{return localStorage}catch(e){throw e}}},3714:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};
1Object.defineProperty(t,"__esModule",{value:!0}),t.BreezePaymentPage=void 0;var s=r(6130);Object.defineProperty(t,"BreezePaymentPage",{enumerable:!0,get:function(){return s.BreezePaymentPage}}),a(r(7189),t)},3599:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useApplePayCheck=void 0;let n=r(2265),a=r(3500);t.useApplePayCheck=()=>{let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{(async()=>{try{let e=await (0,a.checkApplePayFileExists)();t(e)}catch{console.log("Apple Pay is not enabled")}})()},[]),{applePayEnabled:e}}},6130:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreezePaymentPage=void 0;let n=r(7437),a=r(2265),s=r(3599),i="breeze-payment-page";t.BreezePaymentPage=e=>{let{pageId:t,clientSecret:r,customisations:o,sandbox:c=!1,style:l,onPaymentStatusChange:d,onPaymentEvent:u}=e,{applePayEnabled:m}=(0,s.useApplePayCheck)(),f=(0,a.useCallback)(async e=>{if("request-global-config"===e.data.type){let e=document.getElementById(i);e&&e.contentWindow&&e.contentWindow.postMessage({type:"request-global-config",config:{applePayEnabled:m,crossDomainName:location.host}},"*")}if("request-breeze-theme"===e.data.type&&o?.theme){let e=document.getElementById(i);e&&e.contentWindow&&e.contentWindow.postMessage({type:"request-breeze-theme",theme:o.theme},"*")}"payment-status-change"===e.data.type&&d?.(e.data.data.status),"on-payment-event"===e.data.type&&u?.(e.data.data.eventName)},[o?.theme,m]);return(0,a.useEffect)(()=>(window.addEventListener("message",f),()=>{window.removeEventListener("message",f)}),[f]),(0,n.jsx)("iframe",{id:"breeze-payment-page",style:l,className:"ui-w-full ui-h-full",src:`${c?"https://pay.qa.breeze.cash":"https://pay.breeze.cash"}/${t}/${r}`,allow:"camera *; accelerometer *; payment *; gyroscope *; microphone *;"},JSON.stringify(e))}},6515:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3500:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkApplePayFileExists=void 0;let r=async()=>{try{return(await fetch(`${location.origin}/.well-known/apple-developer-merchantid-domain-association.txt`,{method:"HEAD"})).ok}catch(e){return console.error("Error checking Apple Pay file:",e),!1}};t.checkApplePayFileExists=r},7189:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.BreezePaymentPage=void 0,a(r(6515),t)},9205:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(2265);let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:l="",children:d,iconNode:u,...m}=e;return(0,n.createElement)("svg",{ref:t,...i,width:a,height:a,stroke:r,strokeWidth:c?24*Number(o)/Number(a):o,className:s("lucide",l),...m},[...u.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),c=(e,t)=>{let r=(0,n.forwardRef)((r,i)=>{let{className:c,...l}=r;return(0,n.createElement)(o,{ref:i,iconNode:t,className:s("lucide-".concat(a(e)),c),...l})});return r.displayName="".concat(e),r}},9376:function(e,t,r){"use strict";var n=r(5475);r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})}},function(e){e.O(0,[50,971,117,744],function(){return e(e.s=4262)}),_N_E=e.O()}]);

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.