index.d0ef965d.js 40 KB

12345678910111213
  1. import{d as Q,aO as q,r as V,aj as yt,a8 as oe,f as o,a7 as H,a_ as en,af as U,a4 as lt,a5 as $,K as W,w as J,aN as le,aL as we,aM as Xe,ai as me,aJ as It,bd as tn,aK as nn,aF as qe,bf as xt,f6 as _t,f7 as Ct,f8 as an,f9 as ln,fa as sn,fb as on,aI as rn,aP as Nt,aQ as un,aR as dn,aS as Mt,aT as cn,aU as Pt,aX as We,aw as Et,fc as st,fd as ot,ae as hn,a6 as z,aH as fn,bI as gn,bg as pn,bj as mn,fe as vn,dr as bn,b5 as rt,ag as Sn,D as Dt,aC as wn,b6 as ut,ff as $n,fg as dt,cA as Pe,fh as yn,b as Ye,at as Vt,cp as Ge,c as F,o as M,e as R,L as N,u as _,j as w,l as re,t as A,cl as Y,F as ue,T as Ee,bV as Me,S as Z,fi as ct,ey as zt,fj as $e,cC as In,a3 as Tt,ct as xn,eh as _n,ei as Cn,m as K,eq as Ue,H as At,J as Bt,fk as Rt,I as Ft,eZ as Ot,fl as Nn,fm as Mn,fn as Pn,dy as En,dx as Dn,_ as xe,fo as Vn,h as G,cf as kt,G as Ht,eY as Wt,fp as zn,bB as Tn,bC as An,fq as ht,bH as ft,fr as gt,c_ as Bn,fs as Rn,ft as Fn,fu as On,fv as pe,s as kn,fw as Hn,fx as pt,fy as mt,fz as Wn,fA as Gn,am as Un,M as Ln}from"./index.932f1548.js";/* empty css */import{R as Gt}from"./right-fill-pano.98fad014.js";import{G as jn,P as Kn}from"./sign.6dc2ece0.js";import{i as ge,p as Xn,a as qn}from"./guide.11b18965.js";import{a as vt,S as bt}from"./sign-item.be3461e3.js";import{U as Jn}from"./UpOutlined.ead005a4.js";import{D as Qn}from"./DownOutlined.e8d377cc.js";import{i as Yn}from"./isMobile.39a6fa85.js";import"./init.cc58d2da.js";function Je(){return typeof BigInt=="function"}function ye(e){let t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t=`0${t}`);const i=t||"0",c=i.split("."),l=c[0]||"0",r=c[1]||"0";l==="0"&&r==="0"&&(n=!1);const h=n?"-":"";return{negative:n,negativeStr:h,trimStr:i,integerStr:l,decimalStr:r,fullStr:`${h}${i}`}}function Ze(e){const t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function Ie(e){const t=String(e);if(Ze(e)){let n=Number(t.slice(t.indexOf("e-")+2));const i=t.match(/\.(\d+)/);return i!=null&&i[1]&&(n+=i[1].length),n}return t.includes(".")&&tt(t)?t.length-t.indexOf(".")-1:0}function et(e){let t=String(e);if(Ze(e)){if(e>Number.MAX_SAFE_INTEGER)return String(Je()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(Je()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(Ie(t))}return ye(t).fullStr}function tt(e){return typeof e=="number"?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}function Ut(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}class se{constructor(t){if(this.origin="",Ut(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}negate(){return new se(-this.toNumber())}add(t){if(this.isInvalidate())return new se(t);const n=Number(t);if(Number.isNaN(n))return this;const i=this.number+n;if(i>Number.MAX_SAFE_INTEGER)return new se(Number.MAX_SAFE_INTEGER);if(i<Number.MIN_SAFE_INTEGER)return new se(Number.MIN_SAFE_INTEGER);const c=Math.max(Ie(this.number),Ie(n));return new se(i.toFixed(c))}isEmpty(){return this.empty}isNaN(){return Number.isNaN(this.number)}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toNumber()===(t==null?void 0:t.toNumber())}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.number}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":et(this.number):this.origin}}class ve{constructor(t){if(this.origin="",Ut(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}let n=t;if(Ze(n)&&(n=Number(n)),n=typeof n=="string"?n:et(n),tt(n)){const i=ye(n);this.negative=i.negative;const c=i.trimStr.split(".");this.integer=BigInt(c[0]);const l=c[1]||"0";this.decimal=BigInt(l),this.decimalLen=l.length}else this.nan=!0}getMark(){return this.negative?"-":""}getIntegerStr(){return this.integer.toString()}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,"0")}alignDecimal(t){const n=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t,"0")}`;return BigInt(n)}negate(){const t=new ve(this.toString());return t.negative=!t.negative,t}add(t){if(this.isInvalidate())return new ve(t);const n=new ve(t);if(n.isInvalidate())return this;const i=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),c=this.alignDecimal(i),l=n.alignDecimal(i),r=(c+l).toString(),{negativeStr:h,trimStr:f}=ye(r),g=`${h}${f.padStart(i+1,"0")}`;return new ve(`${g.slice(0,-i)}.${g.slice(-i)}`)}isEmpty(){return this.empty}isNaN(){return this.nan}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toString()===(t==null?void 0:t.toString())}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":ye(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}function j(e){return Je()?new ve(e):new se(e)}function Qe(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";const{negativeStr:c,integerStr:l,decimalStr:r}=ye(e),h=`${t}${r}`,f=`${c}${l}`;if(n>=0){const g=Number(r[n]);if(g>=5&&!i){const a=j(e).add(`${c}0.${"0".repeat(n)}${10-g}`);return Qe(a.toString(),t,n,i)}return n===0?f:`${f}${t}${r.padEnd(n,"0").slice(0,n)}`}return h===".0"?f:`${f}${h}`}const Zn=200,ea=600,ta=Q({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:q()},slots:Object,setup(e,t){let{slots:n,emit:i}=t;const c=V(),l=(h,f)=>{h.preventDefault(),i("step",f);function g(){i("step",f),c.value=setTimeout(g,Zn)}c.value=setTimeout(g,ea)},r=()=>{clearTimeout(c.value)};return yt(()=>{r()}),()=>{if(Yn())return null;const{prefixCls:h,upDisabled:f,downDisabled:g}=e,a=`${h}-handler`,s=oe(a,`${a}-up`,{[`${a}-up-disabled`]:f}),u=oe(a,`${a}-down`,{[`${a}-down-disabled`]:g}),y={unselectable:"on",role:"button",onMouseup:r,onMouseleave:r},{upNode:v,downNode:D}=n;return o("div",{class:`${a}-wrap`},[o("span",H(H({},y),{},{onMousedown:p=>{l(p,!0)},"aria-label":"Increase Value","aria-disabled":f,class:s}),[(v==null?void 0:v())||o("span",{unselectable:"on",class:`${h}-handler-up-inner`},null)]),o("span",H(H({},y),{},{onMousedown:p=>{l(p,!1)},"aria-label":"Decrease Value","aria-disabled":g,class:u}),[(D==null?void 0:D())||o("span",{unselectable:"on",class:`${h}-handler-down-inner`},null)])])}}});function na(e,t){const n=V(null);function i(){try{const{selectionStart:l,selectionEnd:r,value:h}=e.value,f=h.substring(0,l),g=h.substring(r);n.value={start:l,end:r,value:h,beforeTxt:f,afterTxt:g}}catch{}}function c(){if(e.value&&n.value&&t.value)try{const{value:l}=e.value,{beforeTxt:r,afterTxt:h,start:f}=n.value;let g=l.length;if(l.endsWith(h))g=l.length-n.value.afterTxt.length;else if(l.startsWith(r))g=r.length;else{const a=r[f-1],s=l.indexOf(a,f-1);s!==-1&&(g=s+1)}e.value.setSelectionRange(g,g)}catch(l){en(!1,`Something warning of cursor restore. Please fire issue about this: ${l.message}`)}}return[i,c]}const aa=()=>{const e=U(0),t=()=>{lt.cancel(e.value)};return yt(()=>{t()}),n=>{t(),e.value=lt(()=>{n()})}};var ia=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(e);c<i.length;c++)t.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(e,i[c])&&(n[i[c]]=e[i[c]]);return n};const St=(e,t)=>e||t.isEmpty()?t.toString():t.toNumber(),wt=e=>{const t=j(e);return t.isInvalidate()?null:t},Lt=()=>({stringMode:le(),defaultValue:we([String,Number]),value:we([String,Number]),prefixCls:Xe(),min:we([String,Number]),max:we([String,Number]),step:we([String,Number],1),tabindex:Number,controls:le(!0),readonly:le(),disabled:le(),autofocus:le(),keyboard:le(!0),parser:q(),formatter:q(),precision:Number,decimalSeparator:String,onInput:q(),onChange:q(),onPressEnter:q(),onStep:q(),onBlur:q(),onFocus:q()}),la=Q({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:$($({},Lt()),{lazy:Boolean}),slots:Object,setup(e,t){let{attrs:n,slots:i,emit:c,expose:l}=t;const r=U(),h=U(!1),f=U(!1),g=U(!1),a=U(j(e.value));function s(d){e.value===void 0&&(a.value=d)}const u=(d,m)=>{if(!m)return e.precision>=0?e.precision:Math.max(Ie(d),Ie(e.step))},y=d=>{const m=String(d);if(e.parser)return e.parser(m);let b=m;return e.decimalSeparator&&(b=b.replace(e.decimalSeparator,".")),b.replace(/[^\w.-]+/g,"")},v=U(""),D=(d,m)=>{if(e.formatter)return e.formatter(d,{userTyping:m,input:String(v.value)});let b=typeof d=="number"?et(d):d;if(!m){const I=u(b,m);if(tt(b)&&(e.decimalSeparator||I>=0)){const k=e.decimalSeparator||".";b=Qe(b,k,I)}}return b},p=(()=>{const d=e.value;return a.value.isInvalidate()&&["string","number"].includes(typeof d)?Number.isNaN(d)?"":d:D(a.value.toString(),!1)})();v.value=p;function C(d,m){v.value=D(d.isInvalidate()?d.toString(!1):d.toString(!m),m)}const T=W(()=>wt(e.max)),E=W(()=>wt(e.min)),O=W(()=>!T.value||!a.value||a.value.isInvalidate()?!1:T.value.lessEquals(a.value)),L=W(()=>!E.value||!a.value||a.value.isInvalidate()?!1:a.value.lessEquals(E.value)),[ee,te]=na(r,h),ne=d=>T.value&&!d.lessEquals(T.value)?T.value:E.value&&!E.value.lessEquals(d)?E.value:null,S=d=>!ne(d),B=(d,m)=>{var b;let I=d,k=S(I)||I.isEmpty();if(!I.isEmpty()&&!m&&(I=ne(I)||I,k=!0),!e.readonly&&!e.disabled&&k){const X=I.toString(),he=u(X,m);return he>=0&&(I=j(Qe(X,".",he))),I.equals(a.value)||(s(I),(b=e.onChange)===null||b===void 0||b.call(e,I.isEmpty()?null:St(e.stringMode,I)),e.value===void 0&&C(I,m)),I}return a.value},De=aa(),be=d=>{var m;if(ee(),v.value=d,!g.value){const b=y(d),I=j(b);I.isNaN()||B(I,!0)}(m=e.onInput)===null||m===void 0||m.call(e,d),De(()=>{let b=d;e.parser||(b=d.replace(/。/g,".")),b!==d&&be(b)})},P=()=>{g.value=!0},Se=()=>{g.value=!1,be(r.value.value)},de=d=>{be(d.target.value)},ce=d=>{var m,b;if(d&&O.value||!d&&L.value)return;f.value=!1;let I=j(e.step);d||(I=I.negate());const k=(a.value||j(0)).add(I.toString()),X=B(k,!1);(m=e.onStep)===null||m===void 0||m.call(e,St(e.stringMode,X),{offset:e.step,type:d?"up":"down"}),(b=r.value)===null||b===void 0||b.focus()},ae=d=>{const m=j(y(v.value));let b=m;m.isNaN()?b=a.value:b=B(m,d),e.value!==void 0?C(a.value,!1):b.isNaN()||C(b,!1)},Ve=()=>{f.value=!0},ze=d=>{var m;const{which:b}=d;f.value=!0,b===me.ENTER&&(g.value||(f.value=!1),ae(!1),(m=e.onPressEnter)===null||m===void 0||m.call(e,d)),e.keyboard!==!1&&!g.value&&[me.UP,me.DOWN].includes(b)&&(ce(me.UP===b),d.preventDefault())},Te=()=>{f.value=!1},_e=d=>{ae(!1),h.value=!1,f.value=!1,c("blur",d)};return J(()=>e.precision,()=>{a.value.isInvalidate()||C(a.value,!1)},{flush:"post"}),J(()=>e.value,()=>{const d=j(e.value);a.value=d;const m=j(y(v.value));(!d.equals(m)||!f.value||e.formatter)&&C(d,f.value)},{flush:"post"}),J(v,()=>{e.formatter&&te()},{flush:"post"}),J(()=>e.disabled,d=>{d&&(h.value=!1)}),l({focus:()=>{var d;(d=r.value)===null||d===void 0||d.focus()},blur:()=>{var d;(d=r.value)===null||d===void 0||d.blur()}}),()=>{const d=$($({},n),e),{prefixCls:m="rc-input-number",min:b,max:I,step:k=1,defaultValue:X,value:he,disabled:Ce,readonly:Ne,keyboard:x,controls:Ae=!0,autofocus:ie,stringMode:Be,parser:Re,formatter:fe,precision:Fe,decimalSeparator:Oe,onChange:ke,onInput:nt,onPressEnter:at,onStep:Ya,lazy:Kt,class:Xt,style:qt}=d,Jt=ia(d,["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"]),{upHandler:Qt,downHandler:Yt}=i,it=`${m}-input`,He={};return Kt?He.onChange=de:He.onInput=de,o("div",{class:oe(m,Xt,{[`${m}-focused`]:h.value,[`${m}-disabled`]:Ce,[`${m}-readonly`]:Ne,[`${m}-not-a-number`]:a.value.isNaN(),[`${m}-out-of-range`]:!a.value.isInvalidate()&&!S(a.value)}),style:qt,onKeydown:ze,onKeyup:Te},[Ae&&o(ta,{prefixCls:m,upDisabled:O.value,downDisabled:L.value,onStep:ce},{upNode:Qt,downNode:Yt}),o("div",{class:`${it}-wrap`},[o("input",H(H(H({autofocus:ie,autocomplete:"off",role:"spinbutton","aria-valuemin":b,"aria-valuemax":I,"aria-valuenow":a.value.isInvalidate()?null:a.value.toString(),step:k},Jt),{},{ref:r,class:it,value:v.value,disabled:Ce,readonly:Ne,onFocus:Zt=>{h.value=!0,c("focus",Zt)}},He),{},{onBlur:_e,onCompositionstart:P,onCompositionend:Se,onBeforeinput:Ve}),null)])])}}});function Le(e){return e!=null}const sa=e=>{const{componentCls:t,lineWidth:n,lineType:i,colorBorder:c,borderRadius:l,fontSizeLG:r,controlHeightLG:h,controlHeightSM:f,colorError:g,inputPaddingHorizontalSM:a,colorTextDescription:s,motionDurationMid:u,colorPrimary:y,controlHeight:v,inputPaddingHorizontal:D,colorBgContainer:p,colorTextDisabled:C,borderRadiusSM:T,borderRadiusLG:E,controlWidth:O,handleVisible:L}=e;return[{[t]:$($($($({},qe(e)),xt(e)),_t(e,t)),{display:"inline-block",width:O,margin:0,padding:0,border:`${n}px ${i} ${c}`,borderRadius:l,"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:r,borderRadius:E,[`input${t}-input`]:{height:h-2*n}},"&-sm":{padding:0,borderRadius:T,[`input${t}-input`]:{height:f-2*n,padding:`0 ${a}px`}},"&:hover":$({},Ct(e)),"&-focused":$({},an(e)),"&-disabled":$($({},ln(e)),{[`${t}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:g}},"&-group":$($($({},qe(e)),sn(e)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:E}},"&-sm":{[`${t}-group-addon`]:{borderRadius:T}}}}),[t]:{"&-input":$($({width:"100%",height:v-2*n,padding:`0 ${D}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:l,outline:0,transition:`all ${u} linear`,appearance:"textfield",color:e.colorText,fontSize:"inherit",verticalAlign:"top"},on(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:{[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{opacity:1},[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",background:p,borderStartStartRadius:0,borderStartEndRadius:l,borderEndEndRadius:l,borderEndStartRadius:0,opacity:L===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${u} linear ${u}`,[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
  2. ${t}-handler-up-inner,
  3. ${t}-handler-down-inner
  4. `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:s,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${n}px ${i} ${c}`,transition:`all ${u} linear`,"&:active":{background:e.colorFillAlter},"&:hover":{height:"60%",[`
  5. ${t}-handler-up-inner,
  6. ${t}-handler-down-inner
  7. `]:{color:y}},"&-up-inner, &-down-inner":$($({},rn()),{color:s,transition:`all ${u} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:l},[`${t}-handler-down`]:{borderBlockStart:`${n}px ${i} ${c}`,borderEndEndRadius:l},"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[`
  8. ${t}-handler-up-disabled,
  9. ${t}-handler-down-disabled
  10. `]:{cursor:"not-allowed"},[`
  11. ${t}-handler-up-disabled:hover &-handler-up-inner,
  12. ${t}-handler-down-disabled:hover &-handler-down-inner
  13. `]:{color:C}}},{[`${t}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${t}-handler-down`]:{borderBlockStartWidth:0}}}]},oa=e=>{const{componentCls:t,inputPaddingHorizontal:n,inputAffixPadding:i,controlWidth:c,borderRadiusLG:l,borderRadiusSM:r}=e;return{[`${t}-affix-wrapper`]:$($($({},xt(e)),_t(e,`${t}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:c,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:l},"&-sm":{borderRadius:r},[`&:not(${t}-affix-wrapper-disabled):hover`]:$($({},Ct(e)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:"transparent"}},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},[`input${t}-input`]:{padding:0},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:i},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:n,marginInlineStart:i}}})}},ra=It("InputNumber",e=>{const t=tn(e);return[sa(t),oa(t),nn(t)]},e=>({controlWidth:90,handleWidth:e.controlHeightSM-e.lineWidth*2,handleFontSize:e.fontSize/2,handleVisible:"auto"}));var ua=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(e);c<i.length;c++)t.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(e,i[c])&&(n[i[c]]=e[i[c]]);return n};const $t=Lt(),da=()=>$($({},$t),{size:Xe(),bordered:le(!0),placeholder:String,name:String,id:String,type:String,addonBefore:z.any,addonAfter:z.any,prefix:z.any,"onUpdate:value":$t.onChange,valueModifiers:Object,status:Xe()}),je=Q({compatConfig:{MODE:3},name:"AInputNumber",inheritAttrs:!1,props:da(),slots:Object,setup(e,t){let{emit:n,expose:i,attrs:c,slots:l}=t;var r;const h=Nt(),f=un.useInject(),g=W(()=>dn(f.status,e.status)),{prefixCls:a,size:s,direction:u,disabled:y}=Mt("input-number",e),{compactSize:v,compactItemClassnames:D}=cn(a,u),p=Pt(),C=W(()=>{var P;return(P=y.value)!==null&&P!==void 0?P:p.value}),[T,E]=ra(a),O=W(()=>v.value||s.value),L=U((r=e.value)!==null&&r!==void 0?r:e.defaultValue),ee=U(!1);J(()=>e.value,()=>{L.value=e.value});const te=U(null),ne=()=>{var P;(P=te.value)===null||P===void 0||P.focus()};i({focus:ne,blur:()=>{var P;(P=te.value)===null||P===void 0||P.blur()}});const B=P=>{e.value===void 0&&(L.value=P),n("update:value",P),n("change",P),h.onFieldChange()},De=P=>{ee.value=!1,n("blur",P),h.onFieldBlur()},be=P=>{ee.value=!0,n("focus",P)};return()=>{var P,Se,de,ce;const{hasFeedback:ae,isFormItemInput:Ve,feedbackIcon:ze}=f,Te=(P=e.id)!==null&&P!==void 0?P:h.id.value,_e=$($($({},c),e),{id:Te,disabled:C.value}),{class:d,bordered:m,readonly:b,style:I,addonBefore:k=(Se=l.addonBefore)===null||Se===void 0?void 0:Se.call(l),addonAfter:X=(de=l.addonAfter)===null||de===void 0?void 0:de.call(l),prefix:he=(ce=l.prefix)===null||ce===void 0?void 0:ce.call(l),valueModifiers:Ce={}}=_e,Ne=ua(_e,["class","bordered","readonly","style","addonBefore","addonAfter","prefix","valueModifiers"]),x=a.value,Ae=oe({[`${x}-lg`]:O.value==="large",[`${x}-sm`]:O.value==="small",[`${x}-rtl`]:u.value==="rtl",[`${x}-readonly`]:b,[`${x}-borderless`]:!m,[`${x}-in-form-item`]:Ve},We(x,g.value),d,D.value,E.value);let ie=o(la,H(H({},Et(Ne,["size","defaultValue"])),{},{ref:te,lazy:!!Ce.lazy,value:L.value,class:Ae,prefixCls:x,readonly:b,onChange:B,onBlur:De,onFocus:be}),{upHandler:l.upIcon?()=>o("span",{class:`${x}-handler-up-inner`},[l.upIcon()]):()=>o(Jn,{class:`${x}-handler-up-inner`},null),downHandler:l.downIcon?()=>o("span",{class:`${x}-handler-down-inner`},[l.downIcon()]):()=>o(Qn,{class:`${x}-handler-down-inner`},null)});const Be=Le(k)||Le(X),Re=Le(he);if(Re||ae){const fe=oe(`${x}-affix-wrapper`,We(`${x}-affix-wrapper`,g.value,ae),{[`${x}-affix-wrapper-focused`]:ee.value,[`${x}-affix-wrapper-disabled`]:C.value,[`${x}-affix-wrapper-sm`]:O.value==="small",[`${x}-affix-wrapper-lg`]:O.value==="large",[`${x}-affix-wrapper-rtl`]:u.value==="rtl",[`${x}-affix-wrapper-readonly`]:b,[`${x}-affix-wrapper-borderless`]:!m,[`${d}`]:!Be&&d},E.value);ie=o("div",{class:fe,style:I,onClick:ne},[Re&&o("span",{class:`${x}-prefix`},[he]),ie,ae&&o("span",{class:`${x}-suffix`},[ze])])}if(Be){const fe=`${x}-group`,Fe=`${fe}-addon`,Oe=k?o("div",{class:Fe},[k]):null,ke=X?o("div",{class:Fe},[X]):null,nt=oe(`${x}-wrapper`,fe,{[`${fe}-rtl`]:u.value==="rtl"},E.value),at=oe(`${x}-group-wrapper`,{[`${x}-group-wrapper-sm`]:O.value==="small",[`${x}-group-wrapper-lg`]:O.value==="large",[`${x}-group-wrapper-rtl`]:u.value==="rtl"},We(`${a}-group-wrapper`,g.value,ae),d,E.value);ie=o("div",{class:at,style:I},[o("div",{class:nt},[Oe&&o(st,null,{default:()=>[o(ot,null,{default:()=>[Oe]})]}),ie,ke&&o(st,null,{default:()=>[o(ot,null,{default:()=>[ke]})]})])])}return T(hn(ie,{style:I}))}}}),ca=$(je,{install:e=>(e.component(je.name,je),e)}),ha=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[`&${t}-small`]:{minWidth:e.switchMinWidthSM,height:e.switchHeightSM,lineHeight:`${e.switchHeightSM}px`,[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMaxSM,paddingInlineEnd:e.switchInnerMarginMinSM,[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSizeSM+e.switchPadding*2}px - ${e.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSizeSM+e.switchPadding*2}px + ${e.switchInnerMarginMaxSM*2}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:e.switchPinSizeSM,height:e.switchPinSizeSM},[`${t}-loading-icon`]:{top:(e.switchPinSizeSM-e.switchLoadingIconSize)/2,fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMinSM,paddingInlineEnd:e.switchInnerMarginMaxSM,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding*2}px + ${e.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSizeSM+e.switchPadding*2}px - ${e.switchInnerMarginMaxSM*2}px)`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.marginXXS/2,marginInlineEnd:-e.marginXXS/2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.marginXXS/2,marginInlineEnd:e.marginXXS/2}}}}}}},fa=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:(e.switchPinSize-e.fontSize)/2,color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},ga=e=>{const{componentCls:t}=e,n=`${t}-handle`;return{[t]:{[n]:{position:"absolute",top:e.switchPadding,insetInlineStart:e.switchPadding,width:e.switchPinSize,height:e.switchPinSize,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:e.colorWhite,borderRadius:e.switchPinSize/2,boxShadow:e.switchHandleShadow,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${n}`]:{insetInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding}px)`},[`&:not(${t}-disabled):active`]:{[`${n}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${n}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},pa=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[n]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:e.switchInnerMarginMax,paddingInlineEnd:e.switchInnerMarginMin,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${n}-checked, ${n}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none"},[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSize+e.switchPadding*2}px - ${e.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSize+e.switchPadding*2}px + ${e.switchInnerMarginMax*2}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${n}`]:{paddingInlineStart:e.switchInnerMarginMin,paddingInlineEnd:e.switchInnerMarginMax,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding*2}px + ${e.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSize+e.switchPadding*2}px - ${e.switchInnerMarginMax*2}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.switchPadding*2,marginInlineEnd:-e.switchPadding*2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.switchPadding*2,marginInlineEnd:e.switchPadding*2}}}}}},ma=e=>{const{componentCls:t}=e;return{[t]:$($($($({},qe(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:e.switchMinWidth,height:e.switchHeight,lineHeight:`${e.switchHeight}px`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),pn(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},va=It("Switch",e=>{const t=e.fontSize*e.lineHeight,n=e.controlHeight/2,i=2,c=t-i*2,l=n-i*2,r=fn(e,{switchMinWidth:c*2+i*4,switchHeight:t,switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchInnerMarginMin:c/2,switchInnerMarginMax:c+i+i*2,switchPadding:i,switchPinSize:c,switchBg:e.colorBgContainer,switchMinWidthSM:l*2+i*2,switchHeightSM:n,switchInnerMarginMinSM:l/2,switchInnerMarginMaxSM:l+i+i*2,switchPinSizeSM:l,switchHandleShadow:`0 2px 4px 0 ${new gn("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:e.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[ma(r),pa(r),ga(r),fa(r),ha(r)]}),ba=vn("small","default"),Sa=()=>({id:String,prefixCls:String,size:z.oneOf(ba),disabled:{type:Boolean,default:void 0},checkedChildren:z.any,unCheckedChildren:z.any,tabindex:z.oneOfType([z.string,z.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:z.oneOfType([z.string,z.number,z.looseBool]),checkedValue:z.oneOfType([z.string,z.number,z.looseBool]).def(!0),unCheckedValue:z.oneOfType([z.string,z.number,z.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}),wa=Q({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:Sa(),slots:Object,setup(e,t){let{attrs:n,slots:i,expose:c,emit:l}=t;const r=Nt(),h=Pt(),f=W(()=>{var S;return(S=e.disabled)!==null&&S!==void 0?S:h.value});bn(()=>{rt(),rt()});const g=V(e.checked!==void 0?e.checked:n.defaultChecked),a=W(()=>g.value===e.checkedValue);J(()=>e.checked,()=>{g.value=e.checked});const{prefixCls:s,direction:u,size:y}=Mt("switch",e),[v,D]=va(s),p=V(),C=()=>{var S;(S=p.value)===null||S===void 0||S.focus()};c({focus:C,blur:()=>{var S;(S=p.value)===null||S===void 0||S.blur()}}),Sn(()=>{Dt(()=>{e.autofocus&&!f.value&&p.value.focus()})});const E=(S,B)=>{f.value||(l("update:checked",S),l("change",S,B),r.onFieldChange())},O=S=>{l("blur",S)},L=S=>{C();const B=a.value?e.unCheckedValue:e.checkedValue;E(B,S),l("click",B,S)},ee=S=>{S.keyCode===me.LEFT?E(e.unCheckedValue,S):S.keyCode===me.RIGHT&&E(e.checkedValue,S),l("keydown",S)},te=S=>{var B;(B=p.value)===null||B===void 0||B.blur(),l("mouseup",S)},ne=W(()=>({[`${s.value}-small`]:y.value==="small",[`${s.value}-loading`]:e.loading,[`${s.value}-checked`]:a.value,[`${s.value}-disabled`]:f.value,[s.value]:!0,[`${s.value}-rtl`]:u.value==="rtl",[D.value]:!0}));return()=>{var S;return v(o($n,null,{default:()=>[o("button",H(H(H({},Et(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),n),{},{id:(S=e.id)!==null&&S!==void 0?S:r.id.value,onKeydown:ee,onClick:L,onBlur:O,onMouseup:te,type:"button",role:"switch","aria-checked":g.value,disabled:f.value||e.loading,class:[n.class,ne.value],ref:p}),[o("div",{class:`${s.value}-handle`},[e.loading?o(wn,{class:`${s.value}-loading-icon`},null):null]),o("span",{class:`${s.value}-inner`},[o("span",{class:`${s.value}-inner-checked`},[ut(i,e,"checkedChildren")]),o("span",{class:`${s.value}-inner-unchecked`},[ut(i,e,"unCheckedChildren")])])])]}))}}}),Ke=mn(wa),jt=e=>(En("data-v-a0087649"),e=e(),Dn(),e),$a={class:"overflow"},ya={key:0,class:"info"},Ia={class:"meta"},xa={class:"length"},_a=["onClick"],Ca=["src"],Na={key:0,class:"set-phone-attr"},Ma=jt(()=>N("span",null,"m/s",-1)),Pa=jt(()=>N("span",{class:"time"},"s",-1)),Ea={key:1,class:"un-video"},Da=Q({__name:"edit-paths",props:{data:null},setup(e){const t=e,n=V(dt(t.data)),i=V(n.value[0]),c=(u,y)=>{const v=Ue.calcPathInfo(n.value.slice(u,u+2),y);Object.assign(n.value[u],v)};Pe(()=>At([Bt.push(V(!1)),Rt.push(V(!1)),Ft.push(V(!1)),Ot.push(V(!1))])),yn(n,{save(){if(!n.value.length)throw Me.alert(Z.t("guide.guide.unItems")),"\u65E0\u6CD5\u4FDD\u5B58\u7A7A\u8DEF\u5F84\u5BFC\u89C8\uFF01";const u=dt(t.data);t.data.cover=n.value[0].cover,ct.value=ct.value.filter(y=>!u.includes(y)).concat(n.value),zt(t.data.id)&&$e.value.push(t.data)}},!1);const l=()=>{In(async()=>{const u=await Ue.screenshot(260,160),v=await(await fetch(u)).blob(),D=Ue.getPose(),p=n.value.indexOf(i.value)+1,C=Nn({...Mn(D),guideId:t.data.id,cover:{url:u,blob:v}});if(n.value.splice(p,0,C),i.value=C,n.value.length>1){const T=n.value.length-2;c(T,{time:3})}})},r=async(u,y=!1)=>{if(y||await Me.confirm(Z.t("guide.guide.delConfirm"))){const v=n.value.indexOf(u);~v&&n.value.splice(v,1),u===i.value&&(i.value=n.value[v+(v===0?0:-1)])}},h=async()=>{await Me.confirm(Z.t("guide.guide.clearConfirm"))&&(n.value.length=0,i.value=n.value[0])},f=u=>{Pn(u),i.value=u},g=async()=>{ge.value?Xn():(f(n.value[0]),await Tt(400),qn(n.value,u=>{i.value=n.value[u-1]}))},a=V();Ye(async()=>{const u=n.value.indexOf(i.value);if(~u&&a.value){await Dt();const y=a.value.scrollWidth/n.value.length,v=a.value.offsetWidth/2,D=y*u-v;a.value.scroll({left:D,top:0})}});const s=V();return J(()=>({dom:s.value,len:n.value.length}),({dom:u},y,v)=>{if(u){const D=setTimeout(()=>{Ge.showBottomBar=!0,Ge.bottomBarHeight=u.offsetHeight+"px"},100);v(()=>clearTimeout(D))}},{flush:"post",immediate:!0}),Vt(()=>{Ge.bottomBarHeight="0px"}),(u,y)=>{const v=F("ui-icon"),D=F("ui-button"),p=F("ui-input");return M(),R("div",{class:"video",ref_key:"videoRef",ref:s},[N("div",$a,[o(v,{ctrl:"",type:_(ge)?"pause":"preview",disabled:!n.value.length,onClick:g},null,8,["type","disabled"]),o(D,{type:"primary",onClick:l,width:"200px",class:Y({disabled:_(ge)})},{default:w(()=>[re(A(u.$t("guide.guide.add")),1)]),_:1},8,["class"])]),n.value.length?(M(),R("div",ya,[N("div",Ia,[N("div",xa,[N("span",null,A(u.$t("guide.guide.time")),1),re(A(n.value.reduce((C,T)=>C+T.time,0).toFixed(1))+"s ",1)]),N("div",{class:Y(["fun-ctrl clear",{disabled:_(ge)}]),onClick:h},[o(v,{type:"del"}),N("span",null,A(u.$t("guide.guide.clear")),1)],2)]),N("div",{class:"photo-list",ref_key:"listVm",ref:a},[(M(!0),R(ue,null,Ee(n.value,(C,T)=>(M(),R(ue,{key:C.id},[N("div",{class:Y(["photo",{active:i.value===C,disabled:_(ge)}]),onClick:E=>f(C)},[o(v,{type:"del",ctrl:"",onClick:xn(E=>r(C),["stop"]),class:Y({disabled:_(ge)})},null,8,["onClick","class"]),N("img",{src:_(_n)(_(Cn)(C.cover))},null,8,Ca)],10,_a),T!==n.value.length-1?(M(),R("div",Na,[o(p,{type:"number",width:"54px",height:"26px",modelValue:C.speed,"onUpdate:modelValue":E=>c(T,{speed:E}),ctrl:!1,min:.1,max:10},{icon:w(()=>[Ma]),_:2},1032,["modelValue","onUpdate:modelValue","min"]),o(p,{type:"number",width:"54px",height:"26px",modelValue:C.time,"onUpdate:modelValue":E=>c(T,{time:E}),ctrl:!1,min:.1,max:20,class:"time"},{icon:w(()=>[Pa]),_:2},1032,["modelValue","onUpdate:modelValue","min"])])):K("",!0)],64))),128))],512)])):(M(),R("p",Ea,A(u.$t("guide.guide.undata")),1))],512)}}});const Va=xe(Da,[["__scopeId","data-v-a0087649"]]),za=Q({__name:"edit",setup(e){const t=V(),n=()=>t.value=null,i=l=>{t.value=l,Ht(),Wt.on("leave",n)},c=l=>{const r=$e.value.indexOf(l);$e.value.splice(r,1)};return Pe(zn),(l,r)=>{const h=F("ui-icon"),f=F("ui-button"),g=F("ui-group"),a=F("ui-editor-toolbar");return M(),R(ue,null,[o(g,null,{header:w(()=>[o(f,{onClick:r[0]||(r[0]=s=>i(_(Vn)()))},{default:w(()=>[o(h,{type:"add"}),re(" "+A(l.$t("sys.add")),1)]),_:1})]),_:1}),o(g,null,{default:w(()=>[(M(!0),R(ue,null,Ee(_($e),s=>(M(),G(jn,{key:s.id,guide:s,onEdit:u=>i(s),onDelete:u=>c(s),onUpdateTitle:u=>s.title=u},null,8,["guide","onEdit","onDelete","onUpdateTitle"]))),128))]),_:1}),(M(),G(kt,{to:"#layout-app"},[o(a,{toolbar:!!t.value,class:"video-toolbar"},{default:w(()=>[t.value?(M(),G(Va,{key:0,data:t.value},null,8,["data"])):K("",!0)]),_:1},8,["toolbar"])]))],64)}}});const Ta=xe(za,[["__scopeId","data-v-9bb9a196"]]),Aa={class:"label"},Ba={class:"oper"},Ra={class:"label"},Fa={class:"oper"},Oa={class:"label"},ka={class:"oper"},Ha={class:"label"},Wa={class:"oper"},Ga={class:"label"},Ua={class:"oper"},La={key:0},ja=Q({__name:"edit-path",props:{data:null},emits:["applyGlobal"],setup(e){const t=e;Vt(()=>{console.error("unmounte"),h.value&&h.value()});const n=V(),i=a=>{a.key==="z"&&(a.ctrlKey||a.composed)&&a.preventDefault()};Ye(a=>{document.documentElement.addEventListener("keydown",i),a(()=>document.documentElement.removeEventListener("keydown",i))});const c=W(()=>Rn(t.data.id));J(c,()=>{var a;t.data.points.length&&((a=c.value)==null||a.fly())},{immediate:!0});const l=V(-1),r=()=>{var a;(a=c.value)==null||a.deletePoint(l.value),l.value=-1};let h=U();const f=()=>{var a,s;h.value&&h.value(),(a=c.value)==null||a.changeCanEdit(!0),console.error((s=c.value)==null?void 0:s.changeCanEdit),h.value=()=>{var u;(u=c.value)==null||u.changeCanEdit(!1),h.value=void 0}};J(c,(a,s,u)=>{if(!a)return;t.data.points.length||(f(),console.error("keeplo"));const y=v=>{l.value=v,console.error("change ndx",v)};a.changeEditMode(!0),a.bus.on("activePoint",y),u(()=>{a.bus.off("activePoint",y),a.changeEditMode(!1)})},{immediate:!0}),Pe(()=>At([Bt.push(V(!1)),Rt.push(V(!1)),Ft.push(V(!1)),Ot.push(V(!1))]));const g=()=>{gt.value?Fn():On(t.data)};return(a,s)=>{const u=F("ui-group-option"),y=F("ui-input"),v=F("ui-group"),D=F("ui-icon");return M(),G(kt,{to:"#layout-app"},[o(_(Gt),{class:"edit-path-point"},{default:w(()=>[Tn(N("div",{class:Y({disabled:!e.data.points.length})},[o(v,{title:`${_(zt)(e.data.id)?a.$t("sys.create"):a.$t("sys.edit")}${a.$t("guide.path.name")}`,borderBottom:""},{default:w(()=>[o(u,{class:"item"},{default:w(()=>[N("span",Aa,A(a.$t("guide.path.title")),1),N("span",Ba,[o(_(Ke),{checked:e.data.showName,"onUpdate:checked":s[0]||(s[0]=p=>e.data.showName=p)},null,8,["checked"])])]),_:1}),o(u,{class:"item"},{default:w(()=>[o(y,{width:"100%",type:"text",ref_key:"nameInput",ref:n,class:"nameInput",placeholder:a.$t("guide.path.title"),onKeydown:i,modelValue:e.data.name,"onUpdate:modelValue":s[1]||(s[1]=p=>e.data.name=p),maxlength:100},null,8,["placeholder","modelValue"])]),_:1}),o(u,{class:"item"},{default:w(()=>[N("span",Ra,A(a.$t("guide.path.lineWidth")),1),N("span",Fa,[o(_(ca),{style:{width:"120px"},value:e.data.lineWidth,"onUpdate:value":s[4]||(s[4]=p=>e.data.lineWidth=p),max:1,min:.1,step:.1,controls:!1},{addonBefore:w(()=>[N("span",{class:"fun-ctrl",onClick:s[2]||(s[2]=p=>e.data.lineWidth=_(ht)(Math.max(.1,e.data.lineWidth-.1),1))},"-")]),addonAfter:w(()=>[N("span",{class:"fun-ctrl",onClick:s[3]||(s[3]=p=>e.data.lineWidth=_(ht)(Math.min(1,e.data.lineWidth+.1),1))},"+")]),_:1},8,["value","min","step"])])]),_:1}),o(u,{class:"item"},{default:w(()=>[N("span",Oa,A(a.$t("guide.path.lineColor")),1),N("span",ka,[o(y,{type:"color",width:"24px",height:"24px",modelValue:e.data.lineColor,"onUpdate:modelValue":s[5]||(s[5]=p=>e.data.lineColor=p)},null,8,["modelValue"])])]),_:1}),o(u,{class:"item"},{default:w(()=>[N("span",Ha,A(a.$t("guide.path.showDirection")),1),N("span",Wa,[o(_(Ke),{checked:e.data.showDirection,"onUpdate:checked":s[6]||(s[6]=p=>e.data.showDirection=p)},null,8,["checked"])])]),_:1}),e.data.showDirection?(M(),G(u,{key:0,class:"item"},{default:w(()=>[N("span",Ga,A(a.$t("guide.path.reverseDirection")),1),N("span",Ua,[o(_(Ke),{checked:e.data.reverseDirection,"onUpdate:checked":s[7]||(s[7]=p=>e.data.reverseDirection=p)},null,8,["checked"])])]),_:1})):K("",!0)]),_:1},8,["title"]),o(v,{borderBottom:""},{default:w(()=>[o(u,null,{default:w(()=>[N("span",null,A(a.$t("guide.path.fontSize")),1),o(_(vt),{value:e.data.fontSize,"onUpdate:value":s[8]||(s[8]=p=>e.data.fontSize=p),min:12,max:60,step:.1},null,8,["value","step"])]),_:1})]),_:1}),o(v,{borderBottom:""},{default:w(()=>[o(u,null,{default:w(()=>[e.data.globalVisibility?K("",!0):(M(),G(bt,{key:0,label:a.$t("guide.path.visibilityRange"),onApplyGlobal:s[10]||(s[10]=p=>a.$emit("applyGlobal","visibilityRange"))},{default:w(()=>[o(_(vt),{value:e.data.visibilityRange,"onUpdate:value":s[9]||(s[9]=p=>e.data.visibilityRange=p),min:1,max:1e3,step:.1},null,8,["value","step"])]),_:1},8,["label"]))]),_:1}),o(u,null,{default:w(()=>[o(bt,{onApplyGlobal:s[12]||(s[12]=p=>a.$emit("applyGlobal","globalVisibility"))},{label:w(()=>[o(y,{type:"checkbox",label:a.$t("guide.path.globalVisibility"),modelValue:!!e.data.globalVisibility,"onUpdate:modelValue":s[11]||(s[11]=p=>e.data.globalVisibility=p)},null,8,["label","modelValue"])]),_:1})]),_:1})]),_:1}),e.data.points.length?(M(),G(_(ft),{key:0,block:"",type:"primary",ghost:"",size:"large",onClick:g},{default:w(()=>[re(A(_(gt)?a.$t("guide.path.stop"):"")+A(a.$t("guide.path.preview")),1)]),_:1})):K("",!0)],2),[[An,!~l.value]]),~l.value?(M(),R("div",La,[o(v,{title:a.$t("guide.path.pointTitle"),borderBottom:""},{default:w(()=>[o(u,null,{default:w(()=>[re(A(a.$t("guide.path.pointDesc"))+"\uFF1A",1)]),_:1}),o(u,null,{default:w(()=>[o(y,{class:"input",width:"100%",height:"158px",modelValue:e.data.points[l.value].name,"onUpdate:modelValue":s[13]||(s[13]=p=>e.data.points[l.value].name=p),type:"textarea",maxlength:200},null,8,["modelValue"])]),_:1})]),_:1},8,["title"]),o(_(ft),{block:"",danger:"",type:"primary",ghost:"",size:"large",onClick:r},{default:w(()=>[re(A(a.$t("sys.del")),1)]),_:1})])):K("",!0)]),_:1}),_(c)?(M(),R("span",{key:0,onClick:s[14]||(s[14]=p=>_(h)?_(h)():f()),class:Y(["pin-position strengthen fun-ctrl",{disabled:!e.data.points.length}])},[o(D,{style:Bn({color:_(h)?"var(--color-main-normal)":"currentColor"}),type:"pen",size:"30px"},null,8,["style"])],2)):K("",!0)])}}});const Ka=xe(ja,[["__scopeId","data-v-d0d348e3"]]),Xa=Q({__name:"edit",setup(e){const t=V(),n=()=>{t.value=null,Wn.visibility(!0),pt.pop(),mt.pop()},i=async r=>{await kn(),await Tt(16),r||(r=Hn(),pe.value.unshift(r)),t.value=r,Ht(),Wt.on("leave",n),pt.push(V(!1)),mt.push(W(()=>r.id))},c=r=>{const h=pe.value.indexOf(r);pe.value.splice(h,1)},l=async r=>{if(!!await Me.confirm(Z.t("guide.path.applyConfirm"))){r=Array.isArray(r)?r:[r];for(const h of pe.value){let f=h,g=t.value;for(let a=0;a<r.length;a++)a===r.length-1?f[r[a]]=g[r[a]]:(f=f[r[a]],g=g[r[a]])}}};return Pe(Gn),(r,h)=>{const f=F("ui-icon"),g=F("ui-button"),a=F("ui-group");return M(),R(ue,null,[o(a,null,{header:w(()=>[o(g,{onClick:h[0]||(h[0]=s=>i())},{default:w(()=>[o(f,{type:"add"}),re(" "+A(r.$t("sys.add")),1)]),_:1})]),_:1}),o(a,{class:"path-group"},{default:w(()=>[(M(!0),R(ue,null,Ee(_(pe),s=>(M(),G(Kn,{key:s.id,path:s,onEdit:u=>i(s),onDelete:u=>c(s)},null,8,["path","onEdit","onDelete"]))),128))]),_:1}),t.value?(M(),G(Ka,{key:0,data:t.value,onApplyGlobal:l},null,8,["data"])):K("",!0)],64)}}});const qa=xe(Xa,[["__scopeId","data-v-fbeb9d68"]]),Ja=["onClick"],Qa=Q({__name:"index",setup(e){const t=V("path"),n=Un([{key:"path",text:Z.t("guide.pathName",{count:"0"})},{key:"guide",text:Z.t("guide.guideName",{count:"0"})}]);return Ye(()=>{n[0].text=Z.t("guide.pathName",{count:pe.value.length}),n[1].text=Z.t("guide.guideName",{count:$e.value.length})}),(i,c)=>(M(),G(_(Gt),null,{header:w(()=>[N("div",{class:Y(["tabs",{disabled:_(Ln)}])},[(M(!0),R(ue,null,Ee(n,l=>(M(),R("span",{key:l.key,class:Y({active:l.key===t.value}),onClick:r=>t.value=l.key},A(l.text),11,Ja))),128))],2)]),default:w(()=>[t.value==="guide"?(M(),G(Ta,{key:0})):K("",!0),t.value==="path"?(M(),G(qa,{key:1})):K("",!0)]),_:1}))}});const ui=xe(Qa,[["__scopeId","data-v-991b9972"]]);export{ui as default};