@momo-webplatform/mobase 0.2.83 → 0.2.84

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.
@@ -374,7 +374,7 @@ interface BlogSectionProps extends SectionBlockProps {
374
374
  onClickLoadMore?: (tabIndex: number) => void;
375
375
  }
376
376
 
377
- declare const BlogSection: ({ dataHeading, dataHorizontalScroll, dataBlog, className, background, template, onClickModal, onClickLoadMore, }: BlogSectionProps) => react_jsx_runtime.JSX.Element;
377
+ declare const BlogSection: ({ dataHeading, dataHorizontalScroll, dataBlog, idSection, className, background, template, onClickModal, onClickLoadMore, }: BlogSectionProps) => react_jsx_runtime.JSX.Element;
378
378
 
379
379
  type CalendarProps = React$1.ComponentProps<typeof DayPicker> & {
380
380
  /**
@@ -374,7 +374,7 @@ interface BlogSectionProps extends SectionBlockProps {
374
374
  onClickLoadMore?: (tabIndex: number) => void;
375
375
  }
376
376
 
377
- declare const BlogSection: ({ dataHeading, dataHorizontalScroll, dataBlog, className, background, template, onClickModal, onClickLoadMore, }: BlogSectionProps) => react_jsx_runtime.JSX.Element;
377
+ declare const BlogSection: ({ dataHeading, dataHorizontalScroll, dataBlog, idSection, className, background, template, onClickModal, onClickLoadMore, }: BlogSectionProps) => react_jsx_runtime.JSX.Element;
378
378
 
379
379
  type CalendarProps = React$1.ComponentProps<typeof DayPicker> & {
380
380
  /**
package/dist/esm/index.js CHANGED
@@ -67,7 +67,7 @@ import*as Ro from"react";import{ChevronDownIcon as pm}from"@heroicons/react/20/s
67
67
  transform: translate3d(0, 30%, 0);
68
68
  }
69
69
  }
70
- `})]}),Bt=({className:e,children:o,title:t,shortTitle:a,qrImage:r,qrLink:n,logoQr:s,isQrForAll:l=!1,...m})=>R(ct,{...m,children:R($e,{className:i("md:max-w-2xl lg:max-w-3xl h-auto md:max-h-screen max-h-screen overflow-hidden [&>button>svg]:text-white border-0",e),size:"xl",positionRightCloseBtn:!0,children:R(Ct,{className:"p-0",children:me("div",{className:"flex flex-row flex-wrap",children:[R("div",{className:"w-full flex-none md:w-5/12 hidden sm:block",children:o||me("div",{className:"px-5 text-sm py-8 grid grid-cols-1 gap-y-6",children:[me("div",{className:"flex flex-nowrap items-center",children:[R("div",{className:"flex-none",children:R("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091602-637359309621891617.png",alt:"Step 1"})}),me("div",{className:"flex-1 pl-4",children:[R("div",{className:"step font-semibold text-gray-800 ",children:"B\u01B0\u1EDBc 1 :"}),R("div",{className:"mt-1 text-gray-500 ",children:l?"M\u1EDF app MoMo ho\u1EB7c \u1EE9ng d\u1EE5ng ng\xE2n h\xE0ng/v\xED \u0111i\u1EC7n t\u1EED ch\u1EA5p nh\u1EADn m\xE3 v\u1EA1ch t\u1EEB QR \u0110a N\u0103ng":"M\u1EDF \u1EE9ng d\u1EE5ng camera m\u1EB7c \u0111\u1ECBnh ho\u1EB7c \u1EE9ng d\u1EE5ng h\u1ED7 tr\u1EE3 QR code c\u1EE7a b\u1EA1n"})]})]}),me("div",{className:"flex flex-nowrap items-center",children:[R("div",{className:"flex-none",children:R("img",{className:"w-20 ",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091443-637359308837905996.png",alt:"Step 2"})}),me("div",{className:"flex-1 pl-4",children:[R("div",{className:"step font-semibold text-gray-800 ",children:"B\u01B0\u1EDBc 2 :"}),R("div",{className:"mt-1 text-gray-500 ",children:"Qu\xE9t m\xE3 QR Code theo h\xECnh b\xEAn ph\u1EA3i"})]})]}),me("div",{className:"flex flex-nowrap items-center",children:[R("div",{className:"flex-none",children:R("img",{className:"w-20 ",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917090146-637359301062519803.png",alt:"Step 3"})}),me("div",{className:"flex-1 pl-4",children:[R("div",{className:"step font-semibold text-gray-800 ",children:"B\u01B0\u1EDBc 3 :"}),me("div",{className:"mt-1 text-gray-500 ",children:["B\u1EA5m v\xE0o th\xF4ng b\xE1o hi\u1EC3n th\u1ECB \u0111\u1EC3 t\u1EA3i \u1EE9ng d\u1EE5ng ho\u1EB7c"," ",a||"Truy c\u1EADp ngay"]})]})]})]})}),R("div",{className:"flex w-full items-center justify-center md:w-7/12 h-auto",style:{background:"url(https://homepage.momocdn.net/jk/momo2020/img/intro/qrcode-pattern.png) 10px 10px no-repeat,linear-gradient(to top,#c1177c,#e11b90)"},children:me("div",{className:"px-5 py-10 text-center",children:[t&&R("h4",{className:"mb-5 text-base font-semibold text-white",children:t}),me("div",{className:"relative",children:[l&&R("div",{className:"absolute -top-2 left-1/2 z-[5] -translate-x-1/2",children:R("img",{src:"https://homepage.momocdn.net/fileuploads/svg/momo-file-231211170324.svg",alt:"Title QR all"})}),R(Nm,{img:r,isQrForAll:l,children:n&&R(wm,{value:n,size:215,imageSettings:{src:`${s||"https://homepage.momocdn.net/pwa/images/logoMomox50.png"}`,height:50,width:50,excavate:!0},level:"H"})})]})]})})]})})})});import{useState as Dm}from"react";import{useEffect as Pm,useLayoutEffect as Cm,useState as Rm}from"react";import Tm from"ua-parser-js";var km=()=>Tm().device.type==="mobile",Sm=typeof window<"u"?Cm:Pm,ia=()=>{let[e,o]=Rm(!1);return Sm(()=>{o(km())},[]),e};import{Fragment as Mm,jsx as na,jsxs as Im}from"react/jsx-runtime";var He=({action:e,newTab:o,offset:t,dialogQrProps:a,className:r,children:n,...s})=>{let[l,m]=Dm(!1),c=ia(),d=!!a?.qrLink,f=()=>{let H=d?a?.qrLink:e;return typeof H=="string"?H.trim():""},u=()=>{let H=f();!H&&typeof e!="function"||(typeof e=="function"?e():window.open(H,o?"_blank":"_self"))},v=(H,$=0)=>{let I=document.querySelector(H);if(!I)return;let N=I.getBoundingClientRect().top+window.scrollY-$;window.scrollTo({top:N,behavior:"smooth"})},k=()=>{typeof e=="string"&&e.startsWith("#")?v(e,t):u()},D=()=>Im(Mm,{children:[na(Se,{...s,className:r,onClick:()=>m(!0),"data-name":"button-action-with-qr",children:n}),na(Bt,{...a,open:l,onOpenChange:()=>m(!1),qrLink:a?.qrLink||""})]});return d?c?a?.isQrForAll?D():na(Se,{...s,className:r,onClick:u,"data-name":"button-action-with-qr",children:n}):D():na(Se,{...s,onClick:k,className:i("cursor-pointer",r),"data-name":"button-action-without-qr",rel:"noreferrer",children:n})};import*as no from"react";import{ChevronRightIcon as Am,DotsHorizontalIcon as Lm}from"@radix-ui/react-icons";import{Slot as Em}from"@radix-ui/react-slot";import{jsx as dt,jsxs as Hm}from"react/jsx-runtime";var gi=no.forwardRef(({className:e,...o},t)=>dt("nav",{ref:t,"aria-label":"breadcrumb",className:i("",e),...o}));gi.displayName="Breadcrumb";var ui=no.forwardRef(({className:e,...o},t)=>dt("ol",{ref:t,className:i("flex items-center gap-2 break-words text-sm overflow-x-auto snap-mandatory snap-x [&::-webkit-scrollbar]:hidden",e),...o}));ui.displayName="BreadcrumbList";var vi=no.forwardRef(({className:e,...o},t)=>dt("li",{ref:t,className:i("shrink-0 text-gray-900 hover:text-pink-500",e),...o}));vi.displayName="BreadcrumbItem";var xi=no.forwardRef(({asChild:e,className:o,...t},a)=>dt(e?Em:"a",{ref:a,className:i("transition-colors hover:text-foreground",o),...t}));xi.displayName="BreadcrumbLink";var bi=no.forwardRef(({className:e,...o},t)=>dt("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:i("text-sm text-gray-500",e),...o}));bi.displayName="BreadcrumbPage";var hi=({children:e,className:o,...t})=>dt("li",{role:"presentation","aria-hidden":"true",className:i("text-gray-900",o),...t,children:e??dt(Am,{className:"w-2 h-2"})});hi.displayName="BreadcrumbSeparator";var yi=({className:e,...o})=>Hm("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...o,children:[dt(Lm,{className:"w-4 h-4 text-gray-900"}),dt("span",{className:"sr-only",children:"More"})]});yi.displayName="BreadcrumbElipssis";import nr from"html-react-parser";import{createContext as Fm,useContext as wi}from"react";import{jsx as ko}from"react/jsx-runtime";var tr=Fm({align:"center"}),or=({color:e="pink",size:o="small",isTruncated:t=!1,className:a,children:r})=>{let n={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},s={small:"text-sm",large:"text-lg"};return ko("div",{className:i("mb-1 font-semibold",n[e],s[o],t&&"truncate",a),children:r})},ar=({tagHeading:e="h2",size:o="small",color:t="pink",isTruncated:a=!1,className:r,children:n})=>{let s=e,l={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},m={small:"lg:text-3xl text-2xl",large:"lg:text-4xl md:text-3xl text-2xl"},{align:c}=wi(tr);return ko(s,{className:i("max-w-4xl font-bold",c==="center"?"mx-auto":c==="right"?"ml-auto":"",l[t],m[o],a&&"truncate",r),children:n})},rr=({color:e="regular",size:o="small",marginTop:t="spacingX",isTruncated:a=!1,className:r,children:n})=>{let s={regular:"text-gray-500",white:"text-white/80"},l={small:"text-base",large:"md:text-lg text-base"},m={none:"",spacingX:"mt-2",spacingM:"mt-3",spacingL:"mt-4",spacingXl:"mt-5",spacing2Xl:"mt-6"},{align:c}=wi(tr);return ko("div",{className:i(c==="center"?"mx-auto max-w-2xl":c==="right"?"ml-auto max-w-4xl":"max-w-4xl",s[e],l[o],m[t],a&&"truncate",r),children:n})},ir=({className:e,align:o="center",children:t})=>ko("div",{className:i("mb-5 md:mb-8",{left:"text-left",center:"text-center",right:"text-right"}[o],e),children:ko(tr.Provider,{value:{align:o},children:t})});import{jsx as Ot,jsxs as zm}from"react/jsx-runtime";var B=({idSection:e,className:o,background:t,children:a})=>Ot("section",{id:e,className:i("block-section py-8 md:py-10 lg:py-14",o),style:{background:t},children:Ot("div",{className:"wrapper relative",children:a})}),b=({align:e="center",tagline:o,title:t,description:a,tagHeading:r="h2",colorScheme:n="pink",sizeHeading:s="small",className:l})=>{let m=n==="black"?"pink":n==="pink"?"regular":"white",c=n==="pink"?"pink":n==="white"?"white":"regular",d=n==="white"?"white":"regular";return!t&&!a&&!o?null:zm(ir,{align:e,className:l,children:[o&&Ot(or,{color:m,children:o}),t&&Ot(ar,{tagHeading:r,color:c,size:s,children:nr(t)}),a&&Ot(rr,{color:d,size:"large",marginTop:s==="large"?"spacing2Xl":"spacingX",children:nr(a)})]})},h=({align:e,isFullInMobile:o=!1,buttons:t,className:a})=>t?.length===0?null:Ot("div",{className:i("buttons-block mt-8 flex w-full gap-4 md:mt-10",e==="center"&&"justify-center",e==="right"&&"justify-end",o&&"flex-wrap md:flex-nowrap",a),children:t?.slice(0,2).map((r,n)=>{if(!r)return null;let{btnName:s,...l}=r;return Ot(He,{...l,className:i(o&&"w-full md:w-auto",r?.className),children:nr(s)},n)})});import Km,{memo as Jm}from"react";import{ArrowDownIcon as ec}from"@heroicons/react/20/solid";import tc from"html-react-parser";import{createContext as Vm,useCallback as Wm,useContext as sr,useEffect as $m,useRef as Gm,useState as jm}from"react";import{ChevronLeft as Um,ChevronRight as Qm}from"lucide-react";import*as Ni from"react";import{Slot as _m}from"@radix-ui/react-slot";import{cva as Bm}from"class-variance-authority";import{jsx as Om}from"react/jsx-runtime";var Vt=Bm("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent",{variants:{variant:{primary:"bg-pink-500 text-white hover:bg-pink-600 disabled:bg-pink-300",secondary:"bg-white text-gray-900 hover:bg-gray-100 disabled:text-gray-400 disabled:bg-white border-gray-300",outline:"border-pink-500 text-pink-500 bg-white hover:bg-pink-50 disabled:bg-white disabled:border-pink-300 disabled:text-pink-300",tonal:"bg-pink-100 text-pink-500 hover:bg-pink-200 disabled:bg-gray-200 disabled:text-gray-400",danger:"bg-red-500 text-white hover:bg-red-600 disabled:bg-red-300",transparent:"text-gray-900 bg-transparent hover:bg-gray-100 disabled:text-gray-400 disabled:bg-transparent"},size:{default:"text-sm h-10 w-10",sm:"h-8 w-8 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{variant:"primary",size:"default"}}),ie=Ni.forwardRef(({className:e,variant:o="primary",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?_m:"button",m=i(Vt({variant:o,size:t,className:e}));return Om(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ie.displayName="IconButton";import{Fragment as qm,jsx as Rt,jsxs as Pi}from"react/jsx-runtime";var sa=Vm(void 0),pt=({showGradientOverlay:e=!0,gradientOverlayColor:o="255, 255, 255",className:t,children:a})=>{let r=Gm(null),[n,s]=jm({left:!1,right:!1}),l=Wm(()=>{let c=r.current;if(c){let{scrollLeft:d,scrollWidth:f,clientWidth:u}=c;s({left:d>0,right:Math.ceil(d+u)<f})}},[]);$m(()=>{let c=r.current;if(c)return l(),window.addEventListener("resize",l),c.addEventListener("scroll",l),()=>{window.removeEventListener("resize",l),c.removeEventListener("scroll",l)}},[l]);let m=c=>{let d=r.current;if(d){let{scrollLeft:f,clientWidth:u,scrollWidth:v}=d,k=u*.7*(c==="left"?-1:1),D=f+k;D<0?D=0:D>v-u&&(D=v-u),d.scrollTo({left:D,behavior:"smooth"})}};return Rt(sa.Provider,{value:{scrollContainerRef:r,showArrows:n,scroll:m,gradientOverlayColor:o},children:Pi("div",{className:i("relative w-full",t),children:[e&&Pi(qm,{children:[n.left&&Rt("div",{className:"pointer-events-none absolute left-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient( to left, rgba(255, 255, 255, 0),rgb(${o}),rgb(${o}))`}}),n.right&&Rt("div",{className:"pointer-events-none absolute right-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient(to right, rgba(255, 255, 255, 0), rgb(${o}),rgb(${o}))`}})]}),a]})})},ft=({className:e,children:o})=>{let t=sr(sa);if(!t)throw new Error("HorizontalContent must be used within a HorizontalScroll");return Rt("div",{ref:t.scrollContainerRef,className:i("scrollbar-hide overflow-x-auto scroll-smooth",e),role:"region","aria-label":"Scrollable content",children:o})},gt=({className:e,children:o,...t})=>{let a=sr(sa);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.left?Rt(ie,{className:i("pointer-events-auto absolute left-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("left"),"aria-label":"Scroll left",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Rt(Um,{className:"h-4 w-4"})}):null},ut=({className:e,children:o,...t})=>{let a=sr(sa);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.right?Rt(ie,{className:i("pointer-events-auto absolute right-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("right"),"aria-label":"Scroll right",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Rt(Qm,{className:"h-4 w-4"})}):null};import*as la from"react";import*as Fe from"@radix-ui/react-tabs";import{jsx as lr}from"react/jsx-runtime";var vt=Fe.Root,Ge=la.forwardRef(({className:e,size:o="sm",isDivider:t=!1,...a},r)=>lr(Fe.List,{ref:r,className:i("inline-flex w-full flex-row items-center bg-muted text-muted-foreground space-x-5 overflow-x-auto [&::-webkit-scrollbar]:hidden",`text-${o}`,t&&"border-b border-gray-200",e),...a}));Ge.displayName=Fe.List.displayName;var je=la.forwardRef(({className:e,...o},t)=>lr(Fe.Trigger,{ref:t,className:i("inline-flex items-center justify-center whitespace-nowrap py-3 font-semibold ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-b-2 border-transparent data-[state=active]:text-pink-500 data-[state=active]:border-pink-500 text-gray-900 hover:text-pink-500",e),...o}));je.displayName=Fe.Trigger.displayName;var Ue=la.forwardRef(({className:e,...o},t)=>lr(Fe.Content,{ref:t,className:i("mt-3 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 text-gray-900",e),...o}));Ue.displayName=Fe.Content.displayName;import*as Ci from"react";import{Slot as Xm}from"@radix-ui/react-slot";import{cva as Ym}from"class-variance-authority";import{jsx as Zm}from"react/jsx-runtime";var Ri=Ym("inline-flex items-center justify-center whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent flex-nowrap",{variants:{variant:{default:"text-blue-700 hover:underline hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",primary:"text-pink-500 hover:underline hover:bg-pink-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",secondary:"text-gray-700 hover:underline hover:text-blue-700 hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline"},size:{default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),ce=Ci.forwardRef(({className:e,variant:o="default",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Xm:"button",m=i(Ri({variant:o,size:t,className:e}));return Zm(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ce.displayName="TextButton";import{Fragment as Ti,jsx as O,jsxs as Qe}from"react/jsx-runtime";var oc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return Qe(Ti,{children:[O("div",{className:"flex-none pr-3 basis-1/2 md:basis-full md:pr-0",children:O("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:Qe("picture",{children:[O("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),O("img",{className:"object-cover w-full h-full",src:e?.thumbnailMobile,alt:e?.title})]})})}),Qe("div",{className:"overflow-hidden basis-1/2 md:mt-3 md:basis-full",children:[e?.category&&e?.categoryUrl&&O(ce,{variant:"default",className:"shink-0 mb-0.5 line-clamp-1 block justify-start whitespace-normal text-left text-xs md:hidden",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),O("div",{className:"text-sm font-medium text-gray-900 line-clamp-3 group-hover:text-pink-500 md:line-clamp-none md:text-base",children:e?.title}),Qe("div",{className:"flex items-center mt-2 md:space-x-1",children:[e?.category&&e?.categoryUrl&&Qe(Ti,{children:[O(ce,{variant:"default",className:"justify-start hidden text-xs text-left whitespace-normal shink-0 md:line-clamp-1 md:block",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&O("span",{className:"flex-none hidden leading-none md:block",children:"\xB7"})]}),e?.totalViews&&O("div",{className:"flex-none text-xs text-gray-500",children:e.totalViews})]})]})]})},ma=Jm(({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},m=(d,f,u)=>{d?.preventDefault(),d?.stopPropagation(),a?a(f):window.open(u,"_blank")},c=(d,f)=>Qe("div",{children:[O("div",{className:i("-mx-3 flex flex-row flex-wrap gap-y-5",d?.blogList?.length<3?"md:justify-center":""),children:d?.blogList?.map((u,v)=>O("div",{className:"min-w-0 px-3 basis-full md:basis-1/2 lg:basis-1/3",children:O("div",{onClick:k=>m(k,u?.id,u?.url),className:i("group flex cursor-pointer flex-row md:flex-col",d?.classNameItem),children:O(oc,{blog:u})},u?.id)},v))}),d?.isShowBtn&&O("div",{className:"flex items-center justify-center w-full mt-8",children:Qe(He,{action:r?()=>r?.(f):d?.btnUrl,newTab:d?.isNewTab,variant:"outline",children:[tc(d.btnName||"Xem th\xEAm"),d?.isLoading?O(io,{className:"w-5 h-5 ml-2 animate-spin-loading"}):r&&!d?.btnUrl&&O(ec,{className:"w-5 h-5 ml-2 -mb-1 animate-bounce"})]})})]},d?.title||f);return Qe(Km.Fragment,{children:[e&&O(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t?.length>1?Qe(vt,{defaultValue:t[0]?.title,children:[Qe(pt,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[O(ft,{className:"mb-6 text-center",children:O(Ge,{className:"inline-flex items-center w-auto mx-auto mb-0 overflow-visible",children:t.map((d,f)=>O(je,{value:d.title,children:d.title},d.title+f))})}),O(gt,{}),O(ut,{})]}),t.map((d,f)=>O(Ue,{value:d.title,children:c(d,f)},d.title+f))]}):t?.length===1&&t[0]&&c(t[0],0)]})});import sc,{memo as lc,useEffect as mc,useState as Di}from"react";import{ChevronLeftIcon as cc,ChevronRightIcon as dc}from"@heroicons/react/20/solid";import Mi from"html-react-parser";import*as L from"react";import{ChevronLeftIcon as ac,ChevronRightIcon as rc}from"@heroicons/react/20/solid";import ic from"embla-carousel-react";import{Fragment as nc,jsx as De,jsxs as Si}from"react/jsx-runtime";var ki=L.createContext(null);function So(){let e=L.useContext(ki);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var he=L.forwardRef(({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:r,children:n,...s},l)=>{let[m,c]=ic({...o,axis:e==="horizontal"?"x":"y"},a),[d,f]=L.useState(!1),[u,v]=L.useState(!1),k=L.useCallback($=>{$&&(f($.canScrollPrev()),v($.canScrollNext()))},[]),D=L.useCallback(()=>{c?.scrollPrev()},[c]),M=L.useCallback(()=>{c?.scrollNext()},[c]),H=L.useCallback($=>{$.key==="ArrowLeft"?($.preventDefault(),D()):$.key==="ArrowRight"&&($.preventDefault(),M())},[D,M]);return L.useEffect(()=>{!c||!t||t(c)},[c,t]),L.useEffect(()=>{if(c)return k(c),c.on("reInit",k),c.on("select",k),()=>{c?.off("select",k)}},[c,k]),De(ki.Provider,{value:{carouselRef:m,api:c,opts:o,orientation:e||(o?.axis==="y"?"vertical":"horizontal"),scrollPrev:D,scrollNext:M,canScrollPrev:d,canScrollNext:u},children:De("div",{ref:l,onKeyDownCapture:H,className:i("relative",r),role:"region","aria-roledescription":"carousel",...s,children:n})})});he.displayName="Carousel";var ye=L.forwardRef(({className:e,classNameContent:o,...t},a)=>{let{carouselRef:r,orientation:n}=So();return De("div",{ref:r,className:i(o,"overflow-hidden"),children:De("div",{ref:a,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ye.displayName="CarouselContent";var we=L.forwardRef(({className:e,...o},t)=>{let{orientation:a}=So();return De("div",{ref:t,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",e),...o})});we.displayName="CarouselItem";var so=L.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollPrev:s,canScrollPrev:l}=So();return Si(ie,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[De(ac,{className:"w-6 h-6"}),De("span",{className:"sr-only",children:"Previous slide"})]})});so.displayName="CarouselPrevious";var lo=L.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollNext:s,canScrollNext:l}=So();return Si(ie,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[De(rc,{className:"w-6 h-6"}),De("span",{className:"sr-only",children:"Next slide"})]})});lo.displayName="CarouselNext";var ca=L.forwardRef((e,o)=>{let{api:t}=So(),[,a]=L.useState(!1),r=L.useCallback(()=>a(l=>!l),[]);L.useEffect(()=>{if(t)return t.on("select",r),t.on("reInit",r),()=>{t.off("select",r),t.off("reInit",r)}},[t,r]);let n=t?.scrollSnapList().length||0,s=t?.selectedScrollSnap()||0;return n>1?De("div",{ref:o,className:` flex justify-center ${e.className}`,children:Array.from({length:n},(l,m)=>De(ie,{className:`navigation-item mx-1 h-1.5 w-1.5 rounded-full p-0 ${m===s?"navigation-item-active scale-125 transform bg-gray-500 hover:bg-gray-500/90":"bg-gray-200 hover:bg-gray-100"}`,"aria-label":`Go to slide ${m+1}`,onClick:()=>t?.scrollTo(m)},m))}):De(nc,{})});ca.displayName="CarouselDots";import{Fragment as da,jsx as V,jsxs as ze}from"react/jsx-runtime";var pc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return ze(da,{children:[V("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:V("img",{className:"inset-0 h-full w-full object-cover",src:e?.thumbnailDesktop,alt:e?.title})}),ze("div",{className:"mt-4 md:pr-3",children:[V("div",{className:"font-bold text-gray-900 group-hover:text-pink-500 md:text-lg md:leading-tight ",children:e?.title}),e?.description&&V("div",{className:"mt-2 line-clamp-2 text-sm text-gray-500 md:text-sm",children:Mi(e?.description??"")}),ze("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&ze(da,{children:[V(ce,{variant:"default",className:"shink-0 justify-start whitespace-normal text-left text-sm md:line-clamp-1 ",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&V("span",{className:" flex-none leading-none text-gray-300 ",children:"\xB7"})]}),e?.totalViews&&V("div",{className:"flex-none text-sm text-gray-500",children:e.totalViews})]})]})]})},fc=({dataBlog:e,setCarouselRef:o,carouselRef:t,setCurrent:a,handleOnClickItem:r})=>{let{blogList:n=[],isShowBtn:s,btnName:l,btnUrl:m="#",isNewTab:c,classNameItem:d}=e??{};return mc(()=>{!t||!a||(a(t.selectedScrollSnap()+1),t.on("select",()=>{a&&a(t.selectedScrollSnap()+1)}))},[t,a]),ze(da,{children:[V(he,{opts:{dragFree:!1},setApi:o,className:"w-full",children:V(ye,{classNameContent:"!overflow-visible",className:"-ml-5",children:n?.map(f=>V(we,{className:"basis-11/12 pl-5 md:basis-1/2 lg:basis-4/12",children:V("div",{onClick:u=>r(u,f?.id,f?.url),className:i("group cursor-pointer",d),children:V(pc,{blog:f})},f?.id)},f?.id))})}),s&&V("div",{className:"mt-8 flex w-full items-center justify-center md:mt-10 ",children:ze(He,{action:m&&m,newTab:c,variant:"outline",children:[Mi(l||"Xem th\xEAm")," "]})})]})},gc=({carouselRef:e})=>ze(ie,{onClick:()=>e?.scrollPrev(),disabled:!e?.canScrollPrev(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[V(cc,{className:"h-6 w-6"}),V("span",{className:"sr-only",children:"Previous slide"})]}),uc=({carouselRef:e})=>ze(ie,{onClick:()=>e?.scrollNext(),disabled:!e?.canScrollNext(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[V(dc,{className:"h-6 w-6"}),V("span",{className:"sr-only",children:"Next slide"})]}),mr=lc(({dataHeading:e,dataBlog:o,onClickModal:t,onClickLoadMore:a})=>{let r=(c,d,f)=>{c?.preventDefault(),c?.stopPropagation(),t?t(d):window.open(f,"_blank")},[n,s]=Di(null),[,l]=Di(0),m=()=>n?ze("div",{className:"ml-3 hidden items-center space-x-2 md:flex",children:[V(gc,{carouselRef:n}),V(uc,{carouselRef:n})]}):V(da,{});return ze(sc.Fragment,{children:[ze("div",{className:" flex items-center justify-between",children:[e&&V(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"left",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),V(m,{})]}),V(fc,{dataBlog:o?.[0],onClickLoadMore:a,index:0,setCarouselRef:s,carouselRef:n,setCurrent:l,handleOnClickItem:r})]})});import{Fragment as hc,jsx as mo}from"react/jsx-runtime";var vc=({template:e,dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return mo(ma,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});case 2:return mo(mr,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return mo(ma,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},xc=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})=>mo(hc,{children:vc({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})}),bc=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t=[],className:a,background:r,template:n=1,onClickModal:s,onClickLoadMore:l})=>mo(B,{className:i("overflow-hidden",a),background:r,children:mo(xc,{dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:n,onClickModal:s,onClickLoadMore:l})});import*as fa from"react";import{enUS as Pc,vi as Cc}from"date-fns/locale";import{ChevronLeft as Rc,ChevronRight as Tc}from"lucide-react";import kc from"lunisolar";import{DayPicker as Sc}from"react-day-picker";import*as Ii from"react";import*as Do from"@radix-ui/react-checkbox";import{CheckIcon as yc}from"@heroicons/react/16/solid";import{cva as Ai}from"class-variance-authority";import{jsx as cr}from"react/jsx-runtime";var wc=Ai("peer shrink-0 rounded border-2 disabled:bg-gray-300 border-gray-300 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-default disabled:bg-gray-100 data-[state=checked]:border-none disabled:data-[state=checked]:bg-gray-400 disabled:data-[state=checked]:text-gray-100 data-[state=checked]:bg-pink-500 data-[state=checked]:text-white",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),Nc=Ai("",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),pa=Ii.forwardRef(({className:e,size:o,...t},a)=>cr(Do.Root,{ref:a,className:i(wc({size:o}),e),...t,children:cr(Do.Indicator,{className:i("flex items-center justify-center text-current"),children:cr(yc,{className:i(Nc({size:o}))})})}));pa.displayName=Do.Root.displayName;import{Fragment as Lc,jsx as qe,jsxs as dr}from"react/jsx-runtime";var Dc=({date:e,cusContent:o})=>{let t=null;return t=kc(e).lunar,dr(Lc,{children:[o?o(e):e.getDate(),t&&qe("span",{className:"luna-date absolute right-0.5 top-1 hidden text-[8px] leading-none group-[.show-luna]:block",children:t.day})]})},Mc={formatCaption:e=>`Th\xE1ng ${e.getMonth()+1}/${e.getFullYear()}`,formatWeekdayName:e=>{let o=e.getDay();return["CN","T2","T3","T4","T5","T6","T7"][o]}};function Ic({isShow:e,setIsShow:o,lang:t}){let a=fa.useId();return qe("div",{className:"w-full p-3 pt-0",children:dr("div",{className:"flex cursor-pointer items-center space-x-2 border-t border-gray-100 pt-3",children:[qe(pa,{checked:e,id:`check-show-luna-${a}`,onCheckedChange:r=>{typeof r=="boolean"&&o(r)}}),qe("label",{htmlFor:`check-show-luna-${a}`,className:"cursor-pointer text-sm leading-none text-gray-900 peer-disabled:cursor-default peer-disabled:text-gray-400",children:t==="vi"?"Hi\u1EC7n ng\xE0y \xE2m l\u1ECBch":"Show lunar date"})]})})}var Ac=e=>e.getDay()===0||e.getDay()===6;function ga({className:e,classNames:o,showOutsideDays:t=!1,enableLunaDate:a=!1,lang:r="vi",cusContentDay:n,...s}){let[l,m]=fa.useState(!0);return qe(Sc,{locale:r==="vi"?Cc:Pc,showOutsideDays:t,className:i("b w-fit rounded-b-md border border-gray-200 bg-white shadow-md",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-y-0",month:"p-3 pt-0 w-full",caption:"flex justify-center p-3 bg-blue-50 relative items-center -mx-3 mb-3",caption_label:"text-sm font-medium text-gray-900",nav:"space-x-1 flex items-center",nav_button:i(We({variant:"transparent"}),"h-7 w-7 p-0 text-gray-900 hover:bg-transparent hover:opacity-70"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse",head_row:"flex space-x-0.5",head_cell:i("w-11 rounded-md text-xs font-medium text-gray-500 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),row:"flex w-full mt-0.5 space-x-0.5",cell:"h-11 w-11 text-center text-sm p-0 relative border-none",day:i(We({variant:"transparent"}),"group relative h-11 w-11 p-0 text-center text-sm font-semibold focus-within:relative focus-within:z-20 aria-selected:opacity-100 [&.day-range-end.day-range-start]:rounded-md aria-selected:[&:not(.day-range-middle)]:bg-pink-500 aria-selected:[&:not(.day-range-middle)]:text-white",a&&l&&"show-luna"),day_range_end:"day-range-end [&.day-range-end]:rounded-l-none",day_range_start:"day-range-start [&.day-range-start]:rounded-r-none",day_today:"day-today [&:not([aria-selected])]:text-pink-500 [&:not([aria-selected])]:border-gray-200",day_outside:"day-outside opacity-50 aria-selected:bg-accent/50 aria-selected:opacity-30",day_disabled:"opacity-50",day_range_middle:i("group/mid day-range-middle !rounded-none !bg-pink-50 text-gray-900 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),day_hidden:"invisible",...o},modifiers:{weekend:Ac},modifiersClassNames:{weekend:"text-red-600"},components:{IconLeft:()=>qe(Rc,{className:"h-6 w-6"}),IconRight:()=>qe(Tc,{className:"h-6 w-6"}),DayContent:c=>qe(Dc,{date:c.date,cusContent:n}),Months:({children:c})=>dr("div",{className:"w-full",children:[qe("div",{className:i("months-wrapper flex flex-col sm:flex-row"),children:c}),a&&qe(Ic,{isShow:l,setIsShow:m,lang:r})]})},formatters:r==="vi"?Mc:{},...s})}ga.displayName="Calendar";import{QuestionMarkCircleIcon as Ec,XCircleIcon as Hc}from"@heroicons/react/16/solid";import{format as ua}from"date-fns";import{Calendar as Fc}from"lucide-react";import*as Ei from"react";import*as xt from"@radix-ui/react-popover";import{jsx as Li}from"react/jsx-runtime";var Mo=xt.Root,Io=xt.Trigger,co=Ei.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},r)=>Li(xt.Portal,{children:Li(xt.Content,{ref:r,align:o,sideOffset:t,className:i("z-50 w-72 rounded-md border border-gray-200 bg-white p-4 sm:p-5 text-gray-900 shadow-small outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));co.displayName=xt.Content.displayName;import{Fragment as Hi,jsx as Ne,jsxs as Ao}from"react/jsx-runtime";var zc=({label:e,placeholder:o="Select a value",size:t=1,message:a,isError:r,disabled:n,dateFormat:s="dd/MM/yyyy",buttonProps:l,popoverProps:m,calendarProps:c,popoverContentProps:d})=>{let f=c?.selected||null;return Ao("div",{children:[Ao(Mo,{...m,children:[Ne(Io,{asChild:!0,children:Ao(Se,{variant:"secondary",className:i("relative h-11 w-full justify-between overflow-visible text-left text-sm font-normal text-gray-900 ring-inset hover:ring-1 hover:ring-gray-400 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 [&[data-state=open]]:border-pink-500 [&[data-state=open]]:ring-1 [&[data-state=open]]:ring-pink-500",t===2&&"h-12 text-base",(!f||!(f instanceof Date)&&typeof f=="object"&&(!("from"in f)||!f.from))&&"text-gray-500",r&&"border-red-500 ring-1 ring-red-500"),disabled:n,...l,children:[Ne("div",{className:"line-clamp-1 flex-1",children:f instanceof Date?ua(f,s):f&&typeof f=="object"&&"from"in f&&"to"in f?Ne(Hi,{children:f.from?f.to?Ao(Hi,{children:[Ne("span",{className:"date-from",children:ua(f.from,s)})," ",Ne("span",{className:"date-separator",children:"-"}),Ne("span",{className:"date-to",children:ua(f.to,s)})]}):ua(f.from,s):o}):o}),e&&Ne("span",{className:i("absolute -top-2 left-2 bg-white px-1.5 text-xs text-gray-500",t===2&&" -top-2.5 text-sm",r&&"text-red-500"),children:e}),Ne(Fc,{className:"ml-2 h-4 w-4 flex-none text-gray-500"})]})}),Ne(co,{className:"w-auto border-none !p-0",...d,children:Ne(ga,{...c,defaultMonth:f&&typeof f=="object"&&"from"in f?f.from:f instanceof Date?f:void 0})})]}),a&&Ao("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[r?Ne(Hc,{width:16,height:16,className:"text-red-500"}):Ne(Ec,{width:16,height:16,className:"text-gray-500"}),Ne("span",{className:i(r?"text-red-500":"text-gray-500",t===2?"text-sm":"text-xs"),children:a})]})]})};import{useEffect as Wc,useState as Wi}from"react";import{QuestionMarkCircleIcon as $c,XCircleIcon as Gc}from"@heroicons/react/16/solid";import{isValid as jc}from"date-fns";import*as Xe from"react";import{ChevronDownIcon as Fi,ChevronUpIcon as _c,CheckIcon as Bc,XCircleIcon as Oc}from"@heroicons/react/16/solid";import{QuestionMarkCircleIcon as Vc}from"@heroicons/react/24/outline";import*as C from"@radix-ui/react-select";import{jsx as W,jsxs as Lo}from"react/jsx-runtime";var Eo=Xe.forwardRef(({className:e,children:o,label:t,message:a,size:r,isError:n,disabled:s,...l},m)=>Lo("div",{ref:m,className:i("select-mobase relative",e,s?"disabled":"",n?"[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-red-500 [&>.select-mobase-button]:ring-1":"",r===2?"[&>.select-mobase-button]:text-base [&>.select-mobase-button]:h-12":""),children:[t&&W("span",{className:i("mobase-select-label absolute bg-white -top-2 px-1.5 left-2 text-xs text-gray-500 z-[1]",r===2&&"text-sm -top-2.5",n&&"text-red-500"),children:t}),W(C.Root,{disabled:s,...l,children:o}),a&&Lo("div",{className:i("mobase-select-message flex space-x-1 items-center mt-1 text-gray-500",n&&"text-red-500"),children:[n?W(Oc,{width:16,height:16}):W(Vc,{width:16,height:16}),W("span",{className:i(r===2?"text-sm":"text-xs"),children:a})]})]})),Ho=C.Value,po=Xe.forwardRef(({className:e,children:o,...t},a)=>Lo(C.Trigger,{ref:a,className:i("select-mobase-button bg-white w-full ring-0 transition-all focus-visible:border-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent focus-visible:ring-1 focus-visible:!ring-pink-500 rounded-md border border-gray-300 data-[placeholder]:text-gray-500 p-3 disabled:bg-gray-50 disabled:border-gray-200 disabled:pointer-events-none flex items-center justify-between data-[state=open]:border-pink-500 data-[state=open]:ring-1 hover:ring-1 hover:ring-gray-400 data-[state=open]:ring-pink-500 text-gray-900 h-11 ring-inset text-sm",e),...t,children:[W("div",{className:"line-clamp-1 text-left",children:o}),W(C.Icon,{asChild:!0,children:W(Fi,{className:"h-4 w-4 text-gray-500 flex-none"})})]}));po.displayName=C.Trigger.displayName;var pr=Xe.forwardRef(({className:e,...o},t)=>W(C.ScrollUpButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1",e),...o,children:W(_c,{className:"h-5 w-5"})}));pr.displayName=C.ScrollUpButton.displayName;var fr=Xe.forwardRef(({className:e,...o},t)=>W(C.ScrollDownButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1 bg-gradient-to-t from-white to-transparent",e),...o,children:W(Fi,{className:"h-5 w-5"})}));fr.displayName=C.ScrollDownButton.displayName;var fo=Xe.forwardRef(({className:e,children:o,position:t="popper",...a},r)=>W(C.Portal,{children:Lo(C.Content,{ref:r,className:i("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900 shadow-small data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...a,children:[W(pr,{}),W(C.Viewport,{className:i("p-0",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),W(fr,{})]})}));fo.displayName=C.Content.displayName;var Fo=Xe.forwardRef(({className:e,children:o,...t},a)=>W(C.Group,{ref:a,className:i("relative p-1 after:w-full border-b border-gray-200 last:border-0",e),...t,children:o})),zi=Xe.forwardRef(({className:e,...o},t)=>W(C.Label,{ref:t,className:i("pr-2 pl-7 py-1.5 text-sm font-semibold z-[1]",e),...o}));zi.displayName=C.Label.displayName;var Tt=Xe.forwardRef(({className:e,children:o,...t},a)=>Lo(C.Item,{ref:a,className:i("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-7 pr-2 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[W("span",{className:"absolute left-2 flex h-4 w-4 items-center justify-center",children:W(C.ItemIndicator,{children:W(Bc,{className:"h-4 w-4 text-pink-500"})})}),W(C.ItemText,{children:o})]})),_i=Xe.forwardRef(({className:e,...o},t)=>W(C.Separator,{ref:t,className:i("-mx-1 my-1 h-px bg-muted",e),...o}));_i.displayName=C.Separator.displayName;var Bi=["Th\xE1ng 01","Th\xE1ng 02","Th\xE1ng 03","Th\xE1ng 04","Th\xE1ng 05","Th\xE1ng 06","Th\xE1ng 07","Th\xE1ng 08","Th\xE1ng 09","Th\xE1ng 10","Th\xE1ng 11","Th\xE1ng 12"],Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],gr=(e,o,t,a)=>{let r=new Date(e,o,0).getDate(),n=t&&e===t.getFullYear()&&o===t.getMonth()+1?t.getDate():1,s=a&&e===a.getFullYear()&&o===a.getMonth()+1?a.getDate():r;return{daysInMonth:r,startDay:n,endDay:s}},Vi=(e,o,t,a)=>{let r=t?t.getFullYear():e,n=a?a.getFullYear():o;return Array.from({length:n-r+1},(s,l)=>n-l)};import{jsx as ee,jsxs as Ye}from"react/jsx-runtime";var Uc=({label:e,selected:o,onSelect:t,size:a=1,message:r,isError:n,disabled:s,dateFormat:l="dd/MM/yyyy",lang:m="vi",fromYear:c=1900,toYear:d=new Date().getFullYear(),disableUnselect:f=!1})=>{let[u,v]=Wi(o??null),k=Math.min(c,d),D=Math.max(c,d),M=l==="MM/yyyy",H=(N,re)=>{if(re===0){v(void 0),t?.(void 0);return}let G=u?.getFullYear()||new Date().getFullYear(),oa=u?.getMonth()??0,_t=u?.getDate()??1;N==="month"&&re!==null&&(oa=re-1),N==="year"&&re!==null&&(G=re),M?_t=1:N==="day"&&re!==null&&(_t=re);let si=gr(G,oa+1).daysInMonth;_t>si&&(_t=1);let Po=new Date(G,oa,_t);jc(Po)&&(v(Po),t?.(Po))},[$,I]=Wi(!1),zt=N=>{I(N)};return Wc(()=>{v(o??null)},[o]),Ye("div",{className:i("relative",s&&"cursor-no-drop"),children:[Ye("div",{className:i("relative block h-11 w-full rounded-md border border-gray-300 bg-white px-1 py-3 text-sm text-gray-900 outline-none ring-inset transition-all placeholder:text-gray-500 hover:ring-1 hover:ring-gray-400 focus:border-pink-500 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50",$&&"border-pink-500 ring-1 ring-pink-500",a===2&&"h-12 text-base",u?"":"text-gray-500",n&&"border-red-500 ring-1 ring-red-500",s&&"pointer-events-none select-none border-gray-200 bg-gray-50"),children:[e&&ee("span",{className:i("absolute -top-2 left-2 bg-white px-1.5 text-xs text-gray-500",a===2&&" -top-2.5 text-sm",n&&"text-red-500"),children:e}),Ye("div",{className:"flex h-full flex-row divide-x",children:[!M&&Ye(Eo,{value:u?u.getDate().toString().padStart(2,"0"):"",onValueChange:N=>H("day",parseInt(N,10)),onOpenChange:zt,className:"w-[30%]",children:[ee(po,{className:"h-full w-full rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:ee(Ho,{placeholder:m==="vi"?"Ng\xE0y":"Day"})}),ee(fo,{onCloseAutoFocus:N=>N.preventDefault(),children:Ye(Fo,{children:[!f&&ee(Tt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:gr(u?.getFullYear()||new Date().getFullYear(),(u?.getMonth()??0)+1).daysInMonth},(N,re)=>(re+1).toString().padStart(2,"0")).map(N=>ee(Tt,{value:N,children:N},N))]})})]}),Ye(Eo,{value:u?(u.getMonth()+1).toString():"",onValueChange:N=>H("month",parseInt(N,10)),onOpenChange:zt,className:i(M?"w-1/2":"w-2/5"),children:[ee(po,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:ee(Ho,{placeholder:m==="vi"?"Th\xE1ng":"Month"})}),ee(fo,{onCloseAutoFocus:N=>N.preventDefault(),children:Ye(Fo,{children:[!f&&ee(Tt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:12},(N,re)=>re+1).map(N=>ee(Tt,{value:N.toString(),children:m==="vi"?Bi[N-1]:Oi[N-1]},N))]})})]}),Ye(Eo,{value:u?u.getFullYear().toString():"",onValueChange:N=>H("year",parseInt(N,10)),onOpenChange:zt,className:i(M?"w-1/2":"w-[30%]"),children:[ee(po,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:ee(Ho,{placeholder:m==="vi"?"N\u0103m":"Year"})}),ee(fo,{onCloseAutoFocus:N=>N.preventDefault(),children:Ye(Fo,{children:[!f&&ee(Tt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Vi(k,D).map(N=>ee(Tt,{value:N.toString(),children:N},N))]})})]})]})]}),r&&Ye("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[n?ee(Gc,{width:16,height:16,className:"text-red-500"}):ee($c,{width:16,height:16,className:"text-gray-500"}),ee("span",{className:i(n?"text-red-500":"text-gray-500",a===2?"text-sm":"text-xs"),children:r})]})]})};import*as Wt from"react";import*as F from"@radix-ui/react-alert-dialog";import{jsx as bt,jsxs as Xc}from"react/jsx-runtime";var Qc=F.Root,qc=F.Trigger,$i=F.Portal,ur=Wt.forwardRef(({className:e,...o},t)=>bt(F.Overlay,{className:i("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...o,ref:t}));ur.displayName=F.Overlay.displayName;var Gi=Wt.forwardRef(({className:e,...o},t)=>Xc($i,{children:[bt(ur,{}),bt(F.Content,{ref:t,className:i("fixed left-[50%] w-[90vw] bg-white text-gray-700 border border-gray-300 top-[50%] z-50 grid w- max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-xl",e),...o})]}));Gi.displayName=F.Content.displayName;var ji=({className:e,...o})=>bt("div",{className:i("flex flex-col space-y-2 text-left",e),...o});ji.displayName="AlertDialogHeader";var Ui=({className:e,...o})=>bt("div",{className:i("flex flex-row justify-end space-x-4",e),...o});Ui.displayName="AlertDialogFooter";var Qi=Wt.forwardRef(({className:e,...o},t)=>bt(F.Title,{ref:t,className:i("text-lg text-gray-900 font-semibold",e),...o}));Qi.displayName=F.Title.displayName;var qi=Wt.forwardRef(({className:e,...o},t)=>bt(F.Description,{ref:t,className:i("text-sm text-muted-foreground",e),...o}));qi.displayName=F.Description.displayName;var Xi=Wt.forwardRef(({className:e,...o},t)=>bt(F.Action,{ref:t,className:i(We({variant:"primary"}),"",e),...o}));Xi.displayName=F.Action.displayName;var Yi=Wt.forwardRef(({className:e,...o},t)=>bt(F.Cancel,{ref:t,className:i(We({variant:"secondary"}),e),...o}));Yi.displayName=F.Cancel.displayName;import{memo as rd,useState as id}from"react";import{useEffect as Yc,useState as Ki}from"react";import Ji from"html-react-parser";import{motion as Zc}from"motion/react";import*as Zi from"@radix-ui/react-aspect-ratio";var E=Zi.Root;import{Fragment as en,jsx as te,jsxs as zo}from"react/jsx-runtime";var Kc=({guideGroup:e,mockup:o})=>{let[t,a]=Ki(),[r,n]=Ki(0),s={open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeInOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeInOut"}}};return Yc(()=>{t&&(n(t.selectedScrollSnap()+1),t.on("select",()=>{n(t.selectedScrollSnap()+1)}))},[t]),te(en,{children:e?.stepList&&e?.stepList?.length>0&&zo("div",{className:"mx-auto flex max-w-3xl flex-nowrap justify-center",children:[te("div",{className:"h-auto w-64 flex-none",children:zo("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&zo(en,{children:[te("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),te("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),te("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),te("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),te("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:zo(he,{setApi:a,children:[te(ye,{className:"ml-0",children:e?.stepList.map((l,m)=>te(we,{className:"pl-0",children:te(E,{ratio:o==="small"?540/960:540/1168,children:l?.image&&te("img",{src:l.image,className:"size-full object-contain",alt:l.title})})},m))}),te(so,{className:"left-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"}),te(lo,{className:"right-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"})]})})]})}),te("div",{className:"flex flex-auto pl-12 pt-4",children:te("ul",{className:"flex flex-col",children:e?.stepList.map((l,m)=>zo("li",{className:i("relative min-h-20 pb-8 pl-14 after:absolute after:left-4 after:top-0 after:h-full after:border-l after:border-dashed after:border-gray-200 last:min-h-0 last:pb-0 last:after:hidden",m+1===r?"":"cursor-pointer"),onClick:()=>t&&t.scrollTo(m),children:[te("div",{className:i("absolute -top-1.5 left-0 z-10 flex h-8 w-8 items-center justify-center rounded-full text-sm font-bold",m+1===r?"bg-pink-500 text-white":"bg-pink-100 text-pink-500"),children:m+1}),te("div",{className:i(" text-sm font-medium",m+1===r?"text-pink-500":"text-gray-900"),children:Ji(l.title)}),l.content&&te(Zc.div,{initial:"closed",animate:m+1===r?"open":"closed",variants:s,style:{overflow:"hidden"},children:te("div",{className:"mt-3 text-sm text-gray-700",children:Ji(l.content)})})]},m))})})]})})},vr=Kc;import{useEffect as Jc,useRef as ed,useState as va}from"react";import{ChevronRightIcon as tn}from"@heroicons/react/20/solid";import td from"embla-carousel-autoplay";import xa from"html-react-parser";import{Fragment as xr,jsx as y,jsxs as ue}from"react/jsx-runtime";var od=({open:e,setOpenDialog:o,dataStep:t,mockup:a})=>{let[r,n]=va(0),[s,l]=va();return Jc(()=>{s&&(n(s.selectedScrollSnap()+1),s.on("select",()=>{n(s.selectedScrollSnap()+1)}))},[s]),!t||!t?.stepList?.length?null:y(ct,{open:e,onOpenChange:o,children:ue($e,{position:"bottom",height:"full",children:[y(aa,{children:y(ra,{className:"line-clamp-1",children:t?.title})}),ue(Ct,{className:"grid overflow-hidden p-0 ",children:[y(he,{setApi:l,className:" grid overflow-hidden",children:y(ye,{className:"ml-0 h-full",children:t.stepList.map((m,c)=>y(we,{className:"h-full w-full pl-0",children:ue("div",{className:"flex h-full flex-col overflow-y-auto",children:[y("div",{className:" relative flex w-full flex-none justify-center bg-gray-100 p-5",children:y("div",{className:i("mx-auto",a==="small"?"w-56":"w-52"),children:ue("div",{className:i("relative mx-auto w-full",a==="none"?"":"rounded-[2rem] border-8 border-gray-800 bg-gray-800 shadow-md",a==="small"?"px-0.5 py-3":""),children:[a!=="none"&&ue(xr,{children:[y("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),y("div",{className:i("relative h-full w-full overflow-hidden",a==="none"?"":"rounded-[1.5rem] bg-gray-200",a==="small"?"rounded-xl":""),children:y(E,{ratio:a==="small"?540/960:540/1168,children:m?.image&&y("img",{src:m.image,className:"size-full object-contain",alt:m.title})})})]})})}),ue("div",{className:"p-5 pb-12",children:[y("div",{className:"font-semibold",children:xa(m.title)}),m?.content&&y("div",{className:"mt-3 text-sm text-gray-800",children:xa(m.content)})]})]})},c))})}),y("div",{className:"text-muted-foreground fixed bottom-3 left-1/2 flex -translate-x-1/2 items-center justify-center gap-1.5 rounded-full bg-gray-900/50 px-3 py-1 py-2 text-center text-sm text-gray-700",children:t.stepList.map((m,c)=>y("div",{className:`h-2 w-2 cursor-pointer rounded-full ${c+1===r?"bg-white":"bg-white/40"}`,onClick:()=>s&&s.scrollTo(c)},c))})]})]})})},ad=({dataGuide:e,mockup:o,isStep:t})=>{let[a,r]=va(!1),[n,s]=va(null),l=ed(td({delay:3500,stopOnInteraction:!1,stopOnMouseEnter:!1})),m=c=>{s(e?.[c]||null),r(!0)};return e?.length===0?null:ue(xr,{children:[e?.length>1?y("div",{className:"-mx-5 grid grid-cols-1 md:mx-0",children:e.map((c,d)=>ue("div",{className:"relative flex cursor-pointer flex-nowrap items-center space-x-4 pl-5 ",onClick:()=>m(d),children:[y("div",{className:"borde flex h-28 w-20 justify-center overflow-hidden rounded-t-lg bg-gray-100 p-2 pb-0",children:(c?.avatar||c?.stepList?.[0]?.image)&&y("img",{src:c.avatar||c?.stepList?.[0]?.image,className:"h-full w-full object-cover object-top",alt:c.title})}),ue("div",{className:i("relative grid min-h-32 flex-1 grid-cols-1 items-center pr-8 ",d+1!=e.length&&"after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-gray-200"),children:[ue("div",{className:"py-2",children:[t&&y("span",{className:"text-sm font-medium text-pink-500",children:`B\u01B0\u1EDBc ${d+1}`}),y("div",{className:"font-semibold",children:xa(c.title)}),c?.description&&y("div",{className:"mt-1 text-sm text-gray-500",children:xa(c.description)})]}),y("div",{className:" absolute right-4 top-1/2 -translate-y-1/2 text-gray-500",children:y(tn,{className:"h-6 w-6"})})]})]},d))}):e?.[0]&&e[0].stepList?.length>0&&ue("div",{className:"mx-auto flex max-w-3xl flex-col flex-wrap justify-center gap-y-6",children:[y("div",{className:"relative max-h-96 w-full flex-none overflow-hidden",style:{WebkitMask:"linear-gradient(to bottom, rgba(0, 0, 0, 1.0) 95%, rgba(0, 0, 0, 0.3) 98%, transparent 100%)"},children:y("div",{className:"mx-auto h-auto w-72",children:ue("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&ue(xr,{children:[y("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),y("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:y(he,{plugins:[l.current],children:y(ye,{className:"ml-0",children:e[0]?.stepList.map((c,d)=>y(we,{className:"pl-0",onClick:()=>m(0),children:y(E,{ratio:o==="small"?540/960:540/1168,children:c?.image&&y("img",{src:c.image,className:"size-full object-contain",alt:c.title})})},d))})})})]})})}),y("div",{className:"flex w-full flex-none justify-center",children:ue(ce,{size:"lg",variant:"primary",onClick:()=>m(0),children:["Xem chi ti\u1EBFt h\u01B0\u1EDBng d\u1EABn ",y(tn,{className:"ml-1 h-5 w-5"})]})})]}),a&&y(od,{open:a,setOpenDialog:r,dataStep:n,mockup:o})]})},on=ad;import{Fragment as nd,jsx as se,jsxs as _o}from"react/jsx-runtime";var an=({direction:e,className:o})=>{let t=e==="left"?{viewBox:"0 0 20 40",d:"M20 0H0L18 20L0 40H20V0Z",width:"20"}:{viewBox:"0 0 19 40",d:"M0.906128 0H0V40H0.906128L19 20L0.906128 0Z",width:"19"};return se("svg",{fill:"none",viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",className:i("flex-0 absolute w-5 transition-all",o),children:se("path",{d:t.d,fill:"currentColor"})})},br=rd(({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,mockup:r,isStep:n})=>{let{showGradientOverlay:s=!0,gradientOverlayColor:l,className:m}=o||{},[c,d]=id(t?.[0]?.title||"");return _o(nd,{children:[e&&se(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t&&t?.length>0&&_o(ao,{children:[se(Ve,{lessThan:"md",children:se(on,{dataGuide:t,mockup:r,isStep:n})}),se(Ve,{greaterThan:"sm",children:t?.length>1?_o(vt,{defaultValue:t[0]?.title,onValueChange:f=>d(f),children:[_o(pt,{showGradientOverlay:s,gradientOverlayColor:l,className:m,children:[se(ft,{className:"mb-6 text-center",children:se(Ge,{className:i("mx-auto mb-0 inline-flex w-auto items-center overflow-visible",n?"space-x-10":""),children:t.map((f,u)=>{let v=u===t.length-1,k=c===f?.title||"";return _o(je,{value:f.title,className:i(n?"relative h-10 border-0 bg-pink-100 px-3 first:rounded-l-md first:pl-5 last:rounded-r-md last:pl-3 last:pr-5":"",k&&n?"data-[state=active]:bg-pink-500 data-[state=active]:text-white":""),children:[n&&u!==0&&se(an,{direction:"left",className:i("right-full top-0",k?"text-pink-500":"text-pink-100")}),f.title,n&&!v&&se(an,{direction:"right",className:i("left-full top-0",k?"text-pink-500":"text-pink-100")})]},f.title+u)})})}),se(gt,{}),se(ut,{})]}),t.map((f,u)=>se(Ue,{value:f.title,children:se(vr,{guideGroup:f,mockup:r})},f.title+u))]}):t?.length===1&&t[0]&&se(vr,{guideGroup:t[0],mockup:r})})]}),a&&se(h,{isFullInMobile:a?.isFullInMobile,buttons:a?.buttons,className:a?.className,align:"center"})]})});import{Fragment as cd,jsx as Bo}from"react/jsx-runtime";var sd=({template:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,mockup:n,isStep:s})=>{switch(e){case 1:return Bo(br,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s});default:return Bo(br,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s})}},ld=({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})=>Bo(cd,{children:sd({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})}),md=({dataHeading:e,dataGuide:o,dataHorizontalScroll:t,dataButtons:a,className:r,background:n,template:s=1,mockup:l="default",isStep:m=!1})=>Bo(B,{className:i(r),background:n,children:Bo(ld,{dataHeading:e,template:s,dataHorizontalScroll:t,dataGuide:o,dataButtons:a,mockup:l,isStep:m})});import{ChevronLeft as dd,ChevronRight as pd}from"lucide-react";import{Fragment as fd,jsx as Me,jsxs as rn}from"react/jsx-runtime";function nn({current:e,total:o,onChange:t}){let a=r=>Me("li",{children:Me("button",{className:i(Vt({variant:e===r?"outline":"secondary",size:"sm"})),onClick:()=>t(r),children:r})},r);return Me("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center"),children:rn("ul",{className:i("flex flex-row flex-wrap items-center gap-2"),children:[o>1&&Me("li",{children:Me("button",{className:i(Vt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>e>1&&t(e-1),children:Me(dd,{className:"h-4 w-4"})})}),o<=6?Array(o).fill(0).map((r,n)=>a(n+1)):rn(fd,{children:[a(1),e===1&&[a(2),a(3)],e>3&&Me("li",{children:Me("button",{className:i(Vt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e-3),children:"..."})}),e>2&&e!==1&&e!==o&&a(e-1),e>1&&e<o&&a(e),e<o-1&&e!==1&&a(e+1),e===o&&[a(o-2),a(o-1)],e<o-2&&e!==o&&Me("button",{className:i(Vt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e+3),children:"..."}),a(o)]}),o>1&&Me("li",{children:Me("button",{className:i(Vt({variant:"secondary",size:"sm"})),disabled:e===o,onClick:()=>e<o&&t(e+1),children:Me(pd,{className:"h-4 w-4"})})})]})})}import{forwardRef as gd}from"react";import{QuestionMarkCircleIcon as ud}from"@heroicons/react/24/outline";import{XCircleIcon as vd}from"@heroicons/react/24/solid";import{jsx as go,jsxs as sn}from"react/jsx-runtime";var xd=gd(({disabled:e,isError:o,message:t,label:a,className:r,inputClassName:n,size:s,rows:l=3,...m},c)=>sn("div",{className:i("relative",r,o&&"mobase-text-area-error"),children:[a&&go("span",{className:i("mobase-text-area-label absolute bg-white -top-2.5 px-1.5 left-2 text-sm text-gray-500",s===2&&" -top-2.5 text-sm"),children:a}),go("textarea",{disabled:e,ref:c,className:i("mobase-text-area-box bg-white w-full text-sm transition-all rounded-md border border-gray-300 placeholder:text-gray-500 p-3 text-gray-900 focus:border-pink-500 disabled:bg-gray-50 disabled:border-gray-200 outline-none block",s===2&&"text-base",n),rows:l,...m}),t&&sn("div",{className:"mobase-text-area-message flex space-x-1 items-center mt-0.5",children:[o?go(vd,{width:16,height:16,className:"text-red-500"}):go(ud,{width:16,height:16,className:"text-gray-500"}),go("span",{className:i("text-gray-500 ",s===2?"text-sm":"text-xs"),children:t})]}),go("style",{children:`
70
+ `})]}),Bt=({className:e,children:o,title:t,shortTitle:a,qrImage:r,qrLink:n,logoQr:s,isQrForAll:l=!1,...m})=>R(ct,{...m,children:R($e,{className:i("md:max-w-2xl lg:max-w-3xl h-auto md:max-h-screen max-h-screen overflow-hidden [&>button>svg]:text-white border-0",e),size:"xl",positionRightCloseBtn:!0,children:R(Ct,{className:"p-0",children:me("div",{className:"flex flex-row flex-wrap",children:[R("div",{className:"w-full flex-none md:w-5/12 hidden sm:block",children:o||me("div",{className:"px-5 text-sm py-8 grid grid-cols-1 gap-y-6",children:[me("div",{className:"flex flex-nowrap items-center",children:[R("div",{className:"flex-none",children:R("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091602-637359309621891617.png",alt:"Step 1"})}),me("div",{className:"flex-1 pl-4",children:[R("div",{className:"step font-semibold text-gray-800 ",children:"B\u01B0\u1EDBc 1 :"}),R("div",{className:"mt-1 text-gray-500 ",children:l?"M\u1EDF app MoMo ho\u1EB7c \u1EE9ng d\u1EE5ng ng\xE2n h\xE0ng/v\xED \u0111i\u1EC7n t\u1EED ch\u1EA5p nh\u1EADn m\xE3 v\u1EA1ch t\u1EEB QR \u0110a N\u0103ng":"M\u1EDF \u1EE9ng d\u1EE5ng camera m\u1EB7c \u0111\u1ECBnh ho\u1EB7c \u1EE9ng d\u1EE5ng h\u1ED7 tr\u1EE3 QR code c\u1EE7a b\u1EA1n"})]})]}),me("div",{className:"flex flex-nowrap items-center",children:[R("div",{className:"flex-none",children:R("img",{className:"w-20 ",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091443-637359308837905996.png",alt:"Step 2"})}),me("div",{className:"flex-1 pl-4",children:[R("div",{className:"step font-semibold text-gray-800 ",children:"B\u01B0\u1EDBc 2 :"}),R("div",{className:"mt-1 text-gray-500 ",children:"Qu\xE9t m\xE3 QR Code theo h\xECnh b\xEAn ph\u1EA3i"})]})]}),me("div",{className:"flex flex-nowrap items-center",children:[R("div",{className:"flex-none",children:R("img",{className:"w-20 ",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917090146-637359301062519803.png",alt:"Step 3"})}),me("div",{className:"flex-1 pl-4",children:[R("div",{className:"step font-semibold text-gray-800 ",children:"B\u01B0\u1EDBc 3 :"}),me("div",{className:"mt-1 text-gray-500 ",children:["B\u1EA5m v\xE0o th\xF4ng b\xE1o hi\u1EC3n th\u1ECB \u0111\u1EC3 t\u1EA3i \u1EE9ng d\u1EE5ng ho\u1EB7c"," ",a||"Truy c\u1EADp ngay"]})]})]})]})}),R("div",{className:"flex w-full items-center justify-center md:w-7/12 h-auto",style:{background:"url(https://homepage.momocdn.net/jk/momo2020/img/intro/qrcode-pattern.png) 10px 10px no-repeat,linear-gradient(to top,#c1177c,#e11b90)"},children:me("div",{className:"px-5 py-10 text-center",children:[t&&R("h4",{className:"mb-5 text-base font-semibold text-white",children:t}),me("div",{className:"relative",children:[l&&R("div",{className:"absolute -top-2 left-1/2 z-[5] -translate-x-1/2",children:R("img",{src:"https://homepage.momocdn.net/fileuploads/svg/momo-file-231211170324.svg",alt:"Title QR all"})}),R(Nm,{img:r,isQrForAll:l,children:n&&R(wm,{value:n,size:215,imageSettings:{src:`${s||"https://homepage.momocdn.net/pwa/images/logoMomox50.png"}`,height:50,width:50,excavate:!0},level:"H"})})]})]})})]})})})});import{useState as Dm}from"react";import{useEffect as Pm,useLayoutEffect as Cm,useState as Rm}from"react";import Tm from"ua-parser-js";var km=()=>Tm().device.type==="mobile",Sm=typeof window<"u"?Cm:Pm,ia=()=>{let[e,o]=Rm(!1);return Sm(()=>{o(km())},[]),e};import{Fragment as Mm,jsx as na,jsxs as Im}from"react/jsx-runtime";var He=({action:e,newTab:o,offset:t,dialogQrProps:a,className:r,children:n,...s})=>{let[l,m]=Dm(!1),c=ia(),d=!!a?.qrLink,f=()=>{let H=d?a?.qrLink:e;return typeof H=="string"?H.trim():""},u=()=>{let H=f();!H&&typeof e!="function"||(typeof e=="function"?e():window.open(H,o?"_blank":"_self"))},v=(H,$=0)=>{let I=document.querySelector(H);if(!I)return;let N=I.getBoundingClientRect().top+window.scrollY-$;window.scrollTo({top:N,behavior:"smooth"})},k=()=>{typeof e=="string"&&e.startsWith("#")?v(e,t):u()},D=()=>Im(Mm,{children:[na(Se,{...s,className:r,onClick:()=>m(!0),"data-name":"button-action-with-qr",children:n}),na(Bt,{...a,open:l,onOpenChange:()=>m(!1),qrLink:a?.qrLink||""})]});return d?c?a?.isQrForAll?D():na(Se,{...s,className:r,onClick:u,"data-name":"button-action-with-qr",children:n}):D():na(Se,{...s,onClick:k,className:i("cursor-pointer",r),"data-name":"button-action-without-qr",rel:"noreferrer",children:n})};import*as no from"react";import{ChevronRightIcon as Am,DotsHorizontalIcon as Lm}from"@radix-ui/react-icons";import{Slot as Em}from"@radix-ui/react-slot";import{jsx as dt,jsxs as Hm}from"react/jsx-runtime";var gi=no.forwardRef(({className:e,...o},t)=>dt("nav",{ref:t,"aria-label":"breadcrumb",className:i("",e),...o}));gi.displayName="Breadcrumb";var ui=no.forwardRef(({className:e,...o},t)=>dt("ol",{ref:t,className:i("flex items-center gap-2 break-words text-sm overflow-x-auto snap-mandatory snap-x [&::-webkit-scrollbar]:hidden",e),...o}));ui.displayName="BreadcrumbList";var vi=no.forwardRef(({className:e,...o},t)=>dt("li",{ref:t,className:i("shrink-0 text-gray-900 hover:text-pink-500",e),...o}));vi.displayName="BreadcrumbItem";var xi=no.forwardRef(({asChild:e,className:o,...t},a)=>dt(e?Em:"a",{ref:a,className:i("transition-colors hover:text-foreground",o),...t}));xi.displayName="BreadcrumbLink";var bi=no.forwardRef(({className:e,...o},t)=>dt("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:i("text-sm text-gray-500",e),...o}));bi.displayName="BreadcrumbPage";var hi=({children:e,className:o,...t})=>dt("li",{role:"presentation","aria-hidden":"true",className:i("text-gray-900",o),...t,children:e??dt(Am,{className:"w-2 h-2"})});hi.displayName="BreadcrumbSeparator";var yi=({className:e,...o})=>Hm("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...o,children:[dt(Lm,{className:"w-4 h-4 text-gray-900"}),dt("span",{className:"sr-only",children:"More"})]});yi.displayName="BreadcrumbElipssis";import nr from"html-react-parser";import{createContext as Fm,useContext as wi}from"react";import{jsx as ko}from"react/jsx-runtime";var tr=Fm({align:"center"}),or=({color:e="pink",size:o="small",isTruncated:t=!1,className:a,children:r})=>{let n={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},s={small:"text-sm",large:"text-lg"};return ko("div",{className:i("mb-1 font-semibold",n[e],s[o],t&&"truncate",a),children:r})},ar=({tagHeading:e="h2",size:o="small",color:t="pink",isTruncated:a=!1,className:r,children:n})=>{let s=e,l={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},m={small:"lg:text-3xl text-2xl",large:"lg:text-4xl md:text-3xl text-2xl"},{align:c}=wi(tr);return ko(s,{className:i("max-w-4xl font-bold",c==="center"?"mx-auto":c==="right"?"ml-auto":"",l[t],m[o],a&&"truncate",r),children:n})},rr=({color:e="regular",size:o="small",marginTop:t="spacingX",isTruncated:a=!1,className:r,children:n})=>{let s={regular:"text-gray-500",white:"text-white/80"},l={small:"text-base",large:"md:text-lg text-base"},m={none:"",spacingX:"mt-2",spacingM:"mt-3",spacingL:"mt-4",spacingXl:"mt-5",spacing2Xl:"mt-6"},{align:c}=wi(tr);return ko("div",{className:i(c==="center"?"mx-auto max-w-2xl":c==="right"?"ml-auto max-w-4xl":"max-w-4xl",s[e],l[o],m[t],a&&"truncate",r),children:n})},ir=({className:e,align:o="center",children:t})=>ko("div",{className:i("mb-5 md:mb-8",{left:"text-left",center:"text-center",right:"text-right"}[o],e),children:ko(tr.Provider,{value:{align:o},children:t})});import{jsx as Ot,jsxs as zm}from"react/jsx-runtime";var B=({idSection:e,className:o,background:t,children:a})=>Ot("section",{id:e,className:i("block-section py-8 md:py-10 lg:py-14",o),style:{background:t},children:Ot("div",{className:"wrapper relative",children:a})}),b=({align:e="center",tagline:o,title:t,description:a,tagHeading:r="h2",colorScheme:n="pink",sizeHeading:s="small",className:l})=>{let m=n==="black"?"pink":n==="pink"?"regular":"white",c=n==="pink"?"pink":n==="white"?"white":"regular",d=n==="white"?"white":"regular";return!t&&!a&&!o?null:zm(ir,{align:e,className:l,children:[o&&Ot(or,{color:m,children:o}),t&&Ot(ar,{tagHeading:r,color:c,size:s,children:nr(t)}),a&&Ot(rr,{color:d,size:"large",marginTop:s==="large"?"spacing2Xl":"spacingX",children:nr(a)})]})},h=({align:e,isFullInMobile:o=!1,buttons:t,className:a})=>t?.length===0?null:Ot("div",{className:i("buttons-block mt-8 flex w-full gap-4 md:mt-10",e==="center"&&"justify-center",e==="right"&&"justify-end",o&&"flex-wrap md:flex-nowrap",a),children:t?.slice(0,2).map((r,n)=>{if(!r)return null;let{btnName:s,...l}=r;return Ot(He,{...l,className:i(o&&"w-full md:w-auto",r?.className),children:nr(s)},n)})});import Km,{memo as Jm}from"react";import{ArrowDownIcon as ec}from"@heroicons/react/20/solid";import tc from"html-react-parser";import{createContext as Vm,useCallback as Wm,useContext as sr,useEffect as $m,useRef as Gm,useState as jm}from"react";import{ChevronLeft as Um,ChevronRight as Qm}from"lucide-react";import*as Ni from"react";import{Slot as _m}from"@radix-ui/react-slot";import{cva as Bm}from"class-variance-authority";import{jsx as Om}from"react/jsx-runtime";var Vt=Bm("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent",{variants:{variant:{primary:"bg-pink-500 text-white hover:bg-pink-600 disabled:bg-pink-300",secondary:"bg-white text-gray-900 hover:bg-gray-100 disabled:text-gray-400 disabled:bg-white border-gray-300",outline:"border-pink-500 text-pink-500 bg-white hover:bg-pink-50 disabled:bg-white disabled:border-pink-300 disabled:text-pink-300",tonal:"bg-pink-100 text-pink-500 hover:bg-pink-200 disabled:bg-gray-200 disabled:text-gray-400",danger:"bg-red-500 text-white hover:bg-red-600 disabled:bg-red-300",transparent:"text-gray-900 bg-transparent hover:bg-gray-100 disabled:text-gray-400 disabled:bg-transparent"},size:{default:"text-sm h-10 w-10",sm:"h-8 w-8 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{variant:"primary",size:"default"}}),ie=Ni.forwardRef(({className:e,variant:o="primary",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?_m:"button",m=i(Vt({variant:o,size:t,className:e}));return Om(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ie.displayName="IconButton";import{Fragment as qm,jsx as Rt,jsxs as Pi}from"react/jsx-runtime";var sa=Vm(void 0),pt=({showGradientOverlay:e=!0,gradientOverlayColor:o="255, 255, 255",className:t,children:a})=>{let r=Gm(null),[n,s]=jm({left:!1,right:!1}),l=Wm(()=>{let c=r.current;if(c){let{scrollLeft:d,scrollWidth:f,clientWidth:u}=c;s({left:d>0,right:Math.ceil(d+u)<f})}},[]);$m(()=>{let c=r.current;if(c)return l(),window.addEventListener("resize",l),c.addEventListener("scroll",l),()=>{window.removeEventListener("resize",l),c.removeEventListener("scroll",l)}},[l]);let m=c=>{let d=r.current;if(d){let{scrollLeft:f,clientWidth:u,scrollWidth:v}=d,k=u*.7*(c==="left"?-1:1),D=f+k;D<0?D=0:D>v-u&&(D=v-u),d.scrollTo({left:D,behavior:"smooth"})}};return Rt(sa.Provider,{value:{scrollContainerRef:r,showArrows:n,scroll:m,gradientOverlayColor:o},children:Pi("div",{className:i("relative w-full",t),children:[e&&Pi(qm,{children:[n.left&&Rt("div",{className:"pointer-events-none absolute left-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient( to left, rgba(255, 255, 255, 0),rgb(${o}),rgb(${o}))`}}),n.right&&Rt("div",{className:"pointer-events-none absolute right-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient(to right, rgba(255, 255, 255, 0), rgb(${o}),rgb(${o}))`}})]}),a]})})},ft=({className:e,children:o})=>{let t=sr(sa);if(!t)throw new Error("HorizontalContent must be used within a HorizontalScroll");return Rt("div",{ref:t.scrollContainerRef,className:i("scrollbar-hide overflow-x-auto scroll-smooth",e),role:"region","aria-label":"Scrollable content",children:o})},gt=({className:e,children:o,...t})=>{let a=sr(sa);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.left?Rt(ie,{className:i("pointer-events-auto absolute left-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("left"),"aria-label":"Scroll left",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Rt(Um,{className:"h-4 w-4"})}):null},ut=({className:e,children:o,...t})=>{let a=sr(sa);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.right?Rt(ie,{className:i("pointer-events-auto absolute right-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("right"),"aria-label":"Scroll right",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Rt(Qm,{className:"h-4 w-4"})}):null};import*as la from"react";import*as Fe from"@radix-ui/react-tabs";import{jsx as lr}from"react/jsx-runtime";var vt=Fe.Root,Ge=la.forwardRef(({className:e,size:o="sm",isDivider:t=!1,...a},r)=>lr(Fe.List,{ref:r,className:i("inline-flex w-full flex-row items-center bg-muted text-muted-foreground space-x-5 overflow-x-auto [&::-webkit-scrollbar]:hidden",`text-${o}`,t&&"border-b border-gray-200",e),...a}));Ge.displayName=Fe.List.displayName;var je=la.forwardRef(({className:e,...o},t)=>lr(Fe.Trigger,{ref:t,className:i("inline-flex items-center justify-center whitespace-nowrap py-3 font-semibold ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-b-2 border-transparent data-[state=active]:text-pink-500 data-[state=active]:border-pink-500 text-gray-900 hover:text-pink-500",e),...o}));je.displayName=Fe.Trigger.displayName;var Ue=la.forwardRef(({className:e,...o},t)=>lr(Fe.Content,{ref:t,className:i("mt-3 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 text-gray-900",e),...o}));Ue.displayName=Fe.Content.displayName;import*as Ci from"react";import{Slot as Xm}from"@radix-ui/react-slot";import{cva as Ym}from"class-variance-authority";import{jsx as Zm}from"react/jsx-runtime";var Ri=Ym("inline-flex items-center justify-center whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent flex-nowrap",{variants:{variant:{default:"text-blue-700 hover:underline hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",primary:"text-pink-500 hover:underline hover:bg-pink-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",secondary:"text-gray-700 hover:underline hover:text-blue-700 hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline"},size:{default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),ce=Ci.forwardRef(({className:e,variant:o="default",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Xm:"button",m=i(Ri({variant:o,size:t,className:e}));return Zm(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ce.displayName="TextButton";import{Fragment as Ti,jsx as O,jsxs as Qe}from"react/jsx-runtime";var oc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return Qe(Ti,{children:[O("div",{className:"flex-none pr-3 basis-1/2 md:basis-full md:pr-0",children:O("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:Qe("picture",{children:[O("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),O("img",{className:"object-cover w-full h-full",src:e?.thumbnailMobile,alt:e?.title})]})})}),Qe("div",{className:"overflow-hidden basis-1/2 md:mt-3 md:basis-full",children:[e?.category&&e?.categoryUrl&&O(ce,{variant:"default",className:"shink-0 mb-0.5 line-clamp-1 block justify-start whitespace-normal text-left text-xs md:hidden",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),O("div",{className:"text-sm font-medium text-gray-900 line-clamp-3 group-hover:text-pink-500 md:line-clamp-none md:text-base",children:e?.title}),Qe("div",{className:"flex items-center mt-2 md:space-x-1",children:[e?.category&&e?.categoryUrl&&Qe(Ti,{children:[O(ce,{variant:"default",className:"justify-start hidden text-xs text-left whitespace-normal shink-0 md:line-clamp-1 md:block",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&O("span",{className:"flex-none hidden leading-none md:block",children:"\xB7"})]}),e?.totalViews&&O("div",{className:"flex-none text-xs text-gray-500",children:e.totalViews})]})]})]})},ma=Jm(({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},m=(d,f,u)=>{d?.preventDefault(),d?.stopPropagation(),a?a(f):window.open(u,"_blank")},c=(d,f)=>Qe("div",{children:[O("div",{className:i("-mx-3 flex flex-row flex-wrap gap-y-5",d?.blogList?.length<3?"md:justify-center":""),children:d?.blogList?.map((u,v)=>O("div",{className:"min-w-0 px-3 basis-full md:basis-1/2 lg:basis-1/3",children:O("div",{onClick:k=>m(k,u?.id,u?.url),className:i("group flex cursor-pointer flex-row md:flex-col",d?.classNameItem),children:O(oc,{blog:u})},u?.id)},v))}),d?.isShowBtn&&O("div",{className:"flex items-center justify-center w-full mt-8",children:Qe(He,{action:r?()=>r?.(f):d?.btnUrl,newTab:d?.isNewTab,variant:"outline",children:[tc(d.btnName||"Xem th\xEAm"),d?.isLoading?O(io,{className:"w-5 h-5 ml-2 animate-spin-loading"}):r&&!d?.btnUrl&&O(ec,{className:"w-5 h-5 ml-2 -mb-1 animate-bounce"})]})})]},d?.title||f);return Qe(Km.Fragment,{children:[e&&O(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t?.length>1?Qe(vt,{defaultValue:t[0]?.title,children:[Qe(pt,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[O(ft,{className:"mb-6 text-center",children:O(Ge,{className:"inline-flex items-center w-auto mx-auto mb-0 overflow-visible",children:t.map((d,f)=>O(je,{value:d.title,children:d.title},d.title+f))})}),O(gt,{}),O(ut,{})]}),t.map((d,f)=>O(Ue,{value:d.title,children:c(d,f)},d.title+f))]}):t?.length===1&&t[0]&&c(t[0],0)]})});import sc,{memo as lc,useEffect as mc,useState as Di}from"react";import{ChevronLeftIcon as cc,ChevronRightIcon as dc}from"@heroicons/react/20/solid";import Mi from"html-react-parser";import*as L from"react";import{ChevronLeftIcon as ac,ChevronRightIcon as rc}from"@heroicons/react/20/solid";import ic from"embla-carousel-react";import{Fragment as nc,jsx as De,jsxs as Si}from"react/jsx-runtime";var ki=L.createContext(null);function So(){let e=L.useContext(ki);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var he=L.forwardRef(({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:r,children:n,...s},l)=>{let[m,c]=ic({...o,axis:e==="horizontal"?"x":"y"},a),[d,f]=L.useState(!1),[u,v]=L.useState(!1),k=L.useCallback($=>{$&&(f($.canScrollPrev()),v($.canScrollNext()))},[]),D=L.useCallback(()=>{c?.scrollPrev()},[c]),M=L.useCallback(()=>{c?.scrollNext()},[c]),H=L.useCallback($=>{$.key==="ArrowLeft"?($.preventDefault(),D()):$.key==="ArrowRight"&&($.preventDefault(),M())},[D,M]);return L.useEffect(()=>{!c||!t||t(c)},[c,t]),L.useEffect(()=>{if(c)return k(c),c.on("reInit",k),c.on("select",k),()=>{c?.off("select",k)}},[c,k]),De(ki.Provider,{value:{carouselRef:m,api:c,opts:o,orientation:e||(o?.axis==="y"?"vertical":"horizontal"),scrollPrev:D,scrollNext:M,canScrollPrev:d,canScrollNext:u},children:De("div",{ref:l,onKeyDownCapture:H,className:i("relative",r),role:"region","aria-roledescription":"carousel",...s,children:n})})});he.displayName="Carousel";var ye=L.forwardRef(({className:e,classNameContent:o,...t},a)=>{let{carouselRef:r,orientation:n}=So();return De("div",{ref:r,className:i(o,"overflow-hidden"),children:De("div",{ref:a,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ye.displayName="CarouselContent";var we=L.forwardRef(({className:e,...o},t)=>{let{orientation:a}=So();return De("div",{ref:t,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",e),...o})});we.displayName="CarouselItem";var so=L.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollPrev:s,canScrollPrev:l}=So();return Si(ie,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[De(ac,{className:"w-6 h-6"}),De("span",{className:"sr-only",children:"Previous slide"})]})});so.displayName="CarouselPrevious";var lo=L.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollNext:s,canScrollNext:l}=So();return Si(ie,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[De(rc,{className:"w-6 h-6"}),De("span",{className:"sr-only",children:"Next slide"})]})});lo.displayName="CarouselNext";var ca=L.forwardRef((e,o)=>{let{api:t}=So(),[,a]=L.useState(!1),r=L.useCallback(()=>a(l=>!l),[]);L.useEffect(()=>{if(t)return t.on("select",r),t.on("reInit",r),()=>{t.off("select",r),t.off("reInit",r)}},[t,r]);let n=t?.scrollSnapList().length||0,s=t?.selectedScrollSnap()||0;return n>1?De("div",{ref:o,className:` flex justify-center ${e.className}`,children:Array.from({length:n},(l,m)=>De(ie,{className:`navigation-item mx-1 h-1.5 w-1.5 rounded-full p-0 ${m===s?"navigation-item-active scale-125 transform bg-gray-500 hover:bg-gray-500/90":"bg-gray-200 hover:bg-gray-100"}`,"aria-label":`Go to slide ${m+1}`,onClick:()=>t?.scrollTo(m)},m))}):De(nc,{})});ca.displayName="CarouselDots";import{Fragment as da,jsx as V,jsxs as ze}from"react/jsx-runtime";var pc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return ze(da,{children:[V("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:V("img",{className:"inset-0 h-full w-full object-cover",src:e?.thumbnailDesktop,alt:e?.title})}),ze("div",{className:"mt-4 md:pr-3",children:[V("div",{className:"font-semibold text-gray-900 group-hover:text-pink-500 md:text-lg md:leading-tight ",children:e?.title}),e?.description&&V("div",{className:"mt-2 line-clamp-2 text-sm text-gray-500 md:text-sm",children:Mi(e?.description??"")}),ze("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&ze(da,{children:[V(ce,{variant:"default",className:"shink-0 justify-start whitespace-normal text-left text-sm md:line-clamp-1 ",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&V("span",{className:" flex-none leading-none text-gray-300 ",children:"\xB7"})]}),e?.totalViews&&V("div",{className:"flex-none text-sm text-gray-500",children:e.totalViews})]})]})]})},fc=({dataBlog:e,setCarouselRef:o,carouselRef:t,setCurrent:a,handleOnClickItem:r})=>{let{blogList:n=[],isShowBtn:s,btnName:l,btnUrl:m="#",isNewTab:c,classNameItem:d}=e??{};return mc(()=>{!t||!a||(a(t.selectedScrollSnap()+1),t.on("select",()=>{a&&a(t.selectedScrollSnap()+1)}))},[t,a]),ze(da,{children:[V(he,{opts:{dragFree:!1},setApi:o,className:"w-full",children:V(ye,{classNameContent:"!overflow-visible",className:"-ml-5",children:n?.map(f=>V(we,{className:"basis-11/12 pl-5 md:basis-1/2 lg:basis-4/12",children:V("div",{onClick:u=>r(u,f?.id,f?.url),className:i("group cursor-pointer",d),children:V(pc,{blog:f})},f?.id)},f?.id))})}),s&&V("div",{className:"mt-8 flex w-full items-center justify-center md:mt-10 ",children:ze(He,{action:m&&m,newTab:c,variant:"outline",children:[Mi(l||"Xem th\xEAm")," "]})})]})},gc=({carouselRef:e})=>ze(ie,{onClick:()=>e?.scrollPrev(),disabled:!e?.canScrollPrev(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[V(cc,{className:"h-6 w-6"}),V("span",{className:"sr-only",children:"Previous slide"})]}),uc=({carouselRef:e})=>ze(ie,{onClick:()=>e?.scrollNext(),disabled:!e?.canScrollNext(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[V(dc,{className:"h-6 w-6"}),V("span",{className:"sr-only",children:"Next slide"})]}),mr=lc(({dataHeading:e,dataBlog:o,onClickModal:t,onClickLoadMore:a})=>{let r=(c,d,f)=>{c?.preventDefault(),c?.stopPropagation(),t?t(d):window.open(f,"_blank")},[n,s]=Di(null),[,l]=Di(0),m=()=>n?ze("div",{className:"ml-3 hidden items-center space-x-2 md:flex",children:[V(gc,{carouselRef:n}),V(uc,{carouselRef:n})]}):V(da,{});return ze(sc.Fragment,{children:[ze("div",{className:" flex items-center justify-between",children:[e&&V(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"left",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),V(m,{})]}),V(fc,{dataBlog:o?.[0],onClickLoadMore:a,index:0,setCarouselRef:s,carouselRef:n,setCurrent:l,handleOnClickItem:r})]})});import{Fragment as hc,jsx as mo}from"react/jsx-runtime";var vc=({template:e,dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return mo(ma,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});case 2:return mo(mr,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return mo(ma,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},xc=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})=>mo(hc,{children:vc({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})}),bc=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t=[],idSection:a,className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:m})=>mo(B,{className:i("overflow-hidden",r),idSection:a,background:n,children:mo(xc,{dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:s,onClickModal:l,onClickLoadMore:m})});import*as fa from"react";import{enUS as Pc,vi as Cc}from"date-fns/locale";import{ChevronLeft as Rc,ChevronRight as Tc}from"lucide-react";import kc from"lunisolar";import{DayPicker as Sc}from"react-day-picker";import*as Ii from"react";import*as Do from"@radix-ui/react-checkbox";import{CheckIcon as yc}from"@heroicons/react/16/solid";import{cva as Ai}from"class-variance-authority";import{jsx as cr}from"react/jsx-runtime";var wc=Ai("peer shrink-0 rounded border-2 disabled:bg-gray-300 border-gray-300 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-default disabled:bg-gray-100 data-[state=checked]:border-none disabled:data-[state=checked]:bg-gray-400 disabled:data-[state=checked]:text-gray-100 data-[state=checked]:bg-pink-500 data-[state=checked]:text-white",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),Nc=Ai("",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),pa=Ii.forwardRef(({className:e,size:o,...t},a)=>cr(Do.Root,{ref:a,className:i(wc({size:o}),e),...t,children:cr(Do.Indicator,{className:i("flex items-center justify-center text-current"),children:cr(yc,{className:i(Nc({size:o}))})})}));pa.displayName=Do.Root.displayName;import{Fragment as Lc,jsx as qe,jsxs as dr}from"react/jsx-runtime";var Dc=({date:e,cusContent:o})=>{let t=null;return t=kc(e).lunar,dr(Lc,{children:[o?o(e):e.getDate(),t&&qe("span",{className:"luna-date absolute right-0.5 top-1 hidden text-[8px] leading-none group-[.show-luna]:block",children:t.day})]})},Mc={formatCaption:e=>`Th\xE1ng ${e.getMonth()+1}/${e.getFullYear()}`,formatWeekdayName:e=>{let o=e.getDay();return["CN","T2","T3","T4","T5","T6","T7"][o]}};function Ic({isShow:e,setIsShow:o,lang:t}){let a=fa.useId();return qe("div",{className:"w-full p-3 pt-0",children:dr("div",{className:"flex cursor-pointer items-center space-x-2 border-t border-gray-100 pt-3",children:[qe(pa,{checked:e,id:`check-show-luna-${a}`,onCheckedChange:r=>{typeof r=="boolean"&&o(r)}}),qe("label",{htmlFor:`check-show-luna-${a}`,className:"cursor-pointer text-sm leading-none text-gray-900 peer-disabled:cursor-default peer-disabled:text-gray-400",children:t==="vi"?"Hi\u1EC7n ng\xE0y \xE2m l\u1ECBch":"Show lunar date"})]})})}var Ac=e=>e.getDay()===0||e.getDay()===6;function ga({className:e,classNames:o,showOutsideDays:t=!1,enableLunaDate:a=!1,lang:r="vi",cusContentDay:n,...s}){let[l,m]=fa.useState(!0);return qe(Sc,{locale:r==="vi"?Cc:Pc,showOutsideDays:t,className:i("b w-fit rounded-b-md border border-gray-200 bg-white shadow-md",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-y-0",month:"p-3 pt-0 w-full",caption:"flex justify-center p-3 bg-blue-50 relative items-center -mx-3 mb-3",caption_label:"text-sm font-medium text-gray-900",nav:"space-x-1 flex items-center",nav_button:i(We({variant:"transparent"}),"h-7 w-7 p-0 text-gray-900 hover:bg-transparent hover:opacity-70"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse",head_row:"flex space-x-0.5",head_cell:i("w-11 rounded-md text-xs font-medium text-gray-500 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),row:"flex w-full mt-0.5 space-x-0.5",cell:"h-11 w-11 text-center text-sm p-0 relative border-none",day:i(We({variant:"transparent"}),"group relative h-11 w-11 p-0 text-center text-sm font-semibold focus-within:relative focus-within:z-20 aria-selected:opacity-100 [&.day-range-end.day-range-start]:rounded-md aria-selected:[&:not(.day-range-middle)]:bg-pink-500 aria-selected:[&:not(.day-range-middle)]:text-white",a&&l&&"show-luna"),day_range_end:"day-range-end [&.day-range-end]:rounded-l-none",day_range_start:"day-range-start [&.day-range-start]:rounded-r-none",day_today:"day-today [&:not([aria-selected])]:text-pink-500 [&:not([aria-selected])]:border-gray-200",day_outside:"day-outside opacity-50 aria-selected:bg-accent/50 aria-selected:opacity-30",day_disabled:"opacity-50",day_range_middle:i("group/mid day-range-middle !rounded-none !bg-pink-50 text-gray-900 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),day_hidden:"invisible",...o},modifiers:{weekend:Ac},modifiersClassNames:{weekend:"text-red-600"},components:{IconLeft:()=>qe(Rc,{className:"h-6 w-6"}),IconRight:()=>qe(Tc,{className:"h-6 w-6"}),DayContent:c=>qe(Dc,{date:c.date,cusContent:n}),Months:({children:c})=>dr("div",{className:"w-full",children:[qe("div",{className:i("months-wrapper flex flex-col sm:flex-row"),children:c}),a&&qe(Ic,{isShow:l,setIsShow:m,lang:r})]})},formatters:r==="vi"?Mc:{},...s})}ga.displayName="Calendar";import{QuestionMarkCircleIcon as Ec,XCircleIcon as Hc}from"@heroicons/react/16/solid";import{format as ua}from"date-fns";import{Calendar as Fc}from"lucide-react";import*as Ei from"react";import*as xt from"@radix-ui/react-popover";import{jsx as Li}from"react/jsx-runtime";var Mo=xt.Root,Io=xt.Trigger,co=Ei.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},r)=>Li(xt.Portal,{children:Li(xt.Content,{ref:r,align:o,sideOffset:t,className:i("z-50 w-72 rounded-md border border-gray-200 bg-white p-4 sm:p-5 text-gray-900 shadow-small outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));co.displayName=xt.Content.displayName;import{Fragment as Hi,jsx as Ne,jsxs as Ao}from"react/jsx-runtime";var zc=({label:e,placeholder:o="Select a value",size:t=1,message:a,isError:r,disabled:n,dateFormat:s="dd/MM/yyyy",buttonProps:l,popoverProps:m,calendarProps:c,popoverContentProps:d})=>{let f=c?.selected||null;return Ao("div",{children:[Ao(Mo,{...m,children:[Ne(Io,{asChild:!0,children:Ao(Se,{variant:"secondary",className:i("relative h-11 w-full justify-between overflow-visible text-left text-sm font-normal text-gray-900 ring-inset hover:ring-1 hover:ring-gray-400 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 [&[data-state=open]]:border-pink-500 [&[data-state=open]]:ring-1 [&[data-state=open]]:ring-pink-500",t===2&&"h-12 text-base",(!f||!(f instanceof Date)&&typeof f=="object"&&(!("from"in f)||!f.from))&&"text-gray-500",r&&"border-red-500 ring-1 ring-red-500"),disabled:n,...l,children:[Ne("div",{className:"line-clamp-1 flex-1",children:f instanceof Date?ua(f,s):f&&typeof f=="object"&&"from"in f&&"to"in f?Ne(Hi,{children:f.from?f.to?Ao(Hi,{children:[Ne("span",{className:"date-from",children:ua(f.from,s)})," ",Ne("span",{className:"date-separator",children:"-"}),Ne("span",{className:"date-to",children:ua(f.to,s)})]}):ua(f.from,s):o}):o}),e&&Ne("span",{className:i("absolute -top-2 left-2 bg-white px-1.5 text-xs text-gray-500",t===2&&" -top-2.5 text-sm",r&&"text-red-500"),children:e}),Ne(Fc,{className:"ml-2 h-4 w-4 flex-none text-gray-500"})]})}),Ne(co,{className:"w-auto border-none !p-0",...d,children:Ne(ga,{...c,defaultMonth:f&&typeof f=="object"&&"from"in f?f.from:f instanceof Date?f:void 0})})]}),a&&Ao("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[r?Ne(Hc,{width:16,height:16,className:"text-red-500"}):Ne(Ec,{width:16,height:16,className:"text-gray-500"}),Ne("span",{className:i(r?"text-red-500":"text-gray-500",t===2?"text-sm":"text-xs"),children:a})]})]})};import{useEffect as Wc,useState as Wi}from"react";import{QuestionMarkCircleIcon as $c,XCircleIcon as Gc}from"@heroicons/react/16/solid";import{isValid as jc}from"date-fns";import*as Xe from"react";import{ChevronDownIcon as Fi,ChevronUpIcon as _c,CheckIcon as Bc,XCircleIcon as Oc}from"@heroicons/react/16/solid";import{QuestionMarkCircleIcon as Vc}from"@heroicons/react/24/outline";import*as C from"@radix-ui/react-select";import{jsx as W,jsxs as Lo}from"react/jsx-runtime";var Eo=Xe.forwardRef(({className:e,children:o,label:t,message:a,size:r,isError:n,disabled:s,...l},m)=>Lo("div",{ref:m,className:i("select-mobase relative",e,s?"disabled":"",n?"[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-red-500 [&>.select-mobase-button]:ring-1":"",r===2?"[&>.select-mobase-button]:text-base [&>.select-mobase-button]:h-12":""),children:[t&&W("span",{className:i("mobase-select-label absolute bg-white -top-2 px-1.5 left-2 text-xs text-gray-500 z-[1]",r===2&&"text-sm -top-2.5",n&&"text-red-500"),children:t}),W(C.Root,{disabled:s,...l,children:o}),a&&Lo("div",{className:i("mobase-select-message flex space-x-1 items-center mt-1 text-gray-500",n&&"text-red-500"),children:[n?W(Oc,{width:16,height:16}):W(Vc,{width:16,height:16}),W("span",{className:i(r===2?"text-sm":"text-xs"),children:a})]})]})),Ho=C.Value,po=Xe.forwardRef(({className:e,children:o,...t},a)=>Lo(C.Trigger,{ref:a,className:i("select-mobase-button bg-white w-full ring-0 transition-all focus-visible:border-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent focus-visible:ring-1 focus-visible:!ring-pink-500 rounded-md border border-gray-300 data-[placeholder]:text-gray-500 p-3 disabled:bg-gray-50 disabled:border-gray-200 disabled:pointer-events-none flex items-center justify-between data-[state=open]:border-pink-500 data-[state=open]:ring-1 hover:ring-1 hover:ring-gray-400 data-[state=open]:ring-pink-500 text-gray-900 h-11 ring-inset text-sm",e),...t,children:[W("div",{className:"line-clamp-1 text-left",children:o}),W(C.Icon,{asChild:!0,children:W(Fi,{className:"h-4 w-4 text-gray-500 flex-none"})})]}));po.displayName=C.Trigger.displayName;var pr=Xe.forwardRef(({className:e,...o},t)=>W(C.ScrollUpButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1",e),...o,children:W(_c,{className:"h-5 w-5"})}));pr.displayName=C.ScrollUpButton.displayName;var fr=Xe.forwardRef(({className:e,...o},t)=>W(C.ScrollDownButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1 bg-gradient-to-t from-white to-transparent",e),...o,children:W(Fi,{className:"h-5 w-5"})}));fr.displayName=C.ScrollDownButton.displayName;var fo=Xe.forwardRef(({className:e,children:o,position:t="popper",...a},r)=>W(C.Portal,{children:Lo(C.Content,{ref:r,className:i("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900 shadow-small data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...a,children:[W(pr,{}),W(C.Viewport,{className:i("p-0",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),W(fr,{})]})}));fo.displayName=C.Content.displayName;var Fo=Xe.forwardRef(({className:e,children:o,...t},a)=>W(C.Group,{ref:a,className:i("relative p-1 after:w-full border-b border-gray-200 last:border-0",e),...t,children:o})),zi=Xe.forwardRef(({className:e,...o},t)=>W(C.Label,{ref:t,className:i("pr-2 pl-7 py-1.5 text-sm font-semibold z-[1]",e),...o}));zi.displayName=C.Label.displayName;var Tt=Xe.forwardRef(({className:e,children:o,...t},a)=>Lo(C.Item,{ref:a,className:i("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-7 pr-2 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[W("span",{className:"absolute left-2 flex h-4 w-4 items-center justify-center",children:W(C.ItemIndicator,{children:W(Bc,{className:"h-4 w-4 text-pink-500"})})}),W(C.ItemText,{children:o})]})),_i=Xe.forwardRef(({className:e,...o},t)=>W(C.Separator,{ref:t,className:i("-mx-1 my-1 h-px bg-muted",e),...o}));_i.displayName=C.Separator.displayName;var Bi=["Th\xE1ng 01","Th\xE1ng 02","Th\xE1ng 03","Th\xE1ng 04","Th\xE1ng 05","Th\xE1ng 06","Th\xE1ng 07","Th\xE1ng 08","Th\xE1ng 09","Th\xE1ng 10","Th\xE1ng 11","Th\xE1ng 12"],Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],gr=(e,o,t,a)=>{let r=new Date(e,o,0).getDate(),n=t&&e===t.getFullYear()&&o===t.getMonth()+1?t.getDate():1,s=a&&e===a.getFullYear()&&o===a.getMonth()+1?a.getDate():r;return{daysInMonth:r,startDay:n,endDay:s}},Vi=(e,o,t,a)=>{let r=t?t.getFullYear():e,n=a?a.getFullYear():o;return Array.from({length:n-r+1},(s,l)=>n-l)};import{jsx as ee,jsxs as Ye}from"react/jsx-runtime";var Uc=({label:e,selected:o,onSelect:t,size:a=1,message:r,isError:n,disabled:s,dateFormat:l="dd/MM/yyyy",lang:m="vi",fromYear:c=1900,toYear:d=new Date().getFullYear(),disableUnselect:f=!1})=>{let[u,v]=Wi(o??null),k=Math.min(c,d),D=Math.max(c,d),M=l==="MM/yyyy",H=(N,re)=>{if(re===0){v(void 0),t?.(void 0);return}let G=u?.getFullYear()||new Date().getFullYear(),oa=u?.getMonth()??0,_t=u?.getDate()??1;N==="month"&&re!==null&&(oa=re-1),N==="year"&&re!==null&&(G=re),M?_t=1:N==="day"&&re!==null&&(_t=re);let si=gr(G,oa+1).daysInMonth;_t>si&&(_t=1);let Po=new Date(G,oa,_t);jc(Po)&&(v(Po),t?.(Po))},[$,I]=Wi(!1),zt=N=>{I(N)};return Wc(()=>{v(o??null)},[o]),Ye("div",{className:i("relative",s&&"cursor-no-drop"),children:[Ye("div",{className:i("relative block h-11 w-full rounded-md border border-gray-300 bg-white px-1 py-3 text-sm text-gray-900 outline-none ring-inset transition-all placeholder:text-gray-500 hover:ring-1 hover:ring-gray-400 focus:border-pink-500 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50",$&&"border-pink-500 ring-1 ring-pink-500",a===2&&"h-12 text-base",u?"":"text-gray-500",n&&"border-red-500 ring-1 ring-red-500",s&&"pointer-events-none select-none border-gray-200 bg-gray-50"),children:[e&&ee("span",{className:i("absolute -top-2 left-2 bg-white px-1.5 text-xs text-gray-500",a===2&&" -top-2.5 text-sm",n&&"text-red-500"),children:e}),Ye("div",{className:"flex h-full flex-row divide-x",children:[!M&&Ye(Eo,{value:u?u.getDate().toString().padStart(2,"0"):"",onValueChange:N=>H("day",parseInt(N,10)),onOpenChange:zt,className:"w-[30%]",children:[ee(po,{className:"h-full w-full rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:ee(Ho,{placeholder:m==="vi"?"Ng\xE0y":"Day"})}),ee(fo,{onCloseAutoFocus:N=>N.preventDefault(),children:Ye(Fo,{children:[!f&&ee(Tt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:gr(u?.getFullYear()||new Date().getFullYear(),(u?.getMonth()??0)+1).daysInMonth},(N,re)=>(re+1).toString().padStart(2,"0")).map(N=>ee(Tt,{value:N,children:N},N))]})})]}),Ye(Eo,{value:u?(u.getMonth()+1).toString():"",onValueChange:N=>H("month",parseInt(N,10)),onOpenChange:zt,className:i(M?"w-1/2":"w-2/5"),children:[ee(po,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:ee(Ho,{placeholder:m==="vi"?"Th\xE1ng":"Month"})}),ee(fo,{onCloseAutoFocus:N=>N.preventDefault(),children:Ye(Fo,{children:[!f&&ee(Tt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:12},(N,re)=>re+1).map(N=>ee(Tt,{value:N.toString(),children:m==="vi"?Bi[N-1]:Oi[N-1]},N))]})})]}),Ye(Eo,{value:u?u.getFullYear().toString():"",onValueChange:N=>H("year",parseInt(N,10)),onOpenChange:zt,className:i(M?"w-1/2":"w-[30%]"),children:[ee(po,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:ee(Ho,{placeholder:m==="vi"?"N\u0103m":"Year"})}),ee(fo,{onCloseAutoFocus:N=>N.preventDefault(),children:Ye(Fo,{children:[!f&&ee(Tt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Vi(k,D).map(N=>ee(Tt,{value:N.toString(),children:N},N))]})})]})]})]}),r&&Ye("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[n?ee(Gc,{width:16,height:16,className:"text-red-500"}):ee($c,{width:16,height:16,className:"text-gray-500"}),ee("span",{className:i(n?"text-red-500":"text-gray-500",a===2?"text-sm":"text-xs"),children:r})]})]})};import*as Wt from"react";import*as F from"@radix-ui/react-alert-dialog";import{jsx as bt,jsxs as Xc}from"react/jsx-runtime";var Qc=F.Root,qc=F.Trigger,$i=F.Portal,ur=Wt.forwardRef(({className:e,...o},t)=>bt(F.Overlay,{className:i("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...o,ref:t}));ur.displayName=F.Overlay.displayName;var Gi=Wt.forwardRef(({className:e,...o},t)=>Xc($i,{children:[bt(ur,{}),bt(F.Content,{ref:t,className:i("fixed left-[50%] w-[90vw] bg-white text-gray-700 border border-gray-300 top-[50%] z-50 grid w- max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-xl",e),...o})]}));Gi.displayName=F.Content.displayName;var ji=({className:e,...o})=>bt("div",{className:i("flex flex-col space-y-2 text-left",e),...o});ji.displayName="AlertDialogHeader";var Ui=({className:e,...o})=>bt("div",{className:i("flex flex-row justify-end space-x-4",e),...o});Ui.displayName="AlertDialogFooter";var Qi=Wt.forwardRef(({className:e,...o},t)=>bt(F.Title,{ref:t,className:i("text-lg text-gray-900 font-semibold",e),...o}));Qi.displayName=F.Title.displayName;var qi=Wt.forwardRef(({className:e,...o},t)=>bt(F.Description,{ref:t,className:i("text-sm text-muted-foreground",e),...o}));qi.displayName=F.Description.displayName;var Xi=Wt.forwardRef(({className:e,...o},t)=>bt(F.Action,{ref:t,className:i(We({variant:"primary"}),"",e),...o}));Xi.displayName=F.Action.displayName;var Yi=Wt.forwardRef(({className:e,...o},t)=>bt(F.Cancel,{ref:t,className:i(We({variant:"secondary"}),e),...o}));Yi.displayName=F.Cancel.displayName;import{memo as rd,useState as id}from"react";import{useEffect as Yc,useState as Ki}from"react";import Ji from"html-react-parser";import{motion as Zc}from"motion/react";import*as Zi from"@radix-ui/react-aspect-ratio";var E=Zi.Root;import{Fragment as en,jsx as te,jsxs as zo}from"react/jsx-runtime";var Kc=({guideGroup:e,mockup:o})=>{let[t,a]=Ki(),[r,n]=Ki(0),s={open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeInOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeInOut"}}};return Yc(()=>{t&&(n(t.selectedScrollSnap()+1),t.on("select",()=>{n(t.selectedScrollSnap()+1)}))},[t]),te(en,{children:e?.stepList&&e?.stepList?.length>0&&zo("div",{className:"mx-auto flex max-w-3xl flex-nowrap justify-center",children:[te("div",{className:"h-auto w-64 flex-none",children:zo("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&zo(en,{children:[te("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),te("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),te("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),te("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),te("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:zo(he,{setApi:a,children:[te(ye,{className:"ml-0",children:e?.stepList.map((l,m)=>te(we,{className:"pl-0",children:te(E,{ratio:o==="small"?540/960:540/1168,children:l?.image&&te("img",{src:l.image,className:"size-full object-contain",alt:l.title})})},m))}),te(so,{className:"left-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"}),te(lo,{className:"right-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"})]})})]})}),te("div",{className:"flex flex-auto pl-12 pt-4",children:te("ul",{className:"flex flex-col",children:e?.stepList.map((l,m)=>zo("li",{className:i("relative min-h-20 pb-8 pl-14 after:absolute after:left-4 after:top-0 after:h-full after:border-l after:border-dashed after:border-gray-200 last:min-h-0 last:pb-0 last:after:hidden",m+1===r?"":"cursor-pointer"),onClick:()=>t&&t.scrollTo(m),children:[te("div",{className:i("absolute -top-1.5 left-0 z-10 flex h-8 w-8 items-center justify-center rounded-full text-sm font-bold",m+1===r?"bg-pink-500 text-white":"bg-pink-100 text-pink-500"),children:m+1}),te("div",{className:i(" text-sm font-medium",m+1===r?"text-pink-500":"text-gray-900"),children:Ji(l.title)}),l.content&&te(Zc.div,{initial:"closed",animate:m+1===r?"open":"closed",variants:s,style:{overflow:"hidden"},children:te("div",{className:"mt-3 text-sm text-gray-700",children:Ji(l.content)})})]},m))})})]})})},vr=Kc;import{useEffect as Jc,useRef as ed,useState as va}from"react";import{ChevronRightIcon as tn}from"@heroicons/react/20/solid";import td from"embla-carousel-autoplay";import xa from"html-react-parser";import{Fragment as xr,jsx as y,jsxs as ue}from"react/jsx-runtime";var od=({open:e,setOpenDialog:o,dataStep:t,mockup:a})=>{let[r,n]=va(0),[s,l]=va();return Jc(()=>{s&&(n(s.selectedScrollSnap()+1),s.on("select",()=>{n(s.selectedScrollSnap()+1)}))},[s]),!t||!t?.stepList?.length?null:y(ct,{open:e,onOpenChange:o,children:ue($e,{position:"bottom",height:"full",children:[y(aa,{children:y(ra,{className:"line-clamp-1",children:t?.title})}),ue(Ct,{className:"grid overflow-hidden p-0 ",children:[y(he,{setApi:l,className:" grid overflow-hidden",children:y(ye,{className:"ml-0 h-full",children:t.stepList.map((m,c)=>y(we,{className:"h-full w-full pl-0",children:ue("div",{className:"flex h-full flex-col overflow-y-auto",children:[y("div",{className:" relative flex w-full flex-none justify-center bg-gray-100 p-5",children:y("div",{className:i("mx-auto",a==="small"?"w-56":"w-52"),children:ue("div",{className:i("relative mx-auto w-full",a==="none"?"":"rounded-[2rem] border-8 border-gray-800 bg-gray-800 shadow-md",a==="small"?"px-0.5 py-3":""),children:[a!=="none"&&ue(xr,{children:[y("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),y("div",{className:i("relative h-full w-full overflow-hidden",a==="none"?"":"rounded-[1.5rem] bg-gray-200",a==="small"?"rounded-xl":""),children:y(E,{ratio:a==="small"?540/960:540/1168,children:m?.image&&y("img",{src:m.image,className:"size-full object-contain",alt:m.title})})})]})})}),ue("div",{className:"p-5 pb-12",children:[y("div",{className:"font-semibold",children:xa(m.title)}),m?.content&&y("div",{className:"mt-3 text-sm text-gray-800",children:xa(m.content)})]})]})},c))})}),y("div",{className:"text-muted-foreground fixed bottom-3 left-1/2 flex -translate-x-1/2 items-center justify-center gap-1.5 rounded-full bg-gray-900/50 px-3 py-1 py-2 text-center text-sm text-gray-700",children:t.stepList.map((m,c)=>y("div",{className:`h-2 w-2 cursor-pointer rounded-full ${c+1===r?"bg-white":"bg-white/40"}`,onClick:()=>s&&s.scrollTo(c)},c))})]})]})})},ad=({dataGuide:e,mockup:o,isStep:t})=>{let[a,r]=va(!1),[n,s]=va(null),l=ed(td({delay:3500,stopOnInteraction:!1,stopOnMouseEnter:!1})),m=c=>{s(e?.[c]||null),r(!0)};return e?.length===0?null:ue(xr,{children:[e?.length>1?y("div",{className:"-mx-5 grid grid-cols-1 md:mx-0",children:e.map((c,d)=>ue("div",{className:"relative flex cursor-pointer flex-nowrap items-center space-x-4 pl-5 ",onClick:()=>m(d),children:[y("div",{className:"borde flex h-28 w-20 justify-center overflow-hidden rounded-t-lg bg-gray-100 p-2 pb-0",children:(c?.avatar||c?.stepList?.[0]?.image)&&y("img",{src:c.avatar||c?.stepList?.[0]?.image,className:"h-full w-full object-cover object-top",alt:c.title})}),ue("div",{className:i("relative grid min-h-32 flex-1 grid-cols-1 items-center pr-8 ",d+1!=e.length&&"after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-gray-200"),children:[ue("div",{className:"py-2",children:[t&&y("span",{className:"text-sm font-medium text-pink-500",children:`B\u01B0\u1EDBc ${d+1}`}),y("div",{className:"font-semibold",children:xa(c.title)}),c?.description&&y("div",{className:"mt-1 text-sm text-gray-500",children:xa(c.description)})]}),y("div",{className:" absolute right-4 top-1/2 -translate-y-1/2 text-gray-500",children:y(tn,{className:"h-6 w-6"})})]})]},d))}):e?.[0]&&e[0].stepList?.length>0&&ue("div",{className:"mx-auto flex max-w-3xl flex-col flex-wrap justify-center gap-y-6",children:[y("div",{className:"relative max-h-96 w-full flex-none overflow-hidden",style:{WebkitMask:"linear-gradient(to bottom, rgba(0, 0, 0, 1.0) 95%, rgba(0, 0, 0, 0.3) 98%, transparent 100%)"},children:y("div",{className:"mx-auto h-auto w-72",children:ue("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&ue(xr,{children:[y("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),y("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),y("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:y(he,{plugins:[l.current],children:y(ye,{className:"ml-0",children:e[0]?.stepList.map((c,d)=>y(we,{className:"pl-0",onClick:()=>m(0),children:y(E,{ratio:o==="small"?540/960:540/1168,children:c?.image&&y("img",{src:c.image,className:"size-full object-contain",alt:c.title})})},d))})})})]})})}),y("div",{className:"flex w-full flex-none justify-center",children:ue(ce,{size:"lg",variant:"primary",onClick:()=>m(0),children:["Xem chi ti\u1EBFt h\u01B0\u1EDBng d\u1EABn ",y(tn,{className:"ml-1 h-5 w-5"})]})})]}),a&&y(od,{open:a,setOpenDialog:r,dataStep:n,mockup:o})]})},on=ad;import{Fragment as nd,jsx as se,jsxs as _o}from"react/jsx-runtime";var an=({direction:e,className:o})=>{let t=e==="left"?{viewBox:"0 0 20 40",d:"M20 0H0L18 20L0 40H20V0Z",width:"20"}:{viewBox:"0 0 19 40",d:"M0.906128 0H0V40H0.906128L19 20L0.906128 0Z",width:"19"};return se("svg",{fill:"none",viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",className:i("flex-0 absolute w-5 transition-all",o),children:se("path",{d:t.d,fill:"currentColor"})})},br=rd(({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,mockup:r,isStep:n})=>{let{showGradientOverlay:s=!0,gradientOverlayColor:l,className:m}=o||{},[c,d]=id(t?.[0]?.title||"");return _o(nd,{children:[e&&se(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t&&t?.length>0&&_o(ao,{children:[se(Ve,{lessThan:"md",children:se(on,{dataGuide:t,mockup:r,isStep:n})}),se(Ve,{greaterThan:"sm",children:t?.length>1?_o(vt,{defaultValue:t[0]?.title,onValueChange:f=>d(f),children:[_o(pt,{showGradientOverlay:s,gradientOverlayColor:l,className:m,children:[se(ft,{className:"mb-6 text-center",children:se(Ge,{className:i("mx-auto mb-0 inline-flex w-auto items-center overflow-visible",n?"space-x-10":""),children:t.map((f,u)=>{let v=u===t.length-1,k=c===f?.title||"";return _o(je,{value:f.title,className:i(n?"relative h-10 border-0 bg-pink-100 px-3 first:rounded-l-md first:pl-5 last:rounded-r-md last:pl-3 last:pr-5":"",k&&n?"data-[state=active]:bg-pink-500 data-[state=active]:text-white":""),children:[n&&u!==0&&se(an,{direction:"left",className:i("right-full top-0",k?"text-pink-500":"text-pink-100")}),f.title,n&&!v&&se(an,{direction:"right",className:i("left-full top-0",k?"text-pink-500":"text-pink-100")})]},f.title+u)})})}),se(gt,{}),se(ut,{})]}),t.map((f,u)=>se(Ue,{value:f.title,children:se(vr,{guideGroup:f,mockup:r})},f.title+u))]}):t?.length===1&&t[0]&&se(vr,{guideGroup:t[0],mockup:r})})]}),a&&se(h,{isFullInMobile:a?.isFullInMobile,buttons:a?.buttons,className:a?.className,align:"center"})]})});import{Fragment as cd,jsx as Bo}from"react/jsx-runtime";var sd=({template:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,mockup:n,isStep:s})=>{switch(e){case 1:return Bo(br,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s});default:return Bo(br,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s})}},ld=({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})=>Bo(cd,{children:sd({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})}),md=({dataHeading:e,dataGuide:o,dataHorizontalScroll:t,dataButtons:a,className:r,background:n,template:s=1,mockup:l="default",isStep:m=!1})=>Bo(B,{className:i(r),background:n,children:Bo(ld,{dataHeading:e,template:s,dataHorizontalScroll:t,dataGuide:o,dataButtons:a,mockup:l,isStep:m})});import{ChevronLeft as dd,ChevronRight as pd}from"lucide-react";import{Fragment as fd,jsx as Me,jsxs as rn}from"react/jsx-runtime";function nn({current:e,total:o,onChange:t}){let a=r=>Me("li",{children:Me("button",{className:i(Vt({variant:e===r?"outline":"secondary",size:"sm"})),onClick:()=>t(r),children:r})},r);return Me("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center"),children:rn("ul",{className:i("flex flex-row flex-wrap items-center gap-2"),children:[o>1&&Me("li",{children:Me("button",{className:i(Vt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>e>1&&t(e-1),children:Me(dd,{className:"h-4 w-4"})})}),o<=6?Array(o).fill(0).map((r,n)=>a(n+1)):rn(fd,{children:[a(1),e===1&&[a(2),a(3)],e>3&&Me("li",{children:Me("button",{className:i(Vt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e-3),children:"..."})}),e>2&&e!==1&&e!==o&&a(e-1),e>1&&e<o&&a(e),e<o-1&&e!==1&&a(e+1),e===o&&[a(o-2),a(o-1)],e<o-2&&e!==o&&Me("button",{className:i(Vt({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e+3),children:"..."}),a(o)]}),o>1&&Me("li",{children:Me("button",{className:i(Vt({variant:"secondary",size:"sm"})),disabled:e===o,onClick:()=>e<o&&t(e+1),children:Me(pd,{className:"h-4 w-4"})})})]})})}import{forwardRef as gd}from"react";import{QuestionMarkCircleIcon as ud}from"@heroicons/react/24/outline";import{XCircleIcon as vd}from"@heroicons/react/24/solid";import{jsx as go,jsxs as sn}from"react/jsx-runtime";var xd=gd(({disabled:e,isError:o,message:t,label:a,className:r,inputClassName:n,size:s,rows:l=3,...m},c)=>sn("div",{className:i("relative",r,o&&"mobase-text-area-error"),children:[a&&go("span",{className:i("mobase-text-area-label absolute bg-white -top-2.5 px-1.5 left-2 text-sm text-gray-500",s===2&&" -top-2.5 text-sm"),children:a}),go("textarea",{disabled:e,ref:c,className:i("mobase-text-area-box bg-white w-full text-sm transition-all rounded-md border border-gray-300 placeholder:text-gray-500 p-3 text-gray-900 focus:border-pink-500 disabled:bg-gray-50 disabled:border-gray-200 outline-none block",s===2&&"text-base",n),rows:l,...m}),t&&sn("div",{className:"mobase-text-area-message flex space-x-1 items-center mt-0.5",children:[o?go(vd,{width:16,height:16,className:"text-red-500"}):go(ud,{width:16,height:16,className:"text-gray-500"}),go("span",{className:i("text-gray-500 ",s===2?"text-sm":"text-xs"),children:t})]}),go("style",{children:`
71
71
  .mobase-text-area-box:hover {
72
72
  box-shadow: 0px 0px 0px 1px rgb(var(--mobase-gray-400) / 1) inset;
73
73
  }
@@ -243,7 +243,7 @@ import*as Ro from"react";import{ChevronDownIcon as pm}from"@heroicons/react/20/s
243
243
  opacity: 0.15;
244
244
  }
245
245
  }
246
- `})]})}})()})}import*as us from"react";import*as Je from"@radix-ui/react-slider";import{jsx as At,jsxs as af}from"react/jsx-runtime";var vs=us.forwardRef(({className:e,showIndicatorValue1:o,showIndicatorValue2:t,...a},r)=>af(Je.Root,{ref:r,className:i("relative flex w-full touch-none select-none items-center",a?.disabled&&"opacity-40",e),...a,children:[At(Je.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-gray-200",children:At(Je.Range,{className:"absolute h-full bg-pink-500"})}),At(Je.Thumb,{className:"group relative",children:At("div",{className:"ring-offset-bg-white focus-visible:ring-ring block h-5 w-5 rounded-full border-2 border-pink-500 bg-white transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 group-hover:cursor-grabbing",children:o&&At("div",{className:" absolute bottom-3/4 left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-black/90 px-2.5 py-1.5 text-sm opacity-0 duration-300 group-hover:bottom-full group-hover:opacity-100",children:o})})}),At(Je.Thumb,{className:"group relative",children:At("div",{className:"ring-offset-bg-white focus-visible:ring-ring block h-5 w-5 rounded-full border-2 border-pink-500 bg-white transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 group-hover:cursor-grabbing",children:t&&At("div",{className:" absolute bottom-3/4 left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-black/90 px-2.5 py-1.5 text-sm opacity-0 duration-300 group-hover:bottom-full group-hover:opacity-100",children:t})})})]}));vs.displayName=Je.Root.displayName;import{forwardRef as hf}from"react";import{Fragment as lf,jsx as Le,jsxs as La}from"react/jsx-runtime";var rf=({author:e=""})=>Le("div",{className:"text-center shrink-0 text-lg font-semibold text-pink-600",children:e?.charAt(0)}),nf=({author:e,avatar:o})=>Le("div",{className:"w-9 h-9 flex items-center mt-0.5 justify-center rounded-full bg-pink-200 relative overflow-hidden",children:o?Le("img",{src:o,alt:e?.charAt(0),className:"shrink-0 object-cover",width:36,height:36}):Le(rf,{author:e})});function sf({avatar:e="",author:o="",time:t,statusMessage:a,isOutStanding:r}){return Le(lf,{children:La("div",{className:"flex relative items-center space-x-3",children:[Le(nf,{avatar:e,author:o}),La("div",{className:"flex flex-col",children:[o&&Le("div",{className:"font-semibold text-gray-900 text-sm",children:o}),La("div",{className:"flex items-center space-x-2 text-xs",children:[t&&Le("div",{className:"text-gray-400",children:t}),a&&La("div",{className:"flex items-center space-x-2",children:[Le("div",{className:"w-1 h-1 mt-0.5 bg-gray-400 rounded-full"}),Le("div",{className:"ml-2 text-pink-500",children:a})]})]})]}),r&&Le("div",{className:"absolute right-1 top-0",children:Le("img",{alt:"",src:"https://homepage.momocdn.net/img/momo-upload-api-230629163313-638236531936463134.png",className:"w-5",loading:"lazy"})})]})})}var xs=sf;import{useState as Ns}from"react";import{StarIcon as mf}from"@heroicons/react/20/solid";import{jsx as bs,jsxs as hs}from"react/jsx-runtime";var cf={1:"K\xE9n ng\u01B0\u1EDDi m\xEA",2:"K\xE9n ng\u01B0\u1EDDi m\xEA",3:"Ch\u01B0a \u01B0ng l\u1EAFm",4:"Ch\u01B0a \u01B0ng l\u1EAFm",5:"T\u1EA1m \u1ED5n",6:"T\u1EA1m \u1ED5n",7:"\u0110\xE1ng xem",8:"\u0110\xE1ng xem",9:"C\u1EF1c ph\u1EA9m!",10:"C\u1EF1c ph\u1EA9m!"},df={1:"Kh\xF4ng h\xE0i l\xF2ng",2:"Ch\u01B0a \u01B0ng l\u1EAFm",3:"T\u1EA1m \u1ED5n",4:"H\xE0i l\xF2ng",5:"R\u1EA5t h\xE0i l\xF2ng"};function pf({point:e,max:o,className:t}){let a=o>5?cf[e||10]:df[e||5];return hs("div",{className:i("flex items-center space-x-1",t),children:[bs(mf,{className:"w-5 h-5 text-yellow-500"}),bs("div",{className:"font-semibold text-gray-900 text-sm",children:`${e}/${o}`}),hs("span",{className:"font-semibold text-gray-900 text-sm",children:[" ","\xA0\xB7 ",a]})," "]})}var ys=pf;import{useState as ff}from"react";import ws from"html-react-parser";import{jsx as gf,jsxs as uf}from"react/jsx-runtime";var zr=({children:e,maxChar:o=260,textMore:t="...Xem th\xEAm",textLess:a="Thu g\u1ECDn",btnClass:r="text-blue-500",className:n=""})=>{let[s,l]=ff(!0),m=()=>{l(!s)},c=(d,f,u=" ")=>d.length<=f?d:d.substring(0,d.lastIndexOf(u,f));return uf("div",{className:i(n),children:[s?ws(c(e,o)):ws(e),e.length>o&&gf("span",{onClick:m,className:i("read-or-hide cursor-pointer text-md w-fit pl-1 hover:underline",r),children:s?t:a})]})};import{jsx as Xt,jsxs as Ps}from"react/jsx-runtime";function vf({content:e,thumbnails:o=[],tags:t=[],commentSideBar:a,rating:r={point:10,max:10},limitContent:n=260}){let[s,l]=Ns(0),[m,c]=Ns(!1),d=f=>{c(!0),l(f)};return Ps("div",{className:"text-gray-700 mt-3 flex flex-col",children:[r.point>0&&Xt(ys,{className:"mb-0.5",point:r.point,max:r.max}),e&&Xt(zr,{className:"text-sm",maxChar:n,children:e}),t?.length>0&&Xt("div",{className:"w-full oveflow-x-auto flex items-center space-x-2 mt-2.5",children:t?.map(f=>Xt("div",{className:"w-fit rounded-full shrink-0 bg-gray-100 text-gray-700 text-xs font-semibold py-1 px-2 text-center",children:f}))}),o?.length>0&&Ps(Hr,{open:m,onOpenChange:c,className:"grid gap-2 mt-4 overflow-hidden rounded-xl md:grid-cols-4 md:gap-2 md:rounded-none grid grid-cols-2 grid-rows-1 overflow-hidden ",children:[o?.map((f,u)=>Xt(E,{onClick:()=>d(u),className:"rounded-lg cursor-pointer object-cover",ratio:4/3,children:Xt("img",{src:f.url,alt:"",className:"w-full h-full rounded-lg object-cover"})},u)),Xt(Fr,{activeSlideIndex:s,images:o?.map((f,u)=>({url:f.url,titleImage:f.titleImage,idx:u})),withSideBar:!!a,subHtmlSideBar:a})]})]})}var Cs=vf;import{jsx as bf}from"react/jsx-runtime";function xf({actions:e=[]}){return bf("div",{className:"flex items-center space-x-4 mt-4 text-gray-700",children:e})}var Rs=xf;import{jsx as Ea,jsxs as wf}from"react/jsx-runtime";var yf=hf(({avatar:e,author:o,time:t,ratingPoint:a,content:r,tags:n,thumbnails:s,actions:l=[],statusMessage:m,isReply:c,children:d,commentSideBar:f,isOutStanding:u,limitContent:v=260},k)=>wf("div",{ref:k,className:i("",c?"ml-4 py-4":"py-5"),children:[Ea(xs,{avatar:e,author:o,time:t,statusMessage:m,isOutStanding:u}),Ea(Cs,{content:r,thumbnails:s,tags:n,rating:a,commentSideBar:f,limitContent:v}),l&&l?.filter(Boolean)?.length>0&&Ea(Rs,{actions:l.filter(Boolean)}),d&&Ea("div",{className:"border-l grid grid-cols-1 divide-y divide-gray-200 ml-2 mt-3 border-l-gray-300 ",children:d})]}));import*as Lt from"react";import{cva as Nf}from"class-variance-authority";import{CheckIcon as Pf}from"@heroicons/react/16/solid";import{XIcon as Cf}from"lucide-react";import{jsx as xe,jsxs as Ha}from"react/jsx-runtime";var Rf=Nf("flex items-center shrink-0 justify-center rounded-full shrink-0",{variants:{state:{active:"bg-pink-500 text-white shadow-[0_0px_0px_3px_rgb(255,255,255),0_0px_0px_4px_rgb(var(--mobase-pink-500))]",disabled:"bg-gray-400 text-gray-200",default:"text-gray-500 bg-white shadow-[inset_0px_0px_0px_1px_rgb(var(--mobase-gray-300))]",completed:"bg-pink-300 text-white"},size:{default:"h-7 w-7 text-sm",small:"h-6 w-6 text-xs"}},defaultVariants:{state:"default",size:"default"}}),Ts=Lt.createContext("default");function Tf(){let e=Lt.useContext(Ts);if(!e)throw new Error("ProgressStepsItem must be used within a ProgressSteps");return e}var kf=Lt.memo(({type:e,icon:o,stepNumber:t,size:a,isError:r,state:n})=>{let s=a==="small"?"w-3 h-3":"w-4 h-4";return r?xe(Cf,{className:s}):Ha("div",{children:[e==="iconStep"&&xe("div",{className:s,children:o}),e==="numberStep"&&xe("div",{children:t}),e==="default"&&(n==="completed"?xe(Pf,{className:s}):xe("div",{children:t}))]})}),Sf=({step:e,currentStep:o,onValueChangeStep:t,children:a})=>{let r=Lt.useCallback(()=>{e!==o&&t(e)},[e,o,t]);return xe("div",{onClick:r,className:"flex w-full flex-col items-center justify-center gap-1 cursor-pointer",children:a})},Df=({step:e,state:o="default",size:t="default",placement:a="default",className:r,title:n,description:s,lastStep:l,fristStep:m,icon:c,isError:d,onValueChangeStep:f,...u})=>{let v=Tf();return Ha("div",{className:i("flex w-full flex-col items-center justify-center gap-1"),children:[Ha("div",{className:"flex w-full items-center justify-center gap-2",children:[xe("div",{className:i("flex h-px grow shrink-0 basis-0 bg-gray-200",m&&"opacity-0",a=="left"&&"hidden",o==="active"&&"bg-pink-300",o==="completed"&&"bg-pink-300")}),xe("div",{className:i("flex h-7 w-7 items-center justify-center rounded-full",Rf({state:o,size:t}),d&&"bg-red-500 text-white shadow-none",r),...u,children:xe(kf,{type:v,icon:c,stepNumber:e,size:t,isError:d,state:o})}),xe("div",{className:i("flex h-px grow shrink-0 basis-0 bg-gray-200",l&&"opacity-0",o==="completed"&&"bg-pink-300")})]}),Ha("div",{className:i("text-center w-full flex flex-col items-center mt-2 px-0.5",a=="left"&&"text-left items-start"),children:[n&&xe("div",{className:"text-xs font-bold text-slate-900 ",children:n}),s&&xe("div",{className:"text-xs text-gray-500 ",children:s})]})]})},Mf=({children:e,className:o,type:t="numberStep",...a})=>xe(Ts.Provider,{value:t,children:xe("div",{className:i("flex items-start justify-between w-full",o),...a,children:e})});import*as be from"react";import{Slot as Ef}from"@radix-ui/react-slot";import{Controller as Hf,FormProvider as Ff,useFormContext as zf}from"react-hook-form";import*as ks from"react";import*as _r from"@radix-ui/react-label";import{cva as If}from"class-variance-authority";import{jsx as Lf}from"react/jsx-runtime";var Af=If("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Fa=ks.forwardRef(({className:e,...o},t)=>Lf(_r.Root,{ref:t,className:i(Af(),e),...o}));Fa.displayName=_r.Root.displayName;import{jsx as Et}from"react/jsx-runtime";var _f=Ff,Ss=be.createContext({}),Bf=({...e})=>Et(Ss.Provider,{value:{name:e.name},children:Et(Hf,{...e})}),Xo=()=>{let e=be.useContext(Ss),o=be.useContext(Ds),{getFieldState:t,formState:a}=zf(),r=t(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:n}=o;return{id:n,name:e.name,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`,...r}},Ds=be.createContext({}),Ms=be.forwardRef(({className:e,...o},t)=>{let a=be.useId();return Et(Ds.Provider,{value:{id:a},children:Et("div",{ref:t,className:i("space-y-2",e),...o})})});Ms.displayName="FormItem";var Is=be.forwardRef(({className:e,...o},t)=>{let{error:a,formItemId:r}=Xo();return Et(Fa,{ref:t,className:i(a&&"text-red-500","text-gray-700 ",e),htmlFor:r,...o})});Is.displayName="FormLabel";var As=be.forwardRef(({...e},o)=>{let{error:t,formItemId:a,formDescriptionId:r,formMessageId:n}=Xo();return Et(Ef,{ref:o,id:a,"aria-describedby":t?`${r} ${n}`:`${r}`,"aria-invalid":!!t,...e})});As.displayName="FormControl";var Ls=be.forwardRef(({className:e,...o},t)=>{let{formDescriptionId:a}=Xo();return Et("p",{ref:t,id:a,className:i("text-[0.8rem] text-gray-500",e),...o})});Ls.displayName="FormDescription";var Es=be.forwardRef(({className:e,children:o,...t},a)=>{let{error:r,formMessageId:n}=Xo(),s=r?String(r?.message):o;return s?Et("p",{ref:a,id:n,className:i("text-xs font-medium text-red-500",e),...t,children:s}):null});Es.displayName="FormMessage";import*as wt from"react";import*as w from"@radix-ui/react-dropdown-menu";import{ChevronRight as Of,Check as Vf}from"lucide-react";import{jsx as pe,jsxs as Yo}from"react/jsx-runtime";var Wf=w.Root,$f=w.Trigger,Gf=w.Group,jf=w.Portal,Uf=w.Sub,Qf=w.RadioGroup,Hs=wt.forwardRef(({className:e,inset:o,children:t,...a},r)=>Yo(w.SubTrigger,{ref:r,className:i("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",o&&"pl-8",e),...a,children:[t,pe(Of,{className:"ml-auto"})]}));Hs.displayName=w.SubTrigger.displayName;var Fs=wt.forwardRef(({className:e,...o},t)=>pe(w.SubContent,{ref:t,className:i("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-gray-900 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-0",e),...o}));Fs.displayName=w.SubContent.displayName;var zs=wt.forwardRef(({className:e,sideOffset:o=4,...t},a)=>pe(w.Portal,{children:pe(w.Content,{ref:a,sideOffset:o,className:i("z-50 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white p-1 text-gray-900 shadow-small data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ",e),...t})}));zs.displayName=w.Content.displayName;var _s=wt.forwardRef(({className:e,inset:o,...t},a)=>pe(w.Item,{ref:a,className:i("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 ",o&&"pl-8",e),...t}));_s.displayName=w.Item.displayName;var Bs=wt.forwardRef(({className:e,children:o,checked:t,...a},r)=>Yo(w.CheckboxItem,{ref:r,className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 ",e),checked:t,...a,children:[Yo("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:[t===!1&&pe("div",{className:"size-3.5 rounded-sm border border-gray-400 absolute inset-0"}),pe(w.ItemIndicator,{children:pe("div",{className:"size-3.5 rounded-sm border border-pink-500 bg-pink-500 flex items-center justify-center text-white absolute inset-0",children:pe(Vf,{size:16,strokeWidth:3})})})]}),o]}));Bs.displayName=w.CheckboxItem.displayName;var Os=wt.forwardRef(({className:e,children:o,...t},a)=>Yo(w.RadioItem,{ref:a,className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 ",e),...t,children:[Yo("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:[pe("div",{className:"size-3.5 rounded-full border border-gray-400 absolute inset-0"}),pe(w.ItemIndicator,{children:pe("div",{className:"size-3.5 rounded-full border-4 border-pink-500 absolute inset-0"})})]}),o]}));Os.displayName=w.RadioItem.displayName;var Vs=wt.forwardRef(({className:e,inset:o,...t},a)=>pe(w.Label,{ref:a,className:i("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",e),...t}));Vs.displayName=w.Label.displayName;var Ws=wt.forwardRef(({className:e,...o},t)=>pe(w.Separator,{ref:t,className:i("-mx-1 my-1 h-px bg-gray-100",e),...o}));Ws.displayName=w.Separator.displayName;var $s=({className:e,...o})=>pe("span",{className:i("ml-auto text-xs tracking-widest opacity-60",e),...o});$s.displayName="DropdownMenuShortcut";import za from"html-react-parser";import{Fragment as Br,jsx as U,jsxs as Yt}from"react/jsx-runtime";var Gs=({dataHeading:e,dataHowItWorks:o,dataButtons:t})=>Yt(Br,{children:[e&&U(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:e?.className}),o&&o?.length>0&&U("div",{className:"-mx-3.5 flex flex-row flex-wrap justify-center gap-y-5",children:o.map((a,r)=>U("div",{className:"basis-full px-3.5 md:basis-1/3",children:Yt("div",{className:"h-full rounded-lg border border-gray-100 bg-white px-6 py-8 text-center shadow-lg md:px-4 lg:px-6",children:[U("div",{className:"mx-auto flex h-9 w-9 items-center justify-center rounded-full bg-pink-500 text-xl font-bold text-white",children:r+1}),Yt("div",{className:"mt-6 w-full",children:[U("div",{className:"w-full text-xl font-semibold",children:za(a.title)}),a?.description&&U("div",{className:"mt-2 text-base text-gray-600",children:za(a.description)})]})]})},r))}),t&&U(h,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:t?.className,align:"center"})]}),qf=({dataHeading:e,dataHowItWorks:o,dataButtons:t})=>Yt(Br,{children:[e&&U(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:e?.className}),o&&o?.length>0&&U("div",{className:"-mx-3.5 mt-9 flex flex-row flex-wrap justify-center gap-y-9",children:o.map((a,r)=>Yt("div",{className:"basis-full px-3.5 text-center md:basis-1/3",children:[Yt("div",{className:"relative mx-auto flex h-52 w-52 items-center justify-center",children:[U("div",{className:"absolute -left-4 -top-4 z-10 flex h-12 w-12 items-center justify-center rounded-full border-4 border-white bg-pink-500 text-lg font-bold text-white",children:r+1}),a?.image&&U("div",{className:"aspect-1 w-full overflow-hidden rounded-lg bg-gray-100",children:U(E,{ratio:1,children:U("img",{src:a.image,alt:a.title,className:"h-full w-full object-cover"})})})]}),Yt("div",{className:"mt-6 w-full",children:[U("div",{className:"w-full text-xl font-semibold",children:za(a.title)}),a?.description&&U("div",{className:"mt-2 text-base text-gray-600",children:za(a.description)})]})]},r))}),t&&U(h,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:t?.className,align:"center"})]}),Xf=({template:e,dataHeading:o,dataHowItWorks:t,dataButtons:a})=>{switch(e){case 1:return U(Gs,{dataHeading:o,dataHowItWorks:t,dataButtons:a});case 2:return U(qf,{dataHeading:o,dataHowItWorks:t,dataButtons:a});default:return U(Gs,{dataHeading:o,dataHowItWorks:t,dataButtons:a})}},Yf=({template:e,dataHeading:o,dataHowItWorks:t,dataButtons:a})=>U(Br,{children:Xf({template:e,dataHeading:o,dataHowItWorks:t,dataButtons:a})}),Zf=({template:e=1,background:o,className:t,idSection:a,dataHeading:r,dataHowItWorks:n,dataButtons:s})=>U(B,{className:t,idSection:a,background:o,children:U(Yf,{template:e,dataHeading:r,dataHowItWorks:n,dataButtons:s})});import{cva as Kf}from"class-variance-authority";import js from"html-react-parser";import{CheckIcon as Us}from"lucide-react";import{Fragment as Or,jsx as fe,jsxs as Qs}from"react/jsx-runtime";var Jf=Kf("mt-6 list-inside text-gray-800",{variants:{template:{1:"grid grid-cols-1 gap-y-3 ",2:"grid grid-cols-1 gap-y-3 ",3:"mx-auto mt-0 mt-8 grid max-w-5xl grid-cols-1 items-center gap-4 text-left text-sm font-semibold md:mt-12 md:grid-cols-4 md:gap-12"}},defaultVariants:{template:1}}),eg=({template:e,name:o,image:t,isFeatures:a})=>fe(Or,{children:(()=>{switch(e){case 1:case 2:return fe(Or,{children:Qs("li",{className:i("flex space-x-4",!a&&"hidden"),children:[t?fe("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center",children:fe("img",{src:t,alt:"",className:"max-w-full"})}):fe("div",{className:"mt-0.5 flex h-5 w-5 items-center justify-center rounded-full bg-pink-100",children:fe(Us,{className:"h-4 w-4 text-pink-500"})}),o&&fe("div",{className:"ml-2 ",children:js(o)})]})});case 3:return Qs("li",{className:"flex h-full space-x-4",children:[t?fe("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center",children:fe("img",{src:t,alt:"",className:"max-w-full"})}):fe("div",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-pink-100 p-1",children:fe(Us,{className:"h-4 w-4 text-pink-500"})}),o&&fe("div",{className:"my-auto ml-2 md:my-0",children:js(o)})]});default:return null}})()}),_a=({dataFeatures:e,template:o=1})=>fe(Or,{children:(e?.length??0)>0&&fe("ul",{className:i("",Jf({template:o})),children:e?.map((t,a)=>fe(eg,{name:t?.name,template:o,image:t?.image,idx:a,isFeatures:!0},a))})});import{XIcon as tg}from"lucide-react";import{jsx as Z,jsxs as Zo}from"react/jsx-runtime";var qs=e=>typeof e=="string"?e?.split("/")?.map(Number)?.reduce((a,r)=>a/r):e,og=({src:e,ratio:o,className:t,youtubeId:a,onClickFC:r=()=>{}})=>Zo(ao,{children:[Z(Ve,{greaterThan:"sm",children:Zo(E,{className:i(""),ratio:qs(o),children:[Z("img",{src:e,className:i("hidden h-full w-full object-cover md:block",t,e?"":"bg-gray-200"),alt:""}),a&&Zo(ct,{children:[Z(Za,{onClick:r,children:Z("div",{className:"absolute top-0 z-10 hidden h-full w-full cursor-pointer items-center justify-center transition-transform group-hover:scale-105 md:flex",children:Z("svg",{className:"h-14 w-14",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:Zo("g",{fill:"none",fillRule:"evenodd",children:[Z("circle",{stroke:"#FFF",strokeWidth:2,fillOpacity:".24",fill:"#000",cx:24,cy:24,r:23}),Z("path",{d:"M34.667 24.335c0 .515-.529.885-.529.885l-14.84 9.133c-1.08.704-1.965.182-1.965-1.153V15.467c0-1.338.884-1.856 1.968-1.153L34.14 23.45c-.002 0 .527.37.527.885Z",fill:"#FFF",fillRule:"nonzero"})]})})})}),Z($e,{hideCloseBtn:!0,size:"lg",position:"center",className:"bg-transparent shadow-none",children:Zo(Ct,{className:"relative bg-transparent p-4 text-center",children:[Z("div",{className:"aspect-[16/9] w-full p-0",children:Z("iframe",{title:a,src:`https://www.youtube.com/embed/${a}?autoplay=1`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0,className:"h-full w-full"})}),Z(Ka,{asChild:!0,children:Z(ie,{variant:"secondary",className:"absolute right-0 top-0 rounded-full",size:"sm",children:Z(tg,{className:"h-6 w-6"})})})]})})]})]})}),a&&Z(Ve,{lessThan:"md",children:Z("div",{className:"realtive aspect-[16/9] w-full overflow-hidden md:hidden",children:Z("iframe",{title:a,src:`https://www.youtube.com/embed/${a}?controls=1`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0,className:"h-full w-full object-cover md:hidden"})})})]}),Ba=({type:e=1,src:o,ratio:t,className:a,classNameMedia:r,youtubeId:n,onClickFC:s=()=>{}})=>Z("div",{className:a,children:n?Z(og,{type:e,src:o,ratio:t,youtubeId:n,onClickFC:s}):Z(E,{ratio:qs(t),children:Z("img",{src:o,className:i("h-full w-full object-cover",r,o?"":"bg-gray-200"),alt:""})})});import ag from"html-react-parser";import{Fragment as ig,jsx as Oa,jsxs as Vr}from"react/jsx-runtime";var rg=({value:e,suffix:o,unit:t,description:a,idx:r})=>Vr("div",{className:i(""),children:[e&&Vr("div",{className:"line-clamp-2 font-bold text-pink-500",children:[e,(o||t)&&Vr("span",{children:[o," ",t]})]}),a&&Oa("div",{className:"mt-1 text-sm leading-tight text-gray-500",children:ag(a)})]}),Va=({dataStats:e})=>Oa(ig,{children:(e?.length??0)>0&&Oa("ul",{className:i("mt-8 grid w-full auto-cols-[minmax(0,150px)] grid-flow-col gap-3 md:mt-10"),children:e?.map((o,t)=>Oa(rg,{value:o?.value,suffix:o?.suffix,unit:o?.unit,description:o?.description,idx:t},t))})});import{Fragment as Xs,jsx as K,jsxs as Ko}from"react/jsx-runtime";var Wr=({dataHeading:e,dataButtons:o,dataFeatures:t,template:a,dataStats:r,dataMedia:n,advancedComponent:s})=>Ko("div",{className:i("grid grid-cols-1 items-center gap-8 md:grid-cols-2 md:gap-6 "),children:[Ko("div",{className:"col-span-1 ",children:[K(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading||"h1",align:"left",sizeHeading:e?.sizeHeading,colorScheme:e?.colorScheme||"black",className:i("mb-0 md:mb-0",e?.className)}),K(_a,{dataFeatures:t,template:a}),o&&K(h,{align:"left",isFullInMobile:o?.isFullInMobile,buttons:o?.buttons}),K(Va,{dataStats:r})]}),K("div",{className:"col-span-1 md:pl-10",children:s||K(Ba,{type:n?.type||1,src:n?.src||"",ratio:n?.ratio,youtubeId:n?.youtubeId})})]}),Ys=({dataHeading:e,dataButtons:o,dataFeatures:t,template:a,dataStats:r,dataMedia:n,advancedComponent:s})=>Ko("div",{className:i("grid grid-cols-1 items-center gap-8 md:grid-cols-2 md:gap-6"),children:[K("div",{className:"order-2 col-span-1 md:order-1 md:pr-10",children:s||K(Ba,{type:n?.type||1,src:n?.src||"",ratio:n?.ratio,youtubeId:n?.youtubeId})}),Ko("div",{className:"order-1 col-span-1 md:order-2",children:[K(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading||"h1",align:"left",sizeHeading:e?.sizeHeading,colorScheme:e?.colorScheme||"black",className:i("mb-0 md:mb-0",e?.className)}),K(_a,{dataFeatures:t,template:a}),o&&K("div",{className:"flex w-full items-center justify-center md:justify-start",children:K(h,{align:"left",isFullInMobile:o?.isFullInMobile,buttons:o?.buttons})}),K(Va,{dataStats:r})]})]}),Zs=({dataHeading:e,dataButtons:o,dataFeatures:t,template:a,dataStats:r,dataMedia:n,advancedComponent:s})=>Ko(Xs,{children:[K(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading||"h1",align:"center",sizeHeading:e?.sizeHeading,colorScheme:e?.colorScheme||"black",className:i("mb-0 md:mb-0",e?.className)}),o&&K(h,{align:"center",isFullInMobile:o?.isFullInMobile,buttons:o?.buttons,className:"inline-flex w-full items-center justify-center text-center text-base font-semibold md:w-full"}),K(_a,{dataFeatures:t,template:a}),K("div",{className:" mx-auto max-w-xl [&>ul]:justify-center",children:K(Va,{dataStats:r})}),s||K(Xs,{children:n?.src&&K(Ba,{type:n?.type||1,src:n?.src||"",ratio:n?.ratio,youtubeId:n?.youtubeId,className:"mt-8 md:mt-12",classNameMedia:"rounded-lg"})})]});import{Fragment as cg,jsx as Zt}from"react/jsx-runtime";var ng=`var(
246
+ `})]})}})()})}import*as us from"react";import*as Je from"@radix-ui/react-slider";import{jsx as At,jsxs as af}from"react/jsx-runtime";var vs=us.forwardRef(({className:e,showIndicatorValue1:o,showIndicatorValue2:t,...a},r)=>af(Je.Root,{ref:r,className:i("relative flex w-full touch-none select-none items-center",a?.disabled&&"opacity-40",e),...a,children:[At(Je.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-gray-200",children:At(Je.Range,{className:"absolute h-full bg-pink-500"})}),At(Je.Thumb,{className:"group relative",children:At("div",{className:"ring-offset-bg-white focus-visible:ring-ring block h-5 w-5 rounded-full border-2 border-pink-500 bg-white transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 group-hover:cursor-grabbing",children:o&&At("div",{className:" absolute bottom-3/4 left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-black/90 px-2.5 py-1.5 text-sm opacity-0 duration-300 group-hover:bottom-full group-hover:opacity-100",children:o})})}),At(Je.Thumb,{className:"group relative",children:At("div",{className:"ring-offset-bg-white focus-visible:ring-ring block h-5 w-5 rounded-full border-2 border-pink-500 bg-white transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 group-hover:cursor-grabbing",children:t&&At("div",{className:" absolute bottom-3/4 left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-black/90 px-2.5 py-1.5 text-sm opacity-0 duration-300 group-hover:bottom-full group-hover:opacity-100",children:t})})})]}));vs.displayName=Je.Root.displayName;import{forwardRef as hf}from"react";import{Fragment as lf,jsx as Le,jsxs as La}from"react/jsx-runtime";var rf=({author:e=""})=>Le("div",{className:"text-center shrink-0 text-lg font-semibold text-pink-600",children:e?.charAt(0)}),nf=({author:e,avatar:o})=>Le("div",{className:"w-9 h-9 flex items-center mt-0.5 justify-center rounded-full bg-pink-200 relative overflow-hidden",children:o?Le("img",{src:o,alt:e?.charAt(0),className:"shrink-0 object-cover",width:36,height:36}):Le(rf,{author:e})});function sf({avatar:e="",author:o="",time:t,statusMessage:a,isOutStanding:r}){return Le(lf,{children:La("div",{className:"flex relative items-center space-x-3",children:[Le(nf,{avatar:e,author:o}),La("div",{className:"flex flex-col",children:[o&&Le("div",{className:"font-semibold text-gray-900 text-sm",children:o}),La("div",{className:"flex items-center space-x-2 text-xs",children:[t&&Le("div",{className:"text-gray-400",children:t}),a&&La("div",{className:"flex items-center space-x-2",children:[Le("div",{className:"w-1 h-1 mt-0.5 bg-gray-400 rounded-full"}),Le("div",{className:"ml-2 text-pink-500",children:a})]})]})]}),r&&Le("div",{className:"absolute right-1 top-0",children:Le("img",{alt:"",src:"https://homepage.momocdn.net/img/momo-upload-api-230629163313-638236531936463134.png",className:"w-5",loading:"lazy"})})]})})}var xs=sf;import{useState as Ns}from"react";import{StarIcon as mf}from"@heroicons/react/20/solid";import{jsx as bs,jsxs as hs}from"react/jsx-runtime";var cf={1:"K\xE9n ng\u01B0\u1EDDi m\xEA",2:"K\xE9n ng\u01B0\u1EDDi m\xEA",3:"Ch\u01B0a \u01B0ng l\u1EAFm",4:"Ch\u01B0a \u01B0ng l\u1EAFm",5:"T\u1EA1m \u1ED5n",6:"T\u1EA1m \u1ED5n",7:"\u0110\xE1ng xem",8:"\u0110\xE1ng xem",9:"C\u1EF1c ph\u1EA9m!",10:"C\u1EF1c ph\u1EA9m!"},df={1:"Kh\xF4ng h\xE0i l\xF2ng",2:"Ch\u01B0a \u01B0ng l\u1EAFm",3:"T\u1EA1m \u1ED5n",4:"H\xE0i l\xF2ng",5:"R\u1EA5t h\xE0i l\xF2ng"};function pf({point:e,max:o,className:t}){let a=o>5?cf[e||10]:df[e||5];return hs("div",{className:i("flex items-center space-x-1",t),children:[bs(mf,{className:"w-5 h-5 text-yellow-500"}),bs("div",{className:"font-semibold text-gray-900 text-sm",children:`${e}/${o}`}),hs("span",{className:"font-semibold text-gray-900 text-sm",children:[" ","\xA0\xB7 ",a]})," "]})}var ys=pf;import{useState as ff}from"react";import ws from"html-react-parser";import{jsx as gf,jsxs as uf}from"react/jsx-runtime";var zr=({children:e,maxChar:o=260,textMore:t="...Xem th\xEAm",textLess:a="Thu g\u1ECDn",btnClass:r="text-blue-500",className:n=""})=>{let[s,l]=ff(!0),m=()=>{l(!s)},c=(d,f,u=" ")=>d.length<=f?d:d.substring(0,d.lastIndexOf(u,f));return uf("div",{className:i(n),children:[s?ws(c(e,o)):ws(e),e.length>o&&gf("span",{onClick:m,className:i("read-or-hide cursor-pointer text-md w-fit pl-1 hover:underline",r),children:s?t:a})]})};import{jsx as Xt,jsxs as Ps}from"react/jsx-runtime";function vf({content:e,thumbnails:o=[],tags:t=[],commentSideBar:a,rating:r={point:10,max:10},limitContent:n=260}){let[s,l]=Ns(0),[m,c]=Ns(!1),d=f=>{c(!0),l(f)};return Ps("div",{className:"text-gray-700 mt-3 flex flex-col",children:[r.point>0&&Xt(ys,{className:"mb-0.5",point:r.point,max:r.max}),e&&Xt(zr,{className:"text-sm",maxChar:n,children:e}),t?.length>0&&Xt("div",{className:"w-full oveflow-x-auto flex items-center space-x-2 mt-2.5",children:t?.map(f=>Xt("div",{className:"w-fit rounded-full shrink-0 bg-gray-100 text-gray-700 text-xs font-semibold py-1 px-2 text-center",children:f}))}),o?.length>0&&Ps(Hr,{open:m,onOpenChange:c,className:"grid gap-2 mt-4 overflow-hidden rounded-xl md:grid-cols-4 md:gap-2 md:rounded-none grid grid-cols-2 grid-rows-1 overflow-hidden ",children:[o?.map((f,u)=>Xt(E,{onClick:()=>d(u),className:"rounded-lg cursor-pointer object-cover",ratio:4/3,children:Xt("img",{src:f.url,alt:"",className:"w-full h-full rounded-lg object-cover"})},u)),Xt(Fr,{activeSlideIndex:s,images:o?.map((f,u)=>({url:f.url,titleImage:f.titleImage,idx:u})),withSideBar:!!a,subHtmlSideBar:a})]})]})}var Cs=vf;import{jsx as bf}from"react/jsx-runtime";function xf({actions:e=[]}){return bf("div",{className:"flex items-center space-x-4 mt-4 text-gray-700",children:e})}var Rs=xf;import{jsx as Ea,jsxs as wf}from"react/jsx-runtime";var yf=hf(({avatar:e,author:o,time:t,ratingPoint:a,content:r,tags:n,thumbnails:s,actions:l=[],statusMessage:m,isReply:c,children:d,commentSideBar:f,isOutStanding:u,limitContent:v=260},k)=>wf("div",{ref:k,className:i("",c?"ml-4 py-4":"py-5"),children:[Ea(xs,{avatar:e,author:o,time:t,statusMessage:m,isOutStanding:u}),Ea(Cs,{content:r,thumbnails:s,tags:n,rating:a,commentSideBar:f,limitContent:v}),l&&l?.filter(Boolean)?.length>0&&Ea(Rs,{actions:l.filter(Boolean)}),d&&Ea("div",{className:"border-l grid grid-cols-1 divide-y divide-gray-200 ml-2 mt-3 border-l-gray-300 ",children:d})]}));import*as Lt from"react";import{cva as Nf}from"class-variance-authority";import{CheckIcon as Pf}from"@heroicons/react/16/solid";import{XIcon as Cf}from"lucide-react";import{jsx as xe,jsxs as Ha}from"react/jsx-runtime";var Rf=Nf("flex items-center shrink-0 justify-center rounded-full shrink-0",{variants:{state:{active:"bg-pink-500 text-white shadow-[0_0px_0px_3px_rgb(255,255,255),0_0px_0px_4px_rgb(var(--mobase-pink-500))]",disabled:"bg-gray-400 text-gray-200",default:"text-gray-500 bg-white shadow-[inset_0px_0px_0px_1px_rgb(var(--mobase-gray-300))]",completed:"bg-pink-300 text-white"},size:{default:"h-7 w-7 text-sm",small:"h-6 w-6 text-xs"}},defaultVariants:{state:"default",size:"default"}}),Ts=Lt.createContext("default");function Tf(){let e=Lt.useContext(Ts);if(!e)throw new Error("ProgressStepsItem must be used within a ProgressSteps");return e}var kf=Lt.memo(({type:e,icon:o,stepNumber:t,size:a,isError:r,state:n})=>{let s=a==="small"?"w-3 h-3":"w-4 h-4";return r?xe(Cf,{className:s}):Ha("div",{children:[e==="iconStep"&&xe("div",{className:s,children:o}),e==="numberStep"&&xe("div",{children:t}),e==="default"&&(n==="completed"?xe(Pf,{className:s}):xe("div",{children:t}))]})}),Sf=({step:e,currentStep:o,onValueChangeStep:t,children:a})=>{let r=Lt.useCallback(()=>{e!==o&&t(e)},[e,o,t]);return xe("div",{onClick:r,className:"flex w-full flex-col items-center justify-center gap-1 cursor-pointer",children:a})},Df=({step:e,state:o="default",size:t="default",placement:a="default",className:r,title:n,description:s,lastStep:l,fristStep:m,icon:c,isError:d,onValueChangeStep:f,...u})=>{let v=Tf();return Ha("div",{className:i("flex w-full flex-col items-center justify-center gap-1"),children:[Ha("div",{className:"flex w-full items-center justify-center gap-2",children:[xe("div",{className:i("flex h-px grow shrink-0 basis-0 bg-gray-200",m&&"opacity-0",a=="left"&&"hidden",o==="active"&&"bg-pink-300",o==="completed"&&"bg-pink-300")}),xe("div",{className:i("flex h-7 w-7 items-center justify-center rounded-full",Rf({state:o,size:t}),d&&"bg-red-500 text-white shadow-none",r),...u,children:xe(kf,{type:v,icon:c,stepNumber:e,size:t,isError:d,state:o})}),xe("div",{className:i("flex h-px grow shrink-0 basis-0 bg-gray-200",l&&"opacity-0",o==="completed"&&"bg-pink-300")})]}),Ha("div",{className:i("text-center w-full flex flex-col items-center mt-2 px-0.5",a=="left"&&"text-left items-start"),children:[n&&xe("div",{className:"text-xs font-bold text-slate-900 ",children:n}),s&&xe("div",{className:"text-xs text-gray-500 ",children:s})]})]})},Mf=({children:e,className:o,type:t="numberStep",...a})=>xe(Ts.Provider,{value:t,children:xe("div",{className:i("flex items-start justify-between w-full",o),...a,children:e})});import*as be from"react";import{Slot as Ef}from"@radix-ui/react-slot";import{Controller as Hf,FormProvider as Ff,useFormContext as zf}from"react-hook-form";import*as ks from"react";import*as _r from"@radix-ui/react-label";import{cva as If}from"class-variance-authority";import{jsx as Lf}from"react/jsx-runtime";var Af=If("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Fa=ks.forwardRef(({className:e,...o},t)=>Lf(_r.Root,{ref:t,className:i(Af(),e),...o}));Fa.displayName=_r.Root.displayName;import{jsx as Et}from"react/jsx-runtime";var _f=Ff,Ss=be.createContext({}),Bf=({...e})=>Et(Ss.Provider,{value:{name:e.name},children:Et(Hf,{...e})}),Xo=()=>{let e=be.useContext(Ss),o=be.useContext(Ds),{getFieldState:t,formState:a}=zf(),r=t(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:n}=o;return{id:n,name:e.name,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`,...r}},Ds=be.createContext({}),Ms=be.forwardRef(({className:e,...o},t)=>{let a=be.useId();return Et(Ds.Provider,{value:{id:a},children:Et("div",{ref:t,className:i("space-y-2",e),...o})})});Ms.displayName="FormItem";var Is=be.forwardRef(({className:e,...o},t)=>{let{error:a,formItemId:r}=Xo();return Et(Fa,{ref:t,className:i(a&&"text-red-500","text-gray-700 ",e),htmlFor:r,...o})});Is.displayName="FormLabel";var As=be.forwardRef(({...e},o)=>{let{error:t,formItemId:a,formDescriptionId:r,formMessageId:n}=Xo();return Et(Ef,{ref:o,id:a,"aria-describedby":t?`${r} ${n}`:`${r}`,"aria-invalid":!!t,...e})});As.displayName="FormControl";var Ls=be.forwardRef(({className:e,...o},t)=>{let{formDescriptionId:a}=Xo();return Et("p",{ref:t,id:a,className:i("text-[0.8rem] text-gray-500",e),...o})});Ls.displayName="FormDescription";var Es=be.forwardRef(({className:e,children:o,...t},a)=>{let{error:r,formMessageId:n}=Xo(),s=r?String(r?.message):o;return s?Et("p",{ref:a,id:n,className:i("text-xs font-medium text-red-500",e),...t,children:s}):null});Es.displayName="FormMessage";import*as wt from"react";import*as w from"@radix-ui/react-dropdown-menu";import{ChevronRight as Of,Check as Vf}from"lucide-react";import{jsx as pe,jsxs as Yo}from"react/jsx-runtime";var Wf=w.Root,$f=w.Trigger,Gf=w.Group,jf=w.Portal,Uf=w.Sub,Qf=w.RadioGroup,Hs=wt.forwardRef(({className:e,inset:o,children:t,...a},r)=>Yo(w.SubTrigger,{ref:r,className:i("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",o&&"pl-8",e),...a,children:[t,pe(Of,{className:"ml-auto"})]}));Hs.displayName=w.SubTrigger.displayName;var Fs=wt.forwardRef(({className:e,...o},t)=>pe(w.SubContent,{ref:t,className:i("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-gray-900 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-0",e),...o}));Fs.displayName=w.SubContent.displayName;var zs=wt.forwardRef(({className:e,sideOffset:o=4,...t},a)=>pe(w.Portal,{children:pe(w.Content,{ref:a,sideOffset:o,className:i("z-50 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white p-1 text-gray-900 shadow-small data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ",e),...t})}));zs.displayName=w.Content.displayName;var _s=wt.forwardRef(({className:e,inset:o,...t},a)=>pe(w.Item,{ref:a,className:i("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 ",o&&"pl-8",e),...t}));_s.displayName=w.Item.displayName;var Bs=wt.forwardRef(({className:e,children:o,checked:t,...a},r)=>Yo(w.CheckboxItem,{ref:r,className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 ",e),checked:t,...a,children:[Yo("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:[t===!1&&pe("div",{className:"size-3.5 rounded-sm border border-gray-400 absolute inset-0"}),pe(w.ItemIndicator,{children:pe("div",{className:"size-3.5 rounded-sm border border-pink-500 bg-pink-500 flex items-center justify-center text-white absolute inset-0",children:pe(Vf,{size:16,strokeWidth:3})})})]}),o]}));Bs.displayName=w.CheckboxItem.displayName;var Os=wt.forwardRef(({className:e,children:o,...t},a)=>Yo(w.RadioItem,{ref:a,className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 ",e),...t,children:[Yo("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:[pe("div",{className:"size-3.5 rounded-full border border-gray-400 absolute inset-0"}),pe(w.ItemIndicator,{children:pe("div",{className:"size-3.5 rounded-full border-4 border-pink-500 absolute inset-0"})})]}),o]}));Os.displayName=w.RadioItem.displayName;var Vs=wt.forwardRef(({className:e,inset:o,...t},a)=>pe(w.Label,{ref:a,className:i("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",e),...t}));Vs.displayName=w.Label.displayName;var Ws=wt.forwardRef(({className:e,...o},t)=>pe(w.Separator,{ref:t,className:i("-mx-1 my-1 h-px bg-gray-100",e),...o}));Ws.displayName=w.Separator.displayName;var $s=({className:e,...o})=>pe("span",{className:i("ml-auto text-xs tracking-widest opacity-60",e),...o});$s.displayName="DropdownMenuShortcut";import za from"html-react-parser";import{Fragment as Br,jsx as U,jsxs as Yt}from"react/jsx-runtime";var Gs=({dataHeading:e,dataHowItWorks:o,dataButtons:t})=>Yt(Br,{children:[e&&U(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:e?.className}),o&&o?.length>0&&U("div",{className:"-mx-3.5 flex flex-row flex-wrap justify-center gap-y-5",children:o.map((a,r)=>U("div",{className:"basis-full px-3.5 md:basis-1/3",children:Yt("div",{className:"h-full rounded-lg border border-gray-100 bg-white px-6 py-8 text-center shadow-lg md:px-4 lg:px-6",children:[U("div",{className:"mx-auto flex h-9 w-9 items-center justify-center rounded-full bg-pink-500 text-xl font-bold text-white",children:r+1}),Yt("div",{className:"mt-6 w-full",children:[U("div",{className:"w-full text-xl font-semibold",children:za(a.title)}),a?.description&&U("div",{className:"mt-2 text-base text-gray-600",children:za(a.description)})]})]})},r))}),t&&U(h,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:t?.className,align:"center"})]}),qf=({dataHeading:e,dataHowItWorks:o,dataButtons:t})=>Yt(Br,{children:[e&&U(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:e?.className}),o&&o?.length>0&&U("div",{className:"-mx-3.5 mt-9 flex flex-row flex-wrap justify-center gap-y-9",children:o.map((a,r)=>Yt("div",{className:"basis-full px-3.5 text-center md:basis-1/3",children:[Yt("div",{className:"relative mx-auto flex h-52 w-52 items-center justify-center",children:[U("div",{className:"absolute -left-4 -top-4 z-10 flex h-12 w-12 items-center justify-center rounded-full border-4 border-white bg-pink-500 text-lg font-bold text-white",children:r+1}),a?.image&&U("div",{className:"aspect-1 w-full overflow-hidden rounded-lg bg-gray-100",children:U(E,{ratio:1,children:U("img",{src:a.image,alt:a.title,className:"h-full w-full object-cover"})})})]}),Yt("div",{className:"mt-6 w-full",children:[U("div",{className:"w-full text-xl font-semibold",children:za(a.title)}),a?.description&&U("div",{className:"mt-2 text-base text-gray-600",children:za(a.description)})]})]},r))}),t&&U(h,{isFullInMobile:t?.isFullInMobile,buttons:t?.buttons,className:t?.className,align:"center"})]}),Xf=({template:e,dataHeading:o,dataHowItWorks:t,dataButtons:a})=>{switch(e){case 1:return U(Gs,{dataHeading:o,dataHowItWorks:t,dataButtons:a});case 2:return U(qf,{dataHeading:o,dataHowItWorks:t,dataButtons:a});default:return U(Gs,{dataHeading:o,dataHowItWorks:t,dataButtons:a})}},Yf=({template:e,dataHeading:o,dataHowItWorks:t,dataButtons:a})=>U(Br,{children:Xf({template:e,dataHeading:o,dataHowItWorks:t,dataButtons:a})}),Zf=({template:e=1,background:o,className:t,idSection:a,dataHeading:r,dataHowItWorks:n,dataButtons:s})=>U(B,{className:t,idSection:a,background:o,children:U(Yf,{template:e,dataHeading:r,dataHowItWorks:n,dataButtons:s})});import{cva as Kf}from"class-variance-authority";import js from"html-react-parser";import{CheckIcon as Us}from"lucide-react";import{Fragment as Or,jsx as fe,jsxs as Qs}from"react/jsx-runtime";var Jf=Kf("mt-6 list-inside text-gray-800",{variants:{template:{1:"grid grid-cols-1 gap-y-3 ",2:"grid grid-cols-1 gap-y-3 ",3:"mx-auto mt-0 mt-8 grid max-w-5xl grid-cols-1 items-center gap-4 text-left text-sm font-semibold md:mt-12 md:grid-cols-4 md:gap-12"}},defaultVariants:{template:1}}),eg=({template:e,name:o,image:t,isFeatures:a})=>fe(Or,{children:(()=>{switch(e){case 1:case 2:return fe(Or,{children:Qs("li",{className:i("flex space-x-4",!a&&"hidden"),children:[t?fe("div",{className:"flex h-10 w-10 flex-none shrink-0 items-center justify-center",children:fe("img",{src:t,alt:"",className:"max-w-full"})}):fe("div",{className:"mt-0.5 flex h-5 w-5 flex-none items-center justify-center rounded-full bg-pink-100",children:fe(Us,{className:"h-4 w-4 text-pink-500"})}),o&&fe("div",{className:"ml-2 ",children:js(o)})]})});case 3:return Qs("li",{className:"flex h-full space-x-4",children:[t?fe("div",{className:"flex h-10 w-10 flex-none shrink-0 items-center justify-center",children:fe("img",{src:t,alt:"",className:"max-w-full"})}):fe("div",{className:"flex h-5 w-5 flex-none items-center justify-center rounded-full bg-pink-100 p-1",children:fe(Us,{className:"h-4 w-4 text-pink-500"})}),o&&fe("div",{className:"my-auto ml-2 md:my-0",children:js(o)})]});default:return null}})()}),_a=({dataFeatures:e,template:o=1})=>fe(Or,{children:(e?.length??0)>0&&fe("ul",{className:i("",Jf({template:o})),children:e?.map((t,a)=>fe(eg,{name:t?.name,template:o,image:t?.image,idx:a,isFeatures:!0},a))})});import{XIcon as tg}from"lucide-react";import{jsx as Z,jsxs as Zo}from"react/jsx-runtime";var qs=e=>typeof e=="string"?e?.split("/")?.map(Number)?.reduce((a,r)=>a/r):e,og=({src:e,ratio:o,className:t,youtubeId:a,onClickFC:r=()=>{}})=>Zo(ao,{children:[Z(Ve,{greaterThan:"sm",children:Zo(E,{className:i(""),ratio:qs(o),children:[Z("img",{src:e,className:i("hidden h-full w-full object-cover md:block",t,e?"":"bg-gray-200"),alt:""}),a&&Zo(ct,{children:[Z(Za,{onClick:r,children:Z("div",{className:"absolute top-0 z-10 hidden h-full w-full cursor-pointer items-center justify-center transition-transform group-hover:scale-105 md:flex",children:Z("svg",{className:"h-14 w-14",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:Zo("g",{fill:"none",fillRule:"evenodd",children:[Z("circle",{stroke:"#FFF",strokeWidth:2,fillOpacity:".24",fill:"#000",cx:24,cy:24,r:23}),Z("path",{d:"M34.667 24.335c0 .515-.529.885-.529.885l-14.84 9.133c-1.08.704-1.965.182-1.965-1.153V15.467c0-1.338.884-1.856 1.968-1.153L34.14 23.45c-.002 0 .527.37.527.885Z",fill:"#FFF",fillRule:"nonzero"})]})})})}),Z($e,{hideCloseBtn:!0,size:"lg",position:"center",className:"bg-transparent shadow-none",children:Zo(Ct,{className:"relative bg-transparent p-4 text-center",children:[Z("div",{className:"aspect-[16/9] w-full p-0",children:Z("iframe",{title:a,src:`https://www.youtube.com/embed/${a}?autoplay=1`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0,className:"h-full w-full"})}),Z(Ka,{asChild:!0,children:Z(ie,{variant:"secondary",className:"absolute right-0 top-0 rounded-full",size:"sm",children:Z(tg,{className:"h-6 w-6"})})})]})})]})]})}),a&&Z(Ve,{lessThan:"md",children:Z("div",{className:"realtive aspect-[16/9] w-full overflow-hidden md:hidden",children:Z("iframe",{title:a,src:`https://www.youtube.com/embed/${a}?controls=1`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0,className:"h-full w-full object-cover md:hidden"})})})]}),Ba=({type:e=1,src:o,ratio:t,className:a,classNameMedia:r,youtubeId:n,onClickFC:s=()=>{}})=>Z("div",{className:a,children:n?Z(og,{type:e,src:o,ratio:t,youtubeId:n,onClickFC:s}):Z(E,{ratio:qs(t),children:Z("img",{src:o,className:i("h-full w-full object-cover",r,o?"":"bg-gray-200"),alt:""})})});import ag from"html-react-parser";import{Fragment as ig,jsx as Oa,jsxs as Vr}from"react/jsx-runtime";var rg=({value:e,suffix:o,unit:t,description:a,idx:r})=>Vr("div",{className:i(""),children:[e&&Vr("div",{className:"line-clamp-2 font-bold text-pink-500",children:[e,(o||t)&&Vr("span",{children:[o," ",t]})]}),a&&Oa("div",{className:"mt-1 text-sm leading-tight text-gray-500",children:ag(a)})]}),Va=({dataStats:e})=>Oa(ig,{children:(e?.length??0)>0&&Oa("ul",{className:i("mt-8 grid w-full auto-cols-[minmax(0,150px)] grid-flow-col gap-3 md:mt-10"),children:e?.map((o,t)=>Oa(rg,{value:o?.value,suffix:o?.suffix,unit:o?.unit,description:o?.description,idx:t},t))})});import{Fragment as Xs,jsx as K,jsxs as Ko}from"react/jsx-runtime";var Wr=({dataHeading:e,dataButtons:o,dataFeatures:t,template:a,dataStats:r,dataMedia:n,advancedComponent:s})=>Ko("div",{className:i("grid grid-cols-1 items-center gap-8 md:grid-cols-2 md:gap-6 "),children:[Ko("div",{className:"col-span-1 ",children:[K(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading||"h1",align:"left",sizeHeading:e?.sizeHeading,colorScheme:e?.colorScheme||"black",className:i("mb-0 md:mb-0",e?.className)}),K(_a,{dataFeatures:t,template:a}),o&&K(h,{align:"left",isFullInMobile:o?.isFullInMobile,buttons:o?.buttons}),K(Va,{dataStats:r})]}),K("div",{className:"col-span-1 md:pl-10",children:s||K(Ba,{type:n?.type||1,src:n?.src||"",ratio:n?.ratio,youtubeId:n?.youtubeId})})]}),Ys=({dataHeading:e,dataButtons:o,dataFeatures:t,template:a,dataStats:r,dataMedia:n,advancedComponent:s})=>Ko("div",{className:i("grid grid-cols-1 items-center gap-8 md:grid-cols-2 md:gap-6"),children:[K("div",{className:"order-2 col-span-1 md:order-1 md:pr-10",children:s||K(Ba,{type:n?.type||1,src:n?.src||"",ratio:n?.ratio,youtubeId:n?.youtubeId})}),Ko("div",{className:"order-1 col-span-1 md:order-2",children:[K(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading||"h1",align:"left",sizeHeading:e?.sizeHeading,colorScheme:e?.colorScheme||"black",className:i("mb-0 md:mb-0",e?.className)}),K(_a,{dataFeatures:t,template:a}),o&&K("div",{className:"flex w-full items-center justify-center md:justify-start",children:K(h,{align:"left",isFullInMobile:o?.isFullInMobile,buttons:o?.buttons})}),K(Va,{dataStats:r})]})]}),Zs=({dataHeading:e,dataButtons:o,dataFeatures:t,template:a,dataStats:r,dataMedia:n,advancedComponent:s})=>Ko(Xs,{children:[K(b,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading||"h1",align:"center",sizeHeading:e?.sizeHeading,colorScheme:e?.colorScheme||"black",className:i("mb-0 md:mb-0",e?.className)}),o&&K(h,{align:"center",isFullInMobile:o?.isFullInMobile,buttons:o?.buttons,className:"inline-flex w-full items-center justify-center text-center text-base font-semibold md:w-full"}),K(_a,{dataFeatures:t,template:a}),K("div",{className:" mx-auto max-w-xl [&>ul]:justify-center",children:K(Va,{dataStats:r})}),s||K(Xs,{children:n?.src&&K(Ba,{type:n?.type||1,src:n?.src||"",ratio:n?.ratio,youtubeId:n?.youtubeId,className:"mt-8 md:mt-12",classNameMedia:"rounded-lg"})})]});import{Fragment as cg,jsx as Zt}from"react/jsx-runtime";var ng=`var(
247
247
  --gradient-pink-1,
248
248
  linear-gradient(
249
249
  38deg,