@momo-webplatform/mobase 0.2.105-link → 0.2.106-link
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -67,7 +67,7 @@ import*as Go from"react";import{ChevronDownIcon as Jm}from"@heroicons/react/20/s
|
|
|
67
67
|
transform: translate3d(0, 30%, 0);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
`})]}),Zt=({className:e,children:o,title:t,shortTitle:a,qrImage:r,qrLink:n,logoQr:s,isQrForAll:l=!1,...m})=>M(Ge,{...m,children:M(Fe,{className:i("h-auto max-h-screen overflow-hidden border-0 md:max-h-screen md:max-w-2xl lg:max-w-3xl [&>button>svg]:text-white",e),size:"xl",positionRightCloseBtn:!0,children:M(et,{className:"p-0",children:fe("div",{className:"flex flex-row flex-wrap",children:[M("div",{className:"hidden flex-none w-full sm:block md:w-5/12",children:o||fe("div",{className:"grid grid-cols-1 gap-y-6 px-5 py-8 text-sm",children:[fe("div",{className:"flex flex-nowrap items-center",children:[M("div",{className:"flex-none",children:M("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091602-637359309621891617.png",alt:"Step 1"})}),fe("div",{className:"flex-1 pl-4",children:[M("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 1 :"}),M("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"})]})]}),fe("div",{className:"flex flex-nowrap items-center",children:[M("div",{className:"flex-none",children:M("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091443-637359308837905996.png",alt:"Step 2"})}),fe("div",{className:"flex-1 pl-4",children:[M("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 2 :"}),M("div",{className:"mt-1 text-gray-500",children:"Qu\xE9t m\xE3 QR Code theo h\xECnh b\xEAn ph\u1EA3i"})]})]}),fe("div",{className:"flex flex-nowrap items-center",children:[M("div",{className:"flex-none",children:M("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917090146-637359301062519803.png",alt:"Step 3"})}),fe("div",{className:"flex-1 pl-4",children:[M("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 3 :"}),fe("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"]})]})]})]})}),M("div",{className:"flex justify-center items-center w-full h-auto md:w-7/12",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:fe("div",{className:"px-5 py-10 text-center",children:[t&&M("h4",{className:"mb-5 text-base font-semibold text-white",children:t}),fe("div",{className:"relative",children:[l&&M("div",{className:"absolute -top-2 left-1/2 z-[5] -translate-x-1/2",children:M("img",{src:"https://homepage.momocdn.net/fileuploads/svg/momo-file-231211170324.svg",alt:"Title QR all"})}),M(mc,{img:r,isQrForAll:l,children:n&&M(lc,{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 vc}from"react";import{useEffect as cc,useLayoutEffect as dc,useState as pc}from"react";import fc from"ua-parser-js";var gc=()=>fc().device.type==="mobile",uc=typeof window<"u"?dc:cc,No=()=>{let[e,o]=pc(!1);return uc(()=>{o(gc())},[]),e};import{Fragment as hc,jsx as ka,jsxs as xc}from"react/jsx-runtime";var je=({action:e,newTab:o,offset:t,dialogQrProps:a,className:r,children:n,...s})=>{let[l,m]=vc(!1),c=No(),d=!!a?.qrLink,p=()=>{let A=d?a?.qrLink:e;return typeof A=="string"?A.trim():""},g=()=>{let A=p();!A&&typeof e!="function"||(typeof e=="function"?e():window.open(A,o?"_blank":"_self"))},v=(A,B=0)=>{let z=document.querySelector(A);if(!z)return;let P=z.getBoundingClientRect().top+window.scrollY-B;window.scrollTo({top:P,behavior:"smooth"})},y=()=>{typeof e=="string"&&e.startsWith("#")?v(e,t):g()},C=()=>xc(hc,{children:[ka(Ae,{...s,className:r,onClick:()=>m(!0),"data-name":"button-action-with-qr",children:n}),ka(Zt,{...a,open:l,onOpenChange:()=>m(!1),qrLink:a?.qrLink||""})]});return d?c?a?.isQrForAll?C():ka(Ae,{...s,className:r,onClick:g,"data-name":"button-action-with-qr",children:n}):C():ka(Ae,{...s,onClick:y,className:i("cursor-pointer",r),"data-name":"button-action-without-qr",rel:"noreferrer",children:n})};import*as Po from"react";import{ChevronRightIcon as Nc,DotsHorizontalIcon as Pc}from"@radix-ui/react-icons";import{Slot as Cc}from"@radix-ui/react-slot";import{useRouter as Rc}from"next/router";import{useRouter as yc}from"next/router";var bc=({href:e,locale:o,defaultLocale:t,basePath:a=""})=>{if(!o||o===t||!e.startsWith("/")||/\.(pdf|docx|xlsx|doc|xls)$/i.test(e))return e;let r=`/${o}`,n=new RegExp(`^${a}(?=[/#?]|$)`),s;return a&&n.test(e)?s=e.replace(n,`${a}${r}`):s=`${r}${e}`,s},Kt=({href:e,locale:o,defaultLocale:t,basePath:a})=>e?bc({href:e,locale:o,defaultLocale:t,basePath:a}):void 0;import{jsx as wc}from"react/jsx-runtime";var T=({href:e,children:o,...t})=>{let a=yc(),{locale:r,basePath:n,defaultLocale:s}=a;return wc("a",{href:Kt({href:e,locale:r,basePath:n,defaultLocale:s}),...t,children:o})};import{jsx as Pt,jsxs as kc}from"react/jsx-runtime";var Zi=Po.forwardRef(({className:e,...o},t)=>Pt("nav",{ref:t,"aria-label":"breadcrumb",className:i("",e),...o}));Zi.displayName="Breadcrumb";var Ki=Po.forwardRef(({className:e,...o},t)=>Pt("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}));Ki.displayName="BreadcrumbList";var Ji=Po.forwardRef(({className:e,...o},t)=>Pt("li",{ref:t,className:i("shrink-0 text-gray-900 hover:text-pink-500",e),...o}));Ji.displayName="BreadcrumbItem";var en=Po.forwardRef(({asChild:e,className:o,href:t,...a},r)=>{let n=Rc(),{locale:s,basePath:l,defaultLocale:m}=n;return Pt(e?Cc:"a",{ref:r,className:i("transition-colors hover:text-foreground",o),href:Kt({href:t,locale:s,basePath:l,defaultLocale:m}),...a})});en.displayName="BreadcrumbLink";var tn=Po.forwardRef(({className:e,...o},t)=>Pt("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:i("text-sm text-gray-500",e),...o}));tn.displayName="BreadcrumbPage";var on=({children:e,className:o,...t})=>Pt("li",{role:"presentation","aria-hidden":"true",className:i("text-gray-900",o),...t,children:e??Pt(Nc,{className:"w-2 h-2"})});on.displayName="BreadcrumbSeparator";var an=({className:e,...o})=>kc("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...o,children:[Pt(Pc,{className:"w-4 h-4 text-gray-900"}),Pt("span",{className:"sr-only",children:"More"})]});an.displayName="BreadcrumbElipssis";import Ir from"html-react-parser";import{createContext as Tc,useContext as rn}from"react";import{jsx as Uo}from"react/jsx-runtime";var kr=Tc({align:"center"}),Tr=({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 Uo("div",{className:i("mb-1 font-semibold",n[e],s[o],t&&"truncate",a),children:r})},Sr=({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}=rn(kr);return Uo(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})},Dr=({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}=rn(kr);return Uo("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})},Mr=({className:e,align:o="center",children:t})=>Uo("div",{className:i("mb-5 md:mb-8",{left:"text-left",center:"text-center",right:"text-right"}[o],e),children:Uo(kr.Provider,{value:{align:o},children:t})});import{jsx as Jt,jsxs as Sc}from"react/jsx-runtime";var V=({idSection:e,className:o,background:t,children:a})=>Jt("section",{id:e,className:i("block-section py-8 md:py-10 lg:py-14",o),style:{background:t},children:Jt("div",{className:"wrapper relative",children:a})}),h=({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:Sc(Mr,{align:e,className:l,children:[o&&Jt(Tr,{color:m,children:o}),t&&Jt(Sr,{tagHeading:r,color:c,size:s,children:Ir(t)}),a&&Jt(Dr,{color:d,size:"large",marginTop:s==="large"?"spacing2Xl":"spacingX",children:Ir(a)})]})},x=({align:e,isFullInMobile:o=!1,buttons:t,className:a})=>t?.length===0?null:Jt("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 Jt(je,{...l,className:i(o&&"w-full md:w-auto",r?.className),children:Ir(s)},n)})});import $c,{memo as Gc}from"react";import{ArrowDownIcon as jc}from"@heroicons/react/20/solid";import Qc from"html-react-parser";import{createContext as Lc,useCallback as Ac,useContext as Lr,useEffect as Fc,useRef as Ec,useState as zc}from"react";import{ChevronLeft as Hc,ChevronRight as _c}from"lucide-react";import*as nn from"react";import{Slot as Dc}from"@radix-ui/react-slot";import{cva as Mc}from"class-variance-authority";import{jsx as Ic}from"react/jsx-runtime";var eo=Mc("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"}}),ne=nn.forwardRef(({className:e,variant:o="primary",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Dc:"button",m=i(eo({variant:o,size:t,className:e}));return Ic(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ne.displayName="IconButton";import{Fragment as Bc,jsx as Ht,jsxs as sn}from"react/jsx-runtime";var Ta=Lc(void 0),Ct=({showGradientOverlay:e=!0,gradientOverlayColor:o="255, 255, 255",className:t,children:a})=>{let r=Ec(null),[n,s]=zc({left:!1,right:!1}),l=Ac(()=>{let c=r.current;if(c){let{scrollLeft:d,scrollWidth:p,clientWidth:g}=c;s({left:d>0,right:Math.ceil(d+g)<p})}},[]);Fc(()=>{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:p,clientWidth:g,scrollWidth:v}=d,y=g*.7*(c==="left"?-1:1),C=p+y;C<0?C=0:C>v-g&&(C=v-g),d.scrollTo({left:C,behavior:"smooth"})}};return Ht(Ta.Provider,{value:{scrollContainerRef:r,showArrows:n,scroll:m,gradientOverlayColor:o},children:sn("div",{className:i("relative w-full",t),children:[e&&sn(Bc,{children:[n.left&&Ht("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&&Ht("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]})})},Rt=({className:e,children:o})=>{let t=Lr(Ta);if(!t)throw new Error("HorizontalContent must be used within a HorizontalScroll");return Ht("div",{ref:t.scrollContainerRef,className:i("scrollbar-hide overflow-x-auto scroll-smooth",e),role:"region","aria-label":"Scrollable content",children:o})},kt=({className:e,children:o,...t})=>{let a=Lr(Ta);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.left?Ht(ne,{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||Ht(Hc,{className:"h-4 w-4"})}):null},Tt=({className:e,children:o,...t})=>{let a=Lr(Ta);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.right?Ht(ne,{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||Ht(_c,{className:"h-4 w-4"})}):null};import*as Sa from"react";import*as Qe from"@radix-ui/react-tabs";import{jsx as Ar}from"react/jsx-runtime";var St=Qe.Root,tt=Sa.forwardRef(({className:e,size:o="sm",isDivider:t=!1,...a},r)=>Ar(Qe.List,{ref:r,className:i("inline-flex w-full flex-row items-center space-x-5 overflow-x-auto [&::-webkit-scrollbar]:hidden",`text-${o}`,t&&"border-b border-gray-200",e),...a}));tt.displayName=Qe.List.displayName;var ot=Sa.forwardRef(({className:e,...o},t)=>Ar(Qe.Trigger,{ref:t,className:i("ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap border-b-2 border-transparent py-3 font-semibold text-gray-900 transition-all hover:text-pink-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-pink-500 data-[state=active]:text-pink-500",e),...o}));ot.displayName=Qe.Trigger.displayName;var at=Sa.forwardRef(({className:e,...o},t)=>Ar(Qe.Content,{ref:t,className:i("ring-offset-background focus-visible:ring-ring mt-3 text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",e),...o}));at.displayName=Qe.Content.displayName;import*as ln from"react";import{Slot as Oc}from"@radix-ui/react-slot";import{cva as Vc}from"class-variance-authority";import{jsx as Wc}from"react/jsx-runtime";var mn=Vc("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"}}),ge=ln.forwardRef(({className:e,variant:o="default",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Oc:"button",m=i(mn({variant:o,size:t,className:e}));return Wc(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ge.displayName="TextButton";import{Fragment as cn,jsx as j,jsxs as rt}from"react/jsx-runtime";var Uc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return rt(cn,{children:[j("div",{className:"flex-none pr-3 basis-1/2 md:basis-full md:pr-0",children:j("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:rt("picture",{children:[j("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),j("img",{className:"object-cover w-full h-full",src:e?.thumbnailMobile,alt:e?.title})]})})}),rt("div",{className:"overflow-hidden basis-1/2 md:mt-3 md:basis-full",children:[e?.category&&e?.categoryUrl&&j(ge,{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}),j("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}),rt("div",{className:"flex items-center mt-2 md:space-x-1",children:[e?.category&&e?.categoryUrl&&rt(cn,{children:[j(ge,{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&&j("span",{className:"flex-none hidden leading-none md:block",children:"\xB7"})]}),e?.totalViews&&j("div",{className:"flex-none text-xs text-gray-500",children:e.totalViews})]})]})]})},Da=Gc(({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},m=(d,p,g)=>{d?.preventDefault(),d?.stopPropagation(),a?a(p):window.open(g,"_blank")},c=(d,p)=>rt("div",{children:[j("div",{className:i("-mx-3 flex flex-row flex-wrap gap-y-5",d?.blogList?.length<3?"md:justify-center":""),children:d?.blogList?.map((g,v)=>j("div",{className:"min-w-0 px-3 basis-full md:basis-1/2 lg:basis-1/3",children:j("div",{onClick:y=>m(y,g?.id,g?.url),className:i("group flex cursor-pointer flex-row md:flex-col",d?.classNameItem),children:j(Uc,{blog:g})},g?.id)},v))}),d?.isShowBtn&&j("div",{className:"flex items-center justify-center w-full mt-8",children:rt(je,{action:r?()=>r?.(p):d?.btnUrl,newTab:d?.isNewTab,variant:"outline",children:[Qc(d.btnName||"Xem th\xEAm"),d?.isLoading?j(bo,{className:"w-5 h-5 ml-2 animate-spin-loading"}):r&&!d?.btnUrl&&j(jc,{className:"w-5 h-5 ml-2 -mb-1 animate-bounce"})]})})]},d?.title||p);return rt($c.Fragment,{children:[e&&j(h,{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?rt(St,{defaultValue:t[0]?.title,children:[rt(Ct,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[j(Rt,{className:"mb-6 text-center",children:j(tt,{className:"inline-flex items-center w-auto mx-auto mb-0 overflow-visible",children:t.map((d,p)=>j(ot,{value:d.title,children:d.title},d.title+p))})}),j(kt,{}),j(Tt,{})]}),t.map((d,p)=>j(at,{value:d.title,children:c(d,p)},d.title+p))]}):t?.length===1&&t[0]&&c(t[0],0)]})});import Kc,{memo as Jc,useEffect as ed,useState as fn}from"react";import{ChevronLeftIcon as td,ChevronRightIcon as od}from"@heroicons/react/20/solid";import gn from"html-react-parser";import*as W from"react";import{ChevronLeftIcon as qc,ChevronRightIcon as Xc}from"@heroicons/react/20/solid";import Yc from"embla-carousel-react";import{Fragment as Zc,jsx as Ee,jsxs as pn}from"react/jsx-runtime";var dn=W.createContext(null);function qo(){let e=W.useContext(dn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var ue=W.forwardRef(({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:r,children:n,...s},l)=>{let[m,c]=Yc({align:"start",...o,axis:e==="horizontal"?"x":"y"},a),[d,p]=W.useState(!1),[g,v]=W.useState(!1),y=W.useCallback(B=>{B&&(p(B.canScrollPrev()),v(B.canScrollNext()))},[]),C=W.useCallback(()=>{c?.scrollPrev()},[c]),w=W.useCallback(()=>{c?.scrollNext()},[c]),A=W.useCallback(B=>{B.key==="ArrowLeft"?(B.preventDefault(),C()):B.key==="ArrowRight"&&(B.preventDefault(),w())},[C,w]);return W.useEffect(()=>{!c||!t||t(c)},[c,t]),W.useEffect(()=>{if(c)return y(c),c.on("reInit",y),c.on("select",y),()=>{c?.off("select",y)}},[c,y]),Ee(dn.Provider,{value:{carouselRef:m,api:c,opts:o,orientation:e||(o?.axis==="y"?"vertical":"horizontal"),scrollPrev:C,scrollNext:w,canScrollPrev:d,canScrollNext:g},children:Ee("div",{ref:l,onKeyDownCapture:A,className:i("relative",r),role:"region","aria-roledescription":"carousel",...s,children:n})})});ue.displayName="Carousel";var ve=W.forwardRef(({className:e,classNameContent:o,...t},a)=>{let{carouselRef:r,orientation:n}=qo();return Ee("div",{ref:r,className:i("overflow-hidden",o),children:Ee("div",{ref:a,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ve.displayName="CarouselContent";var ce=W.forwardRef(({className:e,...o},t)=>{let{orientation:a}=qo();return Ee("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})});ce.displayName="CarouselItem";var Co=W.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollPrev:s,canScrollPrev:l}=qo();return pn(ne,{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:[Ee(qc,{className:"h-6 w-6"}),Ee("span",{className:"sr-only",children:"Previous slide"})]})});Co.displayName="CarouselPrevious";var Ro=W.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollNext:s,canScrollNext:l}=qo();return pn(ne,{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:[Ee(Xc,{className:"h-6 w-6"}),Ee("span",{className:"sr-only",children:"Next slide"})]})});Ro.displayName="CarouselNext";var ko=W.forwardRef((e,o)=>{let{api:t}=qo(),[,a]=W.useState(!1),r=W.useCallback(()=>a(l=>!l),[]);W.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?Ee("div",{ref:o,className:` flex justify-center ${e.className}`,children:Array.from({length:n},(l,m)=>Ee(ne,{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))}):Ee(Zc,{})});ko.displayName="CarouselDots";import{Fragment as Ma,jsx as Q,jsxs as Ue}from"react/jsx-runtime";var ad=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return Ue(Ma,{children:[Q("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:Q("img",{className:"inset-0 h-full w-full object-cover",src:e?.thumbnailDesktop,alt:e?.title})}),Ue("div",{className:"mt-4 md:pr-3",children:[Q("div",{className:"font-semibold text-gray-900 group-hover:text-pink-500 md:text-lg md:leading-tight ",children:e?.title}),e?.description&&Q("div",{className:"mt-2 line-clamp-2 text-sm text-gray-500 md:text-sm",children:gn(e?.description??"")}),Ue("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&Ue(Ma,{children:[Q(ge,{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&&Q("span",{className:" flex-none leading-none text-gray-300 ",children:"\xB7"})]}),e?.totalViews&&Q("div",{className:"flex-none text-sm text-gray-500",children:e.totalViews})]})]})]})},rd=({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 ed(()=>{!t||!a||(a(t.selectedScrollSnap()+1),t.on("select",()=>{a&&a(t.selectedScrollSnap()+1)}))},[t,a]),Ue(Ma,{children:[Q(ue,{opts:{dragFree:!1},setApi:o,className:"w-full",children:Q(ve,{classNameContent:"!overflow-visible",className:"-ml-5",children:n?.map(p=>Q(ce,{className:"basis-11/12 pl-5 md:basis-1/2 lg:basis-4/12",children:Q("div",{onClick:g=>r(g,p?.id,p?.url),className:i("group cursor-pointer",d),children:Q(ad,{blog:p})},p?.id)},p?.id))})}),s&&Q("div",{className:"mt-8 flex w-full items-center justify-center md:mt-10 ",children:Ue(je,{action:m&&m,newTab:c,variant:"outline",children:[gn(l||"Xem th\xEAm")," "]})})]})},id=({carouselRef:e})=>Ue(ne,{onClick:()=>e?.scrollPrev(),disabled:!e?.canScrollPrev(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[Q(td,{className:"h-6 w-6"}),Q("span",{className:"sr-only",children:"Previous slide"})]}),nd=({carouselRef:e})=>Ue(ne,{onClick:()=>e?.scrollNext(),disabled:!e?.canScrollNext(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[Q(od,{className:"h-6 w-6"}),Q("span",{className:"sr-only",children:"Next slide"})]}),Fr=Jc(({dataHeading:e,dataBlog:o,onClickModal:t,onClickLoadMore:a})=>{let r=(c,d,p)=>{c?.preventDefault(),c?.stopPropagation(),t?t(d):window.open(p,"_blank")},[n,s]=fn(null),[,l]=fn(0),m=()=>n?Ue("div",{className:"ml-3 hidden items-center space-x-2 md:flex",children:[Q(id,{carouselRef:n}),Q(nd,{carouselRef:n})]}):Q(Ma,{});return Ue(Kc.Fragment,{children:[Ue("div",{className:" flex items-center justify-between",children:[e&&Q(h,{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)}),Q(m,{})]}),Q(rd,{dataBlog:o?.[0],onClickLoadMore:a,index:0,setCarouselRef:s,carouselRef:n,setCurrent:l,handleOnClickItem:r})]})});import{Fragment as cd,jsx as To}from"react/jsx-runtime";var sd=({template:e,dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return To(Da,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});case 2:return To(Fr,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return To(Da,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},ld=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})=>To(cd,{children:sd({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})}),md=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t=[],idSection:a,className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:m})=>To(V,{className:i("overflow-hidden",r),idSection:a,background:n,children:To(ld,{dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:s,onClickModal:l,onClickLoadMore:m})});import*as La from"react";import{enUS as gd,vi as ud}from"date-fns/locale";import{ChevronLeft as vd,ChevronRight as hd}from"lucide-react";import xd from"lunisolar";import{DayPicker as bd}from"react-day-picker";import*as un from"react";import*as Xo from"@radix-ui/react-checkbox";import{CheckIcon as dd}from"@heroicons/react/16/solid";import{cva as vn}from"class-variance-authority";import{jsx as Er}from"react/jsx-runtime";var pd=vn("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"}}),fd=vn("",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),Ia=un.forwardRef(({className:e,size:o,...t},a)=>Er(Xo.Root,{ref:a,className:i(pd({size:o}),e),...t,children:Er(Xo.Indicator,{className:i("flex items-center justify-center text-current"),children:Er(dd,{className:i(fd({size:o}))})})}));Ia.displayName=Xo.Root.displayName;import{Fragment as Cd,jsx as it,jsxs as zr}from"react/jsx-runtime";var yd=({date:e,cusContent:o})=>{let t=null;return t=xd(e).lunar,zr(Cd,{children:[o?o(e):e.getDate(),t&&it("span",{className:"luna-date absolute right-0.5 top-1 hidden text-[8px] leading-none group-[.show-luna]:block",children:t.day})]})},wd={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 Nd({isShow:e,setIsShow:o,lang:t}){let a=La.useId();return it("div",{className:"w-full p-3 pt-0",children:zr("div",{className:"flex cursor-pointer items-center space-x-2 border-t border-gray-100 pt-3",children:[it(Ia,{checked:e,id:`check-show-luna-${a}`,onCheckedChange:r=>{typeof r=="boolean"&&o(r)}}),it("label",{htmlFor:`check-show-luna-${a}`,className:"z-[1] 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 Pd=e=>e.getDay()===0||e.getDay()===6;function Aa({className:e,classNames:o,showOutsideDays:t=!1,enableLunaDate:a=!1,lang:r="vi",cusContentDay:n,...s}){let[l,m]=La.useState(!0);return it(bd,{locale:r==="vi"?ud:gd,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(Je({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(Je({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:Pd},modifiersClassNames:{weekend:"text-red-600"},components:{IconLeft:()=>it(vd,{className:"h-6 w-6"}),IconRight:()=>it(hd,{className:"h-6 w-6"}),DayContent:c=>it(yd,{date:c.date,cusContent:n}),Months:({children:c})=>zr("div",{className:"w-full",children:[it("div",{className:i("months-wrapper flex flex-col sm:flex-row"),children:c}),a&&it(Nd,{isShow:l,setIsShow:m,lang:r})]})},formatters:r==="vi"?wd:{},...s})}Aa.displayName="Calendar";import{QuestionMarkCircleIcon as Rd,XCircleIcon as kd}from"@heroicons/react/16/solid";import{format as Fa}from"date-fns";import{Calendar as Td}from"lucide-react";import*as xn from"react";import*as Dt from"@radix-ui/react-popover";import{jsx as hn}from"react/jsx-runtime";var Yo=Dt.Root,Zo=Dt.Trigger,So=xn.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},r)=>hn(Dt.Portal,{children:hn(Dt.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})}));So.displayName=Dt.Content.displayName;import{Fragment as bn,jsx as ke,jsxs as Ko}from"react/jsx-runtime";var Sd=({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 p=c?.selected||null;return Ko("div",{children:[Ko(Yo,{...m,children:[ke(Zo,{asChild:!0,children:Ko(Ae,{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",(!p||!(p instanceof Date)&&typeof p=="object"&&(!("from"in p)||!p.from))&&"text-gray-500",r&&"border-red-500 ring-1 ring-red-500"),disabled:n,...l,children:[ke("div",{className:"line-clamp-1 flex-1",children:p instanceof Date?Fa(p,s):p&&typeof p=="object"&&"from"in p&&"to"in p?ke(bn,{children:p.from?p.to?Ko(bn,{children:[ke("span",{className:"date-from",children:Fa(p.from,s)})," ",ke("span",{className:"date-separator",children:"-"}),ke("span",{className:"date-to",children:Fa(p.to,s)})]}):Fa(p.from,s):o}):o}),e&&ke("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",t===2&&" -top-2.5 text-sm",r&&"text-red-500"),children:e}),ke(Td,{className:"ml-2 h-4 w-4 flex-none text-gray-500"})]})}),ke(So,{className:"w-auto border-none !p-0",...d,children:ke(Aa,{...c,defaultMonth:p&&typeof p=="object"&&"from"in p?p.from:p instanceof Date?p:void 0})})]}),a&&Ko("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[r?ke(kd,{width:16,height:16,className:"text-red-500"}):ke(Rd,{width:16,height:16,className:"text-gray-500"}),ke("span",{className:i(r?"text-red-500":"text-gray-500",t===2?"text-sm":"text-xs"),children:a})]})]})};import{useEffect as Ad,useState as kn}from"react";import{QuestionMarkCircleIcon as Fd,XCircleIcon as Ed}from"@heroicons/react/16/solid";import{isValid as zd}from"date-fns";import*as nt from"react";import{CheckIcon as Dd,ChevronDownIcon as yn,ChevronUpIcon as Md,XCircleIcon as Id}from"@heroicons/react/16/solid";import{QuestionMarkCircleIcon as Ld}from"@heroicons/react/24/outline";import*as D from"@radix-ui/react-select";import{jsx as U,jsxs as Jo}from"react/jsx-runtime";var ea=nt.forwardRef(({className:e,children:o,label:t,message:a,size:r,isError:n,disabled:s,...l},m)=>Jo("div",{ref:m,className:i("select-mobase relative",e,s?"disabled":"",n?"[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-1 [&>.select-mobase-button]:ring-red-500":"",r===2?"[&>.select-mobase-button]:h-12 [&>.select-mobase-button]:text-base":""),children:[t&&U("span",{className:i("mobase-select-label absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",r===2&&"-top-2.5 text-sm",n&&"text-red-500"),children:t}),U(D.Root,{disabled:s,...l,children:o}),a&&Jo("div",{className:i("mobase-select-message mt-1 flex items-center space-x-1 text-gray-500",n&&"text-red-500"),children:[n?U(Id,{width:16,height:16}):U(Ld,{width:16,height:16}),U("span",{className:i(r===2?"text-sm":"text-xs"),children:a})]})]})),ta=D.Value,Do=nt.forwardRef(({className:e,children:o,...t},a)=>Jo(D.Trigger,{ref:a,className:i("select-mobase-button flex h-11 w-full items-center justify-between rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 ring-0 ring-inset transition-all hover:ring-1 hover:ring-gray-400 focus-visible:border-pink-500 focus-visible:ring-1 focus-visible:!ring-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 data-[state=open]:border-pink-500 data-[placeholder]:text-gray-500 data-[state=open]:ring-1 data-[state=open]:ring-pink-500",e),...t,children:[U("div",{className:"line-clamp-1 text-left",children:o}),U(D.Icon,{asChild:!0,children:U(yn,{className:"h-4 w-4 flex-none text-gray-500"})})]}));Do.displayName=D.Trigger.displayName;var Hr=nt.forwardRef(({className:e,...o},t)=>U(D.ScrollUpButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1",e),...o,children:U(Md,{className:"h-5 w-5"})}));Hr.displayName=D.ScrollUpButton.displayName;var _r=nt.forwardRef(({className:e,...o},t)=>U(D.ScrollDownButton,{ref:t,className:i("flex cursor-default items-center justify-center bg-gradient-to-t from-white to-transparent py-1",e),...o,children:U(yn,{className:"h-5 w-5"})}));_r.displayName=D.ScrollDownButton.displayName;var Mo=nt.forwardRef(({className:e,children:o,position:t="popper",...a},r)=>U(D.Portal,{children:Jo(D.Content,{ref:r,className:i("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 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900",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:[U(Hr,{}),U(D.Viewport,{className:i("p-0",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),U(_r,{})]})}));Mo.displayName=D.Content.displayName;var oa=nt.forwardRef(({className:e,children:o,...t},a)=>U(D.Group,{ref:a,className:i("relative border-b border-gray-200 p-1 after:w-full last:border-0",e),...t,children:o})),wn=nt.forwardRef(({className:e,...o},t)=>U(D.Label,{ref:t,className:i("z-[1] py-1.5 pl-7 pr-2 text-sm font-semibold",e),...o}));wn.displayName=D.Label.displayName;var _t=nt.forwardRef(({className:e,children:o,...t},a)=>Jo(D.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:[U("span",{className:"absolute left-2 flex h-4 w-4 items-center justify-center",children:U(D.ItemIndicator,{children:U(Dd,{className:"h-4 w-4 text-pink-500"})})}),U(D.ItemText,{children:o})]})),Nn=nt.forwardRef(({className:e,...o},t)=>U(D.Separator,{ref:t,className:i("-mx-1 my-1 h-px",e),...o}));Nn.displayName=D.Separator.displayName;var Pn=["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"],Cn=["January","February","March","April","May","June","July","August","September","October","November","December"],Br=(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}},Rn=(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 oe,jsxs as st}from"react/jsx-runtime";var Hd=({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:p=!1})=>{let[g,v]=kn(o??null),y=Math.min(c,d),C=Math.max(c,d),w=l==="MM/yyyy",A=(P,O)=>{if(O===0){v(void 0),t?.(void 0);return}let E=g?.getFullYear()||new Date().getFullYear(),We=g?.getMonth()??0,$e=g?.getDate()??1;P==="month"&&O!==null&&(We=O-1),P==="year"&&O!==null&&(E=O),w?$e=1:P==="day"&&O!==null&&($e=O);let Ra=Br(E,We+1).daysInMonth;$e>Ra&&($e=1);let Wo=new Date(E,We,$e);zd(Wo)&&(v(Wo),t?.(Wo))},[B,z]=kn(!1),vt=P=>{z(P)};return Ad(()=>{v(o??null)},[o]),st("div",{className:i("relative",s&&"cursor-no-drop"),children:[st("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",B&&"border-pink-500 ring-1 ring-pink-500",a===2&&"h-12 text-base",g?"":"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&&oe("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",a===2&&" -top-2.5 text-sm",n&&"text-red-500"),children:e}),st("div",{className:"flex h-full flex-row divide-x",children:[!w&&st(ea,{value:g?g.getDate().toString().padStart(2,"0"):"",onValueChange:P=>A("day",parseInt(P,10)),onOpenChange:vt,className:"w-[30%]",children:[oe(Do,{className:"h-full w-full rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(ta,{placeholder:m==="vi"?"Ng\xE0y":"Day"})}),oe(Mo,{onCloseAutoFocus:P=>P.preventDefault(),children:st(oa,{children:[!p&&oe(_t,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:Br(g?.getFullYear()||new Date().getFullYear(),(g?.getMonth()??0)+1).daysInMonth},(P,O)=>(O+1).toString().padStart(2,"0")).map(P=>oe(_t,{value:P,children:P},P))]})})]}),st(ea,{value:g?(g.getMonth()+1).toString():"",onValueChange:P=>A("month",parseInt(P,10)),onOpenChange:vt,className:i(w?"w-1/2":"w-2/5"),children:[oe(Do,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(ta,{placeholder:m==="vi"?"Th\xE1ng":"Month"})}),oe(Mo,{onCloseAutoFocus:P=>P.preventDefault(),children:st(oa,{children:[!p&&oe(_t,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:12},(P,O)=>O+1).map(P=>oe(_t,{value:P.toString(),children:m==="vi"?Pn[P-1]:Cn[P-1]},P))]})})]}),st(ea,{value:g?g.getFullYear().toString():"",onValueChange:P=>A("year",parseInt(P,10)),onOpenChange:vt,className:i(w?"w-1/2":"w-[30%]"),children:[oe(Do,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(ta,{placeholder:m==="vi"?"N\u0103m":"Year"})}),oe(Mo,{onCloseAutoFocus:P=>P.preventDefault(),children:st(oa,{children:[!p&&oe(_t,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Rn(y,C).map(P=>oe(_t,{value:P.toString(),children:P},P))]})})]})]})]}),r&&st("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[n?oe(Ed,{width:16,height:16,className:"text-red-500"}):oe(Fd,{width:16,height:16,className:"text-gray-500"}),oe("span",{className:i(n?"text-red-500":"text-gray-500",a===2?"text-sm":"text-xs"),children:r})]})]})};import*as to from"react";import*as $ from"@radix-ui/react-alert-dialog";import{jsx as Mt,jsxs as Od}from"react/jsx-runtime";var _d=$.Root,Bd=$.Trigger,Tn=$.Portal,Or=to.forwardRef(({className:e,...o},t)=>Mt($.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}));Or.displayName=$.Overlay.displayName;var Sn=to.forwardRef(({className:e,...o},t)=>Od(Tn,{children:[Mt(Or,{}),Mt($.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})]}));Sn.displayName=$.Content.displayName;var Dn=({className:e,...o})=>Mt("div",{className:i("flex flex-col space-y-2 text-left",e),...o});Dn.displayName="AlertDialogHeader";var Mn=({className:e,...o})=>Mt("div",{className:i("flex flex-row justify-end space-x-4",e),...o});Mn.displayName="AlertDialogFooter";var In=to.forwardRef(({className:e,...o},t)=>Mt($.Title,{ref:t,className:i("text-lg text-gray-900 font-semibold",e),...o}));In.displayName=$.Title.displayName;var Ln=to.forwardRef(({className:e,...o},t)=>Mt($.Description,{ref:t,className:i("text-sm text-muted-foreground",e),...o}));Ln.displayName=$.Description.displayName;var An=to.forwardRef(({className:e,...o},t)=>Mt($.Action,{ref:t,className:i(Je({variant:"primary"}),"",e),...o}));An.displayName=$.Action.displayName;var Fn=to.forwardRef(({className:e,...o},t)=>Mt($.Cancel,{ref:t,className:i(Je({variant:"secondary"}),e),...o}));Fn.displayName=$.Cancel.displayName;import{memo as Xd,useState as Yd}from"react";import{useEffect as Vd,useState as zn}from"react";import Hn from"html-react-parser";import{motion as Wd}from"motion/react";import*as En from"@radix-ui/react-aspect-ratio";var H=En.Root;import{Fragment as _n,jsx as ae,jsxs as aa}from"react/jsx-runtime";var $d=({guideGroup:e,mockup:o})=>{let[t,a]=zn(),[r,n]=zn(0),s={open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeInOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeInOut"}}};return Vd(()=>{t&&(n(t.selectedScrollSnap()+1),t.on("select",()=>{n(t.selectedScrollSnap()+1)}))},[t]),ae(_n,{children:e?.stepList&&e?.stepList?.length>0&&aa("div",{className:"mx-auto flex max-w-3xl flex-nowrap justify-center",children:[ae("div",{className:"h-auto w-64 flex-none",children:aa("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"&&aa(_n,{children:[ae("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),ae("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:aa(ue,{setApi:a,children:[ae(ve,{className:"ml-0",children:e?.stepList.map((l,m)=>ae(ce,{className:"pl-0",children:ae(H,{ratio:o==="small"?540/960:540/1168,children:l?.image&&ae("img",{src:l.image,className:"size-full object-contain",alt:l.title})})},m))}),ae(Co,{className:"left-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"}),ae(Ro,{className:"right-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"})]})})]})}),ae("div",{className:"flex flex-auto pl-12 pt-4",children:ae("ul",{className:"flex flex-col",children:e?.stepList.map((l,m)=>aa("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:[ae("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}),ae("div",{className:i(" text-sm font-medium",m+1===r?"text-pink-500":"text-gray-900"),children:Hn(l.title)}),l.content&&ae(Wd.div,{initial:"closed",animate:m+1===r?"open":"closed",variants:s,style:{overflow:"hidden"},children:ae("div",{className:"mt-3 text-sm text-gray-700",children:Hn(l.content)})})]},m))})})]})})},Vr=$d;import{useEffect as Gd,useRef as jd,useState as Ea}from"react";import{ChevronRightIcon as Bn}from"@heroicons/react/20/solid";import Qd from"embla-carousel-autoplay";import za from"html-react-parser";import{Fragment as Wr,jsx as N,jsxs as we}from"react/jsx-runtime";var Ud=({open:e,setOpenDialog:o,dataStep:t,mockup:a})=>{let[r,n]=Ea(0),[s,l]=Ea();return Gd(()=>{s&&(n(s.selectedScrollSnap()+1),s.on("select",()=>{n(s.selectedScrollSnap()+1)}))},[s]),!t||!t?.stepList?.length?null:N(Ge,{open:e,onOpenChange:o,children:we(Fe,{position:"bottom",height:"full",children:[N(yo,{children:N(wo,{className:"line-clamp-1",children:t?.title})}),we(et,{className:"grid overflow-hidden p-0 ",children:[N(ue,{setApi:l,className:" grid overflow-hidden",children:N(ve,{className:"ml-0 h-full",children:t.stepList.map((m,c)=>N(ce,{className:"h-full w-full pl-0",children:we("div",{className:"flex h-full flex-col overflow-y-auto",children:[N("div",{className:" relative flex w-full flex-none justify-center bg-gray-100 p-5",children:N("div",{className:i("mx-auto",a==="small"?"w-56":"w-52"),children:we("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"&&we(Wr,{children:[N("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),N("div",{className:i("relative h-full w-full overflow-hidden",a==="none"?"":"rounded-[1.5rem] bg-gray-200",a==="small"?"rounded-xl":""),children:N(H,{ratio:a==="small"?540/960:540/1168,children:m?.image&&N("img",{src:m.image,className:"size-full object-contain",alt:m.title})})})]})})}),we("div",{className:"p-5 pb-12",children:[N("div",{className:"font-semibold",children:za(m.title)}),m?.content&&N("div",{className:"mt-3 text-sm text-gray-800",children:za(m.content)})]})]})},c))})}),N("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)=>N("div",{className:`h-2 w-2 cursor-pointer rounded-full ${c+1===r?"bg-white":"bg-white/40"}`,onClick:()=>s&&s.scrollTo(c)},c))})]})]})})},qd=({dataGuide:e,mockup:o,isStep:t})=>{let[a,r]=Ea(!1),[n,s]=Ea(null),l=jd(Qd({delay:3500,stopOnInteraction:!1,stopOnMouseEnter:!1})),m=c=>{s(e?.[c]||null),r(!0)};return e?.length===0?null:we(Wr,{children:[e?.length>1?N("div",{className:"-mx-5 grid grid-cols-1 md:mx-0",children:e.map((c,d)=>we("div",{className:"relative flex cursor-pointer flex-nowrap items-center space-x-4 pl-5 ",onClick:()=>m(d),children:[N("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)&&N("img",{src:c.avatar||c?.stepList?.[0]?.image,className:"h-full w-full object-cover object-top",alt:c.title})}),we("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:[we("div",{className:"py-2",children:[t&&N("span",{className:"text-sm font-medium text-pink-500",children:`B\u01B0\u1EDBc ${d+1}`}),N("div",{className:"font-semibold",children:za(c.title)}),c?.description&&N("div",{className:"mt-1 text-sm text-gray-500",children:za(c.description)})]}),N("div",{className:" absolute right-4 top-1/2 -translate-y-1/2 text-gray-500",children:N(Bn,{className:"h-6 w-6"})})]})]},d))}):e?.[0]&&e[0].stepList?.length>0&&we("div",{className:"mx-auto flex max-w-3xl flex-col flex-wrap justify-center gap-y-6",children:[N("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:N("div",{className:"mx-auto h-auto w-72",children:we("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"&&we(Wr,{children:[N("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),N("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:N(ue,{plugins:[l.current],children:N(ve,{className:"ml-0",children:e[0]?.stepList.map((c,d)=>N(ce,{className:"pl-0",onClick:()=>m(0),children:N(H,{ratio:o==="small"?540/960:540/1168,children:c?.image&&N("img",{src:c.image,className:"size-full object-contain",alt:c.title})})},d))})})})]})})}),N("div",{className:"flex w-full flex-none justify-center",children:we(ge,{size:"lg",variant:"primary",onClick:()=>m(0),children:["Xem chi ti\u1EBFt h\u01B0\u1EDBng d\u1EABn ",N(Bn,{className:"ml-1 h-5 w-5"})]})})]}),a&&N(Ud,{open:a,setOpenDialog:r,dataStep:n,mockup:o})]})},On=qd;import{Fragment as Zd,jsx as de,jsxs as ra}from"react/jsx-runtime";var Vn=({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 de("svg",{fill:"none",viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",className:i("flex-0 absolute w-5 transition-all",o),children:de("path",{d:t.d,fill:"currentColor"})})},$r=Xd(({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,mockup:r,isStep:n})=>{let{showGradientOverlay:s=!0,gradientOverlayColor:l,className:m}=o||{},[c,d]=Yd(t?.[0]?.title||"");return ra(Zd,{children:[e&&de(h,{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&&ra(ho,{children:[de(Ke,{lessThan:"md",children:de(On,{dataGuide:t,mockup:r,isStep:n})}),de(Ke,{greaterThan:"sm",children:t?.length>1?ra(St,{defaultValue:t[0]?.title,onValueChange:p=>d(p),children:[ra(Ct,{showGradientOverlay:s,gradientOverlayColor:l,className:m,children:[de(Rt,{className:"mb-6 text-center",children:de(tt,{className:i("mx-auto mb-0 inline-flex w-auto items-center overflow-visible",n?"space-x-10":""),children:t.map((p,g)=>{let v=g===t.length-1,y=c===p?.title||"";return ra(ot,{value:p.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":"",y&&n?"data-[state=active]:bg-pink-500 data-[state=active]:text-white":""),children:[n&&g!==0&&de(Vn,{direction:"left",className:i("right-full top-0",y?"text-pink-500":"text-pink-100")}),p.title,n&&!v&&de(Vn,{direction:"right",className:i("left-full top-0",y?"text-pink-500":"text-pink-100")})]},p.title+g)})})}),de(kt,{}),de(Tt,{})]}),t.map((p,g)=>de(at,{value:p.title,children:de(Vr,{guideGroup:p,mockup:r})},p.title+g))]}):t?.length===1&&t[0]&&de(Vr,{guideGroup:t[0],mockup:r})})]}),a&&de(x,{isFullInMobile:a?.isFullInMobile,buttons:a?.buttons,className:a?.className,align:"center"})]})});import{Fragment as tp,jsx as ia}from"react/jsx-runtime";var Kd=({template:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,mockup:n,isStep:s})=>{switch(e){case 1:return ia($r,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s});default:return ia($r,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s})}},Jd=({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})=>ia(tp,{children:Kd({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})}),ep=({idSection:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,className:n,background:s,template:l=1,mockup:m="default",isStep:c=!1})=>ia(V,{className:i(n),background:s,idSection:e,children:ia(Jd,{dataHeading:o,template:l,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:m,isStep:c})});import{ChevronLeft as op,ChevronRight as ap}from"lucide-react";import{Fragment as rp,jsx as ze,jsxs as Wn}from"react/jsx-runtime";function $n({current:e,total:o,onChange:t}){let a=r=>ze("li",{children:ze("button",{className:i(eo({variant:e===r?"outline":"secondary",size:"sm"})),onClick:()=>t(r),children:r})},r);return ze("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center"),children:Wn("ul",{className:i("flex flex-row flex-wrap items-center gap-2"),children:[o>1&&ze("li",{children:ze("button",{className:i(eo({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>e>1&&t(e-1),children:ze(op,{className:"h-4 w-4"})})}),o<=6?Array(o).fill(0).map((r,n)=>a(n+1)):Wn(rp,{children:[a(1),e===1&&[a(2),a(3)],e>3&&ze("li",{children:ze("button",{className:i(eo({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&&ze("button",{className:i(eo({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e+3),children:"..."}),a(o)]}),o>1&&ze("li",{children:ze("button",{className:i(eo({variant:"secondary",size:"sm"})),disabled:e===o,onClick:()=>e<o&&t(e+1),children:ze(ap,{className:"h-4 w-4"})})})]})})}import{forwardRef as ip}from"react";import{QuestionMarkCircleIcon as np}from"@heroicons/react/24/outline";import{XCircleIcon as sp}from"@heroicons/react/24/solid";import{jsx as Io,jsxs as Gn}from"react/jsx-runtime";var Gr=ip(({disabled:e,isError:o,message:t,label:a,className:r,inputClassName:n,size:s,rows:l=3,...m},c)=>Gn("div",{className:i("relative",r,o&&"mobase-text-area-error"),children:[a&&Io("span",{className:i("mobase-text-area-label absolute -top-2.5 left-2 z-[1] bg-white px-1.5 text-sm text-gray-500",s===2&&" -top-2.5 text-sm"),children:a}),Io("textarea",{disabled:e,ref:c,className:i("mobase-text-area-box block w-full rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-500 focus:border-pink-500 disabled:border-gray-200 disabled:bg-gray-50",s===2&&"text-base",n),rows:l,...m}),t&&Gn("div",{className:"mobase-text-area-message mt-0.5 flex items-center space-x-1",children:[o?Io(sp,{width:16,height:16,className:"text-red-500"}):Io(np,{width:16,height:16,className:"text-gray-500"}),Io("span",{className:i("text-gray-500 ",s===2?"text-sm":"text-xs"),children:t})]}),Io("style",{children:`
|
|
70
|
+
`})]}),Zt=({className:e,children:o,title:t,shortTitle:a,qrImage:r,qrLink:n,logoQr:s,isQrForAll:l=!1,...m})=>M(Ge,{...m,children:M(Fe,{className:i("h-auto max-h-screen overflow-hidden border-0 md:max-h-screen md:max-w-2xl lg:max-w-3xl [&>button>svg]:text-white",e),size:"xl",positionRightCloseBtn:!0,children:M(et,{className:"p-0",children:fe("div",{className:"flex flex-row flex-wrap",children:[M("div",{className:"hidden flex-none w-full sm:block md:w-5/12",children:o||fe("div",{className:"grid grid-cols-1 gap-y-6 px-5 py-8 text-sm",children:[fe("div",{className:"flex flex-nowrap items-center",children:[M("div",{className:"flex-none",children:M("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091602-637359309621891617.png",alt:"Step 1"})}),fe("div",{className:"flex-1 pl-4",children:[M("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 1 :"}),M("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"})]})]}),fe("div",{className:"flex flex-nowrap items-center",children:[M("div",{className:"flex-none",children:M("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091443-637359308837905996.png",alt:"Step 2"})}),fe("div",{className:"flex-1 pl-4",children:[M("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 2 :"}),M("div",{className:"mt-1 text-gray-500",children:"Qu\xE9t m\xE3 QR Code theo h\xECnh b\xEAn ph\u1EA3i"})]})]}),fe("div",{className:"flex flex-nowrap items-center",children:[M("div",{className:"flex-none",children:M("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917090146-637359301062519803.png",alt:"Step 3"})}),fe("div",{className:"flex-1 pl-4",children:[M("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 3 :"}),fe("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"]})]})]})]})}),M("div",{className:"flex justify-center items-center w-full h-auto md:w-7/12",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:fe("div",{className:"px-5 py-10 text-center",children:[t&&M("h4",{className:"mb-5 text-base font-semibold text-white",children:t}),fe("div",{className:"relative",children:[l&&M("div",{className:"absolute -top-2 left-1/2 z-[5] -translate-x-1/2",children:M("img",{src:"https://homepage.momocdn.net/fileuploads/svg/momo-file-231211170324.svg",alt:"Title QR all"})}),M(mc,{img:r,isQrForAll:l,children:n&&M(lc,{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 vc}from"react";import{useEffect as cc,useLayoutEffect as dc,useState as pc}from"react";import fc from"ua-parser-js";var gc=()=>fc().device.type==="mobile",uc=typeof window<"u"?dc:cc,No=()=>{let[e,o]=pc(!1);return uc(()=>{o(gc())},[]),e};import{Fragment as hc,jsx as ka,jsxs as xc}from"react/jsx-runtime";var je=({action:e,newTab:o,offset:t,dialogQrProps:a,className:r,children:n,...s})=>{let[l,m]=vc(!1),c=No(),d=!!a?.qrLink,p=()=>{let A=d?a?.qrLink:e;return typeof A=="string"?A.trim():""},g=()=>{let A=p();!A&&typeof e!="function"||(typeof e=="function"?e():window.open(A,o?"_blank":"_self"))},v=(A,B=0)=>{let z=document.querySelector(A);if(!z)return;let P=z.getBoundingClientRect().top+window.scrollY-B;window.scrollTo({top:P,behavior:"smooth"})},y=()=>{typeof e=="string"&&e.startsWith("#")?v(e,t):g()},C=()=>xc(hc,{children:[ka(Ae,{...s,className:r,onClick:()=>m(!0),"data-name":"button-action-with-qr",children:n}),ka(Zt,{...a,open:l,onOpenChange:()=>m(!1),qrLink:a?.qrLink||""})]});return d?c?a?.isQrForAll?C():ka(Ae,{...s,className:r,onClick:g,"data-name":"button-action-with-qr",children:n}):C():ka(Ae,{...s,onClick:y,className:i("cursor-pointer",r),"data-name":"button-action-without-qr",rel:"noreferrer",children:n})};import*as Po from"react";import{ChevronRightIcon as Nc,DotsHorizontalIcon as Pc}from"@radix-ui/react-icons";import{Slot as Cc}from"@radix-ui/react-slot";import{useRouter as Rc}from"next/router";import{useRouter as yc}from"next/router";var bc=({href:e,locale:o,defaultLocale:t,basePath:a=""})=>{if(!o||o===t||!e.startsWith("/")||/\.(pdf|docx|xlsx|doc|xls)$/i.test(e))return e;let r=`/${o}`,n=new RegExp(`^${a}(?=[/#?]|$)`);return a&&a!=="/"&&n.test(e)?e.replace(n,`${a}${r}`):`${r}${e}`},Kt=({href:e,locale:o,defaultLocale:t,basePath:a})=>e?bc({href:e,locale:o,defaultLocale:t,basePath:a}):void 0;import{jsx as wc}from"react/jsx-runtime";var T=({href:e,children:o,...t})=>{let a=yc(),{locale:r,basePath:n,defaultLocale:s}=a;return wc("a",{href:Kt({href:e,locale:r,basePath:n,defaultLocale:s}),...t,children:o})};import{jsx as Pt,jsxs as kc}from"react/jsx-runtime";var Zi=Po.forwardRef(({className:e,...o},t)=>Pt("nav",{ref:t,"aria-label":"breadcrumb",className:i("",e),...o}));Zi.displayName="Breadcrumb";var Ki=Po.forwardRef(({className:e,...o},t)=>Pt("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}));Ki.displayName="BreadcrumbList";var Ji=Po.forwardRef(({className:e,...o},t)=>Pt("li",{ref:t,className:i("shrink-0 text-gray-900 hover:text-pink-500",e),...o}));Ji.displayName="BreadcrumbItem";var en=Po.forwardRef(({asChild:e,className:o,href:t,...a},r)=>{let n=Rc(),{locale:s,basePath:l,defaultLocale:m}=n;return Pt(e?Cc:"a",{ref:r,className:i("transition-colors hover:text-foreground",o),href:Kt({href:t,locale:s,basePath:l,defaultLocale:m}),...a})});en.displayName="BreadcrumbLink";var tn=Po.forwardRef(({className:e,...o},t)=>Pt("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:i("text-sm text-gray-500",e),...o}));tn.displayName="BreadcrumbPage";var on=({children:e,className:o,...t})=>Pt("li",{role:"presentation","aria-hidden":"true",className:i("text-gray-900",o),...t,children:e??Pt(Nc,{className:"w-2 h-2"})});on.displayName="BreadcrumbSeparator";var an=({className:e,...o})=>kc("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...o,children:[Pt(Pc,{className:"w-4 h-4 text-gray-900"}),Pt("span",{className:"sr-only",children:"More"})]});an.displayName="BreadcrumbElipssis";import Ir from"html-react-parser";import{createContext as Tc,useContext as rn}from"react";import{jsx as Uo}from"react/jsx-runtime";var kr=Tc({align:"center"}),Tr=({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 Uo("div",{className:i("mb-1 font-semibold",n[e],s[o],t&&"truncate",a),children:r})},Sr=({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}=rn(kr);return Uo(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})},Dr=({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}=rn(kr);return Uo("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})},Mr=({className:e,align:o="center",children:t})=>Uo("div",{className:i("mb-5 md:mb-8",{left:"text-left",center:"text-center",right:"text-right"}[o],e),children:Uo(kr.Provider,{value:{align:o},children:t})});import{jsx as Jt,jsxs as Sc}from"react/jsx-runtime";var V=({idSection:e,className:o,background:t,children:a})=>Jt("section",{id:e,className:i("block-section py-8 md:py-10 lg:py-14",o),style:{background:t},children:Jt("div",{className:"wrapper relative",children:a})}),h=({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:Sc(Mr,{align:e,className:l,children:[o&&Jt(Tr,{color:m,children:o}),t&&Jt(Sr,{tagHeading:r,color:c,size:s,children:Ir(t)}),a&&Jt(Dr,{color:d,size:"large",marginTop:s==="large"?"spacing2Xl":"spacingX",children:Ir(a)})]})},x=({align:e,isFullInMobile:o=!1,buttons:t,className:a})=>t?.length===0?null:Jt("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 Jt(je,{...l,className:i(o&&"w-full md:w-auto",r?.className),children:Ir(s)},n)})});import $c,{memo as Gc}from"react";import{ArrowDownIcon as jc}from"@heroicons/react/20/solid";import Qc from"html-react-parser";import{createContext as Lc,useCallback as Ac,useContext as Lr,useEffect as Fc,useRef as Ec,useState as zc}from"react";import{ChevronLeft as Hc,ChevronRight as _c}from"lucide-react";import*as nn from"react";import{Slot as Dc}from"@radix-ui/react-slot";import{cva as Mc}from"class-variance-authority";import{jsx as Ic}from"react/jsx-runtime";var eo=Mc("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"}}),ne=nn.forwardRef(({className:e,variant:o="primary",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Dc:"button",m=i(eo({variant:o,size:t,className:e}));return Ic(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ne.displayName="IconButton";import{Fragment as Bc,jsx as Ht,jsxs as sn}from"react/jsx-runtime";var Ta=Lc(void 0),Ct=({showGradientOverlay:e=!0,gradientOverlayColor:o="255, 255, 255",className:t,children:a})=>{let r=Ec(null),[n,s]=zc({left:!1,right:!1}),l=Ac(()=>{let c=r.current;if(c){let{scrollLeft:d,scrollWidth:p,clientWidth:g}=c;s({left:d>0,right:Math.ceil(d+g)<p})}},[]);Fc(()=>{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:p,clientWidth:g,scrollWidth:v}=d,y=g*.7*(c==="left"?-1:1),C=p+y;C<0?C=0:C>v-g&&(C=v-g),d.scrollTo({left:C,behavior:"smooth"})}};return Ht(Ta.Provider,{value:{scrollContainerRef:r,showArrows:n,scroll:m,gradientOverlayColor:o},children:sn("div",{className:i("relative w-full",t),children:[e&&sn(Bc,{children:[n.left&&Ht("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&&Ht("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]})})},Rt=({className:e,children:o})=>{let t=Lr(Ta);if(!t)throw new Error("HorizontalContent must be used within a HorizontalScroll");return Ht("div",{ref:t.scrollContainerRef,className:i("scrollbar-hide overflow-x-auto scroll-smooth",e),role:"region","aria-label":"Scrollable content",children:o})},kt=({className:e,children:o,...t})=>{let a=Lr(Ta);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.left?Ht(ne,{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||Ht(Hc,{className:"h-4 w-4"})}):null},Tt=({className:e,children:o,...t})=>{let a=Lr(Ta);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.right?Ht(ne,{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||Ht(_c,{className:"h-4 w-4"})}):null};import*as Sa from"react";import*as Qe from"@radix-ui/react-tabs";import{jsx as Ar}from"react/jsx-runtime";var St=Qe.Root,tt=Sa.forwardRef(({className:e,size:o="sm",isDivider:t=!1,...a},r)=>Ar(Qe.List,{ref:r,className:i("inline-flex w-full flex-row items-center space-x-5 overflow-x-auto [&::-webkit-scrollbar]:hidden",`text-${o}`,t&&"border-b border-gray-200",e),...a}));tt.displayName=Qe.List.displayName;var ot=Sa.forwardRef(({className:e,...o},t)=>Ar(Qe.Trigger,{ref:t,className:i("ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap border-b-2 border-transparent py-3 font-semibold text-gray-900 transition-all hover:text-pink-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-pink-500 data-[state=active]:text-pink-500",e),...o}));ot.displayName=Qe.Trigger.displayName;var at=Sa.forwardRef(({className:e,...o},t)=>Ar(Qe.Content,{ref:t,className:i("ring-offset-background focus-visible:ring-ring mt-3 text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",e),...o}));at.displayName=Qe.Content.displayName;import*as ln from"react";import{Slot as Oc}from"@radix-ui/react-slot";import{cva as Vc}from"class-variance-authority";import{jsx as Wc}from"react/jsx-runtime";var mn=Vc("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"}}),ge=ln.forwardRef(({className:e,variant:o="default",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Oc:"button",m=i(mn({variant:o,size:t,className:e}));return Wc(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ge.displayName="TextButton";import{Fragment as cn,jsx as j,jsxs as rt}from"react/jsx-runtime";var Uc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return rt(cn,{children:[j("div",{className:"flex-none pr-3 basis-1/2 md:basis-full md:pr-0",children:j("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:rt("picture",{children:[j("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),j("img",{className:"object-cover w-full h-full",src:e?.thumbnailMobile,alt:e?.title})]})})}),rt("div",{className:"overflow-hidden basis-1/2 md:mt-3 md:basis-full",children:[e?.category&&e?.categoryUrl&&j(ge,{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}),j("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}),rt("div",{className:"flex items-center mt-2 md:space-x-1",children:[e?.category&&e?.categoryUrl&&rt(cn,{children:[j(ge,{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&&j("span",{className:"flex-none hidden leading-none md:block",children:"\xB7"})]}),e?.totalViews&&j("div",{className:"flex-none text-xs text-gray-500",children:e.totalViews})]})]})]})},Da=Gc(({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},m=(d,p,g)=>{d?.preventDefault(),d?.stopPropagation(),a?a(p):window.open(g,"_blank")},c=(d,p)=>rt("div",{children:[j("div",{className:i("-mx-3 flex flex-row flex-wrap gap-y-5",d?.blogList?.length<3?"md:justify-center":""),children:d?.blogList?.map((g,v)=>j("div",{className:"min-w-0 px-3 basis-full md:basis-1/2 lg:basis-1/3",children:j("div",{onClick:y=>m(y,g?.id,g?.url),className:i("group flex cursor-pointer flex-row md:flex-col",d?.classNameItem),children:j(Uc,{blog:g})},g?.id)},v))}),d?.isShowBtn&&j("div",{className:"flex items-center justify-center w-full mt-8",children:rt(je,{action:r?()=>r?.(p):d?.btnUrl,newTab:d?.isNewTab,variant:"outline",children:[Qc(d.btnName||"Xem th\xEAm"),d?.isLoading?j(bo,{className:"w-5 h-5 ml-2 animate-spin-loading"}):r&&!d?.btnUrl&&j(jc,{className:"w-5 h-5 ml-2 -mb-1 animate-bounce"})]})})]},d?.title||p);return rt($c.Fragment,{children:[e&&j(h,{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?rt(St,{defaultValue:t[0]?.title,children:[rt(Ct,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[j(Rt,{className:"mb-6 text-center",children:j(tt,{className:"inline-flex items-center w-auto mx-auto mb-0 overflow-visible",children:t.map((d,p)=>j(ot,{value:d.title,children:d.title},d.title+p))})}),j(kt,{}),j(Tt,{})]}),t.map((d,p)=>j(at,{value:d.title,children:c(d,p)},d.title+p))]}):t?.length===1&&t[0]&&c(t[0],0)]})});import Kc,{memo as Jc,useEffect as ed,useState as fn}from"react";import{ChevronLeftIcon as td,ChevronRightIcon as od}from"@heroicons/react/20/solid";import gn from"html-react-parser";import*as W from"react";import{ChevronLeftIcon as qc,ChevronRightIcon as Xc}from"@heroicons/react/20/solid";import Yc from"embla-carousel-react";import{Fragment as Zc,jsx as Ee,jsxs as pn}from"react/jsx-runtime";var dn=W.createContext(null);function qo(){let e=W.useContext(dn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var ue=W.forwardRef(({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:r,children:n,...s},l)=>{let[m,c]=Yc({align:"start",...o,axis:e==="horizontal"?"x":"y"},a),[d,p]=W.useState(!1),[g,v]=W.useState(!1),y=W.useCallback(B=>{B&&(p(B.canScrollPrev()),v(B.canScrollNext()))},[]),C=W.useCallback(()=>{c?.scrollPrev()},[c]),w=W.useCallback(()=>{c?.scrollNext()},[c]),A=W.useCallback(B=>{B.key==="ArrowLeft"?(B.preventDefault(),C()):B.key==="ArrowRight"&&(B.preventDefault(),w())},[C,w]);return W.useEffect(()=>{!c||!t||t(c)},[c,t]),W.useEffect(()=>{if(c)return y(c),c.on("reInit",y),c.on("select",y),()=>{c?.off("select",y)}},[c,y]),Ee(dn.Provider,{value:{carouselRef:m,api:c,opts:o,orientation:e||(o?.axis==="y"?"vertical":"horizontal"),scrollPrev:C,scrollNext:w,canScrollPrev:d,canScrollNext:g},children:Ee("div",{ref:l,onKeyDownCapture:A,className:i("relative",r),role:"region","aria-roledescription":"carousel",...s,children:n})})});ue.displayName="Carousel";var ve=W.forwardRef(({className:e,classNameContent:o,...t},a)=>{let{carouselRef:r,orientation:n}=qo();return Ee("div",{ref:r,className:i("overflow-hidden",o),children:Ee("div",{ref:a,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ve.displayName="CarouselContent";var ce=W.forwardRef(({className:e,...o},t)=>{let{orientation:a}=qo();return Ee("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})});ce.displayName="CarouselItem";var Co=W.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollPrev:s,canScrollPrev:l}=qo();return pn(ne,{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:[Ee(qc,{className:"h-6 w-6"}),Ee("span",{className:"sr-only",children:"Previous slide"})]})});Co.displayName="CarouselPrevious";var Ro=W.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollNext:s,canScrollNext:l}=qo();return pn(ne,{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:[Ee(Xc,{className:"h-6 w-6"}),Ee("span",{className:"sr-only",children:"Next slide"})]})});Ro.displayName="CarouselNext";var ko=W.forwardRef((e,o)=>{let{api:t}=qo(),[,a]=W.useState(!1),r=W.useCallback(()=>a(l=>!l),[]);W.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?Ee("div",{ref:o,className:` flex justify-center ${e.className}`,children:Array.from({length:n},(l,m)=>Ee(ne,{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))}):Ee(Zc,{})});ko.displayName="CarouselDots";import{Fragment as Ma,jsx as Q,jsxs as Ue}from"react/jsx-runtime";var ad=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return Ue(Ma,{children:[Q("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:Q("img",{className:"inset-0 h-full w-full object-cover",src:e?.thumbnailDesktop,alt:e?.title})}),Ue("div",{className:"mt-4 md:pr-3",children:[Q("div",{className:"font-semibold text-gray-900 group-hover:text-pink-500 md:text-lg md:leading-tight ",children:e?.title}),e?.description&&Q("div",{className:"mt-2 line-clamp-2 text-sm text-gray-500 md:text-sm",children:gn(e?.description??"")}),Ue("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&Ue(Ma,{children:[Q(ge,{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&&Q("span",{className:" flex-none leading-none text-gray-300 ",children:"\xB7"})]}),e?.totalViews&&Q("div",{className:"flex-none text-sm text-gray-500",children:e.totalViews})]})]})]})},rd=({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 ed(()=>{!t||!a||(a(t.selectedScrollSnap()+1),t.on("select",()=>{a&&a(t.selectedScrollSnap()+1)}))},[t,a]),Ue(Ma,{children:[Q(ue,{opts:{dragFree:!1},setApi:o,className:"w-full",children:Q(ve,{classNameContent:"!overflow-visible",className:"-ml-5",children:n?.map(p=>Q(ce,{className:"basis-11/12 pl-5 md:basis-1/2 lg:basis-4/12",children:Q("div",{onClick:g=>r(g,p?.id,p?.url),className:i("group cursor-pointer",d),children:Q(ad,{blog:p})},p?.id)},p?.id))})}),s&&Q("div",{className:"mt-8 flex w-full items-center justify-center md:mt-10 ",children:Ue(je,{action:m&&m,newTab:c,variant:"outline",children:[gn(l||"Xem th\xEAm")," "]})})]})},id=({carouselRef:e})=>Ue(ne,{onClick:()=>e?.scrollPrev(),disabled:!e?.canScrollPrev(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[Q(td,{className:"h-6 w-6"}),Q("span",{className:"sr-only",children:"Previous slide"})]}),nd=({carouselRef:e})=>Ue(ne,{onClick:()=>e?.scrollNext(),disabled:!e?.canScrollNext(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[Q(od,{className:"h-6 w-6"}),Q("span",{className:"sr-only",children:"Next slide"})]}),Fr=Jc(({dataHeading:e,dataBlog:o,onClickModal:t,onClickLoadMore:a})=>{let r=(c,d,p)=>{c?.preventDefault(),c?.stopPropagation(),t?t(d):window.open(p,"_blank")},[n,s]=fn(null),[,l]=fn(0),m=()=>n?Ue("div",{className:"ml-3 hidden items-center space-x-2 md:flex",children:[Q(id,{carouselRef:n}),Q(nd,{carouselRef:n})]}):Q(Ma,{});return Ue(Kc.Fragment,{children:[Ue("div",{className:" flex items-center justify-between",children:[e&&Q(h,{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)}),Q(m,{})]}),Q(rd,{dataBlog:o?.[0],onClickLoadMore:a,index:0,setCarouselRef:s,carouselRef:n,setCurrent:l,handleOnClickItem:r})]})});import{Fragment as cd,jsx as To}from"react/jsx-runtime";var sd=({template:e,dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return To(Da,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});case 2:return To(Fr,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return To(Da,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},ld=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})=>To(cd,{children:sd({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})}),md=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t=[],idSection:a,className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:m})=>To(V,{className:i("overflow-hidden",r),idSection:a,background:n,children:To(ld,{dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:s,onClickModal:l,onClickLoadMore:m})});import*as La from"react";import{enUS as gd,vi as ud}from"date-fns/locale";import{ChevronLeft as vd,ChevronRight as hd}from"lucide-react";import xd from"lunisolar";import{DayPicker as bd}from"react-day-picker";import*as un from"react";import*as Xo from"@radix-ui/react-checkbox";import{CheckIcon as dd}from"@heroicons/react/16/solid";import{cva as vn}from"class-variance-authority";import{jsx as Er}from"react/jsx-runtime";var pd=vn("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"}}),fd=vn("",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),Ia=un.forwardRef(({className:e,size:o,...t},a)=>Er(Xo.Root,{ref:a,className:i(pd({size:o}),e),...t,children:Er(Xo.Indicator,{className:i("flex items-center justify-center text-current"),children:Er(dd,{className:i(fd({size:o}))})})}));Ia.displayName=Xo.Root.displayName;import{Fragment as Cd,jsx as it,jsxs as zr}from"react/jsx-runtime";var yd=({date:e,cusContent:o})=>{let t=null;return t=xd(e).lunar,zr(Cd,{children:[o?o(e):e.getDate(),t&&it("span",{className:"luna-date absolute right-0.5 top-1 hidden text-[8px] leading-none group-[.show-luna]:block",children:t.day})]})},wd={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 Nd({isShow:e,setIsShow:o,lang:t}){let a=La.useId();return it("div",{className:"w-full p-3 pt-0",children:zr("div",{className:"flex cursor-pointer items-center space-x-2 border-t border-gray-100 pt-3",children:[it(Ia,{checked:e,id:`check-show-luna-${a}`,onCheckedChange:r=>{typeof r=="boolean"&&o(r)}}),it("label",{htmlFor:`check-show-luna-${a}`,className:"z-[1] 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 Pd=e=>e.getDay()===0||e.getDay()===6;function Aa({className:e,classNames:o,showOutsideDays:t=!1,enableLunaDate:a=!1,lang:r="vi",cusContentDay:n,...s}){let[l,m]=La.useState(!0);return it(bd,{locale:r==="vi"?ud:gd,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(Je({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(Je({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:Pd},modifiersClassNames:{weekend:"text-red-600"},components:{IconLeft:()=>it(vd,{className:"h-6 w-6"}),IconRight:()=>it(hd,{className:"h-6 w-6"}),DayContent:c=>it(yd,{date:c.date,cusContent:n}),Months:({children:c})=>zr("div",{className:"w-full",children:[it("div",{className:i("months-wrapper flex flex-col sm:flex-row"),children:c}),a&&it(Nd,{isShow:l,setIsShow:m,lang:r})]})},formatters:r==="vi"?wd:{},...s})}Aa.displayName="Calendar";import{QuestionMarkCircleIcon as Rd,XCircleIcon as kd}from"@heroicons/react/16/solid";import{format as Fa}from"date-fns";import{Calendar as Td}from"lucide-react";import*as xn from"react";import*as Dt from"@radix-ui/react-popover";import{jsx as hn}from"react/jsx-runtime";var Yo=Dt.Root,Zo=Dt.Trigger,So=xn.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},r)=>hn(Dt.Portal,{children:hn(Dt.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})}));So.displayName=Dt.Content.displayName;import{Fragment as bn,jsx as ke,jsxs as Ko}from"react/jsx-runtime";var Sd=({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 p=c?.selected||null;return Ko("div",{children:[Ko(Yo,{...m,children:[ke(Zo,{asChild:!0,children:Ko(Ae,{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",(!p||!(p instanceof Date)&&typeof p=="object"&&(!("from"in p)||!p.from))&&"text-gray-500",r&&"border-red-500 ring-1 ring-red-500"),disabled:n,...l,children:[ke("div",{className:"line-clamp-1 flex-1",children:p instanceof Date?Fa(p,s):p&&typeof p=="object"&&"from"in p&&"to"in p?ke(bn,{children:p.from?p.to?Ko(bn,{children:[ke("span",{className:"date-from",children:Fa(p.from,s)})," ",ke("span",{className:"date-separator",children:"-"}),ke("span",{className:"date-to",children:Fa(p.to,s)})]}):Fa(p.from,s):o}):o}),e&&ke("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",t===2&&" -top-2.5 text-sm",r&&"text-red-500"),children:e}),ke(Td,{className:"ml-2 h-4 w-4 flex-none text-gray-500"})]})}),ke(So,{className:"w-auto border-none !p-0",...d,children:ke(Aa,{...c,defaultMonth:p&&typeof p=="object"&&"from"in p?p.from:p instanceof Date?p:void 0})})]}),a&&Ko("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[r?ke(kd,{width:16,height:16,className:"text-red-500"}):ke(Rd,{width:16,height:16,className:"text-gray-500"}),ke("span",{className:i(r?"text-red-500":"text-gray-500",t===2?"text-sm":"text-xs"),children:a})]})]})};import{useEffect as Ad,useState as kn}from"react";import{QuestionMarkCircleIcon as Fd,XCircleIcon as Ed}from"@heroicons/react/16/solid";import{isValid as zd}from"date-fns";import*as nt from"react";import{CheckIcon as Dd,ChevronDownIcon as yn,ChevronUpIcon as Md,XCircleIcon as Id}from"@heroicons/react/16/solid";import{QuestionMarkCircleIcon as Ld}from"@heroicons/react/24/outline";import*as D from"@radix-ui/react-select";import{jsx as U,jsxs as Jo}from"react/jsx-runtime";var ea=nt.forwardRef(({className:e,children:o,label:t,message:a,size:r,isError:n,disabled:s,...l},m)=>Jo("div",{ref:m,className:i("select-mobase relative",e,s?"disabled":"",n?"[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-1 [&>.select-mobase-button]:ring-red-500":"",r===2?"[&>.select-mobase-button]:h-12 [&>.select-mobase-button]:text-base":""),children:[t&&U("span",{className:i("mobase-select-label absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",r===2&&"-top-2.5 text-sm",n&&"text-red-500"),children:t}),U(D.Root,{disabled:s,...l,children:o}),a&&Jo("div",{className:i("mobase-select-message mt-1 flex items-center space-x-1 text-gray-500",n&&"text-red-500"),children:[n?U(Id,{width:16,height:16}):U(Ld,{width:16,height:16}),U("span",{className:i(r===2?"text-sm":"text-xs"),children:a})]})]})),ta=D.Value,Do=nt.forwardRef(({className:e,children:o,...t},a)=>Jo(D.Trigger,{ref:a,className:i("select-mobase-button flex h-11 w-full items-center justify-between rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 ring-0 ring-inset transition-all hover:ring-1 hover:ring-gray-400 focus-visible:border-pink-500 focus-visible:ring-1 focus-visible:!ring-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 data-[state=open]:border-pink-500 data-[placeholder]:text-gray-500 data-[state=open]:ring-1 data-[state=open]:ring-pink-500",e),...t,children:[U("div",{className:"line-clamp-1 text-left",children:o}),U(D.Icon,{asChild:!0,children:U(yn,{className:"h-4 w-4 flex-none text-gray-500"})})]}));Do.displayName=D.Trigger.displayName;var Hr=nt.forwardRef(({className:e,...o},t)=>U(D.ScrollUpButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1",e),...o,children:U(Md,{className:"h-5 w-5"})}));Hr.displayName=D.ScrollUpButton.displayName;var _r=nt.forwardRef(({className:e,...o},t)=>U(D.ScrollDownButton,{ref:t,className:i("flex cursor-default items-center justify-center bg-gradient-to-t from-white to-transparent py-1",e),...o,children:U(yn,{className:"h-5 w-5"})}));_r.displayName=D.ScrollDownButton.displayName;var Mo=nt.forwardRef(({className:e,children:o,position:t="popper",...a},r)=>U(D.Portal,{children:Jo(D.Content,{ref:r,className:i("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 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900",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:[U(Hr,{}),U(D.Viewport,{className:i("p-0",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),U(_r,{})]})}));Mo.displayName=D.Content.displayName;var oa=nt.forwardRef(({className:e,children:o,...t},a)=>U(D.Group,{ref:a,className:i("relative border-b border-gray-200 p-1 after:w-full last:border-0",e),...t,children:o})),wn=nt.forwardRef(({className:e,...o},t)=>U(D.Label,{ref:t,className:i("z-[1] py-1.5 pl-7 pr-2 text-sm font-semibold",e),...o}));wn.displayName=D.Label.displayName;var _t=nt.forwardRef(({className:e,children:o,...t},a)=>Jo(D.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:[U("span",{className:"absolute left-2 flex h-4 w-4 items-center justify-center",children:U(D.ItemIndicator,{children:U(Dd,{className:"h-4 w-4 text-pink-500"})})}),U(D.ItemText,{children:o})]})),Nn=nt.forwardRef(({className:e,...o},t)=>U(D.Separator,{ref:t,className:i("-mx-1 my-1 h-px",e),...o}));Nn.displayName=D.Separator.displayName;var Pn=["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"],Cn=["January","February","March","April","May","June","July","August","September","October","November","December"],Br=(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}},Rn=(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 oe,jsxs as st}from"react/jsx-runtime";var Hd=({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:p=!1})=>{let[g,v]=kn(o??null),y=Math.min(c,d),C=Math.max(c,d),w=l==="MM/yyyy",A=(P,O)=>{if(O===0){v(void 0),t?.(void 0);return}let E=g?.getFullYear()||new Date().getFullYear(),We=g?.getMonth()??0,$e=g?.getDate()??1;P==="month"&&O!==null&&(We=O-1),P==="year"&&O!==null&&(E=O),w?$e=1:P==="day"&&O!==null&&($e=O);let Ra=Br(E,We+1).daysInMonth;$e>Ra&&($e=1);let Wo=new Date(E,We,$e);zd(Wo)&&(v(Wo),t?.(Wo))},[B,z]=kn(!1),vt=P=>{z(P)};return Ad(()=>{v(o??null)},[o]),st("div",{className:i("relative",s&&"cursor-no-drop"),children:[st("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",B&&"border-pink-500 ring-1 ring-pink-500",a===2&&"h-12 text-base",g?"":"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&&oe("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",a===2&&" -top-2.5 text-sm",n&&"text-red-500"),children:e}),st("div",{className:"flex h-full flex-row divide-x",children:[!w&&st(ea,{value:g?g.getDate().toString().padStart(2,"0"):"",onValueChange:P=>A("day",parseInt(P,10)),onOpenChange:vt,className:"w-[30%]",children:[oe(Do,{className:"h-full w-full rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(ta,{placeholder:m==="vi"?"Ng\xE0y":"Day"})}),oe(Mo,{onCloseAutoFocus:P=>P.preventDefault(),children:st(oa,{children:[!p&&oe(_t,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:Br(g?.getFullYear()||new Date().getFullYear(),(g?.getMonth()??0)+1).daysInMonth},(P,O)=>(O+1).toString().padStart(2,"0")).map(P=>oe(_t,{value:P,children:P},P))]})})]}),st(ea,{value:g?(g.getMonth()+1).toString():"",onValueChange:P=>A("month",parseInt(P,10)),onOpenChange:vt,className:i(w?"w-1/2":"w-2/5"),children:[oe(Do,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(ta,{placeholder:m==="vi"?"Th\xE1ng":"Month"})}),oe(Mo,{onCloseAutoFocus:P=>P.preventDefault(),children:st(oa,{children:[!p&&oe(_t,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:12},(P,O)=>O+1).map(P=>oe(_t,{value:P.toString(),children:m==="vi"?Pn[P-1]:Cn[P-1]},P))]})})]}),st(ea,{value:g?g.getFullYear().toString():"",onValueChange:P=>A("year",parseInt(P,10)),onOpenChange:vt,className:i(w?"w-1/2":"w-[30%]"),children:[oe(Do,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(ta,{placeholder:m==="vi"?"N\u0103m":"Year"})}),oe(Mo,{onCloseAutoFocus:P=>P.preventDefault(),children:st(oa,{children:[!p&&oe(_t,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Rn(y,C).map(P=>oe(_t,{value:P.toString(),children:P},P))]})})]})]})]}),r&&st("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[n?oe(Ed,{width:16,height:16,className:"text-red-500"}):oe(Fd,{width:16,height:16,className:"text-gray-500"}),oe("span",{className:i(n?"text-red-500":"text-gray-500",a===2?"text-sm":"text-xs"),children:r})]})]})};import*as to from"react";import*as $ from"@radix-ui/react-alert-dialog";import{jsx as Mt,jsxs as Od}from"react/jsx-runtime";var _d=$.Root,Bd=$.Trigger,Tn=$.Portal,Or=to.forwardRef(({className:e,...o},t)=>Mt($.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}));Or.displayName=$.Overlay.displayName;var Sn=to.forwardRef(({className:e,...o},t)=>Od(Tn,{children:[Mt(Or,{}),Mt($.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})]}));Sn.displayName=$.Content.displayName;var Dn=({className:e,...o})=>Mt("div",{className:i("flex flex-col space-y-2 text-left",e),...o});Dn.displayName="AlertDialogHeader";var Mn=({className:e,...o})=>Mt("div",{className:i("flex flex-row justify-end space-x-4",e),...o});Mn.displayName="AlertDialogFooter";var In=to.forwardRef(({className:e,...o},t)=>Mt($.Title,{ref:t,className:i("text-lg text-gray-900 font-semibold",e),...o}));In.displayName=$.Title.displayName;var Ln=to.forwardRef(({className:e,...o},t)=>Mt($.Description,{ref:t,className:i("text-sm text-muted-foreground",e),...o}));Ln.displayName=$.Description.displayName;var An=to.forwardRef(({className:e,...o},t)=>Mt($.Action,{ref:t,className:i(Je({variant:"primary"}),"",e),...o}));An.displayName=$.Action.displayName;var Fn=to.forwardRef(({className:e,...o},t)=>Mt($.Cancel,{ref:t,className:i(Je({variant:"secondary"}),e),...o}));Fn.displayName=$.Cancel.displayName;import{memo as Xd,useState as Yd}from"react";import{useEffect as Vd,useState as zn}from"react";import Hn from"html-react-parser";import{motion as Wd}from"motion/react";import*as En from"@radix-ui/react-aspect-ratio";var H=En.Root;import{Fragment as _n,jsx as ae,jsxs as aa}from"react/jsx-runtime";var $d=({guideGroup:e,mockup:o})=>{let[t,a]=zn(),[r,n]=zn(0),s={open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeInOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeInOut"}}};return Vd(()=>{t&&(n(t.selectedScrollSnap()+1),t.on("select",()=>{n(t.selectedScrollSnap()+1)}))},[t]),ae(_n,{children:e?.stepList&&e?.stepList?.length>0&&aa("div",{className:"mx-auto flex max-w-3xl flex-nowrap justify-center",children:[ae("div",{className:"h-auto w-64 flex-none",children:aa("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"&&aa(_n,{children:[ae("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),ae("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:aa(ue,{setApi:a,children:[ae(ve,{className:"ml-0",children:e?.stepList.map((l,m)=>ae(ce,{className:"pl-0",children:ae(H,{ratio:o==="small"?540/960:540/1168,children:l?.image&&ae("img",{src:l.image,className:"size-full object-contain",alt:l.title})})},m))}),ae(Co,{className:"left-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"}),ae(Ro,{className:"right-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"})]})})]})}),ae("div",{className:"flex flex-auto pl-12 pt-4",children:ae("ul",{className:"flex flex-col",children:e?.stepList.map((l,m)=>aa("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:[ae("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}),ae("div",{className:i(" text-sm font-medium",m+1===r?"text-pink-500":"text-gray-900"),children:Hn(l.title)}),l.content&&ae(Wd.div,{initial:"closed",animate:m+1===r?"open":"closed",variants:s,style:{overflow:"hidden"},children:ae("div",{className:"mt-3 text-sm text-gray-700",children:Hn(l.content)})})]},m))})})]})})},Vr=$d;import{useEffect as Gd,useRef as jd,useState as Ea}from"react";import{ChevronRightIcon as Bn}from"@heroicons/react/20/solid";import Qd from"embla-carousel-autoplay";import za from"html-react-parser";import{Fragment as Wr,jsx as N,jsxs as we}from"react/jsx-runtime";var Ud=({open:e,setOpenDialog:o,dataStep:t,mockup:a})=>{let[r,n]=Ea(0),[s,l]=Ea();return Gd(()=>{s&&(n(s.selectedScrollSnap()+1),s.on("select",()=>{n(s.selectedScrollSnap()+1)}))},[s]),!t||!t?.stepList?.length?null:N(Ge,{open:e,onOpenChange:o,children:we(Fe,{position:"bottom",height:"full",children:[N(yo,{children:N(wo,{className:"line-clamp-1",children:t?.title})}),we(et,{className:"grid overflow-hidden p-0 ",children:[N(ue,{setApi:l,className:" grid overflow-hidden",children:N(ve,{className:"ml-0 h-full",children:t.stepList.map((m,c)=>N(ce,{className:"h-full w-full pl-0",children:we("div",{className:"flex h-full flex-col overflow-y-auto",children:[N("div",{className:" relative flex w-full flex-none justify-center bg-gray-100 p-5",children:N("div",{className:i("mx-auto",a==="small"?"w-56":"w-52"),children:we("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"&&we(Wr,{children:[N("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),N("div",{className:i("relative h-full w-full overflow-hidden",a==="none"?"":"rounded-[1.5rem] bg-gray-200",a==="small"?"rounded-xl":""),children:N(H,{ratio:a==="small"?540/960:540/1168,children:m?.image&&N("img",{src:m.image,className:"size-full object-contain",alt:m.title})})})]})})}),we("div",{className:"p-5 pb-12",children:[N("div",{className:"font-semibold",children:za(m.title)}),m?.content&&N("div",{className:"mt-3 text-sm text-gray-800",children:za(m.content)})]})]})},c))})}),N("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)=>N("div",{className:`h-2 w-2 cursor-pointer rounded-full ${c+1===r?"bg-white":"bg-white/40"}`,onClick:()=>s&&s.scrollTo(c)},c))})]})]})})},qd=({dataGuide:e,mockup:o,isStep:t})=>{let[a,r]=Ea(!1),[n,s]=Ea(null),l=jd(Qd({delay:3500,stopOnInteraction:!1,stopOnMouseEnter:!1})),m=c=>{s(e?.[c]||null),r(!0)};return e?.length===0?null:we(Wr,{children:[e?.length>1?N("div",{className:"-mx-5 grid grid-cols-1 md:mx-0",children:e.map((c,d)=>we("div",{className:"relative flex cursor-pointer flex-nowrap items-center space-x-4 pl-5 ",onClick:()=>m(d),children:[N("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)&&N("img",{src:c.avatar||c?.stepList?.[0]?.image,className:"h-full w-full object-cover object-top",alt:c.title})}),we("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:[we("div",{className:"py-2",children:[t&&N("span",{className:"text-sm font-medium text-pink-500",children:`B\u01B0\u1EDBc ${d+1}`}),N("div",{className:"font-semibold",children:za(c.title)}),c?.description&&N("div",{className:"mt-1 text-sm text-gray-500",children:za(c.description)})]}),N("div",{className:" absolute right-4 top-1/2 -translate-y-1/2 text-gray-500",children:N(Bn,{className:"h-6 w-6"})})]})]},d))}):e?.[0]&&e[0].stepList?.length>0&&we("div",{className:"mx-auto flex max-w-3xl flex-col flex-wrap justify-center gap-y-6",children:[N("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:N("div",{className:"mx-auto h-auto w-72",children:we("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"&&we(Wr,{children:[N("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),N("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),N("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:N(ue,{plugins:[l.current],children:N(ve,{className:"ml-0",children:e[0]?.stepList.map((c,d)=>N(ce,{className:"pl-0",onClick:()=>m(0),children:N(H,{ratio:o==="small"?540/960:540/1168,children:c?.image&&N("img",{src:c.image,className:"size-full object-contain",alt:c.title})})},d))})})})]})})}),N("div",{className:"flex w-full flex-none justify-center",children:we(ge,{size:"lg",variant:"primary",onClick:()=>m(0),children:["Xem chi ti\u1EBFt h\u01B0\u1EDBng d\u1EABn ",N(Bn,{className:"ml-1 h-5 w-5"})]})})]}),a&&N(Ud,{open:a,setOpenDialog:r,dataStep:n,mockup:o})]})},On=qd;import{Fragment as Zd,jsx as de,jsxs as ra}from"react/jsx-runtime";var Vn=({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 de("svg",{fill:"none",viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",className:i("flex-0 absolute w-5 transition-all",o),children:de("path",{d:t.d,fill:"currentColor"})})},$r=Xd(({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,mockup:r,isStep:n})=>{let{showGradientOverlay:s=!0,gradientOverlayColor:l,className:m}=o||{},[c,d]=Yd(t?.[0]?.title||"");return ra(Zd,{children:[e&&de(h,{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&&ra(ho,{children:[de(Ke,{lessThan:"md",children:de(On,{dataGuide:t,mockup:r,isStep:n})}),de(Ke,{greaterThan:"sm",children:t?.length>1?ra(St,{defaultValue:t[0]?.title,onValueChange:p=>d(p),children:[ra(Ct,{showGradientOverlay:s,gradientOverlayColor:l,className:m,children:[de(Rt,{className:"mb-6 text-center",children:de(tt,{className:i("mx-auto mb-0 inline-flex w-auto items-center overflow-visible",n?"space-x-10":""),children:t.map((p,g)=>{let v=g===t.length-1,y=c===p?.title||"";return ra(ot,{value:p.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":"",y&&n?"data-[state=active]:bg-pink-500 data-[state=active]:text-white":""),children:[n&&g!==0&&de(Vn,{direction:"left",className:i("right-full top-0",y?"text-pink-500":"text-pink-100")}),p.title,n&&!v&&de(Vn,{direction:"right",className:i("left-full top-0",y?"text-pink-500":"text-pink-100")})]},p.title+g)})})}),de(kt,{}),de(Tt,{})]}),t.map((p,g)=>de(at,{value:p.title,children:de(Vr,{guideGroup:p,mockup:r})},p.title+g))]}):t?.length===1&&t[0]&&de(Vr,{guideGroup:t[0],mockup:r})})]}),a&&de(x,{isFullInMobile:a?.isFullInMobile,buttons:a?.buttons,className:a?.className,align:"center"})]})});import{Fragment as tp,jsx as ia}from"react/jsx-runtime";var Kd=({template:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,mockup:n,isStep:s})=>{switch(e){case 1:return ia($r,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s});default:return ia($r,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s})}},Jd=({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})=>ia(tp,{children:Kd({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})}),ep=({idSection:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,className:n,background:s,template:l=1,mockup:m="default",isStep:c=!1})=>ia(V,{className:i(n),background:s,idSection:e,children:ia(Jd,{dataHeading:o,template:l,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:m,isStep:c})});import{ChevronLeft as op,ChevronRight as ap}from"lucide-react";import{Fragment as rp,jsx as ze,jsxs as Wn}from"react/jsx-runtime";function $n({current:e,total:o,onChange:t}){let a=r=>ze("li",{children:ze("button",{className:i(eo({variant:e===r?"outline":"secondary",size:"sm"})),onClick:()=>t(r),children:r})},r);return ze("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center"),children:Wn("ul",{className:i("flex flex-row flex-wrap items-center gap-2"),children:[o>1&&ze("li",{children:ze("button",{className:i(eo({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>e>1&&t(e-1),children:ze(op,{className:"h-4 w-4"})})}),o<=6?Array(o).fill(0).map((r,n)=>a(n+1)):Wn(rp,{children:[a(1),e===1&&[a(2),a(3)],e>3&&ze("li",{children:ze("button",{className:i(eo({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&&ze("button",{className:i(eo({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e+3),children:"..."}),a(o)]}),o>1&&ze("li",{children:ze("button",{className:i(eo({variant:"secondary",size:"sm"})),disabled:e===o,onClick:()=>e<o&&t(e+1),children:ze(ap,{className:"h-4 w-4"})})})]})})}import{forwardRef as ip}from"react";import{QuestionMarkCircleIcon as np}from"@heroicons/react/24/outline";import{XCircleIcon as sp}from"@heroicons/react/24/solid";import{jsx as Io,jsxs as Gn}from"react/jsx-runtime";var Gr=ip(({disabled:e,isError:o,message:t,label:a,className:r,inputClassName:n,size:s,rows:l=3,...m},c)=>Gn("div",{className:i("relative",r,o&&"mobase-text-area-error"),children:[a&&Io("span",{className:i("mobase-text-area-label absolute -top-2.5 left-2 z-[1] bg-white px-1.5 text-sm text-gray-500",s===2&&" -top-2.5 text-sm"),children:a}),Io("textarea",{disabled:e,ref:c,className:i("mobase-text-area-box block w-full rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-500 focus:border-pink-500 disabled:border-gray-200 disabled:bg-gray-50",s===2&&"text-base",n),rows:l,...m}),t&&Gn("div",{className:"mobase-text-area-message mt-0.5 flex items-center space-x-1",children:[o?Io(sp,{width:16,height:16,className:"text-red-500"}):Io(np,{width:16,height:16,className:"text-gray-500"}),Io("span",{className:i("text-gray-500 ",s===2?"text-sm":"text-xs"),children:t})]}),Io("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
|
}
|