@ienlab/react-library 0.14.1 → 0.14.2-beta.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/image/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/image/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAE3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`react`),u=require(`motion/react`),d=require(`react/jsx-runtime`),f=require(`react-i18next`),p=require(`firebase/firestore`),m=require(`zustand/react`),h=require(`i18next`);h=c(h,1);function g({placeholder:e,src:t,onLoadError:n,...r}){let[i,a]=(0,l.useState)(()=>{if(typeof window>`u`||!t)return!1;let e=new Image;return e.src=t,e.complete&&e.naturalWidth>0}),[o,s]=(0,l.useState)(t);return o!==t&&(s(t),a(!1)),(0,l.useEffect)(()=>{if(!t)return;let e=new Image;return e.src=t,e.onload=()=>a(!0),e.onerror=e=>{n?n(e):console.error(`CrossfadeImage: Failed to load image`,t)},e.complete&&e.naturalWidth>0&&e.onload(new Event(`load`)),()=>{e.onload=null,e.onerror=null}},[t,n]),(0,d.jsx)(u.AnimatePresence,{children:i&&t?(0,d.jsx)(u.motion.img,{src:t,...r,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{...r.style}},`loaded-image`):(0,d.jsx)(u.motion.div,{initial:{opacity:1},transition:{duration:.3},style:{...r.style},children:e??(0,d.jsx)(`div`,{className:`w-full h-full bg-sidebar`})},`placeholder`)})}var _=[`ko`,`en`],v=class{url=``;file=null;constructor(e={}){Object.assign(this,e)}isBlobUrl(){return this.url.startsWith(`blob:`)}revokeIfNeeded(){this.file&&this.isBlobUrl()&&URL.revokeObjectURL(this.url)}},y=({children:e})=>(0,d.jsx)(`div`,{children:e}),b=e=>(0,d.jsx)(`label`,{...e}),x=({children:e})=>(0,d.jsx)(`p`,{children:e}),S=e=>(0,d.jsx)(`input`,{...e}),C=({children:e,...t})=>(0,d.jsx)(`div`,{...t,children:e}),w=e=>null,T=({children:e,...t})=>(0,d.jsx)(`div`,{...t,children:e}),E=({children:e,type:t=`button`,...n})=>(0,d.jsx)(`button`,{type:t,...n,children:e}),D=({className:e})=>(0,d.jsx)(`span`,{className:e,children:`×`});function O({id:e,label:t,uploadHintText:n,descriptionText:r,value:i,onChange:a,aspectRatio:o=`1 / 1`,accept:s=`image/*`,components:c}){let{t:l}=(0,f.useTranslation)(),u=c?.Field??y,p=c?.FieldLabel??b,m=c?.FieldDescription??x,h=c?.Input??S;return(0,d.jsxs)(u,{children:[(0,d.jsx)(p,{htmlFor:e,children:t}),(0,d.jsxs)(`div`,{className:`iu-field`,children:[(0,d.jsx)(`label`,{htmlFor:e,className:`iu-trigger`,children:(0,d.jsxs)(`div`,{className:`iu-card`,children:[(0,d.jsx)(`div`,{className:`iu-frame`,children:i.url?(0,d.jsx)(`div`,{className:`iu-image-layer`,children:(0,d.jsx)(`div`,{className:`iu-image-box`,style:{aspectRatio:o},children:(0,d.jsx)(g,{src:i.url,className:`iu-image`,alt:t})})}):(0,d.jsxs)(`div`,{className:`iu-empty`,children:[(0,d.jsx)(`div`,{className:`iu-badge`,children:l(`libs:add_assets`)}),(0,d.jsx)(`p`,{className:`iu-hint`,children:n})]})}),(0,d.jsx)(`div`,{className:`iu-overlay`})]})}),(0,d.jsx)(h,{id:e,type:`file`,accept:s,className:`iu-hidden-input`,onChange:e=>{let t=e.target.files?.[0];t&&(i.revokeIfNeeded(),a(new v({file:t,url:URL.createObjectURL(t)})),e.currentTarget.value=``)}}),(0,d.jsx)(m,{children:r})]})]})}function k({id:e,label:t,descriptionText:n,uploadHintText:r,items:i,onChange:a,aspectRatio:o=`1 / 1`,accept:s=`image/*`,components:c}){let{t:l}=(0,f.useTranslation)(),p=c?.Field??y,m=c?.FieldLabel??b,h=c?.FieldDescription??x,_=c?.Input??S,O=c?.ScrollArea??C,k=c?.ScrollBar??w,A=c?.Card??T,j=c?.Button??E,M=c?.CloseIcon??D,N=e=>{e.revokeIfNeeded(),a(i.filter(t=>t!==e))},P=e=>{!e||e.length===0||a([...i,...Array.from(e).map(e=>new v({file:e,url:URL.createObjectURL(e)}))])},F={aspectRatio:o};return(0,d.jsxs)(p,{children:[(0,d.jsx)(m,{htmlFor:e,children:t}),(0,d.jsxs)(`div`,{className:`iusf-field`,children:[(0,d.jsxs)(`div`,{className:`iusf-container`,children:[(0,d.jsxs)(O,{className:`iusf-scroll-area`,children:[(0,d.jsxs)(u.Reorder.Group,{axis:`x`,values:i,onReorder:a,layoutScroll:!0,className:`iusf-list`,children:[i.map(e=>(0,d.jsx)(u.Reorder.Item,{value:e,className:`iusf-item`,children:(0,d.jsx)(A,{className:`iusf-card`,style:F,children:(0,d.jsxs)(`div`,{className:`iusf-card-inner`,children:[(0,d.jsx)(g,{src:e.url,className:`iusf-image`,draggable:!1,alt:t}),(0,d.jsx)(j,{type:`button`,className:`iusf-remove-button`,onClick:()=>N(e),children:(0,d.jsx)(M,{})})]})})},e.url)),(0,d.jsx)(`label`,{htmlFor:e,className:`iusf-upload-trigger`,children:(0,d.jsx)(A,{className:`iusf-upload-card`,style:F,children:(0,d.jsxs)(`div`,{className:`iusf-upload-inner`,children:[(0,d.jsx)(`div`,{className:`iu-badge`,children:l(`libs:add_assets`)}),(0,d.jsx)(`p`,{className:`iu-hint`,children:r})]})})})]}),(0,d.jsx)(k,{orientation:`horizontal`,className:`iusf-scrollbar`})]}),(0,d.jsx)(_,{id:e,type:`file`,accept:s,multiple:!0,className:`iu-hidden-input`,onChange:e=>{P(e.target.files),e.currentTarget.value=``}})]}),(0,d.jsx)(h,{children:n})]})]})}function A(e){return{...e.data(),id:e.id}}async function j(e,t,n,r){let i=r.filter(e=>!!(e&&!n.has(e.path)));for(let r=0;r<i.length;r+=30){let a=i.slice(r,r+30);(await(0,p.getDocs)((0,p.query)(e,(0,p.where)((0,p.documentId)(),`in`,a.map(e=>e.id))))).forEach(e=>{let r=t(e);n.set(e.ref.path,r)})}}async function M(e,t,n){let r=n.filter(e=>!!(e&&!t.has(e.path)));await Promise.all(r.map(async n=>{let r=e(await(0,p.getDoc)(n));t.set(n.path,r)}))}function N(e={}){let{cache:t=!0,includeMetadataChanges:n}=e;return{listenOptions:{includeMetadataChanges:n??!t},cache:t}}function P(e,t){return t!==!1||!e}function F(e,t,n={}){let{listenOptions:r,cache:i}=N(n),{onError:a}=n;return e.type,(0,p.onSnapshot)(e,r,e=>{P(e.metadata.fromCache,i)&&t(e)},a)}Array.prototype.mapNotNull=function(e){return this.flatMap((t,n)=>{let r=e(t,n);return r==null?[]:[r]})};function I(){if(typeof window>`u`)return`pc`;let e=navigator.userAgent,t=navigator.platform,n=/Android/i.test(e),r=/iPhone|iPad|iPod/i.test(e)||t===`MacIntel`&&navigator.maxTouchPoints>1;return n?`android`:r?`ios`:`pc`}function L(e){let t=(0,l.createContext)(null);function n({children:n,...r}){let[i]=(0,l.useState)(()=>e(r));return(0,d.jsx)(t.Provider,{value:i,children:n})}function r(e){let n=(0,l.useContext)(t);if(!n)throw Error(`Provider가 필요합니다.`);return(0,m.useStore)(n,e)}let i=new Map;return{Provider:n,useStore:r,use:new Proxy({},{get:(e,t)=>(i.has(t)||i.set(t,()=>r(e=>e[t])),i.get(t))})}}var R=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),z=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(R()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_ko=r(n.dayjs)})(e,(function(e){"use strict";function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`ko`,weekdays:`일요일_월요일_화요일_수요일_목요일_금요일_토요일`.split(`_`),weekdaysShort:`일_월_화_수_목_금_토`.split(`_`),weekdaysMin:`일_월_화_수_목_금_토`.split(`_`),months:`1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월`.split(`_`),monthsShort:`1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월`.split(`_`),ordinal:function(e){return e+`일`},formats:{LT:`A h:mm`,LTS:`A h:mm:ss`,L:`YYYY.MM.DD.`,LL:`YYYY년 MMMM D일`,LLL:`YYYY년 MMMM D일 A h:mm`,LLLL:`YYYY년 MMMM D일 dddd A h:mm`,l:`YYYY.MM.DD.`,ll:`YYYY년 MMMM D일`,lll:`YYYY년 MMMM D일 A h:mm`,llll:`YYYY년 MMMM D일 dddd A h:mm`},meridiem:function(e){return e<12?`오전`:`오후`},relativeTime:{future:`%s 후`,past:`%s 전`,s:`몇 초`,m:`1분`,mm:`%d분`,h:`한 시간`,hh:`%d시간`,d:`하루`,dd:`%d일`,M:`한 달`,MM:`%d달`,y:`일 년`,yy:`%d년`}};return n.default.locale(r,null,!0),r}))})),B=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_en=r()})(e,(function(){"use strict";return{name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}}}))})),V=c(R(),1);z(),B();function H(e,t,n){let r=(0,V.default)(e);return!e||!r.isValid()?``:r.format(n(t))}function U(){let{t:e}=(0,f.useTranslation)();return(0,l.useMemo)(()=>({basicDateTimeFormat:(t,n)=>H(t,n,e),dateTimeFormat:t=>H(t,`libs:datetime.date_time_format`,e),dateFormat:t=>H(t,`libs:datetime.date_format`,e),timeFormat:t=>H(t,`libs:datetime.time_format`,e)}),[e])}function W(e){let t=(0,V.default)(e);return t.isValid()?t.format(`YYYYMMDD`):``}function G(e){let t=(0,V.default)(e);return t.isValid()?t.format(`HH:mm`):``}var K=e=>{let t=e?.split(`-`)[0]===`ko`?`ko`:`en`;V.default.locale(t)};h.default.isInitialized&&K(h.default.resolvedLanguage||h.default.language),h.default.on(`languageChanged`,K);var q=()=>({updateAt:(0,p.serverTimestamp)(),delete:!0}),J=()=>({updateAt:(0,p.serverTimestamp)(),delete:!1});function Y(e){switch(e){case`auth/user-not-found`:return`libs:auth.errors.user_not_found`;case`auth/wrong-password`:return`libs:auth.errors.wrong_password`;case`auth/invalid-credential`:return`libs:auth.errors.invalid_credential`;case`auth/invalid-email`:return`libs:auth.errors.invalid_email`;case`auth/user-disabled`:return`libs:auth.errors.user_disabled`;case`auth/too-many-requests`:return`libs:auth.errors.too_many_requests`;case`auth/network-request-failed`:return`libs:auth.errors.network_request_failed`;case`auth/timeout`:return`libs:auth.errors.timeout`;case`auth/email-already-in-use`:return`libs:auth.errors.email_already_in_use`;case`auth/weak-password`:return`libs:auth.errors.weak_password`;case`auth/requires-recent-login`:return`libs:auth.errors.requires_recent_login`;case`auth/user-token-expired`:return`libs:auth.errors.user_token_expired`;case`auth/popup-blocked`:return`libs:auth.errors.popup_blocked`;case`auth/popup-closed-by-user`:return`libs:auth.errors.popup_closed_by_user`;case`auth/operation-not-allowed`:return`libs:auth.errors.operation_not_allowed`;case`auth/web-storage-unsupported`:return`libs:auth.errors.web_storage_unsupported`;case`auth/unauthorized-domain`:return`libs:auth.errors.unauthorized_domain`;default:return`libs:auth.errors.default`}}var X={auth:{errors:{invalid_credential:`이메일 또는 비밀번호를 다시 확인해 주세요.`,wrong_password:`이메일 또는 비밀번호를 다시 확인해 주세요.`,user_not_found:`입력한 정보와 일치하는 계정을 찾을 수 없어요.`,invalid_email:`이메일 형식을 확인해 주세요.`,email_already_in_use:`이미 가입된 이메일이에요. 로그인하거나 다른 이메일을 사용해 주세요.`,weak_password:`비밀번호는 6자 이상으로 입력해 주세요.`,user_disabled:`이 계정은 현재 사용할 수 없어요. 관리자에게 문의해 주세요.`,too_many_requests:`시도가 너무 많아요. 잠시 후 다시 시도해 주세요.`,network_request_failed:`인터넷 연결을 확인한 뒤 다시 시도해 주세요.`,timeout:`응답이 지연되고 있어요. 잠시 후 다시 시도해 주세요.`,requires_recent_login:`보안을 위해 다시 로그인해 주세요.`,user_token_expired:`로그인 시간이 만료되었어요. 다시 로그인해 주세요.`,operation_not_allowed:`현재 사용할 수 없는 로그인 방식이에요.`,account_exists_with_different_credential:`이미 다른 로그인 방식으로 가입된 이메일이에요. 기존 방식으로 로그인해 주세요.`,popup_blocked:`로그인 창이 차단되었어요. 팝업 허용 후 다시 시도해 주세요.`,popup_closed_by_user:`로그인 창이 닫혀서 로그인이 완료되지 않았어요.`,web_storage_unsupported:`현재 브라우저 설정에서는 로그인을 진행할 수 없어요.`,unauthorized_domain:`현재 접속한 도메인에서는 로그인을 사용할 수 없어요.`,internal_error:`문제가 발생했어요. 잠시 후 다시 시도해 주세요.`,default:`로그인 중 문제가 발생했어요. 잠시 후 다시 시도해 주세요.`}},unknown_error_occurred:`알 수 없는 오류가 발생했습니다.`,datetime:{date_format:`YYYY년 M월 D일`,date_time_format:`YYYY년 M월 D일 A h:mm:ss`,time_format:`A h:mm:ss`},add_assets:`애셋 추가`},Z={auth:{errors:{invalid_credential:`Please check your email or password.`,wrong_password:`Please check your email or password.`,user_not_found:`We couldn’t find an account matching that information.`,invalid_email:`Please check your email format.`,email_already_in_use:`This email is already registered. Sign in or use a different email.`,weak_password:`Your password must be at least 6 characters long.`,user_disabled:`This account is currently unavailable. Please contact support.`,too_many_requests:`Too many attempts. Please try again later.`,network_request_failed:`Check your internet connection and try again.`,timeout:`The request is taking too long. Please try again.`,requires_recent_login:`For security reasons, please sign in again.`,user_token_expired:`Your session has expired. Please sign in again.`,operation_not_allowed:`This sign-in method is currently unavailable.`,account_exists_with_different_credential:`This email is already linked to another sign-in method. Please use that method to sign in.`,popup_blocked:`The sign-in window was blocked. Please allow pop-ups and try again.`,popup_closed_by_user:`The sign-in window was closed before completion.`,web_storage_unsupported:`Sign-in is not available with your current browser settings.`,unauthorized_domain:`Sign-in is not available on this domain.`,internal_error:`Something went wrong. Please try again later.`,default:`We couldn’t complete the sign-in. Please try again later.`}},unknown_error_occurred:`Unknown error occurred.`,datetime:{date_format:`MMMM D, YYYY`,date_time_format:`MMMM D, YYYY h:mm:ss A`,time_format:`h:mm:ss A`},add_assets:`Add Assets`};function Q(e){e.hasResourceBundle(`ko`,`libs`)||e.addResourceBundle(`ko`,`libs`,X,!0,!1),e.hasResourceBundle(`en`,`libs`)||e.addResourceBundle(`en`,`libs`,Z,!0,!1)}var $={Info:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-sky-600), var(--color-sky-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`},Solid:{"--normal-bg":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`}},Success:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-green-600), var(--color-green-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`},Solid:{"--normal-bg":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`}},Warning:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-amber-600), var(--color-amber-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`},Solid:{"--normal-bg":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`}},Destructive:{Soft:{"--normal-bg":`color-mix(in oklab, var(--destructive) 10%, var(--background))`,"--normal-text":`var(--destructive)`,"--normal-border":`var(--destructive)`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`var(--destructive)`,"--normal-border":`var(--destructive)`},Solid:{"--normal-bg":`light-dark(var(--destructive), color-mix(in oklab, var(--destructive) 60%, var(--background)))`,"--normal-text":`var(--color-white)`,"--normal-border":`transparent`}}};exports.CrossfadeImage=g,exports.ImageUploadField=O,exports.ImageUploadItem=v,exports.ImageUploadSortableField=k,exports.SUPPORTED_LOCALES=_,exports.ToastCSS=$,exports.createZustandContext=L,exports.dateIdFormat=W,exports.deleteItem=q,exports.fetchItems=j,exports.fetchItemsByOne=M,exports.getAuthErrorKey=Y,exports.getPlatformType=I,exports.getSnapshots=F,exports.initIenlabI18n=Q,exports.snapshotToData=A,exports.time24Format=G,exports.undeleteItem=J,exports.useDateTimeFormatters=U;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`react`),u=require(`motion/react`),d=require(`react/jsx-runtime`),f=require(`react-i18next`),p=require(`firebase/firestore`),m=require(`zustand/react`),h=require(`i18next`);h=c(h,1);function g({placeholder:e,src:t,onLoadError:n,...r}){let[i,a]=(0,l.useState)(()=>{if(typeof window>`u`||!t)return!1;let e=new Image;return e.src=t,e.complete&&e.naturalWidth>0}),[o,s]=(0,l.useState)(t);return o!==t&&(s(t),a(!1)),(0,l.useEffect)(()=>{if(!t)return;let e=new Image;return e.src=t,e.onload=()=>a(!0),e.onerror=e=>{n?n(e):console.error(`CrossfadeImage: Failed to load image`,t)},e.complete&&e.naturalWidth>0&&e.onload(new Event(`load`)),()=>{e.onload=null,e.onerror=null}},[t,n]),(0,d.jsx)(u.AnimatePresence,{children:i&&t?(0,d.jsx)(u.motion.img,{src:t,...r,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{...r.style}},`loaded-image`):(0,d.jsx)(u.motion.div,{initial:{opacity:1},transition:{duration:.3},style:{...r.style},children:e??(0,d.jsx)(`div`,{className:`w-full h-full bg-sidebar`})},`placeholder`)})}var _=[`ko`,`en`],v=class{url=``;file=null;constructor(e={}){Object.assign(this,e)}isBlobUrl(){return this.url.startsWith(`blob:`)}revokeIfNeeded(){this.file&&this.isBlobUrl()&&URL.revokeObjectURL(this.url)}},y=({children:e})=>(0,d.jsx)(`div`,{children:e}),b=e=>(0,d.jsx)(`label`,{...e}),x=({children:e})=>(0,d.jsx)(`p`,{children:e}),S=e=>(0,d.jsx)(`input`,{...e}),C=({children:e,...t})=>(0,d.jsx)(`div`,{...t,children:e}),w=e=>null,T=({children:e,...t})=>(0,d.jsx)(`div`,{...t,children:e}),E=({children:e,type:t=`button`,...n})=>(0,d.jsx)(`button`,{type:t,...n,children:e}),D=({className:e})=>(0,d.jsx)(`span`,{className:e,children:`×`});function O({id:e,label:t,uploadHintText:n,descriptionText:r,value:i,onChange:a,aspectRatio:o=`1 / 1`,accept:s=`image/*`,components:c}){let{t:l}=(0,f.useTranslation)(),u=c?.Field??y,p=c?.FieldLabel??b,m=c?.FieldDescription??x,h=c?.Input??S;return(0,d.jsxs)(u,{children:[(0,d.jsx)(p,{htmlFor:e,children:t}),(0,d.jsxs)(`div`,{className:`iu-field`,children:[(0,d.jsx)(`label`,{htmlFor:e,className:`iu-trigger`,children:(0,d.jsxs)(`div`,{className:`iu-card`,children:[(0,d.jsx)(`div`,{className:`iu-frame`,children:i.url?(0,d.jsx)(`div`,{className:`iu-image-layer`,children:(0,d.jsx)(`div`,{className:`iu-image-box`,style:{aspectRatio:o},children:(0,d.jsx)(g,{src:i.url,className:`iu-image`,alt:t})})}):(0,d.jsxs)(`div`,{className:`iu-empty`,children:[(0,d.jsx)(`div`,{className:`iu-badge`,children:l(`libs:add_assets`)}),(0,d.jsx)(`p`,{className:`iu-hint`,children:n})]})}),(0,d.jsx)(`div`,{className:`iu-overlay`})]})}),(0,d.jsx)(h,{id:e,type:`file`,accept:s,className:`iu-hidden-input`,onChange:e=>{let t=e.target.files?.[0];t&&(i.revokeIfNeeded(),a(new v({file:t,url:URL.createObjectURL(t)})),e.currentTarget.value=``)}}),(0,d.jsx)(m,{children:r})]})]})}function k({id:e,label:t,descriptionText:n,uploadHintText:r,items:i,onChange:a,aspectRatio:o=`1 / 1`,accept:s=`image/*`,components:c}){let{t:l}=(0,f.useTranslation)(),p=c?.Field??y,m=c?.FieldLabel??b,h=c?.FieldDescription??x,_=c?.Input??S,O=c?.ScrollArea??C,k=c?.ScrollBar??w,A=c?.Card??T,j=c?.Button??E,M=c?.CloseIcon??D,N=e=>{e.revokeIfNeeded(),a(i.filter(t=>t!==e))},P=e=>{!e||e.length===0||a([...i,...Array.from(e).map(e=>new v({file:e,url:URL.createObjectURL(e)}))])},F={aspectRatio:o};return(0,d.jsxs)(p,{children:[(0,d.jsx)(m,{htmlFor:e,children:t}),(0,d.jsxs)(`div`,{className:`iusf-field`,children:[(0,d.jsxs)(`div`,{className:`iusf-container`,children:[(0,d.jsxs)(O,{className:`iusf-scroll-area`,children:[(0,d.jsxs)(u.Reorder.Group,{axis:`x`,values:i,onReorder:a,layoutScroll:!0,className:`iusf-list`,children:[i.map(e=>(0,d.jsx)(u.Reorder.Item,{value:e,className:`iusf-item`,children:(0,d.jsx)(A,{className:`iusf-card`,style:F,children:(0,d.jsxs)(`div`,{className:`iusf-card-inner`,children:[(0,d.jsx)(g,{src:e.url,className:`iusf-image`,draggable:!1,alt:t}),(0,d.jsx)(j,{type:`button`,className:`iusf-remove-button`,onClick:()=>N(e),children:(0,d.jsx)(M,{})})]})})},e.url)),(0,d.jsx)(`label`,{htmlFor:e,className:`iusf-upload-trigger`,children:(0,d.jsx)(A,{className:`iusf-upload-card`,style:F,children:(0,d.jsxs)(`div`,{className:`iusf-upload-inner`,children:[(0,d.jsx)(`div`,{className:`iu-badge`,children:l(`libs:add_assets`)}),(0,d.jsx)(`p`,{className:`iu-hint`,children:r})]})})})]}),(0,d.jsx)(k,{orientation:`horizontal`,className:`iusf-scrollbar`})]}),(0,d.jsx)(_,{id:e,type:`file`,accept:s,multiple:!0,className:`iu-hidden-input`,onChange:e=>{P(e.target.files),e.currentTarget.value=``}})]}),(0,d.jsx)(h,{children:n})]})]})}function A(e){return{...e.data(),id:e.id}}async function j(e,t,n,r){let i=r.filter(e=>!!(e&&!n.has(e.path)));for(let r=0;r<i.length;r+=30){let a=i.slice(r,r+30);(await(0,p.getDocs)((0,p.query)(e,(0,p.where)((0,p.documentId)(),`in`,a.map(e=>e.id))))).forEach(e=>{let r=t(e);n.set(e.ref.path,r)})}}async function M(e,t,n){let r=n.filter(e=>!!(e&&!t.has(e.path)));await Promise.all(r.map(async n=>{let r=e(await(0,p.getDoc)(n));t.set(n.path,r)}))}function N(e={}){let{cache:t=!0,includeMetadataChanges:n}=e;return{listenOptions:{includeMetadataChanges:n??!t},cache:t}}function P(e,t){return t!==!1||!e}function F(e,t,n={}){let{listenOptions:r,cache:i}=N(n),{onError:a}=n;return e.type,(0,p.onSnapshot)(e,r,e=>{P(e.metadata.fromCache,i)&&t(e)},a)}function I(){if(typeof window>`u`)return`pc`;let e=navigator.userAgent,t=navigator.platform,n=/Android/i.test(e),r=/iPhone|iPad|iPod/i.test(e)||t===`MacIntel`&&navigator.maxTouchPoints>1;return n?`android`:r?`ios`:`pc`}function L(e){let t=(0,l.createContext)(null);function n({children:n,...r}){let[i]=(0,l.useState)(()=>e(r));return(0,d.jsx)(t.Provider,{value:i,children:n})}function r(e){let n=(0,l.useContext)(t);if(!n)throw Error(`Provider가 필요합니다.`);return(0,m.useStore)(n,e)}let i=new Map;return{Provider:n,useStore:r,use:new Proxy({},{get:(e,t)=>(i.has(t)||i.set(t,()=>r(e=>e[t])),i.get(t))})}}var R=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),z=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(R()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_ko=r(n.dayjs)})(e,(function(e){"use strict";function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`ko`,weekdays:`일요일_월요일_화요일_수요일_목요일_금요일_토요일`.split(`_`),weekdaysShort:`일_월_화_수_목_금_토`.split(`_`),weekdaysMin:`일_월_화_수_목_금_토`.split(`_`),months:`1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월`.split(`_`),monthsShort:`1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월`.split(`_`),ordinal:function(e){return e+`일`},formats:{LT:`A h:mm`,LTS:`A h:mm:ss`,L:`YYYY.MM.DD.`,LL:`YYYY년 MMMM D일`,LLL:`YYYY년 MMMM D일 A h:mm`,LLLL:`YYYY년 MMMM D일 dddd A h:mm`,l:`YYYY.MM.DD.`,ll:`YYYY년 MMMM D일`,lll:`YYYY년 MMMM D일 A h:mm`,llll:`YYYY년 MMMM D일 dddd A h:mm`},meridiem:function(e){return e<12?`오전`:`오후`},relativeTime:{future:`%s 후`,past:`%s 전`,s:`몇 초`,m:`1분`,mm:`%d분`,h:`한 시간`,hh:`%d시간`,d:`하루`,dd:`%d일`,M:`한 달`,MM:`%d달`,y:`일 년`,yy:`%d년`}};return n.default.locale(r,null,!0),r}))})),B=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_en=r()})(e,(function(){"use strict";return{name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}}}))})),V=c(R(),1);z(),B();function H(e,t,n){let r=(0,V.default)(e);return!e||!r.isValid()?``:r.format(n(t))}function U(){let{t:e}=(0,f.useTranslation)();return(0,l.useMemo)(()=>({basicDateTimeFormat:(t,n)=>H(t,n,e),dateTimeFormat:t=>H(t,`libs:datetime.date_time_format`,e),dateFormat:t=>H(t,`libs:datetime.date_format`,e),timeFormat:t=>H(t,`libs:datetime.time_format`,e)}),[e])}function W(e){let t=(0,V.default)(e);return t.isValid()?t.format(`YYYYMMDD`):``}function G(e){let t=(0,V.default)(e);return t.isValid()?t.format(`HH:mm`):``}var K=e=>{let t=e?.split(`-`)[0]===`ko`?`ko`:`en`;V.default.locale(t)};h.default.isInitialized&&K(h.default.resolvedLanguage||h.default.language),h.default.on(`languageChanged`,K);var q=()=>({updateAt:(0,p.serverTimestamp)(),delete:!0}),J=()=>({updateAt:(0,p.serverTimestamp)(),delete:!1});function Y(e){switch(e){case`auth/user-not-found`:return`libs:auth.errors.user_not_found`;case`auth/wrong-password`:return`libs:auth.errors.wrong_password`;case`auth/invalid-credential`:return`libs:auth.errors.invalid_credential`;case`auth/invalid-email`:return`libs:auth.errors.invalid_email`;case`auth/user-disabled`:return`libs:auth.errors.user_disabled`;case`auth/too-many-requests`:return`libs:auth.errors.too_many_requests`;case`auth/network-request-failed`:return`libs:auth.errors.network_request_failed`;case`auth/timeout`:return`libs:auth.errors.timeout`;case`auth/email-already-in-use`:return`libs:auth.errors.email_already_in_use`;case`auth/weak-password`:return`libs:auth.errors.weak_password`;case`auth/requires-recent-login`:return`libs:auth.errors.requires_recent_login`;case`auth/user-token-expired`:return`libs:auth.errors.user_token_expired`;case`auth/popup-blocked`:return`libs:auth.errors.popup_blocked`;case`auth/popup-closed-by-user`:return`libs:auth.errors.popup_closed_by_user`;case`auth/operation-not-allowed`:return`libs:auth.errors.operation_not_allowed`;case`auth/web-storage-unsupported`:return`libs:auth.errors.web_storage_unsupported`;case`auth/unauthorized-domain`:return`libs:auth.errors.unauthorized_domain`;default:return`libs:auth.errors.default`}}var X={auth:{errors:{invalid_credential:`이메일 또는 비밀번호를 다시 확인해 주세요.`,wrong_password:`이메일 또는 비밀번호를 다시 확인해 주세요.`,user_not_found:`입력한 정보와 일치하는 계정을 찾을 수 없어요.`,invalid_email:`이메일 형식을 확인해 주세요.`,email_already_in_use:`이미 가입된 이메일이에요. 로그인하거나 다른 이메일을 사용해 주세요.`,weak_password:`비밀번호는 6자 이상으로 입력해 주세요.`,user_disabled:`이 계정은 현재 사용할 수 없어요. 관리자에게 문의해 주세요.`,too_many_requests:`시도가 너무 많아요. 잠시 후 다시 시도해 주세요.`,network_request_failed:`인터넷 연결을 확인한 뒤 다시 시도해 주세요.`,timeout:`응답이 지연되고 있어요. 잠시 후 다시 시도해 주세요.`,requires_recent_login:`보안을 위해 다시 로그인해 주세요.`,user_token_expired:`로그인 시간이 만료되었어요. 다시 로그인해 주세요.`,operation_not_allowed:`현재 사용할 수 없는 로그인 방식이에요.`,account_exists_with_different_credential:`이미 다른 로그인 방식으로 가입된 이메일이에요. 기존 방식으로 로그인해 주세요.`,popup_blocked:`로그인 창이 차단되었어요. 팝업 허용 후 다시 시도해 주세요.`,popup_closed_by_user:`로그인 창이 닫혀서 로그인이 완료되지 않았어요.`,web_storage_unsupported:`현재 브라우저 설정에서는 로그인을 진행할 수 없어요.`,unauthorized_domain:`현재 접속한 도메인에서는 로그인을 사용할 수 없어요.`,internal_error:`문제가 발생했어요. 잠시 후 다시 시도해 주세요.`,default:`로그인 중 문제가 발생했어요. 잠시 후 다시 시도해 주세요.`}},unknown_error_occurred:`알 수 없는 오류가 발생했습니다.`,datetime:{date_format:`YYYY년 M월 D일`,date_time_format:`YYYY년 M월 D일 A h:mm:ss`,time_format:`A h:mm:ss`},add_assets:`애셋 추가`},Z={auth:{errors:{invalid_credential:`Please check your email or password.`,wrong_password:`Please check your email or password.`,user_not_found:`We couldn’t find an account matching that information.`,invalid_email:`Please check your email format.`,email_already_in_use:`This email is already registered. Sign in or use a different email.`,weak_password:`Your password must be at least 6 characters long.`,user_disabled:`This account is currently unavailable. Please contact support.`,too_many_requests:`Too many attempts. Please try again later.`,network_request_failed:`Check your internet connection and try again.`,timeout:`The request is taking too long. Please try again.`,requires_recent_login:`For security reasons, please sign in again.`,user_token_expired:`Your session has expired. Please sign in again.`,operation_not_allowed:`This sign-in method is currently unavailable.`,account_exists_with_different_credential:`This email is already linked to another sign-in method. Please use that method to sign in.`,popup_blocked:`The sign-in window was blocked. Please allow pop-ups and try again.`,popup_closed_by_user:`The sign-in window was closed before completion.`,web_storage_unsupported:`Sign-in is not available with your current browser settings.`,unauthorized_domain:`Sign-in is not available on this domain.`,internal_error:`Something went wrong. Please try again later.`,default:`We couldn’t complete the sign-in. Please try again later.`}},unknown_error_occurred:`Unknown error occurred.`,datetime:{date_format:`MMMM D, YYYY`,date_time_format:`MMMM D, YYYY h:mm:ss A`,time_format:`h:mm:ss A`},add_assets:`Add Assets`};function Q(e){e.hasResourceBundle(`ko`,`libs`)||e.addResourceBundle(`ko`,`libs`,X,!0,!1),e.hasResourceBundle(`en`,`libs`)||e.addResourceBundle(`en`,`libs`,Z,!0,!1)}var $={Info:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-sky-600), var(--color-sky-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`},Solid:{"--normal-bg":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`}},Success:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-green-600), var(--color-green-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`},Solid:{"--normal-bg":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`}},Warning:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-amber-600), var(--color-amber-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`},Solid:{"--normal-bg":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`}},Destructive:{Soft:{"--normal-bg":`color-mix(in oklab, var(--destructive) 10%, var(--background))`,"--normal-text":`var(--destructive)`,"--normal-border":`var(--destructive)`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`var(--destructive)`,"--normal-border":`var(--destructive)`},Solid:{"--normal-bg":`light-dark(var(--destructive), color-mix(in oklab, var(--destructive) 60%, var(--background)))`,"--normal-text":`var(--color-white)`,"--normal-border":`transparent`}}};exports.CrossfadeImage=g,exports.ImageUploadField=O,exports.ImageUploadItem=v,exports.ImageUploadSortableField=k,exports.SUPPORTED_LOCALES=_,exports.ToastCSS=$,exports.createZustandContext=L,exports.dateIdFormat=W,exports.deleteItem=q,exports.fetchItems=j,exports.fetchItemsByOne=M,exports.getAuthErrorKey=Y,exports.getPlatformType=I,exports.getSnapshots=F,exports.initIenlabI18n=Q,exports.snapshotToData=A,exports.time24Format=G,exports.undeleteItem=J,exports.useDateTimeFormatters=U;
@@ -256,14 +256,6 @@ function W(e, t, n = {}) {
256
256
  }, a);
257
257
  }
258
258
  //#endregion
259
- //#region src/utils/array.ts
260
- Array.prototype.mapNotNull = function(e) {
261
- return this.flatMap((t, n) => {
262
- let r = e(t, n);
263
- return r == null ? [] : [r];
264
- });
265
- };
266
- //#endregion
267
259
  //#region src/utils/platform.ts
268
260
  function G() {
269
261
  if (typeof window > "u") return "pc";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ienlab/react-library",
3
- "version": "0.14.1",
3
+ "version": "0.14.2-beta.1",
4
4
  "description": "My React component library",
5
5
  "main": "./dist/my-library.cjs.js",
6
6
  "module": "./dist/my-library.es.js",
@@ -15,6 +15,10 @@
15
15
  "types": "./dist/index.d.ts"
16
16
  }
17
17
  },
18
+ "sideEffects": [
19
+ "*.css",
20
+ "**/*.css"
21
+ ],
18
22
  "type": "module",
19
23
  "scripts": {
20
24
  "dev": "vite",