1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["9f28056f.94dWgNmm.js","9dba8418.BjFsJfKG.js","2c1ab0fe.Bywc2Brn.js","app.CGAYdtrm.js","assets/app.BuSMBobh.css","assets/paypal-express-utilities.BhV0n1qN.css","66338e00.EBE-IemX.js","3a2aad00.DSg3NjG6.js","f67abd2c.BWsb-1Zx.js","164ad2e3.CwFFCQJV.js","d0bb51ec.B6dL-tOK.js","60a453ce.CEvWNvTm.js","e12db40c.BZEbMADi.js","assets/hydrate.1qxw0_8N.css","2210eadb.DF0gIp_2.js","28ac86c0.g5CTo8h8.js","3e6029dd.CSzT4aZh.js","assets/QRCode.BZ_m5G5a.css","30074413.rKbLPXpL.js","assets/Pressable.D9SfDfsb.css","efa0389a.SKDhWulJ.js","22345fd4.C4C9Ghp6.js","assets/Choice.B7lVAtpz.css","9f57d2aa.ti3u0HSW.js","8574876b.DO_JQrVo.js","064f6ac1.AHd5DVks.js","assets/Popover.Bi1nHaU-.css","assets/DateField.CFFsBmUK.css","598fef4e.CB-00gvS.js","assets/PaymentIcon.gzvCNwz_.css","33d2e4fc.DsmEnnPB.js","assets/NumberField.CRpcZnVJ.css","39921a74.CR0ngx5i.js","assets/Switch.BS8yVgoP.css","27f09e31.DxxmYeVS.js","137622f3.DGGWRlC_.js","54bf0ebb.BZEEozam.js","assets/Sheet.CpR5hiDV.css","1ed8f5e3.CzhdrJHY.js","assets/floating-layer.DfWUBaTh.css","2fdb3dd3.dIFymSrZ.js","47b970b2.C3ZYX1tS.js","a9fa9fda.E2WWXy1c.js","ca3e798e.Dc9DtEXz.js","assets/PhoneField.uZEuHncj.css","1444e6bd.nTYcj6dN.js","29034f35.DAxpsOE7.js","assets/AnnouncementRuntimeExtensions.DbBB6lBJ.css","e77d135d.Dz0RetrO.js","21cc90a2.DHzOO82q.js","413b21e2.DJMvIcdN.js"])))=>i.map(i=>d[i]); 2import{A as e,i as t,t as n,g as i,e as a}from"./60a453ce.CEvWNvTm.js";import{iA as s,iB as o,E as r,iC as c,c as l,f0 as d,bp as u,v as p,dq as m,du as f,b2 as y,r as h,s as g,o as v,iD as b,d2 as C,c5 as I,iE as A,bk as k,b5 as w,eY as x,bS as S,bT as T,hI as D,aq as P}from"./9dba8418.BjFsJfKG.js";import{I as N,k as R,T as E,o as _,h as M,t as O,y as L,r as U,ad as V,an as F,j as $}from"./2c1ab0fe.Bywc2Brn.js";import{h as G,dm as B,fQ as j,fO as q,gQ as H,gR as Y,gS as J,gT as z,gU as W,e7 as Q,c9 as K,ca as X,gV as Z,cl as ee,gW as te,gG as ne,gX as ie}from"./164ad2e3.CwFFCQJV.js";import{p as ae,q as se,r as oe,s as re,e as ce,U as le,S as de,a as ue,t as pe,I as me,D as fe,u as ye,O as he}from"./66338e00.EBE-IemX.js";import{b as ge,a as ve,e as be}from"./f67abd2c.BWsb-1Zx.js";import{g as Ce,b as Ie,a as Ae}from"./28ac86c0.g5CTo8h8.js";import{g as ke,q as we,_ as xe}from"./app.CGAYdtrm.js";import{e as Se}from"./e77d135d.Dz0RetrO.js";import{m as Te}from"./21cc90a2.DHzOO82q.js";import{a as De,g as Pe}from"./413b21e2.DJMvIcdN.js";import{v as Ne}from"./2210eadb.DF0gIp_2.js";const Re=e=>e??[];function Ee(e){const t=e.merchantVisitorConsent();return{allowedProcessing:e.merchantAllowedProcessing(),visitorConsent:{analytics:o(t.analytics),marketing:o(t.marketing),preferences:o(t.preferences),saleOfData:o(t.sale_of_data)},shouldShowBanner:e.shouldShowBanner.value,saleOfDataRegion:e.saleOfDataRegion.value,region:s(e.getRegion.value),metafields:Re(e.merchantMetafields())}}const _e={allowedProcessing:{analytics:!1,marketing:!1,preferences:!1,saleOfData:!1},visitorConsent:{analytics:void 0,marketing:void 0,preferences:void 0,saleOfData:void 0},shouldShowBanner:!1,saleOfDataRegion:!1,region:void 0,metafields:[]};function Me({customerPrivacySignal:t,createSubscribableFromSignal:n,extension:i,storefrontTokens:a,applyChange:s,extensionInstance:o,checkout:l,consentManager:d}){const u=!0===i.capabilities.collectBuyerConsent?.customerPrivacy,p=G(i.approvalScopes,e.CustomerPersonalData);return{applyTrackingConsentChange:async function(e){return s({unknownChange:e,extension:i,extensionInstanceId:o.id,allowChangeAfterJourneyCompletion:!0,allowChangeDuringAcceleratedWallet:!0,handlers:{async changeVisitorConsent({change:e}){if(!u)throw new r("Capability not specified: Please declare this in your config: collect_buyer_consent.customer_privacy = true.");if(!p)throw new r("Personal data approval scope missing");if("shopPay"===l.identity.current.value)throw new r("The Customer Privacy API is not supported in Shop Pay.");const n=(e.metafields||[]).filter(e=>void 0!==e.value);if(!Boolean(n.length)&&void 0===e.analytics&&void 0===e.marketing&&void 0===e.preferences&&void 0===e.saleOfData)return{type:"success"};const s=await a.get(i.appId,i.type,"customerPrivacy"),o=t.peek();return new Promise((i,a)=>{d.setTrackingConsent({analytics:e.analytics,marketing:e.marketing,preferences:e.preferences,saleOfData:e.saleOfData,isExtensionToken:!0,storefrontAccessToken:s??void 0,...n.length&&{metafields:n}},(...[n,s])=>{if(s)t.value={...o,allowedProcessing:d.merchantAllowedProcessing(),metafields:Re(d.merchantMetafields()),visitorConsent:{analytics:e.analytics,marketing:e.marketing,preferences:e.preferences,saleOfData:e.saleOfData}},i({type:"success"});else if(n instanceof Error)a(new r(`Failed to set tracking consent: ${n.message}`));else if(n&&"error"in n){const e=function(e,t){const n=null!=t&&t>=400?`Failed to set tracking consent: ${e} (HTTP ${t})`:`Failed to set tracking consent: ${e}`;return 401===t?new oe(n):null!=t&&t>
2=400?new re(n):"undefined"!=typeof navigator&&c(navigator.userAgent)&&e.includes("The string did not match the expected pattern")?new ae(n):new se(n)}(String(n.error),n.statusCode);a(e)}else a(new se("Received unexpected callback from setTrackingConsent()"))})})}},errorResult:e=>e instanceof r||e instanceof ae||e instanceof se||e instanceof oe||e instanceof re?{type:"error",message:e.message}:{type:"error",message:`Failed to set tracking consent: ${e.message}`}})},customerPrivacy:n(N(()=>{const{region:e,...n}=t.value,{countryCode:i,provinceCode:a}=e||{};return{...n,region:i||a?{countryCode:p?i:void 0,provinceCode:p?a:void 0}:void 0}}))}}function Oe(){const{source:e,checkout:t}=l(),n=B();return R(()=>{const i=t.addressManager.shipping.value.applyAddressChangeBlockReason("ui-extension");return function({sourceType:e="checkout",canUpdateDiscountCodes:t,canSelectCustomAddress:n}){const i="draftOrder"===e;return{attributes:{canUpdateAttributes:!0},delivery:{canSelectCustomAddress:n},discounts:{canUpdateDiscountCodes:t},lines:{canAddCartLine:!i,canRemoveCartLine:!i,canUpdateCartLine:!i},metafields:{canSetCartMetafields:!0,canDeleteCartMetafield:!0},notes:{canUpdateNote:!i}}}({sourceType:e.type,canUpdateDiscountCodes:n.value,canSelectCustomAddress:!i.value})})}function Le(e,t){return`${e} is not supported on this checkout. Consider checking "instructions.${t}" first.`}function Ue(e){const t=E(()=>new Map,[]),n=_(t);return M(()=>{Ve(t,e)},[e,t]),n}function Ve(e,t){for(const n of t)Fe(e,n.id)}function Fe(e,t){const n=e.get(t);if(n)return n;let i=()=>{};const a={promise:new Promise(e=>{i=e}),resolve:i};return e.set(t,a),a}function $e(e,t,n){e.get(t)===n&&e.delete(t)}function Ge(e){const n="local"===e.type?void 0:e.registrationId;return{appId:e.appId,appName:e.appName,extensionId:q(e),extensionRegistrationId:n,extensionName:e.name,extensionVersion:e.version,extensionApiVersion:e.apiVersion,extensionTarget:e.extensionPoint.target,extensionPlacement:e.placementReference,extensionType:e.type,isHighValueExtension:null!=n&&j.has(n),isRemoteDom:!!e.apiVersion&&t(e.apiVersion)}}function Be(e,t=qe){let n,i=!1;return N(()=>{const a=e();return i?t(n,a)?n:(n=a,a):(i=!0,n=a,a)})}function je(e,t){if(e===t)return!0;if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!qe(e[n],t[n]))return!1;return!0}function qe(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&n.every(n=>Object.prototype.hasOwnProperty.call(t,n)&&e[n]===t[n])}function He({createSubscribableFromSignal:t,extension:n,negotiated:i,proposed:a,journeyCompletedSignal:s}){if(!G(n.approvalScopes,e.CustomerPersonalData))return{billingAddress:void 0,shippingAddress:void 0};const o=(e,t)=>G(n.approvalScopes,t)?e:void 0;let r;const c=Be(()=>{const t=t=>{if(void 0===t||function(e){return 0===Object.keys(e).length}(t))return;const{address1:n,address2:i,city:a,company:s,countryCode:r,firstName:c,lastName:l,name:d,phone:u,oneTimeUse:p,zoneCode:m,postalCode:f}=t;return{address1:o(n,e.CustomerAddress),address2:o(i,e.CustomerAddress),city:a,company:s,countryCode:o(r,e.CustomerPersonalData),firstName:o(c,e.CustomerName),lastName:o(l,e.CustomerName),name:o(d,e.CustomerName),phone:o(u,e.CustomerPhone),provinceCode:m,zip:o(f,e.CustomerAddress),oneTimeUse:p}};if(!1===i.fields.isShippingRequired.value)return;if(s.value)return t(i.fields.shippingAddress.peek());const n=t(a.shippingAddress.value),c=a.shippingAddress.value?.countryCode,l=r?.countryCode;return a.shippingAddress.dirtyFields.value.has("countryCode")&&l&&c!==l?r:(r=n,n)});return{billingAddress:t(Be(()=>{const t=t=>{if(void 0===t)return;const{address1:n,address2:i,city:a,company:s,countryCode:r,firstName:c,lastName:l,name:d,phone:u,zoneCode:p,postalCode:m}=t;return{address1:o(n,e.CustomerAddress),address2:o(i,e.CustomerAddress),city:a,company:s,countryCode:o(r,e.CustomerPersonalData),firstName:o(c,e.CustomerName),lastName:o(l,e.CustomerName),name:o(d,e.CustomerName),phone:o(u,e.CustomerPhone),provinceCode:p,zip:o(m,e.CustomerAddress)}};if(s.value)return t(i.fields.billingAddress.peek());const n=a.billingAddress.value;switch(a.billingAddressOption.value){case"shipping":{const e=i.fields.buyerIdentity.value?.purchasingCompany;if(e)return t(e?.location?.shippingAddress??n);if(c.value){const{oneTimeUse:e,...t}=c.value;return t}return t(n)}case"billing":{const e=i.fields.buyerIdentity.value?.purchasingCompany?.location.billingAddress;return t(e??n)}default:return t(n)}})),shippingAddress:t(c)}}async function Ye(e){try{return await e()}catch(t){if(function(e){return e instanceof ce&&"object"==typeof e.cause&&null!==e.cause&&"code"in e.cause&&"INVA
2LID_NEGOTIATION"===e.cause.code}(t))return;throw t}}function Je({proposed:e,negotiated:t,createSubscribableFromSignal:n,cartInstructionsSignal:i,extension:a,extensionInstance:s,applyChange:o}){return{applyAttributeChange:async function(n){return o({unknownChange:n,extension:a,extensionInstanceId:s.id,handlers:{async updateAttribute({negotiate:n,change:a,markChangeAsNoOp:s}){if(ze(a),!i.peek().attributes.canUpdateAttributes)throw new r(Le("applyAttributeChange","attributes"));const o=e.attributes.peek();return function(e,t,n){const i=t=>{const n=t?.find(t=>t.key===e.key);return void 0!==n&&n.value===e.value},a=i(n),s=void 0===t?a:i(t);return a&&s}(a,o,t.fields.customAttributes.peek())?(s(),{type:"success"}):(e.attributes.value=We(o,a),await Ye(()=>n({silenceViolations:["all"]})),{type:"success"})},async removeAttribute({negotiate:t,change:n}){if(ze(n),!i.peek().attributes.canUpdateAttributes)throw new r(Le("applyAttributeChange","attributes"));const a=e.attributes.peek();if(!a?.find(e=>e.key===n.key))throw new r(`Invalid AttributeChange: no attribute with specified key found: "${n.key}"`);return e.attributes.value=We(a,n),await Ye(()=>t({silenceViolations:["all"]})),{type:"success"}}},errorResult:e=>({type:"error",message:`Could not apply attribute changes. Error: ${e.message}`})})},attributes:n((c=()=>(e.attributes.value||t.fields.customAttributes.value?.map(({key:e,value:t})=>({key:e,value:t})))??[],Be(c,je)))};var c}function ze(e){if("string"!=typeof e.key||e.key.length<3||e.key.length>30)throw new r('Invalid AttributeChange: attribute key must be of type "string" and between 3 and 30 characters in length (inclusive)');if("updateAttribute"===e.type&&"string"!=typeof e.value)throw new r('Invalid AttributeChange: attribute value must be of type "string"')}function We(e,t){const n=e?[...e]:[],i=n.findIndex(({key:e})=>e===t.key);return"updateAttribute"===t.type&&(i>-1?n[i]={key:t.key,value:t.value}:n.push({key:t.key,value:t.value})),"removeAttribute"===t.type&&n.splice(i,1),n}const Qe=/^\$app|^app--\d+--/,Ke=/^app--\d+--/,Xe=/^app--\d+$/,Ze="$app";function et(e,t){if(e.trim()===Ze)return`app--${t}`;const n=Ze+":";return e.trim().startsWith(n)?`app--${t}--${e.slice(5)}`:e}const tt="2026-01";function nt({proposed:e,createSubscribableFromSignal:t,extension:i,cartInstructionsSignal:a,applyChange:s,extensionInstance:o,checkout:c}){const{extensibility:l}=c,d="local"===i.type&&n(i.apiVersion).equalTo(tt);return{metafields:t(N(()=>{const e="processed"===c.latestReceipt.value?.status?c.latestReceipt.value?.purchaseOrder.metafields:[];return(e&&e.length>0?e:l.ui.metafields.value).map(({key:e,namespace:t,value:n,valueType:i})=>({key:e,namespace:t,value:n,valueType:i}))})),applyMetafieldChange:async t=>s({unknownChange:t,extension:i,extensionInstanceId:o.id,handlers:{async updateMetafield({change:e}){if(!st(i.apiVersion))throw new r("Change type `updateMetafield` is no longer supported. Use `updateCartMetafield` instead.");d&&console.warn("Change type `updateMetafield` is deprecated and will be removed in a future API version. Use `updateCartMetafield` instead. See https://shopify.dev/docs/api/checkout-ui-extensions/2026-01/apis/metafields#methods-propertydetail-applymetafieldchange for more details."),function(e){const{key:t,namespace:n,value:i,valueType:a}=e;if("string"!=typeof t||t.length<3||t.length>30)throw new r(`Invalid property key: "${t}". It must be between 3 and 30 characters in length (inclusive).`);if("string"!=typeof n)throw new r(`Invalid property namespace: "${n}". It must be a string between 2 and 20 characters (inclusive).`);if(n.length<2||n.length>20)throw new r(`Invalid property namespace: "${n}". It must be between 2 and 20 characters in length (inclusive).`);if(Qe.test(n))throw new r(`Invalid property namespace: "${n}". App reserved namespaces not supported.`);switch(a){case"integer":if("number"!=typeof i)throw new r(`Invalid property value: "${i}". It must be a number.`);break;case"string":if("string"!=typeof i)throw new r(`Invalid property value: "${i}". It must be a string.`);if(i.length<=0)throw new r(`Invalid property value: "${i}". It must not be empty.`);break;case"json_string":if(!function(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch{}return!1}(i))throw new r(`Invalid property value: "${i}". It must be a json_string.`);break;default:throw new r(`Invalid property valueType: "${a}". It must be in one of these values: integer, string, json_string.`)}}(e);const{key:t,namespace:n,value:a,valueType:s}=e,o=l.ui.metafields.value,c=o.findIndex(e=>e.key===t&&e.namespace===n),u=[...o],p=u[c];return p?u[c]={...p,value:a,valueType:s,appId:i.appId}:u.push({key:t,namespace:n,value:a,valueType:s,appId:i.appId}),l.ui.updateMetafields(u),{type:"success"}},async removeMetafield({change:e}){if(!st(i.apiVersion))throw new r("Change type `removeMetafield` is no longer supported. Use `removeCartMetafield` instead.");d&&console.warn("Change type `removeMetafield` is deprecated and will be removed in a future API version. Use `removeCartMetafield` instead. See https://shopify.dev/docs/api/checkout-ui-extensions/2026-01/apis/metafields#methods-propertydetail-applymetafieldchange for more details.");const{key:t,namespace:n}=e,a=l.ui.metafields.value.filter(e=>e.key!==t||e.namespace!==n);return l.ui.updateMetafields(a),{type:"success"}},async updateCartMetafield({change:t,negotiate:n}){it(t.type,a.peek().metafields),function(e){const{metafield:t}=e;if(null==t)throw new r(`Invalid property metafield: "${t}". It must be an object.`);const{key:n,namespace:i,value:a,type:s}=t;if("string"!=typeof n||n.length<2||n.length>64)throw new r(`Invalid property key: "${n}". It must be between 2 and 64 characters in length (inclusive).`);if(null!==i&&"string"!=typeof i&&void 0!==i)throw new r(`Invalid property namespace: "${i}". namespace must be null, undefined, or a string between 3 and 255 characters (inclusive).`);if("string"==typeof i&&(i.length<3||i.length>255))throw new r(`Invalid property namespace: "${i}". It must be between 3 and 255 characters in length (inclusive).`);if("string"!=typeof s)throw new r(`Invalid property type: "${s}". It must be a string. Received type: ${typeof s}.`);if("integer"===s){if("number"!=typeof a&&"string"!=typeof a)throw new r(`Invalid property value: "${a}". It must be a number or a string when type is "integer". Received type: ${typeof a}.`)}else if("string"!=typeof a)throw new r(`Invalid property value: "${a}". It must be a string when type ("${s}") is not "integer". Received type: ${typeof a}.`)}(t);const s="string"==typeof t.metafield.value?t.metafield.value:String(t.metafield.value);return e.cartMetafields.value=[...e.cartMetafields.peek(),{update:{key:t.metafield.key,namespace:t.metafield.namespace,value:s,type:t.metafield.type,appId:i.appId}}],at(await n({fieldsToResolve:["cartMetafields"],silenceViolations:["all"]}),e,t),{type:"success"}},removeCartMetafield:async({change:t,negotiate:n})=>(it(t.type,a.peek().metafields),function(e){const{key:t,namespace:n}=e;if("string"!=typeof t)throw new r(`Invalid property key: "${t}". It must be a string.`);if(null!=n&&"string"!=typeof n)throw new r(`Invalid property namespace: "${n}". The namespace must be either null, undefined, or a string.`)}(t),e.cartMetafields.value=[...e.cartMetafields.peek(),{delete:{appId:i.appId,key:t.key,namespace:t.namespace}}],at(await n({fieldsToResolve:["cartMetafields"],silenceViolations:["all"]}),e,t),{type:"success"})},errorResult:e=>({type:"error",message:e.message})})}}function it(e,{canSetCartMetafields:t,canDeleteCartMetafield:n}){const i=`applyMetafieldChange with type ${e}`;if("updateCartMetafield"===e&&!t)throw new r(Le(i,"metafields"));if("removeCartMetafield"===e&&!n)throw new r(Le(i,"metafields"))}function at(e,t,n){const i=[...t.cartMetafields.peek()],a=e.errors.filter(e=>H.has(e.code));if(0===a.length)return;const s=a.reduce((e,t)=>
2{if("target"in t){const n=function(e){const t=e.match(/\[(\d+)\]$/),n=t?.[1];return void 0!==n?parseInt(n,10):-1}(t.target);n>=0&&!e[n]&&(e[n]=t)}return e},{}),o=i.findIndex((e,t)=>!!s[t]&&("updateCartMetafield"===n.type&&e.update?.key===n.metafield.key&&e.update?.namespace===n.metafield.namespace&&e.update?.value===n.metafield.value||"removeCartMetafield"===n.type&&e.delete?.key===n.key&&e.delete?.namespace===n.namespace)),c=s[o];if(o>-1&&c)throw t.cartMetafields.value=i.slice(0,o),new r(c.nonLocalizedMessage,{cause:{code:c.code}})}function st(e){return!n(e).laterThan(tt)}function ot({webPixels:e,extension:t}){const n=u(t.appId)||"unknown-app",i=u(q(t))||"unknown-extension";return{analytics:{publish:(a,s={})=>e.publishCustomEvent(a,s,{extension:{extensionId:i,appId:n,type:t.type||"unknown-type"}}),visitor:t=>e.visitor(t,{apiClientId:n})}}}const rt={id:"be4fa5a8e92c26d115e34073b486a58fc317388a2eedddb82d02eeccb9573278",type:"query",name:"ExtensionMetafields",source:""},ct=async({withCache:e=!0,coreGraphql:t,extension:n,observability:i,negotiated:a,checkoutProfileId:s,appMetafieldsSignal:o})=>{let r=[];const c=ke(a),l=await we({withCache:e,coreGraphql:t,resourceIds:c,
2checkoutProfileId:s}),d=l.data?.globalCheckoutUiExtensions??[],u=[...l.data?.checkoutProfile?.activatedExtensions??[],...d].map(({extension:e})=>e),p=u?.find(e=>e.uuid===n.extensionId);let m=p?.metafields??[];if(!p){const i={resourceIds:c};"local"===n.type?i.extensionHandles=[{handle:n.handle,apiKey:n.appApiKey}]:i.extensionIds=[`gid://shopify/UiExtension/${n.extensionId}`];const{data:a}=await t.staticQuery(rt,{variables:i,cache:e});a?.extensionMetafields&&(m=a?.extensionMetafields)}r=function({queryResult:e,metafields:t,observability:n,extension:i}){if(e.error)return n.leaveErrorBreadcrumb("Extensions::GraphQL",{reason:"Failed to fetch extension metafields.",message:String(e.error),extensionId:i.id,extensionVersion:"persisted"===i.type?i.version:void 0}),[];const a=[];for(const s of t){if(!pt(i,s.ownerType)||!ut(i,s))continue;const e=dt(i.apiVersion,s.namespace);a.push({target:mt(s.ownerId,s.ownerType),metafield:{key:s.key,namespace:e,value:s.value,type:s.type.toLowerCase(),valueType:s.valueType.toLowerCase()}})}return a}({extension:n,queryResult:l,metafields:m,observability:i}),o.value={...o.peek(),[n.id]:r}};function lt({coreGraphql:e,extension:t,extensionInstance:n,negotiated:i,observability:a,createSubscribableFromSignal:s,sourceId:o,checkout:r,appMetafieldsSignal:c}){const l=O(()=>{ct({withCache:!0,coreGraphql:e,extension:t,observability:a,negotiated:i,appMetafieldsSignal:c,checkoutProfileId:r.configuration.profileId.value})});n.on("destroy",()=>{l()});const d={type:"extension",extension:t,instanceId:n.id};return(async()=>{Se.markStarted("app-metafields-load",d);try{await ct({withCache:!0,coreGraphql:e,extension:t,observability:a,negotiated:i,appMetafieldsSignal:c,checkoutProfileId:r.configuration.profileId.value})}finally{Se.markFinished("app-metafields-load",d)}})(),{appMetafields:s(N(()=>{const e=c.value[t.id]??[],n=t.extensionPoint.metafields??[],a=i.fields.buyerIdentity.value,s=a?.shopUser?.metafields??[],r=a?.shopUser?.publicId??"",l=s.flatMap(e=>e&&r&&n.some(t=>t.key===e.key&&t.namespace===e.namespace)?[{target:{type:"shopUser",id:r},metafield:{key:e.key,namespace:dt(t.apiVersion,e.namespace??""),value:e.value,type:e.type,valueType:e.valueType.toLowerCase()}}]:[]),d=i.fields.cartMetafields.value,u=p(t.appId);return[...e,...d?d?.flatMap(e=>e&&null!=e.ownerType&&n.some(n=>!(n.key!==e.key||et(n.namespace,u)!==e.namespace||n.ownerType&&n.ownerType!==e.ownerType||e.namespaceAppId&&t.appId!==e.namespaceAppId))?[{target:{type:"cart",id:o},metafield:{key:e.key,namespace:dt(t.apiVersion,e.namespace??""),value:e.value,type:e.type,valueType:e.valueType.toLowerCase()}}]:[]):[],...l]}))}}function dt(e,t){return n(e).laterThan("2025-01")?function(e){return Xe.test(e)?Ze:e.replace(Ke,Ze+":")}(t):t}function ut(e,t){const n=p(e.appId),i=e.extensionPoint.metafields.filter(e=>e.key===t.key&&et(e.namespace,n)===t.namespace);return 0===i.length||i.some(e=>!e.ownerType||e.ownerType===t.ownerType)}function pt(t,n){switch(n){case"CART":case"PRODUCT":case"PRODUCTVARIANT":case"SHOP":case"SHOPUSER":return!0;case"CUSTOMER":case"COMPANY":case"COMPANYLOCATION":return G(t.approvalScopes,e.CustomerPersonalData);default:return!1}}function mt(e,t){const n=p(e);switch(t){case"CUSTOMER":return{type:"customer",id:n};case"PRODUCT":return{type:"product",id:n};case"PRODUCTVARIANT":return{type:"variant",id:n};case"SHOP":return{type:"shop",id:n};case"COMPANY":return{type:"company",id:n};case"COMPANYLOCATION":return{type:"companyLocation",id:n};case"CART":return{type:"cart",id:n};case"SHOPUSER":return{type:"shopUser",id:n};default:return(()=>{throw new le(`Metafield ownerType "${t}" with id "${e}" cannot be resolved`)})()}}function ft({publicCheckoutSessionId:e,createSubscribableFromSignal:t}){return{checkoutToken:t(L(e))}}function yt(e){return{initial:e.current,subscribe(t){U(t);const n=e.subscribe((n=e.current)=>t(n));return[()=>{n(),V(t)},e.current]}}}function ht({extension:e,extensionInstance:t,createSubscribableFromSignal:n,isCheckoutEditor:i,observability:a}){const s=N(()=>{const t=e.behaviors.value,n=new Set;return t.blockProgress||n.add("blockProgress"),function(e,t){const n=[];return Object.keys(e).forEach(i=>
2{const a=i;a in e&&("object"!=typeof e[a]&&!t.has(a)&&Boolean(e[a])&&n.push(Y(a)),"object"==typeof e[a]&&Object.entries(e[a]).forEach(([e,t])=>{if(Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t){const t=`${Y(i)}.${Y(e)}`;n.push(t)}}))}),n}(e.capabilities,n)}),o=yt({get current(){return t.rendered},subscribe:e=>{const n=t.on("render",()=>{e(t.rendered)}),i=t.on("remove",()=>{try{e(t.rendered)}catch(n){throw a.leaveErrorBreadcrumb("Error removing rendered subscription on remove event",{isDestroyed:t.isDestroyed,rendered:t.rendered,extensionId:t.id}),n}}),s=t.on("restart",()=>{r()}),o=t.on("destroy",()=>{r()}),r=()=>{n(),i(),s(),o()};return r}});return{scriptUrl:e.scriptUrl,version:"persisted"===e.type?e.version:void 0,apiVersion:e.apiVersion,rendered:o,capabilities:n(s),editor:i?{type:"checkout"}:void 0,target:t.target}}function gt({locale:e,currencySignal:t,timezone:n,extension:i,createSubscribableFromSignal:a,negotiated:s}){return{localization:{language:a(L({isoCode:e})),extensionLanguage:a(L({isoCode:i.extensionLocale})),currency:a(t),timezone:a(L(n??(new Intl.DateTimeFormat).resolvedOptions().timeZone)),country:a(N(()=>{const e=s.fields.buyerIdentity.value?.countryCode;if(e)return{isoCode:e}})),market:a(N(()=>{const e=s.fields.buyerIdentity.value?.market;if(!e)return;const{id:t,handle:n}=e;return{id:t,handle:n}}))}}}function vt({captureEvent:e,extension:t,locale:n,shop:a,storefrontTokens:s,extensionInstance:o}){const c=t.capabilities.apiAccess;async function l(e,o=!1,d){if(!c)throw new r('permission to access the storefront API must be specified under [capabilities] with flag "api_access = true"; this can be done within your extension\'s configuration. View the docs for more information:\n\nhttps://shopify.dev/docs/api/checkout-ui-extensions/configuration#api-access');const u=await s.get(t.appId,t.type,"fetchWithToken");if(!u)throw new f(`Could not get a storefront token for app ${t.appId} to query ${e}`);try{const r=await fetch(`https://${a.myshopifyDomain}/api/${d?.version??i(t.apiVersion)}/graphql.json`,{method:"POST",headers:{"Content-Type":"application/json","Accept-Language":n,"Shopify-Storefront-Extension-Token":u},body:JSON.stringify({query:e,variables:d?.variables})});return 401===r?.status&&o?(s.cache.delete(s.cacheKey(t.appId,t.type)),l(e,!1,d)):r}catch(p){if("BreadcrumbsPluginFetchError"===p.name&&o)return l(e,!1,d);throw new m(`An error occurred when attempting to fetch the extension api: ${p}`,{cause:p})}}return{query:async(n,i)=>{if(!t.capabilities.apiAccess)throw new r('Extension is not allowed to use the Storefront API; permission to use the Storefront API must be specified under [capabilities] with:"api_access = true; see:\n\nhttps://shopify.dev/docs/api/checkout-ui-extensions/configuration#api-access');const a=performance.now();e("extensionInteraction",{interaction:"storefrontApiQueryStart",extension:t,section:"extension",timestamp:new Date,extensionInstanceId:o.id});try{const r=await l(n,!0,i);if(r&&r.ok){e("extensionInteraction",{interaction:"storefrontApiQuerySuccess",extension:t,section:"extension",timestamp:new Date,duration:performance.now()-a,extensionInstanceId:o.id});try{return await r.json()}catch(s){throw new de("Failed to parse Storefront API response",{cause:s})}}throw new m(`Failed to query storefront API: status=${r?.status} ${r?.statusText}`.trim())}catch(s){let n="storefrontApiQueryError";throw s instanceof m&&s?.cause instanceof Error&&"BreadcrumbsPluginFetchError"===s.cause?.name?n="storefrontApiQuerySuccess":s instanceof de&&(n="storefrontResponseParseError"),e("extensionInteraction",{interaction:n,extension:t,section:"extension",timestamp:new Date,duration:performance.now()-a,error:s instanceof Error?s:void 0,extensionInstanceId:o.id}),s}}}}function bt({extension:{configuration:e},createSubscribableFromSignal:t}){return t(e)}function Ct(e){return{id:e.id,name:e.name,storefrontUrl:e.storefrontUrl??void 0,myshopifyDomain:e.myshopifyDomain}}function It(e){return{id:e.id,name:e.name,storefrontUrl:e.storefrontUrl?(t=e.storefrontUrl,t.endsWith("/")?t:`${t}/`):void 0,myshopifyDomain:e.myshopifyDomain};var t}function At({extension:e}){return wt(`v1-${q(e)}-${e.extensionPoint.target}`)}function kt({extension:e}){return wt(`v1-${e.appId}-${e.extensionId}`)}function wt(e){const t=y.ExtensionStorage,n=t=>`${e}-${t}`,i=()=>v(t)??{};return{async read(e){J("string"==typeof e,'Missing "key" argument. Please pass a key to read from to storage.');const t=n(e),a=i();return Object.keys(a).length&&a[t]||null},async write(e,a){J("string"==typeof e,'Missing "key" argument. Please pass a key to write to to storage.'),J(arguments.length>1,`Missing "data" argument. Please pass a value to write to "${e}" `);const s=n(e),o=i();o[s]=a,g(t,o)},async delete(e){J("string"==typeof e,'Missing "key" argument. Please pass a key to delete from storage.');const a=n(e),s=i();delete s[a],0===Object.keys(s).length?h(t):g(t,s)}}}function xt(e){return e}const St=new Set(["DISCOUNTS_ONLY_EMPTY_TERMS_ACCEPTED","DISCOUNTS_DISCOUNTS_NOT_ALLOWED_FOR_B2B","DISCOUNTS_DISCOUNT_CODE_NOT_HONOURED","DISCOUNTS_CUSTOM_DISCOUNT_NOT_HONOURED","DISCOUNTS_UNSUPPORTED_EXPECTATION","DISCOUNTS_ALLOCATIONS_MISMATCH","DISCOUNTS_ADDITIONAL_REQUESTED_DISCOUNT_CODE_DISCARDED","DISCOUNTS_NOT_FOUND","DISCOUNTS_CURRENTLY_INACTIVE","DISCOUNTS_USAG
2E_LIMIT_REACHED","DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_CUSTOMER_NOT_ELIGIBLE","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_LINE_ITEMS","DISCOUNTS_NO_ENTITLED_SHIPPING_LINES","DISCOUNTS_INCOMPATIBLE_PURCHASE_TYPE","DISCOUNTS_DISCOUNT_ALREADY_APPLIED","DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED","DISCOUNTS_MAXIMUM_DISCOUNT_CODE_LIMIT_REACHED","DISCOUNTS_INVALID_SIGNATURE","REDUCTION_INVALID_CODE","REDUCTION_INVALID_DISCOUNT_CODE"]);function Tt({negotiated:e,proposed:t,extension:n,createSubscribableFromSignal:i,cartInstructionsSignal:a,applyChange:s,extensionInstance:o,currentDiscountCodeAttemptSignal:c}){const l=i(N(()=>{const t=e.fields.discountLines.value?.lines;return t?t.filter(e=>"code"===e.discount.type).map(e=>({code:e.title})):[]})),d=i(N(()=>{const t=e.fields.discountLines.value?.lines;return t?function(e){return e.filter(e=>ve(e)&&"CART"===e.discount.presentationLevel).map(e=>{const{discount:t,amount:n,title:i}=e;return"code"===t.type?{type:"code",code:i,discountedAmount:n}:"automatic"===t.type?{type:"automatic",title:i,discountedAmount:n}:{type:"custom",title:i,discountedAmount:n}})}(t):[]})),u=["non-merchandise"];return{discountCodes:l,discountAllocations:d,async applyDiscountCodeChange(e){return s({unknownChange:e,extension:n,extensionInstanceId:o.id,handlers:{addDiscountCode:async({negotiate:e,change:t})=>(i(),Dt(t),Pt(await e({customizeNegotiation:e=>(c.value=t.code,{...e,reduction:{code:t.code}}),silenceViolations:u}),t.code),c.value=null,{type:"success"}),async removeDiscountCode({negotiate:e,change:n}){i(),Dt(n);const a=t.discountLines.peek(),s=n.code.toUpperCase(),o=a.find(({discount:e})=>"code"===e.type&&e.title.toUpperCase()===s);if(!o)throw new r(`The discount code "${n.code}" is not allocated to this checkout and cannot be removed.`,{cause:{code:"DISCOUNT_NOT_FOUND"}});return t.discountLines.value=a.filter(({discount:e})=>e.title.toUpperCase()!==o.title.toUpperCase()),Pt(await e({fieldsToResolve:[...z],silenceViolations:u}),n.code),{type:"success"}}},errorResult:e=>({type:"error",message:`Could not apply discount code changes. Error: ${e.message}`})});function i(){if(!a.peek().discounts.canUpdateDiscountCodes)throw new r(Le("applyDiscountCodeChange","discounts"))}}}}function Dt(e){if("string"!=typeof e.code)throw new r('Discount code must be of type "string"')}function Pt(e,t){const n=e.errors.find(e=>{if("RemoveTermViolation"!==e.type||be(e.targetEntity)?.title===t)return St.has(e.code)});if(n)throw new r(n.nonLocalizedMessage,{cause:{code:n.code}})}const Nt=new Set(["REDUCTION_INVALID_CODE","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_B2B","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_FIXED_SELLING_PLANS","PAYMENTS_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_BUYING_GIFT_CARD","PAYMENTS_GIFT_CARD_CURRENCY_MISMATCH","PAYMENTS_GIFT_CARD_DISABLED","PAYMENTS_GIFT_CARD_NON_SUFFICIENT_FUNDS","PAYMENTS_GIFT_CARD_NOT_FOUND","REDUCTION_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_SHOP_CASH_GIFT_CARD_NOT_ALLOWED","REDUCTION_INVALID_GIFT_CARD_CODE","PAYMENTS_INSTALLMENTS_GIFT_CARD_NOT_ALLOWED","PAYMENTS_GIFT_CARDS_UNAVAILABLE"]);function Rt({negotiated:e,proposed:t,extension:n,createSubscribableFromSignal:i,shop:a,applyChange:s,extensionInstance:o}){return{appliedGiftCards:i(N(()=>{const t=e.fields.paymentLines.value;return t?t.lines.filter(e=>"giftCard"===e.method.type).map(e=>({lastCharacters:C(e.method),amountUsed:e.cost,balance:e.method.balance})):[]})),applyGiftCardChange:async i=>s({unknownChange:i,extension:n,extensionInstanceId:o.id,handlers:{async addGiftCard({negotiate:t,change:n}){Et(n);const i=e.fields.paymentMethods.peek()?.some(e=>"giftCard"===e.type);if(!i)throw new r("the `applyGiftCardChange` API is disabled");return Mt(await t({customizeNegotiation:e=>({...e,reduction:{code:n.code}})})),{type:"success"}},async removeGiftCard({negotiate:e,change:n}){Et(n);const i=t.paymentLines.peek(),s=a.hasFlagEnabled(b);let o=i;return s?n.code.split(",").forEach(e=>{o=_t(o,e)}):o=_t(o,n.code),t.paymentLines.value=o,Mt(await e({})),{type:"success"}}},errorResult:e=>({type:"error",message:`Could not apply gift card changes. Error: ${e.message}`})})}}function Et(e){if("string"!=typeof e?.code)throw new r("Gift card code must be a string")}function _t(e,t){const n=t.replace(/[\s-]/g,"").toLowerCase(),i=e.findIndex(({method:e})=>"giftCard"===e.type&&(4===t.length?C(e).toLowerCase()===n.slice(-4):"code"in e&&e.code.toLowerCase()===n));if(-1===i)return e;const a=[...e];return a.splice(i,1),a}function Mt(e){const t=e.errors.find(e=>Nt.has(e.code));if(t)throw new r(t.nonLocalizedMessage,{cause:{code:t.code}})}function Ot(e){const{lineAllocation:t}=e,n="parentRelationship"in e?e.parentRelationship?.parent?.lineAllocations?.[0]:void 0;return{id:(a=t.stableId,`gid://shopify/CartLine/${a}`),quantity:t.quantity,cost:{totalAmount:t.checkoutPriceAfterDiscounts},merchandise:Lt(e),attributes:e.properties.map(e=>({key:e.name,value:String(e.value)})),discountAllocations:(i=t.allocations,i.filter(e=>ge(e.discountDetails.discount)&&"LINE"===e.discountDetails.discount.presentationLevel).map(e=>{const{discount:t,title:n}=e.discountDetails;return"code"===t.type?{type:"code",code:n,discountedAmount:e.amount}:"automatic"===t.type?{type:"automatic",title:n,discountedAmount:e.amount}:{type:"custom",title:n,discountedAmount:e.amount}})),lineComponents:e.lineComponents.map(e=>({type:"bundle",id:Vt(e.lineAllocation.stableId),merchandise:Lt(e),quantity:e.lineAllocation.quantity,cost:{totalAmount:e.lineAllocation.checkoutPriceAfterDiscounts},attributes:e.properties.map(e=>({key:e.name,value:String(e.value)}))})),parentRelationship:n?{parent:{id:Vt(n.stableId)}}:null};var i,a}function Lt(e){if(!e.variantId)throw new I("Cannot create cart line API without a variantId. Custom merchandise lines are not yet supported.");return{type:"variant",id:e.variantId.replace("ProductVariantMerchandise","ProductVariant"),title:e.title,subtitle:e.subtitle,image:e.image?{url:e.image.four,altText:e.image.altText}:void 0,selectedOptions:e.options.map(e=>({name:e.name,value:e.value}
2)),product:{id:e.productId,vendor:e.vendor,productType:e.productType},requiresShipping:e.requiresShipping,sellingPlan:e.sellingPlan?{id:e.sellingPlan.id,recurringDeliveries:Boolean(e.sellingPlan.subscriptionDetails)}:void 0,sku:e.sku??void 0}}function Ut(e){const{lineAllocation:t,image:n}=e;return{id:(i=t.stableId,`gid://shopify/PresentmentCartLine/${i}`),title:e.title,subtitle:e.subtitle,lines:[Ot(e)],quantity:t.quantity,cost:{totalAmount:t.checkoutPriceAfterDiscounts},image:n?{url:n.four,altText:n.altText}:void 0};var i}function Vt(e){return`gid://shopify/CartLineComponent/${e}`}const Ft="merchandiseError:",$t=function(e){let t,n=!1;function i(){return t??=$(e).catch(e=>{throw t=void 0,e}),t}return{load:i,preload(){n||(n=!0,F(()=>{i().catch(()=>{})}))}}}(()=>xe(()=>import("./9f28056f.94dWgNmm.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50])));function Gt({negotiated:e,proposed:t,createSubscribableFromSignal:n,extension:i,stableDetourSignal:a,cartInstructionsSignal:s,cartLineChangeLoadingSignal:o,observability:r,applyChange:c,extensionInstance:l,isCheckoutEditor:u,shop:p,refusedMerchandise:m}){const f=p.hasFlagEnabled(A)?m:void 0;async function y(n,i){o.value=!0;const{mutations:c}=await $t.load();return c.applyCartLineChange({change:n,negotiated:e,proposed:t,stableDetourSignal:a,cartInstructionsSignal:s,negotiate:i,isCheckoutEditor:u,observability:r,refusedMerchandise:f})}return $t.preload(),{lines:n((h=()=>{const t=e.fields.merchandiseLines.value,n=e.fields.remoteMerchandiseDetails?.value;return t?t.lines.filter(e=>!k(e.stableId,n)).flatMap(e=>null==e.productId?[]:e.variantId?W(e).map(Ot):(r.error(new I("Cannot create cart line API without a variantId. Custom merchandise lines are not yet supported.")),[])):[]},Be(h,d))),applyCartLinesChange:async e=>c({unknownChange:e,extension:i,extensionInstanceId:l.id,handlers:{addCartLine:async({negotiate:e,change:t})=>y(t,e),removeCartLine:async({negotiate:e,change:t})=>y(t,e),updateCartLine:async({negotiate:e,change:t})=>y(t,e)},errorResult:e=>e.message.startsWith(Ft)?{type:"error",message:e.message}:{type:"error",message:`Could not apply line item changes. Error: ${e.message}`}}).finally(()=>{o.value=!1})};var h}function Bt({proposed:e,negotiated:t,createSubscribableFromSignal:n,extension:i,cartInstructionsSignal:a,applyChange:s,extensionInstance:o}){return{note:n(e.note),applyNoteChange:async n=>s({unknownChange:n,extension:i,extensionInstanceId:o.id,handlers:{async updateNote({negotiate:n,change:i,markChangeAsNoOp:a}){if(c(),"string"!=typeof i.note)throw new r('Invalid NoteChange: note must be of type "string"');if(i.note&&i.note.length>5e3)throw new r("Invalid NoteChange: note must be less than or equal to 5000 characters");return function(e,t,n){const i=e||void 0;return t===i&&(n||void 0)===i}(i.note,e.note.peek(),t.fields.note.peek())?(a(),{type:"success"}):(e.note.value=i.note||void 0,await Ye(()=>n({silenceViolations:["all"]})),{type:"success"})},async removeNote({negotiate:n,markChangeAsNoOp:i}){return c(),a=e.note.peek(),s=t.fields.note.peek(),void 0===a&&void 0===(s||void 0)?(i(),{type:"success"}):(e.note.value=void 0,await Ye(()=>n({silenceViolations:["all"]})),{type:"success"});var a,s}},errorResult:e=>({type:"error",message:e.message})})};function c(){if(!a.peek().notes.canUpdateNote)throw new r(Le("applyNoteChange","notes"))}}function jt(t){const{extension:n}=t,{applyAttributeChange:i}=Je(t),{applyCartLinesChange:s}=Gt(t),{applyNoteChange:o}=Bt(t),{applyMetafieldChange:r}=nt(t),{applyDiscountCodeChange:c}=Tt(t),{applyGiftCardChange:l}=Rt(t),{applyShippingAddressChange:d}=function(t){const{extension:n,extensionInstance:i,applyChange:a}=t;return $t.preload(),G(n.approvalScopes,e.CustomerPersonalData)?{applyShippingAddressChange:async function(e){return a({unknownChange:e,extension:n,extensionInstanceId:i.id,handlers:{async updateShippingAddress(e){const{mutations:n}=await $t.load();return n.applyShippingAddressChange(e,t)}},errorResult:e=>({type:"error",errors:e instanceof ue?e.cause?.errors??[{message:e.message}]:[{message:e.message}]})})}}:{applyShippingAddressChange:void 0}}(t),{experimentalIsShopAppStyle:u}=function({extension:e,checkout:t}){return{experimentalIsShopAppStyle:Ce({allowLocal:!0,extension:e})?"shopPay"===t.identity.current.value:void 0}}(t);switch(n.apiVersion){case"2023-04":return{applyAttributeChange:i,applyCartLinesChange:s,applyNoteChange:o,applyMetafieldChange:r,applyDiscountCodeChange:c,applyGiftCardChange:l};case"2023-07":case"2023-10":case"2024-01":case"2024-04":case"2024-07":case"2024-10":case"2025-01":case"2025-04":case"2025-07":case"unstable":case"2025-10":case"2026-01":case"2026-04":case"2026-07":case"2026-10":case"2027-01":return{applyAttributeChange:i,applyCartLinesChange:s,applyNoteChange:o,applyMetafieldChange:r,applyDiscountCodeChange:c,applyGiftCardChange:l,applyShippingAddressChange:d,experimentalIsShopAppStyle:u};default:a(n.apiVersion)}}function qt(e){const{createSubscribableFromSignal:t}=e,{apiVersion:i}=e.extension;return n(i).equalTo("unstable")?{order:t(L(void 0))}:n(i).laterThan("2025-07")?{}:{order:t(L(void 0))}}function Ht({negotiated:t,createSubscribableFromSignal:n,proposed:i,extension:a}){return G(a.approvalScopes,e.CustomerPersonalData)?{buyerIdentity:{customer:n(N(()=>{const n=t.fields.buyerIdentity.value?.customerProfile;if("CustomerProfile"===n?.__typename||"BusinessCustomerProfile"===n?.__typename){const t=G(a.approvalScopes,e.CustomerEmail),i=G(a.approvalScopes,e.CustomerPhone),s=G(a.approvalScopes,e.CustomerName),o="CustomerProfile"===n?.__typename?n.storeCreditAccounts.map(e=>({...e,balance:e.balance})):[];return{id:n.id,email:t?n.email??void 0:void 0,phone:i?n.phone??void 0:void 0,fullName:s?n.fullName??void 0:void 0,firstName:s?n.firstName??void 0:void 0,lastName:s?n.lastName??void 0:void 0,image:{url:n.imageUrl},acceptsMarketing:n.acceptsEmailMarketing,acceptsEmailMarketing:n.acceptsEmailMarketing,acceptsSmsMarketing:n.acceptsSmsMarketing,storeCreditAccounts:o,ordersCount:n.ordersCount??0}}})),email:n(N(()=>
2{if(!G(a.approvalScopes,e.CustomerEmail))return;const n=i.email.value,s=t.fields.buyerIdentity.value?.customerProfile?.email,o=t.fields.contactInfo.value?.email;return n||s||o})),phone:n(N(()=>{if(!G(a.approvalScopes,e.CustomerPhone))return;const n=i.phone.value,s=t.fields.buyerIdentity.value?.customerProfile?.phone,o=t.fields.contactInfo.value?.phone;return n||s||o})),purchasingCompany:n(N(()=>{const e=t.fields.buyerIdentity.value?.purchasingCompany;if(e)return{company:{id:e.company.id,name:e.company.name,externalId:e.company?.externalId},location:{id:e.location.id,name:e.location.name,externalId:e.location?.externalId}}}))}}:{buyerIdentity:void 0}}const Yt={behavior:"allow"};function Jt({extension:e,extensionInstance:t,proposal:n,captureEvent:i,journeyCompletedSignal:a,sourceType:s,createSubscribableFromSignal:o,journeyStateSignal:c,pageBeforeDetourSignal:l,negotiated:d,cartPageSignal:u,checkout:p,interceptorRegistrationResolversSignal:m,observability:f,negotiationRateLimiter:y}){let h=0;const g=m.peek(),v=g.get(e.id);return{intercept(a){const o=String(h++);U(a);let c=!1;const l=[],d={interceptorKey:o,extension:e,captureEvent:i,sourceType:s,observability:f,activeRaces:l,extensionInstance:t,suppressMalformedInterceptionErrors:"persisted"===e.type||"global"===e.type},u=function(e,t){return async({requiresRenderToBlock:n})=>{const{interceptorKey:i,extension:a,captureEvent:s,sourceType:o,observability:c,activeRaces:l,extensionInstance:d,suppressMalformedInterceptionErrors:u}=t;if(n&&!d.rendered)return d.markNotBlocking(i),{isBlocking:!1,interceptorRunResponse:Yt};const p=a.capabilities.blockProgress&&a.behaviors.value.blockProgress,m=zt((async()=>{try{return await e({canBlockProgress:p})}catch(t){return c.error(new pe(`Error in buyer journey interceptor callback: ${t}`,{cause:t}),{metadata:{extension:Q(a),source:{type:o}}}),{behavior:"allow",perform:()=>{}}}})(),{captureEvent:s,extension:a,onTimeout:()=>(c.error(new r("buyer journey interceptor callback timed out"),{metadata:{extension:Q(a),source:{type:o}}}),Yt)},d.id);let f;l.push(m);try{f=await m.finished,function(e,t){const n=[];if(Object.entries(t||{}).length||n.push("interceptor result cannot be empty or undefined"),t?.behavior&&["block","allow"].includes(t.behavior)||n.push(`behavior must be either "block" or "allow", received "${t?.behavior}"`),t?.hasOwnProperty("perform")&&"function"!=typeof t?.perform&&n.push("perform must be a function: received type "+typeof t?.perform),"block"===t?.behavior&&"string"!=typeof t.reason&&n.push("reason must be a string: received type "+typeof t?.reason),n.length)throw new me(n.join("; "));"local"!==e.type||e.capabilities.blockProgress||"block"!==t?.behavior||console.warn('CannotBlockProgressWarning: extension is not allowed to block checkout progress; permission to block checkout progress must be specified under [capabilities] with flag "block_progress = true; see:\n\nhttps://shopify.dev/docs/api/checkout-ui-extensions/configuration#block-progress')}(a,f)}catch(y){if(u){const e=y;return console.warn(`${e.name}: ${e.message}`),d.markNotBlocking(i),null}throw y instanceof TypeError&&c.leaveErrorBreadcrumb("BuyerJourneryIntercept: Cannot block progress",{extension:a,interceptorRequest:f}),y}return p&&"block"===f.behavior?(d.markBlocking(i),{isBlocking:!0,interceptorRunResponse:f}):(d.markNotBlocking(i),{isBlocking:!1,interceptorRunResponse:f})}}(a,d),m=async n=>{switch(n){case"registration":return await u({requiresRenderToBlock:!1}),Yt;case"negotiation":{const e=await u({requiresRenderToBlock:!0});if(!e)return Yt;const{perform:t}=e.interceptorRunResponse;return e.isBlocking?{behavior:"allow",errors:e.interceptorRunResponse.errors,perform:t&&Wt(()=>t({behavior:"allow"}),d)}:{behavior:"allow",perform:t&&Wt(()=>t({behavior:"allow"}),d)}}case"progression":case"completion":{const n=await u({requiresRenderToBlock:!0});if(!n)return Yt;const{perform:a}=n.interceptorRunResponse;if(n.isBlocking){if(y.isThrottled(e.id)){if(!c){c=!0;const t=Ge(e),{isRemoteDom:n,isHighValueExtension:i}=t;f.log("extension_throttled_buyer_journey_block_attempt","[Extensions::BuyerJourneyIntercept] Throttled extension attempted to block checkout progress",{...t,enforced:!0}),f.counter({name:"extension_throttled_buyer_journey_block_attempt",value:1,attributes:{isRemoteDom:n,isHighValueExtension:i,enforced:!0}})}return t.markNotBlocking(o),{behavior:"allow",errors:n.interceptorRunResponse.errors,perform:a&&Wt(()=>a({behavior:"block"}),d)}}return i("extensionBuyerJourneyBlock",{behavior:"block",reason:n.interceptorRunResponse.reason,extension:e,section:"extension",timestamp:new Date,validationErrors:n.interceptorRunResponse.errors??[]}),f.debug("extensions_buyer_journey_intercepted","[Extensions::BuyerJourneyIntercept] Blocked checkout progress",{...Ge(e),errors:n.interceptorRunResponse.errors,reason:n.interceptorRunResponse.reason}),{behavior:"block",reason:w.InvalidExtensionState,errors:n.interceptorRunResponse.errors,perform:a&&Wt(()=>a({behavior:"block"}),d),context:{extension:Q(e)}}}return{behavior:"allow",perform:a&&Wt(()=>a({behavior:"allow"}),d)}}default:return n}},b=n.intercept(({reason:e})=>m(e));!function({interceptorRegistrationResolvers:e,interceptorRegistration:t,extension:n,sourceType:i,observability:a}){if(t)return s=e,o=n.id,void((r=t)&&s.get(o)===r&&r.resolve());var s,o,r;a.error(new pe("Error registering interceptor resolver. No corresponding extension found in interceptorRegistrationResolversSignal."),{metadata:{extension:Q(n),source:{type:i}}})}({interceptorRegistrationResolvers:g,interceptorRegistration:v,extension:e,sourceType:s,observability:f}),m("registration").then(async()=>
2{if(!p.isCheckoutLayoutForcedToOnePage.value||!p.wallets.isAcceleratedWalletEscalation.value||!t.rendered)return;const e=await u({requiresRenderToBlock:!0});if(!e?.isBlocking)return;const{perform:n}=e.interceptorRunResponse;n&&await Wt(()=>n({behavior:"block"}),d)()}).catch(t=>{f.error(t,{metadata:{extension:Q(e),source:{type:s}}})});const C=t.on("restart",()=>{A()}),I=t.on("destroy",()=>{A()}),A=()=>{t.markNotBlocking(o);for(const e of l)e.abort();b(),C(),I(),V(a)};return A},completed:o(a),steps:o(N(()=>{if(a.value)return[{handle:"thank-you",to:"shopify:checkout/thank-you",label:"thank-you",disabled:!1}];const{plan:{greenPath:e}}=c.value,t=l.value,n=d.value,i=u.value,s=e.filter(({skipOverPage:e})=>!e||!e(n)),o=s.findIndex(e=>e.id===t?.id),r=s.map((e,t)=>Qt({page:e,disabled:o>=0&&t>o}));return i&&r.unshift(Qt({page:i,disabled:!1})),r})),activeStep:o(N(()=>{if(a.value)return{handle:"thank-you"};const{plan:{greenPath:e}}=c.value,t=l.value;if(!t||!e.some(({id:e})=>e===t.id))return;const n=d.value;return t.skipOverPage?.(n)?void 0:{handle:Kt(t).handle}}))}}function zt(e,t,n){const i={finished:Promise.resolve(),abort:()=>{}},{captureEvent:a,extension:s}=t,o=t.duration??3e4,r=performance.now();let c,l;return i.abort=()=>{clearTimeout(l),c(void 0)},i.finished=Promise.race([new Promise(e=>{c=e,l=setTimeout(()=>{c(t.onTimeout())},o)}),e.finally(()=>{a("extensionInteraction",{interaction:"buyerJourneyInterceptor",extension:s,section:"extension",timestamp:new Date,duration:performance.now()-r,extensionInstanceId:n}),clearTimeout(l)})]),i}function Wt(e,t){const{observability:n,captureEvent:i,extension:a,sourceType:s,activeRaces:o,extensionInstance:c}=t,l=(async()=>{try{return await e()}catch(t){n.error(new r(`${t} (in buyer journey interceptor)`,{cause:t}),{metadata:{extension:Q(a),source:{type:s}}})}})();return async()=>{const e=zt(l,{captureEvent:i,extension:a,onTimeout:()=>{n.error(new r("perform() in buyer journey interceptor timed out"),{metadata:{extension:Q(a),source:{type:s}}})}},c.id);o.push(e),await e.finished}}function Qt({page:e,disabled:t}){const{handle:n,route:i}=Kt(e),{label:a}=e;return{handle:n,to:i,label:a,disabled:t}}function Kt({id:e,route:t}){switch(e){case"information":case"shipping":case"payment":case"review":return{handle:e,route:`shopify:checkout${t}`};case"onePage":case"shopPay":return{handle:"checkout",route:`shopify:checkout${t}`};case"cart":return{handle:"cart",route:"shopify:cart"};default:return{handle:"unknown",route:"#"}}}function Xt({cartInstructionsSignal:e,createSubscribableFromSignal:t}){return{instructions:t(e)}}function Zt({negotiated:e,createSubscribableFromSignal:t}){return{checkoutSettings:t(N(()=>{const t=e.fields.buyerIdentity.value?.customerProfile,n=e.fields.paymentFlexibilityPaymentTermsTemplate.value,i=n?{id:n.id,name:n.translatedName,dueDate:n.dueDate||void 0,dueInDays:n.dueInDays||void 0}:void 0;return{orderSubmission:e.fields.checkoutCompletionTarget.value||"ORDER",shippingAddress:{isEditable:"BusinessCustomerProfile"!==t?.__typename||!t.checkoutExperienceConfiguration||t.checkoutExperienceConfiguration.editableShippingAddress},paymentTermsTemplate:i}}))}}function en(e,t){return e&&0!==e.length&&t?e.filter(e=>{const{targetMerchandiseLines:n}=e;return!n||0===n.length||!n.some(e=>k(e.stableId,t))}):e}function tn({negotiated:e,isOnePageCheckout:t,createSubscribableFromSignal:n}){return{cost:{subtotalAmount:n(e.fields.subtotal),totalShippingAmount:n(N(()=>{const n=e.fields.deliveryNext.value,i=e.fields.remoteMerchandiseDetails.value;if("filled"!==n?.status)return;const a=en(n.lines,i),s=(o=!t,a.reduce((e,t)=>{if("not_required"===t.status)return e;const{methods:n,selectedDeliveryMethodHandle:i}=t,a=n.find(({handle:e})=>i===e);if(!a)return e;const s=a?.priceBreakdown?.length&&a.priceBreakdown.every(e=>e.excludeFromDeliveryOptionPrice),r=a?.priceBreakdown?.every(e=>!Boolean(e.targetMerchandiseLines[0]?.sellingPlan?.prepaid));return s&&r&&o||e.push({costAfterDiscounts:a.costAfterDiscounts}),e},[]));var o;return 0!==s.length?{amount:s.reduce((e,{costAfterDiscounts:t})=>e+t.amount,0),currencyCode:s[0]?.costAfterDiscounts.currencyCode}:void 0})),totalTaxAmount:n(N(()=>{const t=e.fields.taxes.value;return"available_total"===t?.status?t.totalTax:"available_total_included"===t?.status?t.totalIncludedInTarget:void("unavailable"===t?.status&&console.error(`Taxes are unavailable: ${t.reason}`))}
2)),totalAmount:n(e.fields.runningTotal)}}}function nn(e,t){const n=t?.filterMetafieldsByExtensionId(e.metafields);return{handle:e.handle,title:e.title||void 0,description:e.description||void 0,type:(i=e.methodType,"LOCAL"===i?"local":"shipping"),carrier:{name:e.carrierName||void 0},cost:{amount:e.cost.amount,currencyCode:e.cost.currencyCode},costAfterDiscounts:{amount:e.costAfterDiscounts.amount,currencyCode:e.costAfterDiscounts.currencyCode},deliveryEstimate:an(e),code:e.code||"",metafields:n||[]};var i}function an(e){return{timeInTransit:sn(e.estimatedTimeInTransit)}}function sn(e){if(e)return"number"==typeof e?{lower:e,upper:e}:{lower:e.lower,upper:e.upper}}function on(e,t){return t?t.filter(t=>e.some(e=>e.stableId===t.stableId)).flatMap(({lineAllocations:e})=>e.map(e=>({id:`gid://shopify/CartLine/${e.stableId}`}))):[]}function rn(e,t,n){if(0===t.length)return;const i=e.methods.map(e=>e.handle),a=n.find(e=>e&&i.includes(e))||e.selectedDeliveryMethodHandle;return a?{handle:a}:void 0}function cn({pickupLocation:e}){if("PickupPointLocation"===e?.type)return e.carrierName}function ln({pickupLocation:e}){if("PickupPointLocation"===e?.type)return e.carrierCode}function dn(e){const t=e?.coordinates;return null==t?.latitude||null==t.longitude?{}:{latitude:t.latitude,longitude:t.longitude}}function un(e){if(e)return x("DeliveryGroup",p(e))}class pn extends Error{constructor(e){super(e),this.name="DeliveryError"}}class mn{constructor(e,t){this.measureAsync=({functionToMeasure:e})=>Promise.resolve(e()),this.measureSync=({functionToMeasure:e})=>e(),this.observability=t,this.extension=e}static wrapClient(e,t){return t instanceof mn?t:new mn(e,t)}counter(...e){this.observability.counter(...e)}gauge(...e){this.observability.gauge(...e)}histogram(...e){this.observability.histogram(...e)}debug(...e){this.observability.debug(...e)}log(...e){this.observability.log(...e)}addErrorMetadata(...e){this.observability.addErrorMetadata(...e)}leaveErrorBreadcrumb(...e){this.observability.leaveErrorBreadcrumb(...e)}addOnError(...e){this.observability.addOnError(...e)}removeOnError(...e){this.observability.removeOnError(...e)}async exportMetrics(){await this.observability.exportMetrics()}async exportLogs(){await this.observability.exportLogs()}addAttributesForLogs(...e){this.observability.addAttributesForLogs(...e)}enableKeepAlive(){return this.observability.enableKeepAlive()}error(e,t){const n={...t};n.metadata||(n.metadata={}),n.metadata.extension||(n.metadata.extension=Q(this.extension)),this.observability.error(e,n)}leaveBreadcrumb(e,t,n){this.observability.leaveErrorBreadcrumb(e,t,n)}}class fn{constructor(e){this.extension=e}filterMetafieldsByExtensionId(e){return e.filter(e=>{const t=e.namespace.split("--");return"app"===t[0]&&t[1]===p(this.extension.appId)||"app"!==t[0]})}}function yn({line:e,extension:t,observability:n,proposedSelectedDeliveryMethodHandles:i,lines:a}){return function({line:e,extensionContext:t,observability:n,proposedSelectedDeliveryMethodHandles:i,lines:a}){if("available"===e.status){const s=function(e,t,n){return e.map(e=>{switch(e.methodType){case"SHIPPING":case"LOCAL":return nn(e,n);case"PICK_UP":return function(e,t,n){const i=function({pickupLocation:e,methodType:t},n){if("PickupInStoreLocation"===e?.type){const{address:t}=e;return{name:e?.name,address:{name:t.name,firstName:t.firstName,lastName:t.lastName,company:t.company,address1:t.address1,address2:t.address2,city:t.city,zip:t.postalCode,countryCode:t.countryCode,provinceCode:t.zoneCode,phone:t.phone,...dn(t)}}}const i=`Invalid pickupLocation type ${e?.type} for ${t} delivery method`;n?.error(new pn(i))}(e,t);if(null==i)return;const a=n?.filterMetafieldsByExtensionId(e.metafields);return{handle:e.handle,title:e.title||void 0,description:e.description||void 0,code:e.code||"",type:"pickup",location:i,metafields:a||[]}}(e,t,n);case"PICKUP_POINT":return function(e,t,n){const i=function({pickupLocation:e,methodType:t},n){if("PickupPointLocation"===e?.type){const{name:t,address:n,handle:i}=e;return{name:t,handle:i,address:{name:n.name,firstName:n.firstName,lastName:n.lastName,company:n.company,address1:n.address1,address2:n.address2,city:n.city,zip:n.postalCode,countryCode:n.countryCode,provinceCode:n.zoneCode,phone:n.phone,...dn(n)}}}const i=`Invalid pickupLocation type ${e?.type} for ${t} delivery method`;n?.error(new pn(i))}(e,t);if(null==i)return;const a=n?.filterMetafieldsByExtensionId(e.metafields);return{handle:e.handle,title:e.title||void 0,description:e.description||void 0,code:e.code||"",type:"pickupPoint",cost:{amount:e.cost.amount,currencyCode:e.cost.currencyCode},costAfterDiscounts:{amount:e.costAfterDiscounts.amount,currencyCode:e.costAfterDiscounts.currencyCode},carrier:{name:cn(e),code:ln(e)},location:i,metafields:a||[]}}
2(e,t,n);case"RETAIL":case"NONE":return;default:{const n=`Unknown delivery method type: ${e.methodType}`;return void t?.error(new pn(n),{metadata:{deliveryMethod:{type:e.methodType,handle:e.handle}}})}}}).filter(e=>null!=e)}(e.methods,n,t);return{targetedCartLines:on(e.targetMerchandiseLines??[],a),deliveryOptions:s,selectedDeliveryOption:rn(e,s,i),groupType:Te(e.type),isDeliveryRequired:!0,id:un(e.id)}}return{targetedCartLines:on(e.targetMerchandiseLines,a),deliveryOptions:[],selectedDeliveryOption:void 0,groupType:Te(e.type),isDeliveryRequired:!1,id:un(e.id)}}({line:e,extensionContext:t?new fn(t):void 0,observability:mn.wrapClient(t,n),proposedSelectedDeliveryMethodHandles:i,lines:a})}function hn({extension:e,negotiated:t,proposed:n,observability:i,createSubscribableFromSignal:a}){return{deliveryGroups:a(N(()=>{const a=t.fields.deliveryNext.value;if(!a)return[];const s=a.status;if("unavailable"===s)return[];const o=n.deliveryLines.value.map(e=>e.fields.deliveryMethodHandle.value),r=t.fields.remoteMerchandiseDetails.value;if("filled"===s||"partial"===s)return en(a.lines,r).map(n=>yn({line:n,extension:e,observability:i,proposedSelectedDeliveryMethodHandles:o,lines:t.fields.merchandiseLines.value?.lines}));const c=`Unknown delivery status: ${s}`;return i.error(new fe(c),{metadata:{extension:Q(e)}}),[]}))}}function gn({createSubscribableFromSignal:t,proposed:n,extension:i,negotiated:a}){return G(i.approvalScopes,e.CustomerPersonalData)?{localizedFields:t(N(()=>{const e=n.localizationExtensions.value;return e?e.map(({fields:e})=>({key:e.key.value,title:e.title.value,value:e.value.value??""})):(a.value.localizationExtensions||[]).map(({key:e,title:t,value:n})=>({key:e,title:t,value:n??""}))}))}:{localizedFields:void 0}}function vn({negotiated:e,proposed:t,createSubscribableFromSignal:n}){return{availablePaymentOptions:n(N(()=>{const n=e.fields.paymentMethods.value,i=t.paymentLines.value,a=e.fields.paymentLines.value,s=e.fields.deferredTotal.value,o="giftCard";if(!n)return[];let r=!1;const c=n?.filter(e=>e.type!==o||(r=!0,!1)).map(e=>({method:e}));if(!c&&!r)return[];const l=S(c),d=T(l,i,n,{negotiatedPaymentLines:a?.lines,deferredTotal:s}),u=d.some(e=>e.method.type===o);return d.map(e=>{const t="name"in e.method?e.method.name:void 0,n="paymentMethodIdentifier"in e.method&&e.method.paymentMethodIdentifier||void 0;return{handle:X(e.method.type,t,n),type:K(e.method.type)}}).concat(r&&!u?[{handle:X(o),type:K(o)}]:[])})),selectedPaymentOptions:n(N(()=>{const n=t.paymentLines.value,i=e.fields.paymentMethods.value,a=e.fields.paymentLines.value,s=e.fields.deferredTotal.value;if(!i)return[];const o=S(n);return T(o,n,i,{negotiatedPaymentLines:a?.lines,deferredTotal:s}).map(e=>{const t="name"in e.method?e.method.name:void 0,n="paymentMethodIdentifier"in e.method&&e.method.paymentMethodIdentifier||void 0;return{handle:X(e.method.type,t,n),type:K(e.method.type)}})}))}}function bn({extension:e,ui:t}){return{ui:{overlay:{close(n){Ie(e,n)&&t.overlay.close(n)}}}}}function Cn(e){const{shop:t,extension:n,extensionInstance:i}=e;switch(n.apiVersion){case"2023-04":{const a=ht(e),{attributes:s}=Je(e),{lines:o}=Gt(e),{presentmentLines:r}=function({negotiated:e,createSubscribableFromSignal:t,observability:n}){return{presentmentLines:t(N(()=>{const t=e.fields.merchandiseLines.value;return t?t.lines.flatMap(e=>e.variantId?W(e).map(e=>Ut(e)):(n.error(new I("Cannot create cart line API without a variantId. Custom merchandise lines are not yet supported.")),[])):[]}))}}(e),{note:c}=Bt(e),{metafields:l}=nt(e),{discountAllocations:d,discountCodes:u}=Tt(e),{appliedGiftCards:p}=Rt(e),{shippingAddress:m}=He(e);return{version:n.apiVersion,extensionPoint:i.target,extension:{...a,apiVersion:a.apiVersion,target:a.target,capabilities:a.capabilities},settings:bt(e),shop:It(t),appliedGiftCards:p,attributes:s,discountAllocations:d,discountCodes:u,lines:o,metafields:l,note:c,presentmentLines:r,shippingAddress:m,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:At(e),...ot(e),...Ae(e),...vt(e),...bn(e)}}case"2023-07":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target,capabilities:i.capabilities},settings:bt(e),shop:It(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:At(e),...ot(e),...Ae(e),...vt(e),...bn(e)}}case"2023-10":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u,billingAddress:p}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target,capabilities:i.capabilities},settings:bt(e),shop:It(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...bn(e),...ft(e)}}case"2024-01":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u,billingAddress:p}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target,capabilities:i.capabilities},settings:bt(e),shop:It(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...bn(e),...ft(e)}}case"2024-04":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u,billingAddress:p}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target,capabilities:i.capabilities},settings:bt(e),shop:Ct(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...bn(e),...ft(e),...Me(e)}}case"2024-07":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u,billingAddress:p}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target,capabilities:i.capabilities},settings:bt(e),shop:Ct(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...bn(e),...ft(e),...Me(e),...Xt(e)}}case"2024-10":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u,billingAddress:p}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target},settings:bt(e),shop:Ct(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...bn(e),...ft(e),...Me(e),...Xt(e)}}case"2025-01":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u,billingAddress:p}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target},settings:bt(e),shop:Ct(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...bn(e),...ft(e),...Me(e),...Xt(e),...gn(e)}}case"2025-04":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u,billingAddress:p}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target},settings:bt(e),shop:Ct(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...bn(e),...ft(e),...Me(e),...Xt(e),...gn(e)}}case"2025-07":case"unstable":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u,billingAddress:p}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target},settings:bt(e),shop:Ct(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...bn(e),...ft(e),...Me(e),...Xt(e),...gn(e)}}case"2025-10":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u,billingAddress:p}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target},settings:bt(e),shop:Ct(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...bn(e),...ft(e),...Me(e),...Xt(e),...gn(e)}}case"2026-01":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{metafields:r}=nt(e),{discountAllocations:c,discountCodes:l}=Tt(e),{appliedGiftCards:d}=Rt(e),{shippingAddress:u,billingAddress:p}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target},settings:bt(e),shop:Ct(t),appliedGiftCards:d,attributes:a,discountAllocations:c,discountCodes:l,lines:s,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...bn(e),...ft(e),...Me(e),...Xt(e),...gn(e)}}case"2026-04":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{discountAllocations:r,discountCodes:c}=Tt(e),{appliedGiftCards:l}=Rt(e),{shippingAddress:d,billingAddress:u}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target},settings:bt(e),shop:Ct(t),appliedGiftCards:l,attributes:a,discountAllocations:r,discountCodes:c,lines:s,note:o,shippingAddress:d,billingAddress:u,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...ft(e),...Me(e),...Xt(e),...gn(e)}}case"2026-07":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{discountAllocations:r,discountCodes:c}=Tt(e),{appliedGiftCards:l}=Rt(e),{shippingAddress:d,billingAddress:u}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target},settings:bt(e),shop:Ct(t),appliedGiftCards:l,attributes:a,discountAllocations:r,discountCodes:c,lines:s,note:o,shippingAddress:d,billingAddress:u,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...ft(e),...Me(e),...Xt(e),...gn(e)}}case"2026-10":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{discountAllocations:r,discountCodes:c}=Tt(e),{appliedGiftCards:l}=Rt(e),{shippingAddress:d,billingAddress:u}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target},settings:bt(e),shop:Ct(t),appliedGiftCards:l,attributes:a,discountAllocations:r,discountCodes:c,lines:s,note:o,shippingAddress:d,billingAddress:u,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...ft(e),...Me(e),...Xt(e),...gn(e)}}case"2027-01":{const i=ht(e),{attributes:a}=Je(e),{lines:s}=Gt(e),{note:o}=Bt(e),{discountAllocations:r,discountCodes:c}=Tt(e),{appliedGiftCards:l}=Rt(e),{shippingAddress:d,billingAddress:u}=He(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...i,apiVersion:i.apiVersion,target:i.target},settings:bt(e),shop:Ct(t),appliedGiftCards:l,attributes:a,discountAllocations:r,discountCodes:c,lines:s,note:o,shippingAddress:d,billingAddress:u,buyerJourney:Jt(e),...Zt(e),...gt(e),...Ht(e),...tn(e),...vn(e),...hn(e),...lt(e),storage:kt(e),...ot(e),...Ae(e),...vt(e),...ft(e),...Me(e),...Xt(e),...gn(e)}}default:a(n.apiVersion)}}function In(e,{stableId:t}){const{extension:n}=e;switch(n.apiVersion){case"2023-04":return{...kn(e,t)};case"2023-07":case"2023-10":case"2024-01":case"2024-04":case"2024-07":case"2024-10":case"2025-01":case"2025-04":case"2025-07":case"unstable":case"2025-10":case"2026-01":case"2026-04":case"2026-07":case"2026-10":case"2027-01":return{...An(e,t)};default:a(n.apiVersion)}}function An({createSubscribableFromSignal:e,negotiated:t},n){let i;return{target:e(N(()=>{const e=t.fields.merchandiseLines.value,a=Z({stableId:n,merchandiseLines:e?.lines??[]});if(null===a&&!i)throw new ye("No merchandise item found");return null!==a&&(i=Ot(a)),i}))}}function kn({createSubscribableFromSignal:e,negotiated:t},n){let i;return{target:e(N(()=>{const e=t.fields.merchandiseLines.value,a=ee(n,e?.lines??[]);if(null===a&&!i)throw new ye("No merchandise item found");if(null!==a){const{parent:e,index:t}=a;i=Ut(te(e,t))}return i}))}}function wn({applyChange:t,extension:n,proposed:i,createSubscribableFromSignal:a,extensionInstance:s,bankIdNumberSignal:o},{paymentMethodIdentifier:c}){const l=G(n.approvalScopes,e.CheckoutExtensionPayments);return{applyPaymentMethodAttributesChange:async function(e){return t({unknownChange:e,extension:n,extensionInstanceId:s.id,handlers:{async updatePaymentMethodAttributes({change:e}){if(!l)throw new r(xn);
2e.attributes.forEach(e=>{if("string"==typeof e.value&&e.value.length>64)throw new r(`Value length exceeded threshold 64 for key ${e.key}`)});const t=i.paymentLines.peek();return i.paymentLines.value=t.map(t=>"customOnsite"!==t.method.type&&"direct"!==t.method.type||t.method.paymentMethodIdentifier!==c?t:{...t,method:{...t.method,paymentAttributes:JSON.stringify(e.attributes)}}),{type:"success"}}},errorResult:e=>({type:"error",message:e.message})})},paymentMethodAttributes:l?a(N(()=>{const e=i.paymentLines.value.find(({method:e})=>{if("direct"===e.type||"customOnsite"===e.type)return e.paymentMethodIdentifier===c&&e.paymentAttributes});if(e){const{paymentAttributes:t}=e.method;if(t)return JSON.parse(t)}})):void 0,bankIdNumber:l?a(o):void 0}}const xn="Access denied: the extension does not have the required approval scopes";function Sn({createSubscribableFromSignal:e,extension:t,negotiated:n,proposal:i},a){let s;const o=a?.handle;return{target:e(N(()=>{const e=n.fields.deliveryNext.value;if(!e)return s;if("filled"!==e.status)return s;const i=e.lines.filter(e=>"available"===e.status).flatMap(e=>e.methods).find(e=>e.handle===o);if(i){const e=function(e,t){return function(e,t){const n=t?.filterMetafieldsByExtensionId(e.metafields);return{handle:e.handle,title:e.title||void 0,description:e.description||void 0,code:e.code||"",type:"pickup",location:{address:{address1:e.pickupLocation?.address.address1,address2:e.pickupLocation?.address.address2,city:e.pickupLocation?.address.city,countryCode:e.pickupLocation?.address.countryCode,phone:e.pickupLocation?.address.phone,zip:e.pickupLocation?.address.postalCode,provinceCode:e.pickupLocation?.address.zoneCode,...dn(e.pickupLocation?.address)}},metafields:n||[]}}(e,new fn(t))}(i,t);s=d(s,e)?s:e}return s})),isTargetSelected:e(N(()=>i.parts.deliveryLines.value.some(({fields:{deliveryMethodHandle:e}})=>o===e.value)))}}function Tn({createSubscribableFromSignal:e},{isLocationFormVisible:t}){return{isLocationFormVisible:e(L(t))}}function Dn({createSubscribableFromSignal:e},{isLocationFormVisible:t}){return{isLocationFormVisible:e(L(t))}}function Pn({extension:t,negotiated:n,applyChange:i,extensionInstance:a},{paymentMethodIdentifier:s,submitRedeemablePaymentLine:o}){return{applyRedeemableChange:async c=>i({unknownChange:c,extension:t,extensionInstanceId:a.id,handlers:{async redeemableAddChange({negotiate:i,change:a}){if("local"!==t.type&&!G(t.approvalScopes,e.CheckoutExtensionRedeemables))throw new r("Access denied: the extension does not have the required approval scopes");const c=n.fields.availableRedeemables.peek()?.map(e=>({paymentMethod:De(e.paymentMethod)}))??[],l={paymentMethod:{type:"redeemable",redemptionSource:"CUSTOM",redemptionContent:{paymentMethodIdentifier:s,maskedIdentifier:(d=a.identifier,d.slice(0,-4).replace(/./g,"â¢")+d.slice(-4)),redemptionAttributes:a.attributes}}};var d;const u=Pe(l),p=await i({customizeNegotiation:e=>({...e,availableRedeemables:{availableRedeemables:c.concat(u)}}),fieldsToResolve:["availableRedeemables"]}),m="error"===p.status&&p.violations.some(ne),f=p.violations.find(ne);if(m)throw new r("Could not apply redeemable",{cause:{code:f?.code}});if(o){const e=p.negotiated.availableRedeemables?.find(e=>ie(l.paymentMethod,e.paymentMethod)),t=p.negotiated.paymentDue;if(!e||!t)throw new r("Could not apply redeemable",{cause:{code:f?.code}});const n=await o(e,t),i=n&&("error"===n.status&&n.violations.some(D)||"error"!==n.status&&"success"!==n.status);if(!n||i)throw new r("Could not submit redeemable as a payment line")}return{type:"success"}}},errorResult:e=>({type:"error",message:e.message})})}}function Nn({createSubscribableFromSignal:e,extension:t,negotiated:n,proposal:i},{handle:a,isInModal:s}){let o;return{target:e(N(()=>{const e=t?new fn(t):void 0,i=n.fields.deliveryNext.value;if(!i)return o;if("filled"!==i.status)return o;const s=i.lines.filter(e=>"available"===e.status).flatMap(e=>e.methods).find(e=>e.handle===a);if(s){const t=nn(s,e);o=d(o,t)?o:t}return o})),isTargetSelected:e(N(()=>i.parts.deliveryLines.value.some(e=>a===e.fields.deliveryMethodHandle.value))),renderMode:{overlay:s??!1}}}function Rn(e,t){const{extension:{apiVersion:n}}=e;switch(n){case"2023-04":case"2023-07":case"2023-10":return{};case"2024-01":case"2024-04":return function({createSubscribableFromSignal:e,observability:t,extension:n,proposed:i,negotiated:a},{groupType:s}){return{target:e(N(()=>{const e=a.fields.deliveryNext.value;if(!s||"filled"!==e?.status)return;const o=a.fields.remoteMerchandiseDetails.value,r=en(e.lines.filter(P),o).filter(({type:e})=>Te(e)===s),c=i.deliveryLines.value.filter(e=>Te(e.fields.type.value)===s).map(e=>e.fields.deliveryMethodHandle.value),l=a.fields.merchandiseLines.value?.lines,[d]=r;return d?yn({line:d,extension:n,observability:t,proposedSelectedDeliveryMethodHandles:c,lines:l}):void 0}))}}(e,t??{});case"2024-07":case"2024-10":case"2025-01":case"2025-04":case"2025-07":case"unstable":case"2025-10":case"2026-01":case"2026-04":case"2026-07":case"2026-10":case"2027-01":return En(e,t??{});default:a(n)}}function En({createSubscribableFromSignal:e,observability:t,extension:n,proposed:i,negotiated:a},{includeDeliverySelectionGroups:s,groupType:o}){return{target:e(N(()=>{const e=a.fields.deliveryNext.value;if(!o||"filled"!==e?.status)return;const s=a.fields.remoteMerchandiseDetails.value,r=en(e.lines.filter(P),s).filter(({type:e})=>Te(e)===o),c=i.deliveryLines.value.filter(e=>Te(e.fields.type.value)===o).map(e=>e.fields.deliveryMethodHandle.value),l=a.fields.merchandiseLines.value?.lines,d=r.map(e=>yn({line:e,extension:n,observability:t,proposedSelectedDeliveryMethodHandles:c,lines:l}));return d.length>0?{groupType:o,deliveryGroups:d}:void 0})),deliverySelectionGroups:e(N(()=>{const e=i.deliveryMacros.value,t=i.deliveryLines.value.map(e=>e.value).filter(({type:e,deliveryMethodTypes:t})=>"ONE_TIME_PURCHASE"===e&&t.some(e=>"SHIPPING"===e||"LOCAL"===e));if(!s||!e.length||!t.length)return;const n=new Set(t.map(({deliveryMethodHandle:e})=>e).filter(e=>Boolean(e)));return e.map(e=>{const t=Object.values(e.deliveryMethodHandles).filter(e=>Boolean(e));return{handle:e.id,selected:t.length===n.size&&t.every(e=>n.has(e)),title:e.title,associatedDeliveryOptions:t.map(e=>({handle:e})),cost:{amount:e.cost.amount,currencyCode:e.cost.currencyCode},costAfterDiscounts:{amount:e.costAfterDiscounts.amount,currencyCode:e.costAfterDiscounts.currencyCode}}})}))}}const _n={name:"Checkout::Dynamic::Render",api:e=>({...Cn(e),...jt(e),...qt(e)})},Mn={name:"Checkout::Actions::RenderBefore",api:e=>({...Cn(e),...jt(e)})},On={name:"Checkout::CartLineDetails::RenderAfter",api:(e,t)=>({...Cn(e),...jt(e),...In(e,t),...qt(e)})},Ln={name:"Checkout::CartLineDetails::RenderLineComponents",api:(e,t)=>({...Cn(e),...In(e,t)})},Un={name:"Checkout::CartLines::RenderAfter",api:e=>({...Cn(e),...jt(e),...qt(e)})},Vn={name:"Checkout::Contact::RenderAfter",api:e=>({...Cn(e),...jt(e)})},Fn={name:"Checkout::CustomerInformation::RenderAfter",api:e=>({...Cn(e),...jt(e),...qt(e)})},$n={name:"Checkout::DeliveryAddress::RenderBefore",api:e=>({...Cn(e),...jt(e)})},Gn={name:"purchase.checkout.delivery-address.render-after",api:e=>({...Cn(e),...jt(e)})},Bn={name:"Checkout::GiftCard::Render",api:(e,t)=>({...Cn(e),...jt(e),...Pn(e,t)})},jn={name:"Checkout::PaymentMethod::Render",api:(e,t)=>({...Cn(e),...jt(e),...wn(e,t)})},qn={name:"Checkout::PaymentMethod::HostedFields::RenderAfter",api:(e,t)=>({...Cn(e),...jt(e),...wn(e,t)})},Hn={name:"Checkout::PaymentMethod::RenderRequiredAction",api:e=>({...Cn(e),...jt(e)})}
2,Yn={name:"purchase.checkout.payment-method-list.render-before",api:e=>({...Cn(e),...jt(e)})},Jn={name:"purchase.checkout.payment-method-list.render-after",api:e=>({...Cn(e),...jt(e)})},zn={name:"Checkout::PickupLocations::RenderBefore",api:(e,t)=>({...Cn(e),...jt(e),...Tn(e,t)})},Wn={name:"Checkout::PickupLocations::RenderAfter",api:(e,t)=>({...Cn(e),...jt(e),...Tn(e,t)})},Qn={name:"Checkout::PickupPoints::RenderBefore",api:(e,t)=>({...Cn(e),...jt(e),...Dn(e,t)})},Kn={name:"Checkout::PickupPoints::RenderAfter",api:(e,t)=>({...Cn(e),...jt(e),...Dn(e,t)})},Xn={name:"purchase.checkout.pickup-location-option-item.render-after",api:(e,t)=>({...Cn(e),...jt(e),...Sn(e,t)})},Zn={name:"Checkout::Reductions::RenderBefore",api:e=>({...Cn(e),...jt(e)})},ei={name:"Checkout::Reductions::RenderAfter",api:e=>({...Cn(e),...jt(e)})},ti={name:"Checkout::ShippingMethodDetails::RenderAfter",api:(e,t)=>({...Cn(e),...jt(e),...Nn(e,t)})},ni={name:"Checkout::ShippingMethodDetails::RenderExpanded",api:(e,t)=>({...Cn(e),...jt(e),...Nn(e,t)})},ii={name:"Checkout::ShippingMethods::RenderBefore",api:(e,t)=>({...Cn(e),...jt(e),...Rn(e,t)})},ai={name:"Checkout::ShippingMethods::RenderAfter",api:(e,t)=>({...Cn(e),...jt(e),...Rn(e,t)})},si={name:"purchase.checkout.header.render-after",api:e=>({...Cn(e),...jt(e)})},oi={name:"purchase.checkout.footer.render-after",api:e=>({...Cn(e),...jt(e)})},ri={name:"purchase.checkout.chat.render",api:e=>({...Cn(e),...jt(e)})};function ci({extensionInstance:e,announcementEmitter:t}){return"purchase.thank-you.announcement.render"!==e.target||(e.on("destroy",()=>{t.removeAllListeners()}),e.on("restart",()=>{t.removeAllListeners()})),{}}function li({createSubscribableFromSignal:e,checkout:t,isCheckoutEditor:n,journeyCompletedSignal:i,observability:a}){return{orderConfirmation:e(N(()=>{const e=t.latestReceipt.value,s=!e||"processed"!==e.status;if(s&&n)return{order:{id:x("Order","0")},number:Ne().substring(0,10),isFirstOrder:!0};if(s){const t=i.peek()?"No receipt available on thankYou page":"No receipt available";throw e&&a.leaveErrorBreadcrumb("Receipt (OrderConfirmationApi):",{status:e.status,keys:Object.keys(e)}),new he(t)}return{order:{id:e.orderIdentity.id},number:e.orderIdentity.buyerIdentifier??void 0,isFirstOrder:e.isFirstOrder??!0}}))}}const di={name:"Checkout::ThankYou::Dynamic::Render",api:e=>({...Cn(e),...li(e)})},ui={name:"Checkout::ThankYou::CartLineDetails::RenderAfter",api:(e,t)=>({...Cn(e),...In(e,t),...li(e)})},pi={name:"Checkout::ThankYou::CartLines::RenderAfter",api:e=>({...Cn(e),...li(e)})},mi={name:"Checkout::ThankYou::CustomerInformation::RenderAfter",api:e=>({...Cn(e),...li(e)})},fi={name:"purchase.thank-you.header.render-after",api:e=>({...Cn(e),...li(e)})},yi={name:"purchase.thank-you.footer.render-after",api:e=>({...Cn(e),...li(e)})},hi={name:"purchase.thank-you.chat.render",api:e=>({...Cn(e),...li(e)})},gi={name:"purchase.thank-you.announcement.render",api:e=>({...Cn(e),...li(e),...ci(e)})},vi={[_n.name]:_n,[Mn.name]:Mn,[On.name]:On,[Ln.name]:Ln,[Un.name]:Un,[Vn.name]:Vn,[Fn.name]:Fn,[$n.name]:$n,[Gn.name]:Gn,[Bn.name]:Bn,[jn.name]:jn,[qn.name]:qn,[Yn.name]:Yn,[Jn.name]:Jn,[zn.name]:zn,[Wn.name]:Wn,[Xn.name]:Xn,[Qn.name]:Qn,[Kn.name]:Kn,[Hn.name]:Hn,[Zn.name]:Zn,[ei.name]:ei,[ti.name]:ti,[ii.name]:ii,[ai.name]:ai,[ni.name]:ni,[si.name]:si,[oi.name]:oi,[ri.name]:ri,[di.name]:di,[ui.name]:ui,[pi.name]:pi,[mi.name]:mi,[fi.name]:fi,[yi.name]:yi,[hi.name]:hi,[gi.name]:gi},bi=[ri.name,hi.name,gi.name],Ci=[ri.name,hi.name,gi.name];export{bi as D,Ft as M,vi as R,Ci as a,He as b,Je as c,nt as d,Ge as e,lt as f,kt as g,Ct as h,Le as i,bt as j,ht as k,vt as l,gt as m,ft as n,ot as o,xt as p,yt as q,Fe as r,st as s,$e as t,Ue as u,Oe as v,Ee as w,Ve as x,_e as y};
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.