PageSourceSearch

https://shop.agakhanmuseum.org/cdn/shopifycloud/checkout-web/assets/c1/f65334f8.DdTkGzvb.js

js agakhanmuseum.org collected 2026-10-01 10:40:17 UTC 15,667 bytes, 1 lines download raw bytes

1import{u as e,S as n,e as i,T as t,i as a,l as s,f as r,q as o,A as l,o as d}from"./2c1ab0fe.D_oO1jU7.js";import{n as c,b0 as u,c as p,bh as m,P as h,cl as g,L as v,bv as b,a0 as y,y as f,H as _,b as T,e as C,o as S,al as x,B as P,bS as w,l as L,aZ as M,a_ as j,h as k,a8 as I,ac as D,an as E,I as O,U as A}from"./164ad2e3.DgUUtBtV.js";import{C as R,a as q,b as B}from"./efa0389a.-R9eik6_.js";import{S as H,C as z,u as F}from"./31cc568e.CsDC1k63.js";import{O as G,A as Q,Q as N,aZ as V,e6 as U}from"./4c290a1e.D9lE9kmU.js";import{I as Z}from"./55098bf1.CrP8QF43.js";import{m as $}from"./ac5a19ff.CrIDx928.js";import{E as W,M as X,d as J,u as K}from"./64de7b49.Dffug7P1.js";import{u as Y,a as ee,i as ne,c as ie,m as te}from"./181d38d3.Bsy-Yqp4.js";import{B as ae,u as se,E as re,S as oe}from"./347b440c.oWH9qB5Z.js";import{B as le,D as de}from"./8d3a12c3.D9VLFw3s.js";import{g as ce,a as ue}from"./0e4087ec.BrZIBLQj.js";import{S as pe}from"./8e79be58.CObm0ydZ.js";import"./app.bDJ3v-8C.js";import"./65f3d4da.8ZfwXSRH.js";import"./60a453ce.BIyixFcg.js";import"./0a7dffce.BMM606kb.js";import"./bb728e1c.BObJOhlA.js";import"./8599b02a.yKiXuwTF.js";import"./d5d34b3b.HJgnljYP.js";import"./9f3d9f8c.Dodv5uQy.js";import"./4aab4b34.D7JoYOky.js";import"./3ca8ef7e.DT3qvctx.js";import"./a422df8c.CGT3eUwi.js";import"./47b970b2.Bspt4mBz.js";import"./29034f35.BY8rOPhQ.js";function me({summary:n}){const{transitText:i,brandedPromise:t,shipmentCountText:a}=n;return i||a?e(p,{direction:"inline",gap:"small-300",alignItems:"center",children:[i?e(c,{color:"subdued",children:i}):null,t?e(ae,{brandedPromise:t}):null,i&&a?e(c,{color:"subdued",accessibilityVisibility:"hidden",children:u}):null,a?e(c,{color:"subdued",children:a}):null]}):null}function he({selectedShippingMethod:i}){const{i18n:t}=G(),{deliveryExpectationLines:a}=se(),{cost:s,costAfterDiscounts:r,hideDiscountedTotalOnShippingSelector:o}=i,l=m({deliveryMethod:i,localDelivery:"LOCAL"===i.methodType?t.translate("shipping.local_delivery"):void 0}),d=a?.find((e=>e.deliveryStrategyHandle===i.handle)),c=s&&r?e(n,{children:[u,e(oe,{cost:s,costAfterDiscounts:r,inlineDiscount:!0,preDiscountCost:o})]}):null;return e(n,{children:[e(p,{direction:"inline",gap:"small-400",children:[e(H,{methodTitle:l}),c]}),e(re,{deliveryMethod:i,deliveryExpectationLine:d,paragraphColor:"subdued"})]})}function ge({selectedShippingMethod:n,rollupOpen:i}){const{i18n:t}=G();return i?e(h,{color:"subdued",children:t.translate("shipping.shipping_method_title")}):e(p,{children:e(he,{selectedShippingMethod:n})})}function ve({shippingMethods:n,type:i,id:t,displayOnly:a=!1}){const[s]=g({type:i,id:t}),{includedMethods:r}=Y().value,o=r.size?n.map((e=>r.has(e)?ee(e):e)):n,l=a?o[0]:o.find((({handle:e})=>e===s));return l?e(z.Provider,{value:!0,children:e(R,{presentation:"base",children:a?e(ge,{selectedShippingMethod:l}):e(p,{gap:"small-400",paddingBlockStart:"small-400",children:[e(ge,{selectedShippingMethod:l,rollupOpen:!0}),e(pe,{type:i,methods:o,id:t,isInSplitCartModal:!0})]})})}):null}function be({merchandise:s,oneTimePurchaseIndex:r,oneTimePurchaseTotalCount:o}){const l=i(!1),d=i(!1),{i18n:c}=G(),u=s.length,{totalQuantity:m,firstFiveQuantity:g}=t((()=>s.reduce(((e,n,i)=>{const t=n.quantity??0;return e.totalQuantity+=t,i<2&&(e.firstFiveQuantity+=t),e}),{totalQuantity:0,firstFiveQuantity:0})),[s]),C=c.translate("shipping.split_shipping_merchandise_quantity_label_standard",{quantity:m});return e(f,{gridAutoFlow:"column",gridAutoColumns:"minmax(auto, max-content)",gridTemplateColumns:"minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-100",alignItems:"center",alignContent:"center",children:[e(a,{when:d,fallback:e(n,{children:[e(p,{direction:"inline",gap:"small-300",children:s.slice(0,2).map((n=>e(X,{merchandiseItem:n},n.stableId)))}),e(v,{onClick:()=>{u>2?l.value=!0:d.value=!0},children:u>2?c.translate("shipping.split_shipping_merchandise_quantity_label_additional",{quantity:m-g}):c.translate("shipping.split_shipping_merchandise_quantity_label_standard",{quantity:m})})]}),children:e(W,{merchandise:s})}),e(b,{heading:e(n,{children:[e(_,{level:1,children:C}),e(T,{blockSize:"small-500"}),e(h,{color:"subdued",children:r&&o?c.translate("shipping.split_shipping_merchandise_shipment_number",{number:r,total:o}):c.translate("order_summary.subscriptions")})]}),open:l.value,onHide:()=>l.value=!1,accessibilityLabel:C,children:[e(y,{}),e(f,{gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gridAutoRows:"minmax(0, 1fr)",gap:"small-100",padding:"base none none none",children:e(W,{merchandise:s})})]})]})}function ye({merchandise:n,oneTimePurchaseIndex:i,oneTimePurchaseTotalCount:t}){const o=C(),l=s(n.length>1),d=r((()=>S(o.value.currentDetour))),c=r((()=>l.value&&d.value));return e(a,{when:c,fallback:e(W,{merchandise:n,thumbnailSize:d.value?"small":"base",merchandiseItemGap:d.value?"small-200":"base",thumbnailContentGap:d.value?"small-200":"base"}),children:e(be,{merchandise:n,oneTimePurchaseIndex:i,oneTimePurchaseTotalCount:t})})}function fe({line:i,oneTimePurchaseIndex:t,oneTimePurchaseTotalCount:a,disableBorders:s=!1,heading:r}){const{id:o,type:l,methods:d,targetMerchandiseLines:c}=i,u=x(c??[]),{currentDetour:p}=C().value,m=S(p);return e(P,{"data-delivery-line-id":o,background:"base",colorLayer:"control",border:s?"none":"base",borderRadius:s?"none":"base",children:[r&&e(n,{children:[e(P,{padding:"base",children:e(_,{level:3,children:r})}),e(y,{accessibilityRole:"presentation"})]}),e(P,{padding:"base",children:e(f,{gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(auto, max-content) minmax(0, 1fr)",gridAutoRows:"1fr",gap:"small-100",children:[e(ye,{merchandise:u,oneTimePurchaseIndex:t,oneTimePurchaseTotalCount:a}),e(ve,{shippingMethods:d,type:l,id:o,displayOnly:m})]})})]})}function _e({lines:i,heading:t,customNode:a,isSingleCard:s=!1,get
1Sequence:r,showExtendedHeading:o=!1,oneTimePurchaseTotalCount:l}){const{i18n:d}=G(),c=i.length,m=C(),h=J(),{presentsConsolidatedShipping:g}=Y().value;if(!c)return null;const v=i.map(((c,p)=>{const v=Boolean(a),b=p+1!==i.length,f=s&&(v||b),_=r(c);return e(n,{children:[e(fe,{line:c,disableBorders:s,heading:(()=>{if(S(m.value.currentDetour)||h.value)return;const e=o?t:void 0;if(g)return e;const n=d.translate("shipping.split_shipping_shipment_number",{number:_});return e?`${n} ${u} ${e}`:n})(),oneTimePurchaseIndex:p+1,oneTimePurchaseTotalCount:l},c.id??Q()),f&&e(y,{})]},c.id)}));return a&&v.push(a),e(P,{colorLayer:"control",children:e(f,{gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",gap:"small-200",children:e(p,s?{gap:"base",children:e(P,{overflow:"hidden",border:"base",borderRadius:"base",children:v})}:{gap:"large-200",children:v})})})}function Te({shippingGroupLines:n,oneTimePurchaseTotalCount:i}){const{i18n:s,shop:{name:l}}=G(),{buyWithPrimeLines:d,shipsNowLines:c,shipsLaterLines:u}=t((()=>ce(n)),[n]),m=t((()=>ue(n)),[n]),h=t((()=>{let e=[...d,...c,...u];return m&&(e=[...e,...m.reduce(((e,[,n])=>[...e,...n]),[])]),e}),[d,c,u,m]),g=o((e=>h.indexOf(e)+1),[h]),v=t((()=>d.length>0?s.translate("shipping.split_shipping_shipped_by_shop",{shop_name:l}):s.translate("shipping.pre_order_ships_now")),[d.length,s,l]),b=C(),y=r((()=>S(b.value.currentDetour))),f=u.length>0||!!m&&m?.length>0;return e(p,{gap:"large-200",children:[d.length>0&&e(_e,{lines:d,getSequence:g,heading:s.translate("split_shipping.shipped_by_amazon_prime"),oneTimePurchaseTotalCount:i,customNode:e(a,{when:y,children:e(P,{padding:"small-100 base",children:e(le,{})})}),isSingleCard:!0,showExtendedHeading:f}),c.length>0&&e(_e,{lines:c,getSequence:g,heading:v,oneTimePurchaseTotalCount:i,showExtendedHeading:f}),u.length>0&&e(_e,{lines:u,getSequence:g,heading:s.translate("shipping.pre_order_ships_later"),oneTimePurchaseTotalCount:i,showExtendedHeading:f}),m?.map((([n,t])=>t.length>0&&e(_e,{lines:t,getSequence:g,heading:s.translate("shipping.pre_order_ships_date",{date:s.formatDate(new Date(n),{timeZone:"UTC",month:"long",day:"numeric",year:"numeric"})}),oneTimePurchaseTotalCount:i,showExtendedHeading:f},n)))]})}const Ce="more-shipping-options-modal";function Se({deliveryLines:n,openAtDeliveryLineId:t,onOpen:a,onClose:s}){const{i18n:u}=G(),m=u.translate("shipping.shipping_method_title"),h=w(),g=l(),v=Y(),{total:_,presentsConsolidatedShipping:T}=v.value,C=i(!1),S=i(""),x=r((()=>{const{total:e,presentsConsolidatedShipping:n}=v.value;return n&&e?u.translate("order_summary.shipping_total_updated_label_with_price",{totalPrice:u.formatCurrency(e.amount,{currency:e.currencyCode,form:"name"})}):null})),M=l(null);d((()=>{if(!C.value)return M.current=null,void(S.value="");const e=x.value;if(!e)return void(S.value="");const n=M.current;M.current=e,n&&e!==n&&(S.value=e)}));const j=Ce,k=o((()=>{if(!t)return;const e=Array.from(document.getElementById(j)?.querySelectorAll("[data-delivery-line-id]")??[]).find((e=>e.dataset.deliveryLineId===t));e?.scrollIntoView({block:"start",behavior:"instant"})}),[t,j]),I=e(L,{variant:"primary",inlineSize:"fill",command:"--hide",commandFor:j,onClick:async()=>{await g.current,h("moreShippingOptions",{timestamp:new Date,subEvent:"modalSave"})},children:u.translate("payment.saved_credit_cards_modal.done")});return e(b,{heading:m,onShow:()=>{M.current=x.peek(),S.value="",C.value=!0,h("moreShippingOptions",{timestamp:new Date,subEvent:"modalOpen"}),a?.()},onAfterShow:k,onHide:async()=>{C.value=!1,g.current=s(),await g.current,h("moreShippingOptions",{timestamp:new Date,subEvent:"modalClose"})},id:j,footer:T?e(P,{background:"base",children:[e(y,{}),e(P,{paddingBlock:"base",paddingInline:"large-200",children:e(p,{gap:"base",children:[_&&e(f,{gridTemplateColumns:"1fr auto",gap:"base",children:[e(c,{type:"strong",children:u.translate("order_summary.multiple_shipping_lines_label")}),e(c,{type:"strong",translate:!1,children:u.formatCurrency(_.amount,{currency:_.currencyCode})})]}),e(P,{accessibilityVisibility:"exclusive",accessibilityRole:"status",children:S.value}),I]})})]}):void 0,padding:T?"none":"base",children:T?e(P,{paddingBlockStart:"base",paddingBlockEnd:"large-200",paddingInline:"large-200",children:e(Te,{shippingGroupLine
1s:n})}):e(p,{gap:"large-200",padding:"none none large-200 none",children:[e(Te,{shippingGroupLines:n}),I]})})}function xe({shopPromiseSummary:e,isPreOrder:n,formattedTimeInTransit:i,fallbackText:t}){return e?e.deliveryPromiseText:n?void 0:i??t}const Pe={border:"none",background:"transparent",backgroundSelected:"base"};function we({deliveryLines:n}){const{checkout:s,i18n:l}=G(),{negotiate:d}=k(),{deliveryMacros:u}=N(),m=i(!1),h=u.value,g=i(),v=i(),{selectedMacro:b,setSelectedMacro:y}=I(),T=b?.id,C=w(),S=F(),x=r((()=>V({checkout:s}))),L=n.every((e=>1===e.methods.length)),H=m.value&&!b,z=J(),Q=Y(),W=function(e,n,i){const{shop:t,i18n:a}=G(),{deliveryMacros:s}=N(),r=M(),{deliveryExpectationLines:o}=se(),l=new Map,d=s.value;if(!t.marketDrivenShippingEnabled||!d?.length)return l;const{shipsLaterLines:c}=ce(e),u=ue(e),p=Boolean(c.length||u?.length),m=d.map((n=>{const i=new Set(Object.values(n.deliveryMethodHandles)),t=e.map((e=>({line:e,method:e.methods.find((({handle:e})=>i.has(e)))}))).filter(ne);return{macro:n,resolvedMethods:t.map((({method:e})=>e)).filter((e=>Boolean(e))),count:ie(t).length}})),h=i>0?1===i:1===(m.find((({macro:e})=>e.id===n))??m[0]).count;for(const{macro:g,resolvedMethods:v,count:b}of m){if(b>1&&g.id===n)continue;const e=j({selectedMethods:v,deliveryExpectationLines:o??[],deliveryPromiseText:g.deliveryPromisePresentmentTitle?.short}),i=te(v),t=xe({shopPromiseSummary:e,isPreOrder:p,formattedTimeInTransit:i?r(i)??void 0:void 0,fallbackText:g.deliveryPromisePresentmentTitle?.long}),s=h&&b>1?a.translate("shipping.split_shipping_multiple_shipment_quantity_label",{quantity:b}):void 0;l.set(g.id,{...t&&{transitText:t},...e?.brandedPromise&&{brandedPromise:e.brandedPromise},...s&&{shipmentCountText:s}})}return l}(n,T,Q.value.groups.length),X=Q.value.groups.length,ee=X>0?X:n.length,ae=x.value||z.value,re=n.length>=U&&!S&&(ae||ee>1),le=v.value??re,pe=o((()=>{void 0===v.value&&(v.value=re)}),[v,re]),{customizationsBefore:he,customizationsAfter:ge}=K({targeted:!0,hasMultipleDeliveryGroups:!0}).value,ve=t((()=>T?[T]:[]),[T]),be=o((async([e])=>{e&&(pe(),await y(e),C("deliveryMacroInteraction",{timestamp:new Date,subEvent:"delivery_macros_input_change"}))}),[C,pe,y]),ye=e=>{pe(),g.value=e?n.find((n=>n.methods.includes(e)))?.id:void 0},fe=t((()=>({groupType:$("ONE_TIME_PURCHASE"),includeDeliverySelectionGroups:!L})),[L]);if(!h?.length)return null;let _e;if(L){const[i]=h,t=W.get(i.id),a=t&&(t.transitText||t.shipmentCountText)?e(me,{summary:t}):void 0;_e=1===X?e(R,{...S?Pe:{},children:e(q,{variant:"block",name:"delivery-macros",values:[i.id],hideRadioControl:!0,children:e(B,{value:i.id,secondaryContent:0!==i.cost.amount&&e(oe,{cost:i.cost,costAfterDiscounts:i.costAfterDiscounts,styleOverrides:{freeTextLetterCase:"uppercase",costSpacing:"none"}}),details:a,children:i.title})})}):e(P,{background:"base",colorLayer:"control",border:"base",borderRadius:"base",padding:"none",children:e(de,{selectedDeliveryMethodHandles:Object.values(i.deliveryMethodHandles),deliveryLines:n,choiceListContext:!1,isSharedRate:i.isSharedRate,shipmentGroups:Q.value.groups,includedMethods:Q.value.includedMethods,shipmentCommandFor:Ce,onShipmentClick:ye})})}else _e=e(R,{...S?Pe:{},children:e(q,{variant:"block",name:"delivery-macros",values:ve,onChange:be,blockFooter:e(f,{gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",children:e(E,{padding:S?"base none small-300 base":"base",borderRadius:"none none base base",onClick:ye,commandFor:Ce,children:e(f,{justifyItems:S?"start":"center",justifyContent:S?"start":"center",alignItems:"center",alignContent:"center",children:e(p,{direction:"inline",gap:"small-100",children:[S&&e(O,{type:"plus",tone:"accent"}),e(c,{type:S?"generic":"strong",tone:"accent",children:l.translate("shipping.split_shipping_more_shipping_options")})]})})})}),children:h.map((i=>{const{id:t,title:a,cost:s,costAfterDiscounts:r}
1=i,o=H?void 0:W.get(t),l=o?[a,o.transitText,o.shipmentCountText].filter(Boolean).join(", "):a;return e(B,{value:t,selectedContent:e(de,{selectedDeliveryMethodHandles:Object.values(i.deliveryMethodHandles),deliveryLines:n,isSharedRate:i.isSharedRate,macroTitle:i.title,shipmentGroups:Q.value.groups,shipmentCommandFor:Ce,onShipmentClick:ye,includedMethods:Q.value.includedMethods}),selectedContentPadding:"none",secondaryContent:H?e(D,{inlineSize:"5ch"}):0!==s.amount&&e(oe,{cost:s,costAfterDiscounts:r,styleOverrides:{freeTextLetterCase:"uppercase",costSpacing:"none"}}),accessibilityLabel:l,children:H?e(D,{inlineSize:"12ch",children:a}):e(p,{children:[e(c,{children:a}),o?e(me,{summary:o}):null]})},t)}))})});return e(Z,{impressionType:"delivery_macros",impressionFeatures:h.map((({id:e})=>e)),children:e(p,{gap:"base",paddingBlockStart:S||le?"none":"small-100",children:[le&&e(p,{direction:"inline",alignItems:"center",gap:"small-400",children:[e(O,{type:"truck"}),e(c,{color:"subdued",children:ae?l.translate("shipping.split_shipping_multiple_shipment_notice"):l.translate("shipping.split_shipping_shipment_count_notice_one_time_purchase",{count:ee})})]}),e(a,{when:x,children:e(_,{level:3,children:l.translate("shipping.shipping_method_first_shipment_group_title.other")})}),e(A,{customizations:he,options:fe}),_e,e(Se,{deliveryLines:n,openAtDeliveryLineId:g.value,onClose:()=>(m.value=!0,d({include:["deliveryNext"],onComplete:()=>{m.value=!1}}))}),e(A,{customizations:ge,options:fe})]})})}export{Pe as DELIVERY_MACRO_VAULTED_STYLE_OVERRIDES,we as default};

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.