@ienlab/react-library 0.14.2-beta.1 → 0.14.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/image/ImageUploadField.d.ts +1 -1
- package/dist/components/image/ImageUploadField.d.ts.map +1 -1
- package/dist/components/image/ImageUploadSortableField.d.ts.map +1 -1
- package/dist/components/image/index.d.ts.map +1 -1
- package/dist/my-library.cjs.js +1 -1
- package/dist/my-library.es.js +296 -96
- package/dist/types/image.d.ts +2 -1
- package/dist/types/image.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/react-library.css +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ImageUploadItem } from '../../types';
|
|
2
1
|
import { DescriptionProps, FieldProps } from '../../types/image';
|
|
3
2
|
import { ComponentType, InputHTMLAttributes, LabelHTMLAttributes } from 'react';
|
|
3
|
+
import { ImageUploadItem } from '../../types';
|
|
4
4
|
type InjectedComponents = {
|
|
5
5
|
Input?: ComponentType<InputHTMLAttributes<HTMLInputElement>>;
|
|
6
6
|
Field?: ComponentType<FieldProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageUploadField.d.ts","sourceRoot":"","sources":["../../../src/components/image/ImageUploadField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImageUploadField.d.ts","sourceRoot":"","sources":["../../../src/components/image/ImageUploadField.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,gBAAgB,EACrB,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAA;AACd,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAG5C,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAA;IAC5D,KAAK,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;IACjC,UAAU,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAA;IACjE,gBAAgB,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAA;CACnD,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,KAAK,EAAE,eAAe,CAAA;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,kBAAkB,CAAA;CAChC,CAAA;AAuFD,wBAAgB,gBAAgB,CAAC,EACE,EAAE,EACF,KAAK,EACL,cAAc,EACd,eAAe,EACf,KAAK,EACL,QAAQ,EACR,WAAqB,EACrB,MAAkB,EAClB,UAAU,GACX,EAAE,qBAAqB,2CAsFxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageUploadSortableField.d.ts","sourceRoot":"","sources":["../../../src/components/image/ImageUploadSortableField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,
|
|
1
|
+
{"version":3,"file":"ImageUploadSortableField.d.ts","sourceRoot":"","sources":["../../../src/components/image/ImageUploadSortableField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EAEb,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,SAAS,EAUd,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAA;AAG1B,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAA;IAC5D,KAAK,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;IACjC,UAAU,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAA;IACjE,gBAAgB,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAA;IAClD,UAAU,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAA;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IACzC,IAAI,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAA;IAC/B,MAAM,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAA;IACvC,SAAS,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAA;CACrC,CAAA;AAED,KAAK,6BAA6B,GAAG;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,MAAM,CAAA;IACvB,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,IAAI,CAAA;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,kBAAkB,CAAA;CAChC,CAAA;AA+HD,wBAAgB,wBAAwB,CAAC,EACE,EAAE,EACF,KAAK,EACL,eAAe,EACf,cAAc,EACd,KAAK,EACL,QAAQ,EACR,WAAqB,EACrB,MAAkB,EAClB,UAAU,GACX,EAAE,6BAA6B,2CAgIxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/image/index.ts"],"names":[],"mappings":"AAAA,
|
|
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"}
|
package/dist/my-library.cjs.js
CHANGED
|
@@ -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)}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 _=({children:e})=>(0,d.jsx)(`div`,{children:e}),v=e=>(0,d.jsx)(`label`,{...e}),y=({children:e})=>(0,d.jsx)(`p`,{children:e}),b=e=>(0,d.jsx)(`input`,{...e}),x=({children:e,...t})=>(0,d.jsx)(`div`,{...t,children:e}),S=e=>null,C=({children:e,...t})=>(0,d.jsx)(`div`,{...t,children:e}),w=({children:e,type:t=`button`,...n})=>(0,d.jsx)(`button`,{type:t,...n,children:e}),T=({className:e})=>(0,d.jsx)(`span`,{className:e,children:`×`}),E=[`ko`,`en`],D=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)}},O={wrapper:{display:`flex`,flexDirection:`column`,gap:`1rem`},trigger:{display:`block`,cursor:`pointer`},card:{position:`relative`,overflow:`hidden`,borderRadius:`1.5rem`,border:`1px solid #e5e7eb`,backgroundColor:`#ffffff`,transition:`background-color 160ms ease, box-shadow 160ms ease`},frame:{position:`relative`,width:`100%`,aspectRatio:`16 / 9`},imageLayer:{position:`absolute`,inset:0,padding:`1.5rem`},imageBox:{margin:`0 auto`,maxWidth:`100%`,maxHeight:`100%`},image:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`},empty:{display:`flex`,width:`100%`,height:`100%`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`1rem`,color:`#6b7280`,textAlign:`center`,padding:`1rem`,boxSizing:`border-box`},badge:{borderRadius:`1rem`,backgroundColor:`#f3f4f6`,padding:`0.75rem 1rem`,fontSize:`0.875rem`,lineHeight:1.2,color:`#111827`},hint:{margin:0,fontSize:`0.875rem`,lineHeight:1.4},overlay:{pointerEvents:`none`,position:`absolute`,inset:0,borderRadius:`inherit`,boxShadow:`inset 0 0 0 0 rgba(59, 130, 246, 0)`,transition:`box-shadow 160ms ease`}};function k({id:e,label:t,uploadHintText:n,descriptionText:r,value:i,onChange:a,aspectRatio:o=`1 / 1`,accept:s=`image/*`,components:c}){let{t:u}=(0,f.useTranslation)(),p=c?.Field??_,m=c?.FieldLabel??v,h=c?.FieldDescription??y,x=c?.Input??b,S={...O.imageBox,aspectRatio:o},[C,w]=(0,l.useState)(!1);return(0,d.jsxs)(p,{children:[(0,d.jsx)(m,{htmlFor:e,children:t}),(0,d.jsxs)(`div`,{style:O.wrapper,children:[(0,d.jsx)(`label`,{htmlFor:e,style:{...O.trigger,backgroundColor:C?`#f9fafb`:`#ffffff`},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:(0,d.jsxs)(`div`,{style:O.card,children:[(0,d.jsx)(`div`,{style:O.frame,children:i.url?(0,d.jsx)(`div`,{style:O.imageLayer,children:(0,d.jsx)(`div`,{style:S,children:(0,d.jsx)(g,{src:i.url,className:``,alt:t,style:O.image})})}):(0,d.jsxs)(`div`,{style:O.empty,children:[(0,d.jsx)(`div`,{style:O.badge,children:u(`libs:add_assets`)}),(0,d.jsx)(`p`,{style:O.hint,children:n})]})}),(0,d.jsx)(`div`,{style:{...O.overlay,boxShadow:C?`inset 0 0 0 2px rgba(59, 130, 246, 0.16)`:`inset 0 0 0 0 rgba(59, 130, 246, 0)`}})]})}),(0,d.jsx)(x,{id:e,type:`file`,accept:s,onChange:e=>{let t=e.target.files?.[0];t&&(i.revokeIfNeeded(),a(new D({file:t,url:URL.createObjectURL(t)})),e.currentTarget.value=``)},style:{display:`none`}}),(0,d.jsx)(h,{children:r})]})]})}var A={wrapper:{display:`flex`,flexDirection:`column`,gap:`0.75rem`},outerBox:{borderRadius:`1.5rem`,border:`1px solid #e5e7eb`,backgroundColor:`#ffffff`,overflow:`hidden`},scrollArea:{width:`100%`,overflowX:`auto`,overflowY:`hidden`,whiteSpace:`nowrap`},list:{display:`flex`,width:`max-content`,gap:`1rem`,padding:`1rem`},item:{position:`relative`,flexShrink:0},card:{position:`relative`,width:`15rem`,overflow:`hidden`,borderRadius:`0.75rem`,padding:0,backgroundColor:`#ffffff`,border:`1px solid #e5e7eb`,boxSizing:`border-box`},cardInner:{position:`relative`,width:`100%`,height:`100%`},image:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`},removeButton:{position:`absolute`,right:`1rem`,bottom:`1rem`,borderRadius:`9999px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.12)`},uploadLabel:{display:`block`,flexShrink:0,cursor:`pointer`},uploadCard:{width:`15rem`,overflow:`hidden`,borderRadius:`0.75rem`,padding:0,border:`1px dashed #d1d5db`,backgroundColor:`#ffffff`,boxSizing:`border-box`,transition:`background-color 160ms ease`},uploadCardInner:{display:`flex`,width:`100%`,height:`100%`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`1rem`,color:`#6b7280`,textAlign:`center`,padding:`1rem`,boxSizing:`border-box`},badge:{borderRadius:`1rem`,backgroundColor:`#f3f4f6`,padding:`0.75rem 1rem`,fontSize:`0.875rem`,lineHeight:1.2,color:`#111827`},hint:{margin:0,fontSize:`0.875rem`,lineHeight:1.4},description:{marginTop:`0.25rem`},hiddenInput:{display:`none`},scrollBar:{marginLeft:`1rem`,marginRight:`1rem`}};function j({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??_,m=c?.FieldLabel??v,h=c?.FieldDescription??y,E=c?.Input??b,O=c?.ScrollArea??x,k=c?.ScrollBar??S,j=c?.Card??C,M=c?.Button??w,N=c?.CloseIcon??T,P=e=>{e.revokeIfNeeded(),a(i.filter(t=>t!==e))},F=e=>{!e||e.length===0||a([...i,...Array.from(e).map(e=>new D({file:e,url:URL.createObjectURL(e)}))])},I={...A.card,aspectRatio:o},L={...A.uploadCard,aspectRatio:o};return(0,d.jsxs)(p,{children:[(0,d.jsx)(m,{htmlFor:e,children:t}),(0,d.jsxs)(`div`,{style:A.wrapper,children:[(0,d.jsxs)(`div`,{style:A.outerBox,children:[(0,d.jsxs)(O,{style:A.scrollArea,children:[(0,d.jsxs)(u.Reorder.Group,{axis:`x`,values:i,onReorder:a,layoutScroll:!0,style:A.list,children:[i.map(e=>(0,d.jsx)(u.Reorder.Item,{value:e,style:A.item,children:(0,d.jsx)(j,{style:I,children:(0,d.jsxs)(`div`,{style:A.cardInner,children:[(0,d.jsx)(g,{src:e.url,className:``,alt:t,style:A.image,draggable:!1}),(0,d.jsx)(M,{type:`button`,style:A.removeButton,onClick:()=>P(e),children:(0,d.jsx)(N,{})})]})})},e.url)),(0,d.jsx)(`label`,{htmlFor:e,style:A.uploadLabel,children:(0,d.jsx)(j,{style:L,onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#f9fafb`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`},children:(0,d.jsxs)(`div`,{style:A.uploadCardInner,children:[(0,d.jsx)(`div`,{style:A.badge,children:l(`libs:add_assets`)}),(0,d.jsx)(`p`,{style:A.hint,children:r})]})})})]}),(0,d.jsx)(k,{orientation:`horizontal`,style:A.scrollBar})]}),(0,d.jsx)(E,{id:e,type:`file`,accept:s,multiple:!0,onChange:e=>{F(e.target.files),e.currentTarget.value=``},style:A.hiddenInput})]}),(0,d.jsx)(`div`,{style:A.description,children:(0,d.jsx)(h,{children:n})})]})]})}function M(e){return{...e.data(),id:e.id}}async function N(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 P(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 F(e={}){let{cache:t=!0,includeMetadataChanges:n}=e;return{listenOptions:{includeMetadataChanges:n??!t},cache:t}}function I(e,t){return t!==!1||!e}function L(e,t,n={}){let{listenOptions:r,cache:i}=F(n),{onError:a}=n;return e.type,(0,p.onSnapshot)(e,r,e=>{I(e.metadata.fromCache,i)&&t(e)},a)}function R(){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 z(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 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=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}))})),V=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(B()):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}))})),H=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])+`]`}}}))})),U=c(B(),1);V(),H();function W(e,t,n){let r=(0,U.default)(e);return!e||!r.isValid()?``:r.format(n(t))}function G(){let{t:e}=(0,f.useTranslation)();return(0,l.useMemo)(()=>({basicDateTimeFormat:(t,n)=>W(t,n,e),dateTimeFormat:t=>W(t,`libs:datetime.date_time_format`,e),dateFormat:t=>W(t,`libs:datetime.date_format`,e),timeFormat:t=>W(t,`libs:datetime.time_format`,e)}),[e])}function K(e){let t=(0,U.default)(e);return t.isValid()?t.format(`YYYYMMDD`):``}function q(e){let t=(0,U.default)(e);return t.isValid()?t.format(`HH:mm`):``}var J=e=>{let t=e?.split(`-`)[0]===`ko`?`ko`:`en`;U.default.locale(t)};h.default.isInitialized&&J(h.default.resolvedLanguage||h.default.language),h.default.on(`languageChanged`,J);var Y=()=>({updateAt:(0,p.serverTimestamp)(),delete:!0}),X=()=>({updateAt:(0,p.serverTimestamp)(),delete:!1});function Z(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 Q={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:`애셋 추가`},$={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 ee(e){e.hasResourceBundle(`ko`,`libs`)||e.addResourceBundle(`ko`,`libs`,Q,!0,!1),e.hasResourceBundle(`en`,`libs`)||e.addResourceBundle(`en`,`libs`,$,!0,!1)}var te={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=k,exports.ImageUploadItem=D,exports.ImageUploadSortableField=j,exports.SUPPORTED_LOCALES=E,exports.ToastCSS=te,exports.createZustandContext=z,exports.dateIdFormat=K,exports.deleteItem=Y,exports.fetchItems=N,exports.fetchItemsByOne=P,exports.getAuthErrorKey=Z,exports.getPlatformType=R,exports.getSnapshots=L,exports.initIenlabI18n=ee,exports.snapshotToData=M,exports.time24Format=q,exports.undeleteItem=X,exports.useDateTimeFormatters=G;
|
package/dist/my-library.es.js
CHANGED
|
@@ -47,8 +47,21 @@ function O({ placeholder: e, src: t, onLoadError: r, ...o }) {
|
|
|
47
47
|
}, "placeholder") });
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region src/types/
|
|
51
|
-
var k =
|
|
50
|
+
//#region src/types/image.tsx
|
|
51
|
+
var k = ({ children: e }) => /* @__PURE__ */ c("div", { children: e }), A = (e) => /* @__PURE__ */ c("label", { ...e }), j = ({ children: e }) => /* @__PURE__ */ c("p", { children: e }), M = (e) => /* @__PURE__ */ c("input", { ...e }), N = ({ children: e, ...t }) => /* @__PURE__ */ c("div", {
|
|
52
|
+
...t,
|
|
53
|
+
children: e
|
|
54
|
+
}), P = (e) => null, F = ({ children: e, ...t }) => /* @__PURE__ */ c("div", {
|
|
55
|
+
...t,
|
|
56
|
+
children: e
|
|
57
|
+
}), te = ({ children: e, type: t = "button", ...n }) => /* @__PURE__ */ c("button", {
|
|
58
|
+
type: t,
|
|
59
|
+
...n,
|
|
60
|
+
children: e
|
|
61
|
+
}), ne = ({ className: e }) => /* @__PURE__ */ c("span", {
|
|
62
|
+
className: e,
|
|
63
|
+
children: "×"
|
|
64
|
+
}), re = ["ko", "en"], I = class {
|
|
52
65
|
url = "";
|
|
53
66
|
file = null;
|
|
54
67
|
constructor(e = {}) {
|
|
@@ -60,120 +73,299 @@ var k = ["ko", "en"], A = class {
|
|
|
60
73
|
revokeIfNeeded() {
|
|
61
74
|
this.file && this.isBlobUrl() && URL.revokeObjectURL(this.url);
|
|
62
75
|
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
}, L = {
|
|
77
|
+
wrapper: {
|
|
78
|
+
display: "flex",
|
|
79
|
+
flexDirection: "column",
|
|
80
|
+
gap: "1rem"
|
|
81
|
+
},
|
|
82
|
+
trigger: {
|
|
83
|
+
display: "block",
|
|
84
|
+
cursor: "pointer"
|
|
85
|
+
},
|
|
86
|
+
card: {
|
|
87
|
+
position: "relative",
|
|
88
|
+
overflow: "hidden",
|
|
89
|
+
borderRadius: "1.5rem",
|
|
90
|
+
border: "1px solid #e5e7eb",
|
|
91
|
+
backgroundColor: "#ffffff",
|
|
92
|
+
transition: "background-color 160ms ease, box-shadow 160ms ease"
|
|
93
|
+
},
|
|
94
|
+
frame: {
|
|
95
|
+
position: "relative",
|
|
96
|
+
width: "100%",
|
|
97
|
+
aspectRatio: "16 / 9"
|
|
98
|
+
},
|
|
99
|
+
imageLayer: {
|
|
100
|
+
position: "absolute",
|
|
101
|
+
inset: 0,
|
|
102
|
+
padding: "1.5rem"
|
|
103
|
+
},
|
|
104
|
+
imageBox: {
|
|
105
|
+
margin: "0 auto",
|
|
106
|
+
maxWidth: "100%",
|
|
107
|
+
maxHeight: "100%"
|
|
108
|
+
},
|
|
109
|
+
image: {
|
|
110
|
+
width: "100%",
|
|
111
|
+
height: "100%",
|
|
112
|
+
objectFit: "cover",
|
|
113
|
+
display: "block"
|
|
114
|
+
},
|
|
115
|
+
empty: {
|
|
116
|
+
display: "flex",
|
|
117
|
+
width: "100%",
|
|
118
|
+
height: "100%",
|
|
119
|
+
flexDirection: "column",
|
|
120
|
+
alignItems: "center",
|
|
121
|
+
justifyContent: "center",
|
|
122
|
+
gap: "1rem",
|
|
123
|
+
color: "#6b7280",
|
|
124
|
+
textAlign: "center",
|
|
125
|
+
padding: "1rem",
|
|
126
|
+
boxSizing: "border-box"
|
|
127
|
+
},
|
|
128
|
+
badge: {
|
|
129
|
+
borderRadius: "1rem",
|
|
130
|
+
backgroundColor: "#f3f4f6",
|
|
131
|
+
padding: "0.75rem 1rem",
|
|
132
|
+
fontSize: "0.875rem",
|
|
133
|
+
lineHeight: 1.2,
|
|
134
|
+
color: "#111827"
|
|
135
|
+
},
|
|
136
|
+
hint: {
|
|
137
|
+
margin: 0,
|
|
138
|
+
fontSize: "0.875rem",
|
|
139
|
+
lineHeight: 1.4
|
|
140
|
+
},
|
|
141
|
+
overlay: {
|
|
142
|
+
pointerEvents: "none",
|
|
143
|
+
position: "absolute",
|
|
144
|
+
inset: 0,
|
|
145
|
+
borderRadius: "inherit",
|
|
146
|
+
boxShadow: "inset 0 0 0 0 rgba(59, 130, 246, 0)",
|
|
147
|
+
transition: "box-shadow 160ms ease"
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
function R({ id: e, label: t, uploadHintText: n, descriptionText: r, value: a, onChange: o, aspectRatio: s = "1 / 1", accept: d = "image/*", components: f }) {
|
|
151
|
+
let { t: p } = u(), m = f?.Field ?? k, h = f?.FieldLabel ?? A, g = f?.FieldDescription ?? j, _ = f?.Input ?? M, v = {
|
|
152
|
+
...L.imageBox,
|
|
153
|
+
aspectRatio: s
|
|
154
|
+
}, [y, b] = i(!1);
|
|
155
|
+
return /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(h, {
|
|
82
156
|
htmlFor: e,
|
|
83
157
|
children: t
|
|
84
158
|
}), /* @__PURE__ */ l("div", {
|
|
85
|
-
|
|
159
|
+
style: L.wrapper,
|
|
86
160
|
children: [
|
|
87
161
|
/* @__PURE__ */ c("label", {
|
|
88
162
|
htmlFor: e,
|
|
89
|
-
|
|
163
|
+
style: {
|
|
164
|
+
...L.trigger,
|
|
165
|
+
backgroundColor: y ? "#f9fafb" : "#ffffff"
|
|
166
|
+
},
|
|
167
|
+
onMouseEnter: () => b(!0),
|
|
168
|
+
onMouseLeave: () => b(!1),
|
|
90
169
|
children: /* @__PURE__ */ l("div", {
|
|
91
|
-
|
|
170
|
+
style: L.card,
|
|
92
171
|
children: [/* @__PURE__ */ c("div", {
|
|
93
|
-
|
|
94
|
-
children:
|
|
95
|
-
|
|
172
|
+
style: L.frame,
|
|
173
|
+
children: a.url ? /* @__PURE__ */ c("div", {
|
|
174
|
+
style: L.imageLayer,
|
|
96
175
|
children: /* @__PURE__ */ c("div", {
|
|
97
|
-
|
|
98
|
-
style: { aspectRatio: o },
|
|
176
|
+
style: v,
|
|
99
177
|
children: /* @__PURE__ */ c(O, {
|
|
100
|
-
src:
|
|
101
|
-
className: "
|
|
102
|
-
alt: t
|
|
178
|
+
src: a.url,
|
|
179
|
+
className: "",
|
|
180
|
+
alt: t,
|
|
181
|
+
style: L.image
|
|
103
182
|
})
|
|
104
183
|
})
|
|
105
184
|
}) : /* @__PURE__ */ l("div", {
|
|
106
|
-
|
|
185
|
+
style: L.empty,
|
|
107
186
|
children: [/* @__PURE__ */ c("div", {
|
|
108
|
-
|
|
109
|
-
children:
|
|
187
|
+
style: L.badge,
|
|
188
|
+
children: p("libs:add_assets")
|
|
110
189
|
}), /* @__PURE__ */ c("p", {
|
|
111
|
-
|
|
190
|
+
style: L.hint,
|
|
112
191
|
children: n
|
|
113
192
|
})]
|
|
114
193
|
})
|
|
115
|
-
}), /* @__PURE__ */ c("div", {
|
|
194
|
+
}), /* @__PURE__ */ c("div", { style: {
|
|
195
|
+
...L.overlay,
|
|
196
|
+
boxShadow: y ? "inset 0 0 0 2px rgba(59, 130, 246, 0.16)" : "inset 0 0 0 0 rgba(59, 130, 246, 0)"
|
|
197
|
+
} })]
|
|
116
198
|
})
|
|
117
199
|
}),
|
|
118
|
-
/* @__PURE__ */ c(
|
|
200
|
+
/* @__PURE__ */ c(_, {
|
|
119
201
|
id: e,
|
|
120
202
|
type: "file",
|
|
121
|
-
accept:
|
|
122
|
-
className: "iu-hidden-input",
|
|
203
|
+
accept: d,
|
|
123
204
|
onChange: (e) => {
|
|
124
205
|
let t = e.target.files?.[0];
|
|
125
|
-
t && (
|
|
206
|
+
t && (a.revokeIfNeeded(), o(new I({
|
|
126
207
|
file: t,
|
|
127
208
|
url: URL.createObjectURL(t)
|
|
128
209
|
})), e.currentTarget.value = "");
|
|
129
|
-
}
|
|
210
|
+
},
|
|
211
|
+
style: { display: "none" }
|
|
130
212
|
}),
|
|
131
|
-
/* @__PURE__ */ c(
|
|
213
|
+
/* @__PURE__ */ c(g, { children: r })
|
|
132
214
|
]
|
|
133
215
|
})] });
|
|
134
216
|
}
|
|
135
217
|
//#endregion
|
|
136
218
|
//#region src/components/image/ImageUploadSortableField.tsx
|
|
137
|
-
|
|
138
|
-
|
|
219
|
+
var z = {
|
|
220
|
+
wrapper: {
|
|
221
|
+
display: "flex",
|
|
222
|
+
flexDirection: "column",
|
|
223
|
+
gap: "0.75rem"
|
|
224
|
+
},
|
|
225
|
+
outerBox: {
|
|
226
|
+
borderRadius: "1.5rem",
|
|
227
|
+
border: "1px solid #e5e7eb",
|
|
228
|
+
backgroundColor: "#ffffff",
|
|
229
|
+
overflow: "hidden"
|
|
230
|
+
},
|
|
231
|
+
scrollArea: {
|
|
232
|
+
width: "100%",
|
|
233
|
+
overflowX: "auto",
|
|
234
|
+
overflowY: "hidden",
|
|
235
|
+
whiteSpace: "nowrap"
|
|
236
|
+
},
|
|
237
|
+
list: {
|
|
238
|
+
display: "flex",
|
|
239
|
+
width: "max-content",
|
|
240
|
+
gap: "1rem",
|
|
241
|
+
padding: "1rem"
|
|
242
|
+
},
|
|
243
|
+
item: {
|
|
244
|
+
position: "relative",
|
|
245
|
+
flexShrink: 0
|
|
246
|
+
},
|
|
247
|
+
card: {
|
|
248
|
+
position: "relative",
|
|
249
|
+
width: "15rem",
|
|
250
|
+
overflow: "hidden",
|
|
251
|
+
borderRadius: "0.75rem",
|
|
252
|
+
padding: 0,
|
|
253
|
+
backgroundColor: "#ffffff",
|
|
254
|
+
border: "1px solid #e5e7eb",
|
|
255
|
+
boxSizing: "border-box"
|
|
256
|
+
},
|
|
257
|
+
cardInner: {
|
|
258
|
+
position: "relative",
|
|
259
|
+
width: "100%",
|
|
260
|
+
height: "100%"
|
|
261
|
+
},
|
|
262
|
+
image: {
|
|
263
|
+
width: "100%",
|
|
264
|
+
height: "100%",
|
|
265
|
+
objectFit: "cover",
|
|
266
|
+
display: "block"
|
|
267
|
+
},
|
|
268
|
+
removeButton: {
|
|
269
|
+
position: "absolute",
|
|
270
|
+
right: "1rem",
|
|
271
|
+
bottom: "1rem",
|
|
272
|
+
borderRadius: "9999px",
|
|
273
|
+
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.12)"
|
|
274
|
+
},
|
|
275
|
+
uploadLabel: {
|
|
276
|
+
display: "block",
|
|
277
|
+
flexShrink: 0,
|
|
278
|
+
cursor: "pointer"
|
|
279
|
+
},
|
|
280
|
+
uploadCard: {
|
|
281
|
+
width: "15rem",
|
|
282
|
+
overflow: "hidden",
|
|
283
|
+
borderRadius: "0.75rem",
|
|
284
|
+
padding: 0,
|
|
285
|
+
border: "1px dashed #d1d5db",
|
|
286
|
+
backgroundColor: "#ffffff",
|
|
287
|
+
boxSizing: "border-box",
|
|
288
|
+
transition: "background-color 160ms ease"
|
|
289
|
+
},
|
|
290
|
+
uploadCardInner: {
|
|
291
|
+
display: "flex",
|
|
292
|
+
width: "100%",
|
|
293
|
+
height: "100%",
|
|
294
|
+
flexDirection: "column",
|
|
295
|
+
alignItems: "center",
|
|
296
|
+
justifyContent: "center",
|
|
297
|
+
gap: "1rem",
|
|
298
|
+
color: "#6b7280",
|
|
299
|
+
textAlign: "center",
|
|
300
|
+
padding: "1rem",
|
|
301
|
+
boxSizing: "border-box"
|
|
302
|
+
},
|
|
303
|
+
badge: {
|
|
304
|
+
borderRadius: "1rem",
|
|
305
|
+
backgroundColor: "#f3f4f6",
|
|
306
|
+
padding: "0.75rem 1rem",
|
|
307
|
+
fontSize: "0.875rem",
|
|
308
|
+
lineHeight: 1.2,
|
|
309
|
+
color: "#111827"
|
|
310
|
+
},
|
|
311
|
+
hint: {
|
|
312
|
+
margin: 0,
|
|
313
|
+
fontSize: "0.875rem",
|
|
314
|
+
lineHeight: 1.4
|
|
315
|
+
},
|
|
316
|
+
description: { marginTop: "0.25rem" },
|
|
317
|
+
hiddenInput: { display: "none" },
|
|
318
|
+
scrollBar: {
|
|
319
|
+
marginLeft: "1rem",
|
|
320
|
+
marginRight: "1rem"
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
function B({ id: e, label: t, descriptionText: n, uploadHintText: r, items: i, onChange: a, aspectRatio: s = "1 / 1", accept: d = "image/*", components: f }) {
|
|
324
|
+
let { t: p } = u(), m = f?.Field ?? k, h = f?.FieldLabel ?? A, g = f?.FieldDescription ?? j, _ = f?.Input ?? M, v = f?.ScrollArea ?? N, y = f?.ScrollBar ?? P, b = f?.Card ?? F, x = f?.Button ?? te, S = f?.CloseIcon ?? ne, C = (e) => {
|
|
139
325
|
e.revokeIfNeeded(), a(i.filter((t) => t !== e));
|
|
140
326
|
}, w = (e) => {
|
|
141
|
-
!e || e.length === 0 || a([...i, ...Array.from(e).map((e) => new
|
|
327
|
+
!e || e.length === 0 || a([...i, ...Array.from(e).map((e) => new I({
|
|
142
328
|
file: e,
|
|
143
329
|
url: URL.createObjectURL(e)
|
|
144
330
|
}))]);
|
|
145
|
-
}, T = {
|
|
331
|
+
}, T = {
|
|
332
|
+
...z.card,
|
|
333
|
+
aspectRatio: s
|
|
334
|
+
}, E = {
|
|
335
|
+
...z.uploadCard,
|
|
336
|
+
aspectRatio: s
|
|
337
|
+
};
|
|
146
338
|
return /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(h, {
|
|
147
339
|
htmlFor: e,
|
|
148
340
|
children: t
|
|
149
341
|
}), /* @__PURE__ */ l("div", {
|
|
150
|
-
|
|
342
|
+
style: z.wrapper,
|
|
151
343
|
children: [/* @__PURE__ */ l("div", {
|
|
152
|
-
|
|
344
|
+
style: z.outerBox,
|
|
153
345
|
children: [/* @__PURE__ */ l(v, {
|
|
154
|
-
|
|
346
|
+
style: z.scrollArea,
|
|
155
347
|
children: [/* @__PURE__ */ l(o.Group, {
|
|
156
348
|
axis: "x",
|
|
157
349
|
values: i,
|
|
158
350
|
onReorder: a,
|
|
159
351
|
layoutScroll: !0,
|
|
160
|
-
|
|
352
|
+
style: z.list,
|
|
161
353
|
children: [i.map((e) => /* @__PURE__ */ c(o.Item, {
|
|
162
354
|
value: e,
|
|
163
|
-
|
|
355
|
+
style: z.item,
|
|
164
356
|
children: /* @__PURE__ */ c(b, {
|
|
165
|
-
className: "iusf-card",
|
|
166
357
|
style: T,
|
|
167
358
|
children: /* @__PURE__ */ l("div", {
|
|
168
|
-
|
|
359
|
+
style: z.cardInner,
|
|
169
360
|
children: [/* @__PURE__ */ c(O, {
|
|
170
361
|
src: e.url,
|
|
171
|
-
className: "
|
|
172
|
-
|
|
173
|
-
|
|
362
|
+
className: "",
|
|
363
|
+
alt: t,
|
|
364
|
+
style: z.image,
|
|
365
|
+
draggable: !1
|
|
174
366
|
}), /* @__PURE__ */ c(x, {
|
|
175
367
|
type: "button",
|
|
176
|
-
|
|
368
|
+
style: z.removeButton,
|
|
177
369
|
onClick: () => C(e),
|
|
178
370
|
children: /* @__PURE__ */ c(S, {})
|
|
179
371
|
})]
|
|
@@ -181,17 +373,22 @@ function R({ id: e, label: t, descriptionText: n, uploadHintText: r, items: i, o
|
|
|
181
373
|
})
|
|
182
374
|
}, e.url)), /* @__PURE__ */ c("label", {
|
|
183
375
|
htmlFor: e,
|
|
184
|
-
|
|
376
|
+
style: z.uploadLabel,
|
|
185
377
|
children: /* @__PURE__ */ c(b, {
|
|
186
|
-
|
|
187
|
-
|
|
378
|
+
style: E,
|
|
379
|
+
onMouseEnter: (e) => {
|
|
380
|
+
e.currentTarget.style.backgroundColor = "#f9fafb";
|
|
381
|
+
},
|
|
382
|
+
onMouseLeave: (e) => {
|
|
383
|
+
e.currentTarget.style.backgroundColor = "#ffffff";
|
|
384
|
+
},
|
|
188
385
|
children: /* @__PURE__ */ l("div", {
|
|
189
|
-
|
|
386
|
+
style: z.uploadCardInner,
|
|
190
387
|
children: [/* @__PURE__ */ c("div", {
|
|
191
|
-
|
|
388
|
+
style: z.badge,
|
|
192
389
|
children: p("libs:add_assets")
|
|
193
390
|
}), /* @__PURE__ */ c("p", {
|
|
194
|
-
|
|
391
|
+
style: z.hint,
|
|
195
392
|
children: r
|
|
196
393
|
})]
|
|
197
394
|
})
|
|
@@ -199,30 +396,33 @@ function R({ id: e, label: t, descriptionText: n, uploadHintText: r, items: i, o
|
|
|
199
396
|
})]
|
|
200
397
|
}), /* @__PURE__ */ c(y, {
|
|
201
398
|
orientation: "horizontal",
|
|
202
|
-
|
|
399
|
+
style: z.scrollBar
|
|
203
400
|
})]
|
|
204
401
|
}), /* @__PURE__ */ c(_, {
|
|
205
402
|
id: e,
|
|
206
403
|
type: "file",
|
|
207
404
|
accept: d,
|
|
208
405
|
multiple: !0,
|
|
209
|
-
className: "iu-hidden-input",
|
|
210
406
|
onChange: (e) => {
|
|
211
407
|
w(e.target.files), e.currentTarget.value = "";
|
|
212
|
-
}
|
|
408
|
+
},
|
|
409
|
+
style: z.hiddenInput
|
|
213
410
|
})]
|
|
214
|
-
}), /* @__PURE__ */ c(
|
|
411
|
+
}), /* @__PURE__ */ c("div", {
|
|
412
|
+
style: z.description,
|
|
413
|
+
children: /* @__PURE__ */ c(g, { children: n })
|
|
414
|
+
})]
|
|
215
415
|
})] });
|
|
216
416
|
}
|
|
217
417
|
//#endregion
|
|
218
418
|
//#region src/utils/firestore.ts
|
|
219
|
-
function
|
|
419
|
+
function V(e) {
|
|
220
420
|
return {
|
|
221
421
|
...e.data(),
|
|
222
422
|
id: e.id
|
|
223
423
|
};
|
|
224
424
|
}
|
|
225
|
-
async function
|
|
425
|
+
async function H(e, t, n, r) {
|
|
226
426
|
let i = r.filter((e) => !!(e && !n.has(e.path)));
|
|
227
427
|
for (let r = 0; r < i.length; r += 30) {
|
|
228
428
|
let a = i.slice(r, r + 30);
|
|
@@ -232,39 +432,39 @@ async function B(e, t, n, r) {
|
|
|
232
432
|
});
|
|
233
433
|
}
|
|
234
434
|
}
|
|
235
|
-
async function
|
|
435
|
+
async function U(e, t, n) {
|
|
236
436
|
let r = n.filter((e) => !!(e && !t.has(e.path)));
|
|
237
437
|
await Promise.all(r.map(async (n) => {
|
|
238
438
|
let r = e(await f(n));
|
|
239
439
|
t.set(n.path, r);
|
|
240
440
|
}));
|
|
241
441
|
}
|
|
242
|
-
function
|
|
442
|
+
function W(e = {}) {
|
|
243
443
|
let { cache: t = !0, includeMetadataChanges: n } = e;
|
|
244
444
|
return {
|
|
245
445
|
listenOptions: { includeMetadataChanges: n ?? !t },
|
|
246
446
|
cache: t
|
|
247
447
|
};
|
|
248
448
|
}
|
|
249
|
-
function
|
|
449
|
+
function G(e, t) {
|
|
250
450
|
return t !== !1 || !e;
|
|
251
451
|
}
|
|
252
|
-
function
|
|
253
|
-
let { listenOptions: r, cache: i } =
|
|
452
|
+
function K(e, t, n = {}) {
|
|
453
|
+
let { listenOptions: r, cache: i } = W(n), { onError: a } = n;
|
|
254
454
|
return e.type, m(e, r, (e) => {
|
|
255
|
-
|
|
455
|
+
G(e.metadata.fromCache, i) && t(e);
|
|
256
456
|
}, a);
|
|
257
457
|
}
|
|
258
458
|
//#endregion
|
|
259
459
|
//#region src/utils/platform.ts
|
|
260
|
-
function
|
|
460
|
+
function q() {
|
|
261
461
|
if (typeof window > "u") return "pc";
|
|
262
462
|
let e = navigator.userAgent, t = navigator.platform, n = /Android/i.test(e), r = /iPhone|iPad|iPod/i.test(e) || t === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
263
463
|
return n ? "android" : r ? "ios" : "pc";
|
|
264
464
|
}
|
|
265
465
|
//#endregion
|
|
266
466
|
//#region src/utils/zustand.tsx
|
|
267
|
-
function
|
|
467
|
+
function J(n) {
|
|
268
468
|
let r = e(null);
|
|
269
469
|
function a({ children: e, ...t }) {
|
|
270
470
|
let [a] = i(() => n(t));
|
|
@@ -287,7 +487,7 @@ function K(n) {
|
|
|
287
487
|
}
|
|
288
488
|
//#endregion
|
|
289
489
|
//#region node_modules/dayjs/dayjs.min.js
|
|
290
|
-
var
|
|
490
|
+
var Y = /* @__PURE__ */ E(((e, t) => {
|
|
291
491
|
(function(n, r) {
|
|
292
492
|
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();
|
|
293
493
|
})(e, (function() {
|
|
@@ -581,9 +781,9 @@ var q = /* @__PURE__ */ E(((e, t) => {
|
|
|
581
781
|
return w(1e3 * e);
|
|
582
782
|
}, w.en = b[y], w.Ls = b, w.p = {}, w;
|
|
583
783
|
}));
|
|
584
|
-
})),
|
|
784
|
+
})), ie = /* @__PURE__ */ E(((e, t) => {
|
|
585
785
|
(function(n, r) {
|
|
586
|
-
typeof e == "object" && t !== void 0 ? t.exports = r(
|
|
786
|
+
typeof e == "object" && t !== void 0 ? t.exports = r(Y()) : typeof define == "function" && define.amd ? define(["dayjs"], r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_locale_ko = r(n.dayjs);
|
|
587
787
|
})(e, (function(e) {
|
|
588
788
|
function t(e) {
|
|
589
789
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
@@ -631,7 +831,7 @@ var q = /* @__PURE__ */ E(((e, t) => {
|
|
|
631
831
|
};
|
|
632
832
|
return n.default.locale(r, null, !0), r;
|
|
633
833
|
}));
|
|
634
|
-
})),
|
|
834
|
+
})), ae = /* @__PURE__ */ E(((e, t) => {
|
|
635
835
|
(function(n, r) {
|
|
636
836
|
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();
|
|
637
837
|
})(e, (function() {
|
|
@@ -650,13 +850,13 @@ var q = /* @__PURE__ */ E(((e, t) => {
|
|
|
650
850
|
}
|
|
651
851
|
};
|
|
652
852
|
}));
|
|
653
|
-
})), X = /* @__PURE__ */ ee(
|
|
654
|
-
|
|
853
|
+
})), X = /* @__PURE__ */ ee(Y(), 1);
|
|
854
|
+
ie(), ae();
|
|
655
855
|
function Z(e, t, n) {
|
|
656
856
|
let r = (0, X.default)(e);
|
|
657
857
|
return !e || !r.isValid() ? "" : r.format(n(t));
|
|
658
858
|
}
|
|
659
|
-
function
|
|
859
|
+
function oe() {
|
|
660
860
|
let { t: e } = u();
|
|
661
861
|
return r(() => ({
|
|
662
862
|
basicDateTimeFormat: (t, n) => Z(t, n, e),
|
|
@@ -665,11 +865,11 @@ function ie() {
|
|
|
665
865
|
timeFormat: (t) => Z(t, "libs:datetime.time_format", e)
|
|
666
866
|
}), [e]);
|
|
667
867
|
}
|
|
668
|
-
function
|
|
868
|
+
function se(e) {
|
|
669
869
|
let t = (0, X.default)(e);
|
|
670
870
|
return t.isValid() ? t.format("YYYYMMDD") : "";
|
|
671
871
|
}
|
|
672
|
-
function
|
|
872
|
+
function ce(e) {
|
|
673
873
|
let t = (0, X.default)(e);
|
|
674
874
|
return t.isValid() ? t.format("HH:mm") : "";
|
|
675
875
|
}
|
|
@@ -680,16 +880,16 @@ var Q = (e) => {
|
|
|
680
880
|
y.isInitialized && Q(y.resolvedLanguage || y.language), y.on("languageChanged", Q);
|
|
681
881
|
//#endregion
|
|
682
882
|
//#region src/constant/firestore.ts
|
|
683
|
-
var
|
|
883
|
+
var le = () => ({
|
|
684
884
|
updateAt: g(),
|
|
685
885
|
delete: !0
|
|
686
|
-
}),
|
|
886
|
+
}), $ = () => ({
|
|
687
887
|
updateAt: g(),
|
|
688
888
|
delete: !1
|
|
689
889
|
});
|
|
690
890
|
//#endregion
|
|
691
891
|
//#region src/constant/auth.ts
|
|
692
|
-
function
|
|
892
|
+
function ue(e) {
|
|
693
893
|
switch (e) {
|
|
694
894
|
case "auth/user-not-found": return "libs:auth.errors.user_not_found";
|
|
695
895
|
case "auth/wrong-password": return "libs:auth.errors.wrong_password";
|
|
@@ -711,7 +911,7 @@ function ce(e) {
|
|
|
711
911
|
default: return "libs:auth.errors.default";
|
|
712
912
|
}
|
|
713
913
|
}
|
|
714
|
-
var
|
|
914
|
+
var de = {
|
|
715
915
|
auth: { errors: {
|
|
716
916
|
invalid_credential: "이메일 또는 비밀번호를 다시 확인해 주세요.",
|
|
717
917
|
wrong_password: "이메일 또는 비밀번호를 다시 확인해 주세요.",
|
|
@@ -741,7 +941,7 @@ var le = {
|
|
|
741
941
|
time_format: "A h:mm:ss"
|
|
742
942
|
},
|
|
743
943
|
add_assets: "애셋 추가"
|
|
744
|
-
},
|
|
944
|
+
}, fe = {
|
|
745
945
|
auth: { errors: {
|
|
746
946
|
invalid_credential: "Please check your email or password.",
|
|
747
947
|
wrong_password: "Please check your email or password.",
|
|
@@ -774,12 +974,12 @@ var le = {
|
|
|
774
974
|
};
|
|
775
975
|
//#endregion
|
|
776
976
|
//#region src/locales/i18n.ts
|
|
777
|
-
function
|
|
778
|
-
e.hasResourceBundle("ko", "libs") || e.addResourceBundle("ko", "libs",
|
|
977
|
+
function pe(e) {
|
|
978
|
+
e.hasResourceBundle("ko", "libs") || e.addResourceBundle("ko", "libs", de, !0, !1), e.hasResourceBundle("en", "libs") || e.addResourceBundle("en", "libs", fe, !0, !1);
|
|
779
979
|
}
|
|
780
980
|
//#endregion
|
|
781
981
|
//#region src/css/toast.ts
|
|
782
|
-
var
|
|
982
|
+
var me = {
|
|
783
983
|
Info: {
|
|
784
984
|
Soft: {
|
|
785
985
|
"--normal-bg": "color-mix(in oklab, light-dark(var(--color-sky-600), var(--color-sky-400)) 10%, var(--background))",
|
|
@@ -850,4 +1050,4 @@ var fe = {
|
|
|
850
1050
|
}
|
|
851
1051
|
};
|
|
852
1052
|
//#endregion
|
|
853
|
-
export { O as CrossfadeImage,
|
|
1053
|
+
export { O as CrossfadeImage, R as ImageUploadField, I as ImageUploadItem, B as ImageUploadSortableField, re as SUPPORTED_LOCALES, me as ToastCSS, J as createZustandContext, se as dateIdFormat, le as deleteItem, H as fetchItems, U as fetchItemsByOne, ue as getAuthErrorKey, q as getPlatformType, K as getSnapshots, pe as initIenlabI18n, V as snapshotToData, ce as time24Format, $ as undeleteItem, oe as useDateTimeFormatters };
|
package/dist/types/image.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { ButtonHTMLAttributes, CSSProperties, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export type FieldProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
};
|
|
@@ -9,6 +9,7 @@ export type CardProps = HTMLAttributes<HTMLDivElement>;
|
|
|
9
9
|
export type ScrollAreaProps = {
|
|
10
10
|
className?: string;
|
|
11
11
|
children?: ReactNode;
|
|
12
|
+
style?: CSSProperties;
|
|
12
13
|
dir?: "ltr" | "rtl";
|
|
13
14
|
type?: "auto" | "always" | "scroll" | "hover";
|
|
14
15
|
scrollHideDelay?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/types/image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACV,MAAM,OAAO,CAAA;AAEd,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA;AAEtD,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC5D,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CACxC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAA;AAErE,eAAO,MAAM,YAAY,GAAI,cAAc,UAAU,4CAA0B,CAAA;AAE/E,eAAO,MAAM,iBAAiB,GAC5B,OAAO,mBAAmB,CAAC,gBAAgB,CAAC,4CACrB,CAAA;AAEzB,eAAO,MAAM,uBAAuB,GAAI,cAAc,gBAAgB,4CAErE,CAAA;AAED,eAAO,MAAM,YAAY,GACvB,OAAO,mBAAmB,CAAC,gBAAgB,CAAC,4CACrB,CAAA;AAEzB,eAAO,MAAM,iBAAiB,GAAI,wBAGG,eAAe,4CAAqC,CAAA;AAEzF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,cAAc,SAAS,CAAA;AAEhE,eAAO,MAAM,WAAW,GAAI,wBAAwB,SAAS,4CAE5D,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,8BAIG,eAAe,4CAI/C,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,eAAe,SAAS,4CAExD,CAAA"}
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/types/image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACV,MAAM,OAAO,CAAA;AAEd,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA;AAEtD,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC5D,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CACxC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAA;AAErE,eAAO,MAAM,YAAY,GAAI,cAAc,UAAU,4CAA0B,CAAA;AAE/E,eAAO,MAAM,iBAAiB,GAC5B,OAAO,mBAAmB,CAAC,gBAAgB,CAAC,4CACrB,CAAA;AAEzB,eAAO,MAAM,uBAAuB,GAAI,cAAc,gBAAgB,4CAErE,CAAA;AAED,eAAO,MAAM,YAAY,GACvB,OAAO,mBAAmB,CAAC,gBAAgB,CAAC,4CACrB,CAAA;AAEzB,eAAO,MAAM,iBAAiB,GAAI,wBAGG,eAAe,4CAAqC,CAAA;AAEzF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,cAAc,SAAS,CAAA;AAEhE,eAAO,MAAM,WAAW,GAAI,wBAAwB,SAAS,4CAE5D,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,8BAIG,eAAe,4CAI/C,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,eAAe,SAAS,4CAExD,CAAA"}
|
package/package.json
CHANGED
package/dist/react-library.css
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.iu-hidden-input{display:none}.iu-field{flex-direction:column;gap:1rem;display:flex}.iu-trigger{cursor:pointer;display:block}.iu-card{background:#fff;border:1px solid #e5e7eb;border-radius:1.5rem;transition:background-color .16s;position:relative;overflow:hidden}.iu-trigger:hover .iu-card{background:#f9fafb}.iu-frame{aspect-ratio:16/9;width:100%;position:relative}.iu-image-layer{padding:1.5rem;position:absolute;inset:0}.iu-image-box{max-width:100%;max-height:100%;margin:0 auto}.iu-image{object-fit:cover;width:100%;height:100%;display:block}.iu-empty{box-sizing:border-box;text-align:center;color:#6b7280;flex-direction:column;justify-content:center;align-items:center;gap:1rem;width:100%;height:100%;padding:1rem;display:flex}.iu-badge{color:#111827;background:#f3f4f6;border-radius:1rem;padding:.75rem 1rem;font-size:.875rem;line-height:1.2}.iu-hint{margin:0;font-size:.875rem;line-height:1.4}.iu-overlay{pointer-events:none;border-radius:inherit;transition:box-shadow .16s;position:absolute;inset:0;box-shadow:inset 0 0 #3b82f600}.iu-trigger:hover .iu-overlay{box-shadow:inset 0 0 0 2px #3b82f629}.iusf-field{flex-direction:column;gap:.75rem;display:flex}.iusf-container{background:#fff;border:1px solid #e5e7eb;border-radius:1.5rem;overflow:hidden}.iusf-scroll-area{white-space:nowrap;width:100%;overflow:auto hidden}.iusf-list{gap:1rem;width:max-content;padding:1rem;display:flex}.iusf-item{flex-shrink:0;position:relative}.iusf-card,.iusf-upload-card{box-sizing:border-box;border-radius:.75rem;width:15rem;padding:0;overflow:hidden}.iusf-card{background:#fff;border:1px solid #e5e7eb;position:relative}.iusf-card-inner{width:100%;height:100%;position:relative}.iusf-image{object-fit:cover;width:100%;height:100%;display:block}.iusf-remove-button{border-radius:9999px;position:absolute;bottom:1rem;right:1rem;box-shadow:0 1px 3px #0000001f}.iusf-upload-trigger{cursor:pointer;flex-shrink:0;display:block}.iusf-upload-card{background:#fff;border:1px dashed #d1d5db;transition:background-color .16s}.iusf-upload-trigger:hover .iusf-upload-card{background:#f9fafb}.iusf-upload-inner{box-sizing:border-box;text-align:center;color:#6b7280;flex-direction:column;justify-content:center;align-items:center;gap:1rem;width:100%;height:100%;padding:1rem;display:flex}.iusf-scrollbar{margin:0 1rem 1rem}
|
|
2
|
-
/*$vite$:1*/
|