@hua-labs/ui 2.0.2 → 2.1.0
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/README.md +67 -182
- package/dist/advanced-emotion.js +1 -1
- package/dist/advanced-emotion.js.map +1 -1
- package/dist/advanced-emotion.mjs +1 -1
- package/dist/advanced-motion.js +1 -1
- package/dist/advanced-motion.js.map +1 -1
- package/dist/advanced-motion.mjs +1 -1
- package/dist/advanced.js +1 -1
- package/dist/advanced.js.map +1 -1
- package/dist/advanced.mjs +1 -1
- package/dist/chunk-BXX2TZUB.mjs +3 -0
- package/dist/chunk-BXX2TZUB.mjs.map +1 -0
- package/dist/{chunk-5BMH7223.mjs → chunk-PYBYZVSL.mjs} +2 -2
- package/dist/{chunk-5BMH7223.mjs.map → chunk-PYBYZVSL.mjs.map} +1 -1
- package/dist/components/Card.d.ts.map +1 -1
- package/dist/iconsax-extended.js +1 -1
- package/dist/iconsax-extended.js.map +1 -1
- package/dist/iconsax-extended.mjs +1 -1
- package/dist/iconsax-extended.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/sdui.js +1 -1
- package/dist/sdui.js.map +1 -1
- package/dist/sdui.mjs +1 -1
- package/package.json +6 -1
- package/dist/chunk-FSL373O6.mjs +0 -3
- package/dist/chunk-FSL373O6.mjs.map +0 -1
package/dist/advanced-motion.js
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
${Math.atan2(n.y-50,n.x-50)*(180/Math.PI)+90}deg,
|
|
73
73
|
rgba(255, 255, 255, ${u?v:0}) 0%,
|
|
74
74
|
transparent 80%
|
|
75
|
-
)`,transition:u?"opacity 0.1s ease-out":`opacity ${s}ms ease-out`,pointerEvents:"none",opacity:u?1:0};return jsxRuntime.jsx("div",{ref:Fo(m,x),className:l("relative",e),style:w,onMouseMove:p,onMouseEnter:b,onMouseLeave:k,...y,children:jsxRuntime.jsxs("div",{style:N,className:"relative",children:[t,d&&jsxRuntime.jsx("div",{style:B,"aria-hidden":"true"})]})})});sr.displayName="TiltCard";function Fo(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var lr=ee__default.default.forwardRef(({src:t,type:e="native",poster:r,autoPlay:o=true,loop:a=true,muted:s=true,controls:d=false,objectFit:v="cover",overlay:h=true,overlayColor:i="rgba(0, 0, 0, 0.4)",gradient:y=false,gradientDirection:m="bottom",playbackRate:x=1,fadeIn:f=true,children:c,className:n,style:g,...u},C)=>{let p=ee.useRef(null),[b,k]=ee.useState(false),[w,N]=ee.useState(false);ee.useEffect(()=>{e==="native"&&p.current&&(p.current.playbackRate=x);},[x,e]);let B=()=>{k(true);},M=()=>{N(true);},R=$=>{let Z=new URLSearchParams({autoplay:o?"1":"0",mute:s?"1":"0",loop:a?"1":"0",controls:d?"1":"0",playlist:$,modestbranding:"1",rel:"0",showinfo:"0",iv_load_policy:"3",disablekb:"1",enablejsapi:"1",playsinline:"1"});return `https://www.youtube.com/embed/${$}?${Z.toString()}`},T=$=>{let Z=new URLSearchParams({autoplay:o?"1":"0",muted:s?"1":"0",loop:a?"1":"0",controls:d?"1":"0",background:"1",quality:"auto",dnt:"1"});return `https://player.vimeo.com/video/${$}?${Z.toString()}`},I=()=>{let $={cover:"object-cover",contain:"object-contain",fill:"object-fill"}[v];switch(e){case "youtube":return jsxRuntime.jsx("iframe",{src:R(t),className:l("absolute inset-0 w-full h-full pointer-events-none","scale-[1.2]"),style:{opacity:b||!f?1:0,transition:f?"opacity 0.8s ease-out":void 0},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:true,onLoad:()=>k(true),title:"YouTube video background"});case "vimeo":return jsxRuntime.jsx("iframe",{src:T(t),className:"absolute inset-0 w-full h-full pointer-events-none",style:{opacity:b||!f?1:0,transition:f?"opacity 0.8s ease-out":void 0},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:true,onLoad:()=>k(true),title:"Vimeo video background"});default:return jsxRuntime.jsx("video",{ref:p,src:t,poster:r,autoPlay:o,loop:a,muted:s,controls:d,playsInline:true,className:l("absolute inset-0 w-full h-full",$),style:{opacity:w||!f?1:0,transition:f?"opacity 0.8s ease-out":void 0},onLoadedData:B,onPlaying:M})}},V=()=>{if(!y)return null;let $=[];return (m==="top"||m==="both")&&$.push(jsxRuntime.jsx("div",{className:"absolute top-0 left-0 right-0 h-1/3",style:{background:`linear-gradient(to bottom, ${i}, transparent)`},"aria-hidden":"true"},"top")),(m==="bottom"||m==="both")&&$.push(jsxRuntime.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1/3",style:{background:`linear-gradient(to top, ${i}, transparent)`},"aria-hidden":"true"},"bottom")),jsxRuntime.jsx(jsxRuntime.Fragment,{children:$})},z=n&&/\b(fixed|absolute|sticky)\b/.test(n);return jsxRuntime.jsxs("div",{ref:C,className:l("overflow-hidden",!z&&"relative",n),style:g,...u,children:[r&&f&&!b&&!w&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${r})`},"aria-hidden":"true"}),I(),h&&!y&&jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backgroundColor:i},"aria-hidden":"true"}),V(),c&&jsxRuntime.jsx("div",{className:"relative z-10 h-full",children:c})]})});lr.displayName="VideoBackground";var cr=ee__default.default.forwardRef(({children:t,autoPlay:e=false,interval:r=5e3,loop:o=true,pauseOnHover:a=true,indicators:s="dots",indicatorPosition:d="bottom",showArrows:v=true,arrowPosition:h="inside",transition:i="slide",transitionDuration:y=500,onSlideChange:m,showPlayPause:x=false,playPausePosition:f="right",className:c,style:n,...g},u)=>{let C=()=>i==="slide"&&o?1:0,[p,b]=ee.useState(C),[k,w]=ee.useState(!e),[N,B]=ee.useState(false),[M,R]=ee.useState(false),[T,I]=ee.useState(false),[V,z]=ee.useState(null),[$,Z]=ee.useState(null),J=ee.useRef(null),D=ee__default.default.Children.count(t),te=jo(),ne=ee.useCallback(L=>i!=="slide"||!o?L:L===0?D-1:L===D+1?0:L-1,[o,D,i]),W=ee.useCallback(L=>{if(M)return;let E=L;if(o?i!=="slide"&&(L<0?E=D-1:L>=D&&(E=0)):E=Math.max(0,Math.min(L,D-1)),E!==p){R(true),b(E);let A=o&&i==="slide"?E===0?D-1:E===D+1?0:E-1:E;m==null||m(A),setTimeout(()=>R(false),y);}},[p,D,o,M,y,i,m]);ee.useEffect(()=>{!o||M||i!=="slide"||(p===0?setTimeout(()=>{I(true),b(D),setTimeout(()=>I(false),50);},y):p===D+1&&setTimeout(()=>{I(true),b(1),setTimeout(()=>I(false),50);},y));},[p,D,o,M,y,i]);let re=ee.useCallback(()=>{W(p+1);},[p,W]),ve=ee.useCallback(()=>{W(p-1);},[p,W]),We=ee.useCallback(()=>{B(L=>!L);},[]);ee.useCallback(()=>{B(false);},[]);ee.useCallback(()=>{B(true);},[]);ee.useEffect(()=>{if(!e||k||N||te)return;let L=setInterval(re,r);return ()=>clearInterval(L)},[e,r,k,N,re,te]);let Ge=L=>{z(L.targetTouches[0].clientX);},_e=L=>{Z(L.targetTouches[0].clientX);},je=()=>{if(!V||!$)return;let L=V-$;Math.abs(L)>=50&&(L>0?re():ve()),z(null),Z(null);};ee.useEffect(()=>{let L=A=>{A.key==="ArrowLeft"?ve():A.key==="ArrowRight"&&re();},E=J.current;return E==null||E.addEventListener("keydown",L),()=>E==null?void 0:E.removeEventListener("keydown",L)},[re,ve]);let it=()=>{let L=te||T?0:y,E=ne(p);switch(i){case "fade":return ee__default.default.Children.map(t,(A,q)=>jsxRuntime.jsx("div",{className:l("absolute inset-0 w-full h-full",q===E?"z-10":"z-0"),style:{opacity:q===E?1:0,transition:`opacity ${L}ms ease-in-out`},children:A},q));case "scale":return ee__default.default.Children.map(t,(A,q)=>jsxRuntime.jsx("div",{className:l("absolute inset-0 w-full h-full",q===E?"z-10":"z-0"),style:{opacity:q===E?1:0,transform:`scale(${q===E?1:.9})`,transition:`opacity ${L}ms ease-in-out, transform ${L}ms ease-in-out`},children:A},q));default:{let A=ee__default.default.Children.toArray(t);return (o?[A[A.length-1],...A,A[0]]:A).map((j,oe)=>jsxRuntime.jsx("div",{className:"absolute inset-0 w-full h-full",style:{transform:`translateX(${(oe-p)*100}%)`,transition:T?"none":`transform ${L}ms ease-in-out`},children:j},oe))}}},Ne=()=>{if(s==="none")return null;let L=d.includes("inside"),E=d.includes("top"),A=ne(p),q=l("flex items-center justify-center gap-2",L?l("absolute left-1/2 -translate-x-1/2 z-20",E?"top-4":"bottom-4"):l("mt-4",E&&"order-first mb-4 mt-0")),j=oe=>{W(o&&i==="slide"?oe+1:oe);};return jsxRuntime.jsx("div",{className:q,role:"tablist",children:Array.from({length:D},(oe,K)=>{let ie=K===A;switch(s){case "bars":return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("h-1 rounded-full transition-all duration-300",ie?"w-8 bg-white":"w-4 bg-white/50 hover:bg-white/70"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`},K);case "numbers":return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("w-8 h-8 rounded-full text-sm font-medium transition-all duration-300",ie?"bg-white text-gray-900":"bg-white/30 text-white hover:bg-white/50"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`,children:K+1},K);default:return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("w-2.5 h-2.5 rounded-full transition-all duration-300",ie?"bg-white scale-125":"bg-white/50 hover:bg-white/70"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`},K)}})})},Xe=()=>{if(!x||!e)return null;let L=!N;return jsxRuntime.jsx("button",{onClick:We,className:l("absolute bottom-4 z-20","w-8 h-8 rounded-full flex items-center justify-center","bg-white/80 hover:bg-white text-gray-800","transition-all duration-200","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white",{left:"left-4",center:"left-1/2 -translate-x-1/2",right:"right-4"}[f]),"aria-label":L?"\uC77C\uC2DC\uC815\uC9C0":"\uC7AC\uC0DD",children:L?jsxRuntime.jsx(Qo,{className:"w-4 h-4"}):jsxRuntime.jsx(Ko,{className:"w-4 h-4"})})},Ye=()=>{if(!v||h==="hidden")return null;let L=o||p>0,E=o||p<D-1,A=l("absolute top-1/2 -translate-y-1/2 z-20","w-10 h-10 rounded-full flex items-center justify-center","bg-white/80 hover:bg-white text-gray-800","transition-all duration-200","disabled:opacity-30 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white"),q=h==="outside"?"-left-14":"left-4",j=h==="outside"?"-right-14":"right-4";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:ve,disabled:!L,className:l(A,q),"aria-label":"\uC774\uC804 \uC2AC\uB77C\uC774\uB4DC",children:jsxRuntime.jsx(Xo,{className:"w-5 h-5"})}),jsxRuntime.jsx("button",{onClick:re,disabled:!E,className:l(A,j),"aria-label":"\uB2E4\uC74C \uC2AC\uB77C\uC774\uB4DC",children:jsxRuntime.jsx(Yo,{className:"w-5 h-5"})})]})};return jsxRuntime.jsxs("div",{ref:u,className:l("flex flex-col w-full h-full",h==="outside"&&"px-16",c),style:n,...g,children:[jsxRuntime.jsxs("div",{ref:J,className:"relative overflow-hidden w-full flex-1",onMouseEnter:()=>a&&w(true),onMouseLeave:()=>a&&w(false),onTouchStart:Ge,onTouchMove:_e,onTouchEnd:je,tabIndex:0,role:"region","aria-roledescription":"carousel","aria-label":"\uC774\uBBF8\uC9C0 \uC2AC\uB77C\uC774\uB354",children:[it(),Ye(),Xe(),d.includes("inside")&&Ne()]}),!d.includes("inside")&&Ne()]})});cr.displayName="Carousel";function jo(){let[t,e]=ee.useState(false);return ee.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");e(r.matches);let o=a=>{e(a.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),t}function Xo({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}function Yo({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}function Ko({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})})}function Qo({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})})}var he=ee__default.default.forwardRef(({className:t,value:e,max:r=100,size:o="md",color:a="blue",...s},d)=>{let v={sm:"h-2",md:"h-3",lg:"h-4"},h={blue:"bg-indigo-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500",purple:"bg-purple-500",orange:"bg-orange-500",indigo:"bg-indigo-500",pink:"bg-pink-500",gray:"bg-gray-500"},i=Math.min(Math.max(e/r*100,0),100);return jsxRuntime.jsx("div",{ref:d,className:l("w-full bg-muted rounded-full",v[o],t),...s,children:jsxRuntime.jsx("div",{className:l("h-full rounded-full transition-all duration-300",h[a]||h.blue),style:{width:`${i}%`}})})});he.displayName="EmotionMeter";var Ze=ee__default.default.forwardRef(({className:t,emotion:e,isSelected:r=false,size:o="md",...a},s)=>jsxRuntime.jsx("button",{ref:s,className:l("rounded-full border-2 transition-all duration-200 hover:scale-105 focus:outline-none focus:ring-1 focus:ring-ring",{sm:"w-8 h-8 text-sm",md:"w-12 h-12 text-lg",lg:"w-16 h-16 text-xl"}[o],r?"border-indigo-500 bg-indigo-50 dark:bg-indigo-900/20":"border-border bg-background",t),...a,children:e}));Ze.displayName="EmotionButton";var on=[{key:"joy",label:"\uAE30\uC068",icon:"smile",color:"yellow"},{key:"sadness",label:"\uC2AC\uD514",icon:"frown",color:"blue"},{key:"anger",label:"\uD654\uB0A8",icon:"angry",color:"red"},{key:"calm",label:"\uD3C9\uC628",icon:"heart",color:"green"},{key:"excitement",label:"\uC124\uB818",icon:"star",color:"pink"},{key:"worry",label:"\uAC71\uC815",icon:"meh",color:"gray"},{key:"gratitude",label:"\uAC10\uC0AC",icon:"heart",color:"purple"},{key:"loneliness",label:"\uC678\uB85C\uC6C0",icon:"user",color:"indigo"}],ur=ee__default.default.forwardRef(({className:t,selectedEmotion:e,onEmotionSelect:r,layout:o="grid",showIntensity:a=false,intensity:s=50,onIntensityChange:d,emotions:v=on,size:h="md",variant:i="button",...y},m)=>{let x=n=>{r==null||r(n);},f=n=>{let g=e===n.key;return i==="button"?jsxRuntime.jsx(Ze,{emotion:n.key,isSelected:g,size:h,onClick:()=>x(n.key),className:l("transition-all duration-200",g&&"ring-1 ring-offset-2 ring-primary"),children:n.label},n.key):i==="card"?jsxRuntime.jsx("div",{className:l("p-4 rounded-lg border-2 cursor-pointer transition-all duration-200 hover:shadow-md",g?"border-primary bg-primary/5":"border-border hover:border-primary/50"),onClick:()=>x(n.key),children:jsxRuntime.jsxs("div",{className:"flex items-center space-x-3",children:[jsxRuntime.jsx("div",{className:l("w-8 h-8 rounded-full flex items-center justify-center",g?"bg-primary text-primary-foreground":"bg-muted"),children:n.icon&&jsxRuntime.jsxs("span",{className:"text-lg",children:[n.icon==="smile"&&"\u{1F60A}",n.icon==="frown"&&"\u{1F622}",n.icon==="angry"&&"\u{1F620}",n.icon==="heart"&&"\u2764\uFE0F",n.icon==="star"&&"\u2B50",n.icon==="meh"&&"\u{1F610}",n.icon==="user"&&"\u{1F464}"]})}),jsxRuntime.jsx("span",{className:"font-medium truncate max-w-[120px]",children:n.label})]})},n.key):i==="chip"?jsxRuntime.jsx("div",{className:l("px-3 py-1 rounded-full cursor-pointer transition-all duration-200 text-sm font-medium",g?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"),onClick:()=>x(n.key),children:jsxRuntime.jsx("span",{className:"truncate max-w-[100px]",children:n.label})},n.key):null},c={grid:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 md:gap-3",list:"space-y-2",compact:"flex flex-wrap gap-1"};return jsxRuntime.jsxs("div",{ref:m,className:l("space-y-4",t),...y,children:[jsxRuntime.jsx("div",{className:c[o],children:v.map(f)}),a&&e&&jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4"}),jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[s,"%"]})]}),jsxRuntime.jsx("input",{type:"range",min:"0",max:"100",value:s,onChange:n=>d==null?void 0:d(Number(n.target.value)),className:"w-full h-2 bg-muted rounded-lg appearance-none cursor-pointer slider"}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"\uC57D\uD568"}),jsxRuntime.jsx("span",{children:"\uBCF4\uD1B5"}),jsxRuntime.jsx("span",{children:"\uAC15\uD568"})]})]}),e&&a&&jsxRuntime.jsx("div",{className:"flex justify-center",children:jsxRuntime.jsx(he,{value:s,size:"md",color:"blue"})})]})});ur.displayName="EmotionSelector";var an=classVarianceAuthority.cva("rounded-lg",{variants:{variant:{default:"bg-card text-card-foreground border border-border",outline:"bg-transparent border-2 border-border",elevated:"bg-card text-card-foreground shadow-lg border border-border"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"},padding:{none:"",sm:"p-3",md:"p-4",lg:"p-6"}},defaultVariants:{variant:"default",padding:"none"}}),yt=ee__default.default.forwardRef(({className:t,variant:e="default",shadow:r,padding:o="none",hoverable:a,...s},d)=>jsxRuntime.jsx("div",{ref:d,className:l(an({variant:e,shadow:r,padding:o}),a&&"transition-shadow hover:shadow-lg cursor-pointer",t),...s}));yt.displayName="Card";var xt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex flex-col space-y-1 p-3",t),...e}));xt.displayName="CardHeader";var wt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("h3",{ref:r,className:l("text-base md:text-lg font-semibold leading-tight tracking-tight",t),...e}));wt.displayName="CardTitle";var Tt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("p",{ref:r,className:l("text-sm text-muted-foreground",t),...e}));Tt.displayName="CardDescription";var Ct=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("px-3 pb-3",t),...e}));Ct.displayName="CardContent";var sn=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex items-center px-3 pb-3",t),...e}));sn.displayName="CardFooter";var cn=classVarianceAuthority.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors duration-200 ease-in-out focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"bg-[var(--badge-default-bg)] text-[var(--badge-default-text)] hover:opacity-80",secondary:"bg-[var(--badge-secondary-bg)] text-[var(--badge-secondary-text)] hover:opacity-80",destructive:"bg-[var(--badge-destructive-bg)] text-slate-50 hover:opacity-80",error:"bg-[var(--badge-destructive-bg)] text-slate-50 hover:opacity-80",outline:"bg-transparent text-[var(--badge-outline-text)] border border-[var(--badge-outline-border)] hover:bg-[var(--badge-outline-hover-bg)]",glass:"bg-[var(--badge-glass-bg)] backdrop-blur-sm border border-[var(--badge-glass-border)] text-[var(--badge-glass-text)] hover:opacity-80"}},defaultVariants:{variant:"default"}}),Se=ee__default.default.memo(ee__default.default.forwardRef(({className:t,variant:e="default",...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l(cn({variant:e}),t),...r})));Se.displayName="Badge";var gr=ee__default.default.forwardRef(({className:t,primaryEmotion:e,emotionDistribution:r=[],keywords:o=[],intensity:a=50,positivity:s=70,energy:d=60,showMeter:v=true,showDistribution:h=true,showKeywords:i=true,showMetrics:y=true,layout:m="detailed",...x},f)=>{let c=u=>u<30?"\uC57D\uD568":u<70?"\uBCF4\uD1B5":"\uAC15\uD568",n=u=>u<30?"\uBD80\uC815\uC801":u<70?"\uC911\uB9BD\uC801":"\uAE0D\uC815\uC801",g=u=>u<30?"\uB0AE\uC74C":u<70?"\uBCF4\uD1B5":"\uB192\uC74C";return m==="compact"?jsxRuntime.jsxs("div",{ref:f,className:l("space-y-3",t),...x,children:[e&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uC8FC\uC694 \uAC10\uC815:"}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.name," (",e.intensity,"%)"]}),v&&jsxRuntime.jsx(he,{value:e.intensity,size:"sm",color:"blue"})]})]}),y&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:c(a)})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAE0D\uC815\uC131:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:n(s)})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uC5D0\uB108\uC9C0:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:g(d)})]})]}),i&&o.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uD0A4\uC6CC\uB4DC:"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:o.map(u=>jsxRuntime.jsx(Se,{variant:"secondary",className:"text-xs",children:u},u))})]})]}):m==="card"?jsxRuntime.jsxs(yt,{ref:f,className:l("",t),...x,children:[jsxRuntime.jsxs(xt,{children:[jsxRuntime.jsxs(wt,{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"text-2xl mr-2",children:"\u2728"}),"AI \uBD84\uC11D"]}),jsxRuntime.jsx(Tt,{children:"\uAC10\uC815 \uBD84\uC11D \uACB0\uACFC"})]}),jsxRuntime.jsxs(Ct,{className:"space-y-4",children:[e&&jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uC8FC\uC694 \uAC10\uC815:"}),jsxRuntime.jsxs("span",{className:"ml-2 text-muted-foreground",children:[e.name," (",e.intensity,"%)"]})]}),v&&jsxRuntime.jsx("div",{className:"flex justify-center",children:jsxRuntime.jsx(he,{value:e.intensity,size:"md",color:"blue"})})]}),y&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uAC10\uC815 \uAC15\uB3C4:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:c(a)})]}),jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uAE0D\uC815\uC131:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:n(s)})]}),jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uC5D0\uB108\uC9C0:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:g(d)})]})]}),i&&o.length>0&&jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uD0A4\uC6CC\uB4DC:"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:o.map(u=>jsxRuntime.jsx(Se,{variant:"secondary",className:"text-xs",children:u},u))})]})]})]}):jsxRuntime.jsxs("div",{ref:f,className:l("space-y-6",t),...x,children:[e&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uC8FC\uC694 \uAC10\uC815"}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-4",children:[jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("div",{className:"text-2xl font-bold text-primary",children:e.name}),jsxRuntime.jsxs("div",{className:"text-sm text-muted-foreground",children:[e.intensity,"% \uAC15\uB3C4"]})]}),v&&jsxRuntime.jsx(he,{value:e.intensity,size:"lg",color:"blue"})]})]}),h&&r.length>0&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uAC10\uC815 \uBD84\uD3EC"}),jsxRuntime.jsx("div",{className:"space-y-3",children:r.map((u,C)=>jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:u.emotion}),jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[u.percentage,"%"]})]}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:`${u.color} h-2 rounded-full transition-all duration-300`,style:{width:`${u.percentage}%`}})})]},C))})]}),y&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uBD84\uC11D \uC9C0\uD45C"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-primary",children:c(a)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${a}%`}})})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uAE0D\uC815\uC131"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-green-600",children:n(s)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-green-500 h-2 rounded-full transition-all duration-300",style:{width:`${s}%`}})})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uC5D0\uB108\uC9C0"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-orange-600",children:g(d)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-orange-500 h-2 rounded-full transition-all duration-300",style:{width:`${d}%`}})})]})]})]}),i&&o.length>0&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uAC10\uC815 \uD0A4\uC6CC\uB4DC"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(u=>jsxRuntime.jsx(Se,{variant:"outline",className:"text-sm",children:u},u))})]})]})});gr.displayName="EmotionAnalysis";function kt(t){return t.toLowerCase().replace(/[^a-z0-9가-힣ぁ-んァ-ン一-龯_.~\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").trim()}function pn(t){return !t||t.length===0||t.length>200?false:/^[a-z0-9가-힣ぁ-んァ-ン一-龯_.~-]+$/.test(t)}function Et(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9가-힣ぁ-んァ-ン一-龯_.~-]/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}var fn={pageTitle:"\uC0C8 \uAE00 \uC791\uC131",editTitle:"\uAE00 \uC218\uC815",preview:"\uBBF8\uB9AC\uBCF4\uAE30",editMode:"\uD3B8\uC9D1",basicInfo:"\uAE30\uBCF8 \uC815\uBCF4",slug:"\uC2AC\uB7EC\uADF8",slugPrefix:"/blog/",tags:"\uD0DC\uADF8",tagsPlaceholder:"\uAC1C\uBC1C, \uC77C\uC0C1, \uC5C5\uB370\uC774\uD2B8",coverImage:"\uCEE4\uBC84 \uC774\uBBF8\uC9C0 URL",coverImagePlaceholder:"https://example.com/image.jpg",publishDate:"\uBC1C\uD589 \uC608\uC57D\uC77C\uC2DC",publishDateHint:"\uBE44\uC6CC\uB450\uBA74 \uC989\uC2DC \uBC1C\uD589\uB428",expiresAt:"\uB9CC\uB8CC \uC77C\uC2DC",expiresAtHint:"\uBE44\uC6CC\uB450\uBA74 \uB9CC\uB8CC\uB418\uC9C0 \uC54A\uC74C",titleLabel:"\uC81C\uBAA9",titlePlaceholder:"\uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694",excerpt:"\uC694\uC57D",excerptPlaceholder:"\uCE74\uB4DC\uC5D0 \uD45C\uC2DC\uB420 \uC9E7\uC740 \uC694\uC57D",contentLabel:"\uBCF8\uBB38",contentPlaceholder:"\uB9C8\uD06C\uB2E4\uC6B4\uC73C\uB85C \uC791\uC131\uD558\uC138\uC694...",cancel:"\uCDE8\uC18C",saveDraft:"\uC784\uC2DC\uC800\uC7A5",publish:"\uBC1C\uD589",update:"\uC218\uC815 \uC644\uB8CC",saving:"\uC800\uC7A5 \uC911...",translateHint:"AI \uBC88\uC5ED \uAE30\uB2A5",translateButton:"AI \uBC88\uC5ED",translating:"\uBC88\uC5ED \uC911...",translateSuccess:"\uBC88\uC5ED \uC644\uB8CC!",requiredFields:"\uD544\uC218 \uD544\uB4DC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694",saveError:"\uC800\uC7A5 \uC911 \uC624\uB958 \uBC1C\uC0DD",translateError:"\uBC88\uC5ED \uC911 \uC624\uB958 \uBC1C\uC0DD",noTitle:"\uC81C\uBAA9 \uC5C6\uC74C",bold:"\uAD75\uAC8C",italic:"\uAE30\uC6B8\uC784",strikethrough:"\uCDE8\uC18C\uC120",heading:"\uC81C\uBAA9",link:"\uB9C1\uD06C",image:"\uC774\uBBF8\uC9C0",code:"\uCF54\uB4DC",codeBlock:"\uCF54\uB4DC\uBE14\uB85D",quote:"\uC778\uC6A9\uBB38",list:"\uBAA9\uB85D",orderedList:"\uC21C\uC11C \uBAA9\uB85D",horizontalRule:"\uC218\uD3C9\uC120"},hn={enableSlug:true,enableTags:true,enableCoverImage:true,enablePublishDate:true,enableExcerpt:true,enableTranslation:true,enablePreview:true,enableMarkdownToolbar:true,enableAutoSave:true,enableExpiresAt:false},bn=[{key:"ko",label:"\uD55C\uAD6D\uC5B4",isPrimary:true,flag:"\u{1F1F0}\u{1F1F7}"},{key:"en",label:"English",flag:"\u{1F1FA}\u{1F1F8}"},{key:"ja",label:"\u65E5\u672C\u8A9E",flag:"\u{1F1EF}\u{1F1F5}"}];function Mt(t){let e={};return t.forEach(r=>{e[r.key]="";}),e}function vn(t,e){var r,o,a,s,d,v,h,i;return {slug:(r=e==null?void 0:e.slug)!=null?r:"",title:(o=e==null?void 0:e.title)!=null?o:Mt(t),excerpt:(a=e==null?void 0:e.excerpt)!=null?a:Mt(t),content:(s=e==null?void 0:e.content)!=null?s:Mt(t),tags:(d=e==null?void 0:e.tags)!=null?d:[],coverImage:(v=e==null?void 0:e.coverImage)!=null?v:"",publishedAt:(h=e==null?void 0:e.publishedAt)!=null?h:null,expiresAt:(i=e==null?void 0:e.expiresAt)!=null?i:null}}var br=ee.createContext(null);function U(){let t=ee.useContext(br);if(!t)throw new Error("useBlogEditor must be used within a BlogEditorProvider");return t}function Nt({children:t,initialData:e,isEditMode:r=false,languages:o=bn,defaultLanguage:a,labels:s,callbacks:d,features:v,variant:h="default",autoSaveKey:i,autoSaveInterval:y=3e3}){var Ne,Xe,Ye,L;let m=(L=(Ye=(Ne=o.find(E=>E.isPrimary))==null?void 0:Ne.key)!=null?Ye:(Xe=o[0])==null?void 0:Xe.key)!=null?L:"ko",x=a!=null?a:m,f=ee.useMemo(()=>({...fn,...s}),[s]),c=ee.useMemo(()=>({...hn,...v}),[v]),[n,g]=ee.useState(()=>vn(o,e)),[u,C]=ee.useState(x),[p,b]=ee.useState(false),[k,w]=ee.useState(false),[N,B]=ee.useState(false),[M,R]=ee.useState(false),[T,I]=ee.useState(null),[V,z]=ee.useState(false),[$,Z]=ee.useState(r||!!(e!=null&&e.slug)),[J,D]=ee.useState("idle"),te=ee.useRef(null),ne=ee.useRef(true),W=i||(r?null:"blog-editor-draft");ee.useEffect(()=>{if(!(!c.enableAutoSave||!W||r))try{let E=localStorage.getItem(W);if(E){let A=JSON.parse(E);g(A);}}catch{}},[]),ee.useEffect(()=>{if(!(!c.enableAutoSave||!W)){if(ne.current){ne.current=false;return}return te.current&&clearTimeout(te.current),D("saving"),te.current=setTimeout(()=>{try{localStorage.setItem(W,JSON.stringify(n)),D("saved"),setTimeout(()=>D("idle"),2e3);}catch{D("idle");}},y),()=>{te.current&&clearTimeout(te.current);}}},[n,c.enableAutoSave,W,y]);let re=ee.useCallback(()=>{if(W)try{localStorage.removeItem(W);}catch{}},[W]),ve=ee.useCallback((E,A)=>{g(q=>({...q,[E]:A}));},[]),We=ee.useCallback((E,A,q)=>{g(j=>({...j,[E]:{...j[E],[A]:q}}));},[]),at=ee.useCallback(E=>kt(E),[]),st=ee.useCallback(async E=>{let A=n.title[m],q=n.content[m];if(!A||!q){I(f.requiredFields);return}if(c.enableSlug&&!n.slug){I(f.requiredFields);return}w(true),I(null);try{await d.onSave(n,E),re();}catch{I(f.saveError);}finally{w(false);}},[n,m,f,c,d,re]),Ge=ee.useCallback(async()=>{if(!d.onTranslate)return;let E=n.title[m],A=n.content[m],q=n.excerpt[m];if(!E||!A){I(f.requiredFields);return}B(true),I(null),z(false);try{let j=await d.onTranslate({sourceLanguage:m,title:E,content:A,excerpt:q||void 0});g(oe=>{let K={...oe.title},ie={...oe.content},Ft={...oe.excerpt};return Object.keys(j).forEach(Re=>{if(Re!==m){let lt=j[Re];if(typeof lt=="object"&<!==null){let Ce=lt;Ce.title&&(K[Re]=Ce.title),Ce.content&&(ie[Re]=Ce.content),Ce.excerpt&&(Ft[Re]=Ce.excerpt);}}}),{...oe,title:K,content:ie,excerpt:Ft}}),z(!0),setTimeout(()=>z(!1),3e3);}catch{I(f.translateError);}finally{B(false);}},[n,m,f,d]),_e=ee.useCallback(async E=>{if(!d.onUploadImage)return null;R(true),I(null);try{return await d.onUploadImage(E)}catch{return I("\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC \uC2E4\uD328"),null}finally{R(false);}},[d]),je=ee.useCallback(()=>{var E;(E=d.onCancel)==null||E.call(d);},[d]),it=ee.useMemo(()=>({formData:n,activeLanguage:u,showPreview:p,submitting:k,translating:N,uploading:M,error:T,translateSuccess:V,autoSaveStatus:J,languages:o,features:c,labels:f,variant:h,isEditMode:r,setActiveLanguage:C,setShowPreview:b,updateField:ve,updateMultilingualField:We,handleSave:st,handleTranslate:Ge,handleUploadImage:_e,handleCancel:je,setError:I,generateSlug:at,slugManuallyEdited:$,setSlugManuallyEdited:Z}),[n,u,p,k,N,M,T,V,J,o,c,f,h,r,ve,We,st,Ge,_e,je,at,$,Z]);return jsxRuntime.jsx(br.Provider,{value:it,children:t})}var kr={home:ssr.House,arrowLeft:ssr.ArrowLeft,arrowRight:ssr.ArrowRight,arrowUp:ssr.ArrowUp,arrowDown:ssr.ArrowDown,menu:ssr.List,close:ssr.X,search:ssr.MagnifyingGlass,settings:ssr.Gear,externalLink:ssr.ArrowSquareOut,chevronLeft:ssr.CaretLeft,chevronRight:ssr.CaretRight,chevronDown:ssr.CaretDown,chevronUp:ssr.CaretUp,edit:ssr.Pencil,delete:ssr.Trash,add:ssr.Plus,remove:ssr.Minus,download:ssr.Download,upload:ssr.Upload,refresh:ssr.ArrowClockwise,save:ssr.FloppyDisk,copy:ssr.Copy,loader:ssr.SpinnerGap,success:ssr.CheckCircle,error:ssr.XCircle,alertCircle:ssr.WarningCircle,warning:ssr.WarningCircle,info:ssr.Info,check:ssr.Check,circle:ssr.Circle,helpCircle:ssr.Question,user:ssr.User,users:ssr.Users,userPlus:ssr.UserPlus,logIn:ssr.SignIn,logOut:ssr.SignOut,eye:ssr.Eye,eyeOff:ssr.EyeSlash,chart:ssr.ChartBar,barChart:ssr.ChartBar,trendingUp:ssr.TrendUp,activity:ssr.Pulse,database:ssr.Database,zap:ssr.Lightning,fileText:ssr.FileText,file:ssr.File,folder:ssr.Folder,book:ssr.Book,bookOpen:ssr.BookOpen,mail:ssr.Envelope,message:ssr.ChatCircle,phone:ssr.Phone,image:ssr.Image,video:ssr.Video,camera:ssr.Camera,smile:ssr.Smiley,frown:ssr.SmileySad,meh:ssr.SmileyMeh,lock:ssr.Lock,unlock:ssr.LockOpen,shield:ssr.Shield,wallet:ssr.Wallet,key:ssr.Key,clock:ssr.Clock,calendar:ssr.Calendar,calendarPlus:ssr.CalendarPlus,bell:ssr.Bell,heart:ssr.Heart,star:ssr.Star,bookmark:ssr.Bookmark,share:ssr.Share,monitor:ssr.Monitor,sun:ssr.Sun,moon:ssr.Moon,lightbulb:ssr.Lightbulb,brain:ssr.Brain,flag:ssr.Flag,square:ssr.Square,sparkle:ssr.Sparkle,sparkles:ssr.Sparkle,globe:ssr.Globe,smartphone:ssr.DeviceMobile,deviceMobile:ssr.DeviceMobile,floppyDisk:ssr.FloppyDisk,ticket:ssr.Ticket,clipboard:ssr.Clipboard,wifi:ssr.WifiHigh,wifiOff:ssr.WifiSlash,cpu:ssr.Cpu,mask:ssr.MaskHappy,bold:ssr.TextB,italic:ssr.TextItalic,strikethrough:ssr.TextStrikethrough,heading:ssr.TextHOne,link:ssr.Link,code:ssr.Code,fileCode:ssr.FileCode,quote:ssr.Quotes,list:ssr.List,listOrdered:ssr.ListNumbers,minus:ssr.Minus},Er={happy:"smile",sad:"frown",neutral:"meh",excited:"smile",angry:"frown",love:"heart",like:"heart",dislike:"frown"},Pr={loading:"loader",success:"success",error:"error",warning:"warning",info:"info",locked:"lock",unlocked:"unlock",visible:"eye",hidden:"eyeOff"};function Mr(t){return !t||!/[-_]/.test(t)&&/^[a-z]/.test(t)?t:/^[A-Z]+$/.test(t)?t.toLowerCase():/^[A-Z]/.test(t)&&!/[-_]/.test(t)?t.charAt(0).toLowerCase()+t.slice(1):t.split(/[-_]/).map((e,r)=>r===0?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")}var G=null,_=null;var Nr={home:{lucide:"Home",phosphor:"House",iconsax:"Home2"},"layout-dashboard":{lucide:"LayoutDashboard",phosphor:"SquaresFour"},folder:{lucide:"Folder",phosphor:"Folder",iconsax:"Folder"},"alert-circle":{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Danger"},alertCircle:{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Danger"},columns:{lucide:"Columns",phosphor:"Columns"},users:{lucide:"Users",phosphor:"Users",iconsax:"People"},settings:{lucide:"Settings",phosphor:"Gear"},menu:{lucide:"Menu",phosphor:"List",iconsax:"Menu"},close:{lucide:"X",phosphor:"X",iconsax:"CloseCircle"},chevronLeft:{lucide:"ChevronLeft",phosphor:"CaretLeft",iconsax:"ArrowLeft2"},chevronRight:{lucide:"ChevronRight",phosphor:"CaretRight",iconsax:"ArrowRight2"},chevronDown:{lucide:"ChevronDown",phosphor:"CaretDown",iconsax:"ArrowDown2"},chevronUp:{lucide:"ChevronUp",phosphor:"CaretUp",iconsax:"ArrowUp2"},arrowLeft:{lucide:"ArrowLeft",phosphor:"ArrowLeft",iconsax:"ArrowLeft"},arrowRight:{lucide:"ArrowRight",phosphor:"ArrowRight",iconsax:"ArrowRight"},arrowUp:{lucide:"ArrowUp",phosphor:"ArrowUp",iconsax:"ArrowUp"},arrowDown:{lucide:"ArrowDown",phosphor:"ArrowDown",iconsax:"ArrowDown"},add:{lucide:"Plus",phosphor:"Plus",iconsax:"Add"},edit:{lucide:"Edit",phosphor:"Pencil"},pencil:{lucide:"Pencil",phosphor:"Pencil"},delete:{lucide:"Trash2",phosphor:"Trash",iconsax:"Trash"},trash:{lucide:"Trash2",phosphor:"Trash",iconsax:"Trash"},upload:{lucide:"Upload",phosphor:"Upload",iconsax:"Upload"},download:{lucide:"Download",phosphor:"Download",iconsax:"Download"},x:{lucide:"X",phosphor:"X"},check:{lucide:"Check",phosphor:"Check",iconsax:"Check"},search:{lucide:"Search",phosphor:"MagnifyingGlass",iconsax:"SearchNormal"},share:{lucide:"Share",phosphor:"Share"},copy:{lucide:"Copy",phosphor:"Copy"},save:{lucide:"Save",phosphor:"FloppyDisk"},loader:{lucide:"Loader2",phosphor:"Spinner"},loader2:{lucide:"Loader2",phosphor:"Spinner"},"check-circle":{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},checkCircle:{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},success:{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},error:{lucide:"XCircle",phosphor:"XCircle",iconsax:"CloseCircle"},warning:{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Warning2"},info:{lucide:"Info",phosphor:"Info",iconsax:"InfoCircle"},refresh:{lucide:"RefreshCw",phosphor:"ArrowClockwise",iconsax:"Refresh"},refreshCw:{lucide:"RefreshCw",phosphor:"ArrowClockwise",iconsax:"Refresh"},bell:{lucide:"Bell",phosphor:"Bell",iconsax:"Bell"},heart:{lucide:"Heart",phosphor:"Heart",iconsax:"Heart"},star:{lucide:"Star",phosphor:"Star",iconsax:"Star"},bookmark:{lucide:"Bookmark",phosphor:"Bookmark"},user:{lucide:"User",phosphor:"User",iconsax:"User"},userPlus:{lucide:"UserPlus",phosphor:"UserPlus",iconsax:"UserAdd"},logIn:{lucide:"LogIn",phosphor:"SignIn",iconsax:"Login"},logOut:{lucide:"LogOut",phosphor:"SignOut",iconsax:"Logout"},chrome:{lucide:"Chrome",phosphor:"ChromeLogo",iconsax:"Chrome"},github:{lucide:"Github",phosphor:"GithubLogo"},message:{lucide:"MessageCircle",phosphor:"ChatCircle"},messageSquare:{lucide:"MessageSquare",phosphor:"ChatSquare"},"message-square":{lucide:"MessageSquare",phosphor:"ChatSquare"},inbox:{lucide:"Inbox",phosphor:"Inbox"},calendar:{lucide:"Calendar",phosphor:"Calendar"},calendarPlus:{lucide:"CalendarPlus",phosphor:"CalendarPlus"},checkSquare:{lucide:"CheckSquare",phosphor:"CheckSquare",iconsax:"TickSquare"},clock:{lucide:"Clock",phosphor:"Clock"},book:{lucide:"Book",phosphor:"Book",iconsax:"Book"},bookOpen:{lucide:"BookOpen",phosphor:"BookOpen",iconsax:"Book"},monitor:{lucide:"Monitor",phosphor:"Monitor",iconsax:"Monitor"},sun:{lucide:"Sun",phosphor:"Sun",iconsax:"Sun"},moon:{lucide:"Moon",phosphor:"Moon",iconsax:"Moon"},sparkle:{lucide:"Sparkle",phosphor:"Sparkle"},sparkles:{lucide:"Sparkles",phosphor:"Sparkle"},lightbulb:{lucide:"Lightbulb",phosphor:"Lightbulb"},brain:{lucide:"Brain",phosphor:"Brain"},zap:{lucide:"Zap",phosphor:"Lightning"},globe:{lucide:"Globe",phosphor:"Globe",iconsax:"Global"},deviceMobile:{lucide:"Smartphone",phosphor:"DeviceMobile"},smartphone:{lucide:"Smartphone",phosphor:"DeviceMobile"},floppyDisk:{lucide:"Save",phosphor:"FloppyDisk"},chart:{lucide:"BarChart3",phosphor:"ChartBar"},barChart:{lucide:"BarChart",phosphor:"ChartBar"},trendingUp:{lucide:"TrendingUp",phosphor:"TrendUp"},trendingDown:{lucide:"TrendingDown",phosphor:"TrendDown"},activity:{lucide:"Activity",phosphor:"Pulse"},database:{lucide:"Database",phosphor:"Database"},dollarSign:{lucide:"DollarSign",phosphor:"CurrencyDollar"},dollar:{lucide:"DollarSign",phosphor:"CurrencyDollar"},currency:{lucide:"DollarSign",phosphor:"CurrencyDollar"},layers:{lucide:"Layers",phosphor:"Stack"},ban:{lucide:"Ban",phosphor:"Prohibit"},lock:{lucide:"Lock",phosphor:"Lock",iconsax:"Lock"},unlock:{lucide:"Unlock",phosphor:"LockOpen",iconsax:"Unlock"},shield:{lucide:"Shield",phosphor:"Shield",iconsax:"Shield"},key:{lucide:"Key",phosphor:"Key"},play:{lucide:"Play",phosphor:"Play",iconsax:"Play"},pause:{lucide:"Pause",phosphor:"Pause",iconsax:"Pause"},image:{lucide:"Image",phosphor:"Image",iconsax:"Image"},video:{lucide:"Video",phosphor:"Video",iconsax:"Video"},camera:{lucide:"Camera",phosphor:"Camera",iconsax:"Camera"},fileText:{lucide:"FileText",phosphor:"FileText"},file:{lucide:"File",phosphor:"File"},externalLink:{lucide:"ExternalLink",phosphor:"ArrowSquareOut"},link:{lucide:"Link",phosphor:"Link",iconsax:"Link"},moreHorizontal:{lucide:"MoreHorizontal",phosphor:"DotsThreeOutline"},moreVertical:{lucide:"MoreVertical",phosphor:"DotsThreeVertical"},remove:{lucide:"Minus",phosphor:"Minus",iconsax:"Minus"},eye:{lucide:"Eye",phosphor:"Eye",iconsax:"Eye"},eyeOff:{lucide:"EyeOff",phosphor:"EyeSlash",iconsax:"EyeSlash"},smile:{lucide:"Smile",phosphor:"Smiley",iconsax:"EmojiHappy"},frown:{lucide:"Frown",phosphor:"SmileySad",iconsax:"EmojiSad"},meh:{lucide:"Meh",phosphor:"SmileyMeh",iconsax:"EmojiNormal"},mail:{lucide:"Mail",phosphor:"Envelope"},phone:{lucide:"Phone",phosphor:"Phone"},flag:{lucide:"Flag",phosphor:"Flag",iconsax:"Flag"},rocket:{lucide:"Rocket",phosphor:"Rocket",iconsax:"Rocket"},ticket:{lucide:"Ticket",phosphor:"Ticket",iconsax:"Ticket"},clipboard:{lucide:"ClipboardList",phosphor:"Clipboard",iconsax:"Sticker"},wifi:{lucide:"Wifi",phosphor:"WifiHigh",iconsax:"Wifi"},wifiOff:{lucide:"WifiOff",phosphor:"WifiSlash"},cpu:{lucide:"Cpu",phosphor:"Cpu",iconsax:"Computing"},mask:{lucide:"Drama",phosphor:"MaskHappy",iconsax:"EmojiHappy"},bold:{lucide:"Bold",phosphor:"TextB"},italic:{lucide:"Italic",phosphor:"TextItalic"},strikethrough:{lucide:"Strikethrough",phosphor:"TextStrikethrough"},heading:{lucide:"Heading",phosphor:"TextHOne"},code:{lucide:"Code",phosphor:"Code",iconsax:"Code"},fileCode:{lucide:"FileCode",phosphor:"FileCode"},quote:{lucide:"Quote",phosphor:"Quotes",iconsax:"QuoteUp"},list:{lucide:"List",phosphor:"List"},listOrdered:{lucide:"ListOrdered",phosphor:"ListNumbers"},minus:{lucide:"Minus",phosphor:"Minus",iconsax:"Minus"}};async function Rr(){if(typeof window=="undefined")return null;if(!G)try{G=await import('@phosphor-icons/react');}catch{return console.warn("Phosphor Icons not available. Install @phosphor-icons/react to use."),null}return G}async function Lr(){if(typeof window=="undefined")return null;if(!_)try{_=await import('lucide-react');}catch{return console.warn("Lucide Icons not available. Install lucide-react to use lucide provider."),null}return _}function et(t,e="phosphor"){let r=Nr[t];if(!r)return rs(t,e);let o=r[e];switch(e){case "phosphor":return !o||!G?null:(G==null?void 0:G[o])||null;case "lucide":return !o||!_?null:(_==null?void 0:_[o])||null;case "iconsax":{return null;}default:return null}}function rs(t,e){switch(e){case "phosphor":{if(!G)return null;let r=t.charAt(0).toUpperCase()+t.slice(1),o=t.split(/(?=[A-Z])/).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join("");return (G==null?void 0:G[r])||(G==null?void 0:G[o])||(G==null?void 0:G[t])||null}case "lucide":{if(!_)return null;let r=t.charAt(0).toUpperCase()+t.slice(1),o=t.replace(/([A-Z])/g,a=>a===t[0]?a.toLowerCase():a);return (_==null?void 0:_[r])||(_==null?void 0:_[t])||(_==null?void 0:_[o])||null}case "iconsax":{return null;}default:return null}}function Sr(t,e){let r=Nr[t];if(r){let o=r[e];if(o)return o}return t}var Lt={"arrow-left":"arrowLeft","arrow-right":"arrowRight","arrow-up":"arrowUp","arrow-down":"arrowDown","chevron-left":"chevronLeft","chevron-right":"chevronRight","chevron-up":"chevronUp","chevron-down":"chevronDown","external-link":"externalLink","more-horizontal":"moreHorizontal","more-vertical":"moreVertical","user-plus":"userPlus","log-in":"logIn","log-out":"logOut","check-circle":"checkCircle","check-square":"checkSquare","alert-circle":"alertCircle","eye-off":"eyeOff","file-text":"fileText","book-open":"bookOpen","bar-chart":"barChart","trending-up":"trendingUp","trending-down":"trendingDown","message-square":"messageSquare","calendar-plus":"calendarPlus","refresh-cw":"refreshCw","dollar-sign":"dollarSign","layout-dashboard":"layoutDashboard","device-mobile":"deviceMobile","floppy-disk":"floppyDisk",back:"arrowLeft",prev:"arrowLeft",previous:"arrowLeft",forward:"arrowRight",next:"arrowRight",close:"x",cancel:"x",remove:"delete",trash:"delete",plus:"add",new:"add",pencil:"edit",modify:"edit",store:"save",floppy:"save",magnify:"search",person:"user",account:"user",profile:"user",gear:"settings",config:"settings",preferences:"settings",house:"home",main:"home",done:"check",complete:"check",tick:"check",information:"info",help:"info",alert:"warning",caution:"warning",checkmark:"success",checkCircle:"success",fail:"error",cross:"error",xCircle:"error",spinner:"loader",loading:"loader",wait:"loader",reload:"refresh",update:"refresh",sync:"refresh",show:"eye",view:"eye",hide:"eyeOff",hidden:"eyeOff",secure:"lock",locked:"lock",unsecure:"unlock",unlocked:"unlock",get:"download",fetch:"download",post:"upload",send:"share",export:"share",duplicate:"copy",clone:"copy",email:"mail",envelope:"mail",chat:"message",comment:"message",talk:"message",date:"calendar",schedule:"calendar",time:"clock",watch:"clock",document:"fileText",doc:"fileText",text:"fileText",directory:"folder",dir:"folder",picture:"image",img:"image",movie:"video",film:"video",photo:"camera",capture:"camera",start:"play",run:"play",stop:"pause",halt:"pause",like:"heart",love:"heart",favorite:"star",saveBookmark:"bookmark",notification:"bell",notify:"bell",alarm:"bell",prefs:"settings",lookup:"search",dots:"moreHorizontal",moreMenu:"moreHorizontal",moreOptions:"moreVertical",external:"externalLink",outbound:"externalLink",open:"externalLink",url:"link",hyperlink:"link",graph:"barChart",stats:"barChart",analytics:"barChart",db:"database",storage:"database",pulse:"activity",monitor:"activity",up:"trendingUp",down:"trendingDown",lightning:"zap",bolt:"zap",flash:"zap",security:"shield",protect:"shield",password:"key",secret:"key",signin:"logIn",login:"logIn",enter:"logIn",signout:"logOut",logout:"logOut",exit:"logOut",people:"users",group:"users",team:"users",addUser:"userPlus",invite:"userPlus",read:"book",library:"book",reading:"bookOpen",openBook:"bookOpen",light:"sun",day:"sun",dark:"moon",night:"moon",screen:"monitor",display:"monitor",ai:"brain",intelligence:"brain",think:"brain",idea:"lightbulb",bulb:"lightbulb",inspiration:"lightbulb",magic:"sparkles",stars:"sparkles",glitter:"sparkles"};function Ir(t){if(!t||typeof t!="string")return {normalized:t||"",wasAlias:false};let e=Mr(t),r=Lt[t]||Lt[e];return r?{normalized:r,wasAlias:true,originalAlias:t}:{normalized:e,wasAlias:false}}var Br={set:"lucide",weight:"regular",size:20,color:"currentColor",strokeWidth:1.25,iconsaxVariant:"line"};var as=ee.createContext(Br);function Ar(){return ee.useContext(as)}var Hr=ee__default.default.forwardRef(({name:t,size:e,className:r,emotion:o,status:a,provider:s,weight:d,animated:v=false,pulse:h=false,spin:i=false,bounce:y=false,variant:m="default","aria-label":x,"aria-hidden":f},c)=>{var D,te;let n=Ar(),g=s||n.set,u=e!=null?e:n.size,C=d||n.weight,p=n.color,b=(D=n.strokeWidth)!=null?D:1.25,k=(te=n.iconsaxVariant)!=null?te:"line",[w,N]=ee__default.default.useState(false),[B,M]=ee__default.default.useState(false);ee__default.default.useEffect(()=>{N(true),g==="lucide"?Lr().then(()=>M(true)):g==="phosphor"?Rr().then(()=>M(true)):M(true);},[g]);let R=ee__default.default.useMemo(()=>{let ne=o?Er[o]:a?Pr[a]:t,{normalized:W}=Ir(ne),re=Sr(W,g);return {normalized:W,providerName:re}},[t,o,a,g]),T=R.normalized,I=ee__default.default.useMemo(()=>{return null},[g,R.providerName,w,k]),V=ct({"text-current":m==="default","text-primary":m==="primary","text-muted-foreground":m==="secondary"||m==="muted","text-green-600 dark:text-green-400":m==="success","text-yellow-600 dark:text-yellow-400":m==="warning","text-destructive":m==="error"});if(!w)return jsxRuntime.jsx("span",{style:{width:u,height:u},className:l(V,r),"aria-hidden":f!==void 0?f:true,"aria-label":x});let z=null;if(g==="phosphor"?(z=kr[T]||null,!z&&B&&(z=et(T,g))):g==="iconsax"?(z=I,z||(z=et(T,g))):z=et(T,g),!z)return g==="iconsax"&&true?process.env.NODE_ENV==="development"&&console.warn(`Icon "${T}" \u2014 iconsax resolver not registered. Use HuaProvider with icons.set='iconsax', or add: import '@hua-labs/ui/iconsax'`):console.warn(`Icon "${T}" not found for provider "${g}"`),jsxRuntime.jsx("span",{ref:c,className:l("inline-flex items-center justify-center rounded-full border-2 border-dashed border-border",V,r),style:{width:u,height:u},"aria-label":x||`\uC544\uC774\uCF58\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: ${T}`,title:`Icon not found: ${T}`,children:jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground","aria-hidden":"true",children:"?"})});let $={size:typeof u=="number"?u:void 0,width:u,height:u,color:p};g==="phosphor"?$.weight=C:$.strokeWidth=b;let Z=ct({"animate-pulse":h,"animate-spin":i,"animate-bounce":y,"transition-all duration-200 ease-in-out":v}),J={};return x?(J["aria-label"]=x,J["aria-hidden"]=false):f!==void 0?J["aria-hidden"]=f:J["aria-hidden"]=true,jsxRuntime.jsx("span",{ref:c,className:l("inline-flex items-center justify-center",Z,V,r),style:{width:u,height:u},...J,children:z&&ee__default.default.createElement(z,{...$,className:V,"aria-hidden":true})})});Hr.displayName="Icon";var ss=ee__default.default.memo(Hr,(t,e)=>t.name===e.name&&t.size===e.size&&t.className===e.className&&t.emotion===e.emotion&&t.status===e.status&&t.provider===e.provider&&t.animated===e.animated&&t.pulse===e.pulse&&t.spin===e.spin&&t.bounce===e.bounce&&t.variant===e.variant&&t.weight===e.weight&&t["aria-label"]===e["aria-label"]&&t["aria-hidden"]===e["aria-hidden"]),H=ss;H.displayName="Icon";var $r=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"smile",...t}));$r.displayName="EmotionIcon";var Dr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"info",...t}));Dr.displayName="StatusIcon";var zr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"loader",status:"loading",spin:true,"aria-label":"\uB85C\uB529 \uC911",...t}));zr.displayName="LoadingIcon";var Fr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"check",status:"success",variant:"success","aria-label":"\uC131\uACF5",...t}));Fr.displayName="SuccessIcon";var Or=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"alertCircle",status:"error",variant:"error","aria-label":"\uC624\uB958",...t}));Or.displayName="ErrorIcon";var Be=ee__default.default.forwardRef(({onBack:t,backLink:e,className:r},o)=>{let{labels:a,isEditMode:s,formData:d}=U();return jsxRuntime.jsx("header",{ref:o,className:l("flex items-center justify-between mb-8",r),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[e||t&&jsxRuntime.jsx("button",{type:"button",onClick:t,className:"p-2 text-muted-foreground hover:text-foreground transition-colors","aria-label":"\uB4A4\uB85C\uAC00\uAE30",children:jsxRuntime.jsx(H,{name:"chevronLeft",size:24})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold text-foreground",children:s?a.editTitle:a.pageTitle}),s&&d.slug&&jsxRuntime.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.slugPrefix,d.slug]})]})]})})});Be.displayName="BlogEditorHeader";var Ae=ee__default.default.forwardRef(({className:t},e)=>{var b,k;let{formData:r,updateField:o,features:a,labels:s,variant:d,handleUploadImage:v,uploading:h,setSlugManuallyEdited:i}=U(),[y,m]=ee.useState(""),x=ee.useRef(null),f=l("rounded-xl p-6 space-y-4",d==="glass"?"bg-white/10 backdrop-blur-sm border border-white/20 dark:bg-background/20 dark:border-border/50":d==="minimal"?"bg-transparent":"bg-background",t),c="w-full px-3 py-2 border border-border rounded-lg bg-background text-foreground focus:ring-1 focus:ring-ring focus:border-transparent transition-colors",n="block text-sm font-medium text-foreground mb-1",g=ee.useCallback(w=>{let N=w.trim();N&&!r.tags.includes(N)&&o("tags",[...r.tags,N]),m("");},[r.tags,o]),u=ee.useCallback(w=>{o("tags",r.tags.filter(N=>N!==w));},[r.tags,o]),C=ee.useCallback(w=>{let N=w.target.value;if(N.includes(",")){let B=N.split(",");B.forEach((M,R)=>{R<B.length-1?g(M):m(M);});}else m(N);},[g]),p=ee.useCallback(w=>{w.key==="Enter"?(w.preventDefault(),g(y)):w.key==="Backspace"&&!y&&r.tags.length>0&&u(r.tags[r.tags.length-1]);},[y,r.tags,g,u]);return jsxRuntime.jsxs("div",{ref:e,className:f,children:[jsxRuntime.jsx("h2",{className:"font-semibold text-foreground",children:s.basicInfo}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.enableSlug&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:n,children:[s.slug," *"]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"text-muted-foreground mr-1 text-sm",children:s.slugPrefix}),jsxRuntime.jsx("input",{type:"text",value:r.slug,onChange:w=>{o("slug",Et(w.target.value)),i(true);},className:l(c,"flex-1"),placeholder:"my-post-slug"})]})]}),a.enableTags&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.tags}),jsxRuntime.jsxs("div",{className:l("flex flex-wrap items-center gap-2 min-h-[42px] px-3 py-2 border border-border rounded-lg bg-background focus-within:ring-1 focus-within:ring-ring focus-within:border-transparent transition-colors"),children:[r.tags.map(w=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-primary/10 text-primary text-sm rounded-md",children:[w,jsxRuntime.jsx("button",{type:"button",onClick:()=>u(w),className:"hover:text-primary transition-colors","aria-label":`${w} \uD0DC\uADF8 \uC0AD\uC81C`,children:jsxRuntime.jsx(H,{name:"x",size:14})})]},w)),jsxRuntime.jsx("input",{type:"text",value:y,onChange:C,onKeyDown:p,className:"flex-1 min-w-[100px] bg-transparent outline-none text-foreground text-sm",placeholder:r.tags.length===0?s.tagsPlaceholder:"\uD0DC\uADF8 \uCD94\uAC00..."})]}),jsxRuntime.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"\uC27C\uD45C(,) \uB610\uB294 Enter\uB85C \uD0DC\uADF8 \uCD94\uAC00"})]})]}),a.enableCoverImage&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.coverImage}),jsxRuntime.jsxs("div",{className:"space-y-3",children:[r.coverImage&&jsxRuntime.jsxs("div",{className:"relative w-full h-40 rounded-lg overflow-hidden bg-muted",children:[jsxRuntime.jsx("img",{src:r.coverImage,alt:"\uCEE4\uBC84 \uC774\uBBF8\uC9C0 \uBBF8\uB9AC\uBCF4\uAE30",className:"w-full h-full object-cover"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>o("coverImage",""),className:"absolute top-2 right-2 p-1.5 bg-red-500 text-white rounded-full hover:bg-red-600 transition-colors","aria-label":"\uC774\uBBF8\uC9C0 \uC0AD\uC81C",children:jsxRuntime.jsx(H,{name:"x",size:14})})]}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("input",{type:"text",value:r.coverImage,onChange:w=>o("coverImage",w.target.value),className:l(c,"flex-1"),placeholder:s.coverImagePlaceholder}),jsxRuntime.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:async w=>{var B;let N=(B=w.target.files)==null?void 0:B[0];if(N){let M=await v(N);M&&o("coverImage",M);}w.target.value="";}}),jsxRuntime.jsx("button",{type:"button",onClick:()=>{var w;return (w=x.current)==null?void 0:w.click()},disabled:h,className:"px-3 py-2 border border-border rounded-lg hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC",children:h?jsxRuntime.jsx(H,{name:"loader",size:20,spin:true}):jsxRuntime.jsx(H,{name:"upload",size:20})})]})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.enablePublishDate&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.publishDate}),jsxRuntime.jsx("input",{type:"datetime-local",value:(b=r.publishedAt)!=null?b:"",onChange:w=>o("publishedAt",w.target.value||null),className:c}),jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:s.publishDateHint})]}),a.enableExpiresAt&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.expiresAt}),jsxRuntime.jsx("input",{type:"datetime-local",value:(k=r.expiresAt)!=null?k:"",onChange:w=>o("expiresAt",w.target.value||null),className:c}),jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:s.expiresAtHint})]})]})]})});Ae.displayName="BlogEditorMetadata";var He=ee__default.default.forwardRef(({className:t},e)=>{let{languages:r,activeLanguage:o,setActiveLanguage:a,showPreview:s,setShowPreview:d,features:v,labels:h}=U();return jsxRuntime.jsxs("div",{ref:e,className:l("flex items-center border-b border-border sticky top-0 z-10 bg-background",t),role:"tablist","aria-label":"\uC5B8\uC5B4 \uC120\uD0DD",children:[jsxRuntime.jsx("div",{className:"flex flex-1",children:r.map(i=>{let y=o===i.key,m=i.isPrimary;return jsxRuntime.jsxs("button",{type:"button",role:"tab","aria-selected":y,"aria-controls":`tabpanel-${i.key}`,id:`tab-${i.key}`,onClick:()=>a(i.key),className:l("flex-1 px-4 py-3 text-sm font-medium transition-colors",y?"bg-primary/10 text-primary border-b-2 border-primary":"text-muted-foreground hover:bg-muted"),children:[i.flag&&jsxRuntime.jsx("span",{className:"mr-1.5",children:i.flag}),i.label,m&&" *"]},i.key)})}),v.enablePreview&&jsxRuntime.jsxs("button",{type:"button",onClick:()=>d(!s),className:"inline-flex items-center gap-1.5 px-3 py-2 mx-2 text-sm border border-border rounded-lg hover:bg-muted transition-colors shrink-0",children:[jsxRuntime.jsx(H,{name:s?"pencil":"eye",size:14}),s?h.editMode:h.preview]})]})});He.displayName="BlogEditorLanguageTabs";var ze=ee__default.default.forwardRef(({className:t,textareaRef:e},r)=>{var p;let{formData:o,activeLanguage:a,updateMultilingualField:s,updateField:d,features:v,labels:h,languages:i,generateSlug:y,isEditMode:m,slugManuallyEdited:x}=U(),f=((p=i.find(b=>b.isPrimary))==null?void 0:p.key)===a,c=i.find(b=>b.key===a),n="w-full px-3 py-2 border border-border rounded-lg bg-background text-foreground focus:ring-1 focus:ring-ring focus:border-transparent transition-colors",g="block text-sm font-medium text-foreground mb-1",u=b=>{s("title",a,b),a==="en"&&!m&&!x&&d("slug",y(b));},C=b=>f?`${b} *`:`${b} (${(c==null?void 0:c.label)||a})`;return jsxRuntime.jsxs("div",{ref:r,className:l("p-6 space-y-4",t),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:g,children:C(h.titleLabel)}),jsxRuntime.jsx("input",{type:"text",value:o.title[a]||"",onChange:b=>u(b.target.value),className:n,placeholder:h.titlePlaceholder})]}),v.enableExcerpt&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:g,children:C(h.excerpt)}),jsxRuntime.jsx("textarea",{value:o.excerpt[a]||"",onChange:b=>s("excerpt",a,b.target.value),rows:2,className:l(n,"resize-none"),placeholder:h.excerptPlaceholder})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:g,children:[C(h.contentLabel)," (\uB9C8\uD06C\uB2E4\uC6B4)"]}),jsxRuntime.jsx("textarea",{ref:e,value:o.content[a]||"",onChange:b=>s("content",a,b.target.value),rows:15,className:l(n,"font-mono text-sm resize-y min-h-[300px]"),placeholder:h.contentPlaceholder})]})]})});ze.displayName="BlogEditorContent";function ms(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function At(t){if(!t)return "";let e=t;return e=e.replace(/```(\w*)\n?([\s\S]*?)```/g,(r,o,a)=>`<pre class="bg-gray-100 dark:bg-gray-800 rounded-lg p-4 overflow-x-auto my-4"><code class="text-sm">${ms(a.trim())}</code></pre>`),e=e.replace(/`([^`]+)`/g,'<code class="bg-gray-100 dark:bg-gray-700 px-1.5 py-0.5 rounded text-sm">$1</code>'),e=e.replace(/^######\s+(.+)$/gm,'<h6 class="text-base font-semibold mt-4 mb-2">$1</h6>'),e=e.replace(/^#####\s+(.+)$/gm,'<h5 class="text-lg font-semibold mt-4 mb-2">$1</h5>'),e=e.replace(/^####\s+(.+)$/gm,'<h4 class="text-xl font-semibold mt-5 mb-2">$1</h4>'),e=e.replace(/^###\s+(.+)$/gm,'<h3 class="text-2xl font-semibold mt-5 mb-3">$1</h3>'),e=e.replace(/^##\s+(.+)$/gm,'<h2 class="text-2xl font-bold mt-6 mb-3">$1</h2>'),e=e.replace(/^#\s+(.+)$/gm,'<h1 class="text-3xl font-bold mt-6 mb-4">$1</h1>'),e=e.replace(/^---+$/gm,'<hr class="my-6 border-gray-300 dark:border-gray-600" />'),e=e.replace(/^>\s+(.+)$/gm,'<blockquote class="border-l-4 border-gray-300 dark:border-gray-600 pl-4 my-4 italic text-gray-600 dark:text-gray-400">$1</blockquote>'),e=e.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),e=e.replace(/\*(.+?)\*/g,"<em>$1</em>"),e=e.replace(/~~(.+?)~~/g,'<del class="text-gray-500">$1</del>'),e=e.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" class="text-cyan-600 hover:text-cyan-700 dark:text-cyan-400 dark:hover:text-cyan-300 underline" target="_blank" rel="noopener noreferrer">$1</a>'),e=e.replace(/^[-*]\s+(.+)$/gm,'<li class="ml-4">$1</li>'),e=e.replace(/(<li[^>]*>.*<\/li>\n?)+/g,r=>`<ul class="list-disc list-inside my-4 space-y-1">${r}</ul>`),e=e.replace(/\n(?!<)/g,`<br />
|
|
75
|
+
)`,transition:u?"opacity 0.1s ease-out":`opacity ${s}ms ease-out`,pointerEvents:"none",opacity:u?1:0};return jsxRuntime.jsx("div",{ref:Fo(m,x),className:l("relative",e),style:w,onMouseMove:p,onMouseEnter:b,onMouseLeave:k,...y,children:jsxRuntime.jsxs("div",{style:N,className:"relative",children:[t,d&&jsxRuntime.jsx("div",{style:B,"aria-hidden":"true"})]})})});sr.displayName="TiltCard";function Fo(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var lr=ee__default.default.forwardRef(({src:t,type:e="native",poster:r,autoPlay:o=true,loop:a=true,muted:s=true,controls:d=false,objectFit:v="cover",overlay:h=true,overlayColor:i="rgba(0, 0, 0, 0.4)",gradient:y=false,gradientDirection:m="bottom",playbackRate:x=1,fadeIn:f=true,children:c,className:n,style:g,...u},C)=>{let p=ee.useRef(null),[b,k]=ee.useState(false),[w,N]=ee.useState(false);ee.useEffect(()=>{e==="native"&&p.current&&(p.current.playbackRate=x);},[x,e]);let B=()=>{k(true);},M=()=>{N(true);},R=$=>{let Z=new URLSearchParams({autoplay:o?"1":"0",mute:s?"1":"0",loop:a?"1":"0",controls:d?"1":"0",playlist:$,modestbranding:"1",rel:"0",showinfo:"0",iv_load_policy:"3",disablekb:"1",enablejsapi:"1",playsinline:"1"});return `https://www.youtube.com/embed/${$}?${Z.toString()}`},T=$=>{let Z=new URLSearchParams({autoplay:o?"1":"0",muted:s?"1":"0",loop:a?"1":"0",controls:d?"1":"0",background:"1",quality:"auto",dnt:"1"});return `https://player.vimeo.com/video/${$}?${Z.toString()}`},I=()=>{let $={cover:"object-cover",contain:"object-contain",fill:"object-fill"}[v];switch(e){case "youtube":return jsxRuntime.jsx("iframe",{src:R(t),className:l("absolute inset-0 w-full h-full pointer-events-none","scale-[1.2]"),style:{opacity:b||!f?1:0,transition:f?"opacity 0.8s ease-out":void 0},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:true,onLoad:()=>k(true),title:"YouTube video background"});case "vimeo":return jsxRuntime.jsx("iframe",{src:T(t),className:"absolute inset-0 w-full h-full pointer-events-none",style:{opacity:b||!f?1:0,transition:f?"opacity 0.8s ease-out":void 0},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:true,onLoad:()=>k(true),title:"Vimeo video background"});default:return jsxRuntime.jsx("video",{ref:p,src:t,poster:r,autoPlay:o,loop:a,muted:s,controls:d,playsInline:true,className:l("absolute inset-0 w-full h-full",$),style:{opacity:w||!f?1:0,transition:f?"opacity 0.8s ease-out":void 0},onLoadedData:B,onPlaying:M})}},V=()=>{if(!y)return null;let $=[];return (m==="top"||m==="both")&&$.push(jsxRuntime.jsx("div",{className:"absolute top-0 left-0 right-0 h-1/3",style:{background:`linear-gradient(to bottom, ${i}, transparent)`},"aria-hidden":"true"},"top")),(m==="bottom"||m==="both")&&$.push(jsxRuntime.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1/3",style:{background:`linear-gradient(to top, ${i}, transparent)`},"aria-hidden":"true"},"bottom")),jsxRuntime.jsx(jsxRuntime.Fragment,{children:$})},z=n&&/\b(fixed|absolute|sticky)\b/.test(n);return jsxRuntime.jsxs("div",{ref:C,className:l("overflow-hidden",!z&&"relative",n),style:g,...u,children:[r&&f&&!b&&!w&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${r})`},"aria-hidden":"true"}),I(),h&&!y&&jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backgroundColor:i},"aria-hidden":"true"}),V(),c&&jsxRuntime.jsx("div",{className:"relative z-10 h-full",children:c})]})});lr.displayName="VideoBackground";var cr=ee__default.default.forwardRef(({children:t,autoPlay:e=false,interval:r=5e3,loop:o=true,pauseOnHover:a=true,indicators:s="dots",indicatorPosition:d="bottom",showArrows:v=true,arrowPosition:h="inside",transition:i="slide",transitionDuration:y=500,onSlideChange:m,showPlayPause:x=false,playPausePosition:f="right",className:c,style:n,...g},u)=>{let C=()=>i==="slide"&&o?1:0,[p,b]=ee.useState(C),[k,w]=ee.useState(!e),[N,B]=ee.useState(false),[M,R]=ee.useState(false),[T,I]=ee.useState(false),[V,z]=ee.useState(null),[$,Z]=ee.useState(null),J=ee.useRef(null),D=ee__default.default.Children.count(t),te=jo(),ne=ee.useCallback(L=>i!=="slide"||!o?L:L===0?D-1:L===D+1?0:L-1,[o,D,i]),W=ee.useCallback(L=>{if(M)return;let E=L;if(o?i!=="slide"&&(L<0?E=D-1:L>=D&&(E=0)):E=Math.max(0,Math.min(L,D-1)),E!==p){R(true),b(E);let A=o&&i==="slide"?E===0?D-1:E===D+1?0:E-1:E;m==null||m(A),setTimeout(()=>R(false),y);}},[p,D,o,M,y,i,m]);ee.useEffect(()=>{!o||M||i!=="slide"||(p===0?setTimeout(()=>{I(true),b(D),setTimeout(()=>I(false),50);},y):p===D+1&&setTimeout(()=>{I(true),b(1),setTimeout(()=>I(false),50);},y));},[p,D,o,M,y,i]);let re=ee.useCallback(()=>{W(p+1);},[p,W]),ve=ee.useCallback(()=>{W(p-1);},[p,W]),We=ee.useCallback(()=>{B(L=>!L);},[]);ee.useCallback(()=>{B(false);},[]);ee.useCallback(()=>{B(true);},[]);ee.useEffect(()=>{if(!e||k||N||te)return;let L=setInterval(re,r);return ()=>clearInterval(L)},[e,r,k,N,re,te]);let Ge=L=>{z(L.targetTouches[0].clientX);},_e=L=>{Z(L.targetTouches[0].clientX);},je=()=>{if(!V||!$)return;let L=V-$;Math.abs(L)>=50&&(L>0?re():ve()),z(null),Z(null);};ee.useEffect(()=>{let L=A=>{A.key==="ArrowLeft"?ve():A.key==="ArrowRight"&&re();},E=J.current;return E==null||E.addEventListener("keydown",L),()=>E==null?void 0:E.removeEventListener("keydown",L)},[re,ve]);let it=()=>{let L=te||T?0:y,E=ne(p);switch(i){case "fade":return ee__default.default.Children.map(t,(A,q)=>jsxRuntime.jsx("div",{className:l("absolute inset-0 w-full h-full",q===E?"z-10":"z-0"),style:{opacity:q===E?1:0,transition:`opacity ${L}ms ease-in-out`},children:A},q));case "scale":return ee__default.default.Children.map(t,(A,q)=>jsxRuntime.jsx("div",{className:l("absolute inset-0 w-full h-full",q===E?"z-10":"z-0"),style:{opacity:q===E?1:0,transform:`scale(${q===E?1:.9})`,transition:`opacity ${L}ms ease-in-out, transform ${L}ms ease-in-out`},children:A},q));default:{let A=ee__default.default.Children.toArray(t);return (o?[A[A.length-1],...A,A[0]]:A).map((j,oe)=>jsxRuntime.jsx("div",{className:"absolute inset-0 w-full h-full",style:{transform:`translateX(${(oe-p)*100}%)`,transition:T?"none":`transform ${L}ms ease-in-out`},children:j},oe))}}},Ne=()=>{if(s==="none")return null;let L=d.includes("inside"),E=d.includes("top"),A=ne(p),q=l("flex items-center justify-center gap-2",L?l("absolute left-1/2 -translate-x-1/2 z-20",E?"top-4":"bottom-4"):l("mt-4",E&&"order-first mb-4 mt-0")),j=oe=>{W(o&&i==="slide"?oe+1:oe);};return jsxRuntime.jsx("div",{className:q,role:"tablist",children:Array.from({length:D},(oe,K)=>{let ie=K===A;switch(s){case "bars":return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("h-1 rounded-full transition-all duration-300",ie?"w-8 bg-white":"w-4 bg-white/50 hover:bg-white/70"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`},K);case "numbers":return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("w-8 h-8 rounded-full text-sm font-medium transition-all duration-300",ie?"bg-white text-gray-900":"bg-white/30 text-white hover:bg-white/50"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`,children:K+1},K);default:return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("w-2.5 h-2.5 rounded-full transition-all duration-300",ie?"bg-white scale-125":"bg-white/50 hover:bg-white/70"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`},K)}})})},Xe=()=>{if(!x||!e)return null;let L=!N;return jsxRuntime.jsx("button",{onClick:We,className:l("absolute bottom-4 z-20","w-8 h-8 rounded-full flex items-center justify-center","bg-white/80 hover:bg-white text-gray-800","transition-all duration-200","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white",{left:"left-4",center:"left-1/2 -translate-x-1/2",right:"right-4"}[f]),"aria-label":L?"\uC77C\uC2DC\uC815\uC9C0":"\uC7AC\uC0DD",children:L?jsxRuntime.jsx(Qo,{className:"w-4 h-4"}):jsxRuntime.jsx(Ko,{className:"w-4 h-4"})})},Ye=()=>{if(!v||h==="hidden")return null;let L=o||p>0,E=o||p<D-1,A=l("absolute top-1/2 -translate-y-1/2 z-20","w-10 h-10 rounded-full flex items-center justify-center","bg-white/80 hover:bg-white text-gray-800","transition-all duration-200","disabled:opacity-30 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white"),q=h==="outside"?"-left-14":"left-4",j=h==="outside"?"-right-14":"right-4";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:ve,disabled:!L,className:l(A,q),"aria-label":"\uC774\uC804 \uC2AC\uB77C\uC774\uB4DC",children:jsxRuntime.jsx(Xo,{className:"w-5 h-5"})}),jsxRuntime.jsx("button",{onClick:re,disabled:!E,className:l(A,j),"aria-label":"\uB2E4\uC74C \uC2AC\uB77C\uC774\uB4DC",children:jsxRuntime.jsx(Yo,{className:"w-5 h-5"})})]})};return jsxRuntime.jsxs("div",{ref:u,className:l("flex flex-col w-full h-full",h==="outside"&&"px-16",c),style:n,...g,children:[jsxRuntime.jsxs("div",{ref:J,className:"relative overflow-hidden w-full flex-1",onMouseEnter:()=>a&&w(true),onMouseLeave:()=>a&&w(false),onTouchStart:Ge,onTouchMove:_e,onTouchEnd:je,tabIndex:0,role:"region","aria-roledescription":"carousel","aria-label":"\uC774\uBBF8\uC9C0 \uC2AC\uB77C\uC774\uB354",children:[it(),Ye(),Xe(),d.includes("inside")&&Ne()]}),!d.includes("inside")&&Ne()]})});cr.displayName="Carousel";function jo(){let[t,e]=ee.useState(false);return ee.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");e(r.matches);let o=a=>{e(a.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),t}function Xo({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}function Yo({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}function Ko({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})})}function Qo({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})})}var he=ee__default.default.forwardRef(({className:t,value:e,max:r=100,size:o="md",color:a="blue",...s},d)=>{let v={sm:"h-2",md:"h-3",lg:"h-4"},h={blue:"bg-indigo-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500",purple:"bg-purple-500",orange:"bg-orange-500",indigo:"bg-indigo-500",pink:"bg-pink-500",gray:"bg-gray-500"},i=Math.min(Math.max(e/r*100,0),100);return jsxRuntime.jsx("div",{ref:d,className:l("w-full bg-muted rounded-full",v[o],t),...s,children:jsxRuntime.jsx("div",{className:l("h-full rounded-full transition-all duration-300",h[a]||h.blue),style:{width:`${i}%`}})})});he.displayName="EmotionMeter";var Ze=ee__default.default.forwardRef(({className:t,emotion:e,isSelected:r=false,size:o="md",...a},s)=>jsxRuntime.jsx("button",{ref:s,className:l("rounded-full border-2 transition-all duration-200 hover:scale-105 focus:outline-none focus:ring-1 focus:ring-ring",{sm:"w-8 h-8 text-sm",md:"w-12 h-12 text-lg",lg:"w-16 h-16 text-xl"}[o],r?"border-indigo-500 bg-indigo-50 dark:bg-indigo-900/20":"border-border bg-background",t),...a,children:e}));Ze.displayName="EmotionButton";var on=[{key:"joy",label:"\uAE30\uC068",icon:"smile",color:"yellow"},{key:"sadness",label:"\uC2AC\uD514",icon:"frown",color:"blue"},{key:"anger",label:"\uD654\uB0A8",icon:"angry",color:"red"},{key:"calm",label:"\uD3C9\uC628",icon:"heart",color:"green"},{key:"excitement",label:"\uC124\uB818",icon:"star",color:"pink"},{key:"worry",label:"\uAC71\uC815",icon:"meh",color:"gray"},{key:"gratitude",label:"\uAC10\uC0AC",icon:"heart",color:"purple"},{key:"loneliness",label:"\uC678\uB85C\uC6C0",icon:"user",color:"indigo"}],ur=ee__default.default.forwardRef(({className:t,selectedEmotion:e,onEmotionSelect:r,layout:o="grid",showIntensity:a=false,intensity:s=50,onIntensityChange:d,emotions:v=on,size:h="md",variant:i="button",...y},m)=>{let x=n=>{r==null||r(n);},f=n=>{let g=e===n.key;return i==="button"?jsxRuntime.jsx(Ze,{emotion:n.key,isSelected:g,size:h,onClick:()=>x(n.key),className:l("transition-all duration-200",g&&"ring-1 ring-offset-2 ring-primary"),children:n.label},n.key):i==="card"?jsxRuntime.jsx("div",{className:l("p-4 rounded-lg border-2 cursor-pointer transition-all duration-200 hover:shadow-md",g?"border-primary bg-primary/5":"border-border hover:border-primary/50"),onClick:()=>x(n.key),children:jsxRuntime.jsxs("div",{className:"flex items-center space-x-3",children:[jsxRuntime.jsx("div",{className:l("w-8 h-8 rounded-full flex items-center justify-center",g?"bg-primary text-primary-foreground":"bg-muted"),children:n.icon&&jsxRuntime.jsxs("span",{className:"text-lg",children:[n.icon==="smile"&&"\u{1F60A}",n.icon==="frown"&&"\u{1F622}",n.icon==="angry"&&"\u{1F620}",n.icon==="heart"&&"\u2764\uFE0F",n.icon==="star"&&"\u2B50",n.icon==="meh"&&"\u{1F610}",n.icon==="user"&&"\u{1F464}"]})}),jsxRuntime.jsx("span",{className:"font-medium truncate max-w-[120px]",children:n.label})]})},n.key):i==="chip"?jsxRuntime.jsx("div",{className:l("px-3 py-1 rounded-full cursor-pointer transition-all duration-200 text-sm font-medium",g?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"),onClick:()=>x(n.key),children:jsxRuntime.jsx("span",{className:"truncate max-w-[100px]",children:n.label})},n.key):null},c={grid:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 md:gap-3",list:"space-y-2",compact:"flex flex-wrap gap-1"};return jsxRuntime.jsxs("div",{ref:m,className:l("space-y-4",t),...y,children:[jsxRuntime.jsx("div",{className:c[o],children:v.map(f)}),a&&e&&jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4"}),jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[s,"%"]})]}),jsxRuntime.jsx("input",{type:"range",min:"0",max:"100",value:s,onChange:n=>d==null?void 0:d(Number(n.target.value)),className:"w-full h-2 bg-muted rounded-lg appearance-none cursor-pointer slider"}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"\uC57D\uD568"}),jsxRuntime.jsx("span",{children:"\uBCF4\uD1B5"}),jsxRuntime.jsx("span",{children:"\uAC15\uD568"})]})]}),e&&a&&jsxRuntime.jsx("div",{className:"flex justify-center",children:jsxRuntime.jsx(he,{value:s,size:"md",color:"blue"})})]})});ur.displayName="EmotionSelector";var an=classVarianceAuthority.cva("rounded-lg",{variants:{variant:{default:"bg-card text-card-foreground border border-border",outline:"bg-transparent border-2 border-border",elevated:"bg-card text-card-foreground shadow-lg border border-border"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"},padding:{none:"",sm:"p-3",md:"p-4",lg:"p-6"}},defaultVariants:{variant:"default",padding:"none"}}),yt=ee__default.default.forwardRef(({className:t,variant:e="default",shadow:r,padding:o="none",hoverable:a,...s},d)=>jsxRuntime.jsx("div",{ref:d,className:l(an({variant:e,shadow:r,padding:o}),"transition-[transform,box-shadow,border-color] duration-200 ease-out",a&&"hover:-translate-y-0.5 hover:shadow-lg hover:border-primary/30 cursor-pointer active:translate-y-0 active:shadow-md",t),...s}));yt.displayName="Card";var xt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex flex-col space-y-1 p-3",t),...e}));xt.displayName="CardHeader";var wt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("h3",{ref:r,className:l("text-base md:text-lg font-semibold leading-tight tracking-tight",t),...e}));wt.displayName="CardTitle";var Tt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("p",{ref:r,className:l("text-sm text-muted-foreground",t),...e}));Tt.displayName="CardDescription";var Ct=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("px-3 pb-3",t),...e}));Ct.displayName="CardContent";var sn=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex items-center px-3 pb-3",t),...e}));sn.displayName="CardFooter";var cn=classVarianceAuthority.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors duration-200 ease-in-out focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"bg-[var(--badge-default-bg)] text-[var(--badge-default-text)] hover:opacity-80",secondary:"bg-[var(--badge-secondary-bg)] text-[var(--badge-secondary-text)] hover:opacity-80",destructive:"bg-[var(--badge-destructive-bg)] text-slate-50 hover:opacity-80",error:"bg-[var(--badge-destructive-bg)] text-slate-50 hover:opacity-80",outline:"bg-transparent text-[var(--badge-outline-text)] border border-[var(--badge-outline-border)] hover:bg-[var(--badge-outline-hover-bg)]",glass:"bg-[var(--badge-glass-bg)] backdrop-blur-sm border border-[var(--badge-glass-border)] text-[var(--badge-glass-text)] hover:opacity-80"}},defaultVariants:{variant:"default"}}),Se=ee__default.default.memo(ee__default.default.forwardRef(({className:t,variant:e="default",...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l(cn({variant:e}),t),...r})));Se.displayName="Badge";var gr=ee__default.default.forwardRef(({className:t,primaryEmotion:e,emotionDistribution:r=[],keywords:o=[],intensity:a=50,positivity:s=70,energy:d=60,showMeter:v=true,showDistribution:h=true,showKeywords:i=true,showMetrics:y=true,layout:m="detailed",...x},f)=>{let c=u=>u<30?"\uC57D\uD568":u<70?"\uBCF4\uD1B5":"\uAC15\uD568",n=u=>u<30?"\uBD80\uC815\uC801":u<70?"\uC911\uB9BD\uC801":"\uAE0D\uC815\uC801",g=u=>u<30?"\uB0AE\uC74C":u<70?"\uBCF4\uD1B5":"\uB192\uC74C";return m==="compact"?jsxRuntime.jsxs("div",{ref:f,className:l("space-y-3",t),...x,children:[e&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uC8FC\uC694 \uAC10\uC815:"}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.name," (",e.intensity,"%)"]}),v&&jsxRuntime.jsx(he,{value:e.intensity,size:"sm",color:"blue"})]})]}),y&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:c(a)})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAE0D\uC815\uC131:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:n(s)})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uC5D0\uB108\uC9C0:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:g(d)})]})]}),i&&o.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uD0A4\uC6CC\uB4DC:"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:o.map(u=>jsxRuntime.jsx(Se,{variant:"secondary",className:"text-xs",children:u},u))})]})]}):m==="card"?jsxRuntime.jsxs(yt,{ref:f,className:l("",t),...x,children:[jsxRuntime.jsxs(xt,{children:[jsxRuntime.jsxs(wt,{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"text-2xl mr-2",children:"\u2728"}),"AI \uBD84\uC11D"]}),jsxRuntime.jsx(Tt,{children:"\uAC10\uC815 \uBD84\uC11D \uACB0\uACFC"})]}),jsxRuntime.jsxs(Ct,{className:"space-y-4",children:[e&&jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uC8FC\uC694 \uAC10\uC815:"}),jsxRuntime.jsxs("span",{className:"ml-2 text-muted-foreground",children:[e.name," (",e.intensity,"%)"]})]}),v&&jsxRuntime.jsx("div",{className:"flex justify-center",children:jsxRuntime.jsx(he,{value:e.intensity,size:"md",color:"blue"})})]}),y&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uAC10\uC815 \uAC15\uB3C4:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:c(a)})]}),jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uAE0D\uC815\uC131:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:n(s)})]}),jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uC5D0\uB108\uC9C0:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:g(d)})]})]}),i&&o.length>0&&jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uD0A4\uC6CC\uB4DC:"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:o.map(u=>jsxRuntime.jsx(Se,{variant:"secondary",className:"text-xs",children:u},u))})]})]})]}):jsxRuntime.jsxs("div",{ref:f,className:l("space-y-6",t),...x,children:[e&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uC8FC\uC694 \uAC10\uC815"}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-4",children:[jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("div",{className:"text-2xl font-bold text-primary",children:e.name}),jsxRuntime.jsxs("div",{className:"text-sm text-muted-foreground",children:[e.intensity,"% \uAC15\uB3C4"]})]}),v&&jsxRuntime.jsx(he,{value:e.intensity,size:"lg",color:"blue"})]})]}),h&&r.length>0&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uAC10\uC815 \uBD84\uD3EC"}),jsxRuntime.jsx("div",{className:"space-y-3",children:r.map((u,C)=>jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:u.emotion}),jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[u.percentage,"%"]})]}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:`${u.color} h-2 rounded-full transition-all duration-300`,style:{width:`${u.percentage}%`}})})]},C))})]}),y&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uBD84\uC11D \uC9C0\uD45C"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-primary",children:c(a)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${a}%`}})})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uAE0D\uC815\uC131"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-green-600",children:n(s)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-green-500 h-2 rounded-full transition-all duration-300",style:{width:`${s}%`}})})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uC5D0\uB108\uC9C0"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-orange-600",children:g(d)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-orange-500 h-2 rounded-full transition-all duration-300",style:{width:`${d}%`}})})]})]})]}),i&&o.length>0&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uAC10\uC815 \uD0A4\uC6CC\uB4DC"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(u=>jsxRuntime.jsx(Se,{variant:"outline",className:"text-sm",children:u},u))})]})]})});gr.displayName="EmotionAnalysis";function kt(t){return t.toLowerCase().replace(/[^a-z0-9가-힣ぁ-んァ-ン一-龯_.~\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").trim()}function pn(t){return !t||t.length===0||t.length>200?false:/^[a-z0-9가-힣ぁ-んァ-ン一-龯_.~-]+$/.test(t)}function Et(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9가-힣ぁ-んァ-ン一-龯_.~-]/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}var fn={pageTitle:"\uC0C8 \uAE00 \uC791\uC131",editTitle:"\uAE00 \uC218\uC815",preview:"\uBBF8\uB9AC\uBCF4\uAE30",editMode:"\uD3B8\uC9D1",basicInfo:"\uAE30\uBCF8 \uC815\uBCF4",slug:"\uC2AC\uB7EC\uADF8",slugPrefix:"/blog/",tags:"\uD0DC\uADF8",tagsPlaceholder:"\uAC1C\uBC1C, \uC77C\uC0C1, \uC5C5\uB370\uC774\uD2B8",coverImage:"\uCEE4\uBC84 \uC774\uBBF8\uC9C0 URL",coverImagePlaceholder:"https://example.com/image.jpg",publishDate:"\uBC1C\uD589 \uC608\uC57D\uC77C\uC2DC",publishDateHint:"\uBE44\uC6CC\uB450\uBA74 \uC989\uC2DC \uBC1C\uD589\uB428",expiresAt:"\uB9CC\uB8CC \uC77C\uC2DC",expiresAtHint:"\uBE44\uC6CC\uB450\uBA74 \uB9CC\uB8CC\uB418\uC9C0 \uC54A\uC74C",titleLabel:"\uC81C\uBAA9",titlePlaceholder:"\uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694",excerpt:"\uC694\uC57D",excerptPlaceholder:"\uCE74\uB4DC\uC5D0 \uD45C\uC2DC\uB420 \uC9E7\uC740 \uC694\uC57D",contentLabel:"\uBCF8\uBB38",contentPlaceholder:"\uB9C8\uD06C\uB2E4\uC6B4\uC73C\uB85C \uC791\uC131\uD558\uC138\uC694...",cancel:"\uCDE8\uC18C",saveDraft:"\uC784\uC2DC\uC800\uC7A5",publish:"\uBC1C\uD589",update:"\uC218\uC815 \uC644\uB8CC",saving:"\uC800\uC7A5 \uC911...",translateHint:"AI \uBC88\uC5ED \uAE30\uB2A5",translateButton:"AI \uBC88\uC5ED",translating:"\uBC88\uC5ED \uC911...",translateSuccess:"\uBC88\uC5ED \uC644\uB8CC!",requiredFields:"\uD544\uC218 \uD544\uB4DC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694",saveError:"\uC800\uC7A5 \uC911 \uC624\uB958 \uBC1C\uC0DD",translateError:"\uBC88\uC5ED \uC911 \uC624\uB958 \uBC1C\uC0DD",noTitle:"\uC81C\uBAA9 \uC5C6\uC74C",bold:"\uAD75\uAC8C",italic:"\uAE30\uC6B8\uC784",strikethrough:"\uCDE8\uC18C\uC120",heading:"\uC81C\uBAA9",link:"\uB9C1\uD06C",image:"\uC774\uBBF8\uC9C0",code:"\uCF54\uB4DC",codeBlock:"\uCF54\uB4DC\uBE14\uB85D",quote:"\uC778\uC6A9\uBB38",list:"\uBAA9\uB85D",orderedList:"\uC21C\uC11C \uBAA9\uB85D",horizontalRule:"\uC218\uD3C9\uC120"},hn={enableSlug:true,enableTags:true,enableCoverImage:true,enablePublishDate:true,enableExcerpt:true,enableTranslation:true,enablePreview:true,enableMarkdownToolbar:true,enableAutoSave:true,enableExpiresAt:false},bn=[{key:"ko",label:"\uD55C\uAD6D\uC5B4",isPrimary:true,flag:"\u{1F1F0}\u{1F1F7}"},{key:"en",label:"English",flag:"\u{1F1FA}\u{1F1F8}"},{key:"ja",label:"\u65E5\u672C\u8A9E",flag:"\u{1F1EF}\u{1F1F5}"}];function Mt(t){let e={};return t.forEach(r=>{e[r.key]="";}),e}function vn(t,e){var r,o,a,s,d,v,h,i;return {slug:(r=e==null?void 0:e.slug)!=null?r:"",title:(o=e==null?void 0:e.title)!=null?o:Mt(t),excerpt:(a=e==null?void 0:e.excerpt)!=null?a:Mt(t),content:(s=e==null?void 0:e.content)!=null?s:Mt(t),tags:(d=e==null?void 0:e.tags)!=null?d:[],coverImage:(v=e==null?void 0:e.coverImage)!=null?v:"",publishedAt:(h=e==null?void 0:e.publishedAt)!=null?h:null,expiresAt:(i=e==null?void 0:e.expiresAt)!=null?i:null}}var br=ee.createContext(null);function U(){let t=ee.useContext(br);if(!t)throw new Error("useBlogEditor must be used within a BlogEditorProvider");return t}function Nt({children:t,initialData:e,isEditMode:r=false,languages:o=bn,defaultLanguage:a,labels:s,callbacks:d,features:v,variant:h="default",autoSaveKey:i,autoSaveInterval:y=3e3}){var Ne,Xe,Ye,L;let m=(L=(Ye=(Ne=o.find(E=>E.isPrimary))==null?void 0:Ne.key)!=null?Ye:(Xe=o[0])==null?void 0:Xe.key)!=null?L:"ko",x=a!=null?a:m,f=ee.useMemo(()=>({...fn,...s}),[s]),c=ee.useMemo(()=>({...hn,...v}),[v]),[n,g]=ee.useState(()=>vn(o,e)),[u,C]=ee.useState(x),[p,b]=ee.useState(false),[k,w]=ee.useState(false),[N,B]=ee.useState(false),[M,R]=ee.useState(false),[T,I]=ee.useState(null),[V,z]=ee.useState(false),[$,Z]=ee.useState(r||!!(e!=null&&e.slug)),[J,D]=ee.useState("idle"),te=ee.useRef(null),ne=ee.useRef(true),W=i||(r?null:"blog-editor-draft");ee.useEffect(()=>{if(!(!c.enableAutoSave||!W||r))try{let E=localStorage.getItem(W);if(E){let A=JSON.parse(E);g(A);}}catch{}},[]),ee.useEffect(()=>{if(!(!c.enableAutoSave||!W)){if(ne.current){ne.current=false;return}return te.current&&clearTimeout(te.current),D("saving"),te.current=setTimeout(()=>{try{localStorage.setItem(W,JSON.stringify(n)),D("saved"),setTimeout(()=>D("idle"),2e3);}catch{D("idle");}},y),()=>{te.current&&clearTimeout(te.current);}}},[n,c.enableAutoSave,W,y]);let re=ee.useCallback(()=>{if(W)try{localStorage.removeItem(W);}catch{}},[W]),ve=ee.useCallback((E,A)=>{g(q=>({...q,[E]:A}));},[]),We=ee.useCallback((E,A,q)=>{g(j=>({...j,[E]:{...j[E],[A]:q}}));},[]),at=ee.useCallback(E=>kt(E),[]),st=ee.useCallback(async E=>{let A=n.title[m],q=n.content[m];if(!A||!q){I(f.requiredFields);return}if(c.enableSlug&&!n.slug){I(f.requiredFields);return}w(true),I(null);try{await d.onSave(n,E),re();}catch{I(f.saveError);}finally{w(false);}},[n,m,f,c,d,re]),Ge=ee.useCallback(async()=>{if(!d.onTranslate)return;let E=n.title[m],A=n.content[m],q=n.excerpt[m];if(!E||!A){I(f.requiredFields);return}B(true),I(null),z(false);try{let j=await d.onTranslate({sourceLanguage:m,title:E,content:A,excerpt:q||void 0});g(oe=>{let K={...oe.title},ie={...oe.content},Ft={...oe.excerpt};return Object.keys(j).forEach(Re=>{if(Re!==m){let lt=j[Re];if(typeof lt=="object"&<!==null){let Ce=lt;Ce.title&&(K[Re]=Ce.title),Ce.content&&(ie[Re]=Ce.content),Ce.excerpt&&(Ft[Re]=Ce.excerpt);}}}),{...oe,title:K,content:ie,excerpt:Ft}}),z(!0),setTimeout(()=>z(!1),3e3);}catch{I(f.translateError);}finally{B(false);}},[n,m,f,d]),_e=ee.useCallback(async E=>{if(!d.onUploadImage)return null;R(true),I(null);try{return await d.onUploadImage(E)}catch{return I("\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC \uC2E4\uD328"),null}finally{R(false);}},[d]),je=ee.useCallback(()=>{var E;(E=d.onCancel)==null||E.call(d);},[d]),it=ee.useMemo(()=>({formData:n,activeLanguage:u,showPreview:p,submitting:k,translating:N,uploading:M,error:T,translateSuccess:V,autoSaveStatus:J,languages:o,features:c,labels:f,variant:h,isEditMode:r,setActiveLanguage:C,setShowPreview:b,updateField:ve,updateMultilingualField:We,handleSave:st,handleTranslate:Ge,handleUploadImage:_e,handleCancel:je,setError:I,generateSlug:at,slugManuallyEdited:$,setSlugManuallyEdited:Z}),[n,u,p,k,N,M,T,V,J,o,c,f,h,r,ve,We,st,Ge,_e,je,at,$,Z]);return jsxRuntime.jsx(br.Provider,{value:it,children:t})}var kr={home:ssr.House,arrowLeft:ssr.ArrowLeft,arrowRight:ssr.ArrowRight,arrowUp:ssr.ArrowUp,arrowDown:ssr.ArrowDown,menu:ssr.List,close:ssr.X,search:ssr.MagnifyingGlass,settings:ssr.Gear,externalLink:ssr.ArrowSquareOut,chevronLeft:ssr.CaretLeft,chevronRight:ssr.CaretRight,chevronDown:ssr.CaretDown,chevronUp:ssr.CaretUp,edit:ssr.Pencil,delete:ssr.Trash,add:ssr.Plus,remove:ssr.Minus,download:ssr.Download,upload:ssr.Upload,refresh:ssr.ArrowClockwise,save:ssr.FloppyDisk,copy:ssr.Copy,loader:ssr.SpinnerGap,success:ssr.CheckCircle,error:ssr.XCircle,alertCircle:ssr.WarningCircle,warning:ssr.WarningCircle,info:ssr.Info,check:ssr.Check,circle:ssr.Circle,helpCircle:ssr.Question,user:ssr.User,users:ssr.Users,userPlus:ssr.UserPlus,logIn:ssr.SignIn,logOut:ssr.SignOut,eye:ssr.Eye,eyeOff:ssr.EyeSlash,chart:ssr.ChartBar,barChart:ssr.ChartBar,trendingUp:ssr.TrendUp,activity:ssr.Pulse,database:ssr.Database,zap:ssr.Lightning,fileText:ssr.FileText,file:ssr.File,folder:ssr.Folder,book:ssr.Book,bookOpen:ssr.BookOpen,mail:ssr.Envelope,message:ssr.ChatCircle,phone:ssr.Phone,image:ssr.Image,video:ssr.Video,camera:ssr.Camera,smile:ssr.Smiley,frown:ssr.SmileySad,meh:ssr.SmileyMeh,lock:ssr.Lock,unlock:ssr.LockOpen,shield:ssr.Shield,wallet:ssr.Wallet,key:ssr.Key,clock:ssr.Clock,calendar:ssr.Calendar,calendarPlus:ssr.CalendarPlus,bell:ssr.Bell,heart:ssr.Heart,star:ssr.Star,bookmark:ssr.Bookmark,share:ssr.Share,monitor:ssr.Monitor,sun:ssr.Sun,moon:ssr.Moon,lightbulb:ssr.Lightbulb,brain:ssr.Brain,flag:ssr.Flag,square:ssr.Square,sparkle:ssr.Sparkle,sparkles:ssr.Sparkle,globe:ssr.Globe,smartphone:ssr.DeviceMobile,deviceMobile:ssr.DeviceMobile,floppyDisk:ssr.FloppyDisk,ticket:ssr.Ticket,clipboard:ssr.Clipboard,wifi:ssr.WifiHigh,wifiOff:ssr.WifiSlash,cpu:ssr.Cpu,mask:ssr.MaskHappy,bold:ssr.TextB,italic:ssr.TextItalic,strikethrough:ssr.TextStrikethrough,heading:ssr.TextHOne,link:ssr.Link,code:ssr.Code,fileCode:ssr.FileCode,quote:ssr.Quotes,list:ssr.List,listOrdered:ssr.ListNumbers,minus:ssr.Minus},Er={happy:"smile",sad:"frown",neutral:"meh",excited:"smile",angry:"frown",love:"heart",like:"heart",dislike:"frown"},Pr={loading:"loader",success:"success",error:"error",warning:"warning",info:"info",locked:"lock",unlocked:"unlock",visible:"eye",hidden:"eyeOff"};function Mr(t){return !t||!/[-_]/.test(t)&&/^[a-z]/.test(t)?t:/^[A-Z]+$/.test(t)?t.toLowerCase():/^[A-Z]/.test(t)&&!/[-_]/.test(t)?t.charAt(0).toLowerCase()+t.slice(1):t.split(/[-_]/).map((e,r)=>r===0?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")}var G=null,_=null;var Nr={home:{lucide:"Home",phosphor:"House",iconsax:"Home2"},"layout-dashboard":{lucide:"LayoutDashboard",phosphor:"SquaresFour"},folder:{lucide:"Folder",phosphor:"Folder",iconsax:"Folder"},"alert-circle":{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Danger"},alertCircle:{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Danger"},columns:{lucide:"Columns",phosphor:"Columns"},users:{lucide:"Users",phosphor:"Users",iconsax:"People"},settings:{lucide:"Settings",phosphor:"Gear"},menu:{lucide:"Menu",phosphor:"List",iconsax:"Menu"},close:{lucide:"X",phosphor:"X",iconsax:"CloseCircle"},chevronLeft:{lucide:"ChevronLeft",phosphor:"CaretLeft",iconsax:"ArrowLeft2"},chevronRight:{lucide:"ChevronRight",phosphor:"CaretRight",iconsax:"ArrowRight2"},chevronDown:{lucide:"ChevronDown",phosphor:"CaretDown",iconsax:"ArrowDown2"},chevronUp:{lucide:"ChevronUp",phosphor:"CaretUp",iconsax:"ArrowUp2"},arrowLeft:{lucide:"ArrowLeft",phosphor:"ArrowLeft",iconsax:"ArrowLeft"},arrowRight:{lucide:"ArrowRight",phosphor:"ArrowRight",iconsax:"ArrowRight"},arrowUp:{lucide:"ArrowUp",phosphor:"ArrowUp",iconsax:"ArrowUp"},arrowDown:{lucide:"ArrowDown",phosphor:"ArrowDown",iconsax:"ArrowDown"},add:{lucide:"Plus",phosphor:"Plus",iconsax:"Add"},edit:{lucide:"Edit",phosphor:"Pencil"},pencil:{lucide:"Pencil",phosphor:"Pencil"},delete:{lucide:"Trash2",phosphor:"Trash",iconsax:"Trash"},trash:{lucide:"Trash2",phosphor:"Trash",iconsax:"Trash"},upload:{lucide:"Upload",phosphor:"Upload",iconsax:"Upload"},download:{lucide:"Download",phosphor:"Download",iconsax:"Download"},x:{lucide:"X",phosphor:"X"},check:{lucide:"Check",phosphor:"Check",iconsax:"Check"},search:{lucide:"Search",phosphor:"MagnifyingGlass",iconsax:"SearchNormal"},share:{lucide:"Share",phosphor:"Share"},copy:{lucide:"Copy",phosphor:"Copy"},save:{lucide:"Save",phosphor:"FloppyDisk"},loader:{lucide:"Loader2",phosphor:"Spinner"},loader2:{lucide:"Loader2",phosphor:"Spinner"},"check-circle":{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},checkCircle:{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},success:{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},error:{lucide:"XCircle",phosphor:"XCircle",iconsax:"CloseCircle"},warning:{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Warning2"},info:{lucide:"Info",phosphor:"Info",iconsax:"InfoCircle"},refresh:{lucide:"RefreshCw",phosphor:"ArrowClockwise",iconsax:"Refresh"},refreshCw:{lucide:"RefreshCw",phosphor:"ArrowClockwise",iconsax:"Refresh"},bell:{lucide:"Bell",phosphor:"Bell",iconsax:"Bell"},heart:{lucide:"Heart",phosphor:"Heart",iconsax:"Heart"},star:{lucide:"Star",phosphor:"Star",iconsax:"Star"},bookmark:{lucide:"Bookmark",phosphor:"Bookmark"},user:{lucide:"User",phosphor:"User",iconsax:"User"},userPlus:{lucide:"UserPlus",phosphor:"UserPlus",iconsax:"UserAdd"},logIn:{lucide:"LogIn",phosphor:"SignIn",iconsax:"Login"},logOut:{lucide:"LogOut",phosphor:"SignOut",iconsax:"Logout"},chrome:{lucide:"Chrome",phosphor:"ChromeLogo",iconsax:"Chrome"},github:{lucide:"Github",phosphor:"GithubLogo"},message:{lucide:"MessageCircle",phosphor:"ChatCircle"},messageSquare:{lucide:"MessageSquare",phosphor:"ChatSquare"},"message-square":{lucide:"MessageSquare",phosphor:"ChatSquare"},inbox:{lucide:"Inbox",phosphor:"Inbox"},calendar:{lucide:"Calendar",phosphor:"Calendar"},calendarPlus:{lucide:"CalendarPlus",phosphor:"CalendarPlus"},checkSquare:{lucide:"CheckSquare",phosphor:"CheckSquare",iconsax:"TickSquare"},clock:{lucide:"Clock",phosphor:"Clock"},book:{lucide:"Book",phosphor:"Book",iconsax:"Book"},bookOpen:{lucide:"BookOpen",phosphor:"BookOpen",iconsax:"Book"},monitor:{lucide:"Monitor",phosphor:"Monitor",iconsax:"Monitor"},sun:{lucide:"Sun",phosphor:"Sun",iconsax:"Sun"},moon:{lucide:"Moon",phosphor:"Moon",iconsax:"Moon"},sparkle:{lucide:"Sparkle",phosphor:"Sparkle"},sparkles:{lucide:"Sparkles",phosphor:"Sparkle"},lightbulb:{lucide:"Lightbulb",phosphor:"Lightbulb"},brain:{lucide:"Brain",phosphor:"Brain"},zap:{lucide:"Zap",phosphor:"Lightning"},globe:{lucide:"Globe",phosphor:"Globe",iconsax:"Global"},deviceMobile:{lucide:"Smartphone",phosphor:"DeviceMobile"},smartphone:{lucide:"Smartphone",phosphor:"DeviceMobile"},floppyDisk:{lucide:"Save",phosphor:"FloppyDisk"},chart:{lucide:"BarChart3",phosphor:"ChartBar"},barChart:{lucide:"BarChart",phosphor:"ChartBar"},trendingUp:{lucide:"TrendingUp",phosphor:"TrendUp"},trendingDown:{lucide:"TrendingDown",phosphor:"TrendDown"},activity:{lucide:"Activity",phosphor:"Pulse"},database:{lucide:"Database",phosphor:"Database"},dollarSign:{lucide:"DollarSign",phosphor:"CurrencyDollar"},dollar:{lucide:"DollarSign",phosphor:"CurrencyDollar"},currency:{lucide:"DollarSign",phosphor:"CurrencyDollar"},layers:{lucide:"Layers",phosphor:"Stack"},ban:{lucide:"Ban",phosphor:"Prohibit"},lock:{lucide:"Lock",phosphor:"Lock",iconsax:"Lock"},unlock:{lucide:"Unlock",phosphor:"LockOpen",iconsax:"Unlock"},shield:{lucide:"Shield",phosphor:"Shield",iconsax:"Shield"},key:{lucide:"Key",phosphor:"Key"},play:{lucide:"Play",phosphor:"Play",iconsax:"Play"},pause:{lucide:"Pause",phosphor:"Pause",iconsax:"Pause"},image:{lucide:"Image",phosphor:"Image",iconsax:"Image"},video:{lucide:"Video",phosphor:"Video",iconsax:"Video"},camera:{lucide:"Camera",phosphor:"Camera",iconsax:"Camera"},fileText:{lucide:"FileText",phosphor:"FileText"},file:{lucide:"File",phosphor:"File"},externalLink:{lucide:"ExternalLink",phosphor:"ArrowSquareOut"},link:{lucide:"Link",phosphor:"Link",iconsax:"Link"},moreHorizontal:{lucide:"MoreHorizontal",phosphor:"DotsThreeOutline"},moreVertical:{lucide:"MoreVertical",phosphor:"DotsThreeVertical"},remove:{lucide:"Minus",phosphor:"Minus",iconsax:"Minus"},eye:{lucide:"Eye",phosphor:"Eye",iconsax:"Eye"},eyeOff:{lucide:"EyeOff",phosphor:"EyeSlash",iconsax:"EyeSlash"},smile:{lucide:"Smile",phosphor:"Smiley",iconsax:"EmojiHappy"},frown:{lucide:"Frown",phosphor:"SmileySad",iconsax:"EmojiSad"},meh:{lucide:"Meh",phosphor:"SmileyMeh",iconsax:"EmojiNormal"},mail:{lucide:"Mail",phosphor:"Envelope"},phone:{lucide:"Phone",phosphor:"Phone"},flag:{lucide:"Flag",phosphor:"Flag",iconsax:"Flag"},rocket:{lucide:"Rocket",phosphor:"Rocket",iconsax:"Rocket"},ticket:{lucide:"Ticket",phosphor:"Ticket",iconsax:"Ticket"},clipboard:{lucide:"ClipboardList",phosphor:"Clipboard",iconsax:"Sticker"},wifi:{lucide:"Wifi",phosphor:"WifiHigh",iconsax:"Wifi"},wifiOff:{lucide:"WifiOff",phosphor:"WifiSlash"},cpu:{lucide:"Cpu",phosphor:"Cpu",iconsax:"Computing"},mask:{lucide:"Drama",phosphor:"MaskHappy",iconsax:"EmojiHappy"},bold:{lucide:"Bold",phosphor:"TextB"},italic:{lucide:"Italic",phosphor:"TextItalic"},strikethrough:{lucide:"Strikethrough",phosphor:"TextStrikethrough"},heading:{lucide:"Heading",phosphor:"TextHOne"},code:{lucide:"Code",phosphor:"Code",iconsax:"Code"},fileCode:{lucide:"FileCode",phosphor:"FileCode"},quote:{lucide:"Quote",phosphor:"Quotes",iconsax:"QuoteUp"},list:{lucide:"List",phosphor:"List"},listOrdered:{lucide:"ListOrdered",phosphor:"ListNumbers"},minus:{lucide:"Minus",phosphor:"Minus",iconsax:"Minus"}};async function Rr(){if(typeof window=="undefined")return null;if(!G)try{G=await import('@phosphor-icons/react');}catch{return console.warn("Phosphor Icons not available. Install @phosphor-icons/react to use."),null}return G}async function Lr(){if(typeof window=="undefined")return null;if(!_)try{_=await import('lucide-react');}catch{return console.warn("Lucide Icons not available. Install lucide-react to use lucide provider."),null}return _}function et(t,e="phosphor"){let r=Nr[t];if(!r)return rs(t,e);let o=r[e];switch(e){case "phosphor":return !o||!G?null:(G==null?void 0:G[o])||null;case "lucide":return !o||!_?null:(_==null?void 0:_[o])||null;case "iconsax":{return null;}default:return null}}function rs(t,e){switch(e){case "phosphor":{if(!G)return null;let r=t.charAt(0).toUpperCase()+t.slice(1),o=t.split(/(?=[A-Z])/).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join("");return (G==null?void 0:G[r])||(G==null?void 0:G[o])||(G==null?void 0:G[t])||null}case "lucide":{if(!_)return null;let r=t.charAt(0).toUpperCase()+t.slice(1),o=t.replace(/([A-Z])/g,a=>a===t[0]?a.toLowerCase():a);return (_==null?void 0:_[r])||(_==null?void 0:_[t])||(_==null?void 0:_[o])||null}case "iconsax":{return null;}default:return null}}function Sr(t,e){let r=Nr[t];if(r){let o=r[e];if(o)return o}return t}var Lt={"arrow-left":"arrowLeft","arrow-right":"arrowRight","arrow-up":"arrowUp","arrow-down":"arrowDown","chevron-left":"chevronLeft","chevron-right":"chevronRight","chevron-up":"chevronUp","chevron-down":"chevronDown","external-link":"externalLink","more-horizontal":"moreHorizontal","more-vertical":"moreVertical","user-plus":"userPlus","log-in":"logIn","log-out":"logOut","check-circle":"checkCircle","check-square":"checkSquare","alert-circle":"alertCircle","eye-off":"eyeOff","file-text":"fileText","book-open":"bookOpen","bar-chart":"barChart","trending-up":"trendingUp","trending-down":"trendingDown","message-square":"messageSquare","calendar-plus":"calendarPlus","refresh-cw":"refreshCw","dollar-sign":"dollarSign","layout-dashboard":"layoutDashboard","device-mobile":"deviceMobile","floppy-disk":"floppyDisk",back:"arrowLeft",prev:"arrowLeft",previous:"arrowLeft",forward:"arrowRight",next:"arrowRight",close:"x",cancel:"x",remove:"delete",trash:"delete",plus:"add",new:"add",pencil:"edit",modify:"edit",store:"save",floppy:"save",magnify:"search",person:"user",account:"user",profile:"user",gear:"settings",config:"settings",preferences:"settings",house:"home",main:"home",done:"check",complete:"check",tick:"check",information:"info",help:"info",alert:"warning",caution:"warning",checkmark:"success",checkCircle:"success",fail:"error",cross:"error",xCircle:"error",spinner:"loader",loading:"loader",wait:"loader",reload:"refresh",update:"refresh",sync:"refresh",show:"eye",view:"eye",hide:"eyeOff",hidden:"eyeOff",secure:"lock",locked:"lock",unsecure:"unlock",unlocked:"unlock",get:"download",fetch:"download",post:"upload",send:"share",export:"share",duplicate:"copy",clone:"copy",email:"mail",envelope:"mail",chat:"message",comment:"message",talk:"message",date:"calendar",schedule:"calendar",time:"clock",watch:"clock",document:"fileText",doc:"fileText",text:"fileText",directory:"folder",dir:"folder",picture:"image",img:"image",movie:"video",film:"video",photo:"camera",capture:"camera",start:"play",run:"play",stop:"pause",halt:"pause",like:"heart",love:"heart",favorite:"star",saveBookmark:"bookmark",notification:"bell",notify:"bell",alarm:"bell",prefs:"settings",lookup:"search",dots:"moreHorizontal",moreMenu:"moreHorizontal",moreOptions:"moreVertical",external:"externalLink",outbound:"externalLink",open:"externalLink",url:"link",hyperlink:"link",graph:"barChart",stats:"barChart",analytics:"barChart",db:"database",storage:"database",pulse:"activity",monitor:"activity",up:"trendingUp",down:"trendingDown",lightning:"zap",bolt:"zap",flash:"zap",security:"shield",protect:"shield",password:"key",secret:"key",signin:"logIn",login:"logIn",enter:"logIn",signout:"logOut",logout:"logOut",exit:"logOut",people:"users",group:"users",team:"users",addUser:"userPlus",invite:"userPlus",read:"book",library:"book",reading:"bookOpen",openBook:"bookOpen",light:"sun",day:"sun",dark:"moon",night:"moon",screen:"monitor",display:"monitor",ai:"brain",intelligence:"brain",think:"brain",idea:"lightbulb",bulb:"lightbulb",inspiration:"lightbulb",magic:"sparkles",stars:"sparkles",glitter:"sparkles"};function Ir(t){if(!t||typeof t!="string")return {normalized:t||"",wasAlias:false};let e=Mr(t),r=Lt[t]||Lt[e];return r?{normalized:r,wasAlias:true,originalAlias:t}:{normalized:e,wasAlias:false}}var Br={set:"lucide",weight:"regular",size:20,color:"currentColor",strokeWidth:1.25,iconsaxVariant:"line"};var as=ee.createContext(Br);function Ar(){return ee.useContext(as)}var Hr=ee__default.default.forwardRef(({name:t,size:e,className:r,emotion:o,status:a,provider:s,weight:d,animated:v=false,pulse:h=false,spin:i=false,bounce:y=false,variant:m="default","aria-label":x,"aria-hidden":f},c)=>{var D,te;let n=Ar(),g=s||n.set,u=e!=null?e:n.size,C=d||n.weight,p=n.color,b=(D=n.strokeWidth)!=null?D:1.25,k=(te=n.iconsaxVariant)!=null?te:"line",[w,N]=ee__default.default.useState(false),[B,M]=ee__default.default.useState(false);ee__default.default.useEffect(()=>{N(true),g==="lucide"?Lr().then(()=>M(true)):g==="phosphor"?Rr().then(()=>M(true)):M(true);},[g]);let R=ee__default.default.useMemo(()=>{let ne=o?Er[o]:a?Pr[a]:t,{normalized:W}=Ir(ne),re=Sr(W,g);return {normalized:W,providerName:re}},[t,o,a,g]),T=R.normalized,I=ee__default.default.useMemo(()=>{return null},[g,R.providerName,w,k]),V=ct({"text-current":m==="default","text-primary":m==="primary","text-muted-foreground":m==="secondary"||m==="muted","text-green-600 dark:text-green-400":m==="success","text-yellow-600 dark:text-yellow-400":m==="warning","text-destructive":m==="error"});if(!w)return jsxRuntime.jsx("span",{style:{width:u,height:u},className:l(V,r),"aria-hidden":f!==void 0?f:true,"aria-label":x});let z=null;if(g==="phosphor"?(z=kr[T]||null,!z&&B&&(z=et(T,g))):g==="iconsax"?(z=I,z||(z=et(T,g))):z=et(T,g),!z)return g==="iconsax"&&true?process.env.NODE_ENV==="development"&&console.warn(`Icon "${T}" \u2014 iconsax resolver not registered. Use HuaProvider with icons.set='iconsax', or add: import '@hua-labs/ui/iconsax'`):console.warn(`Icon "${T}" not found for provider "${g}"`),jsxRuntime.jsx("span",{ref:c,className:l("inline-flex items-center justify-center rounded-full border-2 border-dashed border-border",V,r),style:{width:u,height:u},"aria-label":x||`\uC544\uC774\uCF58\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: ${T}`,title:`Icon not found: ${T}`,children:jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground","aria-hidden":"true",children:"?"})});let $={size:typeof u=="number"?u:void 0,width:u,height:u,color:p};g==="phosphor"?$.weight=C:$.strokeWidth=b;let Z=ct({"animate-pulse":h,"animate-spin":i,"animate-bounce":y,"transition-all duration-200 ease-in-out":v}),J={};return x?(J["aria-label"]=x,J["aria-hidden"]=false):f!==void 0?J["aria-hidden"]=f:J["aria-hidden"]=true,jsxRuntime.jsx("span",{ref:c,className:l("inline-flex items-center justify-center",Z,V,r),style:{width:u,height:u},...J,children:z&&ee__default.default.createElement(z,{...$,className:V,"aria-hidden":true})})});Hr.displayName="Icon";var ss=ee__default.default.memo(Hr,(t,e)=>t.name===e.name&&t.size===e.size&&t.className===e.className&&t.emotion===e.emotion&&t.status===e.status&&t.provider===e.provider&&t.animated===e.animated&&t.pulse===e.pulse&&t.spin===e.spin&&t.bounce===e.bounce&&t.variant===e.variant&&t.weight===e.weight&&t["aria-label"]===e["aria-label"]&&t["aria-hidden"]===e["aria-hidden"]),H=ss;H.displayName="Icon";var $r=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"smile",...t}));$r.displayName="EmotionIcon";var Dr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"info",...t}));Dr.displayName="StatusIcon";var zr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"loader",status:"loading",spin:true,"aria-label":"\uB85C\uB529 \uC911",...t}));zr.displayName="LoadingIcon";var Fr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"check",status:"success",variant:"success","aria-label":"\uC131\uACF5",...t}));Fr.displayName="SuccessIcon";var Or=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"alertCircle",status:"error",variant:"error","aria-label":"\uC624\uB958",...t}));Or.displayName="ErrorIcon";var Be=ee__default.default.forwardRef(({onBack:t,backLink:e,className:r},o)=>{let{labels:a,isEditMode:s,formData:d}=U();return jsxRuntime.jsx("header",{ref:o,className:l("flex items-center justify-between mb-8",r),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[e||t&&jsxRuntime.jsx("button",{type:"button",onClick:t,className:"p-2 text-muted-foreground hover:text-foreground transition-colors","aria-label":"\uB4A4\uB85C\uAC00\uAE30",children:jsxRuntime.jsx(H,{name:"chevronLeft",size:24})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold text-foreground",children:s?a.editTitle:a.pageTitle}),s&&d.slug&&jsxRuntime.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.slugPrefix,d.slug]})]})]})})});Be.displayName="BlogEditorHeader";var Ae=ee__default.default.forwardRef(({className:t},e)=>{var b,k;let{formData:r,updateField:o,features:a,labels:s,variant:d,handleUploadImage:v,uploading:h,setSlugManuallyEdited:i}=U(),[y,m]=ee.useState(""),x=ee.useRef(null),f=l("rounded-xl p-6 space-y-4",d==="glass"?"bg-white/10 backdrop-blur-sm border border-white/20 dark:bg-background/20 dark:border-border/50":d==="minimal"?"bg-transparent":"bg-background",t),c="w-full px-3 py-2 border border-border rounded-lg bg-background text-foreground focus:ring-1 focus:ring-ring focus:border-transparent transition-colors",n="block text-sm font-medium text-foreground mb-1",g=ee.useCallback(w=>{let N=w.trim();N&&!r.tags.includes(N)&&o("tags",[...r.tags,N]),m("");},[r.tags,o]),u=ee.useCallback(w=>{o("tags",r.tags.filter(N=>N!==w));},[r.tags,o]),C=ee.useCallback(w=>{let N=w.target.value;if(N.includes(",")){let B=N.split(",");B.forEach((M,R)=>{R<B.length-1?g(M):m(M);});}else m(N);},[g]),p=ee.useCallback(w=>{w.key==="Enter"?(w.preventDefault(),g(y)):w.key==="Backspace"&&!y&&r.tags.length>0&&u(r.tags[r.tags.length-1]);},[y,r.tags,g,u]);return jsxRuntime.jsxs("div",{ref:e,className:f,children:[jsxRuntime.jsx("h2",{className:"font-semibold text-foreground",children:s.basicInfo}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.enableSlug&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:n,children:[s.slug," *"]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"text-muted-foreground mr-1 text-sm",children:s.slugPrefix}),jsxRuntime.jsx("input",{type:"text",value:r.slug,onChange:w=>{o("slug",Et(w.target.value)),i(true);},className:l(c,"flex-1"),placeholder:"my-post-slug"})]})]}),a.enableTags&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.tags}),jsxRuntime.jsxs("div",{className:l("flex flex-wrap items-center gap-2 min-h-[42px] px-3 py-2 border border-border rounded-lg bg-background focus-within:ring-1 focus-within:ring-ring focus-within:border-transparent transition-colors"),children:[r.tags.map(w=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-primary/10 text-primary text-sm rounded-md",children:[w,jsxRuntime.jsx("button",{type:"button",onClick:()=>u(w),className:"hover:text-primary transition-colors","aria-label":`${w} \uD0DC\uADF8 \uC0AD\uC81C`,children:jsxRuntime.jsx(H,{name:"x",size:14})})]},w)),jsxRuntime.jsx("input",{type:"text",value:y,onChange:C,onKeyDown:p,className:"flex-1 min-w-[100px] bg-transparent outline-none text-foreground text-sm",placeholder:r.tags.length===0?s.tagsPlaceholder:"\uD0DC\uADF8 \uCD94\uAC00..."})]}),jsxRuntime.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"\uC27C\uD45C(,) \uB610\uB294 Enter\uB85C \uD0DC\uADF8 \uCD94\uAC00"})]})]}),a.enableCoverImage&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.coverImage}),jsxRuntime.jsxs("div",{className:"space-y-3",children:[r.coverImage&&jsxRuntime.jsxs("div",{className:"relative w-full h-40 rounded-lg overflow-hidden bg-muted",children:[jsxRuntime.jsx("img",{src:r.coverImage,alt:"\uCEE4\uBC84 \uC774\uBBF8\uC9C0 \uBBF8\uB9AC\uBCF4\uAE30",className:"w-full h-full object-cover"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>o("coverImage",""),className:"absolute top-2 right-2 p-1.5 bg-red-500 text-white rounded-full hover:bg-red-600 transition-colors","aria-label":"\uC774\uBBF8\uC9C0 \uC0AD\uC81C",children:jsxRuntime.jsx(H,{name:"x",size:14})})]}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("input",{type:"text",value:r.coverImage,onChange:w=>o("coverImage",w.target.value),className:l(c,"flex-1"),placeholder:s.coverImagePlaceholder}),jsxRuntime.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:async w=>{var B;let N=(B=w.target.files)==null?void 0:B[0];if(N){let M=await v(N);M&&o("coverImage",M);}w.target.value="";}}),jsxRuntime.jsx("button",{type:"button",onClick:()=>{var w;return (w=x.current)==null?void 0:w.click()},disabled:h,className:"px-3 py-2 border border-border rounded-lg hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC",children:h?jsxRuntime.jsx(H,{name:"loader",size:20,spin:true}):jsxRuntime.jsx(H,{name:"upload",size:20})})]})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.enablePublishDate&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.publishDate}),jsxRuntime.jsx("input",{type:"datetime-local",value:(b=r.publishedAt)!=null?b:"",onChange:w=>o("publishedAt",w.target.value||null),className:c}),jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:s.publishDateHint})]}),a.enableExpiresAt&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.expiresAt}),jsxRuntime.jsx("input",{type:"datetime-local",value:(k=r.expiresAt)!=null?k:"",onChange:w=>o("expiresAt",w.target.value||null),className:c}),jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:s.expiresAtHint})]})]})]})});Ae.displayName="BlogEditorMetadata";var He=ee__default.default.forwardRef(({className:t},e)=>{let{languages:r,activeLanguage:o,setActiveLanguage:a,showPreview:s,setShowPreview:d,features:v,labels:h}=U();return jsxRuntime.jsxs("div",{ref:e,className:l("flex items-center border-b border-border sticky top-0 z-10 bg-background",t),role:"tablist","aria-label":"\uC5B8\uC5B4 \uC120\uD0DD",children:[jsxRuntime.jsx("div",{className:"flex flex-1",children:r.map(i=>{let y=o===i.key,m=i.isPrimary;return jsxRuntime.jsxs("button",{type:"button",role:"tab","aria-selected":y,"aria-controls":`tabpanel-${i.key}`,id:`tab-${i.key}`,onClick:()=>a(i.key),className:l("flex-1 px-4 py-3 text-sm font-medium transition-colors",y?"bg-primary/10 text-primary border-b-2 border-primary":"text-muted-foreground hover:bg-muted"),children:[i.flag&&jsxRuntime.jsx("span",{className:"mr-1.5",children:i.flag}),i.label,m&&" *"]},i.key)})}),v.enablePreview&&jsxRuntime.jsxs("button",{type:"button",onClick:()=>d(!s),className:"inline-flex items-center gap-1.5 px-3 py-2 mx-2 text-sm border border-border rounded-lg hover:bg-muted transition-colors shrink-0",children:[jsxRuntime.jsx(H,{name:s?"pencil":"eye",size:14}),s?h.editMode:h.preview]})]})});He.displayName="BlogEditorLanguageTabs";var ze=ee__default.default.forwardRef(({className:t,textareaRef:e},r)=>{var p;let{formData:o,activeLanguage:a,updateMultilingualField:s,updateField:d,features:v,labels:h,languages:i,generateSlug:y,isEditMode:m,slugManuallyEdited:x}=U(),f=((p=i.find(b=>b.isPrimary))==null?void 0:p.key)===a,c=i.find(b=>b.key===a),n="w-full px-3 py-2 border border-border rounded-lg bg-background text-foreground focus:ring-1 focus:ring-ring focus:border-transparent transition-colors",g="block text-sm font-medium text-foreground mb-1",u=b=>{s("title",a,b),a==="en"&&!m&&!x&&d("slug",y(b));},C=b=>f?`${b} *`:`${b} (${(c==null?void 0:c.label)||a})`;return jsxRuntime.jsxs("div",{ref:r,className:l("p-6 space-y-4",t),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:g,children:C(h.titleLabel)}),jsxRuntime.jsx("input",{type:"text",value:o.title[a]||"",onChange:b=>u(b.target.value),className:n,placeholder:h.titlePlaceholder})]}),v.enableExcerpt&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:g,children:C(h.excerpt)}),jsxRuntime.jsx("textarea",{value:o.excerpt[a]||"",onChange:b=>s("excerpt",a,b.target.value),rows:2,className:l(n,"resize-none"),placeholder:h.excerptPlaceholder})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:g,children:[C(h.contentLabel)," (\uB9C8\uD06C\uB2E4\uC6B4)"]}),jsxRuntime.jsx("textarea",{ref:e,value:o.content[a]||"",onChange:b=>s("content",a,b.target.value),rows:15,className:l(n,"font-mono text-sm resize-y min-h-[300px]"),placeholder:h.contentPlaceholder})]})]})});ze.displayName="BlogEditorContent";function ms(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function At(t){if(!t)return "";let e=t;return e=e.replace(/```(\w*)\n?([\s\S]*?)```/g,(r,o,a)=>`<pre class="bg-gray-100 dark:bg-gray-800 rounded-lg p-4 overflow-x-auto my-4"><code class="text-sm">${ms(a.trim())}</code></pre>`),e=e.replace(/`([^`]+)`/g,'<code class="bg-gray-100 dark:bg-gray-700 px-1.5 py-0.5 rounded text-sm">$1</code>'),e=e.replace(/^######\s+(.+)$/gm,'<h6 class="text-base font-semibold mt-4 mb-2">$1</h6>'),e=e.replace(/^#####\s+(.+)$/gm,'<h5 class="text-lg font-semibold mt-4 mb-2">$1</h5>'),e=e.replace(/^####\s+(.+)$/gm,'<h4 class="text-xl font-semibold mt-5 mb-2">$1</h4>'),e=e.replace(/^###\s+(.+)$/gm,'<h3 class="text-2xl font-semibold mt-5 mb-3">$1</h3>'),e=e.replace(/^##\s+(.+)$/gm,'<h2 class="text-2xl font-bold mt-6 mb-3">$1</h2>'),e=e.replace(/^#\s+(.+)$/gm,'<h1 class="text-3xl font-bold mt-6 mb-4">$1</h1>'),e=e.replace(/^---+$/gm,'<hr class="my-6 border-gray-300 dark:border-gray-600" />'),e=e.replace(/^>\s+(.+)$/gm,'<blockquote class="border-l-4 border-gray-300 dark:border-gray-600 pl-4 my-4 italic text-gray-600 dark:text-gray-400">$1</blockquote>'),e=e.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),e=e.replace(/\*(.+?)\*/g,"<em>$1</em>"),e=e.replace(/~~(.+?)~~/g,'<del class="text-gray-500">$1</del>'),e=e.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" class="text-cyan-600 hover:text-cyan-700 dark:text-cyan-400 dark:hover:text-cyan-300 underline" target="_blank" rel="noopener noreferrer">$1</a>'),e=e.replace(/^[-*]\s+(.+)$/gm,'<li class="ml-4">$1</li>'),e=e.replace(/(<li[^>]*>.*<\/li>\n?)+/g,r=>`<ul class="list-disc list-inside my-4 space-y-1">${r}</ul>`),e=e.replace(/\n(?!<)/g,`<br />
|
|
76
76
|
`),e=e.replace(/(<br \/>[\n\s]*){3,}/g,`<br /><br />
|
|
77
77
|
`),e}function qr(t){return t?t.replace(/```[\s\S]*?```/g,"").replace(/`[^`]+`/g,"").replace(/^#{1,6}\s+/gm,"").replace(/\*\*(.+?)\*\*/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/^[-*]\s+/gm,"").replace(/^>\s+/gm,"").replace(/^---+$/gm,"").replace(/\n{3,}/g,`
|
|
78
78
|
|