mower-ng/ui/dist/assets/Input.js

258 lines
40 KiB
JavaScript

import{af as H,ag as co,ah as U,ae as he,c as Te,j as z,aR as uo,B as R,H as r,ai as ho,as as y,ar as S,au as i,bg as fo,bU as Ae,b as ve,bh as vo,b4 as q,b2 as ne,bi as po,z as mo,r as x,w as pe,bM as go,av as M,at as K,ay as _e,ax as bo,c1 as yo,aI as wo,bF as xo,A as Ce,s as Co,q as Po,az as Pe,D as So,b0 as Mo,aC as zo,aG as te,b8 as Fo,F as To,bf as Ao,aO as _o,n as Se,v as Me,aL as C,aY as fe,b1 as ko,y as ze}from"./_plugin-vue_export-helper.js";const Do={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:t=>`Please load all ${t}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:t=>`Total ${t} items`,selected:t=>`${t} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}},Ro={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Eo=(t,s,n)=>{let m;const P=Ro[t];return typeof P=="string"?m=P:s===1?m=P.one:m=P.other.replace("{{count}}",s.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+m:m+" ago":m},Bo={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Wo=(t,s,n,m)=>Bo[t],$o={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Io={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lo={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Vo={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},No={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Oo={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jo=(t,s)=>{const n=Number(t),m=n%100;if(m>20||m<10)switch(m%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Ho={ordinalNumber:jo,era:H({values:$o,defaultWidth:"wide"}),quarter:H({values:Io,defaultWidth:"wide",argumentCallback:t=>t-1}),month:H({values:Lo,defaultWidth:"wide"}),day:H({values:Vo,defaultWidth:"wide"}),dayPeriod:H({values:No,defaultWidth:"wide",formattingValues:Oo,defaultFormattingWidth:"wide"})},Uo=/^(\d+)(th|st|nd|rd)?/i,Ko=/\d+/i,qo={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Yo={any:[/^b/i,/^(a|c)/i]},Xo={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Jo={any:[/1/i,/2/i,/3/i,/4/i]},Go={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Zo={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Qo={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},en={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},tn={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},on={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nn={ordinalNumber:co({matchPattern:Uo,parsePattern:Ko,valueCallback:t=>parseInt(t,10)}),era:U({matchPatterns:qo,defaultMatchWidth:"wide",parsePatterns:Yo,defaultParseWidth:"any"}),quarter:U({matchPatterns:Xo,defaultMatchWidth:"wide",parsePatterns:Jo,defaultParseWidth:"any",valueCallback:t=>t+1}),month:U({matchPatterns:Go,defaultMatchWidth:"wide",parsePatterns:Zo,defaultParseWidth:"any"}),day:U({matchPatterns:Qo,defaultMatchWidth:"wide",parsePatterns:en,defaultParseWidth:"any"}),dayPeriod:U({matchPatterns:tn,defaultMatchWidth:"any",parsePatterns:on,defaultParseWidth:"any"})},rn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},an={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ln={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sn={date:he({formats:rn,defaultWidth:"full"}),time:he({formats:an,defaultWidth:"full"}),dateTime:he({formats:ln,defaultWidth:"full"})},cn={code:"en-US",formatDistance:Eo,formatLong:sn,formatRelative:Wo,localize:Ho,match:nn,options:{weekStartsOn:0,firstWeekContainsDate:1}},dn={name:"en-US",locale:cn};function un(t){const{mergedLocaleRef:s,mergedDateLocaleRef:n}=Te(uo,null)||{},m=z(()=>{var f,h;return(h=(f=s==null?void 0:s.value)===null||f===void 0?void 0:f[t])!==null&&h!==void 0?h:Do[t]});return{dateLocaleRef:z(()=>{var f;return(f=n==null?void 0:n.value)!==null&&f!==void 0?f:dn}),localeRef:m}}const hn=R({name:"Eye",render(){return r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},r("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),r("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),fn=R({name:"EyeOff",render(){return r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},r("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),r("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),r("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),r("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),r("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),vn=R({name:"ChevronDown",render(){return r("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),pn=ho("clear",r("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},r("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},r("g",{fill:"currentColor","fill-rule":"nonzero"},r("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),mn=y("base-clear",`
flex-shrink: 0;
height: 1em;
width: 1em;
position: relative;
`,[S(">",[i("clear",`
font-size: var(--n-clear-size);
height: 1em;
width: 1em;
cursor: pointer;
color: var(--n-clear-color);
transition: color .3s var(--n-bezier);
display: flex;
`,[S("&:hover",`
color: var(--n-clear-color-hover)!important;
`),S("&:active",`
color: var(--n-clear-color-pressed)!important;
`)]),i("placeholder",`
display: flex;
`),i("clear, placeholder",`
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
`,[fo({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),me=R({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(t){return Ae("-base-clear",mn,ve(t,"clsPrefix")),{handleMouseDown(s){s.preventDefault()}}},render(){const{clsPrefix:t}=this;return r("div",{class:`${t}-base-clear`},r(vo,null,{default:()=>{var s,n;return this.show?r("div",{key:"dismiss",class:`${t}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},q(this.$slots.icon,()=>[r(ne,{clsPrefix:t},{default:()=>r(pn,null)})])):r("div",{key:"icon",class:`${t}-base-clear__placeholder`},(n=(s=this.$slots).placeholder)===null||n===void 0?void 0:n.call(s))}}))}}),gn=R({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(t,{slots:s}){return()=>{const{clsPrefix:n}=t;return r(po,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:t.loading},{default:()=>t.showArrow?r(me,{clsPrefix:n,show:t.showClear,onClear:t.onClear},{placeholder:()=>r(ne,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>q(s.default,()=>[r(vn,null)])})}):null})}}}),ke=mo("n-input");function bn(t){let s=0;for(const n of t)s++;return s}function oe(t){return t===""||t==null}function yn(t){const s=x(null);function n(){const{value:f}=t;if(!(f!=null&&f.focus)){P();return}const{selectionStart:h,selectionEnd:c,value:u}=f;if(h==null||c==null){P();return}s.value={start:h,end:c,beforeText:u.slice(0,h),afterText:u.slice(c)}}function m(){var f;const{value:h}=s,{value:c}=t;if(!h||!c)return;const{value:u}=c,{start:d,beforeText:l,afterText:b}=h;let w=u.length;if(u.endsWith(b))w=u.length-b.length;else if(u.startsWith(l))w=l.length;else{const E=l[d-1],F=u.indexOf(E,d-1);F!==-1&&(w=F+1)}(f=c.setSelectionRange)===null||f===void 0||f.call(c,w,w)}function P(){s.value=null}return pe(t,P),{recordCursor:n,restoreCursor:m}}const Fe=R({name:"InputWordCount",setup(t,{slots:s}){const{mergedValueRef:n,maxlengthRef:m,mergedClsPrefixRef:P,countGraphemesRef:f}=Te(ke),h=z(()=>{const{value:c}=n;return c===null||Array.isArray(c)?0:(f.value||bn)(c)});return()=>{const{value:c}=m,{value:u}=n;return r("span",{class:`${P.value}-input-word-count`},go(s.default,{value:u===null||Array.isArray(u)?"":u},()=>[c===void 0?h.value:`${h.value} / ${c}`]))}}}),wn=y("input",`
max-width: 100%;
cursor: text;
line-height: 1.5;
z-index: auto;
outline: none;
box-sizing: border-box;
position: relative;
display: inline-flex;
border-radius: var(--n-border-radius);
background-color: var(--n-color);
transition: background-color .3s var(--n-bezier);
font-size: var(--n-font-size);
--n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
`,[i("input, textarea",`
overflow: hidden;
flex-grow: 1;
position: relative;
`),i("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder",`
box-sizing: border-box;
font-size: inherit;
line-height: 1.5;
font-family: inherit;
border: none;
outline: none;
background-color: #0000;
text-align: inherit;
transition:
-webkit-text-fill-color .3s var(--n-bezier),
caret-color .3s var(--n-bezier),
color .3s var(--n-bezier),
text-decoration-color .3s var(--n-bezier);
`),i("input-el, textarea-el",`
-webkit-appearance: none;
scrollbar-width: none;
width: 100%;
min-width: 0;
text-decoration-color: var(--n-text-decoration-color);
color: var(--n-text-color);
caret-color: var(--n-caret-color);
background-color: transparent;
`,[S("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
width: 0;
height: 0;
display: none;
`),S("&::placeholder",`
color: #0000;
-webkit-text-fill-color: transparent !important;
`),S("&:-webkit-autofill ~",[i("placeholder","display: none;")])]),M("round",[K("textarea","border-radius: calc(var(--n-height) / 2);")]),i("placeholder",`
pointer-events: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: hidden;
color: var(--n-placeholder-color);
`,[S("span",`
width: 100%;
display: inline-block;
`)]),M("textarea",[i("placeholder","overflow: visible;")]),K("autosize","width: 100%;"),M("autosize",[i("textarea-el, input-el",`
position: absolute;
top: 0;
left: 0;
height: 100%;
`)]),y("input-wrapper",`
overflow: hidden;
display: inline-flex;
flex-grow: 1;
position: relative;
padding-left: var(--n-padding-left);
padding-right: var(--n-padding-right);
`),i("input-mirror",`
padding: 0;
height: var(--n-height);
line-height: var(--n-height);
overflow: hidden;
visibility: hidden;
position: static;
white-space: pre;
pointer-events: none;
`),i("input-el",`
padding: 0;
height: var(--n-height);
line-height: var(--n-height);
`,[S("&[type=password]::-ms-reveal","display: none;"),S("+",[i("placeholder",`
display: flex;
align-items: center;
`)])]),K("textarea",[i("placeholder","white-space: nowrap;")]),i("eye",`
display: flex;
align-items: center;
justify-content: center;
transition: color .3s var(--n-bezier);
`),M("textarea","width: 100%;",[y("input-word-count",`
position: absolute;
right: var(--n-padding-right);
bottom: var(--n-padding-vertical);
`),M("resizable",[y("input-wrapper",`
resize: vertical;
min-height: var(--n-height);
`)]),i("textarea-el, textarea-mirror, placeholder",`
height: 100%;
padding-left: 0;
padding-right: 0;
padding-top: var(--n-padding-vertical);
padding-bottom: var(--n-padding-vertical);
word-break: break-word;
display: inline-block;
vertical-align: bottom;
box-sizing: border-box;
line-height: var(--n-line-height-textarea);
margin: 0;
resize: none;
white-space: pre-wrap;
scroll-padding-block-end: var(--n-padding-vertical);
`),i("textarea-mirror",`
width: 100%;
pointer-events: none;
overflow: hidden;
visibility: hidden;
position: static;
white-space: pre-wrap;
overflow-wrap: break-word;
`)]),M("pair",[i("input-el, placeholder","text-align: center;"),i("separator",`
display: flex;
align-items: center;
transition: color .3s var(--n-bezier);
color: var(--n-text-color);
white-space: nowrap;
`,[y("icon",`
color: var(--n-icon-color);
`),y("base-icon",`
color: var(--n-icon-color);
`)])]),M("disabled",`
cursor: not-allowed;
background-color: var(--n-color-disabled);
`,[i("border","border: var(--n-border-disabled);"),i("input-el, textarea-el",`
cursor: not-allowed;
color: var(--n-text-color-disabled);
text-decoration-color: var(--n-text-color-disabled);
`),i("placeholder","color: var(--n-placeholder-color-disabled);"),i("separator","color: var(--n-text-color-disabled);",[y("icon",`
color: var(--n-icon-color-disabled);
`),y("base-icon",`
color: var(--n-icon-color-disabled);
`)]),y("input-word-count",`
color: var(--n-count-text-color-disabled);
`),i("suffix, prefix","color: var(--n-text-color-disabled);",[y("icon",`
color: var(--n-icon-color-disabled);
`),y("internal-icon",`
color: var(--n-icon-color-disabled);
`)])]),K("disabled",[i("eye",`
color: var(--n-icon-color);
cursor: pointer;
`,[S("&:hover",`
color: var(--n-icon-color-hover);
`),S("&:active",`
color: var(--n-icon-color-pressed);
`)]),S("&:hover",[i("state-border","border: var(--n-border-hover);")]),M("focus","background-color: var(--n-color-focus);",[i("state-border",`
border: var(--n-border-focus);
box-shadow: var(--n-box-shadow-focus);
`)])]),i("border, state-border",`
box-sizing: border-box;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
pointer-events: none;
border-radius: inherit;
border: var(--n-border);
transition:
box-shadow .3s var(--n-bezier),
border-color .3s var(--n-bezier);
`),i("state-border",`
border-color: #0000;
z-index: 1;
`),i("prefix","margin-right: 4px;"),i("suffix",`
margin-left: 4px;
`),i("suffix, prefix",`
transition: color .3s var(--n-bezier);
flex-wrap: nowrap;
flex-shrink: 0;
line-height: var(--n-height);
white-space: nowrap;
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--n-suffix-text-color);
`,[y("base-loading",`
font-size: var(--n-icon-size);
margin: 0 2px;
color: var(--n-loading-color);
`),y("base-clear",`
font-size: var(--n-icon-size);
`,[i("placeholder",[y("base-icon",`
transition: color .3s var(--n-bezier);
color: var(--n-icon-color);
font-size: var(--n-icon-size);
`)])]),S(">",[y("icon",`
transition: color .3s var(--n-bezier);
color: var(--n-icon-color);
font-size: var(--n-icon-size);
`)]),y("base-icon",`
font-size: var(--n-icon-size);
`)]),y("input-word-count",`
pointer-events: none;
line-height: 1.5;
font-size: .85em;
color: var(--n-count-text-color);
transition: color .3s var(--n-bezier);
margin-left: 4px;
font-variant: tabular-nums;
`),["warning","error"].map(t=>M(`${t}-status`,[K("disabled",[y("base-loading",`
color: var(--n-loading-color-${t})
`),i("input-el, textarea-el",`
caret-color: var(--n-caret-color-${t});
`),i("state-border",`
border: var(--n-border-${t});
`),S("&:hover",[i("state-border",`
border: var(--n-border-hover-${t});
`)]),S("&:focus",`
background-color: var(--n-color-focus-${t});
`,[i("state-border",`
box-shadow: var(--n-box-shadow-focus-${t});
border: var(--n-border-focus-${t});
`)]),M("focus",`
background-color: var(--n-color-focus-${t});
`,[i("state-border",`
box-shadow: var(--n-box-shadow-focus-${t});
border: var(--n-border-focus-${t});
`)])])]))]),xn=y("input",[M("disabled",[i("input-el, textarea-el",`
-webkit-text-fill-color: var(--n-text-color-disabled);
`)])]),Cn=Object.assign(Object.assign({},_e.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),Sn=R({name:"Input",props:Cn,setup(t){const{mergedClsPrefixRef:s,mergedBorderedRef:n,inlineThemeDisabled:m,mergedRtlRef:P}=bo(t),f=_e("Input","-input",wn,_o,t,s);yo&&Ae("-input-safari",xn,s);const h=x(null),c=x(null),u=x(null),d=x(null),l=x(null),b=x(null),w=x(null),E=yn(w),F=x(null),{localeRef:De}=un("Input"),Y=x(t.defaultValue),Re=ve(t,"value"),T=wo(Re,Y),I=xo(t),{mergedSizeRef:re,mergedDisabledRef:B,mergedStatusRef:Ee}=I,W=x(!1),L=x(!1),A=x(!1),V=x(!1);let ae=null;const ie=z(()=>{const{placeholder:e,pair:o}=t;return o?Array.isArray(e)?e:e===void 0?["",""]:[e,e]:e===void 0?[De.value.placeholder]:[e]}),Be=z(()=>{const{value:e}=A,{value:o}=T,{value:a}=ie;return!e&&(oe(o)||Array.isArray(o)&&oe(o[0]))&&a[0]}),We=z(()=>{const{value:e}=A,{value:o}=T,{value:a}=ie;return!e&&a[1]&&(oe(o)||Array.isArray(o)&&oe(o[1]))}),le=Ce(()=>t.internalForceFocus||W.value),$e=Ce(()=>{if(B.value||t.readonly||!t.clearable||!le.value&&!L.value)return!1;const{value:e}=T,{value:o}=le;return t.pair?!!(Array.isArray(e)&&(e[0]||e[1]))&&(L.value||o):!!e&&(L.value||o)}),se=z(()=>{const{showPasswordOn:e}=t;if(e)return e;if(t.showPasswordToggle)return"click"}),N=x(!1),Ie=z(()=>{const{textDecoration:e}=t;return e?Array.isArray(e)?e.map(o=>({textDecoration:o})):[{textDecoration:e}]:["",""]}),ge=x(void 0),Le=()=>{var e,o;if(t.type==="textarea"){const{autosize:a}=t;if(a&&(ge.value=(o=(e=F.value)===null||e===void 0?void 0:e.$el)===null||o===void 0?void 0:o.offsetWidth),!c.value||typeof a=="boolean")return;const{paddingTop:p,paddingBottom:g,lineHeight:v}=window.getComputedStyle(c.value),_=Number(p.slice(0,-2)),k=Number(g.slice(0,-2)),D=Number(v.slice(0,-2)),{value:O}=u;if(!O)return;if(a.minRows){const j=Math.max(a.minRows,1),ue=`${_+k+D*j}px`;O.style.minHeight=ue}if(a.maxRows){const j=`${_+k+D*a.maxRows}px`;O.style.maxHeight=j}}},Ve=z(()=>{const{maxlength:e}=t;return e===void 0?void 0:Number(e)});Co(()=>{const{value:e}=T;Array.isArray(e)||de(e)});const Ne=Po().proxy;function X(e,o){const{onUpdateValue:a,"onUpdate:value":p,onInput:g}=t,{nTriggerFormInput:v}=I;a&&C(a,e,o),p&&C(p,e,o),g&&C(g,e,o),Y.value=e,v()}function J(e,o){const{onChange:a}=t,{nTriggerFormChange:p}=I;a&&C(a,e,o),Y.value=e,p()}function Oe(e){const{onBlur:o}=t,{nTriggerFormBlur:a}=I;o&&C(o,e),a()}function je(e){const{onFocus:o}=t,{nTriggerFormFocus:a}=I;o&&C(o,e),a()}function He(e){const{onClear:o}=t;o&&C(o,e)}function Ue(e){const{onInputBlur:o}=t;o&&C(o,e)}function Ke(e){const{onInputFocus:o}=t;o&&C(o,e)}function qe(){const{onDeactivate:e}=t;e&&C(e)}function Ye(){const{onActivate:e}=t;e&&C(e)}function Xe(e){const{onClick:o}=t;o&&C(o,e)}function Je(e){const{onWrapperFocus:o}=t;o&&C(o,e)}function Ge(e){const{onWrapperBlur:o}=t;o&&C(o,e)}function Ze(){A.value=!0}function Qe(e){A.value=!1,e.target===b.value?G(e,1):G(e,0)}function G(e,o=0,a="input"){const p=e.target.value;if(de(p),e instanceof InputEvent&&!e.isComposing&&(A.value=!1),t.type==="textarea"){const{value:v}=F;v&&v.syncUnifiedContainer()}if(ae=p,A.value)return;E.recordCursor();const g=et(p);if(g)if(!t.pair)a==="input"?X(p,{source:o}):J(p,{source:o});else{let{value:v}=T;Array.isArray(v)?v=[v[0],v[1]]:v=["",""],v[o]=p,a==="input"?X(v,{source:o}):J(v,{source:o})}Ne.$forceUpdate(),g||Se(E.restoreCursor)}function et(e){const{countGraphemes:o,maxlength:a,minlength:p}=t;if(o){let v;if(a!==void 0&&(v===void 0&&(v=o(e)),v>Number(a))||p!==void 0&&(v===void 0&&(v=o(e)),v<Number(a)))return!1}const{allowInput:g}=t;return typeof g=="function"?g(e):!0}function tt(e){Ue(e),e.relatedTarget===h.value&&qe(),e.relatedTarget!==null&&(e.relatedTarget===l.value||e.relatedTarget===b.value||e.relatedTarget===c.value)||(V.value=!1),Z(e,"blur"),w.value=null}function ot(e,o){Ke(e),W.value=!0,V.value=!0,Ye(),Z(e,"focus"),o===0?w.value=l.value:o===1?w.value=b.value:o===2&&(w.value=c.value)}function nt(e){t.passivelyActivated&&(Ge(e),Z(e,"blur"))}function rt(e){t.passivelyActivated&&(W.value=!0,Je(e),Z(e,"focus"))}function Z(e,o){e.relatedTarget!==null&&(e.relatedTarget===l.value||e.relatedTarget===b.value||e.relatedTarget===c.value||e.relatedTarget===h.value)||(o==="focus"?(je(e),W.value=!0):o==="blur"&&(Oe(e),W.value=!1))}function at(e,o){G(e,o,"change")}function it(e){Xe(e)}function lt(e){He(e),be()}function be(){t.pair?(X(["",""],{source:"clear"}),J(["",""],{source:"clear"})):(X("",{source:"clear"}),J("",{source:"clear"}))}function st(e){const{onMousedown:o}=t;o&&o(e);const{tagName:a}=e.target;if(a!=="INPUT"&&a!=="TEXTAREA"){if(t.resizable){const{value:p}=h;if(p){const{left:g,top:v,width:_,height:k}=p.getBoundingClientRect(),D=14;if(g+_-D<e.clientX&&e.clientX<g+_&&v+k-D<e.clientY&&e.clientY<v+k)return}}e.preventDefault(),W.value||ye()}}function ct(){var e;L.value=!0,t.type==="textarea"&&((e=F.value)===null||e===void 0||e.handleMouseEnterWrapper())}function dt(){var e;L.value=!1,t.type==="textarea"&&((e=F.value)===null||e===void 0||e.handleMouseLeaveWrapper())}function ut(){B.value||se.value==="click"&&(N.value=!N.value)}function ht(e){if(B.value)return;e.preventDefault();const o=p=>{p.preventDefault(),ze("mouseup",document,o)};if(Me("mouseup",document,o),se.value!=="mousedown")return;N.value=!0;const a=()=>{N.value=!1,ze("mouseup",document,a)};Me("mouseup",document,a)}function ft(e){t.onKeyup&&C(t.onKeyup,e)}function vt(e){switch(t.onKeydown&&C(t.onKeydown,e),e.key){case"Escape":ce();break;case"Enter":pt(e);break}}function pt(e){var o,a;if(t.passivelyActivated){const{value:p}=V;if(p){t.internalDeactivateOnEnter&&ce();return}e.preventDefault(),t.type==="textarea"?(o=c.value)===null||o===void 0||o.focus():(a=l.value)===null||a===void 0||a.focus()}}function ce(){t.passivelyActivated&&(V.value=!1,Se(()=>{var e;(e=h.value)===null||e===void 0||e.focus()}))}function ye(){var e,o,a;B.value||(t.passivelyActivated?(e=h.value)===null||e===void 0||e.focus():((o=c.value)===null||o===void 0||o.focus(),(a=l.value)===null||a===void 0||a.focus()))}function mt(){var e;!((e=h.value)===null||e===void 0)&&e.contains(document.activeElement)&&document.activeElement.blur()}function gt(){var e,o;(e=c.value)===null||e===void 0||e.select(),(o=l.value)===null||o===void 0||o.select()}function bt(){B.value||(c.value?c.value.focus():l.value&&l.value.focus())}function yt(){const{value:e}=h;e!=null&&e.contains(document.activeElement)&&e!==document.activeElement&&ce()}function wt(e){if(t.type==="textarea"){const{value:o}=c;o==null||o.scrollTo(e)}else{const{value:o}=l;o==null||o.scrollTo(e)}}function de(e){const{type:o,pair:a,autosize:p}=t;if(!a&&p)if(o==="textarea"){const{value:g}=u;g&&(g.textContent=`${e??""}\r
`)}else{const{value:g}=d;g&&(e?g.textContent=e:g.innerHTML="&nbsp;")}}function xt(){Le()}const we=x({top:"0"});function Ct(e){var o;const{scrollTop:a}=e.target;we.value.top=`${-a}px`,(o=F.value)===null||o===void 0||o.syncUnifiedContainer()}let Q=null;Pe(()=>{const{autosize:e,type:o}=t;e&&o==="textarea"?Q=pe(T,a=>{!Array.isArray(a)&&a!==ae&&de(a)}):Q==null||Q()});let ee=null;Pe(()=>{t.type==="textarea"?ee=pe(T,e=>{var o;!Array.isArray(e)&&e!==ae&&((o=F.value)===null||o===void 0||o.syncUnifiedContainer())}):ee==null||ee()}),So(ke,{mergedValueRef:T,maxlengthRef:Ve,mergedClsPrefixRef:s,countGraphemesRef:ve(t,"countGraphemes")});const Pt={wrapperElRef:h,inputElRef:l,textareaElRef:c,isCompositing:A,clear:be,focus:ye,blur:mt,select:gt,deactivate:yt,activate:bt,scrollTo:wt},St=Mo("Input",P,s),xe=z(()=>{const{value:e}=re,{common:{cubicBezierEaseInOut:o},self:{color:a,borderRadius:p,textColor:g,caretColor:v,caretColorError:_,caretColorWarning:k,textDecorationColor:D,border:O,borderDisabled:j,borderHover:ue,borderFocus:Mt,placeholderColor:zt,placeholderColorDisabled:Ft,lineHeightTextarea:Tt,colorDisabled:At,colorFocus:_t,textColorDisabled:kt,boxShadowFocus:Dt,iconSize:Rt,colorFocusWarning:Et,boxShadowFocusWarning:Bt,borderWarning:Wt,borderFocusWarning:$t,borderHoverWarning:It,colorFocusError:Lt,boxShadowFocusError:Vt,borderError:Nt,borderFocusError:Ot,borderHoverError:jt,clearSize:Ht,clearColor:Ut,clearColorHover:Kt,clearColorPressed:qt,iconColor:Yt,iconColorDisabled:Xt,suffixTextColor:Jt,countTextColor:Gt,countTextColorDisabled:Zt,iconColorHover:Qt,iconColorPressed:eo,loadingColor:to,loadingColorError:oo,loadingColorWarning:no,[fe("padding",e)]:ro,[fe("fontSize",e)]:ao,[fe("height",e)]:io}}=f.value,{left:lo,right:so}=ko(ro);return{"--n-bezier":o,"--n-count-text-color":Gt,"--n-count-text-color-disabled":Zt,"--n-color":a,"--n-font-size":ao,"--n-border-radius":p,"--n-height":io,"--n-padding-left":lo,"--n-padding-right":so,"--n-text-color":g,"--n-caret-color":v,"--n-text-decoration-color":D,"--n-border":O,"--n-border-disabled":j,"--n-border-hover":ue,"--n-border-focus":Mt,"--n-placeholder-color":zt,"--n-placeholder-color-disabled":Ft,"--n-icon-size":Rt,"--n-line-height-textarea":Tt,"--n-color-disabled":At,"--n-color-focus":_t,"--n-text-color-disabled":kt,"--n-box-shadow-focus":Dt,"--n-loading-color":to,"--n-caret-color-warning":k,"--n-color-focus-warning":Et,"--n-box-shadow-focus-warning":Bt,"--n-border-warning":Wt,"--n-border-focus-warning":$t,"--n-border-hover-warning":It,"--n-loading-color-warning":no,"--n-caret-color-error":_,"--n-color-focus-error":Lt,"--n-box-shadow-focus-error":Vt,"--n-border-error":Nt,"--n-border-focus-error":Ot,"--n-border-hover-error":jt,"--n-loading-color-error":oo,"--n-clear-color":Ut,"--n-clear-size":Ht,"--n-clear-color-hover":Kt,"--n-clear-color-pressed":qt,"--n-icon-color":Yt,"--n-icon-color-hover":Qt,"--n-icon-color-pressed":eo,"--n-icon-color-disabled":Xt,"--n-suffix-text-color":Jt}}),$=m?zo("input",z(()=>{const{value:e}=re;return e[0]}),xe,t):void 0;return Object.assign(Object.assign({},Pt),{wrapperElRef:h,inputElRef:l,inputMirrorElRef:d,inputEl2Ref:b,textareaElRef:c,textareaMirrorElRef:u,textareaScrollbarInstRef:F,rtlEnabled:St,uncontrolledValue:Y,mergedValue:T,passwordVisible:N,mergedPlaceholder:ie,showPlaceholder1:Be,showPlaceholder2:We,mergedFocus:le,isComposing:A,activated:V,showClearButton:$e,mergedSize:re,mergedDisabled:B,textDecorationStyle:Ie,mergedClsPrefix:s,mergedBordered:n,mergedShowPasswordOn:se,placeholderStyle:we,mergedStatus:Ee,textAreaScrollContainerWidth:ge,handleTextAreaScroll:Ct,handleCompositionStart:Ze,handleCompositionEnd:Qe,handleInput:G,handleInputBlur:tt,handleInputFocus:ot,handleWrapperBlur:nt,handleWrapperFocus:rt,handleMouseEnter:ct,handleMouseLeave:dt,handleMouseDown:st,handleChange:at,handleClick:it,handleClear:lt,handlePasswordToggleClick:ut,handlePasswordToggleMousedown:ht,handleWrapperKeydown:vt,handleWrapperKeyup:ft,handleTextAreaMirrorResize:xt,getTextareaScrollContainer:()=>c.value,mergedTheme:f,cssVars:m?void 0:xe,themeClass:$==null?void 0:$.themeClass,onRender:$==null?void 0:$.onRender})},render(){var t,s;const{mergedClsPrefix:n,mergedStatus:m,themeClass:P,type:f,countGraphemes:h,onRender:c}=this,u=this.$slots;return c==null||c(),r("div",{ref:"wrapperElRef",class:[`${n}-input`,P,m&&`${n}-input--${m}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:f==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&f!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},r("div",{class:`${n}-input-wrapper`},te(u.prefix,d=>d&&r("div",{class:`${n}-input__prefix`},d)),f==="textarea"?r(Fo,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var d,l;const{textAreaScrollContainerWidth:b}=this,w={width:this.autosize&&b&&`${b}px`};return r(To,null,r("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(d=this.inputProps)===null||d===void 0?void 0:d.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:h?void 0:this.maxlength,minlength:h?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(l=this.inputProps)===null||l===void 0?void 0:l.style,w],onBlur:this.handleInputBlur,onFocus:E=>{this.handleInputFocus(E,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?r("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,w],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?r(Ao,{onResize:this.handleTextAreaMirrorResize},{default:()=>r("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):r("div",{class:`${n}-input__input`},r("input",Object.assign({type:f==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":f},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(t=this.inputProps)===null||t===void 0?void 0:t.class],style:[this.textDecorationStyle[0],(s=this.inputProps)===null||s===void 0?void 0:s.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:h?void 0:this.maxlength,minlength:h?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:d=>{this.handleInputFocus(d,0)},onInput:d=>{this.handleInput(d,0)},onChange:d=>{this.handleChange(d,0)}})),this.showPlaceholder1?r("div",{class:`${n}-input__placeholder`},r("span",null,this.mergedPlaceholder[0])):null,this.autosize?r("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&te(u.suffix,d=>d||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?r("div",{class:`${n}-input__suffix`},[te(u["clear-icon-placeholder"],l=>(this.clearable||l)&&r(me,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>l,icon:()=>{var b,w;return(w=(b=this.$slots)["clear-icon"])===null||w===void 0?void 0:w.call(b)}})),this.internalLoadingBeforeSuffix?null:d,this.loading!==void 0?r(gn,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?d:null,this.showCount&&this.type!=="textarea"?r(Fe,null,{default:l=>{var b;return(b=u.count)===null||b===void 0?void 0:b.call(u,l)}}):null,this.mergedShowPasswordOn&&this.type==="password"?r("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?q(u["password-visible-icon"],()=>[r(ne,{clsPrefix:n},{default:()=>r(hn,null)})]):q(u["password-invisible-icon"],()=>[r(ne,{clsPrefix:n},{default:()=>r(fn,null)})])):null]):null)),this.pair?r("span",{class:`${n}-input__separator`},q(u.separator,()=>[this.separator])):null,this.pair?r("div",{class:`${n}-input-wrapper`},r("div",{class:`${n}-input__input`},r("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:h?void 0:this.maxlength,minlength:h?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:d=>{this.handleInputFocus(d,1)},onInput:d=>{this.handleInput(d,1)},onChange:d=>{this.handleChange(d,1)}}),this.showPlaceholder2?r("div",{class:`${n}-input__placeholder`},r("span",null,this.mergedPlaceholder[1])):null),te(u.suffix,d=>(this.clearable||d)&&r("div",{class:`${n}-input__suffix`},[this.clearable&&r(me,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var l;return(l=u["clear-icon"])===null||l===void 0?void 0:l.call(u)},placeholder:()=>{var l;return(l=u["clear-icon-placeholder"])===null||l===void 0?void 0:l.call(u)}}),d]))):null,this.mergedBordered?r("div",{class:`${n}-input__border`}):null,this.mergedBordered?r("div",{class:`${n}-input__state-border`}):null,this.showCount&&f==="textarea"?r(Fe,null,{default:d=>{var l;const{renderCount:b}=this;return b?b(d):(l=u.count)===null||l===void 0?void 0:l.call(u,d)}}):null)}});export{vn as C,hn as E,gn as N,Sn as _,cn as e,un as u};