@soma-vertical-web/multi-lib 0.0.57 → 0.0.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contexts/contexts/cart/MiniCartData.d.ts +7 -0
- package/contexts/store/cart.d.ts +1 -1
- package/data/helpers/cart/index.d.ts +1 -1
- package/index-BR5lPUsH.js +1 -0
- package/index-C3QT-3iu.mjs +355 -0
- package/index-CuKKHhKx.mjs +355 -0
- package/index.js +20 -20
- package/index.mjs +5537 -4443
- package/index2.js +1 -1
- package/index2.mjs +1 -1
- package/layout/index.d.ts +53 -1
- package/layout/team-component/Header/index.d.ts +1 -1
- package/layout/template/MiniCart/Composite/Card/Card.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Card/Composite/Actions.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Card/Composite/Gift.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Card/Composite/Media.d.ts +9 -0
- package/layout/template/MiniCart/Composite/Card/Composite/Name.d.ts +10 -0
- package/layout/template/MiniCart/Composite/Card/Composite/Price.d.ts +8 -0
- package/layout/template/MiniCart/Composite/Card/Composite/Sku.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Card/Composite/Stepper.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Card/Composite/Style.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Card/Composite/Wishlist.d.ts +4 -0
- package/layout/template/MiniCart/Composite/Card/helpers.d.ts +8 -0
- package/layout/template/MiniCart/Composite/Card/index.d.ts +45 -0
- package/layout/template/MiniCart/Composite/Cashback.d.ts +7 -0
- package/layout/template/MiniCart/Composite/CouponSeller/CouponSeller.d.ts +7 -0
- package/layout/template/MiniCart/Composite/CouponSeller/index.d.ts +1 -0
- package/layout/template/MiniCart/Composite/Feedback.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Field/Field.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Field/Input.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Field/index.d.ts +1 -0
- package/layout/template/MiniCart/Composite/Modal/Body.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Modal/Footer/Discount/Discount.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Modal/Footer/Discount/index.d.ts +1 -0
- package/layout/template/MiniCart/Composite/Modal/Footer/Footer.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Modal/Footer/Resume/Items.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Modal/Footer/Resume/Totals.d.ts +9 -0
- package/layout/template/MiniCart/Composite/Modal/Footer/index.d.ts +1 -0
- package/layout/template/MiniCart/Composite/Modal/Header.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Notifications/Item/Item.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Notifications/Item/index.d.ts +1 -0
- package/layout/template/MiniCart/Composite/Notifications/Notifications.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Notifications/index.d.ts +1 -0
- package/layout/template/MiniCart/Composite/Shipping/Shipping.d.ts +7 -0
- package/layout/template/MiniCart/Composite/Shipping/index.d.ts +1 -0
- package/layout/template/MiniCart/Composite/TagMessage.d.ts +5 -0
- package/layout/template/MiniCart/Composite/Variations/Options.d.ts +17 -0
- package/layout/template/MiniCart/Composite/Variations/ProductVariations.d.ts +4 -0
- package/layout/template/MiniCart/Composite/Variations/VariationList.d.ts +3 -0
- package/layout/template/MiniCart/MiniCart.d.ts +4 -0
- package/layout/template/MiniCart/helpers.d.ts +7 -0
- package/layout/template/MiniCart/index.d.ts +53 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/constants.d.ts +34 -0
- package/types/contexts/contexts/cart/index.d.ts +9 -0
- package/types/contexts/store/cart.d.ts +2 -2
- package/types/layout/team-components/Header/index.d.ts +12 -2
- package/types/layout/templates/MiniCart/index.d.ts +192 -0
package/index2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react/jsx-runtime"),b=require("./index-BYY2x6mQ.js"),A=require("@soma-vertical-web/core-components"),re=require("yup"),ne=require("sanitize-html");function se(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=se(re),oe=({slug:e,data:t,SectionZone:n,COMMON_PAGE_COLUMN_GAP:r,identifyWhoIsFirst:a})=>{const o=t==null?void 0:t.find(d=>{var h,g,m,R;return((g=(h=d.config)==null?void 0:h.responsive)==null?void 0:g.deviceType)==="desktop"&&((R=(m=d.config)==null?void 0:m.seo)==null?void 0:R.slug)===e}),i=o==null?void 0:o.config.responsive.gapCustom,l=o==null?void 0:o.config.responsive.gapSections,u=t==null?void 0:t.find(d=>{var h,g,m,R;return((g=(h=d.config)==null?void 0:h.responsive)==null?void 0:g.deviceType)==="mobile"&&((R=(m=d.config)==null?void 0:m.seo)==null?void 0:R.slug)===e}),p=u==null?void 0:u.config.responsive.gapCustom,c=u==null?void 0:u.config.responsive.gapSections;return I.jsxs(I.Fragment,{children:[I.jsx(A.Utils.Column,{gap:i&&l?l:r,className:A.helpers.classNameConcat(b.responsive["responsive-desktop-flex"],"utils-column-modifier"),children:I.jsx(n,{data:(o==null?void 0:o.sections)??[],identifyWhoIsFirst:a})}),I.jsx(A.Utils.Column,{gap:p&&c?c:r,className:A.helpers.classNameConcat(b.responsive["responsive-mobile-flex"],"utils-column-modifier"),children:I.jsx(n,{data:(u==null?void 0:u.sections)??[],identifyWhoIsFirst:a})})]})},ae=async({slug:e,SectionZone:t,COMMON_PAGE_COLUMN_GAP:n,identifyWhoIsFirst:r=!1,...a})=>{const{data:o}=await b.getContentType({contentType:"common_page",...a});return I.jsx(oe,{data:o,slug:e,SectionZone:t,COMMON_PAGE_COLUMN_GAP:n,identifyWhoIsFirst:r})},ie=async({PAYMENT_FLAGS_DICTIONARY:e,PAYMENT_FLAGS:t,LEGAL_INFORMATION_TEXT:n,SectionZone:r,ICONS:a,Footer:o,FooterSupport:i,...l})=>{var d,h,g,m,R,E,T,S,O,f,C;const{data:u}=await b.getContentType({contentType:"footer",...l}),p=Array.isArray(u)&&((d=u[0])==null?void 0:d.type)==="footer"?u[0]:null,c={...(h=p==null?void 0:p.paymentInfo)==null?void 0:h.paymentInfo,acceptedFlags:Array.isArray((g=p==null?void 0:p.paymentInfo)==null?void 0:g.paymentInfo.acceptedFlags)?(m=p==null?void 0:p.paymentInfo)==null?void 0:m.paymentInfo.acceptedFlags.filter(v=>!!e[v]).map(v=>e[v]):[]};return p?I.jsx(o,{data:{...p},socialInfo:(R=p.socialMedia)==null?void 0:R.socialMedia,socialMedias:(T=(E=p.socialMedia)==null?void 0:E.socialMedia)==null?void 0:T.medias,payments:c,adornment:{...(O=(S=p.supportInfo)==null?void 0:S.supportInfo)!=null&&O.content?{bottom:I.jsx(i,{content:(C=(f=p.supportInfo)==null?void 0:f.supportInfo)==null?void 0:C.content,CONSTANTS:{ICONS:a,PAYMENT_FLAGS:t,PAYMENT_FLAGS_DICTIONARY:e}})}:{},...p.sections.length?{top:I.jsx(r,{data:p.sections})}:{}},LEGAL_INFORMATION_TEXT:n,ICONS:a}):I.jsx(I.Fragment,{})},ce=async({children:e,ClientHeaderProvider:t,...n})=>{var o,i,l,u;const{data:r}=await b.getContentType({contentType:"header",...n}),a=(o=r[0])==null?void 0:o.sections.map(p=>p.data);return I.jsx(t,{headerData:{...(i=r[0])==null?void 0:i.layerConfig.config,subMenus:a??[],categories:((l=r[0])==null?void 0:l.categories.categories.items)??[],navigationLinks:((u=r[0])==null?void 0:u.navigationLinks.navigationLinks.items)??[]},children:e})},le=async({children:e,productId:t,COMMON_PAGE_COLUMN_GAP:n,SectionZone:r,PDPContentProvider:a,...o})=>{const{data:i}=await b.getContentType({contentType:"product_page",...o});return I.jsx(a,{data:i[0],productId:t,COMMON_PAGE_COLUMN_GAP:n,SectionZone:r,children:e})},ue={"column-modifier":"_column-modifier_1tqap_1"},de=async({children:e,slug:t,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:r,PLPContentProvider:a,...o})=>{const{data:i}=await b.getContentType({contentType:"categories_page",...o}),l=i.find(d=>{var h,g,m;return((h=d.config)==null?void 0:h.seo.slug)===t&&((m=(g=d.config)==null?void 0:g.responsive)==null?void 0:m.deviceType)==="desktop"}),u=i.find(d=>{var h,g,m;return((h=d.config)==null?void 0:h.seo.slug)===t&&((m=(g=d.config)==null?void 0:g.responsive)==null?void 0:m.deviceType)==="mobile"}),p=i.find(d=>{var h,g,m;return((h=d.config)==null?void 0:h.seo.slug)==="default"&&((m=(g=d.config)==null?void 0:g.responsive)==null?void 0:m.deviceType)==="desktop"}),c=i.find(d=>{var h,g,m;return((h=d.config)==null?void 0:h.seo.slug)==="default"&&((m=(g=d.config)==null?void 0:g.responsive)==null?void 0:m.deviceType)==="mobile"});return I.jsxs(I.Fragment,{children:[I.jsx(A.Utils.Column,{className:A.helpers.classNameConcat(b.responsive["responsive-desktop-flex"],ue["column-modifier"]),style:{minHeight:"100vh"},children:I.jsx(a,{data:l??p,device:"desktop",SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:r,children:e})}),I.jsx(A.Utils.Column,{className:b.responsive["responsive-mobile-flex"],children:I.jsx(a,{data:u??c,device:"mobile",SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:r,children:e})})]})},pe=async({slug:e,...t})=>{var i,l,u;const{data:n}=await b.getContentType({contentType:"redirect_to_search",...t}),r=((u=(l=(i=n[0])==null?void 0:i.redirectToSearch)==null?void 0:l.redirectToSearch)==null?void 0:u.paths)??[];if(!!!r.length)return{slug:e,query:null,redirect:!1};const o=r.find(p=>{var c,d;return((c=p.path)==null?void 0:c.replace(/\//g,"-").toLowerCase())===e.replace(/\//g,"-").toLowerCase()||((d=p.path)==null?void 0:d.replace(/\//g,"-").toLowerCase())===`/${e}`.replace(/\//g,"-").toLowerCase()});return o?{slug:e,query:o==null?void 0:o.searchQuery,redirect:!0,collectionId:o==null?void 0:o.collectionId,filters:o==null?void 0:o.filters,sort:o==null?void 0:o.sort}:{slug:e,query:null,redirect:!1,collectionId:null,filters:null,sort:null}},me=async({slug:e,...t})=>{var i,l,u;const{data:n}=await b.getContentType({contentType:"redirect_to_search",...t}),r=((u=(l=(i=n[0])==null?void 0:i.redirectToSearch)==null?void 0:l.redirectToSearch)==null?void 0:u.paths)??[];if(!!!r.length)return null;const o=r.find(p=>{var c,d;return((c=p.path)==null?void 0:c.replace(/\//g,"-").toLowerCase())===e.replace(/\//g,"-").toLowerCase()||((d=p.path)==null?void 0:d.replace(/\//g,"-").toLowerCase())===`/${e}`.replace(/\//g,"-").toLowerCase()});return o?{slug:e,title:o.pageTitle,description:o.pageDescription}:null},ge=async({children:e,SectionZone:t,className:n,...r})=>{const{data:a}=await b.getContentType({contentType:"search_page",...r});return Array.isArray(a)&&a.length>0?I.jsx(b.SearchPageScreening,{data:a,SectionZone:t,className:n,children:e}):I.jsx(I.Fragment,{children:e})},fe=async({ClientTipbarContent:e,...t})=>{const{data:n}=await b.getContentType({contentType:"tipbar",...t});return I.jsx(e,{data:n})},he={CommonPageContent:ae,HeaderContent:ce,TipbarContent:fe,FooterContent:ie,PLPContent:de,PDPContent:le,getRedirectData:pe,getPLPSynteticMetaData:me,SearchPageContent:ge},ye={Components:he},y=async(e,t={})=>{const{method:n="GET",body:r,headers:a={},priority:o="auto",cache:i="default"}=t;return fetch(e,{method:n,headers:{...a,Accept:"application/json","Content-Type":"application/json"},priority:o,cache:i,...r?{body:JSON.stringify(r)}:{}}).then(l=>l.json()).catch(l=>{console.error("[ERROR FETCH VTEX]",l)})},N=new Map;async function Ie(e,t={}){var n;try{const{abort:r=!1}=t,a=new AbortController;r&&(N.has(e)&&((n=N.get(e))==null||n.abort(),N.delete(e)),N.set(e,a));const o=y(e,{...t,...r?{signal:a.signal}:{}});return r&&N.delete(e),o}catch(r){if(r.name==="AbortError"){console.log(`[REQUEST CANCELLED]: ${e}`);return}throw console.error(`[ERROR API]: ${r.message}`),r}}const be=s.object({country:s.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:s.string().nullable()});async function Ce({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await be.validate(t);const{country:r,postalCode:a}=t;return await y(`${e}/api/checkout/pub/postal-code/${r}/${a}`,{method:"POST",body:t,...n})}const Re=s.object({orderFormId:s.string().nullable(),sellerCode:s.string().nullable(),sellerName:s.string().nullable()});async function U({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Re.validate(t);const{orderFormId:r,sellerCode:a,sellerName:o}=t,i=a?`${a.trim()} - ${o}`:null;return y(`${e}/api/checkout/pub/orderForm/${r}/attachments/openTextField`,{method:"POST",body:{value:i},...n})}const ve=s.object({orderFormId:s.string().nullable(),sellerCode:s.string().nullable(),marketingData:s.object()});async function x({apiUrl:e,body:t,extraData:n={},fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await ve.validate(t);const{orderFormId:a,sellerCode:o,marketingData:i}=t,l=o?{utmCampaign:o?o.toUpperCase():"",utmiCampaign:o?`${n.VENDOR_CODE}`:"semcodigo"}:{};return y(`${e}/api/checkout/pub/orderForm/${a}/attachments/marketingData`,{method:"POST",body:{...i,...l},...r})}const Te=s.object({orderFormId:s.string().nullable(),sellerCode:s.string().nullable(),sellerName:s.string().nullable()});async function Se({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Te.validate(t);const r=await U({apiUrl:e,body:t,fetchOptions:n});return x({apiUrl:e,body:{...t,marketingData:r==null?void 0:r.marketingData},fetchOptions:n})}const Ee=s.object({orderFormId:s.string().nullable(),coupon:s.string().nullable()});async function Oe({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ee.validate(t);const{coupon:r="",orderFormId:a}=t;return y(`${e}/api/checkout/pub/orderForm/${a}/coupons`,{method:"POST",body:{text:r},...n})}const Fe=s.object({appId:s.string().required("App ID is required"),orderFormId:s.string().nullable(),key:s.array().of(s.string())});async function qe({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Fe.validate(t);const{appId:r="faststore",orderFormId:a,key:o}=t;return y(`${e}/api/checkout/pub/orderForm/${a}/customData/${r}/${o}`,{method:"PUT",...n})}const $e=s.object().shape({name:s.string().required("Attachment name is required"),content:s.object().nullable()});var L;const Pe=s.object().shape({attachments:(L=s.array().of($e))==null?void 0:L.nullable(),id:s.string().required("ID of SKU is required"),index:s.number().integer().nullable(),quantity:s.number().integer().nullable(),seller:s.string().required("Seller is required"),price:s.number().integer()}),je=s.object({orderFormId:s.string().required("OrderFormId is required"),orderItems:s.array().of(Pe)});async function Ae({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await je.validate(t);const{orderFormId:r,orderItems:a}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/items`,{method:"POST",body:{orderItems:a},...n})}const Ne=s.object({orderFormId:s.string().nullable()});async function we({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ne.validate(t);const{orderFormId:r}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/items/removeAll`,{method:"POST",...n})}const ke=s.object().shape({name:s.string().required("Attachment name is required"),content:s.object().nullable()});var M;const De=s.object().shape({attachments:(M=s.array().of(ke))==null?void 0:M.nullable(),id:s.string().required("ID of SKU is required"),index:s.number().integer().nullable(),quantity:s.number().integer().nullable(),seller:s.string().required("Seller is required"),price:s.number().integer()}),_e=s.object({orderFormId:s.string().nullable(),orderItems:s.array().of(De)});async function He({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await _e.validate(t);const{orderFormId:r,orderItems:a}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/items/update`,{method:"POST",body:{orderItems:a},...n})}const Be=s.object({orderFormId:s.string().nullable()});async function Ge({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Be.validate(t);const{orderFormId:r}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/messages/clear`,{method:"POST",...n})}const Le=s.object({id:s.string().nullable(),itemIndex:s.number().nullable(),orderFormId:s.string().nullable(),remove:s.boolean().nullable()});async function Me({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Le.validate(t);const{itemIndex:r,orderFormId:a,id:o,remove:i}=t,l=i?`/${o}/remove`:"",u=`${e}/api/checkout/pub/orderForm/${a}/items/${r}/offerings${l}`;return y(u,{method:"POST",body:{id:o},...n})}const Ue=s.object({orderFormId:s.string().nullable()});async function xe({apiUrl:e,body:t,fetchOptions:n,extraData:r}){var i;if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ue.validate(t);const a=new URLSearchParams({refreshOutdatedData:"true"}),o=t.orderFormId&&((i=r.orderFormPurchaseId)==null?void 0:i.value)!==t.orderFormId?`${e}/api/checkout/pub/orderForm/${t.orderFormId}?${String(a)}`:`${e}/api/checkout/pub/orderForm`;return y(o,{method:"GET",...n})}const Ve=s.object({orderFormId:s.string().nullable(),email:s.string().email().required(),firstName:s.string().required(),lastName:s.string().required(),documentType:s.string().required(),document:s.string().required(),phone:s.string().matches(/^\+\d{1,3}\d{10,11}$/)});async function ze({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ve.validate(t);const{orderFormId:r,...a}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/attachments/clientProfileData`,{method:"POST",body:{...a},...n})}const Qe=s.object({sellerCode:s.string().nullable()});async function Ke({apiUrl:e,body:t,extraData:n,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Qe.validate(t);const{sellerCode:a=""}=t;return y(`${e}/api/dataentities/${n.ENTITIES}/search?_fields=${n.FIELDS}&${n.FILTER}=${a}`,{method:"GET",headers:{Accept:"application/vnd.vtex.ds.v10+json"},...r})}const Je=s.object().shape({country:s.string().length(3,"Country code must be 3 characters long").required("Country is required"),orderFormId:s.string().nullable(),postalCode:s.string().nullable()});async function Ye({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Je.validate(t);const{country:r,orderFormId:a,postalCode:o}=t,i=o?{address:{addressType:"residential",postalCode:o,country:r}}:{logisticsInfo:[],clearAddressIfPostalCodeNotFound:!0};return y(`${e}/api/checkout/pub/orderForm/${a}/attachments/shippingData`,{method:"POST",body:i,...n})}const We=s.object().shape({orderFormId:s.string().nullable(),options:s.array().of(s.object().shape({itemIndex:s.number(),selectedDeliveryChannel:s.string(),selectedSla:s.string()})),selectedAddresses:s.array().of(s.object().shape({addressId:s.string().required(),addressType:s.string().required(),city:s.string().nullable(),complement:s.string().nullable(),country:s.string().required().length(3),geoCoordinates:s.array().of(s.number()).required().min(0),isDisposable:s.boolean().required(),neighborhood:s.string().nullable(),number:s.string().nullable(),postalCode:s.string().required(),receiverName:s.string().nullable(),reference:s.string().nullable(),state:s.string().nullable(),street:s.string().nullable()}))});async function Xe({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await We.validate(t);const{orderFormId:r,options:a,selectedAddresses:o}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/attachments/shippingData`,{method:"POST",body:{selectedAddresses:o,clearAddressIfPostalCodeNotFound:!1,logisticsInfo:a},...n})}const Ze=s.object({country:s.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:s.string().nullable(),geoCoordinates:s.object().shape({longitude:s.number().required(),latitude:s.number().required()})});async function et({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ze.validate(t);const{country:r="",geoCoordinates:a,postalCode:o=""}=t,i=new URLSearchParams({country:String(r)});return o?i.append("postalCode",o):i.append("geoCoordinates",`${a==null?void 0:a.longitude};${a==null?void 0:a.latitude}`),await y(`${e}/api/checkout/pub/regions/?${i.toString()}`,{method:"GET",...n})}const tt=s.object({id:s.string().required("ID of SKU is required"),quantity:s.number().integer().required("Quantity of item is required"),seller:s.string()}),rt=s.object({items:s.array().of(tt),country:s.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:s.string().nullable(),geoCoordinates:s.array().nullable().of(s.number()).length(2)});async function nt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}return await rt.validate(t),y(`${e}/api/checkout/pub/orderForms/simulation`,{method:"POST",body:t,...n})}const st=Object.freeze(Object.defineProperty({__proto__:null,getMasterDataSellerCode:Ke,getOrderForm:xe,postOrderFormAddCoupon:Oe,postOrderFormAttachClientProfileData:ze,postOrderFormAttachOrderFormData:Se,postOrderFormAttachShippingData:Ye,postOrderFormAttachmentsMarketingData:x,postOrderFormAttachmentsOpenTextField:U,postOrderFormClearMessages:Ge,postOrderFormFreightSimulation:nt,postOrderFormItems:Ae,postOrderFormRegion:et,postOrderFormRemoveAllItems:we,postOrderFormUpdateItems:He,postOrderFormUpdateShippingData:Xe,postOrderformAddress:Ce,putOrderFormCustomData:qe,updateOrderFormOffering:Me},Symbol.toStringTag,{value:"Module"})),ot=s.object({skuId:s.string()});async function at({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await ot.validate(t);const{skuId:r}=t;return y(`${e}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${r}`,{...n})}const it=s.object({ids:s.array().of(s.string().required("ID are required")).required("IDs are required")});async function ct({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await it.validate(t);const{ids:r}=t;return y(`${e}/api/catalog_system/pub/products/search?fq=${r.map(a=>`productId:${a}`).join("&fq=")}`,{...n})}const lt=s.object({productId:s.number().required("Product ID is required")});async function ut({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await lt.validate(t);const{productId:r}=t;return y(`${e}/api/catalog_system/pub/products/crossselling/similars/${r.toString()}`,{...n})}const dt=Object.freeze(Object.defineProperty({__proto__:null,getCatalogKitProducts:at,getCatalogProducts:ct,getCatalogSimilars:ut},Symbol.toStringTag,{value:"Module"})),pt=s.object({query:s.string()});async function mt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await pt.validate(t);const{query:r=""}=t,a=new URLSearchParams({query:r});return y(`${e}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${a.toString()}`,{...n})}const gt=(e,t)=>ne(e,t),ft=e=>({...e,description:e.description?gt(e.description):e.description}),ht=({offer:e,seller:t,product:n})=>({...e,product:n,seller:t}),V=(e,t)=>({...e,isVariantOf:ft(t)}),yt=e=>e?"https://schema.org/InStock":"https://schema.org/OutOfStock",w=e=>e.AvailableQuantity>0,H=e=>e.spotPrice??0,It=e=>e.Price??0,z=(e,t)=>w(e)&&!w(t)?-1:!w(e)&&w(t)?1:H(e)-H(t),bt=(e,t)=>{let n=0;for(let r=1;r<e.length;r++)t(e[n],e[r])>0&&(n=r);return e[n]},Q=e=>{const t=e.flatMap(r=>r.sellers.map(a=>({offer:a.commertialOffer,sku:r}))),n=bt(t,({offer:r},{offer:a})=>z(r,a));return n?n.sku:e[0]},K=e=>e.map(({imageUrl:t,imageText:n,imageLabel:r})=>({alternateName:n??"",url:t.replace("vteximg.com.br","vtexassets.com"),keywords:r})),k={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},Ct=e=>({name:e.name,value:e.content,valueReference:k.attachment}),Rt=e=>({propertyID:e.id,name:e.name,value:e.value,valueReference:{valueReference:k.attribute,visible:e.visible}}),D=(e,t,n)=>{const r=e.flatMap(({name:i,values:l})=>l?l.map(u=>({name:i,value:u,valueReference:k.specification})):{name:i,value:"",valueReference:k.specification}),a=Array.isArray(n)?n.map(Ct):[],o=t?t.map(Rt):[];return[...r,...a,...o]},B="ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a",vt="AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa",Tt=e=>{let t=e.slice(0);for(let n=0;n<B.length;n++)t=t.replace(new RegExp(B.charAt(n),"g"),vt.charAt(n));return t},St=e=>e.replace(/[·/_,:]/,"-"),J=e=>{const n=e.replace(/,/g,"").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g,"-");return St(Tt(n)).toLowerCase()},Y=e=>`/${e}/p`,W=e=>{const t=Math.max(...e.map(r=>r.NumberOfInstallments)),n=e.find(r=>r.NumberOfInstallments===t);return{count:(n==null?void 0:n.NumberOfInstallments)??0,value:(n==null?void 0:n.Value)??0}},X=(e,t)=>{const n={price:0,listPrice:0,sellerDefault:!1},a=e.map(o=>ht({offer:o.commertialOffer,seller:o,product:t})).sort(z).map(o=>(o.seller.sellerId==="1"&&o.AvailableQuantity>0&&(n.price=o.Price,n.listPrice=o.ListPrice,n.sellerDefault=!0),{availability:o.AvailableQuantity>0,listPrice:o.ListPrice,price:It(o),priceValidUntil:o.PriceValidUntil,priceCurrency:"BRL",installments:o.Installments,lowPrice:o.spotPrice,quantity:o.AvailableQuantity,seller:{identifier:o.seller.sellerId}}));return{lowPrice:n.sellerDefault?n.price:a[0].price,highPrice:n.sellerDefault?n.listPrice:a[0].listPrice,offers:a}},Z=e=>{const{attributes:t,itemId:n,name:r,sellers:a,variations:o}=e;return{additionalProperty:D(o,t,[]),name:r,offers:{offers:a.map(({sellerId:i,commertialOffer:l})=>({availability:yt(l.AvailableQuantity>0),listPrice:l.ListPrice,price:l.Price,quantity:l.AvailableQuantity,seller:{identifier:i}}))},sku:n}},Et=e=>{var F;const{attributes:t,referenceId:n,isVariantOf:r,images:a,itemId:o,name:i,sellers:l,videos:u,variations:p}=e,{brand:c,categories:d,categoriesIds:h,description:g,linkText:m,productClusters:R,clusterHighlights:E,productName:T,properties:S,productId:O,productReference:f}=r,C=d.slice().reverse(),v=X(l,e.isVariantOf),$=W(v.offers[0].installments);return{sku:o,gtin:((F=n==null?void 0:n[0])==null?void 0:F.Value)??f??"",name:T??i,description:g,releaseDate:r.releaseDate??"",slug:m,video:u[0],categories:d,categoriesIds:h,id:O,brand:{name:c,brandName:c},seo:{description:g,title:T,canonical:Y(m)},cluster:{generals:R,highlights:E},properties:S,availability:{status:v.offers[0].availability},breadcrumbList:{itemListElement:[...C.map((P,j)=>{const q=P.split("/"),_=q[q.length-2],te=q.map(J).join("/");return{name:_,item:te,position:j+1}}),{name:r.productName,item:m,position:d.length+1}],numberOfItems:d.length},image:K(a),offers:v,additionalProperty:D(p,t,[]),isVariantOf:{productGroupID:r.productId,hasVariant:r.items.map(P=>Z(P))},installments:$}},Ot=e=>{var $;const{attributes:t,referenceId:n,isVariantOf:r,images:a,itemId:o,name:i,sellers:l,Videos:u,variations:p}=e,{brand:c,categories:d,categoriesIds:h,description:g,linkText:m,productClusters:R,productName:E,Coleção:T,"ID Coleção":S,productId:O}=r,f=d.slice().reverse(),C=X(l,e.isVariantOf),v=W(C.offers[0].installments);return{sku:o,gtin:(($=n[0])==null?void 0:$.Value)??"",name:E??i,description:g,releaseDate:r.releaseDate??"",slug:m,video:u[0],categories:d,categoriesIds:h,collection:T,collectionId:S,id:O,brand:{name:c,brandName:c},seo:{description:g,title:E,canonical:Y(m)},cluster:{generals:R,highlights:[]},availability:{status:C.offers[0].availability},breadcrumbList:{itemListElement:[...f.map((F,P)=>{const j=F.split("/"),q=j[j.length-2],_=j.map(J).join("/");return{name:q,item:_,position:P+1}}),{name:r.productName,item:m,position:d.length+1}],numberOfItems:d.length},image:K(a),offers:C,additionalProperty:D(p,t,[]),isVariantOf:{productGroupID:r.productId,hasVariant:r.items.map(F=>{const{variations:P}=F,j=P.map(q=>({name:q,values:F[q]}));return{...Z(F),additionalProperty:D(j,t,[])}})},installments:v}},Ft=s.array().of(s.object({key:s.string().required(),value:s.string().required()})).required("Facets are required");async function qt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ft.validate(t);const r=new URLSearchParams({}),a=t.map(({key:i,value:l})=>`${i}/${l}`).join("/");b.addSearchParamsFacets(t,r);const o=`${e}/api/catalog_system/pub/products/crossselling/${a}`;return y(o,{cache:"no-store",...n}).then(i=>i.map(u=>{const p=Q(u.items);return p&&V(p,u)}).filter(u=>!!u).map(u=>({node:Ot(u)})))}const ee=({apiUrl:e,body:t,fetchOptions:n,extraData:r})=>{if(!t){console.error("[ERROR FETCHING] Body is required");return}const{query:a="",page:o=1,count:i,sort:l="",facets:u=[],type:p,hideUnavailableItems:c=!0,locale:d=""}=t,h=new URLSearchParams({page:o.toString(),count:(i==null?void 0:i.toString())??(r==null?void 0:r.ITEMS_PER_PAGE)??24,query:a,sort:l,locale:d});c!==void 0&&h.append("hideUnavailableItems",c.toString());const g=u.map(m=>`${m.key}/${m.value}`).join("/")??"";return Ie(`${e}/api/io/_v/api/intelligent-search/${p}/${g}?${h.toString()}`,{headers:{Accept:"application/json","content-type":"application/json"},...n})};async function $t({body:e,extraData:t,...n}){if(!e){console.error("[ERROR FETCHING] Body is required");return}const r=await ee({body:{...e,type:"product_search"},extraData:t,...n}),a=(r==null?void 0:r.products.map(l=>{const u=Q(l.items);return u&&V(u,l)}).filter(l=>!!l))??[],{pagination:o,recordsFiltered:i}=r;return{data:{pagination:{nextPage:o.after.length>0,previousPage:o.before.length>0,startCursor:"0",endCursor:i.toString(),count:i,total:o.count},products:a.map((l,u)=>({node:Et(l),cursor:u.toString()}))}}}async function Pt({body:e,extraData:t,...n}){if(!e){console.error("[ERROR FETCHING] Body is required");return}const r=await ee({body:{...e,type:"facets"},extraData:t,...n});return!r||!r.facets?(console.error("[ERROR FETCHING] No facets found"),{data:{facets:[]}}):{data:{...r,facets:b.formattedFacets(r,e==null?void 0:e.selectedFacets,(e==null?void 0:e.query)??"")}}}const jt=s.object({query:s.string().optional(),locale:s.string().optional()});async function At({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await jt.validate(t);const{query:r="",locale:a="default_locale"}=t,o=new URLSearchParams({query:r,locale:a});return y(`${e}/api/io/_v/api/intelligent-search/search_suggestions?${o.toString()}`,{...n})}async function Nt({apiUrl:e}){return y(`${e}/api/io/_v/api/intelligent-search/top_searches`)}const wt=Object.freeze(Object.defineProperty({__proto__:null,getSearchAutoCompleteSuggestions:mt,getSearchCrossellingProducts:qt,getSearchFacets:Pt,getSearchProducts:$t,getSearchSuggestedTerms:At,getSearchTopSearchs:Nt},Symbol.toStringTag,{value:"Module"})),kt=s.object({masterDataEntity:s.string().nonNullable(),payload:s.object().shape({}).nullable()});async function Dt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await kt.validate(t);const{masterDataEntity:r,payload:a}=t,o=`${e}/api/dataentities/${r}/documents`;return y(o,{method:"POST",body:{payload:a},...n})}const _t=s.object().shape({_where:s.string().optional(),_fields:s.string().optional(),_sort:s.string().optional(),_from:s.number().integer().min(0).optional(),_to:s.number().integer().min(0).optional(),_keyword:s.string().optional()}),Ht=s.object({masterDataEntity:s.string().required(),searchFields:_t,headers:s.object().shape({"REST-Range":s.string().notRequired()})});async function Bt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}const r=new URLSearchParams;await Ht.validate(t);const{masterDataEntity:a,searchFields:o,headers:i}=t;o&&Object.entries(o).forEach(([u,p])=>{r.append(u,String(p))}),"_fields"in o||r==null||r.append("_fields","_all");const l=`${e}/api/dataentities/${a}/search?${r.toString()}`;return y(l,{headers:{"REST-Range":i["REST-Range"]??"resources=0-20"},method:"GET",...n})}const Gt=s.object({dataEntityName:s.string().required(),id:s.string().required(),fieldsToBeUpdated:s.object().shape({})});async function Lt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Gt.validate(t);const{dataEntityName:r,id:a,fieldsToBeUpdated:o}=t,i=`${e}/api/dataentities/${r}/documents/${a}`;return y(i,{body:{fieldsToBeUpdated:o},method:"PATCH",...n})}const Mt=Object.freeze(Object.defineProperty({__proto__:null,getSearchMasterdata:Bt,patchUpdateMasterdata:Lt,postMasterdata:Dt},Symbol.toStringTag,{value:"Module"}));async function Ut({body:e,apiUrl:t,extraData:n,fetchOptions:r}){const{productIds:a}=e;if(!a)return console.error("[ERROR FETCHING] productIds is required"),[];const{NAME_SPLIT_SYMBOL:o}=n;if(!o)return console.error("[ERROR FETCHING] NAME_SPLIT_SYMBOL is required"),[];const i=a.map(c=>typeof c=="string"||typeof c=="number"?`productId:${c}`:"").join("&fq="),l=await y(`${t}/api/catalog_system/pub/products/search?fq=${i}`,{...r}),u=c=>Object.keys(c).map(d=>({id:d,name:c[d]}));return l.map((c,d)=>{var O;const{installments:h,price:g,listPrice:m,sizes:R,allSizesAvailable:E}=b.getSkuInfos({items:c.items,NAME_SPLIT_SYMBOL:o}),T=E?!0:R.some(f=>f.available),S=c.items[0].sellers[0].commertialOffer;return{node:{sku:c.items[0].itemId,gtin:c.productReference,name:c.productName,description:c.description,releaseDate:c.releaseDate,slug:c.linkText,categories:c.categories,categoriesIds:c.categoriesIds,id:c.items[0].itemId,brand:{name:c.brand,brandName:c.brand},seo:{description:c.description,title:c.productName,canonical:`/${c.linkText}/p`},cluster:{generals:u(c.productClusters),highlights:u(c.clusterHighlights)},availability:{status:T},image:c.items[0].images.map(({imageLabel:f,imageUrl:C})=>({alternateName:f,url:C,keywords:f})),offers:{lowPrice:g,highPrice:m,offers:[{availability:T,listPrice:m,price:g,priceValidUntil:S.PriceValidUntil,priceCurrency:"BRL",installments:S.Installments,lowPrice:g,quantity:S.AvailableQuantity,seller:{identifier:c.items[0].sellers[0].sellerId}}]},additionalProperty:(O=c==null?void 0:c.skuSpecifications)==null?void 0:O.map(f=>({name:c==null?void 0:c.skuSpecifications[0].field.name,value:f,valueReference:"SPECIFICATION"})),isVariantOf:{productGroupID:c.productId,hasVariant:c.items.map(f=>({additionalProperty:f==null?void 0:f.variations.map(()=>{var C,v,$;return{name:(C=f==null?void 0:f.variations)==null?void 0:C[0],value:($=f==null?void 0:f[(v=f==null?void 0:f.variations)==null?void 0:v[0]])==null?void 0:$[0],valueReference:"SPECIFICATION"}}),name:f.name,offers:{offers:f.sellers.map(({commertialOffer:C,sellerId:v})=>({availability:"https://schema.org/InStock",listPrice:C.ListPrice,price:C.Price,quantity:C.AvailableQuantity,seller:{identifier:v}}))},sku:f.itemId,slug:`-${f.itemId}`}))},installments:h},cursor:d.toString()}})}const xt=Object.freeze(Object.defineProperty({__proto__:null,getWishlistProducts:Ut},Symbol.toStringTag,{value:"Module"})),Vt=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),G=(e,t=" ")=>!e||typeof e=="string"&&e.length===0?e:(Array.isArray(e)?e:e.split("-")).map(Vt).join(t),zt=({canonical:e,seo:t,slug:n})=>{const r=Array.isArray(n)?n.join(", "):n;return{id:0,Title:`${Array.isArray(n)?n.map(o=>G(o)).join(","):G(n)} - ${t.title}`,MetaTagDescription:t.description,name:r,hasChildren:!1,url:e,children:[]}},Qt=({canonical:e,category:t,previousImages:n,seo:r})=>({category:String(t==null?void 0:t.id),title:(t==null?void 0:t.Title)??r.title,description:(t==null?void 0:t.MetaTagDescription)??r.description,alternates:{canonical:e},openGraph:{type:"website",title:(t==null?void 0:t.Title)??r.title,description:(t==null?void 0:t.MetaTagDescription)??r.description,images:Array.isArray(n)?[...n]:[]}}),Kt=({items:e,parent:t,apiUrl:n,find:r})=>{const a=e.find(i=>i.url.replace(n,"")===decodeURIComponent(t.toLowerCase()));return(a==null?void 0:a.children.find(i=>i.name.toLowerCase()===decodeURIComponent(String(r))))??a},Jt=e=>{e instanceof Error?(console.error(`[ERROR CATEGORY INFO]: ${e.message}`),console.error(e.stack)):console.error("[ERROR CATEGORY INFO]: Unknown error",e)},Yt=new Set(["brand","category","department","subcategory","collection","cluster"]),Wt=e=>typeof(e==null?void 0:e.pageType)=="string"&&Yt.has(e==null?void 0:e.pageType.toLowerCase()),Xt=e=>({collection:e.Coleção,categoryId:e.categoryId,current_collection:e["Coleção Atual"],items:e.items}),Zt=(e,t)=>e.reduce((n,r)=>{if(r.items.filter(i=>i.sellers.find(l=>l.commertialOffer.IsAvailable)).length===0||(n==null?void 0:n.find(i=>(i==null?void 0:i.productId)===(r==null?void 0:r.productId)))!==void 0)return n;const o=r.items[0].images.find(i=>t.includes(i.imageLabel));return n.push({slug:`/${r.linkText}/p`,productId:r==null?void 0:r.productId,textureImage:(o==null?void 0:o.imageUrl)??"",textureAlt:(o==null?void 0:o.imageText)??""}),n},[]),er=Object.freeze(Object.defineProperty({__proto__:null,createEmptySeoCategory:zt,createSeoCategory:Qt,findCategory:Kt,formattedSimilars:Zt,isCollectionPageType:Wt,notFindCategoryError:Jt,responseAdapter:Xt},Symbol.toStringTag,{value:"Module"})),tr={parseSearchState:b.parseSearchState,convertSearchParams:b.convertSearchParams,filterNonRootFacets:b.filterNonRootFacets,filterNonCategorySelected:b.filterNonCategorySelected},rr={checkout:st,catalog:dt,cms:b.cms,search:wt,masterdata:Mt,wishlist:{...xt}},nr={catalog:er,search:tr,product:b.productHelpers};exports.serverAPIs=rr;exports.serverCMS=ye;exports.serverHelpers=nr;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react/jsx-runtime"),b=require("./index-BR5lPUsH.js"),A=require("@soma-vertical-web/core-components"),re=require("yup"),ne=require("sanitize-html");function se(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=se(re),oe=({slug:e,data:t,SectionZone:n,COMMON_PAGE_COLUMN_GAP:r,identifyWhoIsFirst:a})=>{const o=t==null?void 0:t.find(d=>{var h,g,m,R;return((g=(h=d.config)==null?void 0:h.responsive)==null?void 0:g.deviceType)==="desktop"&&((R=(m=d.config)==null?void 0:m.seo)==null?void 0:R.slug)===e}),i=o==null?void 0:o.config.responsive.gapCustom,l=o==null?void 0:o.config.responsive.gapSections,u=t==null?void 0:t.find(d=>{var h,g,m,R;return((g=(h=d.config)==null?void 0:h.responsive)==null?void 0:g.deviceType)==="mobile"&&((R=(m=d.config)==null?void 0:m.seo)==null?void 0:R.slug)===e}),p=u==null?void 0:u.config.responsive.gapCustom,c=u==null?void 0:u.config.responsive.gapSections;return I.jsxs(I.Fragment,{children:[I.jsx(A.Utils.Column,{gap:i&&l?l:r,className:A.helpers.classNameConcat(b.responsive["responsive-desktop-flex"],"utils-column-modifier"),children:I.jsx(n,{data:(o==null?void 0:o.sections)??[],identifyWhoIsFirst:a})}),I.jsx(A.Utils.Column,{gap:p&&c?c:r,className:A.helpers.classNameConcat(b.responsive["responsive-mobile-flex"],"utils-column-modifier"),children:I.jsx(n,{data:(u==null?void 0:u.sections)??[],identifyWhoIsFirst:a})})]})},ae=async({slug:e,SectionZone:t,COMMON_PAGE_COLUMN_GAP:n,identifyWhoIsFirst:r=!1,...a})=>{const{data:o}=await b.getContentType({contentType:"common_page",...a});return I.jsx(oe,{data:o,slug:e,SectionZone:t,COMMON_PAGE_COLUMN_GAP:n,identifyWhoIsFirst:r})},ie=async({PAYMENT_FLAGS_DICTIONARY:e,PAYMENT_FLAGS:t,LEGAL_INFORMATION_TEXT:n,SectionZone:r,ICONS:a,Footer:o,FooterSupport:i,...l})=>{var d,h,g,m,R,E,T,S,O,f,C;const{data:u}=await b.getContentType({contentType:"footer",...l}),p=Array.isArray(u)&&((d=u[0])==null?void 0:d.type)==="footer"?u[0]:null,c={...(h=p==null?void 0:p.paymentInfo)==null?void 0:h.paymentInfo,acceptedFlags:Array.isArray((g=p==null?void 0:p.paymentInfo)==null?void 0:g.paymentInfo.acceptedFlags)?(m=p==null?void 0:p.paymentInfo)==null?void 0:m.paymentInfo.acceptedFlags.filter(v=>!!e[v]).map(v=>e[v]):[]};return p?I.jsx(o,{data:{...p},socialInfo:(R=p.socialMedia)==null?void 0:R.socialMedia,socialMedias:(T=(E=p.socialMedia)==null?void 0:E.socialMedia)==null?void 0:T.medias,payments:c,adornment:{...(O=(S=p.supportInfo)==null?void 0:S.supportInfo)!=null&&O.content?{bottom:I.jsx(i,{content:(C=(f=p.supportInfo)==null?void 0:f.supportInfo)==null?void 0:C.content,CONSTANTS:{ICONS:a,PAYMENT_FLAGS:t,PAYMENT_FLAGS_DICTIONARY:e}})}:{},...p.sections.length?{top:I.jsx(r,{data:p.sections})}:{}},LEGAL_INFORMATION_TEXT:n,ICONS:a}):I.jsx(I.Fragment,{})},ce=async({children:e,ClientHeaderProvider:t,...n})=>{var o,i,l,u;const{data:r}=await b.getContentType({contentType:"header",...n}),a=(o=r[0])==null?void 0:o.sections.map(p=>p.data);return I.jsx(t,{headerData:{...(i=r[0])==null?void 0:i.layerConfig.config,subMenus:a??[],categories:((l=r[0])==null?void 0:l.categories.categories.items)??[],navigationLinks:((u=r[0])==null?void 0:u.navigationLinks.navigationLinks.items)??[]},children:e})},le=async({children:e,productId:t,COMMON_PAGE_COLUMN_GAP:n,SectionZone:r,PDPContentProvider:a,...o})=>{const{data:i}=await b.getContentType({contentType:"product_page",...o});return I.jsx(a,{data:i[0],productId:t,COMMON_PAGE_COLUMN_GAP:n,SectionZone:r,children:e})},ue={"column-modifier":"_column-modifier_1tqap_1"},de=async({children:e,slug:t,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:r,PLPContentProvider:a,...o})=>{const{data:i}=await b.getContentType({contentType:"categories_page",...o}),l=i.find(d=>{var h,g,m;return((h=d.config)==null?void 0:h.seo.slug)===t&&((m=(g=d.config)==null?void 0:g.responsive)==null?void 0:m.deviceType)==="desktop"}),u=i.find(d=>{var h,g,m;return((h=d.config)==null?void 0:h.seo.slug)===t&&((m=(g=d.config)==null?void 0:g.responsive)==null?void 0:m.deviceType)==="mobile"}),p=i.find(d=>{var h,g,m;return((h=d.config)==null?void 0:h.seo.slug)==="default"&&((m=(g=d.config)==null?void 0:g.responsive)==null?void 0:m.deviceType)==="desktop"}),c=i.find(d=>{var h,g,m;return((h=d.config)==null?void 0:h.seo.slug)==="default"&&((m=(g=d.config)==null?void 0:g.responsive)==null?void 0:m.deviceType)==="mobile"});return I.jsxs(I.Fragment,{children:[I.jsx(A.Utils.Column,{className:A.helpers.classNameConcat(b.responsive["responsive-desktop-flex"],ue["column-modifier"]),style:{minHeight:"100vh"},children:I.jsx(a,{data:l??p,device:"desktop",SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:r,children:e})}),I.jsx(A.Utils.Column,{className:b.responsive["responsive-mobile-flex"],children:I.jsx(a,{data:u??c,device:"mobile",SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:r,children:e})})]})},pe=async({slug:e,...t})=>{var i,l,u;const{data:n}=await b.getContentType({contentType:"redirect_to_search",...t}),r=((u=(l=(i=n[0])==null?void 0:i.redirectToSearch)==null?void 0:l.redirectToSearch)==null?void 0:u.paths)??[];if(!!!r.length)return{slug:e,query:null,redirect:!1};const o=r.find(p=>{var c,d;return((c=p.path)==null?void 0:c.replace(/\//g,"-").toLowerCase())===e.replace(/\//g,"-").toLowerCase()||((d=p.path)==null?void 0:d.replace(/\//g,"-").toLowerCase())===`/${e}`.replace(/\//g,"-").toLowerCase()});return o?{slug:e,query:o==null?void 0:o.searchQuery,redirect:!0,collectionId:o==null?void 0:o.collectionId,filters:o==null?void 0:o.filters,sort:o==null?void 0:o.sort}:{slug:e,query:null,redirect:!1,collectionId:null,filters:null,sort:null}},me=async({slug:e,...t})=>{var i,l,u;const{data:n}=await b.getContentType({contentType:"redirect_to_search",...t}),r=((u=(l=(i=n[0])==null?void 0:i.redirectToSearch)==null?void 0:l.redirectToSearch)==null?void 0:u.paths)??[];if(!!!r.length)return null;const o=r.find(p=>{var c,d;return((c=p.path)==null?void 0:c.replace(/\//g,"-").toLowerCase())===e.replace(/\//g,"-").toLowerCase()||((d=p.path)==null?void 0:d.replace(/\//g,"-").toLowerCase())===`/${e}`.replace(/\//g,"-").toLowerCase()});return o?{slug:e,title:o.pageTitle,description:o.pageDescription}:null},ge=async({children:e,SectionZone:t,className:n,...r})=>{const{data:a}=await b.getContentType({contentType:"search_page",...r});return Array.isArray(a)&&a.length>0?I.jsx(b.SearchPageScreening,{data:a,SectionZone:t,className:n,children:e}):I.jsx(I.Fragment,{children:e})},fe=async({ClientTipbarContent:e,...t})=>{const{data:n}=await b.getContentType({contentType:"tipbar",...t});return I.jsx(e,{data:n})},he={CommonPageContent:ae,HeaderContent:ce,TipbarContent:fe,FooterContent:ie,PLPContent:de,PDPContent:le,getRedirectData:pe,getPLPSynteticMetaData:me,SearchPageContent:ge},ye={Components:he},y=async(e,t={})=>{const{method:n="GET",body:r,headers:a={},priority:o="auto",cache:i="default"}=t;return fetch(e,{method:n,headers:{...a,Accept:"application/json","Content-Type":"application/json"},priority:o,cache:i,...r?{body:JSON.stringify(r)}:{}}).then(l=>l.json()).catch(l=>{console.error("[ERROR FETCH VTEX]",l)})},N=new Map;async function Ie(e,t={}){var n;try{const{abort:r=!1}=t,a=new AbortController;r&&(N.has(e)&&((n=N.get(e))==null||n.abort(),N.delete(e)),N.set(e,a));const o=y(e,{...t,...r?{signal:a.signal}:{}});return r&&N.delete(e),o}catch(r){if(r.name==="AbortError"){console.log(`[REQUEST CANCELLED]: ${e}`);return}throw console.error(`[ERROR API]: ${r.message}`),r}}const be=s.object({country:s.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:s.string().nullable()});async function Ce({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await be.validate(t);const{country:r,postalCode:a}=t;return await y(`${e}/api/checkout/pub/postal-code/${r}/${a}`,{method:"POST",body:t,...n})}const Re=s.object({orderFormId:s.string().nullable(),sellerCode:s.string().nullable(),sellerName:s.string().nullable()});async function U({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Re.validate(t);const{orderFormId:r,sellerCode:a,sellerName:o}=t,i=a?`${a.trim()} - ${o}`:null;return y(`${e}/api/checkout/pub/orderForm/${r}/attachments/openTextField`,{method:"POST",body:{value:i},...n})}const ve=s.object({orderFormId:s.string().nullable(),sellerCode:s.string().nullable(),marketingData:s.object()});async function x({apiUrl:e,body:t,extraData:n={},fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await ve.validate(t);const{orderFormId:a,sellerCode:o,marketingData:i}=t,l=o?{utmCampaign:o?o.toUpperCase():"",utmiCampaign:o?`${n.VENDOR_CODE}`:"semcodigo"}:{};return y(`${e}/api/checkout/pub/orderForm/${a}/attachments/marketingData`,{method:"POST",body:{...i,...l},...r})}const Te=s.object({orderFormId:s.string().nullable(),sellerCode:s.string().nullable(),sellerName:s.string().nullable()});async function Se({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Te.validate(t);const r=await U({apiUrl:e,body:t,fetchOptions:n});return x({apiUrl:e,body:{...t,marketingData:r==null?void 0:r.marketingData},fetchOptions:n})}const Ee=s.object({orderFormId:s.string().nullable(),coupon:s.string().nullable()});async function Oe({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ee.validate(t);const{coupon:r="",orderFormId:a}=t;return y(`${e}/api/checkout/pub/orderForm/${a}/coupons`,{method:"POST",body:{text:r},...n})}const Fe=s.object({appId:s.string().required("App ID is required"),orderFormId:s.string().nullable(),key:s.array().of(s.string())});async function qe({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Fe.validate(t);const{appId:r="faststore",orderFormId:a,key:o}=t;return y(`${e}/api/checkout/pub/orderForm/${a}/customData/${r}/${o}`,{method:"PUT",...n})}const $e=s.object().shape({name:s.string().required("Attachment name is required"),content:s.object().nullable()});var L;const Pe=s.object().shape({attachments:(L=s.array().of($e))==null?void 0:L.nullable(),id:s.string().required("ID of SKU is required"),index:s.number().integer().nullable(),quantity:s.number().integer().nullable(),seller:s.string().required("Seller is required"),price:s.number().integer()}),je=s.object({orderFormId:s.string().required("OrderFormId is required"),orderItems:s.array().of(Pe)});async function Ae({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await je.validate(t);const{orderFormId:r,orderItems:a}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/items`,{method:"POST",body:{orderItems:a},...n})}const Ne=s.object({orderFormId:s.string().nullable()});async function we({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ne.validate(t);const{orderFormId:r}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/items/removeAll`,{method:"POST",...n})}const ke=s.object().shape({name:s.string().required("Attachment name is required"),content:s.object().nullable()});var M;const De=s.object().shape({attachments:(M=s.array().of(ke))==null?void 0:M.nullable(),id:s.string().required("ID of SKU is required"),index:s.number().integer().nullable(),quantity:s.number().integer().nullable(),seller:s.string().required("Seller is required"),price:s.number().integer()}),_e=s.object({orderFormId:s.string().nullable(),orderItems:s.array().of(De)});async function He({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await _e.validate(t);const{orderFormId:r,orderItems:a}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/items/update`,{method:"POST",body:{orderItems:a},...n})}const Be=s.object({orderFormId:s.string().nullable()});async function Ge({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Be.validate(t);const{orderFormId:r}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/messages/clear`,{method:"POST",...n})}const Le=s.object({id:s.string().nullable(),itemIndex:s.number().nullable(),orderFormId:s.string().nullable(),remove:s.boolean().nullable()});async function Me({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Le.validate(t);const{itemIndex:r,orderFormId:a,id:o,remove:i}=t,l=i?`/${o}/remove`:"",u=`${e}/api/checkout/pub/orderForm/${a}/items/${r}/offerings${l}`;return y(u,{method:"POST",body:{id:o},...n})}const Ue=s.object({orderFormId:s.string().nullable()});async function xe({apiUrl:e,body:t,fetchOptions:n,extraData:r}){var i;if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ue.validate(t);const a=new URLSearchParams({refreshOutdatedData:"true"}),o=t.orderFormId&&((i=r.orderFormPurchaseId)==null?void 0:i.value)!==t.orderFormId?`${e}/api/checkout/pub/orderForm/${t.orderFormId}?${String(a)}`:`${e}/api/checkout/pub/orderForm`;return y(o,{method:"GET",...n})}const Ve=s.object({orderFormId:s.string().nullable(),email:s.string().email().required(),firstName:s.string().required(),lastName:s.string().required(),documentType:s.string().required(),document:s.string().required(),phone:s.string().matches(/^\+\d{1,3}\d{10,11}$/)});async function ze({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ve.validate(t);const{orderFormId:r,...a}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/attachments/clientProfileData`,{method:"POST",body:{...a},...n})}const Qe=s.object({sellerCode:s.string().nullable()});async function Ke({apiUrl:e,body:t,extraData:n,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Qe.validate(t);const{sellerCode:a=""}=t;return y(`${e}/api/dataentities/${n.ENTITIES}/search?_fields=${n.FIELDS}&${n.FILTER}=${a}`,{method:"GET",headers:{Accept:"application/vnd.vtex.ds.v10+json"},...r})}const Je=s.object().shape({country:s.string().length(3,"Country code must be 3 characters long").required("Country is required"),orderFormId:s.string().nullable(),postalCode:s.string().nullable()});async function Ye({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Je.validate(t);const{country:r,orderFormId:a,postalCode:o}=t,i=o?{address:{addressType:"residential",postalCode:o,country:r}}:{logisticsInfo:[],clearAddressIfPostalCodeNotFound:!0};return y(`${e}/api/checkout/pub/orderForm/${a}/attachments/shippingData`,{method:"POST",body:i,...n})}const We=s.object().shape({orderFormId:s.string().nullable(),options:s.array().of(s.object().shape({itemIndex:s.number(),selectedDeliveryChannel:s.string(),selectedSla:s.string()})),selectedAddresses:s.array().of(s.object().shape({addressId:s.string().required(),addressType:s.string().required(),city:s.string().nullable(),complement:s.string().nullable(),country:s.string().required().length(3),geoCoordinates:s.array().of(s.number()).required().min(0),isDisposable:s.boolean().required(),neighborhood:s.string().nullable(),number:s.string().nullable(),postalCode:s.string().required(),receiverName:s.string().nullable(),reference:s.string().nullable(),state:s.string().nullable(),street:s.string().nullable()}))});async function Xe({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await We.validate(t);const{orderFormId:r,options:a,selectedAddresses:o}=t;return y(`${e}/api/checkout/pub/orderForm/${r}/attachments/shippingData`,{method:"POST",body:{selectedAddresses:o,clearAddressIfPostalCodeNotFound:!1,logisticsInfo:a},...n})}const Ze=s.object({country:s.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:s.string().nullable(),geoCoordinates:s.object().shape({longitude:s.number().required(),latitude:s.number().required()})});async function et({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ze.validate(t);const{country:r="",geoCoordinates:a,postalCode:o=""}=t,i=new URLSearchParams({country:String(r)});return o?i.append("postalCode",o):i.append("geoCoordinates",`${a==null?void 0:a.longitude};${a==null?void 0:a.latitude}`),await y(`${e}/api/checkout/pub/regions/?${i.toString()}`,{method:"GET",...n})}const tt=s.object({id:s.string().required("ID of SKU is required"),quantity:s.number().integer().required("Quantity of item is required"),seller:s.string()}),rt=s.object({items:s.array().of(tt),country:s.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:s.string().nullable(),geoCoordinates:s.array().nullable().of(s.number()).length(2)});async function nt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}return await rt.validate(t),y(`${e}/api/checkout/pub/orderForms/simulation`,{method:"POST",body:t,...n})}const st=Object.freeze(Object.defineProperty({__proto__:null,getMasterDataSellerCode:Ke,getOrderForm:xe,postOrderFormAddCoupon:Oe,postOrderFormAttachClientProfileData:ze,postOrderFormAttachOrderFormData:Se,postOrderFormAttachShippingData:Ye,postOrderFormAttachmentsMarketingData:x,postOrderFormAttachmentsOpenTextField:U,postOrderFormClearMessages:Ge,postOrderFormFreightSimulation:nt,postOrderFormItems:Ae,postOrderFormRegion:et,postOrderFormRemoveAllItems:we,postOrderFormUpdateItems:He,postOrderFormUpdateShippingData:Xe,postOrderformAddress:Ce,putOrderFormCustomData:qe,updateOrderFormOffering:Me},Symbol.toStringTag,{value:"Module"})),ot=s.object({skuId:s.string()});async function at({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await ot.validate(t);const{skuId:r}=t;return y(`${e}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${r}`,{...n})}const it=s.object({ids:s.array().of(s.string().required("ID are required")).required("IDs are required")});async function ct({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await it.validate(t);const{ids:r}=t;return y(`${e}/api/catalog_system/pub/products/search?fq=${r.map(a=>`productId:${a}`).join("&fq=")}`,{...n})}const lt=s.object({productId:s.number().required("Product ID is required")});async function ut({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await lt.validate(t);const{productId:r}=t;return y(`${e}/api/catalog_system/pub/products/crossselling/similars/${r.toString()}`,{...n})}const dt=Object.freeze(Object.defineProperty({__proto__:null,getCatalogKitProducts:at,getCatalogProducts:ct,getCatalogSimilars:ut},Symbol.toStringTag,{value:"Module"})),pt=s.object({query:s.string()});async function mt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await pt.validate(t);const{query:r=""}=t,a=new URLSearchParams({query:r});return y(`${e}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${a.toString()}`,{...n})}const gt=(e,t)=>ne(e,t),ft=e=>({...e,description:e.description?gt(e.description):e.description}),ht=({offer:e,seller:t,product:n})=>({...e,product:n,seller:t}),V=(e,t)=>({...e,isVariantOf:ft(t)}),yt=e=>e?"https://schema.org/InStock":"https://schema.org/OutOfStock",w=e=>e.AvailableQuantity>0,H=e=>e.spotPrice??0,It=e=>e.Price??0,z=(e,t)=>w(e)&&!w(t)?-1:!w(e)&&w(t)?1:H(e)-H(t),bt=(e,t)=>{let n=0;for(let r=1;r<e.length;r++)t(e[n],e[r])>0&&(n=r);return e[n]},Q=e=>{const t=e.flatMap(r=>r.sellers.map(a=>({offer:a.commertialOffer,sku:r}))),n=bt(t,({offer:r},{offer:a})=>z(r,a));return n?n.sku:e[0]},K=e=>e.map(({imageUrl:t,imageText:n,imageLabel:r})=>({alternateName:n??"",url:t.replace("vteximg.com.br","vtexassets.com"),keywords:r})),k={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},Ct=e=>({name:e.name,value:e.content,valueReference:k.attachment}),Rt=e=>({propertyID:e.id,name:e.name,value:e.value,valueReference:{valueReference:k.attribute,visible:e.visible}}),D=(e,t,n)=>{const r=e.flatMap(({name:i,values:l})=>l?l.map(u=>({name:i,value:u,valueReference:k.specification})):{name:i,value:"",valueReference:k.specification}),a=Array.isArray(n)?n.map(Ct):[],o=t?t.map(Rt):[];return[...r,...a,...o]},B="ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a",vt="AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa",Tt=e=>{let t=e.slice(0);for(let n=0;n<B.length;n++)t=t.replace(new RegExp(B.charAt(n),"g"),vt.charAt(n));return t},St=e=>e.replace(/[·/_,:]/,"-"),J=e=>{const n=e.replace(/,/g,"").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g,"-");return St(Tt(n)).toLowerCase()},Y=e=>`/${e}/p`,W=e=>{const t=Math.max(...e.map(r=>r.NumberOfInstallments)),n=e.find(r=>r.NumberOfInstallments===t);return{count:(n==null?void 0:n.NumberOfInstallments)??0,value:(n==null?void 0:n.Value)??0}},X=(e,t)=>{const n={price:0,listPrice:0,sellerDefault:!1},a=e.map(o=>ht({offer:o.commertialOffer,seller:o,product:t})).sort(z).map(o=>(o.seller.sellerId==="1"&&o.AvailableQuantity>0&&(n.price=o.Price,n.listPrice=o.ListPrice,n.sellerDefault=!0),{availability:o.AvailableQuantity>0,listPrice:o.ListPrice,price:It(o),priceValidUntil:o.PriceValidUntil,priceCurrency:"BRL",installments:o.Installments,lowPrice:o.spotPrice,quantity:o.AvailableQuantity,seller:{identifier:o.seller.sellerId}}));return{lowPrice:n.sellerDefault?n.price:a[0].price,highPrice:n.sellerDefault?n.listPrice:a[0].listPrice,offers:a}},Z=e=>{const{attributes:t,itemId:n,name:r,sellers:a,variations:o}=e;return{additionalProperty:D(o,t,[]),name:r,offers:{offers:a.map(({sellerId:i,commertialOffer:l})=>({availability:yt(l.AvailableQuantity>0),listPrice:l.ListPrice,price:l.Price,quantity:l.AvailableQuantity,seller:{identifier:i}}))},sku:n}},Et=e=>{var F;const{attributes:t,referenceId:n,isVariantOf:r,images:a,itemId:o,name:i,sellers:l,videos:u,variations:p}=e,{brand:c,categories:d,categoriesIds:h,description:g,linkText:m,productClusters:R,clusterHighlights:E,productName:T,properties:S,productId:O,productReference:f}=r,C=d.slice().reverse(),v=X(l,e.isVariantOf),$=W(v.offers[0].installments);return{sku:o,gtin:((F=n==null?void 0:n[0])==null?void 0:F.Value)??f??"",name:T??i,description:g,releaseDate:r.releaseDate??"",slug:m,video:u[0],categories:d,categoriesIds:h,id:O,brand:{name:c,brandName:c},seo:{description:g,title:T,canonical:Y(m)},cluster:{generals:R,highlights:E},properties:S,availability:{status:v.offers[0].availability},breadcrumbList:{itemListElement:[...C.map((P,j)=>{const q=P.split("/"),_=q[q.length-2],te=q.map(J).join("/");return{name:_,item:te,position:j+1}}),{name:r.productName,item:m,position:d.length+1}],numberOfItems:d.length},image:K(a),offers:v,additionalProperty:D(p,t,[]),isVariantOf:{productGroupID:r.productId,hasVariant:r.items.map(P=>Z(P))},installments:$}},Ot=e=>{var $;const{attributes:t,referenceId:n,isVariantOf:r,images:a,itemId:o,name:i,sellers:l,Videos:u,variations:p}=e,{brand:c,categories:d,categoriesIds:h,description:g,linkText:m,productClusters:R,productName:E,Coleção:T,"ID Coleção":S,productId:O}=r,f=d.slice().reverse(),C=X(l,e.isVariantOf),v=W(C.offers[0].installments);return{sku:o,gtin:(($=n[0])==null?void 0:$.Value)??"",name:E??i,description:g,releaseDate:r.releaseDate??"",slug:m,video:u[0],categories:d,categoriesIds:h,collection:T,collectionId:S,id:O,brand:{name:c,brandName:c},seo:{description:g,title:E,canonical:Y(m)},cluster:{generals:R,highlights:[]},availability:{status:C.offers[0].availability},breadcrumbList:{itemListElement:[...f.map((F,P)=>{const j=F.split("/"),q=j[j.length-2],_=j.map(J).join("/");return{name:q,item:_,position:P+1}}),{name:r.productName,item:m,position:d.length+1}],numberOfItems:d.length},image:K(a),offers:C,additionalProperty:D(p,t,[]),isVariantOf:{productGroupID:r.productId,hasVariant:r.items.map(F=>{const{variations:P}=F,j=P.map(q=>({name:q,values:F[q]}));return{...Z(F),additionalProperty:D(j,t,[])}})},installments:v}},Ft=s.array().of(s.object({key:s.string().required(),value:s.string().required()})).required("Facets are required");async function qt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ft.validate(t);const r=new URLSearchParams({}),a=t.map(({key:i,value:l})=>`${i}/${l}`).join("/");b.addSearchParamsFacets(t,r);const o=`${e}/api/catalog_system/pub/products/crossselling/${a}`;return y(o,{cache:"no-store",...n}).then(i=>i.map(u=>{const p=Q(u.items);return p&&V(p,u)}).filter(u=>!!u).map(u=>({node:Ot(u)})))}const ee=({apiUrl:e,body:t,fetchOptions:n,extraData:r})=>{if(!t){console.error("[ERROR FETCHING] Body is required");return}const{query:a="",page:o=1,count:i,sort:l="",facets:u=[],type:p,hideUnavailableItems:c=!0,locale:d=""}=t,h=new URLSearchParams({page:o.toString(),count:(i==null?void 0:i.toString())??(r==null?void 0:r.ITEMS_PER_PAGE)??24,query:a,sort:l,locale:d});c!==void 0&&h.append("hideUnavailableItems",c.toString());const g=u.map(m=>`${m.key}/${m.value}`).join("/")??"";return Ie(`${e}/api/io/_v/api/intelligent-search/${p}/${g}?${h.toString()}`,{headers:{Accept:"application/json","content-type":"application/json"},...n})};async function $t({body:e,extraData:t,...n}){if(!e){console.error("[ERROR FETCHING] Body is required");return}const r=await ee({body:{...e,type:"product_search"},extraData:t,...n}),a=(r==null?void 0:r.products.map(l=>{const u=Q(l.items);return u&&V(u,l)}).filter(l=>!!l))??[],{pagination:o,recordsFiltered:i}=r;return{data:{pagination:{nextPage:o.after.length>0,previousPage:o.before.length>0,startCursor:"0",endCursor:i.toString(),count:i,total:o.count},products:a.map((l,u)=>({node:Et(l),cursor:u.toString()}))}}}async function Pt({body:e,extraData:t,...n}){if(!e){console.error("[ERROR FETCHING] Body is required");return}const r=await ee({body:{...e,type:"facets"},extraData:t,...n});return!r||!r.facets?(console.error("[ERROR FETCHING] No facets found"),{data:{facets:[]}}):{data:{...r,facets:b.formattedFacets(r,e==null?void 0:e.selectedFacets,(e==null?void 0:e.query)??"")}}}const jt=s.object({query:s.string().optional(),locale:s.string().optional()});async function At({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await jt.validate(t);const{query:r="",locale:a="default_locale"}=t,o=new URLSearchParams({query:r,locale:a});return y(`${e}/api/io/_v/api/intelligent-search/search_suggestions?${o.toString()}`,{...n})}async function Nt({apiUrl:e}){return y(`${e}/api/io/_v/api/intelligent-search/top_searches`)}const wt=Object.freeze(Object.defineProperty({__proto__:null,getSearchAutoCompleteSuggestions:mt,getSearchCrossellingProducts:qt,getSearchFacets:Pt,getSearchProducts:$t,getSearchSuggestedTerms:At,getSearchTopSearchs:Nt},Symbol.toStringTag,{value:"Module"})),kt=s.object({masterDataEntity:s.string().nonNullable(),payload:s.object().shape({}).nullable()});async function Dt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await kt.validate(t);const{masterDataEntity:r,payload:a}=t,o=`${e}/api/dataentities/${r}/documents`;return y(o,{method:"POST",body:{payload:a},...n})}const _t=s.object().shape({_where:s.string().optional(),_fields:s.string().optional(),_sort:s.string().optional(),_from:s.number().integer().min(0).optional(),_to:s.number().integer().min(0).optional(),_keyword:s.string().optional()}),Ht=s.object({masterDataEntity:s.string().required(),searchFields:_t,headers:s.object().shape({"REST-Range":s.string().notRequired()})});async function Bt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}const r=new URLSearchParams;await Ht.validate(t);const{masterDataEntity:a,searchFields:o,headers:i}=t;o&&Object.entries(o).forEach(([u,p])=>{r.append(u,String(p))}),"_fields"in o||r==null||r.append("_fields","_all");const l=`${e}/api/dataentities/${a}/search?${r.toString()}`;return y(l,{headers:{"REST-Range":i["REST-Range"]??"resources=0-20"},method:"GET",...n})}const Gt=s.object({dataEntityName:s.string().required(),id:s.string().required(),fieldsToBeUpdated:s.object().shape({})});async function Lt({apiUrl:e,body:t,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Gt.validate(t);const{dataEntityName:r,id:a,fieldsToBeUpdated:o}=t,i=`${e}/api/dataentities/${r}/documents/${a}`;return y(i,{body:{fieldsToBeUpdated:o},method:"PATCH",...n})}const Mt=Object.freeze(Object.defineProperty({__proto__:null,getSearchMasterdata:Bt,patchUpdateMasterdata:Lt,postMasterdata:Dt},Symbol.toStringTag,{value:"Module"}));async function Ut({body:e,apiUrl:t,extraData:n,fetchOptions:r}){const{productIds:a}=e;if(!a)return console.error("[ERROR FETCHING] productIds is required"),[];const{NAME_SPLIT_SYMBOL:o}=n;if(!o)return console.error("[ERROR FETCHING] NAME_SPLIT_SYMBOL is required"),[];const i=a.map(c=>typeof c=="string"||typeof c=="number"?`productId:${c}`:"").join("&fq="),l=await y(`${t}/api/catalog_system/pub/products/search?fq=${i}`,{...r}),u=c=>Object.keys(c).map(d=>({id:d,name:c[d]}));return l.map((c,d)=>{var O;const{installments:h,price:g,listPrice:m,sizes:R,allSizesAvailable:E}=b.getSkuInfos({items:c.items,NAME_SPLIT_SYMBOL:o}),T=E?!0:R.some(f=>f.available),S=c.items[0].sellers[0].commertialOffer;return{node:{sku:c.items[0].itemId,gtin:c.productReference,name:c.productName,description:c.description,releaseDate:c.releaseDate,slug:c.linkText,categories:c.categories,categoriesIds:c.categoriesIds,id:c.items[0].itemId,brand:{name:c.brand,brandName:c.brand},seo:{description:c.description,title:c.productName,canonical:`/${c.linkText}/p`},cluster:{generals:u(c.productClusters),highlights:u(c.clusterHighlights)},availability:{status:T},image:c.items[0].images.map(({imageLabel:f,imageUrl:C})=>({alternateName:f,url:C,keywords:f})),offers:{lowPrice:g,highPrice:m,offers:[{availability:T,listPrice:m,price:g,priceValidUntil:S.PriceValidUntil,priceCurrency:"BRL",installments:S.Installments,lowPrice:g,quantity:S.AvailableQuantity,seller:{identifier:c.items[0].sellers[0].sellerId}}]},additionalProperty:(O=c==null?void 0:c.skuSpecifications)==null?void 0:O.map(f=>({name:c==null?void 0:c.skuSpecifications[0].field.name,value:f,valueReference:"SPECIFICATION"})),isVariantOf:{productGroupID:c.productId,hasVariant:c.items.map(f=>({additionalProperty:f==null?void 0:f.variations.map(()=>{var C,v,$;return{name:(C=f==null?void 0:f.variations)==null?void 0:C[0],value:($=f==null?void 0:f[(v=f==null?void 0:f.variations)==null?void 0:v[0]])==null?void 0:$[0],valueReference:"SPECIFICATION"}}),name:f.name,offers:{offers:f.sellers.map(({commertialOffer:C,sellerId:v})=>({availability:"https://schema.org/InStock",listPrice:C.ListPrice,price:C.Price,quantity:C.AvailableQuantity,seller:{identifier:v}}))},sku:f.itemId,slug:`-${f.itemId}`}))},installments:h},cursor:d.toString()}})}const xt=Object.freeze(Object.defineProperty({__proto__:null,getWishlistProducts:Ut},Symbol.toStringTag,{value:"Module"})),Vt=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),G=(e,t=" ")=>!e||typeof e=="string"&&e.length===0?e:(Array.isArray(e)?e:e.split("-")).map(Vt).join(t),zt=({canonical:e,seo:t,slug:n})=>{const r=Array.isArray(n)?n.join(", "):n;return{id:0,Title:`${Array.isArray(n)?n.map(o=>G(o)).join(","):G(n)} - ${t.title}`,MetaTagDescription:t.description,name:r,hasChildren:!1,url:e,children:[]}},Qt=({canonical:e,category:t,previousImages:n,seo:r})=>({category:String(t==null?void 0:t.id),title:(t==null?void 0:t.Title)??r.title,description:(t==null?void 0:t.MetaTagDescription)??r.description,alternates:{canonical:e},openGraph:{type:"website",title:(t==null?void 0:t.Title)??r.title,description:(t==null?void 0:t.MetaTagDescription)??r.description,images:Array.isArray(n)?[...n]:[]}}),Kt=({items:e,parent:t,apiUrl:n,find:r})=>{const a=e.find(i=>i.url.replace(n,"")===decodeURIComponent(t.toLowerCase()));return(a==null?void 0:a.children.find(i=>i.name.toLowerCase()===decodeURIComponent(String(r))))??a},Jt=e=>{e instanceof Error?(console.error(`[ERROR CATEGORY INFO]: ${e.message}`),console.error(e.stack)):console.error("[ERROR CATEGORY INFO]: Unknown error",e)},Yt=new Set(["brand","category","department","subcategory","collection","cluster"]),Wt=e=>typeof(e==null?void 0:e.pageType)=="string"&&Yt.has(e==null?void 0:e.pageType.toLowerCase()),Xt=e=>({collection:e.Coleção,categoryId:e.categoryId,current_collection:e["Coleção Atual"],items:e.items}),Zt=(e,t)=>e.reduce((n,r)=>{if(r.items.filter(i=>i.sellers.find(l=>l.commertialOffer.IsAvailable)).length===0||(n==null?void 0:n.find(i=>(i==null?void 0:i.productId)===(r==null?void 0:r.productId)))!==void 0)return n;const o=r.items[0].images.find(i=>t.includes(i.imageLabel));return n.push({slug:`/${r.linkText}/p`,productId:r==null?void 0:r.productId,textureImage:(o==null?void 0:o.imageUrl)??"",textureAlt:(o==null?void 0:o.imageText)??""}),n},[]),er=Object.freeze(Object.defineProperty({__proto__:null,createEmptySeoCategory:zt,createSeoCategory:Qt,findCategory:Kt,formattedSimilars:Zt,isCollectionPageType:Wt,notFindCategoryError:Jt,responseAdapter:Xt},Symbol.toStringTag,{value:"Module"})),tr={parseSearchState:b.parseSearchState,convertSearchParams:b.convertSearchParams,filterNonRootFacets:b.filterNonRootFacets,filterNonCategorySelected:b.filterNonCategorySelected},rr={checkout:st,catalog:dt,cms:b.cms,search:wt,masterdata:Mt,wishlist:{...xt}},nr={catalog:er,search:tr,product:b.productHelpers};exports.serverAPIs=rr;exports.serverCMS=ye;exports.serverHelpers=nr;
|
package/index2.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as z, Fragment as H, jsx as I } from "react/jsx-runtime";
|
|
2
|
-
import { r as k,
|
|
2
|
+
import { r as k, o as F, S as oe, q as ie, t as ce, a as le, v as ue, w as de, c as pe, p as me, x as fe, f as ge } from "./index-C3QT-3iu.mjs";
|
|
3
3
|
import { Utils as j, helpers as G } from "@soma-vertical-web/core-components";
|
|
4
4
|
import * as a from "yup";
|
|
5
5
|
import he from "sanitize-html";
|
package/layout/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const layout: {
|
|
|
4
4
|
teamComponents: {
|
|
5
5
|
FreightCalculation: ({ className, sellerId, skuId, quantity, size, seller, local, CONSTANTS_PROPS, }: import('../types/layout/team-components/FreightCalculation').FreightCalculationProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Header: {
|
|
7
|
-
({ tipBar,
|
|
7
|
+
({ tipBar, minicartStyleModifiers }: import('../types/layout/team-components/Header').HeaderContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
displayName: string;
|
|
9
9
|
};
|
|
10
10
|
Link: ({ children, adornments, className, disableUnderline, href, mode, size, title, onClick, disablePadding, ...props }: import('./team-component/Link/interfaces').TeamLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -198,6 +198,58 @@ export declare const layout: {
|
|
|
198
198
|
};
|
|
199
199
|
template: {
|
|
200
200
|
pdp: typeof pdp;
|
|
201
|
+
minicart: {
|
|
202
|
+
Body: {
|
|
203
|
+
({ children, ICONS, MINICART_CONFIG, NAME_SPLIT_SYMBOL, PLP_NOT_RESULT, TEXTURE_IMAGE, TOGGLE_STYLE_MODIFIER }: import('../types/layout/templates/MiniCart').ModalBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
204
|
+
displayName: string;
|
|
205
|
+
};
|
|
206
|
+
Card: {
|
|
207
|
+
({ available, index, product, ICONS, MINICART_CONFIG, NAME_SPLIT_SYMBOL, TEXTURE_IMAGE, TOGGLE_STYLE_MODIFIER, }: import('../types/layout/templates/MiniCart').CardProps): import("react/jsx-runtime").JSX.Element;
|
|
208
|
+
displayName: string;
|
|
209
|
+
};
|
|
210
|
+
Cashback: {
|
|
211
|
+
({ type, ICONS, MESSAGE_CASHBACK }: import('../types/layout/templates/MiniCart').CashbackProps): import("react/jsx-runtime").JSX.Element | null;
|
|
212
|
+
displayName: string;
|
|
213
|
+
};
|
|
214
|
+
CouponSeller: {
|
|
215
|
+
({ type, ICONS, MINICART_CONFIG }: import('../types/layout/templates/MiniCart').CouponSellerProps): import("react/jsx-runtime").JSX.Element;
|
|
216
|
+
displayName: string;
|
|
217
|
+
};
|
|
218
|
+
Discount: {
|
|
219
|
+
({ children, className, ICONS, MINICART_CONFIG }: import('../types/layout/templates/MiniCart').DiscountProps): import("react/jsx-runtime").JSX.Element;
|
|
220
|
+
displayName: string;
|
|
221
|
+
};
|
|
222
|
+
Field: {
|
|
223
|
+
({ title, ICONS, MINICART_CONFIG, ...props }: import('../types/layout/templates/MiniCart').FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
224
|
+
displayName: string;
|
|
225
|
+
};
|
|
226
|
+
Feedback: {
|
|
227
|
+
({ ICONS, MINICART_CONFIG, PLP_NOT_RESULT }: import('../types/layout/templates/MiniCart').FeedbackProps): import("react/jsx-runtime").JSX.Element;
|
|
228
|
+
displayName: string;
|
|
229
|
+
};
|
|
230
|
+
Shipping: {
|
|
231
|
+
({ ICONS, MINICART_CONFIG }: import('../types/layout/templates/MiniCart').ShippingProps): import("react/jsx-runtime").JSX.Element;
|
|
232
|
+
displayName: string;
|
|
233
|
+
};
|
|
234
|
+
Footer: {
|
|
235
|
+
({ children, storeConfig, MINICART_CONFIG }: import('../types/layout/templates/MiniCart').ModalFooterProps): import("react/jsx-runtime").JSX.Element | null;
|
|
236
|
+
displayName: string;
|
|
237
|
+
};
|
|
238
|
+
Header: {
|
|
239
|
+
({ ICONS, MINICART_CONFIG }: import('../types/layout/templates/MiniCart').ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
240
|
+
displayName: string;
|
|
241
|
+
};
|
|
242
|
+
TagMessage: {
|
|
243
|
+
(): import("react/jsx-runtime").JSX.Element | null;
|
|
244
|
+
displayName: string;
|
|
245
|
+
};
|
|
246
|
+
Totals: {
|
|
247
|
+
({ totalizers }: {
|
|
248
|
+
totalizers: import('../types/data/api/checkout/order-form').OrderForm["totalizers"];
|
|
249
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
250
|
+
displayName: string;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
201
253
|
};
|
|
202
254
|
utils: {
|
|
203
255
|
EventCollector: ({ page, data }: import('react').PropsWithChildren & import('../types/data/events').CollectorProps) => null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HeaderContainerProps } from '../../../types/layout/team-components/Header';
|
|
2
2
|
|
|
3
3
|
declare const Header: {
|
|
4
|
-
({ tipBar,
|
|
4
|
+
({ tipBar, minicartStyleModifiers }: HeaderContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
export default Header;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CardProps } from '../../../../../types/layout/templates/MiniCart/index';
|
|
2
|
+
|
|
3
|
+
declare const Card: {
|
|
4
|
+
({ available, index, product, ICONS, MINICART_CONFIG, NAME_SPLIT_SYMBOL, TEXTURE_IMAGE, TOGGLE_STYLE_MODIFIER, }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Card;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionsProps } from '../../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Actions: {
|
|
4
|
+
({ handleSendEvent, product, ICONS, MINICART_CONFIG, ...props }: ActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Actions;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GiftProps } from '../../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Gift: {
|
|
4
|
+
({ bundleItems, offerings, uniqueId, ICONS, MINICART_CONFIG }: GiftProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Gift;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CardProps } from '../../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Media: {
|
|
4
|
+
({ itemOffered, }: {
|
|
5
|
+
itemOffered: CardProps["product"]["itemOffered"];
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export default Media;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SkuCardProps } from '../../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Sku: {
|
|
4
|
+
({ product, NAME_SPLIT_SYMBOL, TEXTURE_IMAGE, TOGGLE_STYLE_MODIFIER }: SkuCardProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Sku;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StepperProps } from '../../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Stepper: {
|
|
4
|
+
({ handleSendEvent, product, MINICART_CONFIG }: StepperProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Stepper;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StyleCardProps } from '../../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Style: {
|
|
4
|
+
({ product, TEXTURE_IMAGE, TOGGLE_STYLE_MODIFIER }: StyleCardProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Style;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { WishlistActionProps } from '../../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const WishlistAction: ({ handleSendEvent, onHandleRemove, product, MINICART_CONFIG, ...props }: WishlistActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default WishlistAction;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
declare const Card: {
|
|
2
|
+
Actions: {
|
|
3
|
+
({ handleSendEvent, product, ICONS, MINICART_CONFIG, ...props }: import('../../../../../types/layout/templates/MiniCart').ActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
Gift: {
|
|
7
|
+
({ bundleItems, offerings, uniqueId, ICONS, MINICART_CONFIG }: import('../../../../../types/layout/templates/MiniCart').GiftProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
Media: {
|
|
11
|
+
({ itemOffered, }: {
|
|
12
|
+
itemOffered: import('../../../../../types/layout/templates/MiniCart').CardProps["product"]["itemOffered"];
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
Name: {
|
|
17
|
+
({ name, skuName, tagName, className, }: {
|
|
18
|
+
tagName?: string;
|
|
19
|
+
name: string;
|
|
20
|
+
skuName?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
Price: {
|
|
26
|
+
({ total, totalList }: {
|
|
27
|
+
total: number;
|
|
28
|
+
totalList: number;
|
|
29
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
Sku: {
|
|
33
|
+
({ product, NAME_SPLIT_SYMBOL, TEXTURE_IMAGE, TOGGLE_STYLE_MODIFIER }: import('../../../../../types/layout/templates/MiniCart').SkuCardProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
Stepper: {
|
|
37
|
+
({ handleSendEvent, product, MINICART_CONFIG }: import('../../../../../types/layout/templates/MiniCart').StepperProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
Style: {
|
|
41
|
+
({ product, TEXTURE_IMAGE, TOGGLE_STYLE_MODIFIER }: import('../../../../../types/layout/templates/MiniCart').StyleCardProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export default Card;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CouponSellerProps } from '../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const CouponSeller: {
|
|
4
|
+
({ type, ICONS, MINICART_CONFIG }: CouponSellerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default CouponSeller;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CouponSeller';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputProps } from '../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Input: {
|
|
4
|
+
({ feedback, hasError, onHandler, hasSuccess, type, title, value, ICONS }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Input;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Field';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ModalBodyProps } from '../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Body: {
|
|
4
|
+
({ children, ICONS, MINICART_CONFIG, NAME_SPLIT_SYMBOL, PLP_NOT_RESULT, TEXTURE_IMAGE, TOGGLE_STYLE_MODIFIER }: ModalBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Body;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DiscountProps } from '../../../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Discount: {
|
|
4
|
+
({ children, className, ICONS, MINICART_CONFIG }: DiscountProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Discount;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Discount';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ModalFooterProps } from '../../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Footer: {
|
|
4
|
+
({ children, storeConfig, MINICART_CONFIG }: ModalFooterProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Footer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OrderForm } from '../../../../../../../types/data/api/checkout/order-form';
|
|
2
|
+
|
|
3
|
+
declare const Totals: {
|
|
4
|
+
({ totalizers }: {
|
|
5
|
+
totalizers: OrderForm["totalizers"];
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export default Totals;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Footer';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NotificationItemProps } from '../../../../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const Item: {
|
|
4
|
+
({ item: { id, message, callback }, removeNotification, ICONS }: NotificationItemProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Item;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Item';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Notifications';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Shipping';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function OptionSize({ text }: {
|
|
2
|
+
text: string;
|
|
3
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function OptionColor({ fill }: {
|
|
5
|
+
fill: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function OptionTexture({ src, text }: {
|
|
8
|
+
src: string;
|
|
9
|
+
text: string;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const Options: {
|
|
12
|
+
size: typeof OptionSize;
|
|
13
|
+
color: typeof OptionColor;
|
|
14
|
+
texture: typeof OptionTexture;
|
|
15
|
+
image: typeof OptionTexture;
|
|
16
|
+
};
|
|
17
|
+
export default Options;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MiniCartProps } from '../../../types/layout/templates/MiniCart';
|
|
2
|
+
|
|
3
|
+
declare const MiniCart: ({ ICONS, MINICART_CONFIG, NAME_SPLIT_SYMBOL, PLP_NOT_RESULT, TEXTURE_IMAGE, TOGGLE_STYLE_MODIFIER, Z_INDEX_WAR, storeConfig, minicartStyleModifiers }: MiniCartProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default MiniCart;
|