taro-react-uilib 1.5.0-0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{__read as e}from"../node_modules/tslib/tslib.es6.js";import t,{useState as n,useEffect as a,useCallback as o,useRef as r}from"react";import l from"classnames";import{View as u}from"@tarojs/components";import{pxTransform as m}from"../src/utils/index.js";import c from"../Badge/index.js";import p from"../Space/index.js";import i from"../node_modules/react-transition-group/esm/CSSTransition.js";var s=[{text:1,value:1,type:"number"},{text:2,value:2,type:"number"},{text:3,value:3,type:"number"},{text:"",value:"",type:"delete"},{text:4,value:4,type:"number"},{text:5,value:5,type:"number"},{text:6,value:6,type:"number"},{text:"",value:"",type:"none"},{text:7,value:7,type:"number"},{text:8,value:8,type:"number"},{text:9,value:9,type:"number"},{text:"",value:"",type:"none"},{text:"00",value:"00",type:"number"},{text:0,value:0,type:"number"},{text:"",value:"",type:"close"},{text:"",value:"",type:"none"}],d=[{text:1,value:1,type:"number"},{text:2,value:2,type:"number"},{text:3,value:3,type:"number"},{text:"",value:"",type:"delete"},{text:4,value:4,type:"number"},{text:5,value:5,type:"number"},{text:6,value:6,type:"number"},{text:"",value:"",type:"none"},{text:7,value:7,type:"number"},{text:8,value:8,type:"number"},{text:9,value:9,type:"number"},{text:"",value:"",type:"none"},{text:"·",value:".",type:"number"},{text:0,value:0,type:"number"},{text:"",value:"",type:"close"},{text:"",value:"",type:"none"}],y=function(y){var x=y.onBlur,v=y.show,b=y.maxLength,f=void 0===b?Number.MAX_SAFE_INTEGER:b,k=y.closeOnClickSpace,h=void 0===k||k,E=y.onClose,g=y.onChange,N=y.value,C=y.className,T=y.onConfirm,j=y.recommend,I=void 0===j?[]:j,O=y.header,S=y.disabled,_=void 0!==S&&S,L=y.tip,w=y.decimal,A=y.dataTrackId,P=e(n(N),2),R=P[0],B=P[1];function F(e){E&&E(e),x&&x(e)}a((function(){return h&&document.addEventListener("click",F),function(){document.removeEventListener("click",F)}}),[]),a((function(){B(N)}),[N]);var G=o((function(e,t){var n=t.type,a=t.value;if("h5"===process.env.TARO_ENV&&e.stopImmediatePropagation(),!_&&"none"!==n&&("."!==a||""!==R))if("close"!==n){var o=R;"delete"===n?o=R.slice(0,R.length-1):o.replace(/^0+/g,"").length<f&&(o=R+a),w&&0===a&&""===R&&(o=a+"."),"."===a&&R.includes(".")||"number"===n&&R.indexOf(".")>-1&&R.length-R.indexOf(".")==3||o!==R&&(B(o),null==g||g(o))}else F(e)}),[R,_]),M=w?d:s,V=l("xh-amount-keyboard",C),X=r(null);return t.createElement(i,{nodeRef:X,classNames:"slide-up",in:v,unmountOnExit:!0,timeout:200},t.createElement(u,{className:V},t.createElement(u,{className:"xh-amount-keyboard-header"},t.createElement(u,{className:"xh-amount-keyboard-header-wrapper"},O||I.length>0&&t.createElement(u,{className:"xh-amount-keyboard-header-wrapper-text"},"猜您想借"," ",t.createElement(p,{style:{marginLeft:m(24)}},null==I?void 0:I.map((function(e,n){return t.createElement(u,{dataTrackId:"".concat(A,"-recommend-").concat(n),key:n,onClick:function(t){return function(e,t){e.stopPropagation(),null==T||T("".concat(t),!0)}(t,e)}},t.createElement(c,{content:"¥".concat(e),key:n}))})))),L)),t.createElement(u,{className:"xh-amount-keyboard-body"},M.map((function(e,n){return t.createElement(u,{key:n,dataTrackId:"".concat(A,"-key-").concat(n),className:l("xh-amount-keyboard-body-key",{none:"none"===e.type,delete:"delete"===e.type,close:"close"===e.type}),onClick:function(t){G(t,e)}},e.text)})),t.createElement(u,{dataTrackId:"".concat(A,"-confirm-fake"),className:"xh-amount-keyboard-body-key confirm-fake",onClick:function(e){e.stopPropagation(),null==T||T(R)}},"确定"))))};export{y as default};
1
+ import{__read as e}from"../node_modules/tslib/tslib.es6.js";import t,{useState as n,useEffect as a,useCallback as o,useRef as r}from"react";import l from"classnames";import{View as u}from"@tarojs/components";import{pxTransform as m}from"../src/utils/index.js";import c from"../Badge/index.js";import i from"../Space/index.js";import p from"../node_modules/react-transition-group/esm/CSSTransition.js";var s=[{text:1,value:1,type:"number"},{text:2,value:2,type:"number"},{text:3,value:3,type:"number"},{text:"",value:"",type:"delete"},{text:4,value:4,type:"number"},{text:5,value:5,type:"number"},{text:6,value:6,type:"number"},{text:"",value:"",type:"none"},{text:7,value:7,type:"number"},{text:8,value:8,type:"number"},{text:9,value:9,type:"number"},{text:"",value:"",type:"none"},{text:"00",value:"00",type:"number"},{text:0,value:0,type:"number"},{text:"",value:"",type:"close"},{text:"",value:"",type:"none"}],d=[{text:1,value:1,type:"number"},{text:2,value:2,type:"number"},{text:3,value:3,type:"number"},{text:"",value:"",type:"delete"},{text:4,value:4,type:"number"},{text:5,value:5,type:"number"},{text:6,value:6,type:"number"},{text:"",value:"",type:"none"},{text:7,value:7,type:"number"},{text:8,value:8,type:"number"},{text:9,value:9,type:"number"},{text:"",value:"",type:"none"},{text:"·",value:".",type:"number"},{text:0,value:0,type:"number"},{text:"",value:"",type:"close"},{text:"",value:"",type:"none"}],y=function(y){var v=y.onBlur,x=y.show,b=y.maxLength,f=void 0===b?Number.MAX_SAFE_INTEGER:b,k=y.closeOnClickSpace,h=void 0===k||k,E=y.onClose,g=y.onChange,N=y.value,C=y.className,T=y.onConfirm,j=y.recommend,I=void 0===j?[]:j,_=y.header,O=y.disabled,S=void 0!==O&&O,A=y.tip,L=y.decimal,w=y.dataTrackId,P=void 0===w?"Amount_Keyboard":w,R=e(n(N),2),B=R[0],F=R[1];function G(e){E&&E(e),v&&v(e)}a((function(){return h&&document.addEventListener("click",G),function(){document.removeEventListener("click",G)}}),[]),a((function(){F(N)}),[N]);var K=o((function(e,t){var n=t.type,a=t.value;if("h5"===process.env.TARO_ENV&&e.stopImmediatePropagation(),!S&&"none"!==n&&("."!==a||""!==B))if("close"!==n){var o=B;"delete"===n?o=B.slice(0,B.length-1):o.replace(/^0+/g,"").length<f&&(o=B+a),L&&0===a&&""===B&&(o=a+"."),"."===a&&B.includes(".")||"number"===n&&B.indexOf(".")>-1&&B.length-B.indexOf(".")==3||o!==B&&(F(o),null==g||g(o))}else G(e)}),[B,S]),M=L?d:s,V=l("xh-amount-keyboard",C),X=r(null);return t.createElement(p,{nodeRef:X,classNames:"slide-up",in:x,unmountOnExit:!0,timeout:200},t.createElement(u,{className:V},t.createElement(u,{className:"xh-amount-keyboard-header"},t.createElement(u,{className:"xh-amount-keyboard-header-wrapper"},_||I.length>0&&t.createElement(u,{className:"xh-amount-keyboard-header-wrapper-text"},"猜您想借"," ",t.createElement(i,{style:{marginLeft:m(24)}},null==I?void 0:I.map((function(e,n){return t.createElement(u,{dataTrackId:"".concat(P,"-recommend-").concat(n),key:n,onClick:function(t){return function(e,t){e.stopPropagation(),null==T||T("".concat(t),!0)}(t,e)}},t.createElement(c,{content:"¥".concat(e),key:n}))})))),A)),t.createElement(u,{className:"xh-amount-keyboard-body"},M.map((function(e,n){return t.createElement(u,{key:n,dataTrackId:"".concat(P,"-key-").concat(n),className:l("xh-amount-keyboard-body-key",{none:"none"===e.type,delete:"delete"===e.type,close:"close"===e.type}),onClick:function(t){K(t,e)}},e.text)})),t.createElement(u,{dataTrackId:"".concat(P,"-confirm-fake"),className:"xh-amount-keyboard-body-key confirm-fake",onClick:function(e){e.stopPropagation(),null==T||T(B)}},"确定"))))};export{y as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/AmountKeyboard/index.tsx"],"sourcesContent":["import React, {\n FC,\n useState,\n useEffect,\n MouseEvent,\n ReactNode,\n useCallback,\n useRef,\n} from \"react\";\nimport classNames from \"classnames\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { ITouchEvent, View } from \"@tarojs/components\";\nimport { pxTransform } from \"@/utils\";\n\nimport Badge from \"../Badge\";\nimport \"./index.scss\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport Space from \"../Space\";\n\nexport type NumberKeyboardProps = {\n show: boolean;\n /**\n * 是否支持小数,小数保留小数点后两位,默认不支持\n */\n decimal?: boolean;\n showClose?: boolean;\n closeOnClickSpace?: boolean;\n maxLength?: number;\n onBlur?: (e: MouseEvent | Event) => void;\n onClose?: (e: MouseEvent | Event) => void;\n onChange?: (value: string) => void;\n value: string;\n header?: ReactNode;\n /**\n *\n * @param value 输入值\n * @param recommend 是否是点击推荐金额触发\n * @returns void\n */\n onConfirm?: (value: string, recommend?: boolean) => void;\n recommend?: Array<number | string>;\n tip?: ReactNode;\n disabled?: boolean;\n dataTrackId?: string;\n} & XHComponentCommonProps;\n\nexport type KeyType = \"number\" | \"delete\" | \"string\" | \"none\" | \"close\";\n\nexport interface IKey {\n text: number | string;\n value: number | string;\n type: KeyType;\n}\n\nconst XHAmountKeys: IKey[] = [\n { text: 1, value: 1, type: \"number\" },\n { text: 2, value: 2, type: \"number\" },\n { text: 3, value: 3, type: \"number\" },\n { text: \"\", value: \"\", type: \"delete\" },\n { text: 4, value: 4, type: \"number\" },\n { text: 5, value: 5, type: \"number\" },\n { text: 6, value: 6, type: \"number\" },\n { text: \"\", value: \"\", type: \"none\" },\n { text: 7, value: 7, type: \"number\" },\n { text: 8, value: 8, type: \"number\" },\n { text: 9, value: 9, type: \"number\" },\n { text: \"\", value: \"\", type: \"none\" },\n { text: \"00\", value: \"00\", type: \"number\" },\n { text: 0, value: 0, type: \"number\" },\n { text: \"\", value: \"\", type: \"close\" },\n { text: \"\", value: \"\", type: \"none\" },\n];\n\nconst XHAmountKeysWithDot: IKey[] = [\n { text: 1, value: 1, type: \"number\" },\n { text: 2, value: 2, type: \"number\" },\n { text: 3, value: 3, type: \"number\" },\n { text: \"\", value: \"\", type: \"delete\" },\n { text: 4, value: 4, type: \"number\" },\n { text: 5, value: 5, type: \"number\" },\n { text: 6, value: 6, type: \"number\" },\n { text: \"\", value: \"\", type: \"none\" },\n { text: 7, value: 7, type: \"number\" },\n { text: 8, value: 8, type: \"number\" },\n { text: 9, value: 9, type: \"number\" },\n { text: \"\", value: \"\", type: \"none\" },\n { text: \"·\", value: \".\", type: \"number\" },\n { text: 0, value: 0, type: \"number\" },\n { text: \"\", value: \"\", type: \"close\" },\n { text: \"\", value: \"\", type: \"none\" },\n];\n\nconst AmountKeyboard: FC<NumberKeyboardProps> = props => {\n const {\n onBlur,\n show,\n maxLength = Number.MAX_SAFE_INTEGER,\n closeOnClickSpace = true,\n onClose,\n onChange,\n value,\n className,\n onConfirm,\n recommend = [],\n header,\n disabled = false,\n tip,\n decimal,\n dataTrackId,\n } = props;\n const [input, setInput] = useState(value);\n\n useEffect(() => {\n if (closeOnClickSpace) {\n document.addEventListener(\"click\", handleClose);\n }\n\n return () => {\n document.removeEventListener(\"click\", handleClose);\n };\n }, []);\n\n useEffect(() => {\n setInput(value);\n }, [value]);\n\n function handleClose(e): void {\n onClose && onClose(e);\n onBlur && onBlur(e);\n }\n\n const handleOnRecommand = (e: ITouchEvent, amount: number | string) => {\n e.stopPropagation();\n onConfirm?.(`${amount}`, true);\n };\n\n const handleKeyPress = useCallback(\n (e, { type, value }: IKey): void => {\n if (process.env.TARO_ENV === \"h5\") {\n e.stopImmediatePropagation();\n }\n if (disabled) return;\n if (type === \"none\") return;\n // 第一个字符不能是.\n if (value === \".\" && input === \"\") return;\n if (type === \"close\") {\n handleClose(e);\n return;\n }\n let newInput = input;\n if (type === \"delete\") {\n newInput = input.slice(0, input.length - 1);\n } else if (newInput.replace(/^0+/g, \"\").length < maxLength) {\n newInput = input + value;\n }\n // 支持小数点的情况下,如果第一个是0,自动填充.\n if (decimal && value === 0 && input === \"\") newInput = value + \".\";\n\n // 不能包含多个小数点\n if (value === \".\" && input.includes(\".\")) return;\n // 保留两位小数\n if (\n type === \"number\" &&\n input.indexOf(\".\") > -1 &&\n input.length - input.indexOf(\".\") === 3\n )\n return;\n\n // 前后两个值相等就不触发onchange\n if (newInput === input) return;\n setInput(newInput);\n onChange?.(newInput);\n },\n [input, disabled]\n );\n\n const renderKeys = decimal ? XHAmountKeysWithDot : XHAmountKeys;\n\n const handleConfirm = (e: ITouchEvent) => {\n e.stopPropagation();\n onConfirm?.(input);\n };\n const keyboardcls = classNames(\"xh-amount-keyboard\", className);\n\n const nodeRef = useRef(null);\n\n return (\n <CSSTransition\n nodeRef={nodeRef}\n classNames=\"slide-up\"\n in={show}\n unmountOnExit\n timeout={200}\n >\n <View className={keyboardcls}>\n <View className=\"xh-amount-keyboard-header\">\n <View className=\"xh-amount-keyboard-header-wrapper\">\n {header ||\n (recommend.length > 0 && (\n <View className=\"xh-amount-keyboard-header-wrapper-text\">\n 猜您想借{\" \"}\n <Space style={{ marginLeft: pxTransform(24) }}>\n {recommend?.map((amount, index) => (\n <View\n // @ts-ignore\n dataTrackId={`${dataTrackId}-recommend-${index}`}\n key={index}\n onClick={e => handleOnRecommand(e, amount)}\n >\n <Badge content={`¥${amount}`} key={index} />\n </View>\n ))}\n </Space>\n </View>\n ))}\n {tip}\n </View>\n </View>\n <View className=\"xh-amount-keyboard-body\">\n {renderKeys.map((key, index) => (\n <View\n key={index}\n // @ts-ignore\n dataTrackId={`${dataTrackId}-key-${index}`}\n className={classNames(\"xh-amount-keyboard-body-key\", {\n none: key.type === \"none\",\n delete: key.type === \"delete\",\n close: key.type === \"close\",\n })}\n onClick={e => {\n handleKeyPress(e, key);\n }}\n >\n {key.text}\n </View>\n ))}\n <View\n // @ts-ignore\n dataTrackId={`${dataTrackId}-confirm-fake`}\n className=\"xh-amount-keyboard-body-key confirm-fake\"\n onClick={handleConfirm}\n >\n 确定\n </View>\n </View>\n </View>\n </CSSTransition>\n );\n};\n\nexport default AmountKeyboard;\n"],"names":["XHAmountKeys","text","value","type","XHAmountKeysWithDot","AmountKeyboard","props","onBlur","show","_a","maxLength","Number","MAX_SAFE_INTEGER","_b","closeOnClickSpace","onClose","onChange","className","onConfirm","_c","recommend","header","_d","disabled","tip","decimal","dataTrackId","_e","__read","useState","input","setInput","handleClose","e","useEffect","document","addEventListener","removeEventListener","handleKeyPress","useCallback","process","env","TARO_ENV","stopImmediatePropagation","newInput","slice","length","replace","includes","indexOf","renderKeys","keyboardcls","classNames","nodeRef","useRef","React","CSSTransition","in","unmountOnExit","timeout","createElement","View","Space","style","marginLeft","pxTransform","map","amount","index","concat","key","onClick","stopPropagation","handleOnRecommand","Badge","content","none","delete","close"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/AmountKeyboard/index.tsx"],"sourcesContent":["import React, {\n FC,\n useState,\n useEffect,\n MouseEvent,\n ReactNode,\n useCallback,\n useRef,\n} from \"react\";\nimport classNames from \"classnames\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { ITouchEvent, View } from \"@tarojs/components\";\nimport { pxTransform } from \"@/utils\";\n\nimport Badge from \"../Badge\";\nimport \"./index.scss\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport Space from \"../Space\";\n\nexport type NumberKeyboardProps = {\n show: boolean;\n /**\n * 是否支持小数,小数保留小数点后两位,默认不支持\n */\n decimal?: boolean;\n showClose?: boolean;\n closeOnClickSpace?: boolean;\n maxLength?: number;\n onBlur?: (e: MouseEvent | Event) => void;\n onClose?: (e: MouseEvent | Event) => void;\n onChange?: (value: string) => void;\n value: string;\n header?: ReactNode;\n /**\n *\n * @param value 输入值\n * @param recommend 是否是点击推荐金额触发\n * @returns void\n */\n onConfirm?: (value: string, recommend?: boolean) => void;\n recommend?: Array<number | string>;\n tip?: ReactNode;\n disabled?: boolean;\n dataTrackId?: string;\n} & XHComponentCommonProps;\n\nexport type KeyType = \"number\" | \"delete\" | \"string\" | \"none\" | \"close\";\n\nexport interface IKey {\n text: number | string;\n value: number | string;\n type: KeyType;\n}\n\nconst XHAmountKeys: IKey[] = [\n { text: 1, value: 1, type: \"number\" },\n { text: 2, value: 2, type: \"number\" },\n { text: 3, value: 3, type: \"number\" },\n { text: \"\", value: \"\", type: \"delete\" },\n { text: 4, value: 4, type: \"number\" },\n { text: 5, value: 5, type: \"number\" },\n { text: 6, value: 6, type: \"number\" },\n { text: \"\", value: \"\", type: \"none\" },\n { text: 7, value: 7, type: \"number\" },\n { text: 8, value: 8, type: \"number\" },\n { text: 9, value: 9, type: \"number\" },\n { text: \"\", value: \"\", type: \"none\" },\n { text: \"00\", value: \"00\", type: \"number\" },\n { text: 0, value: 0, type: \"number\" },\n { text: \"\", value: \"\", type: \"close\" },\n { text: \"\", value: \"\", type: \"none\" },\n];\n\nconst XHAmountKeysWithDot: IKey[] = [\n { text: 1, value: 1, type: \"number\" },\n { text: 2, value: 2, type: \"number\" },\n { text: 3, value: 3, type: \"number\" },\n { text: \"\", value: \"\", type: \"delete\" },\n { text: 4, value: 4, type: \"number\" },\n { text: 5, value: 5, type: \"number\" },\n { text: 6, value: 6, type: \"number\" },\n { text: \"\", value: \"\", type: \"none\" },\n { text: 7, value: 7, type: \"number\" },\n { text: 8, value: 8, type: \"number\" },\n { text: 9, value: 9, type: \"number\" },\n { text: \"\", value: \"\", type: \"none\" },\n { text: \"·\", value: \".\", type: \"number\" },\n { text: 0, value: 0, type: \"number\" },\n { text: \"\", value: \"\", type: \"close\" },\n { text: \"\", value: \"\", type: \"none\" },\n];\n\nconst AmountKeyboard: FC<NumberKeyboardProps> = props => {\n const {\n onBlur,\n show,\n maxLength = Number.MAX_SAFE_INTEGER,\n closeOnClickSpace = true,\n onClose,\n onChange,\n value,\n className,\n onConfirm,\n recommend = [],\n header,\n disabled = false,\n tip,\n decimal,\n dataTrackId = \"Amount_Keyboard\",\n } = props;\n const [input, setInput] = useState(value);\n\n useEffect(() => {\n if (closeOnClickSpace) {\n document.addEventListener(\"click\", handleClose);\n }\n\n return () => {\n document.removeEventListener(\"click\", handleClose);\n };\n }, []);\n\n useEffect(() => {\n setInput(value);\n }, [value]);\n\n function handleClose(e): void {\n onClose && onClose(e);\n onBlur && onBlur(e);\n }\n\n const handleOnRecommand = (e: ITouchEvent, amount: number | string) => {\n e.stopPropagation();\n onConfirm?.(`${amount}`, true);\n };\n\n const handleKeyPress = useCallback(\n (e, { type, value }: IKey): void => {\n if (process.env.TARO_ENV === \"h5\") {\n e.stopImmediatePropagation();\n }\n if (disabled) return;\n if (type === \"none\") return;\n // 第一个字符不能是.\n if (value === \".\" && input === \"\") return;\n if (type === \"close\") {\n handleClose(e);\n return;\n }\n let newInput = input;\n if (type === \"delete\") {\n newInput = input.slice(0, input.length - 1);\n } else if (newInput.replace(/^0+/g, \"\").length < maxLength) {\n newInput = input + value;\n }\n // 支持小数点的情况下,如果第一个是0,自动填充.\n if (decimal && value === 0 && input === \"\") newInput = value + \".\";\n\n // 不能包含多个小数点\n if (value === \".\" && input.includes(\".\")) return;\n // 保留两位小数\n if (\n type === \"number\" &&\n input.indexOf(\".\") > -1 &&\n input.length - input.indexOf(\".\") === 3\n )\n return;\n\n // 前后两个值相等就不触发onchange\n if (newInput === input) return;\n setInput(newInput);\n onChange?.(newInput);\n },\n [input, disabled]\n );\n\n const renderKeys = decimal ? XHAmountKeysWithDot : XHAmountKeys;\n\n const handleConfirm = (e: ITouchEvent) => {\n e.stopPropagation();\n onConfirm?.(input);\n };\n const keyboardcls = classNames(\"xh-amount-keyboard\", className);\n\n const nodeRef = useRef(null);\n\n return (\n <CSSTransition\n nodeRef={nodeRef}\n classNames=\"slide-up\"\n in={show}\n unmountOnExit\n timeout={200}\n >\n <View className={keyboardcls}>\n <View className=\"xh-amount-keyboard-header\">\n <View className=\"xh-amount-keyboard-header-wrapper\">\n {header ||\n (recommend.length > 0 && (\n <View className=\"xh-amount-keyboard-header-wrapper-text\">\n 猜您想借{\" \"}\n <Space style={{ marginLeft: pxTransform(24) }}>\n {recommend?.map((amount, index) => (\n <View\n // @ts-ignore\n dataTrackId={`${dataTrackId}-recommend-${index}`}\n key={index}\n onClick={e => handleOnRecommand(e, amount)}\n >\n <Badge content={`¥${amount}`} key={index} />\n </View>\n ))}\n </Space>\n </View>\n ))}\n {tip}\n </View>\n </View>\n <View className=\"xh-amount-keyboard-body\">\n {renderKeys.map((key, index) => (\n <View\n key={index}\n // @ts-ignore\n dataTrackId={`${dataTrackId}-key-${index}`}\n className={classNames(\"xh-amount-keyboard-body-key\", {\n none: key.type === \"none\",\n delete: key.type === \"delete\",\n close: key.type === \"close\",\n })}\n onClick={e => {\n handleKeyPress(e, key);\n }}\n >\n {key.text}\n </View>\n ))}\n <View\n // @ts-ignore\n dataTrackId={`${dataTrackId}-confirm-fake`}\n className=\"xh-amount-keyboard-body-key confirm-fake\"\n onClick={handleConfirm}\n >\n 确定\n </View>\n </View>\n </View>\n </CSSTransition>\n );\n};\n\nexport default AmountKeyboard;\n"],"names":["XHAmountKeys","text","value","type","XHAmountKeysWithDot","AmountKeyboard","props","onBlur","show","_a","maxLength","Number","MAX_SAFE_INTEGER","_b","closeOnClickSpace","onClose","onChange","className","onConfirm","_c","recommend","header","_d","disabled","tip","decimal","_e","dataTrackId","_f","__read","useState","input","setInput","handleClose","e","useEffect","document","addEventListener","removeEventListener","handleKeyPress","useCallback","process","env","TARO_ENV","stopImmediatePropagation","newInput","slice","length","replace","includes","indexOf","renderKeys","keyboardcls","classNames","nodeRef","useRef","React","CSSTransition","in","unmountOnExit","timeout","createElement","View","Space","style","marginLeft","pxTransform","map","amount","index","concat","key","onClick","stopPropagation","handleOnRecommand","Badge","content","none","delete","close"],"mappings":"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"}
package/dist/index.esm.js CHANGED
@@ -176,5 +176,5 @@ import*as e from"react";import t,{useState as n,useEffect as r,useRef as a,useMe
176
176
  * onFinally(hasChanged, hasNativeSupport, benchmark)
177
177
  * });
178
178
  */
179
- function pn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=zt({},on,e);function n(e,n,r,a){!t.silent&&window.console,t.onError(e,n,r,a)}function r(e){!t.silent&&window.console,t.onWarning(e)}function a(e){t.onFinally(Boolean(e),rn,xn()-t.__benchmark)}if(nn){if(t.watch)return t.watch=on.watch,hn(t),void pn(t);if(!1===t.watch&&un&&(un.disconnect(),un=null),!t.__benchmark){if(sn===t.rootElement)return void vn(e);var o=[].slice.call(t.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])'));if(t.__benchmark=xn(),t.exclude=[un?'[data-cssvars]:not([data-cssvars=""])':'[data-cssvars="out"]',"link[disabled]:not([data-cssvars])",t.exclude].filter((function(e){return e})).join(","),t.variables=En(t.variables),o.forEach((function(e){var t="style"===e.nodeName.toLowerCase()&&e.__cssVars.text,n=t&&e.textContent!==e.__cssVars.text;t&&n&&(e.sheet&&(e.sheet.disabled=!1),e.setAttribute("data-cssvars",""))})),!un){var c=[].slice.call(t.rootElement.querySelectorAll('[data-cssvars="out"]'));c.forEach((function(e){var n=e.getAttribute("data-cssvars-group");(n?t.rootElement.querySelector('[data-cssvars="src"][data-cssvars-group="'.concat(n,'"]')):null)||e.parentNode.removeChild(e)})),mn&&o.length<mn&&(mn=o.length,ln.dom={})}}if("loading"!==document.readyState)if(rn&&t.onlyLegacy){var i=!1;if(t.updateDOM){var l=t.rootElement.host||(t.rootElement===document?document.documentElement:t.rootElement);Object.keys(t.variables).forEach((function(e){var n=t.variables[e];i=i||n!==getComputedStyle(l).getPropertyValue(e),l.style.setProperty(e,n)}))}a(i)}else!fn&&(t.shadowDOM||t.rootElement.shadowRoot||t.rootElement.host)?$t({rootElement:on.rootElement,include:on.include,exclude:t.exclude,skipDisabled:!1,onSuccess:function(e,t,n){return!((t.sheet||{}).disabled&&!t.__cssVars)&&((e=((e=e.replace(cn.cssComments,"").replace(cn.cssMediaQueries,"")).match(cn.cssVarDeclRules)||[]).join(""))||!1)},onComplete:function(e,n,a){Kt(e,{store:ln.dom,onWarning:r}),fn=!0,pn(t)}}):(sn=t.rootElement,$t({rootElement:t.rootElement,include:t.include,exclude:t.exclude,skipDisabled:!1,onBeforeSend:t.onBeforeSend,onError:function(e,t,r){var a=e.responseURL||bn(r,location.href),o=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");n("CSS XHR Error: ".concat(a," ").concat(e.status," ").concat(o),t,e,a)},onSuccess:function(e,n,r){if((n.sheet||{}).disabled&&!n.__cssVars)return!1;var a="link"===n.nodeName.toLowerCase(),o="style"===n.nodeName.toLowerCase()&&e!==n.textContent,c=t.onSuccess(e,n,r);return e=void 0!==c&&!1===Boolean(c)?"":c||e,t.updateURLs&&(a||o)&&(e=gn(e,r)),e},onComplete:function(e,o){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=zt({},ln.dom,ln.user);if(ln.job={},c.forEach((function(e,a){var c=o[a];if(e.__cssVars=e.__cssVars||{},e.__cssVars.text=c,cn.cssVars.test(c))try{var i=Gt(c,{preserveStatic:t.preserveStatic,removeComments:!0});Kt(i,{parseHost:Boolean(t.rootElement.host),store:ln.dom,onWarning:r}),e.__cssVars.tree=i}catch(t){n(t.message,e)}})),zt(ln.job,ln.dom),t.updateDOM?(zt(ln.user,t.variables),zt(ln.job,ln.user)):(zt(ln.job,ln.user,t.variables),zt(i,t.variables)),an.job>0&&Boolean(Object.keys(ln.job).length>Object.keys(i).length||Boolean(Object.keys(i).length&&Object.keys(ln.job).some((function(e){return ln.job[e]!==i[e]})))))Nn(t.rootElement),pn(t);else{var l=[],s=[],u=!1;if(t.updateDOM&&an.job++,c.forEach((function(e,a){var c=!e.__cssVars.tree;if(e.__cssVars.tree)try{Qt(e.__cssVars.tree,zt({},t,{variables:ln.job,onWarning:r}));var i=Zt(e.__cssVars.tree);if(t.updateDOM){var m=o[a],d=cn.cssVarFunc.test(m);if(e.getAttribute("data-cssvars")||e.setAttribute("data-cssvars","src"),i.length&&d){var f=e.getAttribute("data-cssvars-group")||++an.group,p=i.replace(/\s/g,""),h=t.rootElement.querySelector('[data-cssvars="out"][data-cssvars-group="'.concat(f,'"]'))||document.createElement("style");u=u||cn.cssKeyframes.test(i),t.preserveStatic&&e.sheet&&(e.sheet.disabled=!0),h.hasAttribute("data-cssvars")||h.setAttribute("data-cssvars","out"),p===e.textContent.replace(/\s/g,"")?(c=!0,h&&h.parentNode&&(e.removeAttribute("data-cssvars-group"),h.parentNode.removeChild(h))):p!==h.textContent.replace(/\s/g,"")&&([e,h].forEach((function(e){e.setAttribute("data-cssvars-job",an.job),e.setAttribute("data-cssvars-group",f)})),h.textContent=i,l.push(i),s.push(h),h.parentNode||e.parentNode.insertBefore(h,e.nextSibling))}}else e.textContent.replace(/\s/g,"")!==i&&l.push(i)}catch(t){n(t.message,e)}c&&e.setAttribute("data-cssvars","skip"),e.hasAttribute("data-cssvars-job")||e.setAttribute("data-cssvars-job",an.job)})),mn=t.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])').length,t.shadowDOM)for(var m,d=[].concat(t.rootElement).concat([].slice.call(t.rootElement.querySelectorAll("*"))),f=0;m=d[f];++f)if(m.shadowRoot&&m.shadowRoot.querySelector("style")){var p=zt({},t,{rootElement:m.shadowRoot});pn(p)}t.updateDOM&&u&&yn(t.rootElement),sn=!1,t.onComplete(l.join(""),s,JSON.parse(JSON.stringify(ln.job)),xn()-t.__benchmark),a(s.length)}}}));else document.addEventListener("DOMContentLoaded",(function t(n){pn(e),document.removeEventListener("DOMContentLoaded",t)}))}}function hn(e){function t(e){var t=n(e)&&e.hasAttribute("disabled"),r=(e.sheet||{}).disabled;return t||r}function n(e){return"link"===e.nodeName.toLowerCase()&&-1!==(e.getAttribute("rel")||"").indexOf("stylesheet")}function r(e){return"style"===e.nodeName.toLowerCase()}window.MutationObserver&&(un&&(un.disconnect(),un=null),(un=new MutationObserver((function(a){a.some((function(a){return function(r){var a=!1;if("attributes"===r.type&&n(r.target)&&!t(r.target)){var o="disabled"===r.attributeName,c="href"===r.attributeName,i="skip"===r.target.getAttribute("data-cssvars"),l="src"===r.target.getAttribute("data-cssvars");o?a=!i&&!l:c&&(i?r.target.setAttribute("data-cssvars",""):l&&Nn(e.rootElement,!0),a=!0)}return a}(a)||function(e){var t=!1;if("childList"===e.type){var n=r(e.target),a="out"===e.target.getAttribute("data-cssvars");t=n&&!a}return t}(a)||function(e){var a=!1;return"childList"===e.type&&(a=[].slice.call(e.addedNodes).some((function(e){var a=1===e.nodeType&&e.hasAttribute("data-cssvars"),o=r(e)&&cn.cssVars.test(e.textContent);return!a&&(n(e)||o)&&!t(e)}))),a}(a)||function(t){var n=!1;return"childList"===t.type&&(n=[].slice.call(t.removedNodes).some((function(t){var n=1===t.nodeType,r=n&&"out"===t.getAttribute("data-cssvars"),a=n&&"src"===t.getAttribute("data-cssvars"),o=a;if(a||r){var c=t.getAttribute("data-cssvars-group"),i=e.rootElement.querySelector('[data-cssvars-group="'.concat(c,'"]'));a&&Nn(e.rootElement,!0),i&&i.parentNode.removeChild(i)}return o}))),n}(a)}))&&pn(e)}))).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0}))}function vn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;clearTimeout(dn),dn=setTimeout((function(){e.__benchmark=null,pn(e)}),t)}function yn(e){var t=["animation-name","-moz-animation-name","-webkit-animation-name"].filter((function(e){return getComputedStyle(document.body)[e]}))[0];if(t){for(var n=[].slice.call(e.querySelectorAll("*")),r=[],a="__CSSVARSPONYFILL-KEYFRAMES__",o=0,c=n.length;o<c;o++){var i=n[o];"none"!==getComputedStyle(i)[t]&&(i.style[t]+=a,r.push(i))}document.body.offsetHeight;for(var l=0,s=r.length;l<s;l++){var u=r[l].style;u[t]=u[t].replace(a,"")}}}function gn(e,t){return(e.replace(cn.cssComments,"").match(cn.cssUrls)||[]).forEach((function(n){var r=n.replace(cn.cssUrls,"$1"),a=bn(r,t);e=e.replace(n,n.replace(r,a))})),e}function En(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=/^-{2}/;return Object.keys(e).reduce((function(n,r){return n[t.test(r)?r:"--".concat(r.replace(/^-+/,""))]=e[r],n}),{})}function bn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,n=document.implementation.createHTMLDocument(""),r=n.createElement("base"),a=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(a),r.href=t,a.href=e,a.href}function xn(){return nn&&(window.performance||{}).now?window.performance.now():(new Date).getTime()}function Nn(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[].slice.call(e.querySelectorAll('[data-cssvars="skip"],[data-cssvars="src"]'));n.forEach((function(e){return e.setAttribute("data-cssvars","")})),t&&(ln.dom={})}pn.reset=function(){for(var e in an.job=0,an.group=0,sn=!1,un&&(un.disconnect(),un=null),mn=0,dn=null,fn=!1,ln)ln[e]={}};var kn=s(R({},{})),Cn=function(e){var n=e.children,r=e.value,a=e.scoped,o=n;return void 0!==a&&a?o=t.Children.map(n,(function(e,n){return 0===n?t.cloneElement(e,{style:r}):e})):Object.keys(r).forEach((function(e){document.body.style.setProperty(e,r[e])})),pn({variables:r}),t.createElement(kn.Provider,{value:r},o)};function Tn(e,t){var a=M(n(e),2),o=a[0],c=a[1];return r((function(){c("".concat(t).concat((1e3*Math.random()).toString().replace(".","").slice(0,20)))}),[]),o}var wn=function(e){var n=e.icon,r=void 0===n?"":n,a=e.size,o=void 0===a?0:a,c=e.className,i=e.color,l=e.style,s=V(e,["icon","size","className","color","style"]),u=r&&"xh-icon-".concat(r),m=d("xh-icon",u,c),f=R(R(R({},l),o>0?{fontSize:U(o)}:{}),{color:i});return t.createElement("span",R({className:m},{style:f},{"data-track-id":e.dataTrackId},s))},Sn=function(e){var a=e.className,o=e.name,c=e.label,i=e.id,l=e.circle,s=e.onChange,u=e.align,m=e.direction,f=e.justify,h=e.checked,v=void 0!==h&&h,y=e.disabled,g=e.value,E=void 0===g?"":g,b=e.style,x=e.size,N=void 0===x?0:x,k=e.iconColor,C=void 0===k?"#FFFFFF":k,T=e.dataTrackId,w=void 0===T?"Checkbox":T,S=Tn(i,"xh-checkbox-id"),O=M(n(!1),2),I=O[0],A=O[1];r((function(){A(v)}),[v]);var _=d("xh-checkbox",a,u,m,f,{h5:"h5"===process.env.TARO_ENV});return"h5"!==process.env.TARO_ENV?t.createElement(p,{onClick:function(){y||(A(!I),null==s||s(!I,E))},className:_,style:b,dataTrackId:w},t.createElement(p,{className:d("xh-checkbox-input",{checked:I,disabled:y})}," "),t.createElement("span",{style:N>0?{width:U(N),height:U(N)}:{},dataTrackId:"".concat(w,"-fake"),className:d("xh-checkbox-input-fake",l&&"circle")},t.createElement(wn,{icon:"duigou",className:"xh-checkbox-input-fake-icon",color:C,size:N?.55*N:18})),t.createElement("span",{className:"xh-radio-label",dataTrackId:"".concat(w,"-label")},c)):t.createElement("label",{htmlFor:S,className:_,style:b,"data-track-id":w},t.createElement("input",{type:"checkbox",id:S,name:o,className:"xh-checkbox-input",onChange:function(e){var t=v||!1,n="";"h5"===process.env.TARO_ENV?(t=e.target.checked,n=e.target.value):(t=e.detail.value.length>0,n=e.detail.value[0]),s&&s(t,n)},value:E,defaultChecked:v}),t.createElement("span",{style:N>0?{width:U(N),height:U(N)}:{},"data-track-id":"".concat(w,"-fake"),className:d("xh-checkbox-input-fake",l&&"circle")},t.createElement(wn,{icon:"duigou",className:"xh-checkbox-input-fake-icon",color:C,size:N?.55*N:18})),t.createElement("span",{className:"xh-checkbox-label","data-track-id":"".concat(w,"-label")},c))};Sn.Group=function(e){var n=e.option,r=e.onChange,a=e.defaultChecked,c=e.padding,i=e.border,l=e.style,s=e.checkboxStyle,u=V(e,["option","onChange","defaultChecked","padding","border","style","checkboxStyle"]),m=o((function(){return n.map((function(e){var t="string"==typeof a?[a]:a;return"string"==typeof e?{label:e,value:e,checked:null==t?void 0:t.includes(e)}:((null==t?void 0:t.includes(e.value))&&(e.checked=!0),e)}))}),[n,a]),f=d("xh-checkbox-group",{padding:c},{border:i});return t.createElement("div",{className:f,style:l},m.map((function(e,n){return t.createElement(Sn,R({label:e.label,value:e.value,disabled:e.disabled,checked:e.checked,key:n,style:s,onChange:function(e){return function(e,t){var n=F([],M(m),!1);n[t].checked=e;var a=n.filter((function(e){return e.checked})).map((function(e){return e.value}));null==r||r(a)}(e,n)}},u))})))};var On=function(e){var a=e.className,o=e.name,c=e.label,i=e.id,l=e.circle,s=void 0===l||l,u=e.onChange,m=e.align,f=e.direction,h=e.justify,v=e.checked,y=e.disabled,g=e.value,E=e.style,b=e.size,x=void 0===b?0:b,N=e.fancy,k=void 0!==N&&N,C=e.index,T=void 0===C?0:C,w=e.group,S=void 0!==w&&w,O=e.iconColor,A=void 0===O?"#FFFFFF":O,_=e.dataTrackId,P=Tn(i,"xh-radio-id"),R=M(n(v),2),V=R[0],j=R[1],D=function(e){"h5"!==process.env.TARO_ENV&&e!==T&&j(!1)};r((function(){return"h5"!==process.env.TARO_ENV&&I.on("radioChange",D),function(){I.off("radioChange",D)}}),[]);var F=d("xh-radio",a,m,f,h);return"h5"!==process.env.TARO_ENV?t.createElement(p,{dataTrackId:_,onClick:function(){V&&S||(j(!V),null==u||u(!V,g||""))},className:F,style:E},t.createElement(p,{className:d("xh-radio-input",{checked:V})}),t.createElement("span",{style:x>0?{width:U(x),height:U(x)}:{},className:d("xh-radio-input-fake",s&&"circle",{fancy:k})},t.createElement(wn,{icon:"duigou",className:"xh-radio-input-fake-icon",color:A,size:x?.55*x:18})),t.createElement("span",{className:"xh-radio-label"},c)):t.createElement("label",{htmlFor:P,className:F,"data-track-id":_,style:E},t.createElement("input",{type:"radio",id:P,name:o,className:"xh-radio-input",onChange:function(e){var t=v||!1,n="";"h5"===process.env.TARO_ENV?(t=e.target.checked,n=e.target.value):(t=e.detail.value,n=e.detail.value),null==u||u(t,n)},value:g,disabled:y,defaultChecked:v}),t.createElement("span",{style:x>0?{width:U(x),height:U(x)}:{},className:d("xh-radio-input-fake",{circle:s,fancy:k})},t.createElement(wn,{icon:"duigou",className:"xh-radio-input-fake-icon",color:A,size:x?.55*x:18})),t.createElement("span",{className:"xh-radio-label"},c))};On.Group=function(e){var a=e.option,c=e.onChange,i=e.name,l=e.padding,s=e.border,u=e.radioStyle,m=e.defaultChecked,f=e.inline,p=e.style,h=e.checkedClass,v=void 0===h?"":h,y=e.dataTrackId,g=void 0===y?"RadioGroup":y,E=V(e,["option","onChange","name","padding","border","radioStyle","defaultChecked","inline","style","checkedClass","dataTrackId"]),b=o((function(){return null==a?void 0:a.map((function(e){return"string"==typeof e?{label:e,value:e,checked:m===e}:(m===e.value&&(e.checked=!0),e)}))}),[a,m]),x=M(n(b),2),N=x[0],k=x[1];r((function(){k(b)}),[b]);var C=d("xh-radio-group",{padding:l},{border:s},{inline:f});return t.createElement("div",{className:C,style:p},b.map((function(e,n){var r;return t.createElement(On,R({dataTrackId:"".concat(g,"_option_").concat(n),label:e.label,value:e.value,disabled:e.disabled,name:i,key:n,className:d("xh-radio-group-list",(r={},r[v]=e.checked,r)),circle:!0,onChange:function(){return function(e){for(var t=F([],M(N),!1),n="",r=0;r<t.length;r++)r===e?(t[r].checked=!0,n=t[r].value):t[r].checked=!1;k(t),null==c||c(n),"h5"!==process.env.TARO_ENV&&I.trigger("radioChange",e)}(n)},checked:e.checked,style:u,index:n,group:!0},E))})))};var In=t.createElement("span",{className:"".concat("xh-step","-icon-dot")}),An=function(e){var n=e.title,r=e.description,a=e.icon,o=e.status,c=void 0===o?"wait":o,i=e.fancy,l=e.style,s=e.className,u=e.direction,m=e.prefix,f=e.dashed,h=e.dataTrackId;return t.createElement(p,{className:d("".concat("xh-step"),"".concat("xh-step","-status-").concat(c),s),"data-track-id":h,style:l},"vertical"===u&&m&&t.createElement(p,{className:"".concat("xh-step","-prefix")},m),t.createElement(p,{className:d("".concat("xh-step","-indicator"),{dashed:f})},t.createElement(p,{className:d("".concat("xh-step","-icon-container"),{fancy:i})},a)),t.createElement(p,{className:"".concat("xh-step","-content")},t.createElement(p,{className:"".concat("xh-step","-title")},n),!!r&&t.createElement(p,{className:"".concat("xh-step","-description")},r)))};An.Steps=function(e){var n=e.direction,r=void 0===n?"horizontal":n,a=e.current,o=void 0===a?0:a,c=e.style,i=e.className,l=e.dashed,s=void 0!==l&&l,u=d("xh-steps","".concat("xh-steps","-").concat(r),i);return t.createElement(p,{className:u,style:c},t.Children.map(e.children,(function(e,n){var a;if(!t.isValidElement(e))return e;var c=e.props,i=c.status||"wait";n<o?i=c.status||"finish":n===o&&(i=c.status||"process");var l=null!==(a=c.icon)&&void 0!==a?a:In;return t.cloneElement(e,{status:i,icon:l,direction:r,dashed:s})})))};var _n=function(e){var n=e.content,r=e.children,a=d("xh-badge",d);return t.createElement(p,{className:a},r||n)},Pn=function(e){var n=e.value,r=e.maxlength,a=void 0===r?n.length:r,o=e.onFocus,c=e.className,i=e.focus,l=void 0!==i&&i,s=e.shortcut,u=void 0===s?"借全部":s,m=e.step,f=void 0===m?100:m,h=e.errTip,v=void 0===h?"":h,y=e.onUpgrade,g=e.minAmount,E=e.maxAmount,b=e.showUpgrade,x=void 0!==b&&b,N=e.loanOnekey,k=void 0===N?function(){}:N,C=e.placeholder,T=void 0===C?"单笔".concat(g,"-").concat(E,"元,").concat(f,"的整数倍"):C,w=e.slot,S=e.showBottom,O=void 0===S||S,I=e.title,A=void 0!==I&&I,_=e.dataTrackId;var P=d("xh-amount-input",c);return t.createElement(p,{className:P},A&&t.createElement(p,{className:"xh-amount-input-title"},A),t.createElement(p,{className:"xh-amount-input-top"},t.createElement(p,{className:"xh-amount-input-top-unit"},"¥"),t.createElement(p,{className:"xh-amount-input-top-amount",onClick:function(e){e.stopPropagation(),o&&o(e)},dataTrackId:"".concat(_,"_amount")},t.createElement(p,{className:"xh-amount-input-top-amount-num"},t.createElement(p,{className:"xh-amount-input-top-amount-num-key"}," "),function(){var e=[""];if(""===n)return t.createElement(p,{className:"xh-amount-input-top-amount-num-placeholder"},T);for(var r=0;r<a;r++){var o=n[r];e.push(t.createElement(p,{key:r,className:"xh-amount-input-top-amount-num-key"},o))}return e}(),t.createElement(p,{className:d("xh-amount-input-top-amount-num-cursor",{focus:l})})),t.createElement(p,{className:"xh-amount-input-top-amount-shortcut",onClick:k,dataTrackId:"".concat(_,"_top_shortcut")},"string"==typeof u?t.createElement(p,{className:"xh-amount-input-top-amount-shortcut-text"},u):u)),v&&t.createElement(p,{className:"xh-amount-input-top-error"},v)),w&&t.createElement(p,{className:"xh-amount-input-slot"},w),O&&t.createElement(p,{className:"xh-amount-input-bottom"},t.createElement(p,{className:"xh-amount-input-bottom-range"},"单笔可借:",t.createElement(p,{className:"xh-amount-input-bottom-range-number"},g,"-",E,"元")),x&&t.createElement(p,{className:"xh-amount-input-bottom-tip"},t.createElement(t.Fragment,null,t.createElement(p,{className:"xh-amount-input-bottom-tip-update",dataTrackId:"".concat(_,"_bottom"),onClick:function(e){e.stopPropagation(),null==y||y()}},"额度不够?")))))},Rn=[{text:1,value:1,type:"number"},{text:2,value:2,type:"number"},{text:3,value:3,type:"number"},{text:"",value:"",type:"delete"},{text:4,value:4,type:"number"},{text:5,value:5,type:"number"},{text:6,value:6,type:"number"},{text:"",value:"",type:"none"},{text:7,value:7,type:"number"},{text:8,value:8,type:"number"},{text:9,value:9,type:"number"},{text:"",value:"",type:"none"},{text:"00",value:"00",type:"number"},{text:0,value:0,type:"number"},{text:"",value:"",type:"close"},{text:"",value:"",type:"none"}],Vn=[{text:1,value:1,type:"number"},{text:2,value:2,type:"number"},{text:3,value:3,type:"number"},{text:"",value:"",type:"delete"},{text:4,value:4,type:"number"},{text:5,value:5,type:"number"},{text:6,value:6,type:"number"},{text:"",value:"",type:"none"},{text:7,value:7,type:"number"},{text:8,value:8,type:"number"},{text:9,value:9,type:"number"},{text:"",value:"",type:"none"},{text:"·",value:".",type:"number"},{text:0,value:0,type:"number"},{text:"",value:"",type:"close"},{text:"",value:"",type:"none"}],jn=function(e){var o=e.onBlur,c=e.show,i=e.maxLength,l=void 0===i?Number.MAX_SAFE_INTEGER:i,s=e.closeOnClickSpace,m=void 0===s||s,f=e.onClose,h=e.onChange,v=e.value,y=e.className,g=e.onConfirm,E=e.recommend,b=void 0===E?[]:E,x=e.header,N=e.disabled,k=void 0!==N&&N,C=e.tip,T=e.decimal,w=e.dataTrackId,S=M(n(v),2),O=S[0],I=S[1];function A(e){f&&f(e),o&&o(e)}r((function(){return m&&document.addEventListener("click",A),function(){document.removeEventListener("click",A)}}),[]),r((function(){I(v)}),[v]);var _=u((function(e,t){var n=t.type,r=t.value;if("h5"===process.env.TARO_ENV&&e.stopImmediatePropagation(),!k&&"none"!==n&&("."!==r||""!==O))if("close"!==n){var a=O;"delete"===n?a=O.slice(0,O.length-1):a.replace(/^0+/g,"").length<l&&(a=O+r),T&&0===r&&""===O&&(a=r+"."),"."===r&&O.includes(".")||"number"===n&&O.indexOf(".")>-1&&O.length-O.indexOf(".")==3||a!==O&&(I(a),null==h||h(a))}else A(e)}),[O,k]),P=T?Vn:Rn,R=d("xh-amount-keyboard",y),V=a(null);return t.createElement(ht,{nodeRef:V,classNames:"slide-up",in:c,unmountOnExit:!0,timeout:200},t.createElement(p,{className:R},t.createElement(p,{className:"xh-amount-keyboard-header"},t.createElement(p,{className:"xh-amount-keyboard-header-wrapper"},x||b.length>0&&t.createElement(p,{className:"xh-amount-keyboard-header-wrapper-text"},"猜您想借"," ",t.createElement(Bt,{style:{marginLeft:U(24)}},null==b?void 0:b.map((function(e,n){return t.createElement(p,{dataTrackId:"".concat(w,"-recommend-").concat(n),key:n,onClick:function(t){return function(e,t){e.stopPropagation(),null==g||g("".concat(t),!0)}(t,e)}},t.createElement(_n,{content:"¥".concat(e),key:n}))})))),C)),t.createElement(p,{className:"xh-amount-keyboard-body"},P.map((function(e,n){return t.createElement(p,{key:n,dataTrackId:"".concat(w,"-key-").concat(n),className:d("xh-amount-keyboard-body-key",{none:"none"===e.type,delete:"delete"===e.type,close:"close"===e.type}),onClick:function(t){_(t,e)}},e.text)})),t.createElement(p,{dataTrackId:"".concat(w,"-confirm-fake"),className:"xh-amount-keyboard-body-key confirm-fake",onClick:function(e){e.stopPropagation(),null==g||g(O)}},"确定"))))},Dn=function(e){var r=e.summary,c=void 0===r?"":r,i=e.children,l=e.open,s=void 0!==l&&l;e.arrow;var u=e.className,m=e.style,f=e.onToggle,h=e.dataTrackId,v=void 0===h?"collapse":h,y=V(e,["summary","children","open","arrow","className","style","onToggle","dataTrackId"]),g=a(null),E=M(n(s),2),b=E[0],x=E[1],N=o((function(){var e,t,n={height:0};return b&&(n.height="h5"===process.env.TARO_ENV?"".concat(null===(e=g.current)||void 0===e?void 0:e.scrollHeight,"px"):"auto"),"h5"===process.env.TARO_ENV&&b&&(null===(t=g.current)||void 0===t||t.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})),null==f||f(b),n}),[b]);return t.createElement(p,{className:d("xh-collapse",u),style:m,dataTrackId:v},t.createElement(p,{dataTrackId:"".concat(v,"_summary"),className:d("xh-collapse-summary",{open:b}),onClick:function(){x((function(e){return!e}))}},c||t.createElement(ie,R({},y,{arrow:!0,dataTrackId:"".concat(v,"_summary_list")}))),t.createElement(p,{className:d("xh-collapse-detail"),ref:g,style:N},i))},Mn=function(e){var a=e.visible,o=void 0!==a&&a,c=e.title,i=e.description,l=e.data,s=void 0===l?[]:l,u=e.onConfirm,m=e.onCancel,f=e.className,h=e.children,v=e.style,y=e.mode,g=e.submitText,E=void 0===g?"提交":g,b=e.cancelText,x=void 0===b?"取消":b,N=e.showCancel,k=void 0!==N&&N,C=e.renderItem,T=e.ItemWrapper,w=e.onSubmit,S=e.onClick,O=e.showClose,I=void 0!==O&&O,A=e.justifyContent,_=void 0===A?"center":A,P=e.inline,R=void 0!==P&&P,V=e.defaultValue,j=void 0===V?"":V,D=e.dataTrackId,F=void 0===D?"action-sheet":D,L=M(n(o),2),B=L[0],z=L[1],H=M(n("string"==typeof j?j:null==j?void 0:j.value),2),$=H[0],X=H[1],W=function(e){null==m||m(e),null==S||S(!1),z(!1)};r((function(){z(o)}),[o]);var Y=function(){null==w||w()},q=function(){return s.map((function(e,n){return C?C(e,n):t.createElement(p,{dataTrackId:"".concat(F,"-item-").concat(n),className:d("xh-action-sheet-main-panel-item",_,{active:"string"==typeof e?e===$:e.value===$}),key:n,onClick:function(){!function(e,t){null==u||u(e,t),z(!1);var n="string"==typeof e?e:e.value;X(n)}(e,n)}},"string"==typeof e?e:e.text)}))},U=I||"controlled"===y&&!k;return t.createElement(p,{className:d("xh-action-sheet",{inline:R}),onClick:function(){S?S(!o):s.length<=0||z(!0)},dataTrackId:"".concat(F,"-wrapper")},t.createElement(_t,{visible:B,onClose:W},t.createElement(p,{className:d("xh-action-sheet-main",f,y),style:v},c&&t.createElement(p,{className:"xh-action-sheet-main-header"},t.createElement(p,{className:"xh-action-sheet-main-header-title"},c),t.createElement(p,{className:"xh-action-sheet-main-header-desc"},i),U&&t.createElement(p,{className:"xh-action-sheet-main-header-close",onClick:function(){return W()}})),t.createElement(p,{dataTrackId:"".concat(F,"-panel"),className:d("xh-action-sheet-main-panel",{noTitle:!c}),onClick:function(e){return"h5"!==process.env.TARO_ENV&&e.stopPropagation()}},T?t.createElement(T,null,q()):t.createElement(t.Fragment,null,q())),t.createElement(p,{dataTrackId:"".concat(F,"-action"),className:d("xh-action-sheet-main-action",{noMarinTop:"controlled"!==y&&U}),onClick:function(e){return"h5"!==process.env.TARO_ENV&&e.stopPropagation()}},"controlled"===y?t.createElement(p,null,t.createElement(p,{className:"xh-action-sheet-main-action-submit",dataTrackId:"".concat(F,"-submit"),onClick:Y},E),k&&t.createElement(p,{className:"xh-action-sheet-main-action-cancel mode",dataTrackId:"".concat(F,"-cancel"),onClick:function(){return W(!0)}},x)):U?t.createElement("div",null):t.createElement(p,{dataTrackId:"".concat(F,"-cancel-bottom"),className:"xh-action-sheet-main-action-cancel",onClick:function(){return W(!0)}},x)))),h)},Fn=function(e){var r=e.defalutScore,a=void 0===r?-1:r,o=e.onChange,c=e.max,i=void 0===c?5:c,l=e.size,s=void 0===l?0:l,u=e.tip,m=void 0===u?"轻点星形以评分":u,f=e.style,h=void 0===f?{}:f,v=M(n(a),2),y=v[0],g=v[1];return t.createElement(p,{className:d("xh-rank"),style:R(s?{fontSize:U(s)}:{},h)},t.createElement(p,{className:"xh-rank-tip"},m),t.createElement(p,{className:"xh-rank-star"},Array(i).fill(1).map((function(e,n){return t.createElement(p,{key:n,className:d("xh-rank-star-active",{active:n<=y}),onClick:function(){return function(e){g(e),null==o||o(e+1)}(n)}})}))))},Ln=function(e){var n=e.icon,r=e.value,a=e.extraIcon,o=e.arrow,c=e.border,i=void 0===c||c,l=e.paddingHorizontal,s=void 0===l||l,u=e.onClick,m=e.className,f=e.outline,v=void 0===f||f,y=e.descriptionColor,g=void 0===y?"":y,E=e.valueColor,b=e.ellipsis,x=void 0===b||b,N=e.content,k=e.contentDescription,C=e.description,T=e.subDescription,w=e.secondary,S=e.alignItems,O=void 0===S?n?"start":"center":S,I=e.placeholder,A=void 0===I?"":I,_=e.dataTrackId,P=void 0===_?"Cell":_,R=d("xh-cell",{border:i},{secondary:w},{outline:v},{paddingHorizontal:s},O,m),V=d("xh-cell-main",{ellipsis:x});return t.createElement(p,{className:R,onClick:function(e){u&&u(e)},dataTrackId:"".concat(P,"_wrapper")},n&&t.createElement(p,{className:"xh-cell-icon"},n),t.createElement(p,{className:V,dataTrackId:"".concat(P,"_main")},N&&t.createElement(p,{className:"xh-cell-main-content"},N),k&&t.createElement(p,{className:"xh-cell-main-description"},k)),t.createElement(p,{className:"xh-cell-description",dataTrackId:"".concat(P,"_description"),style:{color:g}},C?t.createElement(p,null,C):t.createElement(p,{className:"xh-cell-description-placeholder"},A),t.createElement(h,{className:"xh-cell-description-sub"},T)),t.createElement(p,{className:"xh-cell-value",dataTrackId:"".concat(P,"_value")},t.createElement(p,{className:"xh-cell-value-info",style:{color:E}},r),t.createElement(p,{className:"xh-cell-value-icon"},a||o&&t.createElement(p,{className:"xh-cell-value-icon-arrow"}))))},Bn=function(e){var n=e.className,r=e.style,a=e.size,o=void 0===a?36:a,c=V(e,["className","style","size"]),i=d("xh-activity-indicator",n),l=R(R({},r),c);return 36!==o&&(l=R(R({},l),{width:U(o),height:U(o)})),t.createElement(p,{className:i,style:l},t.createElement(p,{className:"xh-activity-indicator-main"}),t.createElement(p,{className:"xh-activity-indicator-main"}),t.createElement(p,{className:"xh-activity-indicator-main"}))},zn=function(e){var r=e.checked,a=void 0!==r&&r,c=e.checkedText,i=void 0===c?"":c,l=e.uncheckedText,s=void 0===l?"":l,u=e.onChange,m=e.className,f=e.disabled,h=M(n(a),2),v=h[0],y=h[1],g=o((function(){return v?i:s}),[v,i,s]);return t.createElement(p,{className:d("xh-switch",{checked:v},{disabled:f},m),onClick:function(){f||y((function(e){return null==u||u(!e),!e}))}},t.createElement(p,{className:"xh-switch-control"}),t.createElement(p,{className:"xh-switch-inner"},g))},Hn=["一","二","三","四","五","六","七","八","九","十"],$n={linkmanName:"请输入联系人姓名",linkmanPhone:"请输入正确的手机号",relationType:"请选择与联系人关系"},Xn=[{value:"FATHER",text:"父亲"},{value:"MOTHER",text:"母亲"},{value:"MATE",text:"配偶"},{value:"CHILDREN",text:"子女"},{value:"SIBLING",text:"兄弟姐妹"},{value:"FRIENDS",text:"朋友"},{value:"COLLEAGUE",text:"同事"},{value:"RELATIVES",text:"亲戚"},{value:"OTHER",text:"其他"}],Wn="h5"!==process.env.TARO_ENV||window.navigator.userAgent.includes("xhqb"),Yn=c((function(e,a){var c=e.linkManNum,l=e.relations,s=void 0===l?Xn:l,m=e.onChange,f=e.onGetContacts,h=e.showImportIcon,v=void 0===h?Wn:h,g=e.onBlur,E=e.onCheckRelation,b=e.onInputChange,x=e.needName,N=void 0===x||x,k=e.dataTrackId,C=void 0===k?"XHAddLinMan":k,T=M(n([]),2),w=T[0],S=T[1],O=M(n([]),2),I=O[0],A=O[1];r((function(){S(Array(c).fill(1).map((function(){return{linkmanName:"",linkmanPhone:"",relationType:"",relationValue:""}}))),A(Array(c).fill(1).map((function(){return{linkmanName:"",linkmanPhone:"",relationType:""}})))}),[c]);var _=u((function(e){return!!/1\d{10}/.test(e)}),[]),P=u((function(e,t){return"linkmanName"===e?!(!t||!t.replace(/^\s+|\s+$/gm,""))&&!(t.length>20):"linkmanPhone"===e?!(!t||!_(t)):"relationType"===e&&!!t}),[]),V=o((function(){for(var e=w,t=e.length,n={linkmanName:[],linkmanPhone:[],relationValue:[]},r=!0,a=0;a<t;a++){if(N)if(!P("linkmanName",e[a].linkmanName)){r=!1;break}if(!P("linkmanPhone",e[a].linkmanPhone)){r=!1;break}if(0!==a&&n.linkmanPhone.includes(e[a].linkmanPhone)){r=!1;break}if(n.linkmanPhone.push(e[a].linkmanPhone),!P("relationType",e[a].relationValue)){r=!1;break}n.relationValue.push(e[a].relationValue)}return n.relationValue.filter((function(e){return"MATE"===e})).length>=2&&(r=!1),r}),[w,N]);r((function(){null==m||m(w,V)}),[w,V]),i(a,(function(){return{canSubmit:V,setContacts:function(e,t){S((function(n){return n[t].linkmanName=e.linkmanName||"",n[t].linkmanPhone=e.linkmanPhone||"",F([],M(n),!1)})),B("linkmanName",t),B("linkmanPhone",t)}}}),[V]);var j=function(e,t,n){for(var r=n||w,a=r[t],o=0,c=r.length;o<c;o++)if(o!==t){var i=r[o];if("linkmanPhone"===e){if(""!==a.linkmanPhone&&""!==i.linkmanPhone&&i.linkmanPhone===a.linkmanPhone)return{pass:!1,message:"手机号与第".concat(o+1,"联系人号码重复,请修改")}}else if("relationValue"===e&&""!==a.relationValue&&"MATE"===i.relationValue&&"MATE"===a.relationValue)return{pass:!1,message:"关系与第".concat(o+1,"联系人关系重复,请修改")}}return{pass:!0,message:""}},D=u((function(e,t){var n="h5"===process.env.TARO_ENV?e.target.value:e.detail.value,r=q(n);S((function(e){return e[t].linkmanName=r,F([],M(e),!1)})),null==b||b("linkmanName",t)}),[]),L=u((function(e,t){var n="h5"===process.env.TARO_ENV?e.target.value:e.detail.value,r=q(n);S((function(e){return e[t].linkmanPhone=r,F([],M(e),!1)})),null==b||b("linkmanPhone",t)}),[]),B=u((function(e,t){if(P(e,w[t][e])){var n=j(e,t),r=n.pass,a=n.message;r||A((function(n){return n[t][e]=a,F([],M(n),!1)})),null==g||g(e,t)}else A((function(n){return n[t][e]=$n[e],F([],M(n),!1)}))}),[w]),z=u((function(e,t){A((function(n){return n[t][e]="",F([],M(n),!1)}))}),[]);return t.createElement(p,{className:"xh-linkman",dataTrackId:C},w.map((function(e,n){return t.createElement(p,{key:n,className:"xh-linkman-item"},t.createElement(p,{className:"xh-linkman-title"},"第",Hn[n],"联系人"),N&&t.createElement(p,{className:"xh-linkman-main"},t.createElement(p,{className:"xh-linkman-main-input"},t.createElement(p,{className:"xh-linkman-main-input-label"},"姓名"),t.createElement(p,{className:"xh-linkman-main-input-main"},"h5"===process.env.TARO_ENV?t.createElement("input",{"data-track-id":"".concat(C,"_").concat(n,"-name"),className:"xh-linkman-main-input-main-input",type:"text",placeholder:"紧急联系人姓名",onChange:function(e){return D(e,n)},value:e.linkmanName,onBlur:function(){return B("linkmanName",n)},onFocus:function(){return z("linkmanName",n)}}):t.createElement(y,{dataTrackId:"".concat(C,"_").concat(n,"-name"),placeholder:"紧急联系人姓名",className:"xh-linkman-main-input-main-input",onBlur:function(){return B("linkmanName",n)},value:e.linkmanName,type:"text",onInput:function(e){return D(e,n)},onFocus:function(){return z("linkmanName",n)}}),I[n].linkmanName&&t.createElement(p,{className:"xh-linkman-main-input-main-err"},I[n].linkmanName)),v&&t.createElement(p,{dataTrackId:"".concat(C,"_").concat(n,"-name-contacts"),className:"xh-linkman-main-input-contacts",onClick:function(){return null==f?void 0:f(n)}}))),t.createElement(p,{className:"xh-linkman-main"},t.createElement(p,{className:"xh-linkman-main-input"},t.createElement(p,{className:"xh-linkman-main-input-label"},"电话"),t.createElement(p,{className:"xh-linkman-main-input-main"},"h5"===process.env.TARO_ENV?t.createElement("input",{"data-track-id":"".concat(C,"_").concat(n,"-phone"),className:"xh-linkman-main-input-main-input",type:"tel",placeholder:"紧急联系人手机号",onBlur:function(){return B("linkmanPhone",n)},maxLength:11,onChange:function(e){return L(e,n)},value:e.linkmanPhone,onFocus:function(){return z("linkmanPhone",n)}}):t.createElement(y,{dataTrackId:"".concat(C,"_").concat(n,"-phone"),placeholder:"紧急联系人手机号",className:"xh-linkman-main-input-main-input",type:"number",maxlength:11,onBlur:function(){return B("linkmanPhone",n)},value:e.linkmanPhone,onInput:function(e){return L(e,n)},onFocus:function(){return z("linkmanPhone",n)}}),I[n].linkmanPhone&&t.createElement(p,{className:"xh-linkman-main-input-main-err"},I[n].linkmanPhone)),v&&!N&&t.createElement(p,{dataTrackId:"".concat(C,"_").concat(n,"-phone-contacts"),className:"xh-linkman-main-input-contacts",onClick:function(){return null==f?void 0:f(n)}}))),t.createElement(Mn,{data:s,title:"选择与联系人的关系",dataTrackId:"".concat(C,"_").concat(n,"-relation"),onConfirm:function(e){A((function(e){var t=F([],M(e),!1);return t[n].relationType="",t})),S((function(t){var r=F([],M(t),!1);r[n]=R(R({},r[n]),{relationType:e.text,relationValue:e.value});var a=j("relationValue",n,r),o=a.pass,c=a.message;return o||setTimeout((function(){A((function(e){var t=F([],M(e),!1);return t[n].relationType=c,t}))}),0),r})),null==E||E(e,n)},onCancel:function(){return B("relationType",n)}},t.createElement(p,{className:"xh-linkman-main"},t.createElement(p,{className:"xh-linkman-main-input"},t.createElement(p,{className:"xh-linkman-main-input-label"},"关系"),t.createElement(p,{className:"xh-linkman-main-input-main"},t.createElement(p,{dataTrackId:"".concat(C,"_").concat(n,"-relation-input"),className:d("xh-linkman-main-input-main-input",{placeholder:!e.relationValue,tt:"tt"===process.env.TARO_ENV})},e.relationType||"选择与联系人关系"),I[n].relationType&&t.createElement(p,{className:"xh-linkman-main-input-main-err"},I[n].relationType)),t.createElement(p,{className:"xh-linkman-main-input-arrow"})))))})))})),qn={success:"https://s.xh1.cn/resources/images/public/success.png",empty:"https://s.xh1.cn/resources/images/public/empty.png",fail:"https://s.xh1.cn/resources/images/public/failure.png",networkErr:"https://s.xh1.cn/resources/images/public/error.png",wait:"https://s.xh1.cn/resources/images/public/ing.png",submitted:"https://s.xh1.cn/resources/images/public/success-info.png",faceEmpty:"https://s.xh1.cn/resources/images/public/faceEmpty.png"},Un=function(e){var n=e.className,r=e.status,a=e.title,o=e.desc,c=e.slot,i=e.action,l=e.onAction,s=e.full,u=d("xh-result",n,{full:void 0===s||s});return t.createElement(p,{className:u},"h5"===process.env.TARO_ENV?t.createElement("img",{src:qn[r],alt:"",className:"xh-result-status"}):t.createElement(v,{src:qn[r],className:"xh-result-status"}),t.createElement(p,{className:"xh-result-title"},a),t.createElement(p,{className:"xh-result-desc"},o),t.createElement(p,{className:"xh-result-slot"},c),i&&t.createElement(p,{className:d("xh-result-action",{hasSlot:c})},t.createElement(z,{onClick:function(){null==l||l()},hollow:!0,size:"full"},i)))},Gn=function(e){var n=e.percent,r=void 0===n?88:n,a=e.className,o=e.doneColor,c=void 0===o?"#DDD":o,i=e.backgroundColor,l=void 0===i?"rgba(0,0,0, 0.25)":i,s=e.maskColor,u=void 0===s?"#FFF":s,m=e.size,f=e.style,h=e.text,v=d("xh-progress-circle",a),y=m?{width:U(m),height:U(m)}:{},g=100===r,E=R(R(R({},y),{"--percent":"".concat(r/100,"turn"),"--doneColor":c,"--backgroundColor":l,"--maskContent":"percent","--maskColor":u}),f);return t.createElement(p,{className:v,style:E},h?t.createElement(p,{className:"xh-progress-circle-text"},h):g?t.createElement(p,{className:"xh-progress-circle-done"}):null)},Kn=["京","津","冀","晋","蒙","辽","吉","黑","沪","苏","浙","皖","闽","赣","鲁","豫","鄂","湘","粤","桂","琼","渝","川","贵","云","藏","陕","甘","青","宁","新","港","澳","台","使"],Zn=["1","2","3","4","5","6","7","8","9","0"],Jn=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z"],Qn=["港","澳","学","领"],er=["临","澳","学","领"],tr=function(e){var c=e.onBlur,i=e.show,l=e.showClose,s=void 0===l||l,u=e.closeOnClickSpace,m=void 0===u||u,h=e.onClose,v=e.onChange,y=e.value,g=e.closeText,E=void 0===g?"完成":g,b=e.onDelete,x=e.className,N=e.activeIndex,k=e.dataTrackId,C=void 0===k?"LicensePlate_Keyboard":k,T=M(n(y),2),w=T[0],S=T[1],O=o((function(){return 0===N?Kn:6===N?F(F(F([],M(Zn),!1),M(Jn),!1),M(Qn),!1):7===N?F(F(F([],M(Zn),!1),M(Jn),!1),M(er),!1):F(F([],M(Zn),!1),M(Jn),!1)}),[N]),I=o((function(){return 0===N?"选择省份":1===N?"选择字母":"选择数字或字母"}),[N]),A=o((function(){return 0===N?"province":1===N?"letter":"mixed"}),[N]);function _(e){e.stopPropagation(),h&&h(e),c&&c(e)}function P(e){if(e!==y[N]){process.env.TARO_ENV;var t=w;t=N<w.length?ne(w,N,e):w+e,S(t),v&&v(t)}}r((function(){return m&&document.addEventListener("click",_),function(){document.removeEventListener("click",_)}}),[]),r((function(){S(y)}),[y]);var R=function(){b()},V=d("xh-license-keyboard",x),j=a(null);return t.createElement(ht,{nodeRef:j,classNames:"slide-up",in:i,unmountOnExit:!0,timeout:200},t.createElement(p,{className:V},t.createElement(p,{className:"xh-license-keyboard-header"},t.createElement(p,{className:"xh-license-keyboard-header-title"},I),t.createElement(p,{className:"xh-license-keyboard-header-delete"}),s&&t.createElement(p,{className:"xh-license-keyboard-header-close",dataTrackId:"".concat(C,"_dataTrackId_close"),onClick:_},E)),t.createElement(p,{className:"xh-license-keyboard-body"},O.map((function(e,n){return t.createElement(p,{key:n,className:d("xh-license-keyboard-body-key")},"h5"===process.env.TARO_ENV?t.createElement("button",{className:d("xh-license-keyboard-body-key-item",process.env.TARO_ENV),dataTrackId:"".concat(C,"_Keyboard_").concat(e),disabled:"letter"===A&&n<10,onClick:function(t){t.stopPropagation(),P(e)}},e):t.createElement(f,{className:d("xh-license-keyboard-body-key-item",process.env.TARO_ENV),disabled:"letter"===A&&n<10,dataTrackId:"".concat(C,"_Keyboard_").concat(e),onClick:function(t){t.stopPropagation(),"letter"===A&&n<10||P(e)}},e))})),t.createElement(p,{className:d("xh-license-keyboard-body-key","delete")},"h5"===process.env.TARO_ENV?t.createElement("button",{className:d("xh-license-keyboard-body-key-item",process.env.TARO_ENV,"delete"),disabled:0===N,dataTrackId:"".concat(C,"_Keyboard_delete"),onClick:function(e){e.stopPropagation(),R()}}):t.createElement(f,{className:d("xh-license-keyboard-body-key-item",process.env.TARO_ENV,"delete"),disabled:0===N,dataTrackId:"".concat(C,"_Keyboard_delete"),onClick:function(e){e.stopPropagation(),0!==y.length&&R()}})))))},nr=c((function(e,o){var c=e.value,l=void 0===c?"":c,s=e.onChange,u=e.className,m=e.showKeyboard,f=void 0!==m&&m,h=e.padding,v=void 0!==h&&h,y=e.border,g=void 0!==y&&y;e.onFinish;var E=e.autoScroll,b=void 0===E||E,x=e.label,N=e.dataTrackId,k=void 0===N?"LicensePlateInput":N,C=V(e,["value","onChange","className","showKeyboard","padding","border","onFinish","autoScroll","label","dataTrackId"]),T=M(n(l.length),2),w=T[0],S=T[1],O=M(n(f),2),I=O[0],A=O[1],_=a(null);i(o,(function(){return{isValid:(e=l,7===e.length?/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/.test(e):8===e.length&&/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/.test(e))};var e}),[l]);r((function(){I&&_.current&&b&&"h5"===process.env.TARO_ENV&&_.current.scrollIntoView({behavior:"smooth"})}),[I,b]);var P=d("xh-licensePlate",u,{padding:v},{border:g});return t.createElement(p,{className:P,dataTrackId:k},x&&t.createElement("label",{className:"xh-licensePlate-label"},x),t.createElement(p,{className:"xh-licensePlate-input",onClick:function(e){e.stopPropagation(),A(!0)},dataTrackId:"".concat(k,"-input"),ref:_},function(){for(var e=[],n=function(n){var r=l[n];e.push(t.createElement(p,{key:n,className:d("xh-licensePlate-input-item",{active:w===n,showNew:7===n&&8!==l.length}),dataTrackId:"".concat(k,"-input-item-").concat(n),onClick:function(){return function(e){e>l.length-1||S(e)}(n)}},"O"===r?"":r))},r=0;r<8;r++)n(r);return e}()),t.createElement(tr,R({activeIndex:w,dataTrackId:k,show:I,value:l,onChange:function(e){S((function(t){return e.replace(/O/g,"").length>=8?t:t+1})),s(e)},onDelete:function(){var e=l[w+1],t=ne(l,w,e?"O":"");0!==t.length&&S((function(e){return e-1})),s(t)},onClose:function(){A(!1)}},C)))})),rr=function(e){var o=e.expireDate,c=e.overTimeCb,i=e.customStyle,l=void 0!==i&&i,s=e.isPause,u=void 0!==s&&s,m=e.onTimeChange,d=M(n(""),2),f=d[0],h=d[1],v=M(n(""),2),y=v[0],g=v[1],E=M(n(""),2),b=E[0],x=E[1],N=M(n(!1),2),k=N[0],C=N[1],T=a(null),w=0;return r((function(){return clearInterval(T.current),o&&!u&&(T.current=setInterval((function(){!function(){var e,t,n,r=new Date(o).getTime()-Date.now();if(m&&m(r),(w=Math.floor(r/1e3))<=0)return C(!1),clearInterval(T.current),void(null==c||c());C(!0),x(n=(n=w%60)<10?"0"+n:n),t=Math.floor(w/60%60),g(t=t<10?"0"+t:t),e=Math.floor(w/60/60),h(e=e<10?"0"+e:e)}()}),1e3)),function(){clearInterval(T.current)}}),[o,u]),t.createElement(t.Fragment,null,k&&(l?t.createElement(t.Fragment,null,f,":",y,":",b):t.createElement(p,{className:"xh-countdown"},t.createElement(p,{className:"xh-countdown-time"},f),t.createElement(p,{className:"xh-countdown-dot"},":"),t.createElement(p,{className:"xh-countdown-time"},y),t.createElement(p,{className:"xh-countdown-dot"},":"),t.createElement(p,{className:"xh-countdown-time"},b))))},ar=function(e){var r=e.option,a=e.onChange,o=e.defaultValue,c=void 0===o?"":o,i=e.label,l=e.fill,s=void 0!==l&&l,u=e.className,m=e.style,f=e.border,h=void 0===f||f,v=e.paddingHorizontal,y=void 0===v||v,g=e.dataTrackId,E=M(n("string"==typeof c?c:c.value),2),b=E[0],x=E[1];return t.createElement(p,{dataTrackId:g,className:d("xh-checkbox-button",u,{border:h,paddingHorizontal:y}),style:m},i&&t.createElement(p,{className:"xh-checkbox-button-label"},i),t.createElement(p,{className:"xh-checkbox-button-options"},r.map((function(e,n){return t.createElement(p,{key:n,dataTrackId:g+"-"+n,className:d("xh-checkbox-button-options-item",{active:"string"==typeof e?e===b:e.value===b,fill:s}),onClick:function(){!function(e){x("string"==typeof e?e:e.value),a(e)}(e)}},t.createElement("p",{className:"xh-checkbox-button-options-item-label"},"string"==typeof e?e:e.label))}))))},or=function(e){var c=e.content,i=e.internal,l=void 0===i?3e3:i,s=e.duration,u=void 0===s?500:s,m=e.icon,f=void 0!==m&&m,h=e.itemHeight,v=void 0===h?72:h,y=e.className,g=o((function(){return c.length>0?F(F([],M(c),!1),[c[0]],!1):[]}),[c]),E=a(null),b=a(null),x=M(n(0),2),N=x[0],k=x[1],C=M(n(u),2),T=C[0],S=C[1];r((function(){if(!(g.length<=1))return E.current&&clearInterval(E.current),E.current=setInterval((function(){k((function(e){return e+1}))}),l),function(){E.current&&clearInterval(E.current),b.current&&clearTimeout(b.current)}}),[g.length,l]),r((function(){if(!(g.length<=1))return N===g.length-1&&0!==T?b.current=setTimeout((function(){S(0),k(0)}),u):0===N&&0===T&&(b.current=setTimeout((function(){S(u)}),50)),function(){b.current&&clearTimeout(b.current)}}),[N,g.length,u,T]);var O=d("xh-notice",y);return t.createElement(p,{className:O},"boolean"==typeof f&&f?t.createElement(wn,{icon:"notice",color:"#7384F6",size:32}):f,t.createElement("div",{className:"xh-notice-main",style:{transform:"translateY(".concat(w(-N*v),")"),transitionDuration:"".concat(T,"ms"),transitionTimingFunction:"ease-in-out"}},g.map((function(e,n){return t.createElement(p,{className:"xh-notice-main-marquee",key:n},e)}))))},cr=c((function(e,n){var r=e.showScan,o=void 0!==r&&r,c=e.label,l=e.value,s=e.bankName,u=e.readOnly,m=e.direction,f=void 0===m?"column":m,h=e.onScan,v=e.placeholder,y=void 0===v?"请输入银行卡号":v,g=e.onError,E=e.onChange,b=e.maxlength,x=void 0===b?23:b,N=e.slot,k=e.className,C=e.border,T=e.onBlur,w=function(e){var t=e.replace(/\s/g,"");return!(t.length<16||t.length>19)&&function(e){if(!e)return!1;for(var t=!0,n=0,r=e.length;r>0;r--){var a=+e.substring(r,r-1);(t=!t)&&(a*=2);var o=a%10;n+=o+(a-o)/10}return n%10==0}(t)},S=a(null);return i(n,(function(){return{isValid:w(l),focus:function(){var e;null===(e=null==S?void 0:S.current)||void 0===e||e.focus()}}}),[l]),t.createElement(p,{className:d("xh-bankcard-number-input",k)},t.createElement(ce,{padding:!0,ref:S,RightComponent:o&&t.createElement(p,{onClick:function(){null==h||h()},className:"xh-bankcard-number-input-scan"}),direction:f,label:c,mainExtra:"row"!==f&&t.createElement(p,{className:"xh-bankcard-number-input-name"},s),maxlength:x,placeholder:y,readonly:u,type:"tel",border:C,value:K(l),onBlur:function(e){null==T||T(),w(e)||null==g||g(""===e?"银行卡号不能为空":"银行卡号格式不正确")},onChange:function(e){var t=K(e);null==E||E(t)}}),N&&t.createElement(p,{className:"xh-bankcard-number-input-slot"},N))})),ir=c((function(e,n){var r=e.showScan,a=void 0!==r&&r,o=e.label,c=e.value,l=e.readOnly,s=e.direction,u=void 0===s?"column":s,m=e.onScan,f=e.placeholder,h=void 0===f?"请输入身份证":f,v=e.onError,y=e.onChange,g=e.maxlength,E=void 0===g?23:g,b=e.slot,x=e.className,N=e.border,k=e.onBlur,C=e.dataTrackId,T=void 0===C?"xh-idnumber":C;return i(n,(function(){return{isValid:Z(c.replace(/\s/g,"")),focus:function(){var e;"object"==typeof n&&(null===(e=null==n?void 0:n.current)||void 0===e||e.focus())}}})),t.createElement(p,{className:d("xh-idnumber-input",x)},t.createElement(ce,{dataTrackId:T,padding:!0,ref:n,RightComponent:a&&t.createElement(p,{onClick:function(){null==m||m()},className:"xh-idnumber-input-scan"}),border:N,direction:u,label:o,maxlength:E,placeholder:h,readonly:l,type:"weapp"===process.env.TARO_ENV?"idcard":"text",value:c.replace(/\s/g,""),onBlur:function(e){null==k||k(),Z(e)||null==v||v(""===e?"身份证号不能为空":"请输入正确的身份证号")},onChange:function(e){var t=e.replace(/\s/g,"");null==y||y(t)}}),b&&t.createElement(p,{className:"xh-idnumber-input-slot",dataTrackId:"".concat(T,"-slot")},b))}));function lr(e,t){var n,o=(n=a(!0)).current?(n.current=!1,!0):n.current;r((function(){if(!o)return e()}),t)}var sr=function(){function e(e,t,n){this.ctx=e,this.chart=null,t?this.canvasNode=n:this._initStyle(e),this._initEvent()}return e.prototype.getContext=function(e){if("2d"===e)return this.ctx},e.prototype.setChart=function(e){this.chart=e},e.prototype.attachEvent=function(){},e.prototype.addEventListener=function(){},e.prototype.removeEventListener=function(){},e.prototype.detachEvent=function(){},e.prototype._initCanvas=function(e,t){e.util.getContext=function(){return t},e.util.$override("measureText",(function(e,n){return t.font=n||"12px sans-serif",t.measureText(e)}))},e.prototype._initStyle=function(e){["fillStyle","strokeStyle","globalAlpha","textAlign","textBaseAlign","shadow","lineWidth","lineCap","lineJoin","lineDash","miterLimit","fontSize"].forEach((function(t){Object.defineProperty(e,t,{set:function(n){("fillStyle"!==t&&"strokeStyle"!==t||"none"!==n&&null!==n)&&e["set"+t.charAt(0).toUpperCase()+t.slice(1)](n)}})})),e.createRadialGradient=function(){return e.createCircularGradient.apply(e,arguments)}},e.prototype._initEvent=function(){var e=this;this.event={};[{wxName:"touchStart",ecName:"mousedown"},{wxName:"touchMove",ecName:"mousemove"},{wxName:"touchEnd",ecName:"mouseup"},{wxName:"touchEnd",ecName:"click"}].forEach((function(t){e.event[t.wxName]=function(n){var r,a,o=n.touches[0];e.chart&&(null===(a=null===(r=e.chart.getZr())||void 0===r?void 0:r.handler)||void 0===a||a.dispatch(t.ecName,{zrX:"tap"===t.wxName?o.clientX:o.x,zrY:"tap"===t.wxName?o.clientY:o.y}))}}))},Object.defineProperty(e.prototype,"width",{get:function(){return this.canvasNode?this.canvasNode.width:0},set:function(e){this.canvasNode&&(this.canvasNode.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.canvasNode?this.canvasNode.height:0},set:function(e){this.canvasNode&&(this.canvasNode.height=e)},enumerable:!1,configurable:!0}),e}();function ur(e){for(var t=0;t<e.touches.length;++t){var n=e.touches[t];n.offsetX=n.x,n.offsetY=n.y}return e}var mr=m(c((function(e,c){var l,s=e.echarts,u=e.isPage,m=void 0===u||u,d=e.canvasId,f=V(e,["echarts","isPage","canvasId"]),h=a(),v=a(),y=M(n(!0),2),b=y[0],x=y[1],N=function(e){var t=a();return r((function(){t.current=e})),t.current}(f),k=o((function(){return d||function(e){void 0===e&&(e="$unique$"),te[e]||(te[e]=0);var t=++te[e];return"$unique$"===e?"".concat(t):"".concat(e).concat(t)}("canvas_")}),[d]),C=o((function(){return["disableScroll","disableScroll","onTouchCancel","onLongTap","onError","nativeProps","className","key","hidden","animation"]}),[]),T=o((function(){return R({width:"100%",height:"300px"},f.style)}),[f.style]);A((function(){E.getEnv()===E.ENV_TYPE.WEAPP&&m&&E.nextTick((function(){P()}))})),r((function(){var e;E.getEnv()!==E.ENV_TYPE.WEB&&m||(e=function(){E.nextTick((function(){P()}))},setTimeout((function(){return setTimeout((function(){return setTimeout((function(){return e()}))}))})))}),[]),l=function(){_()},r((function(){return l}),[]),lr((function(){if(!Q(null==N?void 0:N.theme,f.theme)||!Q(null==N?void 0:N.opts,f.opts)||!Q(null==N?void 0:N.onEvents,f.onEvents))return _(),void P();var e=["option","notMerge","lazyUpdate","showLoading","loadingOption"];Q(ee(f,e),ee(N,e))||O(),Q(null==N?void 0:N.style,f.style)&&Q(null==N?void 0:N.className,f.className)||w(h.current)}),[f]);var w=function(e){var t=s.getInstanceByDom(e);if(!b)try{t.resize({width:"auto",height:"auto"})}catch(e){}x(!1)},S=function(e){var t=e.width,n=e.height,r=e.devicePixelRatio;return j(void 0,void 0,void 0,(function(){var e,a;return D(this,(function(o){return e=f.theme,a=f.opts,[2,new Promise((function(o,c){h.current?(v.current=s.init(h.current,e,R({width:t,height:n,devicePixelRatio:r},a)),E.getEnv()===E.ENV_TYPE.WEB?s.getInstanceByDom(h.current).on("finished",(function(){s.dispose(h.current);var c=R({width:t,height:n,devicePixelRatio:r},a);v.current=s.init(h.current,e,c),o(v.current)})):o(v.current)):c()}))]}))}))},O=function(){var e=f.option,t=f.notMerge,n=void 0===t||t,r=f.lazyUpdate,a=void 0!==r&&r,o=f.showLoading,c=f.loadingOption,i=void 0===c?null:c,l=s.getInstanceByDom(h.current);return l&&(l.setOption(e,n,a),o?l.showLoading(i):l.hideLoading()),l},I=function(e){var t=e.width,n=e.height,r=e.devicePixelRatio;return j(void 0,void 0,void 0,(function(){var e,a,o;return D(this,(function(c){switch(c.label){case 0:return e=f.onEvents,a=f.onChartReady,[4,S({width:t,height:n,devicePixelRatio:r})];case 1:return c.sent(),function(e,t){function n(t,n){(function(e){return"string"==typeof e})(t)&&J(n)&&e.on(t,(function(t){n(t,e)}))}for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n(r,t[r])}(o=O(),e||{}),J(a)&&(null==a||a(o)),h.current&&w(h.current),[2]}}))}))},_=function(){v.current&&(null==s||s.dispose(v.current))},P=function(){var e,t,n,r;if(E.getEnv()===E.ENV_TYPE.WEB&&h.current){var a=(null===(e=f.style)||void 0===e?void 0:e.width)||(null===(t=h.current)||void 0===t?void 0:t.clientWidth)||window.innerWidth,o=(null===(n=f.style)||void 0===n?void 0:n.height)||(null===(r=h.current)||void 0===r?void 0:r.clientHeight)||300;I({width:a,height:o,devicePixelRatio:window.devicePixelRatio})}else{(function(e,t){for(var n=e.split("."),r=t.split("."),a=Math.max(n.length,r.length);n.length<a;)n.push("0");for(;r.length<a;)r.push("0");for(var o=0;o<a;o++){var c=parseInt(n[o]),i=parseInt(r[o]);if(c>i)return 1;if(c<i)return-1}return 0})(E.getSystemInfoSync().SDKVersion||"","2.9.0")>=0&&E.createSelectorQuery().select("#".concat(k)).fields({node:!0,size:!0}).exec((function(e){var t=M(e,1)[0];if(t){var n=t||{},r=n.node,a=n.width,o=n.height,c=r,i=E.getSystemInfoSync().pixelRatio,l=c.getContext("2d"),u=new sr(l,!0,c);null==s||s.setCanvasCreator((function(){return u})),h.current=u,I({width:a,height:o,devicePixelRatio:i})}}))}};i(c,(function(){return{chartRef:v,canvasRef:h}}));var F=o((function(){return E.getEnv()===E.ENV_TYPE.WEAPP?t.createElement(g,R({ref:h,canvasId:k,id:k,style:T,type:"2d",onTouchEnd:function(e){return function(e){var t,n=e.chart,r=e.event;if(n){var a=r.changedTouches?r.changedTouches[0]:{},o=null===(t=n.getZr())||void 0===t?void 0:t.handler;null==o||o.dispatch("mouseup",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.dispatch("click",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.processGesture(ur(r),"end")}}({chart:v.current,event:e})},onTouchMove:function(e){return function(e){var t,n=e.chart,r=e.event;if(n&&r.touches.length>0){var a=r.touches[0],o=null===(t=n.getZr())||void 0===t?void 0:t.handler;null==o||o.dispatch("mousedown",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.dispatch("mousemove",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.processGesture(ur(r),"start")}}({chart:v.current,event:e})},onTouchStart:function(e){return function(e){var t,n=e.chart,r=e.event;if(n&&r.touches.length>0){var a=r.touches[0],o=null===(t=n.getZr())||void 0===t?void 0:t.handler;null==o||o.dispatch("mousedown",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.dispatch("mousemove",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.processGesture(ur(r),"start")}}({chart:v.current,event:e})}},ee(f,C))):t.createElement(p,{className:"xh-echarts",ref:h,id:k,style:T})}),[f,C,k]);return F})));export{Cn as ThemeProvider,Mn as XHActionSheet,Bn as XHActivityIndicator,Pn as XHAmountInput,jn as XHAmountKeyboard,_n as XHBadge,cr as XHBankCardNumberInput,ae as XHBankIcon,z as XHButton,oe as XHCaptcha,Ln as XHCell,Sn as XHCheckbox,ar as XHCheckboxButton,Dn as XHCollapse,rr as XHCountdown,yt as XHDialog,kt as XHDialogRef,mr as XHEcharts,ce as XHFormInput,ir as XHIDNumberInput,wn as XHIcon,re as XHImage,nr as XHLicensePlateInput,Yn as XHLinkMan,ie as XHList,$ as XHLoading,H as XHMask,W as XHNavBar,or as XHNotice,gt as XHNumberKeyboard,Y as XHPage,Et as XHPasswordInput,Vt as XHPicker,_t as XHPopup,bt as XHProgress,Gn as XHProgressCircle,On as XHRadio,Fn as XHRank,Un as XHResult,Bt as XHSpace,An as XHStep,zn as XHSwitch,wt as XHTabbar,Nt as XHToast};
179
+ function pn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=zt({},on,e);function n(e,n,r,a){!t.silent&&window.console,t.onError(e,n,r,a)}function r(e){!t.silent&&window.console,t.onWarning(e)}function a(e){t.onFinally(Boolean(e),rn,xn()-t.__benchmark)}if(nn){if(t.watch)return t.watch=on.watch,hn(t),void pn(t);if(!1===t.watch&&un&&(un.disconnect(),un=null),!t.__benchmark){if(sn===t.rootElement)return void vn(e);var o=[].slice.call(t.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])'));if(t.__benchmark=xn(),t.exclude=[un?'[data-cssvars]:not([data-cssvars=""])':'[data-cssvars="out"]',"link[disabled]:not([data-cssvars])",t.exclude].filter((function(e){return e})).join(","),t.variables=En(t.variables),o.forEach((function(e){var t="style"===e.nodeName.toLowerCase()&&e.__cssVars.text,n=t&&e.textContent!==e.__cssVars.text;t&&n&&(e.sheet&&(e.sheet.disabled=!1),e.setAttribute("data-cssvars",""))})),!un){var c=[].slice.call(t.rootElement.querySelectorAll('[data-cssvars="out"]'));c.forEach((function(e){var n=e.getAttribute("data-cssvars-group");(n?t.rootElement.querySelector('[data-cssvars="src"][data-cssvars-group="'.concat(n,'"]')):null)||e.parentNode.removeChild(e)})),mn&&o.length<mn&&(mn=o.length,ln.dom={})}}if("loading"!==document.readyState)if(rn&&t.onlyLegacy){var i=!1;if(t.updateDOM){var l=t.rootElement.host||(t.rootElement===document?document.documentElement:t.rootElement);Object.keys(t.variables).forEach((function(e){var n=t.variables[e];i=i||n!==getComputedStyle(l).getPropertyValue(e),l.style.setProperty(e,n)}))}a(i)}else!fn&&(t.shadowDOM||t.rootElement.shadowRoot||t.rootElement.host)?$t({rootElement:on.rootElement,include:on.include,exclude:t.exclude,skipDisabled:!1,onSuccess:function(e,t,n){return!((t.sheet||{}).disabled&&!t.__cssVars)&&((e=((e=e.replace(cn.cssComments,"").replace(cn.cssMediaQueries,"")).match(cn.cssVarDeclRules)||[]).join(""))||!1)},onComplete:function(e,n,a){Kt(e,{store:ln.dom,onWarning:r}),fn=!0,pn(t)}}):(sn=t.rootElement,$t({rootElement:t.rootElement,include:t.include,exclude:t.exclude,skipDisabled:!1,onBeforeSend:t.onBeforeSend,onError:function(e,t,r){var a=e.responseURL||bn(r,location.href),o=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");n("CSS XHR Error: ".concat(a," ").concat(e.status," ").concat(o),t,e,a)},onSuccess:function(e,n,r){if((n.sheet||{}).disabled&&!n.__cssVars)return!1;var a="link"===n.nodeName.toLowerCase(),o="style"===n.nodeName.toLowerCase()&&e!==n.textContent,c=t.onSuccess(e,n,r);return e=void 0!==c&&!1===Boolean(c)?"":c||e,t.updateURLs&&(a||o)&&(e=gn(e,r)),e},onComplete:function(e,o){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=zt({},ln.dom,ln.user);if(ln.job={},c.forEach((function(e,a){var c=o[a];if(e.__cssVars=e.__cssVars||{},e.__cssVars.text=c,cn.cssVars.test(c))try{var i=Gt(c,{preserveStatic:t.preserveStatic,removeComments:!0});Kt(i,{parseHost:Boolean(t.rootElement.host),store:ln.dom,onWarning:r}),e.__cssVars.tree=i}catch(t){n(t.message,e)}})),zt(ln.job,ln.dom),t.updateDOM?(zt(ln.user,t.variables),zt(ln.job,ln.user)):(zt(ln.job,ln.user,t.variables),zt(i,t.variables)),an.job>0&&Boolean(Object.keys(ln.job).length>Object.keys(i).length||Boolean(Object.keys(i).length&&Object.keys(ln.job).some((function(e){return ln.job[e]!==i[e]})))))Nn(t.rootElement),pn(t);else{var l=[],s=[],u=!1;if(t.updateDOM&&an.job++,c.forEach((function(e,a){var c=!e.__cssVars.tree;if(e.__cssVars.tree)try{Qt(e.__cssVars.tree,zt({},t,{variables:ln.job,onWarning:r}));var i=Zt(e.__cssVars.tree);if(t.updateDOM){var m=o[a],d=cn.cssVarFunc.test(m);if(e.getAttribute("data-cssvars")||e.setAttribute("data-cssvars","src"),i.length&&d){var f=e.getAttribute("data-cssvars-group")||++an.group,p=i.replace(/\s/g,""),h=t.rootElement.querySelector('[data-cssvars="out"][data-cssvars-group="'.concat(f,'"]'))||document.createElement("style");u=u||cn.cssKeyframes.test(i),t.preserveStatic&&e.sheet&&(e.sheet.disabled=!0),h.hasAttribute("data-cssvars")||h.setAttribute("data-cssvars","out"),p===e.textContent.replace(/\s/g,"")?(c=!0,h&&h.parentNode&&(e.removeAttribute("data-cssvars-group"),h.parentNode.removeChild(h))):p!==h.textContent.replace(/\s/g,"")&&([e,h].forEach((function(e){e.setAttribute("data-cssvars-job",an.job),e.setAttribute("data-cssvars-group",f)})),h.textContent=i,l.push(i),s.push(h),h.parentNode||e.parentNode.insertBefore(h,e.nextSibling))}}else e.textContent.replace(/\s/g,"")!==i&&l.push(i)}catch(t){n(t.message,e)}c&&e.setAttribute("data-cssvars","skip"),e.hasAttribute("data-cssvars-job")||e.setAttribute("data-cssvars-job",an.job)})),mn=t.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])').length,t.shadowDOM)for(var m,d=[].concat(t.rootElement).concat([].slice.call(t.rootElement.querySelectorAll("*"))),f=0;m=d[f];++f)if(m.shadowRoot&&m.shadowRoot.querySelector("style")){var p=zt({},t,{rootElement:m.shadowRoot});pn(p)}t.updateDOM&&u&&yn(t.rootElement),sn=!1,t.onComplete(l.join(""),s,JSON.parse(JSON.stringify(ln.job)),xn()-t.__benchmark),a(s.length)}}}));else document.addEventListener("DOMContentLoaded",(function t(n){pn(e),document.removeEventListener("DOMContentLoaded",t)}))}}function hn(e){function t(e){var t=n(e)&&e.hasAttribute("disabled"),r=(e.sheet||{}).disabled;return t||r}function n(e){return"link"===e.nodeName.toLowerCase()&&-1!==(e.getAttribute("rel")||"").indexOf("stylesheet")}function r(e){return"style"===e.nodeName.toLowerCase()}window.MutationObserver&&(un&&(un.disconnect(),un=null),(un=new MutationObserver((function(a){a.some((function(a){return function(r){var a=!1;if("attributes"===r.type&&n(r.target)&&!t(r.target)){var o="disabled"===r.attributeName,c="href"===r.attributeName,i="skip"===r.target.getAttribute("data-cssvars"),l="src"===r.target.getAttribute("data-cssvars");o?a=!i&&!l:c&&(i?r.target.setAttribute("data-cssvars",""):l&&Nn(e.rootElement,!0),a=!0)}return a}(a)||function(e){var t=!1;if("childList"===e.type){var n=r(e.target),a="out"===e.target.getAttribute("data-cssvars");t=n&&!a}return t}(a)||function(e){var a=!1;return"childList"===e.type&&(a=[].slice.call(e.addedNodes).some((function(e){var a=1===e.nodeType&&e.hasAttribute("data-cssvars"),o=r(e)&&cn.cssVars.test(e.textContent);return!a&&(n(e)||o)&&!t(e)}))),a}(a)||function(t){var n=!1;return"childList"===t.type&&(n=[].slice.call(t.removedNodes).some((function(t){var n=1===t.nodeType,r=n&&"out"===t.getAttribute("data-cssvars"),a=n&&"src"===t.getAttribute("data-cssvars"),o=a;if(a||r){var c=t.getAttribute("data-cssvars-group"),i=e.rootElement.querySelector('[data-cssvars-group="'.concat(c,'"]'));a&&Nn(e.rootElement,!0),i&&i.parentNode.removeChild(i)}return o}))),n}(a)}))&&pn(e)}))).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0}))}function vn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;clearTimeout(dn),dn=setTimeout((function(){e.__benchmark=null,pn(e)}),t)}function yn(e){var t=["animation-name","-moz-animation-name","-webkit-animation-name"].filter((function(e){return getComputedStyle(document.body)[e]}))[0];if(t){for(var n=[].slice.call(e.querySelectorAll("*")),r=[],a="__CSSVARSPONYFILL-KEYFRAMES__",o=0,c=n.length;o<c;o++){var i=n[o];"none"!==getComputedStyle(i)[t]&&(i.style[t]+=a,r.push(i))}document.body.offsetHeight;for(var l=0,s=r.length;l<s;l++){var u=r[l].style;u[t]=u[t].replace(a,"")}}}function gn(e,t){return(e.replace(cn.cssComments,"").match(cn.cssUrls)||[]).forEach((function(n){var r=n.replace(cn.cssUrls,"$1"),a=bn(r,t);e=e.replace(n,n.replace(r,a))})),e}function En(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=/^-{2}/;return Object.keys(e).reduce((function(n,r){return n[t.test(r)?r:"--".concat(r.replace(/^-+/,""))]=e[r],n}),{})}function bn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,n=document.implementation.createHTMLDocument(""),r=n.createElement("base"),a=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(a),r.href=t,a.href=e,a.href}function xn(){return nn&&(window.performance||{}).now?window.performance.now():(new Date).getTime()}function Nn(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[].slice.call(e.querySelectorAll('[data-cssvars="skip"],[data-cssvars="src"]'));n.forEach((function(e){return e.setAttribute("data-cssvars","")})),t&&(ln.dom={})}pn.reset=function(){for(var e in an.job=0,an.group=0,sn=!1,un&&(un.disconnect(),un=null),mn=0,dn=null,fn=!1,ln)ln[e]={}};var kn=s(R({},{})),Cn=function(e){var n=e.children,r=e.value,a=e.scoped,o=n;return void 0!==a&&a?o=t.Children.map(n,(function(e,n){return 0===n?t.cloneElement(e,{style:r}):e})):Object.keys(r).forEach((function(e){document.body.style.setProperty(e,r[e])})),pn({variables:r}),t.createElement(kn.Provider,{value:r},o)};function Tn(e,t){var a=M(n(e),2),o=a[0],c=a[1];return r((function(){c("".concat(t).concat((1e3*Math.random()).toString().replace(".","").slice(0,20)))}),[]),o}var wn=function(e){var n=e.icon,r=void 0===n?"":n,a=e.size,o=void 0===a?0:a,c=e.className,i=e.color,l=e.style,s=V(e,["icon","size","className","color","style"]),u=r&&"xh-icon-".concat(r),m=d("xh-icon",u,c),f=R(R(R({},l),o>0?{fontSize:U(o)}:{}),{color:i});return t.createElement("span",R({className:m},{style:f},{"data-track-id":e.dataTrackId},s))},Sn=function(e){var a=e.className,o=e.name,c=e.label,i=e.id,l=e.circle,s=e.onChange,u=e.align,m=e.direction,f=e.justify,h=e.checked,v=void 0!==h&&h,y=e.disabled,g=e.value,E=void 0===g?"":g,b=e.style,x=e.size,N=void 0===x?0:x,k=e.iconColor,C=void 0===k?"#FFFFFF":k,T=e.dataTrackId,w=void 0===T?"Checkbox":T,S=Tn(i,"xh-checkbox-id"),O=M(n(!1),2),I=O[0],A=O[1];r((function(){A(v)}),[v]);var _=d("xh-checkbox",a,u,m,f,{h5:"h5"===process.env.TARO_ENV});return"h5"!==process.env.TARO_ENV?t.createElement(p,{onClick:function(){y||(A(!I),null==s||s(!I,E))},className:_,style:b,dataTrackId:w},t.createElement(p,{className:d("xh-checkbox-input",{checked:I,disabled:y})}," "),t.createElement("span",{style:N>0?{width:U(N),height:U(N)}:{},dataTrackId:"".concat(w,"-fake"),className:d("xh-checkbox-input-fake",l&&"circle")},t.createElement(wn,{icon:"duigou",className:"xh-checkbox-input-fake-icon",color:C,size:N?.55*N:18})),t.createElement("span",{className:"xh-radio-label",dataTrackId:"".concat(w,"-label")},c)):t.createElement("label",{htmlFor:S,className:_,style:b,"data-track-id":w},t.createElement("input",{type:"checkbox",id:S,name:o,className:"xh-checkbox-input",onChange:function(e){var t=v||!1,n="";"h5"===process.env.TARO_ENV?(t=e.target.checked,n=e.target.value):(t=e.detail.value.length>0,n=e.detail.value[0]),s&&s(t,n)},value:E,defaultChecked:v}),t.createElement("span",{style:N>0?{width:U(N),height:U(N)}:{},"data-track-id":"".concat(w,"-fake"),className:d("xh-checkbox-input-fake",l&&"circle")},t.createElement(wn,{icon:"duigou",className:"xh-checkbox-input-fake-icon",color:C,size:N?.55*N:18})),t.createElement("span",{className:"xh-checkbox-label","data-track-id":"".concat(w,"-label")},c))};Sn.Group=function(e){var n=e.option,r=e.onChange,a=e.defaultChecked,c=e.padding,i=e.border,l=e.style,s=e.checkboxStyle,u=V(e,["option","onChange","defaultChecked","padding","border","style","checkboxStyle"]),m=o((function(){return n.map((function(e){var t="string"==typeof a?[a]:a;return"string"==typeof e?{label:e,value:e,checked:null==t?void 0:t.includes(e)}:((null==t?void 0:t.includes(e.value))&&(e.checked=!0),e)}))}),[n,a]),f=d("xh-checkbox-group",{padding:c},{border:i});return t.createElement("div",{className:f,style:l},m.map((function(e,n){return t.createElement(Sn,R({label:e.label,value:e.value,disabled:e.disabled,checked:e.checked,key:n,style:s,onChange:function(e){return function(e,t){var n=F([],M(m),!1);n[t].checked=e;var a=n.filter((function(e){return e.checked})).map((function(e){return e.value}));null==r||r(a)}(e,n)}},u))})))};var On=function(e){var a=e.className,o=e.name,c=e.label,i=e.id,l=e.circle,s=void 0===l||l,u=e.onChange,m=e.align,f=e.direction,h=e.justify,v=e.checked,y=e.disabled,g=e.value,E=e.style,b=e.size,x=void 0===b?0:b,N=e.fancy,k=void 0!==N&&N,C=e.index,T=void 0===C?0:C,w=e.group,S=void 0!==w&&w,O=e.iconColor,A=void 0===O?"#FFFFFF":O,_=e.dataTrackId,P=Tn(i,"xh-radio-id"),R=M(n(v),2),V=R[0],j=R[1],D=function(e){"h5"!==process.env.TARO_ENV&&e!==T&&j(!1)};r((function(){return"h5"!==process.env.TARO_ENV&&I.on("radioChange",D),function(){I.off("radioChange",D)}}),[]);var F=d("xh-radio",a,m,f,h);return"h5"!==process.env.TARO_ENV?t.createElement(p,{dataTrackId:_,onClick:function(){V&&S||(j(!V),null==u||u(!V,g||""))},className:F,style:E},t.createElement(p,{className:d("xh-radio-input",{checked:V})}),t.createElement("span",{style:x>0?{width:U(x),height:U(x)}:{},className:d("xh-radio-input-fake",s&&"circle",{fancy:k})},t.createElement(wn,{icon:"duigou",className:"xh-radio-input-fake-icon",color:A,size:x?.55*x:18})),t.createElement("span",{className:"xh-radio-label"},c)):t.createElement("label",{htmlFor:P,className:F,"data-track-id":_,style:E},t.createElement("input",{type:"radio",id:P,name:o,className:"xh-radio-input",onChange:function(e){var t=v||!1,n="";"h5"===process.env.TARO_ENV?(t=e.target.checked,n=e.target.value):(t=e.detail.value,n=e.detail.value),null==u||u(t,n)},value:g,disabled:y,defaultChecked:v}),t.createElement("span",{style:x>0?{width:U(x),height:U(x)}:{},className:d("xh-radio-input-fake",{circle:s,fancy:k})},t.createElement(wn,{icon:"duigou",className:"xh-radio-input-fake-icon",color:A,size:x?.55*x:18})),t.createElement("span",{className:"xh-radio-label"},c))};On.Group=function(e){var a=e.option,c=e.onChange,i=e.name,l=e.padding,s=e.border,u=e.radioStyle,m=e.defaultChecked,f=e.inline,p=e.style,h=e.checkedClass,v=void 0===h?"":h,y=e.dataTrackId,g=void 0===y?"RadioGroup":y,E=V(e,["option","onChange","name","padding","border","radioStyle","defaultChecked","inline","style","checkedClass","dataTrackId"]),b=o((function(){return null==a?void 0:a.map((function(e){return"string"==typeof e?{label:e,value:e,checked:m===e}:(m===e.value&&(e.checked=!0),e)}))}),[a,m]),x=M(n(b),2),N=x[0],k=x[1];r((function(){k(b)}),[b]);var C=d("xh-radio-group",{padding:l},{border:s},{inline:f});return t.createElement("div",{className:C,style:p},b.map((function(e,n){var r;return t.createElement(On,R({dataTrackId:"".concat(g,"_option_").concat(n),label:e.label,value:e.value,disabled:e.disabled,name:i,key:n,className:d("xh-radio-group-list",(r={},r[v]=e.checked,r)),circle:!0,onChange:function(){return function(e){for(var t=F([],M(N),!1),n="",r=0;r<t.length;r++)r===e?(t[r].checked=!0,n=t[r].value):t[r].checked=!1;k(t),null==c||c(n),"h5"!==process.env.TARO_ENV&&I.trigger("radioChange",e)}(n)},checked:e.checked,style:u,index:n,group:!0},E))})))};var In=t.createElement("span",{className:"".concat("xh-step","-icon-dot")}),An=function(e){var n=e.title,r=e.description,a=e.icon,o=e.status,c=void 0===o?"wait":o,i=e.fancy,l=e.style,s=e.className,u=e.direction,m=e.prefix,f=e.dashed,h=e.dataTrackId;return t.createElement(p,{className:d("".concat("xh-step"),"".concat("xh-step","-status-").concat(c),s),"data-track-id":h,style:l},"vertical"===u&&m&&t.createElement(p,{className:"".concat("xh-step","-prefix")},m),t.createElement(p,{className:d("".concat("xh-step","-indicator"),{dashed:f})},t.createElement(p,{className:d("".concat("xh-step","-icon-container"),{fancy:i})},a)),t.createElement(p,{className:"".concat("xh-step","-content")},t.createElement(p,{className:"".concat("xh-step","-title")},n),!!r&&t.createElement(p,{className:"".concat("xh-step","-description")},r)))};An.Steps=function(e){var n=e.direction,r=void 0===n?"horizontal":n,a=e.current,o=void 0===a?0:a,c=e.style,i=e.className,l=e.dashed,s=void 0!==l&&l,u=d("xh-steps","".concat("xh-steps","-").concat(r),i);return t.createElement(p,{className:u,style:c},t.Children.map(e.children,(function(e,n){var a;if(!t.isValidElement(e))return e;var c=e.props,i=c.status||"wait";n<o?i=c.status||"finish":n===o&&(i=c.status||"process");var l=null!==(a=c.icon)&&void 0!==a?a:In;return t.cloneElement(e,{status:i,icon:l,direction:r,dashed:s})})))};var _n=function(e){var n=e.content,r=e.children,a=d("xh-badge",d);return t.createElement(p,{className:a},r||n)},Pn=function(e){var n=e.value,r=e.maxlength,a=void 0===r?n.length:r,o=e.onFocus,c=e.className,i=e.focus,l=void 0!==i&&i,s=e.shortcut,u=void 0===s?"借全部":s,m=e.step,f=void 0===m?100:m,h=e.errTip,v=void 0===h?"":h,y=e.onUpgrade,g=e.minAmount,E=e.maxAmount,b=e.showUpgrade,x=void 0!==b&&b,N=e.loanOnekey,k=void 0===N?function(){}:N,C=e.placeholder,T=void 0===C?"单笔".concat(g,"-").concat(E,"元,").concat(f,"的整数倍"):C,w=e.slot,S=e.showBottom,O=void 0===S||S,I=e.title,A=void 0!==I&&I,_=e.dataTrackId;var P=d("xh-amount-input",c);return t.createElement(p,{className:P},A&&t.createElement(p,{className:"xh-amount-input-title"},A),t.createElement(p,{className:"xh-amount-input-top"},t.createElement(p,{className:"xh-amount-input-top-unit"},"¥"),t.createElement(p,{className:"xh-amount-input-top-amount",onClick:function(e){e.stopPropagation(),o&&o(e)},dataTrackId:"".concat(_,"_amount")},t.createElement(p,{className:"xh-amount-input-top-amount-num"},t.createElement(p,{className:"xh-amount-input-top-amount-num-key"}," "),function(){var e=[""];if(""===n)return t.createElement(p,{className:"xh-amount-input-top-amount-num-placeholder"},T);for(var r=0;r<a;r++){var o=n[r];e.push(t.createElement(p,{key:r,className:"xh-amount-input-top-amount-num-key"},o))}return e}(),t.createElement(p,{className:d("xh-amount-input-top-amount-num-cursor",{focus:l})})),t.createElement(p,{className:"xh-amount-input-top-amount-shortcut",onClick:k,dataTrackId:"".concat(_,"_top_shortcut")},"string"==typeof u?t.createElement(p,{className:"xh-amount-input-top-amount-shortcut-text"},u):u)),v&&t.createElement(p,{className:"xh-amount-input-top-error"},v)),w&&t.createElement(p,{className:"xh-amount-input-slot"},w),O&&t.createElement(p,{className:"xh-amount-input-bottom"},t.createElement(p,{className:"xh-amount-input-bottom-range"},"单笔可借:",t.createElement(p,{className:"xh-amount-input-bottom-range-number"},g,"-",E,"元")),x&&t.createElement(p,{className:"xh-amount-input-bottom-tip"},t.createElement(t.Fragment,null,t.createElement(p,{className:"xh-amount-input-bottom-tip-update",dataTrackId:"".concat(_,"_bottom"),onClick:function(e){e.stopPropagation(),null==y||y()}},"额度不够?")))))},Rn=[{text:1,value:1,type:"number"},{text:2,value:2,type:"number"},{text:3,value:3,type:"number"},{text:"",value:"",type:"delete"},{text:4,value:4,type:"number"},{text:5,value:5,type:"number"},{text:6,value:6,type:"number"},{text:"",value:"",type:"none"},{text:7,value:7,type:"number"},{text:8,value:8,type:"number"},{text:9,value:9,type:"number"},{text:"",value:"",type:"none"},{text:"00",value:"00",type:"number"},{text:0,value:0,type:"number"},{text:"",value:"",type:"close"},{text:"",value:"",type:"none"}],Vn=[{text:1,value:1,type:"number"},{text:2,value:2,type:"number"},{text:3,value:3,type:"number"},{text:"",value:"",type:"delete"},{text:4,value:4,type:"number"},{text:5,value:5,type:"number"},{text:6,value:6,type:"number"},{text:"",value:"",type:"none"},{text:7,value:7,type:"number"},{text:8,value:8,type:"number"},{text:9,value:9,type:"number"},{text:"",value:"",type:"none"},{text:"·",value:".",type:"number"},{text:0,value:0,type:"number"},{text:"",value:"",type:"close"},{text:"",value:"",type:"none"}],jn=function(e){var o=e.onBlur,c=e.show,i=e.maxLength,l=void 0===i?Number.MAX_SAFE_INTEGER:i,s=e.closeOnClickSpace,m=void 0===s||s,f=e.onClose,h=e.onChange,v=e.value,y=e.className,g=e.onConfirm,E=e.recommend,b=void 0===E?[]:E,x=e.header,N=e.disabled,k=void 0!==N&&N,C=e.tip,T=e.decimal,w=e.dataTrackId,S=void 0===w?"Amount_Keyboard":w,O=M(n(v),2),I=O[0],A=O[1];function _(e){f&&f(e),o&&o(e)}r((function(){return m&&document.addEventListener("click",_),function(){document.removeEventListener("click",_)}}),[]),r((function(){A(v)}),[v]);var P=u((function(e,t){var n=t.type,r=t.value;if("h5"===process.env.TARO_ENV&&e.stopImmediatePropagation(),!k&&"none"!==n&&("."!==r||""!==I))if("close"!==n){var a=I;"delete"===n?a=I.slice(0,I.length-1):a.replace(/^0+/g,"").length<l&&(a=I+r),T&&0===r&&""===I&&(a=r+"."),"."===r&&I.includes(".")||"number"===n&&I.indexOf(".")>-1&&I.length-I.indexOf(".")==3||a!==I&&(A(a),null==h||h(a))}else _(e)}),[I,k]),R=T?Vn:Rn,V=d("xh-amount-keyboard",y),j=a(null);return t.createElement(ht,{nodeRef:j,classNames:"slide-up",in:c,unmountOnExit:!0,timeout:200},t.createElement(p,{className:V},t.createElement(p,{className:"xh-amount-keyboard-header"},t.createElement(p,{className:"xh-amount-keyboard-header-wrapper"},x||b.length>0&&t.createElement(p,{className:"xh-amount-keyboard-header-wrapper-text"},"猜您想借"," ",t.createElement(Bt,{style:{marginLeft:U(24)}},null==b?void 0:b.map((function(e,n){return t.createElement(p,{dataTrackId:"".concat(S,"-recommend-").concat(n),key:n,onClick:function(t){return function(e,t){e.stopPropagation(),null==g||g("".concat(t),!0)}(t,e)}},t.createElement(_n,{content:"¥".concat(e),key:n}))})))),C)),t.createElement(p,{className:"xh-amount-keyboard-body"},R.map((function(e,n){return t.createElement(p,{key:n,dataTrackId:"".concat(S,"-key-").concat(n),className:d("xh-amount-keyboard-body-key",{none:"none"===e.type,delete:"delete"===e.type,close:"close"===e.type}),onClick:function(t){P(t,e)}},e.text)})),t.createElement(p,{dataTrackId:"".concat(S,"-confirm-fake"),className:"xh-amount-keyboard-body-key confirm-fake",onClick:function(e){e.stopPropagation(),null==g||g(I)}},"确定"))))},Dn=function(e){var r=e.summary,c=void 0===r?"":r,i=e.children,l=e.open,s=void 0!==l&&l;e.arrow;var u=e.className,m=e.style,f=e.onToggle,h=e.dataTrackId,v=void 0===h?"collapse":h,y=V(e,["summary","children","open","arrow","className","style","onToggle","dataTrackId"]),g=a(null),E=M(n(s),2),b=E[0],x=E[1],N=o((function(){var e,t,n={height:0};return b&&(n.height="h5"===process.env.TARO_ENV?"".concat(null===(e=g.current)||void 0===e?void 0:e.scrollHeight,"px"):"auto"),"h5"===process.env.TARO_ENV&&b&&(null===(t=g.current)||void 0===t||t.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})),null==f||f(b),n}),[b]);return t.createElement(p,{className:d("xh-collapse",u),style:m,dataTrackId:v},t.createElement(p,{dataTrackId:"".concat(v,"_summary"),className:d("xh-collapse-summary",{open:b}),onClick:function(){x((function(e){return!e}))}},c||t.createElement(ie,R({},y,{arrow:!0,dataTrackId:"".concat(v,"_summary_list")}))),t.createElement(p,{className:d("xh-collapse-detail"),ref:g,style:N},i))},Mn=function(e){var a=e.visible,o=void 0!==a&&a,c=e.title,i=e.description,l=e.data,s=void 0===l?[]:l,u=e.onConfirm,m=e.onCancel,f=e.className,h=e.children,v=e.style,y=e.mode,g=e.submitText,E=void 0===g?"提交":g,b=e.cancelText,x=void 0===b?"取消":b,N=e.showCancel,k=void 0!==N&&N,C=e.renderItem,T=e.ItemWrapper,w=e.onSubmit,S=e.onClick,O=e.showClose,I=void 0!==O&&O,A=e.justifyContent,_=void 0===A?"center":A,P=e.inline,R=void 0!==P&&P,V=e.defaultValue,j=void 0===V?"":V,D=e.dataTrackId,F=void 0===D?"action-sheet":D,L=M(n(o),2),B=L[0],z=L[1],H=M(n("string"==typeof j?j:null==j?void 0:j.value),2),$=H[0],X=H[1],W=function(e){null==m||m(e),null==S||S(!1),z(!1)};r((function(){z(o)}),[o]);var Y=function(){null==w||w()},q=function(){return s.map((function(e,n){return C?C(e,n):t.createElement(p,{dataTrackId:"".concat(F,"-item-").concat(n),className:d("xh-action-sheet-main-panel-item",_,{active:"string"==typeof e?e===$:e.value===$}),key:n,onClick:function(){!function(e,t){null==u||u(e,t),z(!1);var n="string"==typeof e?e:e.value;X(n)}(e,n)}},"string"==typeof e?e:e.text)}))},U=I||"controlled"===y&&!k;return t.createElement(p,{className:d("xh-action-sheet",{inline:R}),onClick:function(){S?S(!o):s.length<=0||z(!0)},dataTrackId:"".concat(F,"-wrapper")},t.createElement(_t,{visible:B,onClose:W},t.createElement(p,{className:d("xh-action-sheet-main",f,y),style:v},c&&t.createElement(p,{className:"xh-action-sheet-main-header"},t.createElement(p,{className:"xh-action-sheet-main-header-title"},c),t.createElement(p,{className:"xh-action-sheet-main-header-desc"},i),U&&t.createElement(p,{className:"xh-action-sheet-main-header-close",onClick:function(){return W()}})),t.createElement(p,{dataTrackId:"".concat(F,"-panel"),className:d("xh-action-sheet-main-panel",{noTitle:!c}),onClick:function(e){return"h5"!==process.env.TARO_ENV&&e.stopPropagation()}},T?t.createElement(T,null,q()):t.createElement(t.Fragment,null,q())),t.createElement(p,{dataTrackId:"".concat(F,"-action"),className:d("xh-action-sheet-main-action",{noMarinTop:"controlled"!==y&&U}),onClick:function(e){return"h5"!==process.env.TARO_ENV&&e.stopPropagation()}},"controlled"===y?t.createElement(p,null,t.createElement(p,{className:"xh-action-sheet-main-action-submit",dataTrackId:"".concat(F,"-submit"),onClick:Y},E),k&&t.createElement(p,{className:"xh-action-sheet-main-action-cancel mode",dataTrackId:"".concat(F,"-cancel"),onClick:function(){return W(!0)}},x)):U?t.createElement("div",null):t.createElement(p,{dataTrackId:"".concat(F,"-cancel-bottom"),className:"xh-action-sheet-main-action-cancel",onClick:function(){return W(!0)}},x)))),h)},Fn=function(e){var r=e.defalutScore,a=void 0===r?-1:r,o=e.onChange,c=e.max,i=void 0===c?5:c,l=e.size,s=void 0===l?0:l,u=e.tip,m=void 0===u?"轻点星形以评分":u,f=e.style,h=void 0===f?{}:f,v=M(n(a),2),y=v[0],g=v[1];return t.createElement(p,{className:d("xh-rank"),style:R(s?{fontSize:U(s)}:{},h)},t.createElement(p,{className:"xh-rank-tip"},m),t.createElement(p,{className:"xh-rank-star"},Array(i).fill(1).map((function(e,n){return t.createElement(p,{key:n,className:d("xh-rank-star-active",{active:n<=y}),onClick:function(){return function(e){g(e),null==o||o(e+1)}(n)}})}))))},Ln=function(e){var n=e.icon,r=e.value,a=e.extraIcon,o=e.arrow,c=e.border,i=void 0===c||c,l=e.paddingHorizontal,s=void 0===l||l,u=e.onClick,m=e.className,f=e.outline,v=void 0===f||f,y=e.descriptionColor,g=void 0===y?"":y,E=e.valueColor,b=e.ellipsis,x=void 0===b||b,N=e.content,k=e.contentDescription,C=e.description,T=e.subDescription,w=e.secondary,S=e.alignItems,O=void 0===S?n?"start":"center":S,I=e.placeholder,A=void 0===I?"":I,_=e.dataTrackId,P=void 0===_?"Cell":_,R=d("xh-cell",{border:i},{secondary:w},{outline:v},{paddingHorizontal:s},O,m),V=d("xh-cell-main",{ellipsis:x});return t.createElement(p,{className:R,onClick:function(e){u&&u(e)},dataTrackId:"".concat(P,"_wrapper")},n&&t.createElement(p,{className:"xh-cell-icon"},n),t.createElement(p,{className:V,dataTrackId:"".concat(P,"_main")},N&&t.createElement(p,{className:"xh-cell-main-content"},N),k&&t.createElement(p,{className:"xh-cell-main-description"},k)),t.createElement(p,{className:"xh-cell-description",dataTrackId:"".concat(P,"_description"),style:{color:g}},C?t.createElement(p,null,C):t.createElement(p,{className:"xh-cell-description-placeholder"},A),t.createElement(h,{className:"xh-cell-description-sub"},T)),t.createElement(p,{className:"xh-cell-value",dataTrackId:"".concat(P,"_value")},t.createElement(p,{className:"xh-cell-value-info",style:{color:E}},r),t.createElement(p,{className:"xh-cell-value-icon"},a||o&&t.createElement(p,{className:"xh-cell-value-icon-arrow"}))))},Bn=function(e){var n=e.className,r=e.style,a=e.size,o=void 0===a?36:a,c=V(e,["className","style","size"]),i=d("xh-activity-indicator",n),l=R(R({},r),c);return 36!==o&&(l=R(R({},l),{width:U(o),height:U(o)})),t.createElement(p,{className:i,style:l},t.createElement(p,{className:"xh-activity-indicator-main"}),t.createElement(p,{className:"xh-activity-indicator-main"}),t.createElement(p,{className:"xh-activity-indicator-main"}))},zn=function(e){var r=e.checked,a=void 0!==r&&r,c=e.checkedText,i=void 0===c?"":c,l=e.uncheckedText,s=void 0===l?"":l,u=e.onChange,m=e.className,f=e.disabled,h=M(n(a),2),v=h[0],y=h[1],g=o((function(){return v?i:s}),[v,i,s]);return t.createElement(p,{className:d("xh-switch",{checked:v},{disabled:f},m),onClick:function(){f||y((function(e){return null==u||u(!e),!e}))}},t.createElement(p,{className:"xh-switch-control"}),t.createElement(p,{className:"xh-switch-inner"},g))},Hn=["一","二","三","四","五","六","七","八","九","十"],$n={linkmanName:"请输入联系人姓名",linkmanPhone:"请输入正确的手机号",relationType:"请选择与联系人关系"},Xn=[{value:"FATHER",text:"父亲"},{value:"MOTHER",text:"母亲"},{value:"MATE",text:"配偶"},{value:"CHILDREN",text:"子女"},{value:"SIBLING",text:"兄弟姐妹"},{value:"FRIENDS",text:"朋友"},{value:"COLLEAGUE",text:"同事"},{value:"RELATIVES",text:"亲戚"},{value:"OTHER",text:"其他"}],Wn="h5"!==process.env.TARO_ENV||window.navigator.userAgent.includes("xhqb"),Yn=c((function(e,a){var c=e.linkManNum,l=e.relations,s=void 0===l?Xn:l,m=e.onChange,f=e.onGetContacts,h=e.showImportIcon,v=void 0===h?Wn:h,g=e.onBlur,E=e.onCheckRelation,b=e.onInputChange,x=e.needName,N=void 0===x||x,k=e.dataTrackId,C=void 0===k?"XHAddLinMan":k,T=M(n([]),2),w=T[0],S=T[1],O=M(n([]),2),I=O[0],A=O[1];r((function(){S(Array(c).fill(1).map((function(){return{linkmanName:"",linkmanPhone:"",relationType:"",relationValue:""}}))),A(Array(c).fill(1).map((function(){return{linkmanName:"",linkmanPhone:"",relationType:""}})))}),[c]);var _=u((function(e){return!!/1\d{10}/.test(e)}),[]),P=u((function(e,t){return"linkmanName"===e?!(!t||!t.replace(/^\s+|\s+$/gm,""))&&!(t.length>20):"linkmanPhone"===e?!(!t||!_(t)):"relationType"===e&&!!t}),[]),V=o((function(){for(var e=w,t=e.length,n={linkmanName:[],linkmanPhone:[],relationValue:[]},r=!0,a=0;a<t;a++){if(N)if(!P("linkmanName",e[a].linkmanName)){r=!1;break}if(!P("linkmanPhone",e[a].linkmanPhone)){r=!1;break}if(0!==a&&n.linkmanPhone.includes(e[a].linkmanPhone)){r=!1;break}if(n.linkmanPhone.push(e[a].linkmanPhone),!P("relationType",e[a].relationValue)){r=!1;break}n.relationValue.push(e[a].relationValue)}return n.relationValue.filter((function(e){return"MATE"===e})).length>=2&&(r=!1),r}),[w,N]);r((function(){null==m||m(w,V)}),[w,V]),i(a,(function(){return{canSubmit:V,setContacts:function(e,t){S((function(n){return n[t].linkmanName=e.linkmanName||"",n[t].linkmanPhone=e.linkmanPhone||"",F([],M(n),!1)})),B("linkmanName",t),B("linkmanPhone",t)}}}),[V]);var j=function(e,t,n){for(var r=n||w,a=r[t],o=0,c=r.length;o<c;o++)if(o!==t){var i=r[o];if("linkmanPhone"===e){if(""!==a.linkmanPhone&&""!==i.linkmanPhone&&i.linkmanPhone===a.linkmanPhone)return{pass:!1,message:"手机号与第".concat(o+1,"联系人号码重复,请修改")}}else if("relationValue"===e&&""!==a.relationValue&&"MATE"===i.relationValue&&"MATE"===a.relationValue)return{pass:!1,message:"关系与第".concat(o+1,"联系人关系重复,请修改")}}return{pass:!0,message:""}},D=u((function(e,t){var n="h5"===process.env.TARO_ENV?e.target.value:e.detail.value,r=q(n);S((function(e){return e[t].linkmanName=r,F([],M(e),!1)})),null==b||b("linkmanName",t)}),[]),L=u((function(e,t){var n="h5"===process.env.TARO_ENV?e.target.value:e.detail.value,r=q(n);S((function(e){return e[t].linkmanPhone=r,F([],M(e),!1)})),null==b||b("linkmanPhone",t)}),[]),B=u((function(e,t){if(P(e,w[t][e])){var n=j(e,t),r=n.pass,a=n.message;r||A((function(n){return n[t][e]=a,F([],M(n),!1)})),null==g||g(e,t)}else A((function(n){return n[t][e]=$n[e],F([],M(n),!1)}))}),[w]),z=u((function(e,t){A((function(n){return n[t][e]="",F([],M(n),!1)}))}),[]);return t.createElement(p,{className:"xh-linkman",dataTrackId:C},w.map((function(e,n){return t.createElement(p,{key:n,className:"xh-linkman-item"},t.createElement(p,{className:"xh-linkman-title"},"第",Hn[n],"联系人"),N&&t.createElement(p,{className:"xh-linkman-main"},t.createElement(p,{className:"xh-linkman-main-input"},t.createElement(p,{className:"xh-linkman-main-input-label"},"姓名"),t.createElement(p,{className:"xh-linkman-main-input-main"},"h5"===process.env.TARO_ENV?t.createElement("input",{"data-track-id":"".concat(C,"_").concat(n,"-name"),className:"xh-linkman-main-input-main-input",type:"text",placeholder:"紧急联系人姓名",onChange:function(e){return D(e,n)},value:e.linkmanName,onBlur:function(){return B("linkmanName",n)},onFocus:function(){return z("linkmanName",n)}}):t.createElement(y,{dataTrackId:"".concat(C,"_").concat(n,"-name"),placeholder:"紧急联系人姓名",className:"xh-linkman-main-input-main-input",onBlur:function(){return B("linkmanName",n)},value:e.linkmanName,type:"text",onInput:function(e){return D(e,n)},onFocus:function(){return z("linkmanName",n)}}),I[n].linkmanName&&t.createElement(p,{className:"xh-linkman-main-input-main-err"},I[n].linkmanName)),v&&t.createElement(p,{dataTrackId:"".concat(C,"_").concat(n,"-name-contacts"),className:"xh-linkman-main-input-contacts",onClick:function(){return null==f?void 0:f(n)}}))),t.createElement(p,{className:"xh-linkman-main"},t.createElement(p,{className:"xh-linkman-main-input"},t.createElement(p,{className:"xh-linkman-main-input-label"},"电话"),t.createElement(p,{className:"xh-linkman-main-input-main"},"h5"===process.env.TARO_ENV?t.createElement("input",{"data-track-id":"".concat(C,"_").concat(n,"-phone"),className:"xh-linkman-main-input-main-input",type:"tel",placeholder:"紧急联系人手机号",onBlur:function(){return B("linkmanPhone",n)},maxLength:11,onChange:function(e){return L(e,n)},value:e.linkmanPhone,onFocus:function(){return z("linkmanPhone",n)}}):t.createElement(y,{dataTrackId:"".concat(C,"_").concat(n,"-phone"),placeholder:"紧急联系人手机号",className:"xh-linkman-main-input-main-input",type:"number",maxlength:11,onBlur:function(){return B("linkmanPhone",n)},value:e.linkmanPhone,onInput:function(e){return L(e,n)},onFocus:function(){return z("linkmanPhone",n)}}),I[n].linkmanPhone&&t.createElement(p,{className:"xh-linkman-main-input-main-err"},I[n].linkmanPhone)),v&&!N&&t.createElement(p,{dataTrackId:"".concat(C,"_").concat(n,"-phone-contacts"),className:"xh-linkman-main-input-contacts",onClick:function(){return null==f?void 0:f(n)}}))),t.createElement(Mn,{data:s,title:"选择与联系人的关系",dataTrackId:"".concat(C,"_").concat(n,"-relation"),onConfirm:function(e){A((function(e){var t=F([],M(e),!1);return t[n].relationType="",t})),S((function(t){var r=F([],M(t),!1);r[n]=R(R({},r[n]),{relationType:e.text,relationValue:e.value});var a=j("relationValue",n,r),o=a.pass,c=a.message;return o||setTimeout((function(){A((function(e){var t=F([],M(e),!1);return t[n].relationType=c,t}))}),0),r})),null==E||E(e,n)},onCancel:function(){return B("relationType",n)}},t.createElement(p,{className:"xh-linkman-main"},t.createElement(p,{className:"xh-linkman-main-input"},t.createElement(p,{className:"xh-linkman-main-input-label"},"关系"),t.createElement(p,{className:"xh-linkman-main-input-main"},t.createElement(p,{dataTrackId:"".concat(C,"_").concat(n,"-relation-input"),className:d("xh-linkman-main-input-main-input",{placeholder:!e.relationValue,tt:"tt"===process.env.TARO_ENV})},e.relationType||"选择与联系人关系"),I[n].relationType&&t.createElement(p,{className:"xh-linkman-main-input-main-err"},I[n].relationType)),t.createElement(p,{className:"xh-linkman-main-input-arrow"})))))})))})),qn={success:"https://s.xh1.cn/resources/images/public/success.png",empty:"https://s.xh1.cn/resources/images/public/empty.png",fail:"https://s.xh1.cn/resources/images/public/failure.png",networkErr:"https://s.xh1.cn/resources/images/public/error.png",wait:"https://s.xh1.cn/resources/images/public/ing.png",submitted:"https://s.xh1.cn/resources/images/public/success-info.png",faceEmpty:"https://s.xh1.cn/resources/images/public/faceEmpty.png"},Un=function(e){var n=e.className,r=e.status,a=e.title,o=e.desc,c=e.slot,i=e.action,l=e.onAction,s=e.full,u=d("xh-result",n,{full:void 0===s||s});return t.createElement(p,{className:u},"h5"===process.env.TARO_ENV?t.createElement("img",{src:qn[r],alt:"",className:"xh-result-status"}):t.createElement(v,{src:qn[r],className:"xh-result-status"}),t.createElement(p,{className:"xh-result-title"},a),t.createElement(p,{className:"xh-result-desc"},o),t.createElement(p,{className:"xh-result-slot"},c),i&&t.createElement(p,{className:d("xh-result-action",{hasSlot:c})},t.createElement(z,{onClick:function(){null==l||l()},hollow:!0,size:"full"},i)))},Gn=function(e){var n=e.percent,r=void 0===n?88:n,a=e.className,o=e.doneColor,c=void 0===o?"#DDD":o,i=e.backgroundColor,l=void 0===i?"rgba(0,0,0, 0.25)":i,s=e.maskColor,u=void 0===s?"#FFF":s,m=e.size,f=e.style,h=e.text,v=d("xh-progress-circle",a),y=m?{width:U(m),height:U(m)}:{},g=100===r,E=R(R(R({},y),{"--percent":"".concat(r/100,"turn"),"--doneColor":c,"--backgroundColor":l,"--maskContent":"percent","--maskColor":u}),f);return t.createElement(p,{className:v,style:E},h?t.createElement(p,{className:"xh-progress-circle-text"},h):g?t.createElement(p,{className:"xh-progress-circle-done"}):null)},Kn=["京","津","冀","晋","蒙","辽","吉","黑","沪","苏","浙","皖","闽","赣","鲁","豫","鄂","湘","粤","桂","琼","渝","川","贵","云","藏","陕","甘","青","宁","新","港","澳","台","使"],Zn=["1","2","3","4","5","6","7","8","9","0"],Jn=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z"],Qn=["港","澳","学","领"],er=["临","澳","学","领"],tr=function(e){var c=e.onBlur,i=e.show,l=e.showClose,s=void 0===l||l,u=e.closeOnClickSpace,m=void 0===u||u,h=e.onClose,v=e.onChange,y=e.value,g=e.closeText,E=void 0===g?"完成":g,b=e.onDelete,x=e.className,N=e.activeIndex,k=e.dataTrackId,C=void 0===k?"LicensePlate_Keyboard":k,T=M(n(y),2),w=T[0],S=T[1],O=o((function(){return 0===N?Kn:6===N?F(F(F([],M(Zn),!1),M(Jn),!1),M(Qn),!1):7===N?F(F(F([],M(Zn),!1),M(Jn),!1),M(er),!1):F(F([],M(Zn),!1),M(Jn),!1)}),[N]),I=o((function(){return 0===N?"选择省份":1===N?"选择字母":"选择数字或字母"}),[N]),A=o((function(){return 0===N?"province":1===N?"letter":"mixed"}),[N]);function _(e){e.stopPropagation(),h&&h(e),c&&c(e)}function P(e){if(e!==y[N]){process.env.TARO_ENV;var t=w;t=N<w.length?ne(w,N,e):w+e,S(t),v&&v(t)}}r((function(){return m&&document.addEventListener("click",_),function(){document.removeEventListener("click",_)}}),[]),r((function(){S(y)}),[y]);var R=function(){b()},V=d("xh-license-keyboard",x),j=a(null);return t.createElement(ht,{nodeRef:j,classNames:"slide-up",in:i,unmountOnExit:!0,timeout:200},t.createElement(p,{className:V},t.createElement(p,{className:"xh-license-keyboard-header"},t.createElement(p,{className:"xh-license-keyboard-header-title"},I),t.createElement(p,{className:"xh-license-keyboard-header-delete"}),s&&t.createElement(p,{className:"xh-license-keyboard-header-close",dataTrackId:"".concat(C,"_dataTrackId_close"),onClick:_},E)),t.createElement(p,{className:"xh-license-keyboard-body"},O.map((function(e,n){return t.createElement(p,{key:n,className:d("xh-license-keyboard-body-key")},"h5"===process.env.TARO_ENV?t.createElement("button",{className:d("xh-license-keyboard-body-key-item",process.env.TARO_ENV),dataTrackId:"".concat(C,"_Keyboard_").concat(e),disabled:"letter"===A&&n<10,onClick:function(t){t.stopPropagation(),P(e)}},e):t.createElement(f,{className:d("xh-license-keyboard-body-key-item",process.env.TARO_ENV),disabled:"letter"===A&&n<10,dataTrackId:"".concat(C,"_Keyboard_").concat(e),onClick:function(t){t.stopPropagation(),"letter"===A&&n<10||P(e)}},e))})),t.createElement(p,{className:d("xh-license-keyboard-body-key","delete")},"h5"===process.env.TARO_ENV?t.createElement("button",{className:d("xh-license-keyboard-body-key-item",process.env.TARO_ENV,"delete"),disabled:0===N,dataTrackId:"".concat(C,"_Keyboard_delete"),onClick:function(e){e.stopPropagation(),R()}}):t.createElement(f,{className:d("xh-license-keyboard-body-key-item",process.env.TARO_ENV,"delete"),disabled:0===N,dataTrackId:"".concat(C,"_Keyboard_delete"),onClick:function(e){e.stopPropagation(),0!==y.length&&R()}})))))},nr=c((function(e,o){var c=e.value,l=void 0===c?"":c,s=e.onChange,u=e.className,m=e.showKeyboard,f=void 0!==m&&m,h=e.padding,v=void 0!==h&&h,y=e.border,g=void 0!==y&&y;e.onFinish;var E=e.autoScroll,b=void 0===E||E,x=e.label,N=e.dataTrackId,k=void 0===N?"LicensePlateInput":N,C=V(e,["value","onChange","className","showKeyboard","padding","border","onFinish","autoScroll","label","dataTrackId"]),T=M(n(l.length),2),w=T[0],S=T[1],O=M(n(f),2),I=O[0],A=O[1],_=a(null);i(o,(function(){return{isValid:(e=l,7===e.length?/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/.test(e):8===e.length&&/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/.test(e))};var e}),[l]);r((function(){I&&_.current&&b&&"h5"===process.env.TARO_ENV&&_.current.scrollIntoView({behavior:"smooth"})}),[I,b]);var P=d("xh-licensePlate",u,{padding:v},{border:g});return t.createElement(p,{className:P,dataTrackId:k},x&&t.createElement("label",{className:"xh-licensePlate-label"},x),t.createElement(p,{className:"xh-licensePlate-input",onClick:function(e){e.stopPropagation(),A(!0)},dataTrackId:"".concat(k,"-input"),ref:_},function(){for(var e=[],n=function(n){var r=l[n];e.push(t.createElement(p,{key:n,className:d("xh-licensePlate-input-item",{active:w===n,showNew:7===n&&8!==l.length}),dataTrackId:"".concat(k,"-input-item-").concat(n),onClick:function(){return function(e){e>l.length-1||S(e)}(n)}},"O"===r?"":r))},r=0;r<8;r++)n(r);return e}()),t.createElement(tr,R({activeIndex:w,dataTrackId:k,show:I,value:l,onChange:function(e){S((function(t){return e.replace(/O/g,"").length>=8?t:t+1})),s(e)},onDelete:function(){var e=l[w+1],t=ne(l,w,e?"O":"");0!==t.length&&S((function(e){return e-1})),s(t)},onClose:function(){A(!1)}},C)))})),rr=function(e){var o=e.expireDate,c=e.overTimeCb,i=e.customStyle,l=void 0!==i&&i,s=e.isPause,u=void 0!==s&&s,m=e.onTimeChange,d=M(n(""),2),f=d[0],h=d[1],v=M(n(""),2),y=v[0],g=v[1],E=M(n(""),2),b=E[0],x=E[1],N=M(n(!1),2),k=N[0],C=N[1],T=a(null),w=0;return r((function(){return clearInterval(T.current),o&&!u&&(T.current=setInterval((function(){!function(){var e,t,n,r=new Date(o).getTime()-Date.now();if(m&&m(r),(w=Math.floor(r/1e3))<=0)return C(!1),clearInterval(T.current),void(null==c||c());C(!0),x(n=(n=w%60)<10?"0"+n:n),t=Math.floor(w/60%60),g(t=t<10?"0"+t:t),e=Math.floor(w/60/60),h(e=e<10?"0"+e:e)}()}),1e3)),function(){clearInterval(T.current)}}),[o,u]),t.createElement(t.Fragment,null,k&&(l?t.createElement(t.Fragment,null,f,":",y,":",b):t.createElement(p,{className:"xh-countdown"},t.createElement(p,{className:"xh-countdown-time"},f),t.createElement(p,{className:"xh-countdown-dot"},":"),t.createElement(p,{className:"xh-countdown-time"},y),t.createElement(p,{className:"xh-countdown-dot"},":"),t.createElement(p,{className:"xh-countdown-time"},b))))},ar=function(e){var r=e.option,a=e.onChange,o=e.defaultValue,c=void 0===o?"":o,i=e.label,l=e.fill,s=void 0!==l&&l,u=e.className,m=e.style,f=e.border,h=void 0===f||f,v=e.paddingHorizontal,y=void 0===v||v,g=e.dataTrackId,E=M(n("string"==typeof c?c:c.value),2),b=E[0],x=E[1];return t.createElement(p,{dataTrackId:g,className:d("xh-checkbox-button",u,{border:h,paddingHorizontal:y}),style:m},i&&t.createElement(p,{className:"xh-checkbox-button-label"},i),t.createElement(p,{className:"xh-checkbox-button-options"},r.map((function(e,n){return t.createElement(p,{key:n,dataTrackId:g+"-"+n,className:d("xh-checkbox-button-options-item",{active:"string"==typeof e?e===b:e.value===b,fill:s}),onClick:function(){!function(e){x("string"==typeof e?e:e.value),a(e)}(e)}},t.createElement("p",{className:"xh-checkbox-button-options-item-label"},"string"==typeof e?e:e.label))}))))},or=function(e){var c=e.content,i=e.internal,l=void 0===i?3e3:i,s=e.duration,u=void 0===s?500:s,m=e.icon,f=void 0!==m&&m,h=e.itemHeight,v=void 0===h?72:h,y=e.className,g=o((function(){return c.length>0?F(F([],M(c),!1),[c[0]],!1):[]}),[c]),E=a(null),b=a(null),x=M(n(0),2),N=x[0],k=x[1],C=M(n(u),2),T=C[0],S=C[1];r((function(){if(!(g.length<=1))return E.current&&clearInterval(E.current),E.current=setInterval((function(){k((function(e){return e+1}))}),l),function(){E.current&&clearInterval(E.current),b.current&&clearTimeout(b.current)}}),[g.length,l]),r((function(){if(!(g.length<=1))return N===g.length-1&&0!==T?b.current=setTimeout((function(){S(0),k(0)}),u):0===N&&0===T&&(b.current=setTimeout((function(){S(u)}),50)),function(){b.current&&clearTimeout(b.current)}}),[N,g.length,u,T]);var O=d("xh-notice",y);return t.createElement(p,{className:O},"boolean"==typeof f&&f?t.createElement(wn,{icon:"notice",color:"#7384F6",size:32}):f,t.createElement("div",{className:"xh-notice-main",style:{transform:"translateY(".concat(w(-N*v),")"),transitionDuration:"".concat(T,"ms"),transitionTimingFunction:"ease-in-out"}},g.map((function(e,n){return t.createElement(p,{className:"xh-notice-main-marquee",key:n},e)}))))},cr=c((function(e,n){var r=e.showScan,o=void 0!==r&&r,c=e.label,l=e.value,s=e.bankName,u=e.readOnly,m=e.direction,f=void 0===m?"column":m,h=e.onScan,v=e.placeholder,y=void 0===v?"请输入银行卡号":v,g=e.onError,E=e.onChange,b=e.maxlength,x=void 0===b?23:b,N=e.slot,k=e.className,C=e.border,T=e.onBlur,w=function(e){var t=e.replace(/\s/g,"");return!(t.length<16||t.length>19)&&function(e){if(!e)return!1;for(var t=!0,n=0,r=e.length;r>0;r--){var a=+e.substring(r,r-1);(t=!t)&&(a*=2);var o=a%10;n+=o+(a-o)/10}return n%10==0}(t)},S=a(null);return i(n,(function(){return{isValid:w(l),focus:function(){var e;null===(e=null==S?void 0:S.current)||void 0===e||e.focus()}}}),[l]),t.createElement(p,{className:d("xh-bankcard-number-input",k)},t.createElement(ce,{padding:!0,ref:S,RightComponent:o&&t.createElement(p,{onClick:function(){null==h||h()},className:"xh-bankcard-number-input-scan"}),direction:f,label:c,mainExtra:"row"!==f&&t.createElement(p,{className:"xh-bankcard-number-input-name"},s),maxlength:x,placeholder:y,readonly:u,type:"tel",border:C,value:K(l),onBlur:function(e){null==T||T(),w(e)||null==g||g(""===e?"银行卡号不能为空":"银行卡号格式不正确")},onChange:function(e){var t=K(e);null==E||E(t)}}),N&&t.createElement(p,{className:"xh-bankcard-number-input-slot"},N))})),ir=c((function(e,n){var r=e.showScan,a=void 0!==r&&r,o=e.label,c=e.value,l=e.readOnly,s=e.direction,u=void 0===s?"column":s,m=e.onScan,f=e.placeholder,h=void 0===f?"请输入身份证":f,v=e.onError,y=e.onChange,g=e.maxlength,E=void 0===g?23:g,b=e.slot,x=e.className,N=e.border,k=e.onBlur,C=e.dataTrackId,T=void 0===C?"xh-idnumber":C;return i(n,(function(){return{isValid:Z(c.replace(/\s/g,"")),focus:function(){var e;"object"==typeof n&&(null===(e=null==n?void 0:n.current)||void 0===e||e.focus())}}})),t.createElement(p,{className:d("xh-idnumber-input",x)},t.createElement(ce,{dataTrackId:T,padding:!0,ref:n,RightComponent:a&&t.createElement(p,{onClick:function(){null==m||m()},className:"xh-idnumber-input-scan"}),border:N,direction:u,label:o,maxlength:E,placeholder:h,readonly:l,type:"weapp"===process.env.TARO_ENV?"idcard":"text",value:c.replace(/\s/g,""),onBlur:function(e){null==k||k(),Z(e)||null==v||v(""===e?"身份证号不能为空":"请输入正确的身份证号")},onChange:function(e){var t=e.replace(/\s/g,"");null==y||y(t)}}),b&&t.createElement(p,{className:"xh-idnumber-input-slot",dataTrackId:"".concat(T,"-slot")},b))}));function lr(e,t){var n,o=(n=a(!0)).current?(n.current=!1,!0):n.current;r((function(){if(!o)return e()}),t)}var sr=function(){function e(e,t,n){this.ctx=e,this.chart=null,t?this.canvasNode=n:this._initStyle(e),this._initEvent()}return e.prototype.getContext=function(e){if("2d"===e)return this.ctx},e.prototype.setChart=function(e){this.chart=e},e.prototype.attachEvent=function(){},e.prototype.addEventListener=function(){},e.prototype.removeEventListener=function(){},e.prototype.detachEvent=function(){},e.prototype._initCanvas=function(e,t){e.util.getContext=function(){return t},e.util.$override("measureText",(function(e,n){return t.font=n||"12px sans-serif",t.measureText(e)}))},e.prototype._initStyle=function(e){["fillStyle","strokeStyle","globalAlpha","textAlign","textBaseAlign","shadow","lineWidth","lineCap","lineJoin","lineDash","miterLimit","fontSize"].forEach((function(t){Object.defineProperty(e,t,{set:function(n){("fillStyle"!==t&&"strokeStyle"!==t||"none"!==n&&null!==n)&&e["set"+t.charAt(0).toUpperCase()+t.slice(1)](n)}})})),e.createRadialGradient=function(){return e.createCircularGradient.apply(e,arguments)}},e.prototype._initEvent=function(){var e=this;this.event={};[{wxName:"touchStart",ecName:"mousedown"},{wxName:"touchMove",ecName:"mousemove"},{wxName:"touchEnd",ecName:"mouseup"},{wxName:"touchEnd",ecName:"click"}].forEach((function(t){e.event[t.wxName]=function(n){var r,a,o=n.touches[0];e.chart&&(null===(a=null===(r=e.chart.getZr())||void 0===r?void 0:r.handler)||void 0===a||a.dispatch(t.ecName,{zrX:"tap"===t.wxName?o.clientX:o.x,zrY:"tap"===t.wxName?o.clientY:o.y}))}}))},Object.defineProperty(e.prototype,"width",{get:function(){return this.canvasNode?this.canvasNode.width:0},set:function(e){this.canvasNode&&(this.canvasNode.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.canvasNode?this.canvasNode.height:0},set:function(e){this.canvasNode&&(this.canvasNode.height=e)},enumerable:!1,configurable:!0}),e}();function ur(e){for(var t=0;t<e.touches.length;++t){var n=e.touches[t];n.offsetX=n.x,n.offsetY=n.y}return e}var mr=m(c((function(e,c){var l,s=e.echarts,u=e.isPage,m=void 0===u||u,d=e.canvasId,f=V(e,["echarts","isPage","canvasId"]),h=a(),v=a(),y=M(n(!0),2),b=y[0],x=y[1],N=function(e){var t=a();return r((function(){t.current=e})),t.current}(f),k=o((function(){return d||function(e){void 0===e&&(e="$unique$"),te[e]||(te[e]=0);var t=++te[e];return"$unique$"===e?"".concat(t):"".concat(e).concat(t)}("canvas_")}),[d]),C=o((function(){return["disableScroll","disableScroll","onTouchCancel","onLongTap","onError","nativeProps","className","key","hidden","animation"]}),[]),T=o((function(){return R({width:"100%",height:"300px"},f.style)}),[f.style]);A((function(){E.getEnv()===E.ENV_TYPE.WEAPP&&m&&E.nextTick((function(){P()}))})),r((function(){var e;E.getEnv()!==E.ENV_TYPE.WEB&&m||(e=function(){E.nextTick((function(){P()}))},setTimeout((function(){return setTimeout((function(){return setTimeout((function(){return e()}))}))})))}),[]),l=function(){_()},r((function(){return l}),[]),lr((function(){if(!Q(null==N?void 0:N.theme,f.theme)||!Q(null==N?void 0:N.opts,f.opts)||!Q(null==N?void 0:N.onEvents,f.onEvents))return _(),void P();var e=["option","notMerge","lazyUpdate","showLoading","loadingOption"];Q(ee(f,e),ee(N,e))||O(),Q(null==N?void 0:N.style,f.style)&&Q(null==N?void 0:N.className,f.className)||w(h.current)}),[f]);var w=function(e){var t=s.getInstanceByDom(e);if(!b)try{t.resize({width:"auto",height:"auto"})}catch(e){}x(!1)},S=function(e){var t=e.width,n=e.height,r=e.devicePixelRatio;return j(void 0,void 0,void 0,(function(){var e,a;return D(this,(function(o){return e=f.theme,a=f.opts,[2,new Promise((function(o,c){h.current?(v.current=s.init(h.current,e,R({width:t,height:n,devicePixelRatio:r},a)),E.getEnv()===E.ENV_TYPE.WEB?s.getInstanceByDom(h.current).on("finished",(function(){s.dispose(h.current);var c=R({width:t,height:n,devicePixelRatio:r},a);v.current=s.init(h.current,e,c),o(v.current)})):o(v.current)):c()}))]}))}))},O=function(){var e=f.option,t=f.notMerge,n=void 0===t||t,r=f.lazyUpdate,a=void 0!==r&&r,o=f.showLoading,c=f.loadingOption,i=void 0===c?null:c,l=s.getInstanceByDom(h.current);return l&&(l.setOption(e,n,a),o?l.showLoading(i):l.hideLoading()),l},I=function(e){var t=e.width,n=e.height,r=e.devicePixelRatio;return j(void 0,void 0,void 0,(function(){var e,a,o;return D(this,(function(c){switch(c.label){case 0:return e=f.onEvents,a=f.onChartReady,[4,S({width:t,height:n,devicePixelRatio:r})];case 1:return c.sent(),function(e,t){function n(t,n){(function(e){return"string"==typeof e})(t)&&J(n)&&e.on(t,(function(t){n(t,e)}))}for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n(r,t[r])}(o=O(),e||{}),J(a)&&(null==a||a(o)),h.current&&w(h.current),[2]}}))}))},_=function(){v.current&&(null==s||s.dispose(v.current))},P=function(){var e,t,n,r;if(E.getEnv()===E.ENV_TYPE.WEB&&h.current){var a=(null===(e=f.style)||void 0===e?void 0:e.width)||(null===(t=h.current)||void 0===t?void 0:t.clientWidth)||window.innerWidth,o=(null===(n=f.style)||void 0===n?void 0:n.height)||(null===(r=h.current)||void 0===r?void 0:r.clientHeight)||300;I({width:a,height:o,devicePixelRatio:window.devicePixelRatio})}else{(function(e,t){for(var n=e.split("."),r=t.split("."),a=Math.max(n.length,r.length);n.length<a;)n.push("0");for(;r.length<a;)r.push("0");for(var o=0;o<a;o++){var c=parseInt(n[o]),i=parseInt(r[o]);if(c>i)return 1;if(c<i)return-1}return 0})(E.getSystemInfoSync().SDKVersion||"","2.9.0")>=0&&E.createSelectorQuery().select("#".concat(k)).fields({node:!0,size:!0}).exec((function(e){var t=M(e,1)[0];if(t){var n=t||{},r=n.node,a=n.width,o=n.height,c=r,i=E.getSystemInfoSync().pixelRatio,l=c.getContext("2d"),u=new sr(l,!0,c);null==s||s.setCanvasCreator((function(){return u})),h.current=u,I({width:a,height:o,devicePixelRatio:i})}}))}};i(c,(function(){return{chartRef:v,canvasRef:h}}));var F=o((function(){return E.getEnv()===E.ENV_TYPE.WEAPP?t.createElement(g,R({ref:h,canvasId:k,id:k,style:T,type:"2d",onTouchEnd:function(e){return function(e){var t,n=e.chart,r=e.event;if(n){var a=r.changedTouches?r.changedTouches[0]:{},o=null===(t=n.getZr())||void 0===t?void 0:t.handler;null==o||o.dispatch("mouseup",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.dispatch("click",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.processGesture(ur(r),"end")}}({chart:v.current,event:e})},onTouchMove:function(e){return function(e){var t,n=e.chart,r=e.event;if(n&&r.touches.length>0){var a=r.touches[0],o=null===(t=n.getZr())||void 0===t?void 0:t.handler;null==o||o.dispatch("mousedown",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.dispatch("mousemove",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.processGesture(ur(r),"start")}}({chart:v.current,event:e})},onTouchStart:function(e){return function(e){var t,n=e.chart,r=e.event;if(n&&r.touches.length>0){var a=r.touches[0],o=null===(t=n.getZr())||void 0===t?void 0:t.handler;null==o||o.dispatch("mousedown",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.dispatch("mousemove",{zrX:a.x,zrY:a.y,preventDefault:function(){},stopImmediatePropagation:function(){},stopPropagation:function(){}}),null==o||o.processGesture(ur(r),"start")}}({chart:v.current,event:e})}},ee(f,C))):t.createElement(p,{className:"xh-echarts",ref:h,id:k,style:T})}),[f,C,k]);return F})));export{Cn as ThemeProvider,Mn as XHActionSheet,Bn as XHActivityIndicator,Pn as XHAmountInput,jn as XHAmountKeyboard,_n as XHBadge,cr as XHBankCardNumberInput,ae as XHBankIcon,z as XHButton,oe as XHCaptcha,Ln as XHCell,Sn as XHCheckbox,ar as XHCheckboxButton,Dn as XHCollapse,rr as XHCountdown,yt as XHDialog,kt as XHDialogRef,mr as XHEcharts,ce as XHFormInput,ir as XHIDNumberInput,wn as XHIcon,re as XHImage,nr as XHLicensePlateInput,Yn as XHLinkMan,ie as XHList,$ as XHLoading,H as XHMask,W as XHNavBar,or as XHNotice,gt as XHNumberKeyboard,Y as XHPage,Et as XHPasswordInput,Vt as XHPicker,_t as XHPopup,bt as XHProgress,Gn as XHProgressCircle,On as XHRadio,Fn as XHRank,Un as XHResult,Bt as XHSpace,An as XHStep,zn as XHSwitch,wt as XHTabbar,Nt as XHToast};
180
180
  //# sourceMappingURL=index.esm.js.map