@creaditor/web-starterkit 1.0.50 → 1.0.51
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/2001.creaditor.bundle.js +182 -91
- package/dist/2001.creaditor.bundle.js.gz +0 -0
- package/dist/4819.creaditor.bundle.js +232 -195
- package/dist/4819.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +161 -159
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
/*! For license information please see 2001.creaditor.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2001],{92001(t,e,i){i.r(e),i.d(e,{AttachedFilesPlugin:()=>ft});const s=globalThis,r=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),n=new WeakMap;let l=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(r&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}};const a=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new l("string"==typeof t?t:t+"",void 0,o))(e)})(t):t,{is:h,defineProperty:d,getOwnPropertyDescriptor:c,getOwnPropertyNames:p,getOwnPropertySymbols:u,getPrototypeOf:f}=Object,g=globalThis,v=g.trustedTypes,m=v?v.emptyScript:"",$=g.reactiveElementPolyfillSupport,y=(t,e)=>t,_={toAttribute(t,e){switch(e){case Boolean:t=t?m:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},x=(t,e)=>!h(t,e),b={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:x};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),g.litPropertyMetadata??(g.litPropertyMetadata=new WeakMap);let A=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&d(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const o=null==s?void 0:s.call(this);null==r||r.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const t=f(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...p(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach(t=>t(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(e=t.hostConnected)||e.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(r)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of e){const e=document.createElement("style"),r=s.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)})}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(void 0!==r&&!0===s.reflect){const o=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:_).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var i,s;const r=this.constructor,o=r._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=r.getPropertyOptions(o),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:_;this._$Em=o;const l=n.fromAttribute(e,t.type);this[o]=l??(null==(s=this._$Ej)?void 0:s.get(o))??l,this._$Em=null}}requestUpdate(t,e,i){var s;if(void 0!==t){const r=this.constructor,o=this[t];if(i??(i=r.getPropertyOptions(t)),!((i.hasChanged??x)(o,e)||i.useDefault&&i.reflect&&o===(null==(s=this._$Ej)?void 0:s.get(t))&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,i,s){let{useDefault:r,reflect:o,wrapped:n}=i;r&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==n||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)}),this.update(i)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach(t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[y("elementProperties")]=new Map,A[y("finalized")]=new Map,null==$||$({ReactiveElement:A}),(g.reactiveElementVersions??(g.reactiveElementVersions=[])).push("2.1.1");const w=globalThis,E=w.trustedTypes,S=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,z="?"+L,P=`<${z}>`,M=document,T=()=>M.createComment(""),H=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,U="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,k=/>/g,N=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,V=/"/g,B=/^(?:script|style|textarea|title)$/i,D=(K=1,function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return{_$litType$:K,strings:t,values:i}}),q=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),Z=new WeakMap,W=M.createTreeWalker(M,129);var K;function J(t,e){if(!O(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}class G{constructor(t,e){let i,{strings:s,_$litType$:r}=t;this.parts=[];let o=0,n=0;const l=s.length-1,a=this.parts,[h,d]=((t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,d=0;for(;d<i.length&&(n.lastIndex=d,a=n.exec(i),null!==a);)d=n.lastIndex,n===F?"!--"===a[1]?n=R:void 0!==a[1]?n=k:void 0!==a[2]?(B.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=N):void 0!==a[3]&&(n=N):n===N?">"===a[0]?(n=r??F,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?N:'"'===a[3]?V:j):n===V||n===j?n=N:n===R||n===k?n=F:(n=N,r=void 0);const c=n===N&&t[e+1].startsWith("/>")?" ":"";o+=n===F?i+P:h>=0?(s.push(l),i.slice(0,h)+C+i.slice(h)+L+c):i+L+(-2===h?e:c)}return[J(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(s,r);if(this.el=G.createElement(h,e),W.currentNode=this.el.content,2===r||3===r){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=W.nextNode())&&a.length<l;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(C)){const e=d[n++],s=i.getAttribute(t).split(L),r=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:r[2],strings:s,ctor:"."===r[1]?et:"?"===r[1]?it:"@"===r[1]?st:tt}),i.removeAttribute(t)}else t.startsWith(L)&&(a.push({type:6,index:o}),i.removeAttribute(t));if(B.test(i.tagName)){const t=i.textContent.split(L),e=t.length-1;if(e>0){i.textContent=E?E.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],T()),W.nextNode(),a.push({type:2,index:++o});i.append(t[e],T())}}}else if(8===i.nodeType)if(i.data===z)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(L,t+1));)a.push({type:7,index:o}),t+=L.length-1}o++}}static createElement(t,e){const i=M.createElement("template");return i.innerHTML=t,i}}function Q(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;var r,o;if(e===q)return e;let n=void 0!==s?null==(r=i._$Co)?void 0:r[s]:i._$Cl;const l=H(e)?void 0:e._$litDirective$;return(null==n?void 0:n.constructor)!==l&&(null==(o=null==n?void 0:n._$AO)||o.call(n,!1),void 0===l?n=void 0:(n=new l(t),n._$AT(t,i,s)),void 0!==s?(i._$Co??(i._$Co=[]))[s]=n:i._$Cl=n),void 0!==n&&(e=Q(t,n._$AS(t,e.values),n,s)),e}class X{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=((null==t?void 0:t.creationScope)??M).importNode(e,!0);W.currentNode=s;let r=W.nextNode(),o=0,n=0,l=i[0];for(;void 0!==l;){if(o===l.index){let e;2===l.type?e=new Y(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new rt(r,this,t)),this._$AV.push(e),l=i[++n]}o!==(null==l?void 0:l.index)&&(r=W.nextNode(),o++)}return W.currentNode=M,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Y{get _$AU(){var t;return(null==(t=this._$AM)?void 0:t._$AU)??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=(null==s?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t){t=Q(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),H(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==q&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>O(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==I&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(M.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=G.createElement(J(s.h,s.h[0]),this.options)),s);if((null==(e=this._$AH)?void 0:e._$AD)===r)this._$AH.p(i);else{const t=new X(r,this),e=t.u(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=Z.get(t.strings);return void 0===e&&Z.set(t.strings,e=new G(t)),e}k(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new Y(this.O(T()),this.O(T()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;var i;for(null==(i=this._$AP)||i.call(this,!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,r){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=I}_$AI(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;const r=this.strings;let o=!1;if(void 0===r)t=Q(this,t,e,0),o=!H(t)||t!==this._$AH&&t!==q,o&&(this._$AH=t);else{const s=t;let n,l;for(t=r[0],n=0;n<r.length-1;n++)l=Q(this,s[i+n],e,n),l===q&&(l=this._$AH[n]),o||(o=!H(l)||l!==this._$AH[n]),l===I?t=I:t!==I&&(t+=(l??"")+r[n+1]),this._$AH[n]=l}o&&!s&&this.j(t)}j(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===I?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==I)}}class st extends tt{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t){if((t=Q(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0)??I)===q)return;const e=this._$AH,i=t===I&&e!==I||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,s=t!==I&&(e===I||i);i&&this.element.removeEventListener(this.name,this,e),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;"function"==typeof this._$AH?this._$AH.call((null==(e=this.options)?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class rt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const ot=w.litHtmlPolyfillSupport;null==ot||ot(G,Y),(w.litHtmlVersions??(w.litHtmlVersions=[])).push("3.3.1");const nt=globalThis;class lt extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=(null==i?void 0:i.renderBefore)??e;let r=s._$litPart$;if(void 0===r){const t=(null==i?void 0:i.renderBefore)??null;s._$litPart$=r=new Y(e.insertBefore(T(),t),t,void 0,i??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return q}}var at;lt._$litElement$=!0,lt.finalized=!0,null==(at=nt.litElementHydrateSupport)||at.call(nt,{LitElement:lt});const ht=nt.litElementPolyfillSupport;null==ht||ht({LitElement:lt}),(nt.litElementVersions??(nt.litElementVersions=[])).push("4.2.1");const dt={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:x};var ct=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,ut=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?pt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&ct(e,i,o),o};let ft=class extends lt{constructor(){super(),this.files=[],this.maxFiles=1/0,this.maxFileSizeMB=1/0,this.isLoading=!1,this.buttonText="Attached Files",this.addFilesText="Add Files",this.maxFilesReachedText="Maximum number of files reached",this.fileTooLargeText="File size exceeds the limit",this.error="",this.customColor="",this.customTextColor="",this.iconColor="",this.loadingText="Loading files...",this.lazyLoad=null,this._isOpen=!1,this._lazyLoadPromise=null,this.initializeLazyLoad()}initializeLazyLoad(){let t,e;const i=new Promise((i,s)=>{t=i,e=s});this._lazyLoadPromise={promise:i,resolve:t,reject:e},this.lazyLoad=this._lazyLoadPromise,this._lazyLoadPromise.promise.then(t=>{this.handleLazyLoadedFiles(t)}).catch(t=>{console.error("Lazy load promise rejected:",t),this.error=`Failed to load files: ${t.message}`})}handleLazyLoadedFiles(t){if(!Array.isArray(t))return void console.error("Lazy loaded files must be an array");const e=t.filter(t=>t&&"object"==typeof t?!!(t.id&&t.name&&t.type&&t.url)||(console.warn("File missing required properties:",t),!1):(console.warn("Invalid file object:",t),!1));if(0===e.length)return void console.warn("No valid files found in lazy load");const i=this.maxFiles-this.files.length;if(i<=0)return this.error=this.maxFilesReachedText,void this.dispatchEvent(new CustomEvent("max-files-reached",{detail:{maxFiles:this.maxFiles},bubbles:!0,composed:!0}));const s=e.slice(0,i);this.files=[...this.files,...s],this.error="",this.dispatchEvent(new CustomEvent("lazy-files-loaded",{detail:{files:s,totalFiles:this.files.length},bubbles:!0,composed:!0})),this.requestUpdate()}resolveLazyLoad(t){this._lazyLoadPromise&&this._lazyLoadPromise.resolve(t)}rejectLazyLoad(t){this._lazyLoadPromise&&this._lazyLoadPromise.reject(t)}getLazyLoadPromise(){var t;return(null==(t=this._lazyLoadPromise)?void 0:t.promise)||null}resetLazyLoad(){this.initializeLazyLoad()}showLoading(t){this.isLoading=!0,t&&(this.loadingText=t),this.requestUpdate()}hideLoading(){this.isLoading=!1,this.requestUpdate()}formatFileSize(t){if(0===t)return"0 B";const e=Math.floor(Math.log(t)/Math.log(1024));return`${parseFloat((t/Math.pow(1024,e)).toFixed(2))} ${["B","KB","MB","GB"][e]}`}getFilePreview(t){switch(t.type){case"image":return D`<img
|
|
3
|
-
|
|
4
|
-
src=${t.url}
|
|
5
|
-
alt=${t.name}
|
|
6
|
-
/>`;case"pdf":return D`<cdtr-icon name="pdf" size="48"></cdtr-icon>`;case"video":return D`<cdtr-icon name="video" size="48"></cdtr-icon>`;case"audio":return D`<cdtr-icon name="audio" size="48"></cdtr-icon>`;default:return D`<cdtr-icon name="file" size="48"></cdtr-icon>`}}handleFileSelect(t){const e=t.target;if(e.files&&e.files.length>0){const t=this.maxFiles-this.files.length;if(t<=0)return this.error=this.maxFilesReachedText,void this.dispatchEvent(new CustomEvent("max-files-reached",{detail:{maxFiles:this.maxFiles},bubbles:!0,composed:!0}));const i=1024*this.maxFileSizeMB*1024,s=Array.from(e.files).filter(t=>t.size>i);if(s.length>0)return this.error=`${this.fileTooLargeText} (${this.maxFileSizeMB}MB)`,void this.dispatchEvent(new CustomEvent("file-too-large",{detail:{files:s,maxSize:this.maxFileSizeMB},bubbles:!0,composed:!0}));this.error="",this.isLoading=!0;const r=Array.from(e.files).slice(0,t);let o=0;r.forEach(t=>{const e=new FileReader;e.onload=e=>{var i;const s={id:Math.random().toString(36).substr(2,9),name:t.name,type:t.type.split("/")[0],url:null==(i=e.target)?void 0:i.result,size:t.size};this.files=[...this.files,s],this.dispatchEvent(new CustomEvent("file-added",{detail:s,bubbles:!0,composed:!0})),o++,o===r.length&&(this.isLoading=!1)},e.readAsDataURL(t)})}}handleRemoveFile(t){const e=this.files.find(e=>e.id===t);e&&(this.files=this.files.filter(e=>e.id!==t),this.dispatchEvent(new CustomEvent("file-removed",{detail:e,bubbles:!0,composed:!0})))}render(){return Array.isArray(this.files)||(this.files=[]),D`
|
|
7
|
-
<div class="button-container">
|
|
2
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2001],{92001(t,e,i){i.r(e),i.d(e,{AttachedFilesPlugin:()=>vt});const s=globalThis,o=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),n=new WeakMap;let l=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}};const a=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new l("string"==typeof t?t:t+"",void 0,r))(e)})(t):t,{is:h,defineProperty:d,getOwnPropertyDescriptor:c,getOwnPropertyNames:p,getOwnPropertySymbols:u,getPrototypeOf:f}=Object,v=globalThis,g=v.trustedTypes,m=g?g.emptyScript:"",$=v.reactiveElementPolyfillSupport,x=(t,e)=>t,y={toAttribute(t,e){switch(e){case Boolean:t=t?m:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},b=(t,e)=>!h(t,e),_={attribute:!0,type:String,converter:y,reflect:!1,useDefault:!1,hasChanged:b};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),v.litPropertyMetadata??(v.litPropertyMetadata=new WeakMap);let w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_;if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&d(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const r=null==s?void 0:s.call(this);null==o||o.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??_}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;const t=f(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){const t=this.properties,e=[...p(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach(t=>t(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(e=t.hostConnected)||e.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(o)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of e){const e=document.createElement("style"),o=s.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)})}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:y).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i,s;const o=this.constructor,r=o._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=o.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:y;this._$Em=r;const l=n.fromAttribute(e,t.type);this[r]=l??(null==(s=this._$Ej)?void 0:s.get(r))??l,this._$Em=null}}requestUpdate(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;var r;if(void 0!==t){const n=this.constructor;if(!1===s&&(o=this[t]),i??(i=n.getPropertyOptions(t)),!((i.hasChanged??b)(o,e)||i.useDefault&&i.reflect&&o===(null==(r=this._$Ej)?void 0:r.get(t))&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,i,s){let{useDefault:o,reflect:r,wrapped:n}=i;o&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==n||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)}),this.update(i)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach(t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[x("elementProperties")]=new Map,w[x("finalized")]=new Map,null==$||$({ReactiveElement:w}),(v.reactiveElementVersions??(v.reactiveElementVersions=[])).push("2.1.2");const A=globalThis,C=t=>t,E=A.trustedTypes,S=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,L="$lit$",H=`lit$${Math.random().toFixed(9).slice(2)}$`,z="?"+H,P=`<${z}>`,M=document,T=()=>M.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,V="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,k=/>/g,N=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,B=/"/g,Z=/^(?:script|style|textarea|title)$/i,D=(J=1,function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return{_$litType$:J,strings:t,values:i}}),I=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),W=new WeakMap,K=M.createTreeWalker(M,129);var J;function G(t,e){if(!U(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}class X{constructor(t,e){let i,{strings:s,_$litType$:o}=t;this.parts=[];let r=0,n=0;const l=s.length-1,a=this.parts,[h,d]=((t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,d=0;for(;d<i.length&&(n.lastIndex=d,a=n.exec(i),null!==a);)d=n.lastIndex,n===F?"!--"===a[1]?n=R:void 0!==a[1]?n=k:void 0!==a[2]?(Z.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=N):void 0!==a[3]&&(n=N):n===N?">"===a[0]?(n=o??F,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?N:'"'===a[3]?B:j):n===B||n===j?n=N:n===R||n===k?n=F:(n=N,o=void 0);const c=n===N&&t[e+1].startsWith("/>")?" ":"";r+=n===F?i+P:h>=0?(s.push(l),i.slice(0,h)+L+i.slice(h)+H+c):i+H+(-2===h?e:c)}return[G(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(s,o);if(this.el=X.createElement(h,e),K.currentNode=this.el.content,2===o||3===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=K.nextNode())&&a.length<l;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(L)){const e=d[n++],s=i.getAttribute(t).split(H),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:o[2],strings:s,ctor:"."===o[1]?it:"?"===o[1]?st:"@"===o[1]?ot:et}),i.removeAttribute(t)}else t.startsWith(H)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(Z.test(i.tagName)){const t=i.textContent.split(H),e=t.length-1;if(e>0){i.textContent=E?E.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],T()),K.nextNode(),a.push({type:2,index:++r});i.append(t[e],T())}}}else if(8===i.nodeType)if(i.data===z)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(H,t+1));)a.push({type:7,index:r}),t+=H.length-1}r++}}static createElement(t,e){const i=M.createElement("template");return i.innerHTML=t,i}}function Q(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;var o,r;if(e===I)return e;let n=void 0!==s?null==(o=i._$Co)?void 0:o[s]:i._$Cl;const l=O(e)?void 0:e._$litDirective$;return(null==n?void 0:n.constructor)!==l&&(null==(r=null==n?void 0:n._$AO)||r.call(n,!1),void 0===l?n=void 0:(n=new l(t),n._$AT(t,i,s)),void 0!==s?(i._$Co??(i._$Co=[]))[s]=n:i._$Cl=n),void 0!==n&&(e=Q(t,n._$AS(t,e.values),n,s)),e}class Y{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=((null==t?void 0:t.creationScope)??M).importNode(e,!0);K.currentNode=s;let o=K.nextNode(),r=0,n=0,l=i[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new tt(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new rt(o,this,t)),this._$AV.push(e),l=i[++n]}r!==(null==l?void 0:l.index)&&(o=K.nextNode(),r++)}return K.currentNode=M,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class tt{get _$AU(){var t;return(null==(t=this._$AM)?void 0:t._$AU)??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=(null==s?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t){t=Q(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),O(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==I&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>U(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==q&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(M.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=X.createElement(G(s.h,s.h[0]),this.options)),s);if((null==(e=this._$AH)?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new Y(o,this),e=t.u(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new X(t)),e}k(t){U(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new tt(this.O(T()),this.O(T()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;var i;for(null==(i=this._$AP)||i.call(this,!1,!0,e);t!==this._$AB;){const e=C(t).nextSibling;C(t).remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}_$AI(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;const o=this.strings;let r=!1;if(void 0===o)t=Q(this,t,e,0),r=!O(t)||t!==this._$AH&&t!==I,r&&(this._$AH=t);else{const s=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Q(this,s[i+n],e,n),l===I&&(l=this._$AH[n]),r||(r=!O(l)||l!==this._$AH[n]),l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!s&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class it extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class st extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class ot extends et{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t){if((t=Q(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0)??q)===I)return;const e=this._$AH,i=t===q&&e!==q||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,s=t!==q&&(e===q||i);i&&this.element.removeEventListener(this.name,this,e),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;"function"==typeof this._$AH?this._$AH.call((null==(e=this.options)?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class rt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const nt=A.litHtmlPolyfillSupport;null==nt||nt(X,tt),(A.litHtmlVersions??(A.litHtmlVersions=[])).push("3.3.2");const lt=globalThis;class at extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=(null==i?void 0:i.renderBefore)??e;let o=s._$litPart$;if(void 0===o){const t=(null==i?void 0:i.renderBefore)??null;s._$litPart$=o=new tt(e.insertBefore(T(),t),t,void 0,i??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return I}}var ht;at._$litElement$=!0,at.finalized=!0,null==(ht=lt.litElementHydrateSupport)||ht.call(lt,{LitElement:at});const dt=lt.litElementPolyfillSupport;null==dt||dt({LitElement:at}),(lt.litElementVersions??(lt.litElementVersions=[])).push("4.2.2");const ct={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:b};var pt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,ft=(t,e,i,s)=>{for(var o,r=s>1?void 0:s?ut(e,i):e,n=t.length-1;n>=0;n--)(o=t[n])&&(r=(s?o(e,i,r):o(r))||r);return s&&r&&pt(e,i,r),r};let vt=class extends at{constructor(){super(),this.files=[],this.maxFiles=1/0,this.maxFileSizeMB=1/0,this.isLoading=!1,this.buttonText="Attached Files",this.addFilesText="Add Files",this.maxFilesReachedText="Maximum number of files reached",this.fileTooLargeText="File size exceeds the limit",this.error="",this.customColor="",this.customTextColor="",this.iconColor="",this.loadingText="Loading files...",this.lazyLoad=null,this._isOpen=!1,this._lazyLoadPromise=null,this.initializeLazyLoad()}initializeLazyLoad(){let t,e;const i=new Promise((i,s)=>{t=i,e=s});this._lazyLoadPromise={promise:i,resolve:t,reject:e},this.lazyLoad=this._lazyLoadPromise,this._lazyLoadPromise.promise.then(t=>{this.handleLazyLoadedFiles(t)}).catch(t=>{console.error("Lazy load promise rejected:",t),this.error=`Failed to load files: ${t.message}`})}handleLazyLoadedFiles(t){if(!Array.isArray(t))return void console.error("Lazy loaded files must be an array");const e=t.filter(t=>t&&"object"==typeof t?!!(t.id&&t.name&&t.type&&t.url)||(console.warn("File missing required properties:",t),!1):(console.warn("Invalid file object:",t),!1));if(0===e.length)return void console.warn("No valid files found in lazy load");const i=this.maxFiles-this.files.length;if(i<=0)return this.error=this.maxFilesReachedText,void this.dispatchEvent(new CustomEvent("max-files-reached",{detail:{maxFiles:this.maxFiles},bubbles:!0,composed:!0}));const s=e.slice(0,i);this.files=[...this.files,...s],this.error="",this.dispatchEvent(new CustomEvent("lazy-files-loaded",{detail:{files:s,totalFiles:this.files.length},bubbles:!0,composed:!0})),this.requestUpdate()}resolveLazyLoad(t){this._lazyLoadPromise&&this._lazyLoadPromise.resolve(t)}rejectLazyLoad(t){this._lazyLoadPromise&&this._lazyLoadPromise.reject(t)}getLazyLoadPromise(){var t;return(null==(t=this._lazyLoadPromise)?void 0:t.promise)||null}resetLazyLoad(){this.initializeLazyLoad()}showLoading(t){this.isLoading=!0,t&&(this.loadingText=t),this.requestUpdate()}hideLoading(){this.isLoading=!1,this.requestUpdate()}formatFileSize(t){if(0===t)return"0 B";const e=Math.floor(Math.log(t)/Math.log(1024));return`${parseFloat((t/Math.pow(1024,e)).toFixed(2))} ${["B","KB","MB","GB"][e]}`}displayName(t){const e=t.name||t.url||"",i=e.split(/[?#]/)[0].split("/").filter(Boolean).pop()||e;try{return decodeURIComponent(i)}catch{return i}}extension(t){const e=this.displayName(t).match(/\.([a-z0-9]{1,5})$/i);return e?e[1].toLowerCase():""}fileKind(t){const e=(t.type||"").toLowerCase().split("/")[0];if(["image","pdf","video","audio"].includes(e))return e;if((t.type||"").toLowerCase().includes("pdf"))return"pdf";const i=this.extension(t);return/^(png|jpe?g|gif|webp|svg|bmp|avif)$/.test(i)?"image":"pdf"===i?"pdf":/^(mp4|mov|webm|avi|mkv)$/.test(i)?"video":/^(mp3|wav|ogg|m4a|aac)$/.test(i)?"audio":"file"}fileIcon(t){switch(t){case"pdf":return D`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M5 4H15V8H19V20H5V4ZM3.9985 2C3.44749 2 3 2.44405 3 2.9918V21.0082C3 21.5447 3.44476 22 3.9934 22H20.0066C20.5551 22 21 21.5489 21 20.9925L20.9997 7L16 2H3.9985ZM10.4999 7.5C10.4999 9.07749 10.0442 10.9373 9.27493 12.6534C8.50287 14.3757 7.46143 15.8502 6.37524 16.7191L7.55464 18.3321C10.4821 16.3804 13.7233 15.0421 16.8585 15.49L17.3162 13.5513C14.6435 12.6604 12.4999 9.98994 12.4999 7.5H10.4999ZM11.0999 13.4716C11.3673 12.8752 11.6042 12.2563 11.8037 11.6285C12.2753 12.3531 12.8553 13.0182 13.5101 13.5953C12.5283 13.7711 11.5665 14.0596 10.6352 14.4276C10.7999 14.1143 10.9551 13.7948 11.0999 13.4716Z"></path></svg>`;case"video":return D`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M3 3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.44495 21 3.9934V20.0066C21 20.5552 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5551 3 20.0066V3.9934ZM5 5V19H19V5H5ZM10.6219 8.41459L15.5008 11.6672C15.6846 11.7897 15.7343 12.0381 15.6117 12.2219C15.5824 12.2658 15.5447 12.3035 15.5008 12.3328L10.6219 15.5854C10.4381 15.708 10.1897 15.6583 10.0672 15.4745C10.0234 15.4088 10 15.3316 10 15.2526V8.74741C10 8.52649 10.1791 8.34741 10.4 8.34741C10.479 8.34741 10.5562 8.37078 10.6219 8.41459Z"></path></svg>`;case"audio":return D`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20 3V17C20 19.2091 18.2091 21 16 21C13.7909 21 12 19.2091 12 17C12 14.7909 13.7909 13 16 13C16.7286 13 17.4117 13.1948 18 13.5351V6H9V17C9 19.2091 7.20914 21 5 21C2.79086 21 1 19.2091 1 17C1 14.7909 2.79086 13 5 13C5.72857 13 6.41165 13.1948 7 13.5351V3H20ZM5 19C6.10457 19 7 18.1046 7 17C7 15.8954 6.10457 15 5 15C3.89543 15 3 15.8954 3 17C3 18.1046 3.89543 19 5 19ZM16 19C17.1046 19 18 18.1046 18 17C18 15.8954 17.1046 15 16 15C14.8954 15 14 15.8954 14 17C14 18.1046 14.8954 19 16 19Z"></path></svg>`;default:return D`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M9 2.00318V2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8L9 2.00318ZM5.82918 8H9V4.83086L5.82918 8ZM11 4V9C11 9.55228 10.5523 10 10 10H5V20H19V4H11Z"></path></svg>`}}getFilePreview(t){const e=this.fileKind(t);return"image"===e&&t.url?D`<img src=${t.url} alt=${this.displayName(t)} />`:this.fileIcon(e)}handleFileSelect(t){const e=t.target;if(e.files&&e.files.length>0){const t=this.maxFiles-this.files.length;if(t<=0)return this.error=this.maxFilesReachedText,void this.dispatchEvent(new CustomEvent("max-files-reached",{detail:{maxFiles:this.maxFiles},bubbles:!0,composed:!0}));const i=1024*this.maxFileSizeMB*1024,s=Array.from(e.files).filter(t=>t.size>i);if(s.length>0)return this.error=`${this.fileTooLargeText} (${this.maxFileSizeMB}MB)`,void this.dispatchEvent(new CustomEvent("file-too-large",{detail:{files:s,maxSize:this.maxFileSizeMB},bubbles:!0,composed:!0}));this.error="",this.isLoading=!0;const o=Array.from(e.files).slice(0,t);let r=0;o.forEach(t=>{const e=new FileReader;e.onload=e=>{var i;const s={id:Math.random().toString(36).substr(2,9),name:t.name,type:t.type.split("/")[0],url:null==(i=e.target)?void 0:i.result,size:t.size};this.files=[...this.files,s],this.dispatchEvent(new CustomEvent("file-added",{detail:s,bubbles:!0,composed:!0})),r++,r===o.length&&(this.isLoading=!1)},e.readAsDataURL(t)})}}handleRemoveFile(t){const e=this.files.find(e=>e.id===t);e&&(this.files=this.files.filter(e=>e.id!==t),this.dispatchEvent(new CustomEvent("file-removed",{detail:e,bubbles:!0,composed:!0})))}render(){return Array.isArray(this.files)||(this.files=[]),D`
|
|
3
|
+
<div class="button-container ${this._isOpen?"open":""}">
|
|
8
4
|
<cdtr-popover
|
|
9
5
|
?opened=${this._isOpen}
|
|
10
|
-
@opened-changed=${t=>{this._isOpen=t.detail.value,this._isOpen||(this.error="")}}
|
|
6
|
+
@opened-changed=${t=>{this._isOpen=t.detail.value,this.requestUpdate(),this._isOpen||(this.error="")}}
|
|
11
7
|
>
|
|
12
8
|
<paper-button
|
|
13
9
|
slot="trigger"
|
|
@@ -28,11 +24,26 @@
|
|
|
28
24
|
</paper-button>
|
|
29
25
|
<div slot="content" class="popover-content" dir="auto">
|
|
30
26
|
${this.error?D` <div class="error-message">${this.error}</div> `:""}
|
|
31
|
-
<div class="file-
|
|
32
|
-
${this.files.map(t=>D`
|
|
33
|
-
<div class="file-
|
|
27
|
+
<div class="file-list">
|
|
28
|
+
${this.files.map(t=>{const e=this.displayName(t),i=[this.extension(t),t.size?this.formatFileSize(t.size):""].filter(Boolean).join(" · ");return D`
|
|
29
|
+
<div class="file-row">
|
|
30
|
+
<div class="file-thumb">${this.getFilePreview(t)}</div>
|
|
31
|
+
<div class="file-info">
|
|
32
|
+
${t.url&&!t.url.startsWith("data:")?D`<a
|
|
33
|
+
class="file-name"
|
|
34
|
+
href=${t.url}
|
|
35
|
+
target="_blank"
|
|
36
|
+
rel="noopener"
|
|
37
|
+
title=${e}
|
|
38
|
+
>${e}</a
|
|
39
|
+
>`:D`<div class="file-name" title=${e}>
|
|
40
|
+
${e}
|
|
41
|
+
</div>`}
|
|
42
|
+
${i?D`<div class="file-meta">${i}</div>`:""}
|
|
43
|
+
</div>
|
|
34
44
|
<button
|
|
35
45
|
class="remove-btn"
|
|
46
|
+
title="Remove"
|
|
36
47
|
@click=${()=>this.handleRemoveFile(t.id)}
|
|
37
48
|
>
|
|
38
49
|
<svg
|
|
@@ -47,17 +58,14 @@
|
|
|
47
58
|
></path>
|
|
48
59
|
</svg>
|
|
49
60
|
</button>
|
|
50
|
-
${this.getFilePreview(t)}
|
|
51
|
-
<div class="file-name">${t.name}</div>
|
|
52
|
-
${t.size?D`<div class="file-size">
|
|
53
|
-
${this.formatFileSize(t.size)}
|
|
54
|
-
</div>`:""}
|
|
55
61
|
</div>
|
|
56
|
-
`)}
|
|
62
|
+
`})}
|
|
57
63
|
${this.files.length<this.maxFiles?D`
|
|
58
|
-
<div class="
|
|
64
|
+
<div class="add-row">
|
|
59
65
|
<label class="add-files-btn">
|
|
60
|
-
<
|
|
66
|
+
<svg viewBox="0 0 24 24" fill="currentColor">
|
|
67
|
+
<path d="M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z"></path>
|
|
68
|
+
</svg>
|
|
61
69
|
<span>${this.addFilesText}</span>
|
|
62
70
|
<input
|
|
63
71
|
type="file"
|
|
@@ -80,93 +88,133 @@
|
|
|
80
88
|
</div>
|
|
81
89
|
</cdtr-popover>
|
|
82
90
|
${this.files.length>0?D`
|
|
91
|
+
<span class="count-badge">${this.files.length}</span>
|
|
83
92
|
<div class="preview-strip">
|
|
84
|
-
${this.files.slice(0,3).map(t=>D
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
viewBox="0 0 24 24"
|
|
94
|
-
fill="currentColor"
|
|
95
|
-
>
|
|
96
|
-
<path
|
|
97
|
-
d="M9 2.00318V2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8L9 2.00318ZM5.82918 8H9V4.83086L5.82918 8ZM11 4V9C11 9.55228 10.5523 10 10 10H5V20H19V4H11Z"
|
|
98
|
-
></path>
|
|
99
|
-
</svg>
|
|
100
|
-
</div>`}
|
|
101
|
-
`)}
|
|
93
|
+
${this.files.slice(0,3).map(t=>"image"===this.fileKind(t)&&t.url?D`<img
|
|
94
|
+
class="preview-icon-image"
|
|
95
|
+
src=${t.url}
|
|
96
|
+
alt=${this.displayName(t)}
|
|
97
|
+
/>`:D`<div class="preview-icon-card">
|
|
98
|
+
<span class="preview-icon"
|
|
99
|
+
>${this.fileIcon(this.fileKind(t))}</span
|
|
100
|
+
>
|
|
101
|
+
</div>`)}
|
|
102
102
|
${this.files.length>3?D`<span class="preview-count"
|
|
103
103
|
>+${this.files.length-3}</span
|
|
104
104
|
>`:""}
|
|
105
105
|
</div>
|
|
106
106
|
`:""}
|
|
107
107
|
</div>
|
|
108
|
-
`}};
|
|
109
|
-
.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
`}};vt.styles=(function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];const o=1===t.length?t[0]:i.reduce((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]);return new l(o,t,r)})`
|
|
109
|
+
.popover-content {
|
|
110
|
+
width: 280px;
|
|
111
|
+
max-width: calc(100vw - 32px);
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
font-family: inherit;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.file-list {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: 6px;
|
|
120
|
+
padding: 12px;
|
|
114
121
|
max-height: calc(100vh - 200px);
|
|
115
122
|
overflow-y: auto;
|
|
123
|
+
box-sizing: border-box;
|
|
116
124
|
}
|
|
117
125
|
|
|
118
|
-
.file-
|
|
126
|
+
.file-row {
|
|
119
127
|
position: relative;
|
|
120
|
-
|
|
121
|
-
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
gap: 10px;
|
|
131
|
+
padding: 8px 10px;
|
|
122
132
|
border-radius: 8px;
|
|
123
133
|
background: #f5f5f5;
|
|
134
|
+
min-width: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.file-thumb {
|
|
138
|
+
flex: none;
|
|
139
|
+
width: 36px;
|
|
140
|
+
height: 36px;
|
|
141
|
+
border-radius: 6px;
|
|
142
|
+
background: #fff;
|
|
124
143
|
display: flex;
|
|
125
|
-
flex-direction: column;
|
|
126
144
|
align-items: center;
|
|
127
145
|
justify-content: center;
|
|
128
|
-
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
color: #555;
|
|
129
148
|
}
|
|
130
149
|
|
|
131
|
-
.file-
|
|
150
|
+
.file-thumb img {
|
|
132
151
|
width: 100%;
|
|
133
|
-
height:
|
|
134
|
-
object-fit:
|
|
135
|
-
|
|
152
|
+
height: 100%;
|
|
153
|
+
object-fit: cover;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.file-thumb svg {
|
|
157
|
+
width: 20px;
|
|
158
|
+
height: 20px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.file-info {
|
|
162
|
+
flex: 1;
|
|
163
|
+
min-width: 0;
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-direction: column;
|
|
166
|
+
gap: 2px;
|
|
136
167
|
}
|
|
137
168
|
|
|
138
169
|
.file-name {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
font-size: 12px;
|
|
142
|
-
text-align: center;
|
|
170
|
+
font-size: 13px;
|
|
171
|
+
color: #222;
|
|
143
172
|
white-space: nowrap;
|
|
144
173
|
overflow: hidden;
|
|
145
174
|
text-overflow: ellipsis;
|
|
175
|
+
text-decoration: none;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
a.file-name:hover {
|
|
179
|
+
text-decoration: underline;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.file-meta {
|
|
183
|
+
font-size: 11px;
|
|
184
|
+
color: #777;
|
|
185
|
+
text-transform: uppercase;
|
|
146
186
|
}
|
|
147
187
|
|
|
148
188
|
.remove-btn {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
background: red;
|
|
156
|
-
color: white;
|
|
189
|
+
flex: none;
|
|
190
|
+
width: 28px;
|
|
191
|
+
height: 28px;
|
|
192
|
+
border-radius: 6px;
|
|
193
|
+
background: transparent;
|
|
194
|
+
color: #888;
|
|
157
195
|
display: flex;
|
|
158
196
|
align-items: center;
|
|
159
197
|
justify-content: center;
|
|
160
198
|
cursor: pointer;
|
|
161
199
|
border: none;
|
|
162
|
-
padding:
|
|
200
|
+
padding: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.remove-btn:hover {
|
|
204
|
+
background: #fde8e8;
|
|
205
|
+
color: #d32f2f;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.add-row {
|
|
209
|
+
position: relative;
|
|
210
|
+
margin-top: 2px;
|
|
163
211
|
}
|
|
164
212
|
|
|
165
213
|
.add-files-btn {
|
|
166
214
|
width: 100%;
|
|
167
|
-
|
|
215
|
+
box-sizing: border-box;
|
|
216
|
+
min-height: 44px;
|
|
168
217
|
display: flex;
|
|
169
|
-
flex-direction: column;
|
|
170
218
|
align-items: center;
|
|
171
219
|
justify-content: center;
|
|
172
220
|
gap: 8px;
|
|
@@ -174,6 +222,13 @@
|
|
|
174
222
|
border: 2px dashed #ccc;
|
|
175
223
|
border-radius: 8px;
|
|
176
224
|
background: transparent;
|
|
225
|
+
font-size: 13px;
|
|
226
|
+
color: #444;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.add-files-btn svg {
|
|
230
|
+
width: 18px;
|
|
231
|
+
height: 18px;
|
|
177
232
|
}
|
|
178
233
|
|
|
179
234
|
.add-files-btn:hover {
|
|
@@ -267,52 +322,88 @@
|
|
|
267
322
|
height: 16px;
|
|
268
323
|
}
|
|
269
324
|
|
|
270
|
-
.preview-count {
|
|
271
|
-
margin-top: 8px;
|
|
272
|
-
font-size: 12px;
|
|
273
|
-
color: #666;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
325
|
.button-container {
|
|
277
326
|
position: relative;
|
|
278
327
|
display: inline-block;
|
|
279
328
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
329
|
+
|
|
330
|
+
.count-badge {
|
|
331
|
+
position: absolute;
|
|
332
|
+
top: 2px;
|
|
333
|
+
right: 2px;
|
|
334
|
+
min-width: 16px;
|
|
335
|
+
height: 16px;
|
|
336
|
+
padding: 0 4px;
|
|
337
|
+
box-sizing: border-box;
|
|
338
|
+
border-radius: 8px;
|
|
339
|
+
background: #e53935;
|
|
340
|
+
color: #fff;
|
|
341
|
+
font-size: 10px;
|
|
342
|
+
font-weight: 600;
|
|
343
|
+
line-height: 16px;
|
|
344
|
+
text-align: center;
|
|
345
|
+
pointer-events: none;
|
|
346
|
+
z-index: 2;
|
|
285
347
|
}
|
|
348
|
+
|
|
286
349
|
.preview-strip {
|
|
287
350
|
position: absolute;
|
|
288
|
-
|
|
289
|
-
left:
|
|
290
|
-
|
|
351
|
+
top: calc(100% + 4px);
|
|
352
|
+
left: 50%;
|
|
353
|
+
transform: translateX(-50%);
|
|
354
|
+
display: none;
|
|
355
|
+
align-items: center;
|
|
356
|
+
gap: 4px;
|
|
357
|
+
padding: 4px 6px;
|
|
358
|
+
border-radius: 6px;
|
|
359
|
+
background: #2b2b2e;
|
|
360
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
361
|
+
white-space: nowrap;
|
|
362
|
+
pointer-events: none;
|
|
363
|
+
z-index: 3;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.button-container:hover .preview-strip {
|
|
367
|
+
display: flex;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.button-container.open .preview-strip {
|
|
371
|
+
display: none;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.preview-icon-card {
|
|
375
|
+
background-color: #454549;
|
|
376
|
+
border-radius: 4px;
|
|
377
|
+
padding: 3px;
|
|
291
378
|
display: flex;
|
|
292
|
-
gap: 2px;
|
|
293
|
-
padding-left: 12px;
|
|
294
379
|
}
|
|
295
380
|
|
|
296
381
|
.preview-icon {
|
|
297
382
|
width: 12px;
|
|
298
383
|
height: 12px;
|
|
299
384
|
color: white;
|
|
385
|
+
display: flex;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.preview-icon svg {
|
|
389
|
+
width: 100%;
|
|
390
|
+
height: 100%;
|
|
300
391
|
}
|
|
392
|
+
|
|
301
393
|
.preview-icon-image {
|
|
302
|
-
width:
|
|
303
|
-
height:
|
|
394
|
+
width: 18px;
|
|
395
|
+
height: 18px;
|
|
396
|
+
border-radius: 4px;
|
|
304
397
|
object-fit: cover;
|
|
305
398
|
}
|
|
399
|
+
|
|
306
400
|
.preview-count {
|
|
307
|
-
font-size:
|
|
308
|
-
|
|
401
|
+
font-size: 11px;
|
|
402
|
+
font-weight: 600;
|
|
403
|
+
color: #fff;
|
|
309
404
|
margin-left: 2px;
|
|
310
405
|
}
|
|
311
406
|
|
|
312
|
-
.file-size {
|
|
313
|
-
font-size: 10px;
|
|
314
|
-
color: #666;
|
|
315
|
-
}
|
|
316
407
|
|
|
317
408
|
|
|
318
|
-
`,
|
|
409
|
+
`,vt.properties={files:{type:Array},maxFiles:{type:Number},maxFileSizeMB:{type:Number},isLoading:{type:Boolean},buttonText:{type:String},addFilesText:{type:String},maxFilesReachedText:{type:String},iconColor:{type:String},fileTooLargeText:{type:String},error:{type:String},customColor:{type:String},customTextColor:{type:String},loadingText:{type:String}},ft([function(t){return(e,i)=>"object"==typeof i?function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct,e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;const{kind:s,metadata:o}=i;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),r.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,o,t,!0,i)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const o=this[s];e.call(this,i),this.requestUpdate(s,o,t,!0,i)}}throw Error("Unsupported decorator location: "+s)}(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}({type:Object,attribute:!1})],vt.prototype,"lazyLoad",2),vt=ft([(t=>(e,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)})("cdtr-attached-files-plugin")],vt)}}]);
|
|
Binary file
|