保存工作区合并前的本地开发现场 ledger-route-sizes-389952f
This commit is contained in:
1 parent
389952f31c
commit
9952128ba4
45 files changed
+356
-321
No files matched your search
+46
@@ -0,0 +1,46 @@
|
||||
import{n as e,t}from"./rolldown-runtime-Dl_DZoUm.js";import{i as n}from"./react-1o5M9n0k.js";import{$ as r,B as i,Ct as a,D as o,Dn as s,En as c,Gt as l,H as u,L as d,Lt as f,M as p,N as m,Nt as h,O as g,Q as _,R as v,St as y,Tn as b,Tt as x,U as S,V as C,Y as w,Z as T,Zt as E,_ as D,_n as O,_t as k,b as A,bn as j,bt as ee,cn as te,ct as ne,dn as M,en as N,fn as P,ft as F,hn as I,ht as L,i as re,in as ie,it as R,j as ae,kt as oe,l as se,ln as z,lt as ce,mn as B,mt as V,n as le,nn as H,nt as U,pn as W,qt as G,rn as ue,tn as K,un as de,v as fe,w as q,wn as pe,x as me,xn as J,yn as he,z as ge}from"./skeleton-B4Z0R3jQ.js";import{B as _e,x as ve}from"./index-D-ox0wtk.js";var Y=e(s()),X=e(n()),ye=X.createContext(null),Z=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()})(),be=typeof window<`u`&&typeof document<`u`&&window.document===document,xe=(function(){return typeof global<`u`&&global.Math===Math?global:typeof self<`u`&&self.Math===Math?self:typeof window<`u`&&window.Math===Math?window:Function(`return this`)()})(),Se=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(xe):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),Q=2;function $(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){Se(a)}function s(){var e=Date.now();if(n){if(e-i<Q)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var Ce=20,we=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],Te=typeof MutationObserver<`u`,Ee=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=$(this.refresh.bind(this),Ce)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){be&&!this.connected_&&(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),Te?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){be&&this.connected_&&(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t;we.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),De=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),Oe=(function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||xe}),ke=ze(0,0,0,0);function Ae(e){return parseFloat(e)||0}function je(e){return[...arguments].slice(1).reduce(function(t,n){return t+Ae(e[`border-`+n+`-width`])},0)}function Me(e){for(var t=[`top`,`right`,`bottom`,`left`],n={},r=0,i=t;r<i.length;r++){var a=i[r];n[a]=Ae(e[`padding-`+a])}return n}function Ne(e){var t=e.getBBox();return ze(0,0,t.width,t.height)}function Pe(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return ke;var r=Oe(e).getComputedStyle(e),i=Me(r),a=i.left+i.right,o=i.top+i.bottom,s=Ae(r.width),c=Ae(r.height);if(r.boxSizing===`border-box`&&(Math.round(s+a)!==t&&(s-=je(r,`left`,`right`)+a),Line truncated
|
||||
& > ${t}-affix-wrapper,
|
||||
& > ${t}-number-affix-wrapper,
|
||||
& > ${n}-picker-range
|
||||
`]:{display:`inline-flex`},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:`none`},[`& > ${n}-select > ${n}-select-selector,
|
||||
& > ${n}-select-auto-complete ${t},
|
||||
& > ${n}-cascader-picker ${t},
|
||||
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
||||
& > ${n}-select:first-child > ${n}-select-selector,
|
||||
& > ${n}-select-auto-complete:first-child ${t},
|
||||
& > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
||||
& > ${n}-select:last-child > ${n}-select-selector,
|
||||
& > ${n}-cascader-picker:last-child ${t},
|
||||
& > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},Pn=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ce(e)),Mn(e)),_n(e)),Cn(e)),bn(e)),On(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}})}},Fn=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${G(e.inputAffixPadding)}`}}}},In=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},Mn(e)),{display:`inline-flex`,[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),Fn(e)),{[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}}),[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},Ln=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},ce(e)),Nn(e)),{"&-rtl":{direction:`rtl`},"&-wrapper":Object.assign(Object.assign(Object.assign({display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},yn(e)),Tn(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},Rn=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:`none`},[`${r}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:not([disabled]):hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:`rtl`},[`&${t}Line truncated
|
||||
> ${t},
|
||||
${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},zn=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Bn=U([`Input`,`Shared`],e=>{let t=V(e,dn(e));return[Pn(t),In(t)]},fn,{resetFont:!1}),Vn=U([`Input`,`Component`],e=>{let t=V(e,dn(e));return[Ln(t),Rn(t),zn(t),A(t)]},fn,{resetFont:!1});function Hn(e){return!!(e.addonBefore||e.addonAfter)}function Un(e){return!!(e.prefix||e.suffix||e.allowClear)}function Wn(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function Gn(e,t,n,r){if(n){var i=t;t.type===`click`?(i=Wn(t,e,``),n(i)):(e.type!==`file`&&r!==void 0&&(i=Wn(t,e,r)),n(i))}}function Kn(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case`start`:e.setSelectionRange(0,0);break;case`end`:e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}var qn=X.forwardRef(function(e,t){var n=e.inputElement,r=e.children,i=e.prefixCls,a=e.prefix,o=e.suffix,s=e.addonBefore,l=e.addonAfter,u=e.className,d=e.style,f=e.disabled,p=e.readOnly,m=e.focused,h=e.triggerFocus,g=e.allowClear,_=e.value,v=e.handleReset,y=e.hidden,x=e.classes,S=e.classNames,C=e.dataAttrs,w=e.styles,T=e.components,E=e.onClear,D=r??n,O=T?.affixWrapper||`span`,k=T?.groupWrapper||`span`,A=T?.wrapper||`span`,ee=T?.groupAddon||`span`,te=(0,X.useRef)(null),ne=function(e){var t;(t=te.current)!=null&&t.contains(e.target)&&h?.()},M=Un(e),N=(0,X.cloneElement)(D,{value:_,className:(0,Y.default)(D.props?.className,!M&&S?.variant)||null}),P=(0,X.useRef)(null);if(X.useImperativeHandle(t,function(){return{nativeElement:P.current||te.current}}),M){var F=null;if(g){var I=!f&&!p&&_,L=`${i}-clear-icon`,re=b(g)===`object`&&g!=null&&g.clearIcon?g.clearIcon:`✖`;F=X.createElement(`button`,{type:`button`,tabIndex:-1,onClick:function(e){v?.(e),E?.()},onMouseDown:function(e){return e.preventDefault()},className:(0,Y.default)(L,J(J({},`${L}-hidden`,!I),`${L}-has-suffix`,!!o))},re)}var ie=`${i}-affix-wrapper`,R=(0,Y.default)(ie,J(J(J(J(J({},`${i}-disabled`,f),`${ie}-disabled`,f),`${ie}-focused`,m),`${ie}-readonly`,p),`${ie}-input-with-clear-btn`,o&&g&&_),x?.affixWrapper,S?.affixWrapper,S?.variant),ae=(o||g)&&X.createElement(`span`,{className:(0,Y.default)(`${i}-suffix`,S?.suffix),style:w?.suffix},F,o);N=X.createElement(O,c({className:R,style:w?.affixWrapper,onClick:ne},C?.affixWrapper,{ref:te}),a&&X.createElement(`span`,{className:(0,Y.default)(`${i}-prefix`,S?.prefix),style:w?.prefix},a),N,ae)}if(Hn(e)){var oe=`${i}-group`,se=`${oe}-addon`,z=`${oe}-wrapper`,ce=(0,Y.default)(`${i}-wrapper`,oe,x?.wrapper,S?.wrapper),B=(0,Y.default)(z,J({},`${z}-disabled`,f),x?.group,S?.groupWrapper);N=X.createElement(k,{className:B,ref:P},X.createElement(A,{className:ce},s&&X.createElement(ee,{className:se},s),N,l&&X.createElement(ee,{className:se},l)))}return X.cloneElement(N,{className:(0,Y.default)(N.props?.className,u)||null,style:j(j({},N.props?.style),d),hidden:y})}),Jn=[`show`];function Yn(e,t){return X.useMemo(function(){var n={};t&&(n.show=b(t)===`object`&&t.formatter?t.formatter:!!t),n=j(j({},n),e);var r=n,i=r.show,a=E(r,Jn);return j(j({},a),{},{show:!!i,showFormatter:typeof i==`function`?i:void 0,strategy:a.strategy||function(e){return e.length}})},[e,t])}var Xn=[`autoComplete`,`onChange`,`onFocus`,`onBlur`,`onPressEnter`,`onKeyDown`,`onKeyUp`,`prefixCls`,`disabled`,`htmlSize`,`className`,`maxLength`,`suffix`,`showCount`,`count`,`type`,`classes`,`classNames`,`styles`,`onCompositionStart`,`onCompositionEnd`],Zn=(0,X.forwardRef)(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,a=e.onBlur,o=e.onPressEnter,s=e.onKeyDown,l=e.onKeyUp,u=e.prefixCls,d=u===void 0?`rc-input`:u,f=e.disabled,m=e.htmlSize,h=e.className,g=e.maxLength,_=e.suffix,v=e.showCount,y=e.count,b=e.type,x=b===void 0?`text`:b,S=e.classes,C=e.classNames,w=e.styles,T=e.onCompositionStart,D=e.onCompositionEnd,O=E(e,Xn),k=(0,X.useState)(!1),A=K(k,2),ee=A[0],te=A[1],ne=(0,X.useRef)(!1),M=(0,X.useRef)(!1),N=(0,X.useRef)(null),P=(0,X.useRef)(null),F=function(e){N.current&&Kn(N.current,e)},I=L(e.defaultValue,{value:e.value}),re=K(I,2),ie=re[0],R=re[1],ae=ie==null?``:String(ie),oe=(0,X.useState)(null),se=K(oe,2),z=se[0],ce=se[1],B=Yn(y,v),V=B.max||g,le=B.strategy(ae),H=!!V&&le>V;(0,X.useImperativeHandle)(t,function(){return{focus:F,blur:function(){var e;(e=N.current)==null||e.blur()},setSelectionRange:function(e,t,n){var r;(r=N.current)==null||r.setSelectionRange(e,t,n)},select:function(){var e;(e=N.current)==null||e.select()},input:N.current,nativeElement:P.current?.nativeElement||N.current}}),(0,X.useEffect)(function(){M.current&&=!1,te(function(e){return
Line truncated
|
||||
min-height:0 !important;
|
||||
max-height:none !important;
|
||||
height:0 !important;
|
||||
visibility:hidden !important;
|
||||
overflow:hidden !important;
|
||||
position:absolute !important;
|
||||
z-index:-1000 !important;
|
||||
top:0 !important;
|
||||
right:0 !important;
|
||||
pointer-events: none !important;
|
||||
`,er=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],tr={},nr;function rr(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&tr[n])return tr[n];var r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:er.map(function(e){return`${e}:${r.getPropertyValue(e)}`}).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(tr[n]=s),s}function ir(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;nr||(nr=document.createElement(`textarea`),nr.setAttribute(`tab-index`,`-1`),nr.setAttribute(`aria-hidden`,`true`),nr.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(nr)),e.getAttribute(`wrap`)?nr.setAttribute(`wrap`,e.getAttribute(`wrap`)):nr.removeAttribute(`wrap`);var i=rr(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,c=i.sizingStyle;nr.setAttribute(`style`,`${c};${$n}`),nr.value=e.value||e.placeholder||``;var l=void 0,u=void 0,d,f=nr.scrollHeight;if(s===`border-box`?f+=o:s===`content-box`&&(f-=a),n!==null||r!==null){nr.value=` `;var p=nr.scrollHeight-a;n!==null&&(l=p*n,s===`border-box`&&(l=l+a+o),f=Math.max(l,f)),r!==null&&(u=p*r,s===`border-box`&&(u=u+a+o),d=f>u?``:`hidden`,f=Math.min(u,f))}var m={height:f,overflowY:d,resize:`none`};return l&&(m.minHeight=l),u&&(m.maxHeight=u),m}var ar=[`prefixCls`,`defaultValue`,`value`,`autoSize`,`onResize`,`className`,`style`,`disabled`,`onChange`,`onInternalAutoSize`],or=0,sr=1,cr=2,lr=X.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,a=n.value,o=n.autoSize,s=n.onResize,u=n.className,d=n.style,f=n.disabled,p=n.onChange;n.onInternalAutoSize;var m=E(n,ar),h=L(i,{value:a,postState:function(e){return e??``}}),g=K(h,2),_=g[0],v=g[1],y=function(e){v(e.target.value),p?.(e)},x=X.useRef();X.useImperativeHandle(t,function(){return{textArea:x.current}});var S=X.useMemo(function(){return o&&b(o)===`object`?[o.minRows,o.maxRows]:[]},[o]),C=K(S,2),w=C[0],T=C[1],D=!!o,O=X.useState(cr),k=K(O,2),A=k[0],ee=k[1],te=X.useState(),ne=K(te,2),M=ne[0],N=ne[1],P=function(){ee(or)};l(function(){D&&P()},[a,w,T,D]),l(function(){if(A===or)ee(sr);else if(A===sr){var e=ir(x.current,!1,w,T);ee(cr),N(e)}},[A]);var F=X.useRef(),I=function(){H.cancel(F.current)},re=function(e){A===cr&&(s?.(e),o&&(I(),F.current=H(function(){P()})))};X.useEffect(function(){return I},[]);var ie=D?M:null,R=j(j({},d),ie);return(A===or||A===sr)&&(R.overflowY=`hidden`,R.overflowX=`hidden`),X.createElement(nt,{onResize:re,disabled:!(o||s)},X.createElement(`textarea`,c({},m,{ref:x,style:R,className:(0,Y.default)(r,u,J({},`${r}-disabled`,f)),disabled:f,value:_,onChange:y})))}),ur=[`defaultValue`,`value`,`onFocus`,`onBlur`,`onChange`,`allowClear`,`maxLength`,`onCompositionStart`,`onCompositionEnd`,`suffix`,`prefixCls`,`showCount`,`count`,`className`,`style`,`disabled`,`hidden`,`classNames`,`styles`,`onResize`,`onClear`,`onPressEnter`,`readOnly`,`autoSize`,`onKeyDown`],dr=X.forwardRef(function(e,t){var n=e.defaultValue,r=e.value,i=e.onFocus,a=e.onBlur,o=e.onChange,s=e.allowClear,l=e.maxLength,u=e.onCompositionStart,d=e.onCompositionEnd,f=e.suffix,p=e.prefixCls,m=p===void 0?`rc-textarea`:p,h=e.showCount,g=e.count,_=e.className,v=e.style,y=e.disabled,b=e.hidden,x=e.classNames,S=e.styles,C=e.onResize,w=e.onClear,T=e.onPressEnter,D=e.readOnly,O=e.autoSize,k=e.onKeyDown,A=E(e,ur),ee=L(n,{value:r,defaultValue:n}),te=K(ee,2),ne=te[0],M=te[1],N=ne==null?``:String(ne),P=X.useState(!1),F=K(P,2),I=F[0],re=F[1],ie=X.useRef(!1),R=X.useState(null),ae=K(R,2),oe=ae[0],se=ae[1],z=(0,X.useRef)(null),ce=(0,X.useRef)(null),B=function(){return ce.current?.textArea},V=function(){B().focus()};(0,X.useImperativeHandle)(t,function(){return{resizableTextArea:ce.current,focus:V,blur:function(){B().blur()},nativeElement:z.current?.nativeElement||B()}}),(0,X.useEffect)(function(){re(function(e){return!y&&e})},[y]);var le=X.useState(null),H=K(le,2),U=H[0],W=H[1];X.useEffect(function(){if(U){var e;(e=B()).setSelectionRange.apply(e,ue(U))}},[U]);var G=Yn(g,h),de=G.max??l,fe=Number(de)>0,q=G.strategy(N),pe=!!de&&q>de,me=function(e,t){var n=t;!ie.current&&G.exceedFormatter&&G.max&&G.strategy(t)>G.max&&(n=G.exceedFormatter(t,{max:G.max}),t!==n&&W([B().selectionStart||0,B().selectionEnd||0])),M(n),Gn(e.currentTarget,e,o,n)},he=function(e){ie.current=!0,u?.(e)},ge=function(e){ie.current=!1,m
Line truncated
|
||||
&-allow-clear > ${t},
|
||||
&-affix-wrapper${r}-has-feedback ${t}
|
||||
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},pr=U([`Input`,`TextArea`],e=>fr(V(e,dn(e))),fn,{resetFont:!1}),mr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},hr=(0,X.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:s,allowClear:c,classNames:l,rootClassName:u,className:d,style:f,styles:p,variant:m,showCount:h,onMouseDown:_,onResize:v}=e,y=mr(e,[`prefixCls`,`bordered`,`size`,`disabled`,`status`,`allowClear`,`classNames`,`rootClassName`,`className`,`style`,`styles`,`variant`,`showCount`,`onMouseDown`,`onResize`]),{getPrefixCls:b,direction:S,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=x(`textArea`),A=X.useContext(ee),j=a??A,{status:te,hasFeedback:ne,feedbackIcon:M}=X.useContext(re),N=It(te,s),P=X.useRef(null);X.useImperativeHandle(t,()=>({resizableTextArea:P.current?.resizableTextArea,focus:e=>{Kn(P.current?.resizableTextArea?.textArea,e)},blur:()=>P.current?.blur()}));let F=b(`input`,n),I=C(F),[L,ie,R]=Bn(F,u),[ae]=pr(F,I),{compactSize:oe,compactItemClassnames:se}=o(F,S),z=g(e=>i??oe??e),[ce,B]=Lt(`textArea`,m,r),V=Qn(c??w),[le,H]=X.useState(!1),[U,W]=X.useState(!1),G=e=>{H(!0),_?.(e);let t=()=>{H(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},ue=e=>{if(v?.(e),le&&typeof getComputedStyle==`function`){let e=(P.current?.nativeElement)?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&W(!0)}};return L(ae(X.createElement(dr,Object.assign({autoComplete:T},y,{style:Object.assign(Object.assign({},D),f),styles:Object.assign(Object.assign({},k),p),disabled:j,allowClear:V,className:(0,Y.default)(R,I,d,u,se,E,U&&`${F}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},l),O),{textarea:(0,Y.default)({[`${F}-sm`]:z===`small`,[`${F}-lg`]:z===`large`},ie,l?.textarea,O.textarea,le&&`${F}-mouse-active`),variant:(0,Y.default)({[`${F}-${ce}`]:B},Ft(F,N)),affixWrapper:(0,Y.default)(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:S===`rtl`,[`${F}-affix-wrapper-sm`]:z===`small`,[`${F}-affix-wrapper-lg`]:z===`large`,[`${F}-textarea-show-count`]:h||e.count?.show},ie)}),prefixCls:F,suffix:ne&&X.createElement(`span`,{className:`${F}-textarea-suffix`},M),showCount:h,ref:P,onResize:ue,onMouseDown:G}))))}),gr=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e],_r={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`},vr=X.forwardRef(function(e,t){return X.createElement(T,c({},e,{ref:t,icon:_r}))}),yr={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`},br=X.forwardRef(function(e,t){return X.createElement(T,c({},e,{ref:t,icon:yr}))}),xr=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},Sr=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[`
|
||||
h${t}&,
|
||||
div&-h${t},
|
||||
div&-h${t} > textarea,
|
||||
h${t}
|
||||
`]=xr(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},Cr=e=>{let{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},ne(e)),{userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`}}})}},wr=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:oe[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),Tr=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},Er=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),Dr=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),Or=U(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"\n div&,\n p\n ":{marginBottom:`1em`}},Sr(e)),{[`
|
||||
& + h1${t},
|
||||
& + h2${t},
|
||||
& + h3${t},
|
||||
& + h4${t},
|
||||
& + h5${t}
|
||||
`]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),wr(e)),Cr(e)),{[`
|
||||
${t}-expand,
|
||||
${t}-collapse,
|
||||
${t}-edit,
|
||||
${t}-copy
|
||||
`]:Object.assign(Object.assign({},ne(e)),{marginInlineStart:e.marginXXS})}),Tr(e)),Er(e)),Dr()),{"&-rtl":{direction:`rtl`}})}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),kr=e=>{let{prefixCls:t,"aria-label":n,className:r,style:a,direction:o,maxLength:s,autoSize:c=!0,value:l,onSave:d,onCancel:f,onEnd:p,component:m,enterIcon:h=X.createElement(br,null)}=e,g=X.useRef(null),_=X.useRef(!1),v=X.useRef(null),[y,b]=X.useState(l);X.useEffect(()=>{b(l)},[l]),X.useEffect(()=>{if(g.current?.resizableTextArea){let{textArea:e}=g.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let x=({target:e})=>{b(e.value.replace(/[\n\r]/g,``))},S=()=>{_.current=!0},C=()=>{_.current=!1},w=({keyCode:e})=>{_.current||(v.current=e)},T=()=>{d(y.trim())},E=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:a})=>{v.current!==e||_.current||t||n||r||a||(e===i.ENTER?(T(),p?.()):e===i.ESC&&f())},D=()=>{T()},[O,k,A]=Or(t),j=(0,Y.default)(t,`${t}-edit-content`,{[`${t}-rtl`]:o===`rtl`,[`${t}-${m}`]:!!m},r,k,A);return O(X.createElement(`div`,{className:j,style:a},X.createElement(hr,{ref:g,maxLength:s,value:y,onChange:x,onKeyDown:w,onKeyUp:E,onCompositionStart:S,onCompositionEnd:C,onBlur:D,"aria-label":n,rows:1,autoSize:c}),h===null?null:u(h,{className:`${t}-edit-content-confirm`})))},Ar=t(((e,t)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case`INPUT`:case`TEXTAREA`:t.blur();break;default:t=null}return e.removeAllRanges(),function(){e.type===`Caret`&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}})),jr=e(t(((e,t)=>{var n=Ar(),r={"text/plain":`Text`,"text/html":`Url`,default:`Text`},i=`Copy to clipboard: #{key}, Enter`;function a(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}t.exports=function(e,t){var o,s,c,l,u,d,f=!1;t||={},o=t.debug||!1;try{if(c=n(),l=document.createRange(),u=document.getSelection(),d=document.createElement(`span`),d.textContent=e,d.ariaHidden=`true`,d.style.all=`unset`,d.style.position=`fixed`,d.style.top=0,d.style.clip=`rect(0, 0, 0, 0)`,d.style.whiteSpace=`pre`,d.style.webkitUserSelect=`text`,d.style.MozUserSelect=`text`,d.style.msUserSelect=`text`,d.style.userSelect=`text`,d.addEventListener(`copy`,function(n){if(n.stopPropagation(),t.format){if(n.preventDefault(),n.clipboardData===void 0){o&&console.warn(`unable to use e.clipboardData`),o&&console.warn(`trying IE specific stuff`),window.clipboardData.clearData();var i=r[t.format]||r.default;window.clipboardData.setData(i,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e)}t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),l.selectNodeContents(d),u.addRange(l),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);f=!0}catch(n){o&&console.error(`unable to copy using execCommand: `,n),o&&console.warn(`trying IE specific stuff`);try{window.clipboardData.setData(t.format||`text`,e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(n){o&&console.error(`unable to copy using clipboardData: `,n),o&&console.error(`falling back to prompt`),s=a(`message`in t?t.message:i),window.prompt(s,e)}}finally{u&&(typeof u.removeRange==`function`?u.removeRange(l):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return f}}))()),Mr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Nr=({copyConfig:e,children:t})=>{let[n,r]=X.useState(!1),[i,a]=X.useState(!1),o=X.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),X.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:k(n=>Mr(void 0,void 0,void 0,function*(){var i;n?.preventDefault(),n?.stopPropagation(),a(!0);try{let l=typeof e.text==`function`?yield e.text():e.text;(0,jr.default)(l||gr(t,!0).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),(i=e.onCopy)==null||i.call(e,n)}catch(e){throw a(!1),e}}))}};function Pr(e,t){return X.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e==`object`?e:null)]},[e])}var Fr=e=>{let t=(0,X.useRef)(void 0);return(0,X.useEffect)(()=>{t.current=e}),t.current},Ir=(e,t,n)=>(0,X.useMemo)(()=>e===!0?{title:t??n}:(0,X.isValidElement)(e)?{title:e}:typeof e==`object`?Object.assign({title:t??n},e):{title:e},[e,t,n]),Lr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumera
Line truncated
|
||||
Reference in new issue
Block a user