PageSourceSearch

https://www.ceomagazine.co.kr/_next/static/chunks/2886.72686b1ce5d1d3b5.js

js ceomagazine.co.kr collected 2026-10-02 19:42:53 UTC 36,780 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2886],{62886:function(e,l,t){t.r(l),t.d(l,{CheckboxComponent:function(){return F},DateComponent:function(){return _},DateTimeComponent:function(){return E},DividerComponent:function(){return I},EmailFieldComponent:function(){return b},FORM_FIELD_COMPONENTS:function(){return L},FORM_FIELD_DEFAULTS:function(){return B},FORM_FIELD_GROUPS:function(){return W},FileComponent:function(){return q},FormAccessibilityUtils:function(){return $},FormDataUtils:function(){return J},FormFieldError:function(){return d},FormFieldHelp:function(){return s},FormFieldLabel:function(){return o},FormFieldRenderer:function(){return P},FormRenderer:function(){return X},FormStorageUtils:function(){return Y},FormStyleUtils:function(){return Z},FormValidationUtils:function(){return K},HeadingComponent:function(){return D},HiddenFieldComponent:function(){return k},NumberFieldComponent:function(){return S},ParagraphComponent:function(){return O},PasswordFieldComponent:function(){return C},RadioComponent:function(){return A},SelectComponent:function(){return z},TelFieldComponent:function(){return j},TextFieldComponent:function(){return y},TextareaComponent:function(){return w},TimeComponent:function(){return T},UrlFieldComponent:function(){return N},getFieldContainerClassName:function(){return c},getFieldContainerStyle:function(){return m},getInputClassName:function(){return u},getInputStyle:function(){return h},validateField:function(){return f}});var r=t(57437),a=t(2265),n=t(54003),i=t(96281);let o=e=>{var l,t,a,n;let{field:i,required:o}=e;return(null===(l=i.style)||void 0===l?void 0:l.labelPosition)!=="hidden"&&i.label?(0,r.jsxs)("label",{htmlFor:i.id,className:"form-label",style:{color:null===(t=i.style)||void 0===t?void 0:t.textColor,fontSize:null===(a=i.style)||void 0===a?void 0:a.fontSize,fontWeight:null===(n=i.style)||void 0===n?void 0:n.fontWeight},children:[i.label,(o||i.required)&&(0,r.jsx)("span",{className:"form-label__required",children:"*"})]}):null},s=e=>{let{helpText:l}=e;return l?(0,r.jsx)("p",{className:"form-help-text",children:l}):null},d=e=>{let{errors:l}=e;return l&&0!==l.length?(0,r.jsx)("div",{className:"form-error-group",children:l.map((e,l)=>(0,r.jsx)("p",{className:"form-error-text",children:e},l))}):null},u=function(e){var l;let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=["form-input"];switch(t&&r.push("form-input--error"),e.disabled&&r.push("form-input--disabled"),e.readonly&&r.push("form-input--readonly"),null===(l=e.style)||void 0===l?void 0:l.size){case"small":r.push("form-input--small");break;case"large":r.push("form-input--large")}return r.join(" ")},c=e=>"form-field",m=e=>{var l,t,r,a,n;let i={};return(null===(l=e.style)||void 0===l?void 0:l.backgroundColor)&&(i.backgroundColor=e.style.backgroundColor),(null===(t=e.style)||void 0===t?void 0:t.padding)&&(i.padding=e.style.padding),(null===(r=e.style)||void 0===r?void 0:r.margin)&&(i.margin=e.style.margin),(null===(a=e.style)||void 0===a?void 0:a.borderRadius)&&(i.borderRadius=e.style.borderRadius),(null===(n=e.style)||void 0===n?void 0:n.width)&&(i.width=e.style.width),i},h=e=>{var l,t,r,a,n,i;let o={};return(null===(l=e.style)||void 0===l?void 0:l.textColor)&&(o.color=e.style.textColor),(null===(t=e.style)||void 0===t?void 0:t.fontSize)&&(o.fontSize=e.style.fontSize),(null===(r=e.style)||void 0===r?void 0:r.fontWeight)&&(o.fontWeight=e.style.fontWeight),(null===(a=e.style)||void 0===a?void 0:a.textAlign)&&(o.textAlign=e.style.textAlign),(null===(n=e.style)||void 0===n?void 0:n.borderColor)&&(o.borderColor=e.style.borderColor),(null===(i=e.style)||void 0===i?void 0:i.borderRadius)&&(o.borderRadius=e.style.borderRadius),o},p=(e,l)=>{let t=e;for(let[e,r]of Object.entries(l))t=t.replace(RegExp("\\{\\{".concat(e,"\\}\\}"),"g"),String(r));return t},f=(e,l,t)=>{var r,a,n;let o=[],s=e.label||e.name;return e.validation&&(e.required&&(!l||"string"==typeof l&&""===l.trim())&&o.push(t?p(t.required,{field:s}):"".concat(s,"은(는) 필수 항목입니다.")),!Array.isArray(e.validation)&&e.validation.minLength&&"string"==typeof l&&l.length<e.validation.minLength&&o.push(t?p(t.minLength,{field:s,min:e.validation.minLength}):"".concat(s,"은(는) 최소 ").concat(e.validation.minLength,"자 이상이어야 합니다.")),!Array.isArray(e.validation)&&e.validation.maxLength&&"string"==typeof l&&l.length>e.validation.maxLength&&o.push(t?p(t.maxLength,{field:s,max:e.validation.maxLength}):"".concat(s,"은(는) 최대 ").concat(e.validation.maxLength,"자까지 입력 가능합니다.")),Array.isArray(e.validation)||!e.validation.pattern||"string"!=typeof l||!l||"tel"===e.type&&(null===(r=e.countryCode)||void 0===r?void 0:r.enabled)||new RegExp(e.validation.pattern).test(l)||o.push(t?p(t.pattern,{field:s}):"".concat(s,"의 형식이 올바르지 않습니다.")),!Array.isArray(e.validation)&&void 0!==e.validation.min&&"number"==typeof l&&l<e.validation.min&&o.push(t?p(t.min,{field:s,min:e.validation.min}):"".concat(s,"은(는) ").concat(e.validation.min," 이상이어야 합니다.")),!Array.isArray(e.validation)&&void 0!==e.validation.max&&"number"==typeof l&&l>e.validation.max&&o.push(t?p(t.max,{field:s,max:e.validation.max}):"".concat(s,"은(는) ").concat(e.validation.max," 이하여야 합니다.")),"tel"===e.type&&(null===(a=e.countryCode)||void 0===a?void 0:a.enabled)&&l&&!(0,i.yf)(l)&&o.push(null!==(n=null==t?void 0:t.invali
1dPhone)&&void 0!==n?n:"올바른 전화번호 형식이 아닙니다.")),o},v=new Map,g=a.forwardRef((e,l)=>(0,r.jsx)("input",{...e,ref:l}));g.displayName="PhoneCustomInput";let x=e=>{let l={};for(let t in e)try{let r=(0,i.Gg)(t);l[t]="".concat(e[t]," (+").concat(r,")")}catch(r){l[t]=e[t]}return l},y=e=>{let{field:l,value:t="",onChange:a,onBlur:n,error:i,disabled:p,preview:f=!1,className:v=""}=e,g=i&&i.length>0;return(0,r.jsxs)("div",{className:"".concat(c(l)," ").concat(v),style:m(l),children:[(0,r.jsx)(o,{field:l}),(0,r.jsx)("input",{id:l.id,type:l.type,name:l.name,value:t,onChange:e=>null==a?void 0:a(e.target.value),onBlur:n,placeholder:l.placeholder||"",disabled:p||l.disabled,readOnly:l.readonly,required:l.required,pattern:l.pattern,min:l.min,max:l.max,step:l.step,className:u(l,g),style:h(l)}),(0,r.jsx)(s,{helpText:l.helpText||""}),(0,r.jsx)(d,{errors:i})]})},b=e=>(0,r.jsx)(y,{...e}),j=e=>{var l,t,n,u,h;let{field:p,value:f="",onChange:b,onBlur:j,error:C,disabled:N,className:S="",locale:k="en"}=e,w=C&&C.length>0,z=(null==k?void 0:null===(l=k.split("-"))||void 0===l?void 0:l[0])||"en",[A,F]=(0,a.useState)({}),_=null==k?void 0:null===(n=k.split("-"))||void 0===n?void 0:null===(t=n[1])||void 0===t?void 0:t.toUpperCase();return((0,a.useEffect)(()=>{let e=async()=>{let e="".concat(z,"-with-code");if(v.has(e)){F(v.get(e));return}try{let l=await fetch("/api/locales/phone/".concat(z));if(!l.ok)throw Error("Failed to fetch locale: ".concat(z));let t=await l.json(),r=x(t);v.set(e,r),F(r)}catch(l){console.warn("Could not load locale for react-phone-number-input: ".concat(z,". Falling back to 'en'."));let e="en-with-code";if(v.has(e)){F(v.get(e));return}try{let l=await fetch("/api/locales/phone/en"),t=await l.json(),r=x(t);v.set(e,r),F(r)}catch(e){console.error("Could not load fallback english locale.",e)}}};z&&e()},[z]),null===(u=p.countryCode)||void 0===u?void 0:u.enabled)?(0,r.jsxs)("div",{className:"".concat(c(p)," ").concat(S),style:m(p),children:[(0,r.jsx)(o,{field:p}),(0,r.jsx)(i.ZP,{id:p.id,name:p.name,value:f,onChange:e=>null==b?void 0:b(e),onBlur:j,placeholder:p.placeholder,disabled:N||p.disabled,readOnly:p.readonly,required:p.required,defaultCountry:_||(null===(h=p.countryCode)||void 0===h?void 0:h.defaultCountry),labels:A,international:!0,inputComponent:g,className:"phone-input-wrapper ".concat(w?"phone-input-error":""),withCountryCallingCode:!0}),(0,r.jsx)(s,{helpText:p.helpText}),(0,r.jsx)(d,{errors:C})]}):(0,r.jsx)(y,{field:p,value:f,onChange:b,onBlur:j,error:C,disabled:N,className:S})},C=e=>(0,r.jsx)(y,{...e}),N=e=>(0,r.jsx)(y,{...e}),S=e=>{let{field:l,value:t="",onChange:a,onBlur:n,error:i,disabled:p,preview:f=!1,className:v=""}=e,g=i&&i.length>0;return(0,r.jsxs)("div",{className:"".concat(c(l)," ").concat(v),style:m(l),children:[(0,r.jsx)(o,{field:l}),(0,r.jsx)("input",{id:l.id,type:"number",name:l.name,value:t,onChange:e=>{let l=""===e.target.value?"":Number(e.target.value);null==a||a(l)},onBlur:n,placeholder:l.placeholder,disabled:p||l.disabled,readOnly:l.readonly,required:l.required,min:l.min,max:l.max,step:l.step||1,className:u(l,g),style:h(l)}),(0,r.jsx)(s,{helpText:l.helpText}),(0,r.jsx)(d,{errors:i})]})}
1,k=e=>{let{field:l,value:t="",onChange:a}=e;return(0,r.jsx)("input",{id:l.id,type:"hidden",name:l.name,value:t,onChange:e=>null==a?void 0:a(e.target.value)})},w=e=>{let{field:l,value:t="",onChange:a,onBlur:n,error:i,disabled:u,preview:p=!1,className:f=""}=e,v=i&&i.length>0;return(0,r.jsxs)("div",{className:"".concat(c(l)," ").concat(f),style:m(l),children:[(0,r.jsx)(o,{field:l}),(0,r.jsx)("textarea",{id:l.id,name:l.name,value:t,onChange:e=>null==a?void 0:a(e.target.value),onBlur:n,placeholder:l.placeholder,disabled:u||l.disabled,readOnly:l.readonly,required:l.required,rows:l.rows||4,cols:l.cols,className:(()=>{var e;let t=["form-textarea"];switch(v&&t.push("form-textarea--error"),l.disabled&&t.push("form-textarea--disabled"),l.readonly&&t.push("form-textarea--readonly"),null===(e=l.style)||void 0===e?void 0:e.size){case"small":t.push("form-textarea--small");break;case"large":t.push("form-textarea--large")}return t.join(" ")})(),style:h(l)}),(0,r.jsx)(s,{helpText:l.helpText}),(0,r.jsx)(d,{errors:i})]})},z=e=>{var l,t;let{field:a,value:n="",onChange:i,onBlur:u,error:p,disabled:f,preview:v=!1,className:g="",translatedUI:x}=e,y=p&&p.length>0;return(0,r.jsxs)("div",{className:"".concat(c(a)," ").concat(g),style:m(a),children:[(0,r.jsx)(o,{field:a}),(0,r.jsxs)("select",{id:a.id,name:a.name,value:n,onChange:e=>{if(a.multiple){let l=Array.from(e.target.selectedOptions,e=>e.value);null==i||i(l)}else null==i||i(e.target.value)},onBlur:u,disabled:f||a.disabled,required:a.required,multiple:a.multiple,className:(()=>{var e;let l=["form-select"];switch(y&&l.push("form-select--error"),a.disabled&&l.push("form-select--disabled"),a.readonly&&l.push("form-select--readonly"),null===(e=a.style)||void 0===e?void 0:e.size){case"small":l.push("form-select--small");break;case"large":l.push("form-select--large")}return l.join(" ")})(),style:h(a),children:[!a.required&&!a.multiple&&(0,r.jsx)("option",{value:"",children:a.placeholder||(null==x?void 0:null===(l=x.defaultPlaceholders)||void 0===l?void 0:l.select)||"선택해주세요"}),null===(t=a.options)||void 0===t?void 0:t.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,r.jsx)(s,{helpText:a.helpText}),(0,r.jsx)(d,{errors:p})]})},A=e=>{var l;let{field:t,value:a="",onChange:n,onBlur:i,error:u,disabled:h,preview:p=!1,className:f=""}=e;return u&&u.length,(0,r.jsxs)("div",{className:"".concat(c(t)," ").concat(f),style:m(t),children:[(0,r.jsx)(o,{field:t}),(0,r.jsx)("div",{className:"form-options-group",children:null===(l=t.options)||void 0===l?void 0:l.map(e=>{var l,o;return(0,r.jsxs)("label",{className:"form-option-label",children:[(0,r.jsx)("input",{type:"radio",name:t.name,value:e.value,checked:a===e.value,onChange:e=>null==n?void 0:n(e.target.value),onBlur:i,disabled:h||t.disabled,required:t.required,className:"form-option-radio"}),(0,r.jsx)("span",{className:"form-option-text",style:{color:null===(l=t.style)||void 0===l?void 0:l.textColor,fontSize:null===(o=t.style)||void 0===o?void 0:o.fontSize},children:e.label})]},e.value)})}),(0,r.jsx)(s,{helpText:t.helpText}),(0,r.jsx)(d,{errors:u})]})},F=e=>{let{field:l,value:t=!1,onChange:a,onBlur:n,error:i,disabled:u,preview:h=!1,className:p=""}=e;if(i&&i.length,!l.options||0===l.options.length){var f,v;return(0,r.jsxs)("div",{className:"".concat(c(l)," ").concat(p),style:m(l),children:[(0,r.jsxs)("label",{className:"form-option-label",children:[(0,r.jsx)("input",{type:"checkbox",id:l.id,name:l.name,checked:!!t,onChange:e=>null==a?void 0:a(e.target.checked),onBlur:n,disabled:u||l.disabled,required:l.required,className:"form-option-checkbox"}),(0,r.jsx)("span",{className:"form-option-text",style:{color:null===(f=l.style)||void 0===f?void 0:f.textColor,fontSize:null===(v=l.style)||void 0===v?void 0:v.fontSize},children:l.label})]}),(0,r.jsx)(s,{helpText:l.helpText}),(0,r.jsx)(d,{errors:i})]})}let g=Array.isArray(t)?t:[],x=(e,l)=>{let t=[...g];l?t.includes(e)||t.push(e):t=t.filter(l=>l!==e),null==a||a(t)};return(0,r.jsxs)("div",{className:"".concat(c(l)," ").concat(p),style:m(l),children:[(0,r.jsx)(o,{field:l}),(0,r.jsx)("div",{className:"form-options-group",children:l.options.map(e=>{var t,a;return(0,r.jsxs)("label",{className:"form-option-label",children:[(0,r.jsx)("input",{type:"checkbox",name:l.name,value:e.value,checked:g.includes(e.value),onChange:l=>x(e.value,l.target.checked),onBlur:n,disabled:u||l.disabled,className:"form-option-checkbox"}),(0,r.jsx)("span",{className:"form-option-text",style:{color:null===(t=l.style)||void 0===t?void 0:t.textColor,fontSize:null===(a=l.style)||void 0===a?void 0:a.fontSize},children:e.label})]},e.value)})}),(0,r.jsx)(s,{helpText:l.helpText}),(0,r.jsx)(d,{errors:i})]})},_=e=>{let{field:l,value:t="",onChange:a,onBlur:n,error:i,disabled:p,preview:f=!1,className:v=""}=e,g=i&&i.length>0;return(0,r.jsxs)("div",{className:"".concat(c(l)," ").concat(v),style:m(l),children:[(0,r.jsx)(o,{field:l}),(0,r.jsx)("input",{id:l.id,type:"date",name:l.name,value:t,onChange:e=>null==a?void 0:a(e.target.value),onBlur:n,disabled:p||l.disabled,readOnly:l.readonly,required:l.required,min:l.min,max:l.max,className:u(l,g),style:h(l)}),(0,r.jsx)(s,{helpText:l.helpText}),(0,r.jsx)(d,{errors:i})]})},T=e=>{let{field:l,value:t="",onChange:a,onBlur:n,error:i,disabled:p,preview:f=!1,className:v=""}=e,g=i&&i.length>0;return(0,r.jsxs)("div",{className:"".concat(c(l)," ").concat(v),style:m(l),children:[(0,r.jsx)(o,{field:l}),(0,r.jsx)("input",{id:l.id,type:"time",name:l.name,value:t,onChange:e=>null==a?void 0:a(e.target.value),onBlur:n,disabled:p||l.disabled,readOnly:l.readonly,required:l.required,min:l.min,max:l.max,step:l.step,className:u(l,g),style:h(l)}),(0,r.jsx)(s,{helpText:l.helpText}),(0,r.jsx)(d,{errors:i})]})},E=e=>{let{field:l,value:t="",onChange:a,onBlur:n,error:i,disabled:p,preview:f=!1,className:v=""}=e,g=i&&i.length>0;return(0,r.jsxs)("div",{className:"".concat(c(l)," ").concat(v),style:m(l),children:[(0,r.jsx)(o,{field:l}),(0,r.jsx)("input",{id:l.id,type:"datetime-local",name:l.name,value:t,onChange:e=>null==a?void 0:a(e.target.value),onBlur:n,disabled:p||l.disabled,readOnly:l.readonly,required:l.required,min:l.min,max:l.max,step:l.step,className:u(l,g),style:h(l)}),(0,r.jsx)(s,{helpText:l.helpText}),(0,r.jsx)(d,{errors:i})]})};function R(e){if(0===e)return"0 Bytes";let l=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,l)).toFixed(2))+" "+["Bytes","KB","MB","GB"][l]}let q=e=>{var l,t,i,u;let{field:h,value:p=null,onChange:f,onBlur:v,error:g,disabled:x,preview:y=!1,className:b="",translatedUI:j}=e,{multiple:C,accept:N,maxFileSize:S}=function(e){var l,t,r,a;let n=null!==(l=e.settings)&&void 0!==l?l:{},i=Array.isArray(n.allowedTypes),o=i?n.allowedTypes.filter(e=>"string"==typeof e&&""!==e.trim()):[];return{multiple:null!==(r=null!==(t=n.multiple)&&void 0!==t?t:e.multiple)&&void 0!==r&&r,accept:i?o.join(",")||void 0:e.accept,maxFileSize:null!==(a=n.maxSize)&&void 0!==a?a:e.maxFileSize}}(h),{selectionErrors:k,selectFiles:w,clearErrors:z}=function(e){let{multiple:l,accept:t,maxFileSize:r,translatedUI:i,value:o,onChange:s}=e,[d,u]=(0,a.useState)([]),c=e=>r&&e.size>r?(null==i?void 0:i.fileSizeExceeded)?i.fileSizeExceeded.replace("{{maxSize}}",R(r)):"파일 크기가 ".concat(R(r),"를 초과합니다."):!t||t.split(",").map(e=>e.trim()).some(l=>l.startsWith(".")?e.name.toLowerCase().endsWith(l.toLowerCase()):l.includes("*")?new RegExp(l.replace("*",".*")).test(e.type):e.type===l)?null:(null==i?void 0:i.fileTypeNotAllowed)?i.fileTypeNotAllowed.replace("{{accept}}",t):"허용되지 않는 파일 형식입니다. (허용: ".concat(t,")");return{selectionErrors:d,selectFiles:e=>{var t;let r=l&&Array.isArray(o)?o.filter(e=>e instanceof File):[];if(!e||0===e.length){u([]),0===r.length&&(null==s||s(l?[]:null));return}let a=[],i=[];
1Array.from(e).forEach(e=>{let l=c(e);l?i.push("".concat(e.name,": ").concat(l)):a.push(e)});let d=l?[...r,...a.filter(e=>!r.some(l=>l.name===e.name&&l.size===e.size&&l.lastModified===e.lastModified))]:a.slice(0,1),m=d.reduce((e,l)=>e+l.size,0);if(m>n.D){u([...i,"선택한 파일 합계가 ".concat(R(m),"입니다. ")+"첨부 합계 ".concat(R(n.D)," 이하로 다시 선택해주세요.")]),0===r.length&&(null==s||s(l?[]:null));return}u(i),null==s||s(l?d:null!==(t=d[0])&&void 0!==t?t:null)},clearErrors:()=>u([])}}({multiple:C,accept:N,maxFileSize:S,translatedUI:j,value:p,onChange:f}),A=g&&g.length>0||k.length>0,F=(0,a.useRef)(null),[_,T]=(0,a.useState)(!1),E=(0,a.useCallback)(e=>{e.preventDefault(),T(!0)},[]),q=(0,a.useCallback)(e=>{e.preventDefault(),T(!1)},[]),I=C?Array.isArray(p)&&p.length>0:!!p,D=e=>{if(z(),C&&Array.isArray(p)){let l=[...p];void 0!==e?l.splice(e,1):l.length=0,null==f||f(l)}else null==f||f(null)};return(0,r.jsxs)("div",{className:"".concat(c(h)," ").concat(b),style:m(h),children:[(0,r.jsx)(o,{field:h}),(0,r.jsxs)("div",{className:(()=>{let e=["form-dropzone"];return _?e.push("form-dropzone--dragover"):A&&e.push("form-dropzone--error"),(x||h.disabled)&&e.push("form-dropzone--disabled"),e.join(" ")})(),onDragOver:E,onDragLeave:q,onDrop:e=>{e.preventDefault(),T(!1),w(e.dataTransfer.files)},onClick:()=>{var e;return!x&&!h.disabled&&(null===(e=F.current)||void 0===e?void 0:e.click())},children:[(0,r.jsx)("input",{ref:F,id:h.id,type:"file",name:h.name,onChange:e=>{w(e.target.files),e.target.value=""},onBlur:v,disabled:x||h.disabled,required:h.required&&!I,multiple:C,accept:N,className:"form-file-hidden"}),(0,r.jsxs)("div",{className:"form-dropzone__content",children:[(0,r.jsx)("div",{className:"form-dropzone__icon",children:(0,r.jsx)("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"form-dropzone__text",children:h.placeholder||(null==j?void 0:null===(l=j.defaultPlaceholders)||void 0===l?void 0:l.file)||"파일을 드래그하거나 클릭하여 선택하세요"}),N&&(0,r.jsxs)("p",{className:"form-dropzone__hint",children:[null!==(t=null==j?void 0:j.allowedFormats)&&void 0!==t?t:"허용 형식:"," ",N]}),S&&(0,r.jsxs)("p",{className:"form-dropzone__meta",children:[null!==(i=null==j?void 0:j.maxSize)&&void 0!==i?i:"최대 크기:"," ",R(S)]}),C&&(0,r.jsxs)("p",{className:"form-dropzone__meta",children:[null!==(u=null==j?void 0:j.multipleFiles)&&void 0!==u?u:"여러 파일 선택 가능"," (합계 ".concat(R(n.D),"까지)")]})]})]})]}),(()=>{if(!p)return null;if(C&&Array.isArray(p))return(0,r.jsx)("div",{className:"form-file-list",children:p.map((e,l)=>{var t;return(0,r.jsxs)("div",{className:"form-file-item",children:[(0,r.jsxs)("div",{className:"form-file-item__info",children:[(0,r.jsx)("p",{className:"form-file-item__name",children:e.name}),(0,r.jsx)("p",{className:"form-file-item__size",children:R(e.size)})]}),(0,r.jsx)("button",{type:"button",onClick:()=>D(l),className:"form-file-item__remove",disabled:x,children:null!==(t=null==j?void 0:j.delete)&&void 0!==t?t:"삭제"})]},l)})});if(p instanceof File){var e;return(0,r.jsx)("div",{className:"form-file-single",children:(0,r.jsxs)("div",{className:"form-file-item",children:[(0,r.jsxs)("div",{className:"form-file-item__info",children:[(0,r.jsx)("p",{className:"form-file-item__name",children:p.name}),(0,r.jsx)("p",{className:"form-file-item__size",children:R(p.size)})]}),(0,r.jsx)("button",{type:"button",onClick:()=>D(),className:"form-file-item__remove",disabled:x,children:null!==(e=null==j?void 0:j.delete)&&void 0!==e?e:"삭제"})]})})}return null})(),(0,r.jsx)(s,{helpText:h.helpText}),(0,r.jsx)(d,{errors:[...null!=g?g:[],...k]})]})},I=e=>{var l,t;let{field:a,className:n=""}=e;return(0,r.jsx)("div",{className:"".concat(c(a)," ").concat(n),style:m(a),children:(0,r.jsx)("hr",{className:"form-divider",style:{borderColor:null===(l=a.style)||void 0===l?void 0:l.borderColor,margin:null===(t=a.style)||void 0===t?void 0:t.margin}})})},D=e=>{let{field:l,className:t=""}=e,a=()=>2,n="h".concat(a());return(0,r.jsx)("div",{className:"".concat(c(l)," ").concat(t),style:m(l),children:(0,r.jsx)(n,{className:(()=>{var e;let t=a(),r=["form-heading"];switch(t){case 1:r.push("form-heading--h1");break;case 2:r.push("form-heading--h2");break;case 3:r.push("form-heading--h3");break;case 4:r.push("form-heading--h4");break;case 5:r.push("form-heading--h5");break;case 6:r.push("form-heading--h6")}switch(null===(e=l.style)||void 0===e?void 0:e.textAlign){case"center":r.push("form-heading--center");break;case"right":r.push("form-heading--right");break;default:r.push("form-heading--left")}return r.join(" ")})(),style:(()=>{var e,t,r,a;let n={};return(null===(e=l.style)||void 0===e?void 0:e.textColor)&&(n.color=l.style.textColor),(null===(t=l.style)||void 0===t?void 0:t.fontSize)&&(n.fontSize=l.style.fontSize),(null===(r=l.style)||void 0===r?void 0:r.fontWeight)&&(n.fontWeight=l.style.fontWeight),(null===(a=l.style)||void 0===a?void 0:a.margin)&&(n.margin=l.style.margin),n})(),children:l.content||l.label||"제목"})})},O=e=>{let{field:l,className:t=""}=e,a=()=>{var e,t;let r=["form-paragraph"];switch(null===(e=l.style)||void 0===e?void 0:e.size){case"small":r.push("form-paragraph--small");break;case"large":r.push("form-paragraph--large");break;default:r.push("form-paragraph--base")}switch(null===(t=l.style)||void 0===t?void 0:t.textAlign){case"center":r.push("form-paragraph--center");break;case"right":r.push("form-paragraph--right");break;default:r.push("form-paragraph--left")}return r.join(" ")},n=()=>{var e,t,r,a;let n={};return(null===(e=l.style)||void 0===e?void 0:e.textColor)&&(n.color=l.style.textColor),(null===(t=l.style)||void 0===t?void 0:t.fontSize)&&(n.fontSize=l.style.fontSize),(null===(r=l.style)||void 0===r?void 0:r.fontWeight)&&(n.fontWeight=l.style.fontWeight),(null===(a=l.style)||void 0===a?void 0:a.margin)&&(n.margin=l.style.margin),n},i=l.content||l.label||"";return(0,r.jsx)("div",{className:"".concat(c(l)," ").concat(t),style:m(l),children:l.htmlContent?(0,r.jsx)("div",{className:a(),style:n(),dangerouslySetInnerHTML:{__html:i}}):(0,r.jsx)("p",{className:a(),style:n(),children:i})})},L={text:y,email:b,number:S,tel:j,password:C,textarea:w,select:z,radio:A,checkbox:F,date:_,time:T,datetime:E,file:q,url:N,hidden:k,divider:I,heading:D,paragraph:O,spacer:e=>{var l;let{field:t}=e,a=(null===(l=t.settings)||void 0===l?void 0:l.height)||20;return(0,r.jsx)("div",{className:"form-spacer",style:{height:"".concat(a,"px"),minHeight:"".concat(a,"px")},"aria-hidden":"true"})}},P=e=>{let{field:l}=e,t=L[l.type];return t?(0,r.jsx)(t,{...e}):(console.warn("Unknown form field type: ".concat(l.type)),(0,r.jsx)("div",{className:"form-unknown-field",children:(0,r.jsxs)("p",{className:"form-unknown-field__text",children:["알 수 없는 필드 타입: ",l.type]})}))},B={text:{placeholder:"텍스트를 입력하세요"},email:{placeholder:"이메일을 입력하세요"},number:{placeholder:"숫자를 입력하세요",min:0,step:1},tel:{placeholder:"전화번호를 입력하세요"},password:{placeholder:"비밀번호를 입력하세요"},textarea:{placeholder:"내용을 입력하세요",rows:4},select:{placeholder:"선택해주세요",options:[{label:"옵션 1",value:"option1"},{label:"옵션 2",value:"option2"}]},radio:{options:[{label:"옵션 1",value:"option1"},{label:"옵션 2",value:"option2"}]},checkbox:{options:[{label:"옵션 1",value:"option1"},{label:"옵션 2",value:"option2"}]},date:{},time:{},datetime:{}
1,file:{placeholder:"파일을 선택하세요"},url:{placeholder:"URL을 입력하세요"},hidden:{},divider:{},heading:{content:"제목"},paragraph:{content:"설명 텍스트를 입력하세요"},spacer:{}},W={basic:["text","email","number","tel","password","textarea"],selection:["select","radio","checkbox"],datetime:["date","time","datetime"],file:["file"],layout:["divider","heading","paragraph"],advanced:["url","hidden"]};var M=t(21317),U=t(14886);let H={"zh-cn":"zh-CN","zh-tw":"zh-TW","zh-hk":"zh-HK","en-gb":"en-GB","fr-ca":"fr-CA","pt-br":"pt-BR","pt-pt":"pt-PT","de-at":"de-AT","de-ch":"de-CH"},G={he:"iw",tl:"fil",nb:"no"},V={},X=e=>{var l,t,i,o,s,d,u,c,m,h;let{schema:p,onSubmit:v,onValidationError:g,mode:x="view",locale:y="ko",className:b="",initialData:j=V,hideTitle:C=!1,hideDescription:N=!1,translatedUI:S}=e,[k,w]=(0,a.useState)(j),[z,A]=(0,a.useState)({}),[F,_]=(0,a.useState)({}),[T,E]=(0,a.useState)(!1),[R,q]=(0,a.useState)(null),[I,D]=(0,a.useState)(null),O=(0,a.useRef)(null),L=(0,a.useCallback)(()=>{var e;null===(e=O.current)||void 0===e||e.reset()},[]);(0,a.useEffect)(()=>{let e={...j};(p.fields||[]).forEach(l=>{void 0===e[l.name]&&void 0!==l.defaultValue&&(e[l.name]=l.defaultValue)}),w(e)},[p,j]);let B=(0,a.useCallback)(e=>!e.conditionalRules||0===e.conditionalRules.length||e.conditionalRules.every(e=>{let l=k[e.fieldId];switch(e.operator){case"equals":return l==e.value;case"not_equals":return l!=e.value;case"contains":return String(l||"").includes(String(e.value));case"not_contains":return!String(l||"").includes(String(e.value));case"greater_than":return Number(l||0)>Number(e.value);case"less_than":return Number(l||0)<Number(e.value);default:return!0}}),[k]),W=(0,a.useCallback)((e,l)=>{if(w(t=>({...t,[e]:l})),F[e]){let t=(p.fields||[]).find(l=>l.name===e);if(t){let r=f(t,l,null==S?void 0:S.validation);A(l=>({...l,[e]:r}))}}},[p.fields,F]),X=(0,a.useCallback)(e=>{_(l=>({...l,[e]:!0}));let l=(p.fields||[]).find(l=>l.name===e);if(l){let t=f(l,k[e],null==S?void 0:S.validation);A(l=>({...l,[e]:t}))}},[p.fields,k]),J=(0,a.useCallback)(()=>{let e={};return(p.fields||[]).forEach(l=>{if(!["text","email","number","tel","password","textarea","select","radio","checkbox","date","time","datetime","file","url"].includes(l.type)||["heading","paragraph","divider","spacer"].includes(l.type)||!B(l))return;let t=k[l.name],r=f(l,t,null==S?void 0:S.validation);r.length>0&&(e[l.name]=r)}),e},[p.fields,k,B]),K=(0,a.useCallback)(async e=>{var l,t,r;if(e.preventDefault(),T)return;let a=J();if(A(a),Object.keys(a).length>0){null==g||g(a);return}E(!0),q(null);try{let e=null;if(!(e=I)){q({success:!1,message:null!==(t=null==S?void 0:S.securityCheck)&&void 0!==t?t:"보안 확인을 완료해주세요."}),E(!1);return}let r=[],a={...k};if(Object.entries(k).forEach(e=>{let[l,t]=e;t instanceof File?(r.push({fieldName:l,file:t}),a[l]=t.name):Array.isArray(t)&&t.length>0&&t[0]instanceof File&&(t.forEach(e=>r.push({fieldName:l,file:e})),a[l]=t.map(e=>e.name))}),r.reduce((e,l)=>{let{file:t}=l;return e+t.size},0)>n.D){let e=Math.round(n.D/1048576);q({success:!1,message:"첨부파일 합계 용량이 너무 큽니다. 합계 ".concat(e,"MB 이하로 첨부해주세요.")});return}let i=await (null==v?void 0:v(a,r.length>0?r:void 0,e||void 0));q(i||{success:!0}),D(null),null==L||L(),(null==i?void 0:i.success)===!1||(null===(l=p.settings)||void 0===l?void 0:l.allowMultipleSubmissions)||(w({}),_({}),A({}))}catch(e){console.error("Form submission error:",e),q({success:!1,message:null!==(r=null==S?void 0:S.formSubmitError)&&void 0!==r?r:"폼 제출 중 오류가 발생했습니다."}),null==L||L(),D(null)}finally{E(!1)}},[k,T,J,g,v,p.settings,I,L]),Z=(p.fields||[]).filter(B);return p&&p.fields?(0,r.jsxs)("div",{className:"".concat((()=>{var e,l,t;let r=["form-renderer"];return(null===(e=p.layout)||void 0===e?void 0:e.maxWidth)&&r.push("form-renderer--auto-mx"),(null===(l=p.layout)||void 0===l?void 0:l.alignment)==="center"?r.push("form-renderer--center-align"):(null===(t=p.layout)||void 0===t?void 0:t.alignment)==="right"&&r.push("form-renderer--right-align"),r.join(" ")})()," ").concat(b),style:(()=>{var e,l,t,r,a;let n={};return(null===(e=p.layout)||void 0===e?void 0:e.maxWidth)&&(n.maxWidth=p.layout.maxWidth),(null===(l=p.layout)||void 0===l?void 0:l.backgroundColor)&&(n.backgroundColor=p.layout.backgroundColor),(null===(t=p.layout)||void 0===t?void 0:t.padding)&&(n.padding=p.layout.padding),(null===(r=p.layout)||void 0===r?void 0:r.borderRadius)&&(n.borderRadius=p.layout.borderRadius),(null===(a=p.layout)||void 0===a?void 0:a.boxSh
1adow)&&(n.boxShadow=p.layout.boxShadow),n})(),children:[!C&&p.title&&(0,r.jsxs)("div",{className:"form-header",children:[(0,r.jsx)("h2",{className:"form-title",children:p.title}),!N&&p.description&&(0,r.jsx)("p",{className:"form-description",children:p.description})]}),R?R.success?(0,r.jsx)("div",{className:"form-alert form-alert--success",children:(0,r.jsx)("p",{children:(null===(d=p.submissionAction)||void 0===d?void 0:d.successMessage)||R.message||(null!==(u=null==S?void 0:S.submitSuccess)&&void 0!==u?u:"성공적으로 제출되었습니다.")})}):(0,r.jsxs)("div",{className:"form-alert form-alert--error",children:[(0,r.jsx)("p",{children:(null===(c=p.submissionAction)||void 0===c?void 0:c.errorMessage)||R.message||(null!==(m=null==S?void 0:S.submitError)&&void 0!==m?m:"제출 중 오류가 발생했습니다.")}),R.errors&&(0,r.jsx)("ul",{className:"form-alert__error-list",children:R.errors.map((e,l)=>(0,r.jsxs)("li",{children:["• ",e.messages.join(", ")]},l))})]}):null,(0,r.jsxs)("form",{onSubmit:K,className:"form-body",children:[(0,r.jsx)("div",{className:(()=>{var e,l;if((null===(e=p.layout)||void 0===e?void 0:e.columns)&&p.layout.columns>1)return"form-fields--grid";let t=["form-fields--default"];switch(null===(l=p.layout)||void 0===l?void 0:l.spacing){case"tight":t.push("form-fields--tight");break;case"loose":t.push("form-fields--loose")}return t.join(" ")})(),style:(null===(h=p.layout)||void 0===h?void 0:h.columns)&&p.layout.columns>1?{gridTemplateColumns:"repeat(".concat(p.layout.columns,", 1fr)")}:{},children:Z.map((e,l)=>(0,r.jsx)(P,{field:e,value:k[e.name],onChange:l=>W(e.name,l),onBlur:()=>X(e.name),error:z[e.name],disabled:T,preview:"preview"===x,translatedUI:S,locale:y},e.id))}),(0,r.jsx)("div",{className:"form-recaptcha-area",children:(()=>{var e,l,t,a,n;if("preview"===x)return(0,r.jsx)("div",{className:"form-recaptcha-preview",children:"reCAPTCHA (미리보기 모드)"});let i=(0,U.d)("RECAPTCHA_SITE_KEY");return i?(0,r.jsx)(M.Z,{ref:O,sitekey:i,onChange:e=>D(e),onErrored:()=>{var e;console.error("reCAPTCHA error: An error occurred."),q({success:!1,message:null!==(e=null==S?void 0:S.recaptchaError)&&void 0!==e?e:"보안 확인 중 오류가 발생했습니다. 페이지를 새로고침하고 다시 시도해주세요."})},onExpired:()=>D(null),theme:(null===(l=p.settings)||void 0===l?void 0:null===(e=l.recaptcha)||void 0===e?void 0:e.theme)||"light",size:(null===(a=p.settings)||void 0===a?void 0:null===(t=a.recaptcha)||void 0===t?void 0:t.size)||"normal",hl:function(e){var l;if(!e)return;let t=(function(e){let l=e.replace("_","-"),[t,r]=l.split("-");return t&&r?"".concat(t.toLowerCase(),"-").concat(r.toLowerCase()):l})(e).toLowerCase();if(H[t])return H[t];let r=t.split("-")[0];if(r)return null!==(l=G[r])&&void 0!==l?l:r}(y)}):(0,r.jsx)("div",{className:"form-recaptcha-missing",children:null!==(n=null==S?void 0:S.recaptchaNotSet)&&void 0!==n?n:"reCAPTCHA가 설정되지 않았습니다."})})()}),(0,r.jsx)("div",{className:"form-submit-area",children:(0,r.jsx)("button",{type:"submit",disabled:"preview"===x||T||!I,className:"form-submit-btn ".concat("preview"===x||T||!I?"form-submit-btn--disabled":"form-submit-btn--active"),style:(null===(l=p.theme)||void 0===l?void 0:l.buttonStyle)?{backgroundColor:"preview"===x?"#e5e7eb":p.theme.buttonStyle.backgroundColor,color:"preview"===x?"#6b7280":p.theme.buttonStyle.textColor,borderRadius:p.theme.buttonStyle.borderRadius,padding:p.theme.buttonStyle.padding,fontSize:p.theme.buttonStyle.fontSize,fontWeight:p.theme.buttonStyle.fontWeight}:"preview"===x?{backgroundColor:"#e5e7eb",color:"#6b7280"}:{},children:"preview"===x?null!==(i=null==S?void 0:S.submit)&&void 0!==i?i:"제출하기":T?null!==(o=null==S?void 0:S.submitting)&&void 0!==o?o:"제출 중...":null!==(s=null==S?void 0:S.submit)&&void 0!==s?s:"제출하기"})})]})]}):(0,r.jsx)("div",{className:"form-alert--schema-error",children:(0,r.jsx)("p",{children:null!==(t=null==S?void 0:S.formSchemaInvalid)&&void 0!==t?t:"폼 스키마가 올바르지 않습니다."})})};class J{static createInitialData(e){let l={};
1return e.fields.forEach(e=>{if(void 0!==e.defaultValue)l[e.name]=e.defaultValue;else switch(e.type){case"checkbox":e.options&&e.options.length>0?l[e.name]=[]:l[e.name]=!1;break;case"select":e.multiple?l[e.name]=[]:l[e.name]="";break;case"file":e.multiple?l[e.name]=[]:l[e.name]=null;break;case"number":l[e.name]=e.min||0;break;default:l[e.name]=""}}),l}static prepareSubmissionData(e,l){let t={};return l.fields.forEach(l=>{let r=e[l.name];["text","email","number","tel","password","textarea","select","radio","checkbox","date","time","datetime","file","url","hidden"].includes(l.type)&&("file"===l.type?r instanceof File?t[l.name]={name:r.name,size:r.size,type:r.type}:Array.isArray(r)&&r.length>0?t[l.name]=r.map(e=>({name:e.name,size:e.size,type:e.type})):t[l.name]=null:t[l.name]=r)}),t}static extractFiles(e){let l=[];return Object.values(e).forEach(e=>{e instanceof File?l.push(e):Array.isArray(e)&&e.forEach(e=>{e instanceof File&&l.push(e)})}),l}static restoreFormData(e,l){let t={...e.data};return e.files&&e.files.length>0&&e.files.forEach(e=>{let r=l.fields.find(l=>l.name===e.fieldId);r&&(r.multiple?(t[e.fieldId]||(t[e.fieldId]=[]),t[e.fieldId].push({id:e.id,name:e.originalName,url:e.filePath,size:e.fileSize,type:e.mimeType})):t[e.fieldId]={id:e.id,name:e.originalName,url:e.filePath,size:e.fileSize,type:e.mimeType})}),t}}class K{static validateRequiredFields(e,l){let t=[];return l.fields.forEach(l=>{if(l.required){let r=e[l.name];this.isEmpty(r)&&t.push("".concat(l.label||l.name,"은(는) 필수 입력 항목입니다."))}}),t}static isEmpty(e){return!!(null==e||"string"==typeof e&&""===e.trim()||Array.isArray(e)&&0===e.length)}static validateEmail(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}static validateUrl(e){try{return new URL(e),!0}catch(e){return!1}}static validatePhoneNumber(e){return/^(01[016789]|02|0[3-9][0-9])-?[0-9]{3,4}-?[0-9]{4}$/.test(e.replace(/\s/g,""))}}class Z{static themeToCssVariables(e){let l={};return(null==e?void 0:e.primaryColor)&&(l["--form-primary-color"]=e.primaryColor),(null==e?void 0:e.secondaryColor)&&(l["--form-secondary-color"]=e.secondaryColor),(null==e?void 0:e.backgroundColor)&&(l["--form-background-color"]=e.backgroundColor),(null==e?void 0:e.textColor)&&(l["--form-text-color"]=e.textColor),(null==e?void 0:e.borderColor)&&(l["--form-border-color"]=e.borderColor),l}static getResponsiveGridClass(e){return!e||e<=1?"":["grid","grid-cols-1","md:grid-cols-".concat(Math.min(e,2)),"lg:grid-cols-".concat(e),"gap-4"].join(" ")}}class ${static generateAriaLabel(e){let l=e.label||e.name;return e.required&&(l+=" (필수)"),e.helpText&&(l+=". ".concat(e.helpText)),l}static generateErrorId(e){return"".concat(e,"-error")}static generateHelpId(e){return"".concat(e,"-help")}static generateAriaDescribedBy(e,l,t){let r=[];return l&&r.push(this.generateErrorId(e)),t&&r.push(this.generateHelpId(e)),r.join(" ")}}class Y{static saveDraft(e,l){try{let t=this.STORAGE_PREFIX+e;localStorage.setItem(t,JSON.stringify({data:l,timestamp:Date.now()}))}catch(e){console.warn("Failed to save form draft:",e)}}static loadDraft(e){try{let l=this.STORAGE_PREFIX+e,t=localStorage.getItem(l);if(t)return JSON.parse(t).data}catch(e){console.warn("Failed to load form draft:",e)}return null}static clearDraft(e){try{let l=this.STORAGE_PREFIX+e;localStorage.removeItem(l)}catch(e){console.warn("Failed to clear form draft:",e)}}static getAllDrafts(){let e=[];try{for(let l=0;l<localStorage.length;l++){let t=localStorage.key(l);if(t&&t.startsWith(this.STORAGE_PREFIX)){let l=t.substring(this.STORAGE_PREFIX.length),r=localStorage.getItem(t);if(r){let t=JSON.parse(r);e.push({formId:l,timestamp:t.timestamp})}}}}catch(e){console.warn("Failed to get all drafts:",e)}return e.sort((e,l)=>l.timestamp-e.timestamp)}}Y.STORAGE_PREFIX="form_draft_"},54003:function(e,l,t){t.d(l,{D:function(){return a},O:function(){return r}});let r=["divider","spacer","heading","paragraph"],a=5242880}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.