51948469c2
- Stop ignoring web/app/index.html and web/app/assets/ - Bundle index-DBKIQT7H.js from current vite build (~101MB assets) Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
5.1 KiB
JavaScript
1 line
5.1 KiB
JavaScript
import{$n as e,$t as t,Bn as n,Kn as r,Mn as i,Sr as a,Wn as o,Xt as s,a as c,an as l,ar as u,bn as ee,cr as d,d as f,f as p,fn as m,g as h,gn as g,gr as _,gt as v,hn as y,hr as b,i as x,ir as S,kr as te,ln as C,o as w,or as T,p as E,qn as D,qt as O,r as ne,s as k,vr as A,xr as j,y as M}from"./index-DF_h99fc.js";var N=C({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxHeight:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...x(),...i(k(),[`direction`]),...p()},`VTextarea`),P=l()({name:`VTextarea`,directives:{vIntersect:v},inheritAttrs:!1,props:N(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(i,{attrs:l,emit:p,slots:x}){let C=s(i,`modelValue`),{isFocused:k,focus:N,blur:P}=E(i),{onIntersect:F}=ne(i),I=r(()=>typeof i.counterValue==`function`?i.counterValue(C.value):(C.value||``).toString().length),L=r(()=>{if(l.maxlength)return l.maxlength;if(!(!i.counter||typeof i.counter!=`number`&&typeof i.counter!=`string`))return i.counter}),R=j(),z=j(),B=a(``),V=j(),H=j(0),{platform:U}=O(),W=c(i),G=r(()=>i.persistentPlaceholder||k.value||i.active);function K(){W.isSuppressing.value&&W.update(),V.value!==document.activeElement&&V.value?.focus(),k.value||N()}function q(e){K(),p(`click:control`,e)}function J(e){p(`mousedown:control`,e)}function re(e){e.stopPropagation(),K(),u(()=>{C.value=``,m(i[`onClick:clear`],e)})}function ie(e){let t=e.target;if(!i.modelModifiers?.trim){C.value=t.value;return}let n=t.value,r=t.selectionStart,a=t.selectionEnd;C.value=n,u(()=>{let e=0;n.trimStart().length===t.value.length&&(e=n.length-t.value.length),r!=null&&(t.selectionStart=r-e),a!=null&&(t.selectionEnd=a-e)})}let Y=j(),X=j(Number(i.rows)),Z=r(()=>[`plain`,`underlined`].includes(i.variant));_(()=>{i.autoGrow||(X.value=Number(i.rows))});function Q(){u(()=>{if(!V.value)return;if(U.value.firefox){H.value=12;return}let{offsetWidth:e,clientWidth:t}=V.value;H.value=Math.max(0,e-t)}),i.autoGrow&&u(()=>{if(!Y.value||!z.value)return;let e=getComputedStyle(Y.value),t=getComputedStyle(z.value.$el),n=parseFloat(e.getPropertyValue(`--v-field-padding-top`))+parseFloat(e.getPropertyValue(`--v-input-padding-top`))+parseFloat(e.getPropertyValue(`--v-field-padding-bottom`)),r=Y.value.scrollHeight,a=parseFloat(e.lineHeight),o=Math.max(parseFloat(i.rows)*a+n,parseFloat(t.getPropertyValue(`--v-input-control-height`))),s=i.maxHeight?parseFloat(i.maxHeight):parseFloat(i.maxRows)*a+n||1/0,c=y(r??0,o,s);X.value=Math.floor((c-n)/a),B.value=g(c)})}d(Q),b(C,Q),b(()=>i.rows,Q),b(()=>i.maxHeight,Q),b(()=>i.maxRows,Q),b(()=>i.density,Q),b(X,e=>{p(`update:rows`,e)});let $;return b(Y,e=>{e?($=new ResizeObserver(Q),$.observe(Y.value)):$?.disconnect()}),T(()=>{$?.disconnect()}),t(()=>{let t=!!(x.counter||i.counter||i.counterValue),r=!!(t||x.details),[a,s]=ee(l),{modelValue:c,...u}=w.filterProps(i),d={...f.filterProps(i),"onClick:clear":re};return e(w,S({ref:R,modelValue:C.value,"onUpdate:modelValue":e=>C.value=e,class:[`v-textarea v-text-field`,{"v-textarea--prefixed":i.prefix,"v-textarea--suffixed":i.suffix,"v-text-field--prefixed":i.prefix,"v-text-field--suffixed":i.suffix,"v-textarea--auto-grow":i.autoGrow,"v-textarea--no-resize":i.noResize||i.autoGrow,"v-input--plain-underlined":Z.value},i.class],style:[{"--v-textarea-max-height":i.maxHeight?g(i.maxHeight):void 0,"--v-textarea-scroll-bar-width":g(H.value)},i.style]},a,u,{centerAffix:X.value===1&&!Z.value,focused:k.value,indentDetails:i.indentDetails??!Z.value}),{...x,default:({id:t,isDisabled:r,isDirty:a,isReadonly:c,isValid:l,hasDetails:u})=>e(f,S({ref:z,style:{"--v-textarea-control-height":B.value},onClick:q,onMousedown:J,"onClick:prependInner":i[`onClick:prependInner`],"onClick:appendInner":i[`onClick:appendInner`]},d,{id:t.value,active:G.value||a.value,labelId:`${t.value}-label`,centerAffix:X.value===1&&!Z.value,dirty:a.value||i.dirty,disabled:r.value,focused:k.value,details:u.value,error:l.value===!1}),{...x,default:({props:{class:e,...a},controlRef:l})=>D(o,null,[i.prefix&&D(`span`,{class:`v-text-field__prefix`},[i.prefix]),A(D(`textarea`,S({ref:e=>V.value=l.value=e,class:e,value:C.value,onInput:ie,autofocus:i.autofocus,readonly:c.value,disabled:r.value,placeholder:i.placeholder,rows:i.rows,name:W.fieldName.value,autocomplete:W.fieldAutocomplete.value,onFocus:K,onBlur:P,"aria-labelledby":`${t.value}-label`},a,s),null),[[v,{handler:F},null,{once:!0}]]),i.autoGrow&&A(D(`textarea`,{class:te([e,`v-textarea__sizer`]),id:`${a.id}-sizer`,"onUpdate:modelValue":e=>C.value=e,ref:Y,readonly:!0,"aria-hidden":`true`},null),[[n,C.value]]),i.suffix&&D(`span`,{class:`v-text-field__suffix`},[i.suffix])])}),details:r?n=>D(o,null,[x.details?.(n),t&&D(o,null,[D(`span`,null,null),e(h,{active:i.persistentCounter||k.value,value:I.value,max:L.value,disabled:i.disabled},x.counter)])]):void 0})}),M({},R,z,V)}});export{P as t}; |