hunter-mate 0.1.27 → 0.1.28

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.
Files changed (60) hide show
  1. package/dist/assets/extension/build-info.json +1 -1
  2. package/dist/assets/extension/manifest.json +3 -3
  3. package/dist/assets/server/main.mjs +31 -2
  4. package/dist/index.js +30 -4
  5. package/dist/web/dist/404.html +1 -1
  6. package/dist/web/dist/_next/static/chunks/187-48dc1acca97c62ba.js +1 -0
  7. package/dist/web/dist/_next/static/chunks/{253-f4ac7af6647e4dba.js → 327-6b8f348b06e7977f.js} +1 -1
  8. package/dist/web/dist/_next/static/chunks/353-845111f2789c5a03.js +12 -0
  9. package/dist/web/dist/_next/static/chunks/587-e449469e56a2bfff.js +1 -0
  10. package/dist/web/dist/_next/static/chunks/603-765c4fa1ed757ca5.js +32 -0
  11. package/dist/web/dist/_next/static/chunks/659-3db6e9c90ee9d238.js +1 -0
  12. package/dist/web/dist/_next/static/chunks/882-1bcdfd2499403efd.js +1 -0
  13. package/dist/web/dist/_next/static/chunks/app/companies/{page-390d5e3073ec151d.js → page-e1e730e2dc5ad84c.js} +1 -1
  14. package/dist/web/dist/_next/static/chunks/app/jobs/page-a32a17c5a6384358.js +1 -0
  15. package/dist/web/dist/_next/static/chunks/app/{layout-15c4c2ba595b2a92.js → layout-1e492ed8c639edf5.js} +1 -1
  16. package/dist/web/dist/_next/static/chunks/app/shared/[token]/page-6741cd1b0a4aca2e.js +1 -0
  17. package/dist/web/dist/_next/static/chunks/app/talents/{page-5a2caa7a503ee041.js → page-4b00d69580f49f97.js} +1 -1
  18. package/dist/web/dist/admin/data.html +1 -1
  19. package/dist/web/dist/admin/data.txt +4 -4
  20. package/dist/web/dist/auth/verify.html +1 -1
  21. package/dist/web/dist/auth/verify.txt +4 -4
  22. package/dist/web/dist/companies.html +1 -1
  23. package/dist/web/dist/companies.txt +5 -5
  24. package/dist/web/dist/company/admin.html +1 -1
  25. package/dist/web/dist/company/admin.txt +4 -4
  26. package/dist/web/dist/entity.html +1 -1
  27. package/dist/web/dist/entity.txt +4 -4
  28. package/dist/web/dist/index.html +1 -1
  29. package/dist/web/dist/index.txt +4 -4
  30. package/dist/web/dist/jobs.html +1 -1
  31. package/dist/web/dist/jobs.txt +5 -5
  32. package/dist/web/dist/logs.html +1 -1
  33. package/dist/web/dist/logs.txt +4 -4
  34. package/dist/web/dist/matching/jobs/placeholder/talents.html +1 -1
  35. package/dist/web/dist/matching/jobs/placeholder/talents.txt +4 -4
  36. package/dist/web/dist/matching/portraits/placeholder/jobs.html +1 -1
  37. package/dist/web/dist/matching/portraits/placeholder/jobs.txt +4 -4
  38. package/dist/web/dist/parselog.html +1 -1
  39. package/dist/web/dist/parselog.txt +4 -4
  40. package/dist/web/dist/recordings.html +1 -1
  41. package/dist/web/dist/recordings.txt +4 -4
  42. package/dist/web/dist/resource-usage.html +1 -1
  43. package/dist/web/dist/resource-usage.txt +4 -4
  44. package/dist/web/dist/shared/placeholder.html +1 -1
  45. package/dist/web/dist/shared/placeholder.txt +5 -5
  46. package/dist/web/dist/snapshots/placeholder/agent-prompt.html +1 -1
  47. package/dist/web/dist/snapshots/placeholder/agent-prompt.txt +4 -4
  48. package/dist/web/dist/talents.html +1 -1
  49. package/dist/web/dist/talents.txt +5 -5
  50. package/dist/web/dist/team/insights.html +1 -1
  51. package/dist/web/dist/team/insights.txt +4 -4
  52. package/package.json +3 -3
  53. package/dist/web/dist/_next/static/chunks/187-f067914dcd1330c2.js +0 -32
  54. package/dist/web/dist/_next/static/chunks/659-b23050764c004f5f.js +0 -1
  55. package/dist/web/dist/_next/static/chunks/728-cffab7e836020551.js +0 -12
  56. package/dist/web/dist/_next/static/chunks/app/jobs/page-fa83ce1b6c3b345d.js +0 -1
  57. package/dist/web/dist/_next/static/chunks/app/shared/[token]/page-fe2b986867d317c0.js +0 -1
  58. /package/dist/assets/extension/background/{service-worker.20261020181646.js → service-worker.20261023013927.js} +0 -0
  59. /package/dist/web/dist/_next/static/{tYFZz41gyWi4-BhxuxlGU → cC7rsTCys5_15wJ8BiPDm}/_buildManifest.js +0 -0
  60. /package/dist/web/dist/_next/static/{tYFZz41gyWi4-BhxuxlGU → cC7rsTCys5_15wJ8BiPDm}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="494f6eb8-c8a4-472b-875a-2d152aadb0a6",e._sentryDebugIdIdentifier="sentry-dbid-494f6eb8-c8a4-472b-875a-2d152aadb0a6")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[882],{46282:function(e,t,n){n.d(t,{rb:function(){return V},IX:function(){return A}});var r=n(53987),o=n(82942);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||(0,o.Z)(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a=n(78652),l=n(64570);function c(e,t,n){return(t=(0,l.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var d=n(60635),f=n(60662),h=n(58579),g=n(77134),p=n(36310),m=n(41414),v=n(38687),y=n(81603),b=n(90054);function x(e){var t=(0,y.Z)();return function(){var n,r=(0,v.Z)(e);return n=t?Reflect.construct(r,arguments,(0,v.Z)(this).constructor):r.apply(this,arguments),(0,b.Z)(this,n)}}var w=(0,g.Z)(function e(){(0,h.Z)(this,e)}),E="CALC_UNIT",C=RegExp(E,"g");function k(e){return"number"==typeof e?"".concat(e).concat(E):e}var F=function(e){(0,m.Z)(n,e);var t=x(n);function n(e,o){(0,h.Z)(this,n),i=t.call(this),c((0,p.Z)(i),"result",""),c((0,p.Z)(i),"unitlessCssVar",void 0),c((0,p.Z)(i),"lowPriority",void 0);var i,a=(0,r.Z)(e);return i.unitlessCssVar=o,e instanceof n?i.result="(".concat(e.result,")"):"number"===a?i.result=k(e):"string"===a&&(i.result=e),i}return(0,g.Z)(n,[{key:"add",value:function(e){return e instanceof n?this.result="".concat(this.result," + ").concat(e.getResult()):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," + ").concat(k(e))),this.lowPriority=!0,this}},{key:"sub",value:function(e){return e instanceof n?this.result="".concat(this.result," - ").concat(e.getResult()):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," - ").concat(k(e))),this.lowPriority=!0,this}},{key:"mul",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof n?this.result="".concat(this.result," * ").concat(e.getResult(!0)):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," * ").concat(e)),this.lowPriority=!1,this}},{key:"div",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof n?this.result="".concat(this.result," / ").concat(e.getResult(!0)):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," / ").concat(e)),this.lowPriority=!1,this}},{key:"getResult",value:function(e){return this.lowPriority||e?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(e){var t=this,n=(e||{}).unit,r=!0;return("boolean"==typeof n?r=n:Array.from(this.unitlessCssVar).some(function(e){return t.result.includes(e)})&&(r=!1),this.result=this.result.replace(C,r?"px":""),void 0!==this.lowPriority)?"calc(".concat(this.result,")"):this.result}}]),n}(w),S=function(e){(0,m.Z)(n,e);var t=x(n);function n(e){var r;return(0,h.Z)(this,n),r=t.call(this),c((0,p.Z)(r),"result",0),e instanceof n?r.result=e.result:"number"==typeof e&&(r.result=e),r}return(0,g.Z)(n,[{key:"add",value:function(e){return e instanceof n?this.result+=e.result:"number"==typeof e&&(this.result+=e),this}},{key:"sub",value:function(e){return e instanceof n?this.result-=e.result:"number"==typeof e&&(this.result-=e),this}},{key:"mul",value:function(e){return e instanceof n?this.result*=e.result:"number"==typeof e&&(this.result*=e),this}},{key:"div",value:function(e){return e instanceof n?this.result/=e.result:"number"==typeof e&&(this.result/=e),this}},{key:"equal",value:function(){return this.result}}]),n}(w),P=function(e,t){var n="css"===e?F:S;return function(e){return new n(e,t)}},I=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};n(13063);var O=function(e,t,n,r){var o=u({},t[e]);null!=r&&r.deprecatedTokens&&r.deprecatedTokens.forEach(function(e){var t,n=i(e,2),r=n[0],a=n[1];(null!=o&&o[r]||null!=o&&o[a])&&(null!==(t=o[a])&&void 0!==t||(o[a]=null==o?void 0:o[r]))});var a=u(u({},n),o);return Object.keys(a).forEach(function(e){a[e]===t[e]&&delete a[e]}),a},R="undefined"!=typeof CSSINJS_STATISTIC,N=!0;function A(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!R)return Object.assign.apply(Object,[{}].concat(t));N=!1;var o={};return t.forEach(function(e){"object"===(0,r.Z)(e)&&Object.keys(e).forEach(function(t){Object.defineProperty(o,t,{configurable:!0,enumerable:!0,get:function(){return e[t]}})})}),N=!0,o}var j={};function $(){}var M=function(e){var t,n=e,r=$;return R&&"undefined"!=typeof Proxy&&(t=new Set,n=new Proxy(e,{get:function(e,n){if(N){var r;null===(r=t)||void 0===r||r.add(n)}return e[n]}}),r=function(e,n){var r;j[e]={global:Array.from(t),component:u(u({},null===(r=j[e])||void 0===r?void 0:r.component),n)}}),{token:n,keys:t,flush:r}},z=function(e,t,n){if("function"==typeof n){var r;return n(A(t,null!==(r=t[e])&&void 0!==r?r:{}))}return null!=n?n:{}},Z=new(function(){function e(){(0,h.Z)(this,e),c(this,"map",new Map),c(this,"objectIDMap",new WeakMap),c(this,"nextID",0),c(this,"lastAccessBeat",new Map),c(this,"accessBeat",0)}return(0,g.Z)(e,[{key:"set",value:function(e,t){this.clear();var n=this.getCompositeKey(e);this.map.set(n,t),this.lastAccessBeat.set(n,Date.now())}},{key:"get",value:function(e){var t=this.getCompositeKey(e),n=this.map.get(t);return this.lastAccessBeat.set(t,Date.now()),this.accessBeat+=1,n}},{key:"getCompositeKey",value:function(e){var t=this;return e.map(function(e){return e&&"object"===(0,r.Z)(e)?"obj_".concat(t.getObjectID(e)):"".concat((0,r.Z)(e),"_").concat(e)}).join("|")}},{key:"getObjectID",value:function(e){if(this.objectIDMap.has(e))return this.objectIDMap.get(e);var t=this.nextID;return this.objectIDMap.set(e,t),this.nextID+=1,t}},{key:"clear",value:function(){var e=this;if(this.accessBeat>1e4){var t=Date.now();this.lastAccessBeat.forEach(function(n,r){t-n>6e5&&(e.map.delete(r),e.lastAccessBeat.delete(r))}),this.accessBeat=0}}}]),e}()),W=function(){return{}},V=function(e){var t=e.useCSP,n=void 0===t?W:t,o=e.useToken,l=e.usePrefix,s=e.getResetStyles,h=e.getCommonStyle,g=e.getCompUnitless;function p(t,a,c){var g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},p=Array.isArray(t)?t:[t,t],m=i(p,1)[0],v=p.join("-"),y=e.layer||{name:"antd"};return function(e){var t,i,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,b=o(),x=b.theme,w=b.realToken,E=b.hashId,C=b.token,k=b.cssVar,F=b.zeroRuntime;if((0,d.useMemo)(function(){return F},[]))return E;var S=l(),R=S.rootPrefixCls,N=S.iconPrefixCls,j=n(),$=(t=function(){var e=new Set;return Object.keys(g.unitless||{}).forEach(function(t){e.add((0,f.ks)(t,k.prefix)),e.add((0,f.ks)(t,I(m,k.prefix)))}),P("css",e)},i=["css",m,null==k?void 0:k.prefix],d.useMemo(function(){var e=Z.get(i);if(e)return e;var n=t();return Z.set(i,n),n},i)),W={max:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return"max(".concat(t.map(function(e){return(0,f.bf)(e)}).join(","),")")},min:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return"min(".concat(t.map(function(e){return(0,f.bf)(e)}).join(","),")")}},V=W.max,B=W.min,q={theme:x,token:C,hashId:E,nonce:function(){return j.nonce},clientOnly:g.clientOnly,layer:y,order:g.order||-999};return"function"==typeof s&&(0,f.xy)(u(u({},q),{},{clientOnly:!1,path:["Shared",R]}),function(){return s(C,{prefix:{rootPrefixCls:R,iconPrefixCls:N},csp:j})}),(0,f.xy)(u(u({},q),{},{path:[v,e,N]}),function(){if(!1===g.injectStyle)return[];var t=M(C),n=t.token,o=t.flush,i=z(m,w,c),l=".".concat(e),s=O(m,w,i,{deprecatedTokens:g.deprecatedTokens});i&&"object"===(0,r.Z)(i)&&Object.keys(i).forEach(function(e){i[e]="var(".concat((0,f.ks)(e,I(m,k.prefix)),")")});var u=A(n,{componentCls:l,prefixCls:e,iconCls:".".concat(N),antCls:".".concat(R),calc:$,max:V,min:B},i),d=a(u,{hashId:E,prefixCls:e,rootPrefixCls:R,iconPrefixCls:N});o(m,s);var v="function"==typeof h?h(u,e,p,g.resetFont):null;return[!1===g.resetStyle?null:v,d]}),E}}return{genStyleHooks:function(e,t,r,i){var l,s,d,h=Array.isArray(e)?e[0]:e;function m(e){return"".concat(String(h)).concat(e.slice(0,1).toUpperCase()).concat(e.slice(1))}var v=(null==i?void 0:i.unitless)||{},y=u(u({},"function"==typeof g?g(e):{}),{},c({},m("zIndexPopup"),!0));Object.keys(v).forEach(function(e){y[m(e)]=v[e]});var b=u(u({},i),{},{unitless:y,prefixToken:m}),x=p(e,t,r,b),w=(l=b.unitless,s=b.prefixToken,d=b.ignore,function(e){var t=o(),i=t.cssVar,a=t.realToken,c=n();return(0,f.CI)({path:[h],prefix:i.prefix,key:i.key,unitless:l,ignore:d,token:a,scope:e,nonce:function(){return c.nonce}},function(){var e=z(h,a,r),t=O(h,a,e,{deprecatedTokens:null==b?void 0:b.deprecatedTokens});return e&&Object.keys(e).forEach(function(e){t[s(e)]=t[e],delete t[e]}),t}),null==i?void 0:i.key});return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=x(e,t),r=null==i?void 0:i.extraCssVarPrefixCls,o="function"==typeof r?r({prefixCls:e,rootCls:t}):r;return[n,w(null!=o&&o.length?[t].concat((0,a.Z)(o)):t)]}},genSubStyleComponent:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=p(e,t,n,u({resetStyle:!1,order:-998},r));return function(e){var t=e.prefixCls,n=e.rootCls,r=void 0===n?t:n;return o(t,r),null}},genComponentStyleHook:p}}},11356:function(e,t,n){n.d(t,{Z:function(){return w}});var r=n(60635),o=n(86937),i=n(46139);let a="data-rc-order",l="data-rc-priority",c=new Map;function s(){return!!("undefined"!=typeof window&&window.document&&window.document.createElement)}function u(){let{mark:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e?e.startsWith("data-")?e:"data-".concat(e):"rc-util-key"}function d(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function f(e){return Array.from((c.get(e)||e).children).filter(e=>"STYLE"===e.tagName)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!s())return null;let{csp:n,prepend:r,priority:o=0}=t,i="queue"===r?"prependQueue":r?"prepend":"append",c="prependQueue"===i,u=document.createElement("style");u.setAttribute(a,i),c&&o&&u.setAttribute(l,"".concat(o)),(null==n?void 0:n.nonce)&&(u.nonce=n.nonce),u.innerHTML=e;let h=d(t),{firstChild:g}=h;if(r){if(c){let e=(t.styles||f(h)).filter(e=>!!["prepend","prependQueue"].includes(e.getAttribute(a))&&o>=Number(e.getAttribute(l)||0));if(e.length)return h.insertBefore(u,e[e.length-1].nextSibling),u}h.insertBefore(u,g)}else h.appendChild(u);return u}let g={};function p(e,t){var n;n="[@ant-design/icons] ".concat(t),e||g[n]||(g[n]=!0)}function m(e){return null!==e&&"object"==typeof e&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"==typeof e.icon||"function"==typeof e.icon)}function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((t,n)=>{let r=e[n];return"class"===n?(t.className=r,delete t.class):(delete t[n],t[n.replace(/-(.)/g,(e,t)=>t.toUpperCase())]=r),t},{})}let y=e=>{let{csp:t,prefixCls:n,layer:o,zeroRuntime:a}=(0,r.useContext)(i.Z),l="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n vertical-align: inherit;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin {\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";n&&(l=l.replace(/anticon/g,n)),o&&(l="@layer ".concat(o," {\n").concat(l,"\n}")),(0,r.useEffect)(()=>{if(a)return;let n=function(e){var t;let n=null==e?void 0:null===(t=e.getRootNode)||void 0===t?void 0:t.call(e);return"undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot?n:null}(e.current);!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!s())return;let r=d(n),o=f(r),i={...n,styles:o};!function(e,t){let n=c.get(e);if(!n||!function(e,t){if(!e||!t)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){let n=h("",t);if(!n)return;let{parentNode:r}=n;c.set(e,r),e.removeChild(n)}}(r,i);let a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{styles:n}=t;return n||(n=f(d(t))),n.find(n=>n.getAttribute(u(t))===e)}(t,i);if(a){var l;return(null===(l=i.csp)||void 0===l?void 0:l.nonce)&&a.nonce!==i.csp.nonce&&(a.nonce=i.csp.nonce),a.innerHTML!==e&&(a.innerHTML=e)}let g=h(e,i);null==g||g.setAttribute(u(i),t)}(l,"@ant-design-icons",{prepend:!o,csp:t,attachTo:n})},[])},b=e=>{let{icon:t,className:n,onClick:o,style:i,primaryColor:a,secondaryColor:l,...c}=e,s=r.useRef(null);return(y(s),p(m(t),"icon should be icon definiton, but got ".concat(typeof t)),m(t))?function e(t,n,o){return o?r.createElement(t.tag,{key:n,...v(t.attrs),...o},(t.children||[]).map((r,o)=>e(r,"".concat(n,"-").concat(t.tag,"-").concat(o)))):r.createElement(t.tag,{key:n,...v(t.attrs)},(t.children||[]).map((r,o)=>e(r,"".concat(n,"-").concat(t.tag,"-").concat(o))))}(t.icon,"svg-".concat(t.name),{className:n,onClick:o,style:i,"data-icon":t.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...c,ref:s}):null};function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}b.displayName="IconReact";var w=r.forwardRef((e,t)=>{let{className:n,icon:a,spin:l,rotate:c,tabIndex:s,onClick:u,twoToneColor:d,...f}=e,{prefixCls:h="anticon",rootClassName:g}=r.useContext(i.Z);if(p(m(a),"icon should be icon definiton, but got ".concat(typeof a)),!m(a))return null;let v=(0,o.W)(g,h,{["".concat(h,"-").concat(a.name)]:!!a.name,["".concat(h,"-spin")]:!!l||"loading"===a.name},n),y=s;return void 0===y&&u&&(y=-1),r.createElement("span",x({role:"img","aria-label":a.name},f,{ref:t,tabIndex:y,onClick:u,className:v}),r.createElement(b,{icon:a,style:c?{msTransform:"rotate(".concat(c,"deg)"),transform:"rotate(".concat(c,"deg)")}:void 0}))})},41919:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(60635),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},i=n(11356);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=r.forwardRef((e,t)=>r.createElement(i.Z,a({},e,{ref:t,icon:o})))},45861:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(60635),o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},i=n(11356);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=r.forwardRef((e,t)=>r.createElement(i.Z,a({},e,{ref:t,icon:o})))},26622:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(60635),o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},i=n(11356);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=r.forwardRef((e,t)=>r.createElement(i.Z,a({},e,{ref:t,icon:o})))},7973:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(60635),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},i=n(11356);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=r.forwardRef((e,t)=>r.createElement(i.Z,a({},e,{ref:t,icon:o})))},23298:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(60635),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},i=n(11356);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=r.forwardRef((e,t)=>r.createElement(i.Z,a({},e,{ref:t,icon:o})))},82538:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(60635),o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},i=n(11356);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=r.forwardRef((e,t)=>r.createElement(i.Z,a({},e,{ref:t,icon:o})))},22266:function(e,t,n){n.d(t,{Il:function(){return l}}),n(60635);var r,o=n(21762);let i=e=>Math.round(Number(e||0)),a=e=>{if(e instanceof o.t)return e;if(e&&"object"==typeof e&&"h"in e&&"b"in e){let{b:t,...n}=e;return{...n,v:t}}return"string"==typeof e&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e};class l extends o.t{constructor(e){super(a(e))}toHsbString(){let e=this.toHsb(),t=i(100*e.s),n=i(100*e.b),r=i(e.h),o=e.a,a=`hsb(${r}, ${t}%, ${n}%)`,l=`hsba(${r}, ${t}%, ${n}%, ${o.toFixed(0===o?0:2)})`;return 1===o?a:l}toHsb(){let{v:e,...t}=this.toHsv();return{...t,b:e,a:this.a}}}(r="#1677ff")instanceof l||new l(r),n(13063)},60620:function(e,t,n){let r;n.d(t,{gN:function(){return J},zb:function(){return c},RV:function(){return ei},aV:function(){return Q},ZM:function(){return s},ZP:function(){return eu},cI:function(){return er},qo:function(){return ec}});var o=n(60635),i=n(13063);let a="RC_FORM_INTERNAL_HOOKS",l=()=>{(0,i.warning)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")};var c=o.createContext({getFieldValue:l,getFieldsValue:l,getFieldError:l,getFieldWarning:l,getFieldsError:l,isFieldsTouched:l,isFieldTouched:l,isFieldValidating:l,isFieldsValidating:l,resetFields:l,setFields:l,setFieldValue:l,setFieldsValue:l,validateFields:l,submit:l,getInternalHooks:()=>(l(),{dispatch:l,initEntityValue:l,registerField:l,useSubscribe:l,setInitialValues:l,destroyForm:l,setCallbacks:l,registerWatch:l,getFields:l,setValidateMessages:l,setPreserve:l,getInitialValue:l})}),s=o.createContext(null);function u(e){return null==e?[]:Array.isArray(e)?e:[e]}function d(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){let e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}let f=d();var h=n(60529);let g=/%[sdj%]/g,p=()=>{};function m(e){if(!e||!e.length)return null;let t={};return e.forEach(e=>{let n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function v(e,...t){let n=0,r=t.length;return"function"==typeof e?e.apply(null,t):"string"==typeof e?e.replace(g,e=>{if("%%"===e)return"%";if(n>=r)return e;switch(e){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch(e){return"[Circular]"}break;default:return e}}):e}function y(e,t){return!!(null==e||"array"===t&&Array.isArray(e)&&!e.length)||("string"===t||"url"===t||"hex"===t||"email"===t||"date"===t||"pattern"===t||"tel"===t)&&"string"==typeof e&&!e}function b(e,t,n){let r=0,o=e.length;!function i(a){if(a&&a.length){n(a);return}let l=r;r+=1,l<o?t(e[l],i):n([])}([])}void 0!==h&&h.env;class x extends Error{errors;fields;constructor(e,t){super("Async Validation Error"),this.errors=e,this.fields=t}}function w(e,t){return n=>{let r;return(r=e.fullFields?function(e,t){let n=e;for(let e=0;e<t.length&&void 0!=n;e++)n=n[t[e]];return n}(t,e.fullFields):t[n.field||e.fullField],n&&void 0!==n.message)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:"function"==typeof n?n():n,fieldValue:r,field:n.field||e.fullField}}}function E(e,t){if(t){for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];"object"==typeof r&&"object"==typeof e[n]?e[n]={...e[n],...r}:e[n]=r}}return e}let C="enum";var k=(e,t,n,r,o,i)=>{e.required&&(!n.hasOwnProperty(e.field)||y(t,i||e.type))&&r.push(v(o.messages.required,e.fullField))},F=()=>{if(r)return r;let e="[a-fA-F\\d:]",t=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|$))`:"",n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",o="[a-fA-F\\d]{1,4}",i=[`(?:${o}:){7}(?:${o}|:)`,`(?:${o}:){6}(?:${n}|:${o}|:)`,`(?:${o}:){5}(?::${n}|(?::${o}){1,2}|:)`,`(?:${o}:){4}(?:(?::${o}){0,1}:${n}|(?::${o}){1,3}|:)`,`(?:${o}:){3}(?:(?::${o}){0,2}:${n}|(?::${o}){1,4}|:)`,`(?:${o}:){2}(?:(?::${o}){0,3}:${n}|(?::${o}){1,5}|:)`,`(?:${o}:){1}(?:(?::${o}){0,4}:${n}|(?::${o}){1,6}|:)`,`(?::(?:(?::${o}){0,5}:${n}|(?::${o}){1,7}|:))`],a=`(?:${i.join("|")})(?:%[0-9a-zA-Z]{1,})?`,l=RegExp(`(?:^${n}$)|(?:^${a}$)`),c=RegExp(`^${n}$`),s=RegExp(`^${a}$`),u=e=>e&&e.exact?l:RegExp(`(?:${t(e)}${n}${t(e)})|(?:${t(e)}${a}${t(e)})`,"g");u.v4=e=>e&&e.exact?c:RegExp(`${t(e)}${n}${t(e)}`,"g"),u.v6=e=>e&&e.exact?s:RegExp(`${t(e)}${a}${t(e)}`,"g");let d=u.v4().source,f=u.v6().source,h=`(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))`,g=`(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${d}|${f}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*${h})(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return r=RegExp(`(?:^${g}$)`,"i")};let S={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},P={integer:e=>P.number(e)&&parseInt(e,10)===e,float:e=>P.number(e)&&!P.integer(e),array:e=>Array.isArray(e),regexp(e){if(e instanceof RegExp)return!0;try{return new RegExp(e),!0}catch(e){return!1}},date:e=>"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime()),number:e=>!isNaN(e)&&"number"==typeof e,object:e=>"object"==typeof e&&!P.array(e),method:e=>"function"==typeof e,email:e=>"string"==typeof e&&e.length<=320&&!!e.match(S.email),tel:e=>"string"==typeof e&&e.length<=32&&!!e.match(S.tel),url:e=>"string"==typeof e&&e.length<=2048&&!!e.match(F()),hex:e=>"string"==typeof e&&!!e.match(S.hex)};var I={required:k,whitespace:(e,t,n,r,o)=>{(/^\s+$/.test(t)||""===t)&&r.push(v(o.messages.whitespace,e.fullField))},type:(e,t,n,r,o)=>{if(e.required&&void 0===t){k(e,t,n,r,o);return}let i=e.type;["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"].indexOf(i)>-1?P[i](t)||r.push(v(o.messages.types[i],e.fullField,e.type)):i&&typeof t!==e.type&&r.push(v(o.messages.types[i],e.fullField,e.type))},range:(e,t,n,r,o)=>{let i="number"==typeof e.len,a="number"==typeof e.min,l="number"==typeof e.max,c=t,s=null,u="number"==typeof t,d="string"==typeof t,f=Array.isArray(t);if(u?s="number":d?s="string":f&&(s="array"),!s)return!1;f&&(c=t.length),d&&(c=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),i?c!==e.len&&r.push(v(o.messages[s].len,e.fullField,e.len)):a&&!l&&c<e.min?r.push(v(o.messages[s].min,e.fullField,e.min)):l&&!a&&c>e.max?r.push(v(o.messages[s].max,e.fullField,e.max)):a&&l&&(c<e.min||c>e.max)&&r.push(v(o.messages[s].range,e.fullField,e.min,e.max))},enum:(e,t,n,r,o)=>{e[C]=Array.isArray(e[C])?e[C]:[],-1===e[C].indexOf(t)&&r.push(v(o.messages[C],e.fullField,e[C].join(", ")))},pattern:(e,t,n,r,o)=>{!e.pattern||(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(v(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"!=typeof e.pattern||new RegExp(e.pattern).test(t)||r.push(v(o.messages.pattern.mismatch,e.fullField,t,e.pattern)))}},O=(e,t,n,r,o)=>{let i=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t,i)&&!e.required)return n();I.required(e,t,r,a,o,i),y(t,i)||I.type(e,t,r,a,o)}n(a)},R={string:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t,"string")&&!e.required)return n();I.required(e,t,r,i,o,"string"),y(t,"string")||(I.type(e,t,r,i,o),I.range(e,t,r,i,o),I.pattern(e,t,r,i,o),!0===e.whitespace&&I.whitespace(e,t,r,i,o))}n(i)},method:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t)&&!e.required)return n();I.required(e,t,r,i,o),void 0!==t&&I.type(e,t,r,i,o)}n(i)},number:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),y(t)&&!e.required)return n();I.required(e,t,r,i,o),void 0!==t&&(I.type(e,t,r,i,o),I.range(e,t,r,i,o))}n(i)},boolean:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t)&&!e.required)return n();I.required(e,t,r,i,o),void 0!==t&&I.type(e,t,r,i,o)}n(i)},regexp:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t)&&!e.required)return n();I.required(e,t,r,i,o),y(t)||I.type(e,t,r,i,o)}n(i)},integer:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t)&&!e.required)return n();I.required(e,t,r,i,o),void 0!==t&&(I.type(e,t,r,i,o),I.range(e,t,r,i,o))}n(i)},float:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t)&&!e.required)return n();I.required(e,t,r,i,o),void 0!==t&&(I.type(e,t,r,i,o),I.range(e,t,r,i,o))}n(i)},array:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();I.required(e,t,r,i,o,"array"),null!=t&&(I.type(e,t,r,i,o),I.range(e,t,r,i,o))}n(i)},object:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t)&&!e.required)return n();I.required(e,t,r,i,o),void 0!==t&&I.type(e,t,r,i,o)}n(i)},enum:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t)&&!e.required)return n();I.required(e,t,r,i,o),void 0!==t&&I.enum(e,t,r,i,o)}n(i)},pattern:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t,"string")&&!e.required)return n();I.required(e,t,r,i,o),y(t,"string")||I.pattern(e,t,r,i,o)}n(i)},date:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t,"date")&&!e.required)return n();if(I.required(e,t,r,i,o),!y(t,"date")){let n;n=t instanceof Date?t:new Date(t),I.type(e,n,r,i,o),n&&I.range(e,n.getTime(),r,i,o)}}n(i)},url:O,hex:O,email:O,tel:O,required:(e,t,n,r,o)=>{let i=[],a=Array.isArray(t)?"array":typeof t;I.required(e,t,r,i,o,a),n(i)},any:(e,t,n,r,o)=>{let i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(y(t)&&!e.required)return n();I.required(e,t,r,i,o)}n(i)}};class N{static register=function(e,t){if("function"!=typeof t)throw Error("Cannot register a validator by type, validator is not a function");R[e]=t};static warning=p;static messages=f;static validators=R;rules=null;_messages=f;constructor(e){this.define(e)}define(e){if(!e)throw Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw Error("Rules must be an object");this.rules={},Object.keys(e).forEach(t=>{let n=e[t];this.rules[t]=Array.isArray(n)?n:[n]})}messages(e){return e&&(this._messages=E(d(),e)),this._messages}validate(e,t={},n=()=>{}){let r=e,o=t,i=n;if("function"==typeof o&&(i=o,o={}),!this.rules||0===Object.keys(this.rules).length)return i&&i(null,r),Promise.resolve(r);if(o.messages){let e=this.messages();e===f&&(e=d()),E(e,o.messages),o.messages=e}else o.messages=this.messages();let a={};(o.keys||Object.keys(this.rules)).forEach(t=>{let n=this.rules[t],o=r[t];n.forEach(n=>{let i=n;"function"==typeof i.transform&&(r===e&&(r={...r}),null!=(o=r[t]=i.transform(o))&&(i.type=i.type||(Array.isArray(o)?"array":typeof o))),(i="function"==typeof i?{validator:i}:{...i}).validator=this.getValidationMethod(i),i.validator&&(i.field=t,i.fullField=i.fullField||t,i.type=this.getType(i),a[t]=a[t]||[],a[t].push({rule:i,value:o,source:r,field:t}))})});let l={};return function(e,t,n,r,o){if(t.first){let t=new Promise((t,i)=>{b(function(e){let t=[];return Object.keys(e).forEach(n=>{t.push(...e[n]||[])}),t}(e),n,e=>(r(e),e.length?i(new x(e,m(e))):t(o)))});return t.catch(e=>e),t}let i=!0===t.firstFields?Object.keys(e):t.firstFields||[],a=Object.keys(e),l=a.length,c=0,s=[],u=new Promise((t,u)=>{let d=e=>{if(s.push.apply(s,e),++c===l)return r(s),s.length?u(new x(s,m(s))):t(o)};a.length||(r(s),t(o)),a.forEach(t=>{let r=e[t];-1!==i.indexOf(t)?b(r,n,d):function(e,t,n){let r=[],o=0,i=e.length;function a(e){r.push(...e||[]),++o===i&&n(r)}e.forEach(e=>{t(e,a)})}(r,n,d)})});return u.catch(e=>e),u}(a,o,(e,t)=>{let n;let i=e.rule,a=("object"===i.type||"array"===i.type)&&("object"==typeof i.fields||"object"==typeof i.defaultField);function c(e,t){return{...t,fullField:`${i.fullField}.${e}`,fullFields:i.fullFields?[...i.fullFields,e]:[e]}}function s(n=[]){let s=Array.isArray(n)?n:[n];!o.suppressWarning&&s.length&&N.warning("async-validator:",s),s.length&&void 0!==i.message&&null!==i.message&&(s=[].concat(i.message));let u=s.map(w(i,r));if(o.first&&u.length)return l[i.field]=1,t(u);if(a){if(i.required&&!e.value)return void 0!==i.message?u=[].concat(i.message).map(w(i,r)):o.error&&(u=[o.error(i,v(o.messages.required,i.field))]),t(u);let n={};i.defaultField&&Object.keys(e.value).map(e=>{n[e]=i.defaultField});let a={};Object.keys(n={...n,...e.rule.fields}).forEach(e=>{let t=n[e],r=Array.isArray(t)?t:[t];a[e]=r.map(c.bind(null,e))});let l=new N(a);l.messages(o.messages),e.rule.options&&(e.rule.options.messages=o.messages,e.rule.options.error=o.error),l.validate(e.value,e.rule.options||o,e=>{let n=[];u&&u.length&&n.push(...u),e&&e.length&&n.push(...e),t(n.length?n:null)})}else t(u)}if(a=a&&(i.required||!i.required&&e.value),i.field=e.field,i.asyncValidator)n=i.asyncValidator(i,e.value,s,e.source,o);else if(i.validator){try{n=i.validator(i,e.value,s,e.source,o)}catch(e){console.error?.(e),o.suppressValidatorError||setTimeout(()=>{throw e},0),s(e.message)}!0===n?s():!1===n?s("function"==typeof i.message?i.message(i.fullField||i.field):i.message||`${i.fullField||i.field} fails`):n instanceof Array?s(n):n instanceof Error&&s(n.message)}n&&n.then&&n.then(()=>s(),e=>s(e))},e=>{!function(e){let t=[],n={};for(let n=0;n<e.length;n++){var o;Array.isArray(o=e[n])?t=t.concat(...o):t.push(o)}t.length?(n=m(t),i(t,n)):i(null,r)}(e)},r)}getType(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!R.hasOwnProperty(e.type))throw Error(v("Unknown rule type %s",e.type));return e.type||"string"}getValidationMethod(e){if("function"==typeof e.validator)return e.validator;let t=Object.keys(e),n=t.indexOf("message");return(-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0])?R.required:R[this.getType(e)]||void 0}}let A="'${name}' is not a valid ${type}",j={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:A,method:A,array:A,object:A,number:A,date:A,boolean:A,integer:A,float:A,regexp:A,email:A,tel:A,url:A,hex:A},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},$="CODE_LOGIC_ERROR";async function M(e,t,n,r,a){let l={...n};if(delete l.ruleIndex,N.warning=()=>void 0,l.validator){let e=l.validator;l.validator=(...t)=>{try{return e(...t)}catch(e){return console.error(e),Promise.reject($)}}}let c=null;l&&"array"===l.type&&l.defaultField&&(c=l.defaultField,delete l.defaultField);let s=new N({[e]:[l]}),u=(0,i.TS)(j,r.validateMessages);s.messages(u);let d=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(e){e.errors&&(d=e.errors.map(({message:e},t)=>{let n=e===$?u.default:e;return o.isValidElement(n)?o.cloneElement(n,{key:`error_${t}`}):n}))}if(!d.length&&c&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((t,n)=>M(`${e}.${n}`,t,c,r,a)))).reduce((e,t)=>[...e,...t],[]);let f={...n,name:e,enum:(n.enum||[]).join(", "),...a};return d.map(e=>"string"==typeof e?e.replace(/\\?\$\{\w+\}/g,e=>e.startsWith("\\")?e.slice(1):f[e.slice(2,-1)]):e)}async function z(e){return Promise.all(e).then(e=>[].concat(...e))}async function Z(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(r=>{r.errors.length&&n([r]),(t+=1)===e.length&&n([])})})})}function W(e){return u(e)}function V(e,t){let n={};return t.forEach(t=>{let r=(0,i.U2)(e,t);n=(0,i.t8)(n,t,r)}),n}function B(e,t,n=!1){return e&&e.some(e=>q(t,e,n))}function q(e,t,n=!1){return!!e&&!!t&&(!!n||e.length===t.length)&&t.every((t,n)=>e[n]===t)}function H(e,t,n){let{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;let o=e[t],i=t-n;return i>0?[...e.slice(0,n),o,...e.slice(n,t),...e.slice(t+1,r)]:i<0?[...e.slice(0,t),...e.slice(t+1,n+1),o,...e.slice(n+1,r)]:e}let D=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)};class T{namePathList=[];taskId=0;watcherList=new Set;form;constructor(e){this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(e=>{this.namePathList.every(t=>!q(t,e))&&this.namePathList.push(e)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;D(()=>{if(e===this.taskId&&this.watcherList.size){let e=this.form.getForm(),t=e.getFieldsValue(),n=e.getFieldsValue(!0);this.watcherList.forEach(e=>{e(t,n,this.namePathList)}),this.namePathList=[]}})}}async function L(){return new Promise(e=>{D(()=>{(0,i.Wn)(()=>{e()})})})}function _(){return(_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let U=[],G=[];function X(e,t,n,r,o,i){return"function"==typeof e?e(t,n,"source"in i?{source:i.source}:{}):r!==o}class Y extends o.PureComponent{static contextType=c;state={resetCount:0};cancelRegisterFunc=null;mounted=!1;touched=!1;dirty=!1;validatePromise;prevValidating;errors=U;warnings=G;constructor(e){if(super(e),e.fieldContext){let{getInternalHooks:t}=e.fieldContext,{initEntityValue:n}=t(a);n(this)}}componentDidMount(){let{shouldUpdate:e,fieldContext:t}=this.props;if(this.mounted=!0,t){let{getInternalHooks:e}=t,{registerField:n}=e(a);this.cancelRegisterFunc=n(this)}!0===e&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}cancelRegister=()=>{let{preserve:e,isListField:t,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(t,e,W(n)),this.cancelRegisterFunc=null};getNamePath=()=>{let{name:e,fieldContext:t}=this.props,{prefixName:n=[]}=t;return void 0!==e?[...n,...e]:[]};getRules=()=>{let{rules:e=[],fieldContext:t}=this.props;return e.map(e=>"function"==typeof e?e(t):e)};reRender(){this.mounted&&this.forceUpdate()}refresh=()=>{this.mounted&&this.setState(({resetCount:e})=>({resetCount:e+1}))};metaCache=null;triggerMetaEvent=e=>{let{onMetaChange:t}=this.props;if(t){let n={...this.getMeta(),destroy:e};(0,i.Xy)(this.metaCache,n)||t(n),this.metaCache=n}else this.metaCache=null};onStoreChange=(e,t,n)=>{let{shouldUpdate:r,dependencies:o=[],onReset:a}=this.props,{store:l}=n,c=this.getNamePath(),s=this.getValue(e),u=this.getValue(l),d=t&&B(t,c);switch("valueUpdate"!==n.type||"external"!==n.source||(0,i.Xy)(s,u)||(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=U,this.warnings=G,this.triggerMetaEvent()),n.type){case"reset":if(!t||d){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=U,this.warnings=G,this.triggerMetaEvent(),a?.(),this.refresh();return}break;case"remove":if(r&&X(r,e,l,s,u,n)){this.reRender();return}break;case"setField":{let{data:o}=n;if(d){"touched"in o&&(this.touched=o.touched),"validating"in o&&!("originRCField"in o)&&(this.validatePromise=o.validating?Promise.resolve([]):null),"errors"in o&&(this.errors=o.errors||U),"warnings"in o&&(this.warnings=o.warnings||G),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}if("value"in o&&B(t,c,!0)||r&&!c.length&&X(r,e,l,s,u,n)){this.reRender();return}break}case"dependenciesUpdate":if(o.map(W).some(e=>B(n.relatedFields,e))){this.reRender();return}break;default:if(d||(!o.length||c.length||r)&&X(r,e,l,s,u,n)){this.reRender();return}}!0===r&&this.reRender()};validateRules=e=>{let t=this.getNamePath(),n=this.getValue(),{triggerName:r,validateOnly:o=!1,delayFrame:a}=e||{},l=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:o=!1,messageVariables:c,validateDebounce:s}=this.props;a&&await L();let d=this.getRules();if(r&&(d=d.filter(e=>e).filter(e=>{let{validateTrigger:t}=e;return!t||u(t).includes(r)})),s&&r&&(await new Promise(e=>{setTimeout(e,s)}),this.validatePromise!==l))return[];let f=function(e,t,n,r,o,a){let l;let c=e.join("."),s=n.map((e,t)=>{let n=e.validator,r={...e,ruleIndex:t};return n&&(r.validator=(e,t,r)=>{let o=!1,a=n(e,t,(...e)=>{Promise.resolve().then(()=>{(0,i.warning)(!o,"Your validator function has already return a promise. `callback` will be ignored."),o||r(...e)})});o=a&&"function"==typeof a.then&&"function"==typeof a.catch,(0,i.warning)(o,"`callback` is deprecated. Please return a promise instead."),o&&a.then(()=>{r()}).catch(e=>{r(e||" ")})}),r}).sort(({warningOnly:e,ruleIndex:t},{warningOnly:n,ruleIndex:r})=>!!e==!!n?t-r:e?1:-1);if(!0===o)l=new Promise(async(e,n)=>{for(let e=0;e<s.length;e+=1){let o=s[e],i=await M(c,t,o,r,a);if(i.length){n([{errors:i,rule:o}]);return}}e([])});else{let e=s.map(e=>M(c,t,e,r,a).then(t=>({errors:t,rule:e})));l=(o?Z(e):z(e)).then(e=>Promise.reject(e))}return l.catch(e=>e),l}(t,n,d,e,o,c);return f.catch(e=>e).then((e=U)=>{if(this.validatePromise===l){this.validatePromise=null;let t=[],n=[];e.forEach?.(({rule:{warningOnly:e},errors:r=U})=>{e?n.push(...r):t.push(...r)}),this.errors=t,this.warnings=n,this.triggerMetaEvent(),this.reRender()}}),f});return o||(this.validatePromise=l,this.dirty=!0,this.errors=U,this.warnings=G,this.triggerMetaEvent(),this.reRender()),l};isFieldValidating=()=>!!this.validatePromise;isFieldTouched=()=>this.touched;isFieldDirty=()=>{if(this.dirty||void 0!==this.props.initialValue)return!0;let{fieldContext:e}=this.props,{getInitialValue:t}=e.getInternalHooks(a);return void 0!==t(this.getNamePath())};getErrors=()=>this.errors;getWarnings=()=>this.warnings;isListField=()=>this.props.isListField;isList=()=>this.props.isList;isPreserve=()=>this.props.preserve;getMeta=()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:null===this.validatePromise});getOnlyChild=e=>{if("function"==typeof e){let t=this.getMeta();return{...this.getOnlyChild(e(this.getControlled(),t,this.props.fieldContext)),isFunction:!0}}let t=(0,i.qo)(e);return 1===t.length&&o.isValidElement(t[0])?{child:t[0],isFunction:!1}:{child:t,isFunction:!1}};getValue=e=>{let{getFieldsValue:t}=this.props.fieldContext,n=this.getNamePath();return(0,i.U2)(e||t(!0),n)};getControlled=(e={})=>{let{name:t,trigger:n="onChange",validateTrigger:r,getValueFromEvent:o,normalize:i,valuePropName:l="value",getValueProps:c,fieldContext:s}=this.props,d=void 0!==r?r:s.validateTrigger,f=this.getNamePath(),{getInternalHooks:h,getFieldsValue:g}=s,{dispatch:p}=h(a),m=this.getValue(),v=c||(e=>({[l]:e})),y=e[n],b=void 0!==t?v(m):{},x={...e,...b};return x[n]=(...e)=>{let t;this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let n=this.getValue();t=o?o(...e):function(e,...t){let n=t[0];return n&&n.target&&"object"==typeof n.target&&e in n.target?n.target[e]:n}(l,...e),i&&(t=i(t,n,g(!0))),t!==n&&p({type:"updateValue",namePath:f,value:t}),y&&y(...e)},u(d||[]).forEach(e=>{let t=x[e];x[e]=(...n)=>{t&&t(...n);let{rules:r}=this.props;r&&r.length&&p({type:"validateField",namePath:f,triggerName:e})}}),x};render(){let e;let{resetCount:t}=this.state,{children:n}=this.props,{child:r,isFunction:a}=this.getOnlyChild(n);return a?e=r:o.isValidElement(r)?e=o.cloneElement(r,this.getControlled(r.props)):((0,i.warning)(!r,"`children` of Field is not validate ReactElement."),e=r),o.createElement(o.Fragment,{key:t},e)}}var J=function({name:e,...t}){let n=o.useContext(c),r=o.useContext(s),i=void 0!==e?W(e):void 0,a=t.isListField??!!r,l="keep";return a||(l=`_${(i||[]).join("_")}`),o.createElement(Y,_({key:l,name:i,isListField:a},t,{fieldContext:n}))},Q=function({name:e,initialValue:t,children:n,rules:r,validateTrigger:a,isListField:l}){let u=o.useContext(c),d=o.useContext(s),f=o.useRef({keys:[],id:0}).current,h=o.useMemo(()=>[...W(u.prefixName)||[],...W(e)],[u.prefixName,e]),g=o.useMemo(()=>({...u,prefixName:h}),[u,h]),p=o.useMemo(()=>({getKey:e=>{let t=h.length,n=e[t];return[f.keys[n],e.slice(t+1)]}}),[f,h]);return"function"!=typeof n?((0,i.warning)(!1,"Form.List only accepts function as children."),null):o.createElement(s.Provider,{value:p},o.createElement(c.Provider,{value:g},o.createElement(J,{name:[],shouldUpdate:(e,t,{source:n})=>"internal"!==n&&e!==t,rules:r,validateTrigger:a,initialValue:t,isList:!0,isListField:l??!!d},({value:e=[],onChange:t},r)=>{let{getFieldValue:o}=u,i=()=>o(h||[])||[],a=e||[];return Array.isArray(a)||(a=[]),n(a.map((e,t)=>{let n=f.keys[t];return void 0===n&&(f.keys[t]=f.id,n=f.keys[t],f.id+=1),{name:t,key:n,isListField:!0}}),{add:(e,n)=>{let r=i();n>=0&&n<=r.length?(f.keys=[...f.keys.slice(0,n),f.id,...f.keys.slice(n)],t([...r.slice(0,n),e,...r.slice(n)])):(f.keys=[...f.keys,f.id],t([...r,e])),f.id+=1},remove:e=>{let n=i(),r=new Set(Array.isArray(e)?e:[e]);r.size<=0||(f.keys=f.keys.filter((e,t)=>!r.has(t)),t(n.filter((e,t)=>!r.has(t))))},move(e,n){if(e===n)return;let r=i();e<0||e>=r.length||n<0||n>=r.length||(f.keys=H(f.keys,e,n),t(H(r,e,n)))}},r)})))};let K="__@field_split__";function ee(e){return e.map(e=>`${typeof e}:${e}`).join(K)}class et{kvs=new Map;set(e,t){this.kvs.set(ee(e),t)}get(e){return this.kvs.get(ee(e))}getAsPrefix(e){let t=ee(e),n=t+K,r=[],o=this.kvs.get(t);return void 0!==o&&r.push(o),this.kvs.forEach((e,t)=>{t.startsWith(n)&&r.push(e)}),r}update(e,t){let n=t(this.get(e));n?this.set(e,n):this.delete(e)}delete(e){this.kvs.delete(ee(e))}map(e){return[...this.kvs.entries()].map(([t,n])=>e({key:t.split(K).map(e=>{let[,t,n]=e.match(/^([^:]*):(.*)$/);return"number"===t?Number(n):n}),value:n}))}toJSON(){let e={};return this.map(({key:t,value:n})=>(e[t.join(".")]=n,null)),e}}class en{formHooked=!1;forceRootUpdate;subscribable=!0;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;watcherCenter=new T(this);constructor(e){this.forceRootUpdate=e}getForm=()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks});getInternalHooks=e=>e===a?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):((0,i.warning)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null);useSubscribe=e=>{this.subscribable=e};prevWithoutPreserves=null;setInitialValues=(e,t)=>{if(this.initialValues=e||{},t){let t=(0,i.TS)(e,this.store);this.prevWithoutPreserves?.map(({key:n})=>{t=i.t8(t,n,i.U2(e,n))}),this.prevWithoutPreserves=null,this.updateStore(t)}};destroyForm=e=>{if(e)this.updateStore({});else{let e=new et;this.getFieldEntities(!0).forEach(t=>{this.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)}),this.prevWithoutPreserves=e}};getInitialValue=e=>{let t=(0,i.U2)(this.initialValues,e);return e.length?(0,i.TS)(t):t};setCallbacks=e=>{this.callbacks=e};setValidateMessages=e=>{this.validateMessages=e};setPreserve=e=>{this.preserve=e};registerWatch=e=>this.watcherCenter.register(e);notifyWatch=(e=[])=>{this.watcherCenter.notify(e)};timeoutId=null;warningUnhooked=()=>{};updateStore=e=>{this.store=e};getFieldEntities=(e=!1)=>e?this.fieldEntities.filter(e=>e.getNamePath().length):this.fieldEntities;getFieldsMap=(e=!1)=>{let t=new et;return this.getFieldEntities(e).forEach(e=>{let n=e.getNamePath();t.set(n,e)}),t};getFieldEntitiesForNamePathList=(e,t=!1)=>{if(!e)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return t?e.flatMap(e=>{let t=W(e),r=n.getAsPrefix(t);return r.length?r:[{INVALIDATE_NAME_PATH:t}]}):e.map(e=>{let t=W(e);return n.get(t)||{INVALIDATE_NAME_PATH:W(e)}})};getFieldsValue=(e,t)=>{let n,r;if(this.warningUnhooked(),!0===e||Array.isArray(e)?(n=e,r=t):e&&"object"==typeof e&&(r=e.filter),!0===n&&!r)return this.store;let o=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),a=[],l=[];o.forEach(e=>{let t=e.INVALIDATE_NAME_PATH||e.getNamePath();if(e.isList?.()){l.push(t);return}if(r){let n="getMeta"in e?e.getMeta():null;r(n)&&a.push(t)}else a.push(t)});let c=V(this.store,a.map(W));return l.forEach(e=>{(0,i.U2)(c,e)||(c=(0,i.t8)(c,e,[]))}),c};getFieldValue=e=>{this.warningUnhooked();let t=W(e);return(0,i.U2)(this.store,t)};getFieldsError=e=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(e).map((t,n)=>t&&!t.INVALIDATE_NAME_PATH?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:W(e[n]),errors:[],warnings:[]}));getFieldError=e=>{this.warningUnhooked();let t=W(e);return this.getFieldsError([t])[0].errors};getFieldWarning=e=>{this.warningUnhooked();let t=W(e);return this.getFieldsError([t])[0].warnings};isFieldsTouched=(...e)=>{let t;this.warningUnhooked();let[n,r]=e,o=!1;0===e.length?t=null:1===e.length?Array.isArray(n)?(t=n.map(W),o=!1):(t=null,o=n):(t=n.map(W),o=r);let i=this.getFieldEntities(!0),a=e=>e.isFieldTouched();if(!t)return o?i.every(e=>a(e)||e.isList()):i.some(a);let l=new et;t.forEach(e=>{l.set(e,[])}),i.forEach(e=>{let n=e.getNamePath();t.forEach(t=>{t.every((e,t)=>n[t]===e)&&l.update(t,t=>[...t,e])})});let c=e=>e.some(a),s=l.map(({value:e})=>e);return o?s.every(c):s.some(c)};isFieldTouched=e=>(this.warningUnhooked(),this.isFieldsTouched([e]));isFieldsValidating=e=>{this.warningUnhooked();let t=this.getFieldEntities();if(!e)return t.some(e=>e.isFieldValidating());let n=e.map(W);return t.some(e=>B(n,e.getNamePath())&&e.isFieldValidating())};isFieldValidating=e=>(this.warningUnhooked(),this.isFieldsValidating([e]));resetWithFieldInitialValue=(e={})=>{let t;let n=new et,r=this.getFieldEntities(!0);r.forEach(e=>{let{initialValue:t}=e.props,r=e.getNamePath();if(void 0!==t){let o=n.get(r)||new Set;o.add({entity:e,value:t}),n.set(r,o)}}),e.entities?t=e.entities:e.namePathList?(t=[],e.namePathList.forEach(e=>{let r=n.get(e);r&&t.push(...[...r].map(e=>e.entity))})):t=r,(t=>{t.forEach(t=>{let{initialValue:r}=t.props;if(void 0!==r){let r=t.getNamePath();if(void 0!==this.getInitialValue(r))(0,i.warning)(!1,`Form already set 'initialValues' with path '${r.join(".")}'. Field can not overwrite it.`);else{let o=n.get(r);if(o&&o.size>1)(0,i.warning)(!1,`Multiple Field with path '${r.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(o){let n=this.getFieldValue(r);t.isListField()||e.skipExist&&void 0!==n||this.updateStore((0,i.t8)(this.store,r,[...o][0].value))}}}})})(t)};resetFields=e=>{this.warningUnhooked();let t=this.store;if(!e){this.updateStore((0,i.TS)(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(t,null,{type:"reset"}),this.notifyWatch();return}let n=e.map(W);n.forEach(e=>{let t=this.getInitialValue(e);this.updateStore((0,i.t8)(this.store,e,t))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(t,n,{type:"reset"}),this.notifyWatch(n)};setFields=e=>{this.warningUnhooked();let t=this.store,n=[];e.forEach(e=>{let{name:r,...o}=e,a=W(r);n.push(a),"value"in o&&this.updateStore((0,i.t8)(this.store,a,o.value)),this.notifyObservers(t,[a],{type:"setField",data:e})}),this.notifyWatch(n)};getFields=()=>this.getFieldEntities(!0).map(e=>{let t=e.getNamePath(),n={...e.getMeta(),name:t,value:this.getFieldValue(t)};return Object.defineProperty(n,"originRCField",{value:!0}),n});initEntityValue=e=>{let{initialValue:t}=e.props;if(void 0!==t){let n=e.getNamePath();void 0===(0,i.U2)(this.store,n)&&this.updateStore((0,i.t8)(this.store,n,t))}};isMergedPreserve=e=>(void 0!==e?e:this.preserve)??!0;registerField=e=>{this.fieldEntities.push(e);let t=e.getNamePath();if(this.notifyWatch([t]),void 0!==e.props.initialValue){let t=this.store;this.resetWithFieldInitialValue({entities:[e],skipExist:!0}),this.notifyObservers(t,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return(n,r,o=[])=>{if(this.fieldEntities=this.fieldEntities.filter(t=>t!==e),!this.isMergedPreserve(r)&&(!n||o.length>1)){let e=n?void 0:this.getInitialValue(t);if(t.length&&this.getFieldValue(t)!==e&&this.fieldEntities.every(e=>!q(e.getNamePath(),t))){let n=this.store;this.updateStore((0,i.t8)(n,t,e,!0)),this.notifyObservers(n,[t],{type:"remove"}),this.triggerDependenciesUpdate(n,t)}}this.notifyWatch([t])}};dispatch=e=>{switch(e.type){case"updateValue":{let{namePath:t,value:n}=e;this.updateValue(t,n);break}case"validateField":{let{namePath:t,triggerName:n}=e;this.validateFields([t],{triggerName:n})}}};notifyObservers=(e,t,n)=>{if(this.subscribable){let r={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:n})=>{n(e,t,r)})}else this.forceRootUpdate()};triggerDependenciesUpdate=(e,t)=>{let n=this.getDependencyChildrenFields(t);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(e,n,{type:"dependenciesUpdate",relatedFields:[t,...n]}),n};updateValue=(e,t)=>{let n=W(e),r=this.store;this.updateStore((0,i.t8)(this.store,n,t)),this.notifyObservers(r,[n],{type:"valueUpdate",source:"internal"}),this.notifyWatch([n]);let o=this.triggerDependenciesUpdate(r,n),{onValuesChange:a}=this.callbacks;if(a){let e=V(this.store,[n]),t=this.getFieldsValue(),r=(0,i.t8)(t,n,(0,i.U2)(e,n));a(e,r)}this.triggerOnFieldsChange([n,...o])};setFieldsValue=e=>{this.warningUnhooked();let t=this.store;if(e){let t=(0,i.TS)(this.store,e);this.updateStore(t)}this.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()};setFieldValue=(e,t)=>{this.setFields([{name:e,value:t,errors:[],warnings:[],touched:!0}])};getDependencyChildrenFields=e=>{let t=new Set,n=[],r=new et;this.getFieldEntities().forEach(e=>{let{dependencies:t}=e.props;(t||[]).forEach(t=>{let n=W(t);r.update(n,(t=new Set)=>(t.add(e),t))})});let o=e=>{(r.get(e)||new Set).forEach(e=>{if(!t.has(e)){t.add(e);let r=e.getNamePath();e.isFieldDirty()&&r.length&&(n.push(r),o(r))}})};return o(e),n};triggerOnFieldsChange=(e,t)=>{let{onFieldsChange:n}=this.callbacks;if(n){let r=this.getFields();if(t){let e=new et;t.forEach(({name:t,errors:n})=>{e.set(t,n)}),r.forEach(t=>{t.errors=e.get(t.name)||t.errors})}let o=r.filter(({name:t})=>B(e,t));o.length&&n(o,r)}};validateFields=(e,t)=>{let n,r;this.warningUnhooked(),Array.isArray(e)||"string"==typeof e||"string"==typeof t?(n=e,r=t):r=e;let o=!!n,i=o?n.map(W):[],a=[...i],l=[],c=String(Date.now()),s=new Set,{recursive:u,dirty:d}=r||{};this.getFieldEntities(!0).forEach(e=>{let t=e.getNamePath();if(o||(e.isList()&&i.some(e=>q(e,t,!0))||a.push(t),i.push(t)),e.props.rules&&e.props.rules.length&&(!d||e.isFieldDirty())&&(s.add(t.join(c)),!o||B(i,t,u))){let n=e.validateRules({validateMessages:{...j,...this.validateMessages},...r});l.push(n.then(()=>({name:t,errors:[],warnings:[]})).catch(e=>{let n=[],r=[];return(e.forEach?.(({rule:{warningOnly:e},errors:t})=>{e?r.push(...t):n.push(...t)}),n.length)?Promise.reject({name:t,errors:n,warnings:r}):{name:t,errors:n,warnings:r}}))}});let f=function(e){let t=!1,n=e.length,r=[];return e.length?new Promise((o,i)=>{e.forEach((e,a)=>{e.catch(e=>(t=!0,e)).then(e=>{n-=1,r[a]=e,n>0||(t&&i(r),o(r))})})}):Promise.resolve([])}(l);this.lastValidatePromise=f,f.catch(e=>e).then(e=>{let t=e.map(({name:e})=>e);this.notifyObservers(this.store,t,{type:"validateFinish"}),this.triggerOnFieldsChange(t,e)});let h=f.then(()=>this.lastValidatePromise===f?Promise.resolve(this.getFieldsValue(a)):Promise.reject([])).catch(e=>{let t=e.filter(e=>e&&e.errors.length);return Promise.reject({message:t[0]?.errors?.[0],values:this.getFieldsValue(i),errorFields:t,outOfDate:this.lastValidatePromise!==f})});h.catch(e=>e);let g=i.filter(e=>s.has(e.join(c)));return this.triggerOnFieldsChange(g),h};submit=()=>{this.warningUnhooked(),this.validateFields().then(e=>{let{onFinish:t}=this.callbacks;if(t)try{t(e)}catch(e){console.error(e)}}).catch(e=>{let{onFinishFailed:t}=this.callbacks;t&&t(e)})}}var er=function(e){let t=o.useRef(null),[,n]=o.useState({});if(!t.current){if(e)t.current=e;else{let e=new en(()=>{n({})});t.current=e.getForm()}}return[t.current]};let eo=o.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),ei=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{let i=o.useContext(eo),a=o.useRef({});return o.createElement(eo.Provider,{value:{...i,validateMessages:{...i.validateMessages,...e},triggerFormChange:(e,n)=>{t&&t(e,{changedFields:n,forms:a.current}),i.triggerFormChange(e,n)},triggerFormFinish:(e,t)=>{n&&n(e,{values:t,forms:a.current}),i.triggerFormFinish(e,t)},registerForm:(e,t)=>{e&&(a.current={...a.current,[e]:t}),i.registerForm(e,t)},unregisterForm:e=>{let t={...a.current};delete t[e],a.current=t,i.unregisterForm(e)}}},r)};function ea(){return(ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function el(e){try{return JSON.stringify(e)}catch{return Math.random()}}var ec=function(...e){let[t,n={}]=e,r=n&&n._init?{form:n}:n,l=r.form,[s,u]=(0,o.useState)(()=>"function"==typeof t?t({}):void 0),d=(0,o.useMemo)(()=>el(s),[s]);(0,o.useRef)(d).current=d;let f=(0,o.useContext)(c),h=l||f,g=h&&h._init,{getFieldsValue:p,getInternalHooks:m}=h,{registerWatch:v}=m(a),y=(0,i.zX)((e,n)=>{let o=r.preserve?n??p(!0):e??p(),a="function"==typeof t?t(o):(0,i.U2)(o,W(t));el(s)!==el(a)&&u(a)}),b="function"==typeof t?t:JSON.stringify(t);return(0,o.useEffect)(()=>{g&&y()},[g,b]),(0,o.useEffect)(()=>{if(g)return v((e,t)=>{y(e,t)})},[g]),s};let es=o.forwardRef((e,t)=>{let n;let{name:r,initialValues:i,fields:l,form:u,preserve:d,children:f,component:h="form",validateMessages:g,validateTrigger:p="onChange",onValuesChange:m,onFieldsChange:v,onFinish:y,onFinishFailed:b,clearOnDestroy:x,...w}=e,E=o.useRef(null),C=o.useContext(eo),[k]=er(u),{useSubscribe:F,setInitialValues:S,setCallbacks:P,setValidateMessages:I,setPreserve:O,destroyForm:R}=k.getInternalHooks(a);o.useImperativeHandle(t,()=>({...k,nativeElement:E.current})),o.useEffect(()=>(C.registerForm(r,k),()=>{C.unregisterForm(r)}),[C,k,r]),I({...C.validateMessages,...g}),P({onValuesChange:m,onFieldsChange:(e,...t)=>{C.triggerFormChange(r,e),v&&v(e,...t)},onFinish:e=>{C.triggerFormFinish(r,e),y&&y(e)},onFinishFailed:b}),O(d);let N=o.useRef(null);S(i,!N.current),N.current||(N.current=!0),o.useEffect(()=>()=>R(x),[]);let A="function"==typeof f;n=A?f(k.getFieldsValue(!0),k):f,F(!A);let j=o.useRef(null);o.useEffect(()=>{var e,t;((e=j.current||[])===(t=l||[])?0:(e||!t)&&(!e||t)&&e&&t&&"object"==typeof e&&"object"==typeof t?![...new Set([...Object.keys(e),...Object.keys(t)])].every(n=>{let r=e[n],o=t[n];return"function"==typeof r&&"function"==typeof o||r===o}):1)&&k.setFields(l||[]),j.current=l},[l,k]);let $=o.useMemo(()=>({...k,validateTrigger:p}),[k,p]),M=o.createElement(s.Provider,{value:null},o.createElement(c.Provider,{value:$},n));return!1===h?M:o.createElement(h,ea({},w,{ref:E,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),k.submit()},onReset:e=>{e.preventDefault(),k.resetFields(),w.onReset?.(e)}}),M)});es.FormProvider=ei,es.Field=J,es.List=Q,es.useForm=er,es.useWatch=ec;var eu=es},53074:function(e,t,n){var r=n(60635),o=n(13063),i=n(92073),a=n(64886);t.Z=e=>{let{space:t,form:n,children:l}=e;if(!(0,o.rB)(l))return null;let c=l;return n&&(c=r.createElement(i.Ux,{override:!0,status:!0},c)),t&&(c=r.createElement(a.BR,null,c)),c}},65963:function(e,t,n){n.d(t,{bt:function(){return p},nB:function(){return g},wz:function(){return s}});var r=n(60635),o=n(26622),i=n(13063),a=n(90204),l=n(75388),c=n(91560);let s=e=>{if(!e)return;let{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}},u={},d=(e,t)=>{if(!e&&(!1===e||!1===t||null===t))return!1;if(!(0,i.C_)(e)&&!(0,i.C_)(t))return null;let n={closeIcon:"boolean"!=typeof t&&(0,i.C_)(t)?t:void 0};return(0,c.PO)(e)&&(n={...n,...e}),n},f=(e,t,n)=>!1!==e&&(e?(0,i.dG)(n,t,e):!1!==t&&(t?(0,i.dG)(n,t):!!n.closable&&n)),h=(e,t,n)=>{let{closeIconRender:o}=t,{closeIcon:a,...l}=e,c=a,s=(0,i.sf)(l,!0);return(0,i.C_)(c)&&(o&&(c=o(c)),c=r.isValidElement(c)?r.cloneElement(c,{"aria-label":n,...c.props,...s}):r.createElement("span",{"aria-label":n,...s},c)),[c,{"aria-label":n,...s}]},g=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Close",a=d(null==e?void 0:e.closable,null==e?void 0:e.closeIcon),l=d(null==t?void 0:t.closable,null==t?void 0:t.closeIcon),c={closeIcon:r.createElement(o.Z,null),...n},s=f(a,l,c),g="boolean"!=typeof s&&!!(null==s?void 0:s.disabled);if(!1===s)return[!1,null,g,{}];let[p,m]=h(s,c,i);return[!0,p,g,m]},p=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,[i]=(0,a.Z)("global",l.Z.global);return r.useMemo(()=>g(e,t,{closeIcon:r.createElement(o.Z,null),...n},i.close),[e,t,n,i.close])}},67632:function(e,t,n){n.d(t,{jK:function(){return h},MW:function(){return g},lw:function(){return f}});var r=n(78652),o=n(60635),i=n(86937),a=n(91560);let l=(e,t)=>{let n={...e};return Object.keys(t).forEach(e=>{t[e]._default?n[e]||(n[e]={}):n[e]=l(n[e],t[e])}),n},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.filter(e=>!!e).reduce((t,n)=>(Object.keys(n).forEach(r=>{let o=e[r],l=n[r];if(o){if((0,a.PO)(l))t[r]=c(o,t[r],l);else{let{_default:e}=o;e&&(t[r]=t[r]||{},t[r][e]=(0,i.W)(t[r][e],l))}}else t[r]=(0,i.W)(t[r],l)}),t),{})},s=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return o.useMemo(()=>c.apply(void 0,[e].concat(n)),[e].concat(n))},u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(e=>!!e).reduce(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach(n=>{e[n]={...e[n],...t[n]}}),e},{})},d=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.useMemo(()=>u.apply(void 0,t),[].concat(t))},f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"root";return o.useMemo(()=>e?{[t]:e}:void 0,[e,t])},h=(e,t)=>(0,a.mf)(e)?e(t):e,g=(e,t,n,i)=>{let a=e.map(e=>e?h(e,n):void 0),c=t.map(e=>e?h(e,n):void 0),u=s.apply(void 0,[i].concat((0,r.Z)(a))),f=d.apply(void 0,(0,r.Z)(c));return o.useMemo(()=>i?[l(u,i),l(f,i)]:[u,f],[u,f,i])}},15619:function(e,t,n){n.d(t,{J:function(){return i},x:function(){return a}});var r=n(60635),o=n(91560);let i=(e,t)=>{let n={};return(0,o.PO)(e)&&(n={...e}),"boolean"==typeof e&&(n={enabled:e}),void 0===n.closable&&void 0!==t&&(n.closable=t),n},a=(e,t,n,o)=>(0,r.useMemo)(()=>{var r,a,l;let c=i(e,o),s=i(t),u={blur:!1,...s,...c,closable:null===(l=null!==(a=null!==(r=c.closable)&&void 0!==r?r:o)&&void 0!==a?a:s.closable)||void 0===l||l},d=u.blur?"".concat(n,"-mask-blur"):void 0;return[!1!==u.enabled,{mask:d},!!u.closable]},[e,t,n,o])},34673:function(e,t,n){n.d(t,{R:function(){return i}});var r=n(60635);let o=e=>"horizontal"===e||"vertical"===e,i=(e,t,n)=>(0,r.useMemo)(()=>{let r;return[r=o(e)?e:"boolean"==typeof t?t?"vertical":"horizontal":o(n)?n:"horizontal","vertical"===r]},[n,e,t])},56689:function(e,t,n){n.d(t,{Cn:function(){return u},u6:function(){return a}});var r=n(60635),o=n(80971),i=n(9812);let a=1e3,l={Modal:100,Drawer:100,Popover:100,Popconfirm:100,Tooltip:100,Tour:100,FloatButton:100},c={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},s=e=>e in l,u=(e,t)=>{let n;let[,a]=(0,o.ZP)(),u=r.useContext(i.Z),d=s(e);if(void 0!==t)n=[t,t];else{let r=null!=u?u:0;d?r+=(u?0:a.zIndexPopupBase)+l[e]:r+=c[e],n=[void 0===u?t:r,r]}return n}},24025:function(e,t,n){n.d(t,{m:function(){return s}});var r=n(73703),o=n(91560);let i=()=>({height:0,opacity:0}),a=e=>{var t;return{height:null!==(t=null==e?void 0:e.scrollHeight)&&void 0!==t?t:0,opacity:e?1:0}},l=e=>{var t;return{height:null!==(t=null==e?void 0:e.offsetHeight)&&void 0!==t?t:0}},c=(e,t)=>(null==t?void 0:t.deadline)===!0||(0,o.AG)(t)&&"height"===t.propertyName,s=(e,t,n)=>void 0!==n?n:"".concat(e,"-").concat(t);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.Rf;return{motionName:"".concat(e,"-motion-collapse"),onAppearStart:i,onEnterStart:i,onAppearActive:a,onEnterActive:a,onLeaveStart:l,onLeaveActive:i,onAppearEnd:c,onEnterEnd:c,onLeaveEnd:c,motionDeadline:500}}},41069:function(e,t,n){n.d(t,{Z:function(){return x}});var r=n(60635),o=n(13063),i=n(86937),a=n(73703),l=n(87092),c=n(14482),s=(0,c.A1)("Wave",e=>{let{componentCls:t,colorPrimary:n,motionDurationSlow:r,motionEaseInOut:o,motionEaseOutCirc:i,antCls:a}=e,[,l]=(0,c.o_)(a,"wave");return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:l("color",n),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s","opacity 2s"].map(e=>"".concat(e," ").concat(i)).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(e=>"".concat(e," ").concat(r," ").concat(o)).join(",")}}}}}),u=n(80971),d=n(41099),f=n(21636),h=n(91560);let g=e=>!!e&&(0,h.HD)(e)&&"#fff"!==e&&"#ffffff"!==e&&"rgb(255, 255, 255)"!==e&&"rgba(255, 255, 255, 1)"!==e&&!/rgba\((?:\d*, ){3}0\)/i.test(e)&&!/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i.test(e)&&"transparent"!==e&&"canvastext"!==e;function p(e){return Number.isNaN(e)?0:e}let m=e=>{let{className:t,target:n,component:l,colorSource:s}=e,u=r.useRef(null),{getPrefixCls:m}=r.useContext(a.E_),v=m(),[y]=(0,c.o_)(v,"wave"),[b,x]=r.useState(null),[w,E]=r.useState([]),[C,k]=r.useState(0),[F,S]=r.useState(0),[P,I]=r.useState(0),[O,R]=r.useState(0),[N,A]=r.useState(!1),j={left:C,top:F,width:P,height:O,borderRadius:w.map(e=>"".concat(e,"px")).join(" ")};function $(){let e=getComputedStyle(n);x(function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=getComputedStyle(e),{borderTopColor:o,borderColor:i,backgroundColor:a}=r;return n&&g(r[n])?r[n]:null!==(t=[o,i,a].find(g))&&void 0!==t?t:null}(n,s));let t="static"===e.position,{borderLeftWidth:r,borderTopWidth:o}=e;k(t?n.offsetLeft:p(-Number.parseFloat(r))),S(t?n.offsetTop:p(-Number.parseFloat(o))),I(n.offsetWidth),R(n.offsetHeight);let{borderTopLeftRadius:i,borderTopRightRadius:a,borderBottomLeftRadius:l,borderBottomRightRadius:c}=e;E([i,a,c,l].map(e=>p(Number.parseFloat(e))))}if(b&&(j[y("color")]=b),r.useEffect(()=>{if(n){let e;let t=(0,o.Wn)(()=>{$(),A(!0)});return"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver($)).observe(n),()=>{o.Wn.cancel(t),null==e||e.disconnect()}}},[n]),!N)return null;let M=("Checkbox"===l||"Radio"===l)&&(null==n?void 0:n.classList.contains(d.A));return r.createElement(f.ZP,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(e,t)=>{if(t.deadline||(0,h.AG)(t)&&"opacity"===t.propertyName){var n;let e=null===(n=u.current)||void 0===n?void 0:n.parentElement;(0,o.vE)(e).then(()=>{null==e||e.remove()})}return!1}},(e,n)=>{let{className:a}=e;return r.createElement("div",{ref:(0,o.sQ)(u,n),className:(0,i.W)(t,a,{"wave-quick":M}),style:j})})};var v=(e,t)=>{var n;let{component:i}=t;if("Checkbox"===i&&!(null===(n=e.querySelector("input"))||void 0===n?void 0:n.checked))return;let a=document.createElement("div");a.style.position="absolute",a.style.left="0px",a.style.top="0px",null==e||e.insertBefore(a,null==e?void 0:e.firstChild),(0,o.sY)(r.createElement(m,{...t,target:e}),a)},y=(e,t,n,i)=>{let{wave:l}=r.useContext(a.E_),[,c,s]=(0,u.ZP)(),f=(0,o.zX)(r=>{let o=e.current;if((null==l?void 0:l.disabled)||!o)return;let a=o.querySelector(".".concat(d.A))||o,{showEffect:u}=l||{};(u||v)(a,{className:t,token:c,component:n,event:r,hashId:s,colorSource:i})}),h=r.useRef(null);return r.useEffect(()=>()=>{o.Wn.cancel(h.current)},[]),e=>{o.Wn.cancel(h.current),h.current=(0,o.Wn)(()=>{f(e)})}};let b={click:"click",mousedown:"mousedown",mouseup:"mouseup",pointerdown:"pointerdown",pointerup:"pointerup"};var x=e=>{let{children:t,disabled:n,component:c,colorSource:u}=e,{getPrefixCls:d,wave:f}=(0,r.useContext)(a.E_),h=(0,r.useRef)(null),g=d("wave"),p=s(g),m=y(h,(0,i.W)(g,p),c,u);if(r.useEffect(()=>{let e=h.current;if(!e||e.nodeType!==window.Node.ELEMENT_NODE||n)return;let t=t=>{!(0,o.pn)(t.target)||!e.getAttribute||e.getAttribute("disabled")||e.disabled||e.className.includes("disabled")&&!e.className.includes("disabled:")||"true"===e.getAttribute("aria-disabled")||e.className.includes("-leave")||m(t)},r=null==f?void 0:f.triggerType,i=r&&r in b?b[r]:"click";return e.addEventListener(i,t,!0),()=>{e.removeEventListener(i,t,!0)}},[n,null==f?void 0:f.triggerType]),!r.isValidElement(t))return null!=t?t:null;let v=(0,o.Yr)(t)?(0,o.sQ)((0,o.C4)(t),h):h;return(0,l.Tm)(t,{ref:v})}},41099:function(e,t,n){n.d(t,{A:function(){return o}});var r=n(73703);let o="".concat(r.Rf,"-wave-target")},9812:function(e,t,n){let r=n(60635).createContext(void 0);t.Z=r},87018:function(e,t,n){n.d(t,{Z:function(){return j}});var r=n(60635),o=n(41919),i=n(45861),a=n(26622),l=n(7973),c=n(23298),s=n(21636),u=n(13063),d=n(86937),f=n(67632),h=n(91560),g=n(73703),p=n(60662),m=n(28811),v=n(14482);let y=(e,t,n)=>({background:e,["".concat(n,"-icon")]:{color:t}}),b=e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:o,fontSize:i,fontSizeLG:a,lineHeight:l,motionEaseInOutCirc:c,borderRadius:s,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:h,defaultPadding:g,lineWidth:v,lineType:y,colorSuccessBorder:b,colorWarningBorder:x,colorErrorBorder:w,colorInfoBorder:E}=e;return{[t]:{...(0,m.Wf)(e),position:"relative",display:"flex",alignItems:"center",padding:g,wordWrap:"break-word",borderRadius:s,borderWidth:(0,p.bf)(v),borderStyle:y,["&".concat(t,"-success")]:{borderColor:b},["&".concat(t,"-info")]:{borderColor:E},["&".concat(t,"-warning")]:{borderColor:x},["&".concat(t,"-error")]:{borderColor:w},["&".concat(t,"-filled")]:{borderColor:"transparent"},["&".concat(t,"-rtl")]:{direction:"rtl"},["".concat(t,"-section")]:{flex:1,minWidth:0},["".concat(t,"-icon")]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:l},"&-title":{color:f},["&".concat(t,"-motion-leave")]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(e=>"".concat(e," ").concat(n," ").concat(c)).join(", ")},["&".concat(t,"-motion-leave-active")]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0},["&".concat(t,"-with-description")]:{alignItems:"flex-start",padding:h,["".concat(t,"-icon")]:{marginInlineEnd:o,fontSize:u,lineHeight:0},["".concat(t,"-title")]:{display:"block",marginBottom:r,color:f,fontSize:a},["".concat(t,"-description")]:{display:"block",color:d}},["&".concat(t,"-banner")]:{marginBottom:0,border:"0 !important",borderRadius:0}}}},x=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBg:r,colorWarning:o,colorWarningBg:i,colorError:a,colorErrorBg:l,colorInfo:c,colorInfoBg:s}=e;return{[t]:{"&-success":y(r,n,t),"&-info":y(s,c,t),"&-warning":y(i,o,t),"&-error":{...y(l,a,t),["".concat(t,"-description > pre")]:{margin:0,padding:0}}}}},w=e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:o,fontSizeIcon:i,colorIcon:a,colorIconHover:l}=e;return{[t]:{["".concat(t,"-actions")]:{marginInlineStart:o},["".concat(t,"-close-icon")]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:i,lineHeight:(0,p.bf)(i),backgroundColor:"transparent",border:"none",cursor:"pointer",...(0,m.Qy)(e),["".concat(n,"-close")]:{color:a,transition:"color ".concat(r),"&:hover":{color:l}}},"&-close-text":{color:a,transition:"color ".concat(r),"&:hover":{color:l}}}}};var E=(0,v.I$)("Alert",e=>[b(e),x(e),w(e)],e=>({borderRadius:e.borderRadiusLG,withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:"".concat(e.paddingContentVerticalSM,"px ").concat(12,"px"),withDescriptionPadding:"".concat(e.paddingMD,"px ").concat(e.paddingContentHorizontalLG,"px")}));let C=e=>{let{icon:t,type:n,className:a,style:s,successIcon:u,infoIcon:d,warningIcon:f,errorIcon:h}=e,g={success:null!=u?u:r.createElement(o.Z,null),info:null!=d?d:r.createElement(c.Z,null),error:null!=h?h:r.createElement(i.Z,null),warning:null!=f?f:r.createElement(l.Z,null)};return r.createElement("span",{className:a,style:s},null!=t?t:g[n])},k=e=>{let{isClosable:t,prefixCls:n,closeIcon:o,handleClose:i,ariaProps:l,className:c,style:s}=e,u=!0===o||void 0===o?r.createElement(a.Z,null):o;return t?r.createElement("button",{type:"button",onClick:i,className:(0,d.W)("".concat(n,"-close-icon"),c),tabIndex:0,style:s,...l},u):null},F=r.forwardRef((e,t)=>{var n,o;let{description:i,prefixCls:a,message:l,title:c,banner:p,className:m,rootClassName:v,style:y,onMouseEnter:b,onMouseLeave:x,onClick:w,afterClose:F,showIcon:S,closable:P,closeText:I,closeIcon:O,action:R,id:N,styles:A,classNames:j,...$}=e,M=null!=c?c:l,[z,Z]=r.useState(!1),W=r.useRef(null);r.useImperativeHandle(t,()=>({nativeElement:W.current}));let{getPrefixCls:V,direction:B,variant:q,closable:H,closeIcon:D,className:T,style:L,classNames:_,styles:U,successIcon:G,infoIcon:X,warningIcon:Y,errorIcon:J}=(0,g.dj)("alert"),Q=V("alert",a),[K,ee]=E(Q),{onClose:et,afterClose:en}=(0,h.PO)(P)?P:{},er=t=>{var n;Z(!0),null===(n=null!=et?et:e.onClose)||void 0===n||n(t)},eo=r.useMemo(()=>void 0!==e.type?e.type:p?"warning":"info",[e.type,p]),ei=null!==(o=null!==(n=e.variant)&&void 0!==n?n:q)&&void 0!==o?o:"outlined",ea=r.useMemo(()=>!!(0,h.PO)(P)||!!I||("boolean"==typeof P?P:!!(!1!==O&&(0,u.C_)(O))||!!H),[I,O,P,H]),el=!!p&&void 0===S||S,ec={...e,prefixCls:Q,variant:ei,type:eo,showIcon:el,closable:ea},es=(0,f.lw)(L),eu=(0,f.lw)(y),[ed,ef]=(0,f.MW)([_,j],[U,es,A,eu],{props:ec}),eh=(0,d.W)(Q,"".concat(Q,"-").concat(eo),"".concat(Q,"-").concat(ei),{["".concat(Q,"-with-description")]:(0,u.rB)(i),["".concat(Q,"-no-icon")]:!el,["".concat(Q,"-banner")]:!!p,["".concat(Q,"-rtl")]:"rtl"===B},T,m,v,ed.root,ee,K),eg=(0,u.sf)($,{aria:!0,data:!0}),ep=r.useMemo(()=>(0,h.PO)(P)&&P.closeIcon?P.closeIcon:I||(void 0!==O?O:(0,h.PO)(H)&&H.closeIcon?H.closeIcon:D),[O,P,H,I,D]),em=r.useMemo(()=>{let e=null!=P?P:H;return(0,h.PO)(e)?(0,u.sf)(e,{data:!0,aria:!0}):{}},[P,H]);return r.createElement(s.ZP,{visible:!z,motionName:"".concat(Q,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:null!=en?en:F},(t,n)=>{let{className:o,style:a}=t;return r.createElement("div",{id:N,ref:(0,u.sQ)(W,n),"data-show":!z,className:(0,d.W)(eh,o),style:{...ef.root,...a},onMouseEnter:b,onMouseLeave:x,onClick:w,role:"alert",...eg},el?r.createElement(C,{className:(0,d.W)("".concat(Q,"-icon"),ed.icon),style:ef.icon,description:i,icon:e.icon,prefixCls:Q,type:eo,successIcon:G,infoIcon:X,warningIcon:Y,errorIcon:J}):null,r.createElement("div",{className:(0,d.W)("".concat(Q,"-section"),ed.section),style:ef.section},(0,u.rB)(M)?r.createElement("div",{className:(0,d.W)("".concat(Q,"-title"),ed.title),style:ef.title},M):null,(0,u.rB)(i)?r.createElement("div",{className:(0,d.W)("".concat(Q,"-description"),ed.description),style:ef.description},i):null),(0,u.rB)(R)?r.createElement("div",{className:(0,d.W)("".concat(Q,"-actions"),ed.actions),style:ef.actions},R):null,r.createElement(k,{className:ed.close,style:ef.close,isClosable:ea,prefixCls:Q,closeIcon:ep,handleClose:er,ariaProps:em}))})});var S=n(58579),P=n(77134),I=n(38687),O=n(81603),R=n(90054),N=n(41414);let A=function(e){function t(){var e,n,r;return(0,S.Z)(this,t),n=t,r=arguments,n=(0,I.Z)(n),(e=(0,R.Z)(this,(0,O.Z)()?Reflect.construct(n,r||[],(0,I.Z)(this).constructor):n.apply(this,r))).state={error:void 0,info:{}},e}return(0,N.Z)(t,e),(0,P.Z)(t,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,title:t,description:n,id:o,children:i}=this.props,{error:a,info:l}=this.state,c=null!=t?t:e,s=(null==l?void 0:l.componentStack)||null,d=(0,u.C_)(c)?c:null==a?void 0:a.toString(),f=(0,u.C_)(n)?n:s;return a?r.createElement(F,{id:o,type:"error",title:d,description:r.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},f)}):i}}])}(r.PureComponent);F.ErrorBoundary=A;var j=F},28798:function(e,t,n){n.d(t,{Z:function(){return Q}});var r=n(60635),o=n(13063),i=n(86937),a=n(67632),l=n(91560),c=n(41069),s=n(73703),u=n(48896),d=n(78679),f=n(64886),h=n(80971);let g=r.createContext(void 0);var p=n(41793),m=n(82538),v=n(21636);let y=(0,r.forwardRef)((e,t)=>{let{className:n,style:o,children:a,prefixCls:l}=e,c=(0,i.W)("".concat(l,"-icon"),n);return r.createElement("span",{ref:t,className:c,style:o},a)}),b=(0,r.forwardRef)((e,t)=>{let{prefixCls:n,className:o,style:a,iconClassName:l}=e,c=(0,i.W)("".concat(n,"-loading-icon"),o);return r.createElement(y,{prefixCls:n,className:c,style:a,ref:t},r.createElement(m.Z,{className:l}))}),x=()=>({width:0,opacity:0,transform:"scale(0)"}),w=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"});var E=e=>{let{prefixCls:t,loading:n,existIcon:o,className:a,style:l,mount:c}=e;return o?r.createElement(b,{prefixCls:t,className:a,style:l}):r.createElement(v.ZP,{visible:!!n,motionName:"".concat(t,"-loading-icon-motion"),motionAppear:!c,motionEnter:!c,motionLeave:!c,removeOnLeave:!0,onAppearStart:x,onAppearActive:w,onEnterStart:x,onEnterActive:w,onLeaveStart:w,onLeaveActive:x},(e,n)=>{let{className:o,style:c}=e,s={...l,...c};return r.createElement(b,{prefixCls:t,className:(0,i.W)(a,o),style:s,ref:n})})},C=n(60662),k=n(28811),F=n(38747),S=n(46282),P=n(14482);let I=(e,t)=>({["> span, > ".concat(e)]:{"&:not(:last-child)":{["&, & > ".concat(e)]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{["&, & > ".concat(e)]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}});var O=e=>{let{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=e;return{["".concat(t,"-group")]:[{position:"relative",display:"inline-flex",["> span, > ".concat(t)]:{"&:not(:last-child)":{["&, & > ".concat(t)]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),["&, & > ".concat(t)]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},["".concat(t,"-icon-only")]:{fontSize:n}},I("".concat(t,"-primary"),o),I("".concat(t,"-danger"),i)]}},R=n(11672),N=n(22266);let A=(e,t)=>{let{r:n,g:r,b:o,a:i}=e.toRgb(),a=new N.Il(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:.299*n+.587*r+.114*o>192};var j=n(65739),$=n(9736),M=n(84482);let z=e=>{let{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return(0,S.IX)(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},Z=e=>{var t,n,r,o,i,a;let l=null!==(t=e.contentFontSize)&&void 0!==t?t:e.fontSize,c=null!==(n=e.contentFontSizeSM)&&void 0!==n?n:e.fontSize,s=null!==(r=e.contentFontSizeLG)&&void 0!==r?r:e.fontSizeLG,u=null!==(o=e.contentLineHeight)&&void 0!==o?o:(0,$.D)(l),d=null!==(i=e.contentLineHeightSM)&&void 0!==i?i:(0,$.D)(c),f=null!==(a=e.contentLineHeightLG)&&void 0!==a?a:(0,$.D)(s),h=A(new R.y9(e.colorBgSolid),"#fff")?"#000":"#fff",g=j.i.reduce((t,n)=>({...t,["".concat(n,"ShadowColor")]:"0 ".concat((0,C.bf)(e.controlOutlineWidth)," 0 ").concat((0,M.Z)(e["".concat(n,"1")],e.colorBgContainer))}),{}),p=e.colorBgContainerDisabled,m=e.colorBgContainerDisabled;return{...g,fontWeight:400,iconGap:e.marginXS,defaultShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.controlTmpOutline),primaryShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.controlOutline),dangerShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.colorErrorOutline),primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:h,contentFontSize:l,contentFontSizeSM:c,contentFontSizeLG:s,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((e.controlHeight-l*u)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-c*d)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-s*f)/2-e.lineWidth,0),defaultBgDisabled:p,dashedBgDisabled:m}};var W=e=>{let{componentCls:t,antCls:n,lineWidth:r,lineType:o}=e,[i,a]=(0,P.o_)(n,"btn");return{[t]:[{[i("border-width")]:r,[i("border-color")]:"#000",[i("border-color-hover")]:a("border-color"),[i("border-color-active")]:a("border-color"),[i("border-color-disabled")]:a("border-color"),[i("border-style")]:o,[i("text-color")]:"#000",[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color"),[i("text-color-disabled")]:a("text-color"),[i("bg-color")]:"#ddd",[i("bg-color-hover")]:a("bg-color"),[i("bg-color-active")]:a("bg-color"),[i("bg-color-disabled")]:e.colorBgContainerDisabled,[i("bg-color-container")]:e.colorBgContainer,[i("shadow")]:"none"},{border:[a("border-width"),a("border-style"),a("border-color")].join(" "),color:a("text-color"),backgroundColor:a("bg-color"),["&:not(:disabled):not(".concat(t,"-disabled)")]:{"&:hover":{border:[a("border-width"),a("border-style"),a("border-color-hover")].join(" "),color:a("text-color-hover"),backgroundColor:a("bg-color-hover")},"&:active":{border:[a("border-width"),a("border-style"),a("border-color-active")].join(" "),color:a("text-color-active"),backgroundColor:a("bg-color-active")}}},{["&".concat(t,"-variant-solid")]:{[i("solid-bg-color")]:a("color-base"),[i("solid-bg-color-hover")]:a("color-hover"),[i("solid-bg-color-active")]:a("color-active"),[i("border-color")]:"transparent",[i("text-color")]:e.colorTextLightSolid,[i("bg-color")]:a("solid-bg-color"),[i("bg-color-hover")]:a("solid-bg-color-hover"),[i("bg-color-active")]:a("solid-bg-color-active"),boxShadow:a("shadow")},["&".concat(t,"-variant-outlined, &").concat(t,"-variant-dashed")]:{[i("border-color")]:a("color-base"),[i("border-color-hover")]:a("color-hover"),[i("border-color-active")]:a("color-active"),[i("bg-color")]:a("bg-color-container"),[i("text-color")]:a("color-base"),[i("text-color-hover")]:a("color-hover"),[i("text-color-active")]:a("color-active"),boxShadow:a("shadow")},["&".concat(t,"-variant-dashed")]:{[i("border-style")]:"dashed",[i("bg-color-disabled")]:e.dashedBgDisabled},["&".concat(t,"-variant-filled")]:{[i("border-color")]:"transparent",[i("text-color")]:a("color-base"),[i("bg-color")]:a("color-light"),[i("bg-color-hover")]:a("color-light-hover"),[i("bg-color-active")]:a("color-light-active")},["&".concat(t,"-variant-text, &").concat(t,"-variant-link")]:{[i("border-color")]:"transparent",[i("text-color")]:a("color-base"),[i("text-color-hover")]:a("color-hover"),[i("text-color-active")]:a("color-active"),[i("bg-color")]:"transparent",[i("bg-color-hover")]:"transparent",[i("bg-color-active")]:"transparent",["&:disabled, &".concat(e.componentCls,"-disabled")]:{background:"transparent",borderColor:"transparent"}},["&".concat(t,"-variant-text")]:{[i("bg-color-hover")]:a("color-light"),[i("bg-color-active")]:a("color-light-active")}},{["&".concat(t,"-variant-link")]:{[i("color-base")]:e.colorLink,[i("color-hover")]:e.colorLinkHover,[i("color-active")]:e.colorLinkActive,[i("bg-color-hover")]:e.linkHoverBg},["&".concat(t,"-color-primary")]:{[i("color-base")]:e.colorPrimary,[i("color-hover")]:e.colorPrimaryHover,[i("color-active")]:e.colorPrimaryActive,[i("color-light")]:e.colorPrimaryBg,[i("color-light-hover")]:e.colorPrimaryBgHover,[i("color-light-active")]:e.colorPrimaryBorder,[i("shadow")]:e.primaryShadow,["&".concat(t,"-variant-solid")]:{[i("text-color")]:e.primaryColor,[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")}},["&".concat(t,"-color-dangerous")]:{[i("color-base")]:e.colorError,[i("color-hover")]:e.colorErrorHover,[i("color-active")]:e.colorErrorActive,[i("color-light")]:e.colorErrorBg,[i("color-light-hover")]:e.colorErrorBgFilledHover,[i("color-light-active")]:e.colorErrorBgActive,[i("shadow")]:e.dangerShadow,["&".concat(t,"-variant-solid")]:{[i("text-color")]:e.dangerColor,[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")}},["&".concat(t,"-color-default")]:{[i("solid-bg-color")]:e.colorBgSolid,[i("solid-bg-color-hover")]:e.colorBgSolidHover,[i("solid-bg-color-active")]:e.colorBgSolidActive,[i("color-base")]:e.defaultBorderColor,[i("color-hover")]:e.defaultHoverBorderColor,[i("color-active")]:e.defaultActiveBorderColor,[i("color-light")]:e.colorFillTertiary,[i("color-light-hover")]:e.colorFillSecondary,[i("color-light-active")]:e.colorFill,[i("text-color")]:e.defaultColor,[i("text-color-hover")]:e.defaultHoverColor,[i("text-color-active")]:e.defaultActiveColor,[i("shadow")]:e.defaultShadow,["&".concat(t,"-variant-outlined")]:{[i("bg-color-disabled")]:e.defaultBgDisabled},["&".concat(t,"-variant-solid")]:{[i("text-color")]:e.solidTextColor,[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")},["&".concat(t,"-variant-filled, &").concat(t,"-variant-text")]:{[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")},["&".concat(t,"-variant-outlined, &").concat(t,"-variant-dashed")]:{[i("text-color")]:e.defaultColor,[i("text-color-hover")]:e.defaultHoverColor,[i("text-color-active")]:e.defaultActiveColor,[i("bg-color-container")]:e.defaultBg,[i("bg-color-hover")]:e.defaultHoverBg,[i("bg-color-active")]:e.defaultActiveBg},["&".concat(t,"-variant-text")]:{[i("text-color")]:e.textTextColor,[i("text-color-hover")]:e.textTextHoverColor,[i("text-color-active")]:e.textTextActiveColor,[i("bg-color-hover")]:e.textHoverBg},["&".concat(t,"-background-ghost")]:{["&".concat(t,"-variant-outlined, &").concat(t,"-variant-dashed")]:{[i("text-color")]:e.defaultGhostColor,[i("border-color")]:e.defaultGhostBorderColor}}}},j.i.map(n=>{let r=e["".concat(n,"6")],o=e["".concat(n,"1")],a=e["".concat(n,"Hover")],l=e["".concat(n,"2")],c=e["".concat(n,"3")],s=e["".concat(n,"Active")],u=e["".concat(n,"ShadowColor")];return{["&".concat(t,"-color-").concat(n)]:{[i("color-base")]:r,[i("color-hover")]:a,[i("color-active")]:s,[i("color-light")]:o,[i("color-light-hover")]:l,[i("color-light-active")]:c,[i("shadow")]:u}}}),{["&:disabled, &".concat(e.componentCls,"-disabled")]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:a("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{["&".concat(t,"-background-ghost")]:{[i("bg-color")]:e.ghostBg,[i("bg-color-hover")]:e.ghostBg,[i("bg-color-active")]:e.ghostBg,[i("shadow")]:"none",["&".concat(t,"-variant-outlined, &").concat(t,"-variant-dashed")]:{[i("bg-color-hover")]:e.ghostBg,[i("bg-color-active")]:e.ghostBg}}}]}};let V=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,iconGap:l,calc:c}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:l,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut),userSelect:"none",touchAction:"manipulation",...(0,F.o)(),"&:disabled > *":{pointerEvents:"none"},["".concat(t,"-icon > svg")]:(0,k.Ro)(),["".concat(t,"-icon")]:{display:"inline-flex",alignItems:"center",[n]:{verticalAlign:"middle","&:before":{content:'"\\a0"',display:"inline-block",width:0}}},"> a":{color:"currentColor"},"&:not(:disabled)":(0,k.Qy)(e),["&".concat(t,"-two-chinese-chars::first-letter")]:{letterSpacing:"0.34em"},["&".concat(t,"-two-chinese-chars > *:not(").concat(n,")")]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},["&".concat(t,"-icon-only")]:{paddingInline:0,["&".concat(t,"-compact-item")]:{flex:"none"}},["&".concat(t,"-loading")]:{opacity:o,cursor:"default"},["".concat(t,"-loading-icon")]:{transition:["width","opacity","margin"].map(e=>"".concat(e," ").concat(i," ").concat(a)).join(",")},["&:not(".concat(t,"-icon-end)")]:{["".concat(t,"-loading-icon-motion")]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineEnd:c(l).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(l).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",["".concat(t,"-loading-icon-motion")]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineStart:c(l).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(l).mul(-1).equal()}}}}}},B=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:l,buttonPaddingVertical:c,buttonIconOnlyFontSize:s}=e;return[{[t]:{fontSize:o,height:r,padding:"".concat((0,C.bf)(c)," ").concat((0,C.bf)(a)),borderRadius:i,["&".concat(n,"-icon-only")]:{width:r,[l]:{fontSize:s}}}},{["".concat(n).concat(n,"-circle").concat(t)]:B(e)},{["".concat(n).concat(n,"-round").concat(t)]:{borderRadius:e.controlHeight,["&:not(".concat(n,"-icon-only)")]:{paddingInline:e.buttonPaddingHorizontal}}}]},H=e=>q((0,S.IX)(e,{fontSize:e.contentFontSize}),e.componentCls),D=e=>q((0,S.IX)(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),"".concat(e.componentCls,"-sm")),T=e=>q((0,S.IX)(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),"".concat(e.componentCls,"-lg")),L=e=>{let{componentCls:t}=e;return{[t]:{["&".concat(t,"-block")]:{width:"100%"}}}};var _=(0,P.I$)("Button",e=>{let t=z(e);return[V(t),H(t),D(t),T(t),L(t),W(t),O(t)]},Z,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}}),U=n(37320);let G=e=>{let{antCls:t,componentCls:n,lineWidth:r,calc:o,colorBgContainer:i}=e,a="".concat(n,"-variant-solid:not([disabled])"),l=o(r).mul(-1).equal(),[c,s]=(0,P.o_)(t,"btn"),u=e=>({["".concat(n,"-compact").concat(e?"-vertical":"","-item")]:{[c("compact-connect-border-color")]:s("bg-color-hover"),["&".concat(a)]:{transition:"none",["& + ".concat(a,":before")]:[{position:"absolute",backgroundColor:s("compact-connect-border-color"),content:'""'},e?{top:l,insetInline:l,height:r}:{insetBlock:l,insetInlineStart:l,width:r}],"&:hover:before":{display:"none"}}}});return[u(),u(!0),{["".concat(a).concat(n,"-color-default")]:{[c("compact-connect-border-color")]:"color-mix(in srgb, ".concat(s("bg-color-hover")," 75%, ").concat(i,")")}}]};var X=(0,P.bk)(["Button","compact"],e=>{let t=z(e);return[(0,U.c)(t),function(e){var t,n;let r="".concat(e.componentCls,"-compact-vertical");return{[r]:{...(t=e.componentCls,{["&-item:not(".concat(r,"-last-item)")]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},["&-item:not(".concat(t,"-status-success)")]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}),...(n=e.componentCls,{["&-item:not(".concat(r,"-first-item):not(").concat(r,"-last-item)")]:{borderRadius:0},["&-item".concat(r,"-first-item:not(").concat(r,"-last-item)")]:{["&, &".concat(n,"-sm, &").concat(n,"-lg")]:{borderEndEndRadius:0,borderEndStartRadius:0}},["&-item".concat(r,"-last-item:not(").concat(r,"-first-item)")]:{["&, &".concat(n,"-sm, &").concat(n,"-lg")]:{borderStartStartRadius:0,borderStartEndRadius:0}}})}}}(t),G(t)]},Z);let Y={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},J=r.forwardRef((e,t)=>{var n,h;let m;let{_skipSemantic:v,loading:b=!1,prefixCls:x,color:w,variant:C,type:k,danger:F=!1,shape:S,size:P,disabled:I,className:O,rootClassName:R,children:N,icon:A,iconPosition:j,iconPlacement:$,ghost:M=!1,block:z=!1,htmlType:Z="button",classNames:W,styles:V,style:B,autoInsertSpace:q,autoFocus:H,...D}=e,T=(0,o.qo)(N),L=k||"default",{getPrefixCls:U,direction:G,autoInsertSpace:J,className:Q,style:K,classNames:ee,styles:et,loadingIcon:en,shape:er,color:eo,variant:ei}=(0,s.dj)("button"),ea=S||er||"default",[el,ec]=(0,r.useMemo)(()=>{if(w&&C)return[w,C];if(k||F){let e=Y[L]||[];return F?["danger",e[1]]:e}return"solid"===C?["primary",C]:eo&&ei?[eo,ei]:"solid"===ei?["primary",ei]:["default","outlined"]},[w,C,k,F,eo,ei,L]),[es,eu]=(0,r.useMemo)(()=>M&&"solid"===ec?[el,"outlined"]:[el,ec],[el,ec,M]),ed="danger"===es,ef=ed?"dangerous":es,eh=null===(n=null!=q?q:J)||void 0===n||n,eg=U("btn",x),[ep,em]=_(eg),ev=(0,r.useContext)(u.Z),ey=null!=I?I:ev,eb=(0,r.useContext)(g),ex=(0,r.useMemo)(()=>(function(e){if((0,l.PO)(e)){let t=null==e?void 0:e.delay;return{loading:(t=(0,l.hj)(t)?t:0)<=0,delay:t}}return{loading:!!e,delay:0}})(b),[b]),[ew,eE]=(0,o.D)(ex.loading),[eC,ek]=(0,r.useState)(!1),eF=(0,r.useRef)(null),eS=(0,o.x1)(t,eF),eP=1===T.length&&!A&&!(0,p.Dn)(eu),eI=(0,r.useRef)(!0);r.useEffect(()=>(eI.current=!1,()=>{eI.current=!0}),[]),(0,o.bt)(()=>{ex.delay>0?eE(!0,{ms:ex.delay}):eE(ex.loading,!0)},[ex.delay,ex.loading]),(0,r.useEffect)(()=>{if(!eF.current||!eh)return;let e=eF.current.textContent||"";eP&&(0,p.aG)(e)?eC||ek(!0):eC&&ek(!1)}),(0,r.useEffect)(()=>{if(H){var e;null===(e=eF.current)||void 0===e||e.focus()}},[]);let eO=r.useCallback(t=>{var n;if(ew||ey){t.preventDefault();return}null===(n=e.onClick)||void 0===n||n.call(e,t)},[e.onClick,ew,ey]),{compactSize:eR,compactItemClassnames:eN}=(0,f.ri)(eg,G),eA=(0,d.Z)(e=>{var t,n;return null!==(n=null!==(t=null!=P?P:eR)&&void 0!==t?t:eb)&&void 0!==n?n:e}),ej=ew?"loading":A,e$=null!==(h=null!=$?$:j)&&void 0!==h?h:"start",eM=(0,o.CE)(D,["navigate"]),ez={...e,type:L,color:es,variant:eu,danger:ed,shape:ea,size:eA,disabled:ey,loading:ew,iconPlacement:e$},eZ=(0,a.lw)(K),eW=(0,a.lw)(B),[eV,eB]=(0,a.MW)([v?void 0:ee,W],[v?void 0:et,eZ,V,eW],{props:ez}),eq=(0,i.W)(eg,ep,em,{["".concat(eg,"-").concat(ea)]:"default"!==ea&&"square"!==ea&&ea,["".concat(eg,"-").concat(L)]:L,["".concat(eg,"-dangerous")]:F,["".concat(eg,"-color-").concat(ef)]:ef,["".concat(eg,"-variant-").concat(eu)]:eu,["".concat(eg,"-lg")]:"large"===eA,["".concat(eg,"-sm")]:"small"===eA,["".concat(eg,"-icon-only")]:!N&&0!==N&&!!ej,["".concat(eg,"-background-ghost")]:M&&!(0,p.Dn)(eu),["".concat(eg,"-loading")]:ew,["".concat(eg,"-two-chinese-chars")]:eC&&eh&&!ew,["".concat(eg,"-block")]:z,["".concat(eg,"-rtl")]:"rtl"===G,["".concat(eg,"-icon-end")]:"end"===e$},eN,O,R,Q,eV.root),eH={className:eV.icon,style:eB.icon},eD=e=>r.createElement(y,{prefixCls:eg,...eH},e),eT=r.createElement(E,{existIcon:!!A,prefixCls:eg,loading:ew,mount:eI.current,...eH}),eL=(0,l.PO)(b)&&b.icon||en;m=A&&!ew?eD(A):b&&eL?eD(eL):eT;let e_=(0,o.rB)(N)?(0,p.hU)(N,eP&&eh,eB.content,eV.content):null;if(void 0!==eM.href)return r.createElement("a",{...eM,className:(0,i.W)(eq,{["".concat(eg,"-disabled")]:ey}),href:ey?void 0:eM.href,style:eB.root,onClick:eO,ref:eS,tabIndex:ey?-1:0,"aria-disabled":ey},m,e_);let eU=r.createElement("button",{...D,type:Z,className:eq,style:eB.root,onClick:eO,disabled:ey,ref:eS},m,e_,eN&&r.createElement(X,{prefixCls:eg}));return(0,p.Dn)(eu)||(eU=r.createElement(c.Z,{component:"Button",disabled:ew},eU)),eU});J.Group=e=>{let{getPrefixCls:t,direction:n}=r.useContext(s.E_),{prefixCls:o,size:a,className:l,...c}=e,u=t("btn-group",o),[,,d]=(0,h.ZP)(),f=r.useMemo(()=>{switch(a){case"large":return"lg";case"small":return"sm";default:return""}},[a]),p=(0,i.W)(u,{["".concat(u,"-").concat(f)]:f,["".concat(u,"-rtl")]:"rtl"===n},l,d);return r.createElement(g.Provider,{value:a},r.createElement("div",{...c,className:p}))},J.__ANT_BUTTON=!0;var Q=J},41793:function(e,t,n){n.d(t,{Dn:function(){return h},aG:function(){return d},hU:function(){return g},nx:function(){return f}});var r=n(78652),o=n(60635),i=n(13063),a=n(86937),l=n(91560),c=n(87092),s=n(65739);let u=/^[\u4E00-\u9FA5]{2}$/,d=u.test.bind(u);function f(e){return"danger"===e?{danger:!0}:{type:e}}function h(e){return"text"===e||"link"===e}function g(e,t,n,r){let s=!1,u=[];return o.Children.forEach(e,e=>{let t=(0,l.HD)(e)||(0,l.hj)(e);if(s&&t){let t=u.length-1,n=u[t];u[t]="".concat(n).concat(e)}else u.push(e);s=t}),o.Children.map(u,e=>(function(e,t,n,r){if(!(0,i.rB)(e))return;let s=t?" ":"";return!(0,l.HD)(e)&&!(0,l.hj)(e)&&(0,l.HD)(e.type)&&d(e.props.children)?(0,c.Tm)(e,e=>{let t=(0,a.W)(e.className,r)||void 0,o={...n,...e.style};return{...e,children:e.children.split("").join(s),className:t,style:o}}):(0,l.HD)(e)?o.createElement("span",{className:r,style:n},d(e)?e.split("").join(s):e):(0,c.M2)(e)?o.createElement("span",{className:r,style:n},e):(0,c.Tm)(e,e=>({...e,className:(0,a.W)(e.className,r)||void 0,style:{...e.style,...n}}))})(e,t,n,r))}["default","primary","danger"].concat((0,r.Z)(s.i))},6443:function(e,t,n){var r=n(28798);t.ZP=r.Z},11672:function(e,t,n){n.d(t,{y9:function(){return c}});var r=n(58579),o=n(77134),i=n(22266);let a=(e,t)=>(null==e?void 0:e.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6))||"",l=(e,t)=>e?a(e,t):"",c=(0,o.Z)(function e(t){if((0,r.Z)(this,e),this.cleared=!1,t instanceof e){var n;this.metaColor=t.metaColor.clone(),this.colors=null===(n=t.colors)||void 0===n?void 0:n.map(t=>({color:new e(t.color),percent:t.percent})),this.cleared=t.cleared;return}let o=Array.isArray(t);o&&t.length?(this.colors=t.map(t=>{let{color:n,percent:r}=t;return{color:new e(n),percent:r}}),this.metaColor=new i.Il(this.colors[0].color.metaColor)):this.metaColor=new i.Il(o?"":t),t&&(!o||this.colors)||(this.metaColor=this.metaColor.setA(0),this.cleared=!0)},[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return l(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){let{colors:e}=this;if(e){let t=e.map(e=>"".concat(e.color.toRgbString()," ").concat(e.percent,"%")).join(", ");return"linear-gradient(90deg, ".concat(t,")")}return this.metaColor.toRgbString()}},{key:"equals",value:function(e){return!!e&&this.isGradient()===e.isGradient()&&(this.isGradient()?this.colors.length===e.colors.length&&this.colors.every((t,n)=>{let r=e.colors[n];return t.percent===r.percent&&t.color.equals(r.color)}):this.toHexString()===e.toHexString())}}])},78679:function(e,t,n){var r=n(60635),o=n(91560),i=n(26273);t.Z=e=>{let t=r.useContext(i.Z);return r.useMemo(()=>e?(0,o.HD)(e)?null!=e?e:t:(0,o.mf)(e)?e(t):t:t,[e,t])}},95909:function(e,t,n){n.d(t,{Z:function(){return X}});var r=n(60635),o=n(38655),i=n(36127);let a=r.createContext(null),l=r.createContext({});var c=n(86937),s=n(21636),u=n(75433),d=n(29119);function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=e=>{let{prefixCls:t,className:n,containerRef:o,...i}=e,{panel:a}=r.useContext(l),s=(0,d.x1)(a,o);return r.createElement("div",f({className:(0,c.W)(`${t}-section`,n),role:"dialog",ref:s},(0,u.Z)(e,{aria:!0}),{"aria-modal":"true"},i))},g=n(13063),p=n(3082);function m(e){if("string"==typeof e){let t=Number(e.replace(/px$/i,""));if(parseFloat(e)===t&&(0,p.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}var v=n(84974);function y(){return(y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let b=r.forwardRef((e,t)=>{let n;let{prefixCls:o,open:i,placement:l,inline:d,push:f,forceRender:p,autoFocus:b,focusTrap:x,classNames:w,rootClassName:E,rootStyle:C,zIndex:k,className:F,id:S,style:P,motion:I,width:O,height:R,size:N,maxSize:A,children:j,mask:$,maskClosable:M,maskMotion:z,maskClassName:Z,maskStyle:W,afterOpenChange:V,onClose:B,onMouseEnter:q,onMouseOver:H,onMouseLeave:D,onClick:T,onKeyDown:L,onKeyUp:_,styles:U,drawerRender:G,resizable:X,defaultSize:Y}=e,J=r.useRef(null);r.useImperativeHandle(t,()=>J.current);let Q=function(e,t,n,o,i){let[a]=(0,v.te)(t&&(o??!1!==i),e);return r.useEffect(()=>{t&&!0===n&&e()?.focus({preventScroll:!0})},[t]),a}(()=>J.current,i,b,x,$),[K,ee]=r.useState(!1),et=r.useContext(a);n="boolean"==typeof f?f?{}:{distance:0}:f||{};let en=n?.distance??et?.pushDistance??180,er=r.useMemo(()=>({pushDistance:en,push:()=>{ee(!0)},pull:()=>{ee(!1)}}),[en]);r.useEffect(()=>{i?et?.push?.():et?.pull?.()},[i]),r.useEffect(()=>()=>{et?.pull?.()},[]);let eo=r.createElement(s.ZP,y({key:"mask"},z,{visible:$&&i}),({className:e,style:t},n)=>r.createElement("div",{className:(0,c.W)(`${o}-mask`,e,w?.mask,Z),style:{...t,...W,...U?.mask},onClick:M&&i?B:void 0,ref:n})),ei="function"==typeof I?I(l):I,[ea,el]=r.useState(),ec="left"===l||"right"===l,es=r.useMemo(()=>{let e=ec?O:R;return m(N??e??ea??Y??(ec?378:void 0))},[N,O,R,Y,ec,ea]),eu=r.useMemo(()=>{let e={};if(K&&en)switch(l){case"top":e.transform=`translateY(${en}px)`;break;case"bottom":e.transform=`translateY(${-en}px)`;break;case"left":e.transform=`translateX(${en}px)`;break;default:e.transform=`translateX(${-en}px)`}return ec?e.width=m(es):e.height=m(es),e},[K,en,l,ec,es]),ed=r.useRef(null),ef=!!X,eh="object"==typeof X&&X||{},eg=(0,g.zX)(e=>{el(e),eh.onResize?.(e)}),{dragElementProps:ep,isDragging:em}=function(e){let{prefixCls:t,direction:n,className:o,style:i,maxSize:a,containerRef:l,currentSize:s,onResize:u,onResizeEnd:d,onResizeStart:f}=e,[h,p]=r.useState(!1),[m,v]=r.useState(0),[y,b]=r.useState(0),x="left"===n||"right"===n,w=(0,g.zX)(e=>{let t;if(e.preventDefault(),e.stopPropagation(),p(!0),x?v(e.clientX):v(e.clientY),"number"==typeof s)t=s;else if(l?.current){let e=l.current.getBoundingClientRect();t=x?e.width:e.height}b(t),f?.(t)}),E=(0,g.zX)(e=>{if(!h)return;let t=(x?e.clientX:e.clientY)-m;("right"===n||"bottom"===n)&&(t=-t);let r=y+t;r<0&&(r=0),a&&r>a&&(r=a),u?.(r)}),C=r.useCallback(()=>{if(h&&(p(!1),l?.current)){let e=l.current.getBoundingClientRect(),t=x?e.width:e.height;d?.(t)}},[h,l,d,x]);return r.useEffect(()=>{if(h)return document.addEventListener("mousemove",E),document.addEventListener("mouseup",C),()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",C)}},[h,E,C]),{dragElementProps:{className:(0,c.W)(`${t}-dragger`,`${t}-dragger-${n}`,{[`${t}-dragger-dragging`]:h,[`${t}-dragger-horizontal`]:x,[`${t}-dragger-vertical`]:!x},o),style:i,onMouseDown:w},isDragging:h}}({prefixCls:`${o}-resizable`,direction:l,className:w?.dragger,style:U?.dragger,maxSize:A,containerRef:ed,currentSize:es,onResize:eg,onResizeStart:eh.onResizeStart,onResizeEnd:eh.onResizeEnd}),ev={onMouseEnter:q,onMouseOver:H,onMouseLeave:D,onClick:T,onKeyDown:L,onKeyUp:_,onFocus:e=>{Q(e.target)}},ey=r.createElement(s.ZP,y({key:"panel"},ei,{visible:i,forceRender:p,onVisibleChanged:V,removeOnLeave:!1,leavedClassName:`${o}-content-wrapper-hidden`}),({className:t,style:n},i)=>{let a=r.createElement(h,y({id:S,containerRef:i,prefixCls:o,className:(0,c.W)(F,w?.section),style:{...P,...U?.section}},(0,u.Z)(e,{aria:!0}),ev),j);return r.createElement("div",y({ref:ed,className:(0,c.W)(`${o}-content-wrapper`,em&&`${o}-content-wrapper-dragging`,w?.wrapper,!em&&t),style:{...n,...eu,...U?.wrapper}},(0,u.Z)(e,{data:!0})),ef&&r.createElement("div",ep),G?G(a):a)}),eb={...C};return k&&(eb.zIndex=k),r.createElement(a.Provider,{value:er},r.createElement("div",{className:(0,c.W)(o,`${o}-${l}`,E,{[`${o}-open`]:i,[`${o}-inline`]:d}),style:eb,tabIndex:-1,ref:J},eo,ey))});var x=e=>{let{open:t=!1,prefixCls:n="rc-drawer",placement:a="right",autoFocus:c=!0,keyboard:s=!0,width:u,height:d,size:f,maxSize:h,mask:g=!0,maskClosable:p=!0,getContainer:m,forceRender:v,afterOpenChange:y,destroyOnHidden:x,onMouseEnter:w,onMouseOver:E,onMouseLeave:C,onClick:k,onKeyDown:F,onKeyUp:S,onClose:P,resizable:I,defaultSize:O,focusTriggerAfterClose:R,panelRef:N}=e,[A,j]=r.useState(!1),[$,M]=r.useState(!1);(0,i.Z)(()=>{M(!0)},[]);let z=!!$&&t,Z=r.useRef(null),W=r.useRef(null);(0,i.Z)(()=>{z&&(W.current=document.activeElement)},[z]);let V=r.useMemo(()=>({panel:N}),[N]);if(!v&&!A&&!z&&x)return null;let B={...e,open:z,prefixCls:n,placement:a,autoFocus:c,keyboard:s,width:u,height:d,size:f,maxSize:h,defaultSize:O,mask:g,maskClosable:p,inline:!1===m,afterOpenChange:e=>{j(e),y?.(e),e||!1===R||!W.current||Z.current?.contains(W.current)||W.current?.focus({preventScroll:!0})},ref:Z,resizable:I,onMouseEnter:w,onMouseOver:E,onMouseLeave:C,onClick:k,onKeyDown:F,onKeyUp:S};return r.createElement(l.Provider,{value:V},r.createElement(o.Z,{open:z||v||A,autoDestroy:!1,getContainer:m,autoLock:g&&(z||A),onEsc:({top:e,event:t})=>{e&&s&&(t.stopPropagation(),P?.(t))}},r.createElement(b,B)))},w=n(53074),E=n(56689),C=n(15619),k=n(67632),F=n(91560),S=n(24025),P=n(9812),I=n(73703),O=n(76394),R=n(65963),N=n(87092),A=n(86892),j=e=>{let{prefixCls:t,ariaId:n,title:o,footer:i,extra:a,closable:l,loading:s,onClose:u,headerStyle:d,bodyStyle:f,footerStyle:h,children:p,classNames:m,styles:v}=e,y=(0,I.dj)("drawer"),{classNames:b,styles:x,closable:w}=y,[E,C]=(0,k.MW)([b,m],[x,v],{props:{...e,closable:null!=l?l:w}}),S=r.useMemo(()=>{let e=null!=l?l:w;return!1===e?void 0:(0,F.PO)(e)&&(null==e?void 0:e.placement)==="end"?"end":"start"},[l,w]),P=r.useCallback(e=>r.createElement("button",{type:"button",onClick:u,className:(0,c.W)("".concat(t,"-close"),{["".concat(t,"-close-").concat(S)]:"end"===S},E.close),style:C.close},e),[u,t,S,E.close,C.close]),[O,j,$]=(0,R.bt)((0,R.wz)(e),(0,R.wz)(y),{closable:!0,closeIconRender:P}),M=(0,N.Tm)(j,{disabled:$}),z=(0,g.rB)(o),Z=(0,g.rB)(a);return r.createElement(r.Fragment,null,z||O||Z?r.createElement("div",{style:{...C.header,...d},className:(0,c.W)("".concat(t,"-header"),E.header,{["".concat(t,"-header-close-only")]:O&&!z&&!Z})},r.createElement("div",{className:"".concat(t,"-header-title")},"start"===S&&M,z&&r.createElement("div",{className:(0,c.W)("".concat(t,"-title"),E.title),style:C.title,id:n},o)),Z&&r.createElement("div",{className:(0,c.W)("".concat(t,"-extra"),E.extra),style:C.extra},a),"end"===S&&M):null,r.createElement("div",{className:(0,c.W)("".concat(t,"-body"),E.body),style:{...C.body,...f}},s?r.createElement(A.Z,{active:!0,title:!1,paragraph:{rows:5},className:"".concat(t,"-body-skeleton")}):p),i?r.createElement("div",{className:(0,c.W)("".concat(t,"-footer"),E.footer),style:{...C.footer,...h}},i):null)},$=n(60662),M=n(28811),z=n(14482),Z=n(46282);let W=e=>{let t="100%";return({left:"translateX(-".concat(t,")"),right:"translateX(".concat(t,")"),top:"translateY(-".concat(t,")"),bottom:"translateY(".concat(t,")")})[e]},V=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),B=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:"all ".concat(t)}},...V({opacity:e},{opacity:1})}),q=(e,t)=>[B(.7,t),V({transform:W(e)},{transform:"none"})];var H=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{["".concat(t,"-mask-motion")]:B(0,n),["".concat(t,"-panel-motion")]:["left","right","top","bottom"].reduce((e,t)=>({...e,["&-".concat(t)]:q(t,n)}),{})}}};let D=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:o,colorBgElevated:i,motionDurationSlow:a,motionDurationMid:l,paddingXS:c,padding:s,paddingLG:u,fontSizeLG:d,lineHeightLG:f,lineWidth:h,lineType:g,colorSplit:p,marginXS:m,colorIcon:v,colorIconHover:y,colorBgTextHover:b,colorBgTextActive:x,colorText:w,fontWeightStrong:E,footerPaddingBlock:C,footerPaddingInline:k,draggerSize:F,calc:S}=e,P="".concat(n,"-content-wrapper"),I="".concat(n,"-resizable-dragger");return{[n]:{position:"fixed",inset:0,zIndex:r,pointerEvents:"none",color:w,"&-pure":{position:"relative",background:i,display:"flex",flexDirection:"column",pointerEvents:"auto",["&".concat(n,"-left")]:{boxShadow:e.boxShadowDrawerLeft},["&".concat(n,"-right")]:{boxShadow:e.boxShadowDrawerRight},["&".concat(n,"-top")]:{boxShadow:e.boxShadowDrawerUp},["&".concat(n,"-bottom")]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},["".concat(n,"-mask")]:{position:"absolute",inset:0,zIndex:r,background:o,pointerEvents:"auto",["&".concat(n,"-mask-blur")]:{backdropFilter:"blur(4px)"}},[P]:{position:"absolute",zIndex:r,maxWidth:"100vw",transition:"all ".concat(a),"&-hidden":{display:"none"}},["&-left > ".concat(P)]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},["&-right > ".concat(P)]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},["&-top > ".concat(P)]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},["&-bottom > ".concat(P)]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},["".concat(n,"-section")]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:i,pointerEvents:"auto"},["".concat(n,"-header")]:{display:"flex",flex:0,alignItems:"center",padding:"".concat((0,$.bf)(s)," ").concat((0,$.bf)(u)),fontSize:d,lineHeight:f,borderBottom:"".concat((0,$.bf)(h)," ").concat(g," ").concat(p),"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},["".concat(n,"-extra")]:{flex:"none"},["".concat(n,"-close")]:{display:"inline-flex",width:S(d).add(c).equal(),height:S(d).add(c).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:v,fontWeight:E,fontSize:d,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:"all ".concat(l),textRendering:"auto",["&".concat(n,"-close-end")]:{marginInlineStart:m},["&:not(".concat(n,"-close-end)")]:{marginInlineEnd:m},"&:disabled":{pointerEvents:"none"},"&:hover":{color:y,backgroundColor:b,textDecoration:"none"},"&:active":{backgroundColor:x},...(0,M.Qy)(e)},["".concat(n,"-title")]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:f},["".concat(n,"-body")]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:"auto",["".concat(n,"-body-skeleton")]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},["".concat(n,"-footer")]:{flexShrink:0,padding:"".concat((0,$.bf)(C)," ").concat((0,$.bf)(k)),borderTop:"".concat((0,$.bf)(h)," ").concat(g," ").concat(p)},[I]:{position:"absolute",zIndex:1,backgroundColor:"transparent",userSelect:"none",pointerEvents:"auto","&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},["".concat(I,"-left")]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:F,cursor:"col-resize"},["".concat(I,"-right")]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:F,cursor:"col-resize"},["".concat(I,"-top")]:{insetInline:0,bottom:0,height:F,cursor:"row-resize"},["".concat(I,"-bottom")]:{insetInline:0,top:0,height:F,cursor:"row-resize"},["".concat(P,"-dragging")]:{userSelect:"none",transition:"none",willChange:"width, height",["".concat(n,"-content")]:{pointerEvents:"none"},["".concat(n,"-section")]:{pointerEvents:"none"}},"&-rtl":{direction:"rtl"}}}};var T=(0,z.I$)("Drawer",e=>{let t=(0,Z.IX)(e,{});return[D(t),H(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4})),L=n(90495);let _={distance:180},U={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},G=e=>{let{rootClassName:t,size:n,defaultSize:o=378,height:i,width:a,mask:l,push:s=_,open:u,afterOpenChange:d,onClose:f,prefixCls:h,getContainer:p,panelRef:m=null,style:v,className:y,resizable:b,"aria-labelledby":R,focusable:N,maskClosable:A,maskStyle:$,drawerStyle:M,contentWrapperStyle:z,destroyOnClose:Z,destroyOnHidden:W,...V}=e,{placement:B}=V,q=(0,g.Me)(),H=(0,g.rB)(V.title)?q:void 0,{getPopupContainer:D,getPrefixCls:G,direction:X,className:Y,style:J,classNames:Q,styles:K,mask:ee,focusable:et}=(0,I.dj)("drawer"),en=G("drawer",h),[er,eo]=T(en),ei=void 0===p&&D?()=>D(document.body):p,ea=r.useMemo(()=>(0,F.hj)(n)?n:"large"===n?736:"default"===n?378:"string"==typeof n?/^\d+(\.\d+)?$/.test(n)?Number(n):n:B&&"left"!==B&&"right"!==B?i:a,[n,B,a,i]),el={motionName:(0,S.m)(en,"mask-motion"),...U},ec=(0,O.H)(),es=(0,g.sQ)(m,ec),[eu,ed]=(0,E.Cn)("Drawer",V.zIndex),[ef,eh,eg]=(0,C.x)(l,ee,en,A),ep=(0,L.Z)({...et,...N},!1!==ei&&ef),{classNames:em,styles:ev,rootStyle:ey}=V,eb={...e,zIndex:eu,panelRef:m,mask:ef,maskClosable:eg,defaultSize:o,push:s,focusable:ep},ex=(0,k.lw)(J,"section"),ew=(0,k.lw)(M,"section"),eE=(0,k.lw)(v,"section"),[eC,ek]=(0,k.MW)([Q,em],[K,ex,ev,ew,eE],{props:eb}),eF=(0,c.W)({"no-mask":!ef,["".concat(en,"-rtl")]:"rtl"===X},t,er,eo,eC.root);return r.createElement(w.Z,{form:!0,space:!0},r.createElement(P.Z.Provider,{value:ed},r.createElement(x,{prefixCls:en,onClose:f,maskMotion:el,motion:e=>({motionName:(0,S.m)(en,"panel-motion-".concat(e)),...U}),...V,classNames:{mask:(0,c.W)(eC.mask,eh.mask),section:eC.section,wrapper:eC.wrapper,dragger:eC.dragger},styles:{mask:{...ek.mask,...$},section:ek.section,wrapper:{...ek.wrapper,...z},dragger:ek.dragger},open:u,mask:ef,maskClosable:eg,push:s,size:ea,defaultSize:o,rootStyle:{...ek.root,...ey},className:(0,c.W)(Y,y),rootClassName:eF,getContainer:ei,afterOpenChange:d,panelRef:es,zIndex:eu,...b?{resizable:b}:{},"aria-labelledby":null!=R?R:H,destroyOnHidden:null!=W?W:Z,focusTriggerAfterClose:ep.focusTriggerAfterClose,focusTrap:ep.trap},r.createElement(j,{prefixCls:en,size:n,...V,ariaId:H,onClose:f}))))};G._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:o,placement:i="right",...a}=e,{getPrefixCls:l}=r.useContext(I.E_),s=l("drawer",t),[u,d]=T(s),f=(0,c.W)(s,"".concat(s,"-pure"),"".concat(s,"-").concat(i),u,d,o);return r.createElement("div",{className:f,style:n},r.createElement(j,{prefixCls:s,...a}))};var X=G},90495:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(60635);function o(e,t,n){return(0,r.useMemo)(()=>({trap:null==t||t,focusTriggerAfterClose:null==n||n,...e}),[e,t,n])}},92073:function(e,t,n){n.d(t,{RV:function(){return c},Rk:function(){return s},Ux:function(){return d},aM:function(){return u},pg:function(){return f},q3:function(){return a},qI:function(){return l}});var r=n(60635),o=n(60620),i=n(13063);let a=r.createContext({labelAlign:"right",layout:"horizontal",itemRef:()=>{}}),l=r.createContext(null),c=e=>{let t=(0,i.CE)(e,["prefixCls"]);return r.createElement(o.RV,{...t})},s=r.createContext({prefixCls:""}),u=r.createContext({}),d=e=>{let{children:t,status:n,override:o}=e,i=r.useContext(u),a=r.useMemo(()=>{let e={...i};return o&&delete e.isFormItemInput,n&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e},[n,o,i]);return r.createElement(u.Provider,{value:a},t)},f=r.createContext(void 0)},90204:function(e,t,n){var r=n(60635),o=n(91560),i=n(46938),a=n(75388);t.Z=(e,t)=>{let n=r.useContext(i.Z);return[r.useMemo(()=>{var r;let i=t||a.Z[e],l=null!==(r=null==n?void 0:n[e])&&void 0!==r?r:{};return{...(0,o.mf)(i)?i():i,...l||{}}},[e,t,n]),r.useMemo(()=>{let e=null==n?void 0:n.locale;return(null==n?void 0:n.exist)&&!e?a.Z.locale:e},[n])]}},86892:function(e,t,n){n.d(t,{Z:function(){return $}});var r=n(60635),o=n(86937),i=n(67632),a=n(91560),l=n(73703),c=n(78679),s=e=>{let{prefixCls:t,className:n,style:i,size:l,shape:c}=e,s=(0,o.W)({["".concat(t,"-lg")]:"large"===l,["".concat(t,"-sm")]:"small"===l}),u=(0,o.W)({["".concat(t,"-circle")]:"circle"===c,["".concat(t,"-square")]:"square"===c,["".concat(t,"-round")]:"round"===c}),d=r.useMemo(()=>(0,a.hj)(l)?{width:l,height:l,lineHeight:"".concat(l,"px")}:{},[l]);return r.createElement("span",{className:(0,o.W)(t,s,u,n),style:{...d,...i}})},u=n(60662),d=n(14482),f=n(46282);let h=new u.E4("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),g=e=>({height:e,lineHeight:(0,u.bf)(e)}),p=e=>({width:e,...g(e)}),m=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:h,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),v=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...g(e)}),y=e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=e;return{[t]:{display:"inline-block",verticalAlign:"top",background:n,...p(r)},["".concat(t).concat(t,"-circle")]:{borderRadius:"50%"},["".concat(t).concat(t,"-lg")]:{...p(o)},["".concat(t).concat(t,"-sm")]:{...p(i)}}},b=e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:l}=e;return{[r]:{display:"inline-block",verticalAlign:"top",background:a,borderRadius:n,...v(t,l)},["".concat(r,"-lg")]:{...v(o,l)},["".concat(r,"-sm")]:{...v(i,l)}}},x=e=>{let{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:o}=e;return{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:t,borderRadius:n,...p(o(r).mul(2).equal())}},w=e=>({[e.skeletonNodeCls]:{...x(e)}}),E=e=>{let{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return{[t]:{...x(e),["".concat(t,"-path")]:{fill:"#bfbfbf"},["".concat(t,"-svg")]:{...p(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},["".concat(t,"-svg").concat(t,"-svg-circle")]:{borderRadius:"50%"}},["".concat(t).concat(t,"-circle")]:{borderRadius:"50%"}}},C=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{["".concat(n).concat(r,"-circle")]:{width:t,minWidth:t,borderRadius:"50%"},["".concat(n).concat(r,"-round")]:{borderRadius:t}}},k=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...g(e)}),F=e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:l}=e;return{[n]:{display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:l(r).mul(2).equal(),minWidth:l(r).mul(2).equal(),...k(r,l)},...C(e,r,n),["".concat(n,"-lg")]:{...k(o,l)},...C(e,o,"".concat(n,"-lg")),["".concat(n,"-sm")]:{...k(i,l)},...C(e,i,"".concat(n,"-sm"))}},S=e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonNodeCls:l,skeletonImageCls:c,controlHeight:s,controlHeightLG:u,controlHeightSM:d,gradientFromColor:f,padding:h,marginSM:g,borderRadius:v,titleHeight:x,blockRadius:C,paragraphLiHeight:k,controlHeightXS:S,paragraphMarginTop:P}=e;return{[t]:{display:"table",width:"100%",["".concat(t,"-header")]:{display:"table-cell",paddingInlineEnd:h,verticalAlign:"top",[n]:{display:"inline-block",verticalAlign:"top",background:f,...p(s)},["".concat(n,"-circle")]:{borderRadius:"50%"},["".concat(n,"-lg")]:{...p(u)},["".concat(n,"-sm")]:{...p(d)}},["".concat(t,"-section")]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:x,background:f,borderRadius:C,["+ ".concat(o)]:{marginBlockStart:d}},[o]:{padding:0,"> li":{width:"100%",height:k,listStyle:"none",background:f,borderRadius:C,"+ li":{marginBlockStart:S}}},["".concat(o,"> li:last-child:not(:first-child):not(:nth-child(2))")]:{width:"61%"}},["&-round ".concat(t,"-section")]:{["".concat(r,", ").concat(o," > li")]:{borderRadius:v}}},["".concat(t,"-with-avatar ").concat(t,"-section")]:{[r]:{marginBlockStart:g,["+ ".concat(o)]:{marginBlockStart:P}}},["".concat(t).concat(t,"-element")]:{display:"inline-block",width:"auto",...F(e),...y(e),...b(e),...w(e),...E(e)},["".concat(t).concat(t,"-block")]:{width:"100%",[i]:{width:"100%"},[a]:{width:"100%"}},["".concat(t).concat(t,"-active")]:{["\n ".concat(r,",\n ").concat(o," > li,\n ").concat(n,",\n ").concat(i,",\n ").concat(a,",\n ").concat(l,",\n ").concat(c,"\n ")]:{...m(e)}}}};var P=(0,d.I$)("Skeleton",e=>{let{componentCls:t,calc:n}=e;return S((0,f.IX)(e,{skeletonAvatarCls:"".concat(t,"-avatar"),skeletonTitleCls:"".concat(t,"-title"),skeletonParagraphCls:"".concat(t,"-paragraph"),skeletonButtonCls:"".concat(t,"-button"),skeletonInputCls:"".concat(t,"-input"),skeletonNodeCls:"".concat(t,"-node"),skeletonImageCls:"".concat(t,"-image"),imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:"linear-gradient(90deg, ".concat(e.gradientFromColor," 25%, ").concat(e.gradientToColor," 37%, ").concat(e.gradientFromColor," 63%)"),skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n,gradientFromColor:t,gradientToColor:n,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),I=e=>{let{prefixCls:t,className:n,classNames:i,rootClassName:a,internalClassName:c,style:s,styles:u,active:d,children:f}=e,{getPrefixCls:h}=r.useContext(l.E_),g=h("skeleton",t),[p,m]=P(g),v=(0,o.W)(g,"".concat(g,"-element"),{["".concat(g,"-active")]:d},p,null==i?void 0:i.root,n,a,m);return r.createElement("div",{className:v,style:null==u?void 0:u.root},r.createElement("div",{className:(0,o.W)(null==i?void 0:i.content,c||"".concat(g,"-node")),style:{...null==u?void 0:u.content,...s}},f))};let O=(e,t)=>{let{width:n,rows:r=2}=t;return Array.isArray(n)?n[e]:r-1===e?n:void 0};var R=e=>{let{prefixCls:t,className:n,style:i,rows:a=0}=e,l=Array.from({length:a}).map((t,n)=>r.createElement("li",{key:n,style:{width:O(n,e)}}));return r.createElement("ul",{className:(0,o.W)(t,n),style:i},l)},N=e=>{let{prefixCls:t,className:n,width:i,style:a}=e;return r.createElement("h3",{className:(0,o.W)(t,n),style:{width:i,...a}})};function A(e){return(0,a.PO)(e)?e:{}}let j=r.forwardRef((e,t)=>{let{prefixCls:n,loading:a,className:c,rootClassName:u,classNames:d,style:f,styles:h,children:g,avatar:p=!1,title:m=!0,paragraph:v=!0,active:y,round:b}=e,{getPrefixCls:x,direction:w,className:E,style:C,classNames:k,styles:F}=(0,l.dj)("skeleton"),S=x("skeleton",n),[I,O]=P(S),j={...e,avatar:p,title:m,paragraph:v},$=(0,i.lw)(C),M=(0,i.lw)(f),[z,Z]=(0,i.MW)([k,d],[F,$,h,M],{props:j}),W=r.useRef(null);if(r.useImperativeHandle(t,()=>({nativeElement:W.current})),a||!("loading"in e)){let e,t;let n=!!p,i=!!m,a=!!v;if(n){let t={className:z.avatar,prefixCls:"".concat(S,"-avatar"),...i&&!a?{size:"large",shape:"square"}:{size:"large",shape:"circle"},...A(p),style:Z.avatar};e=r.createElement("div",{className:(0,o.W)(z.header,"".concat(S,"-header")),style:Z.header},r.createElement(s,{...t}))}if(i||a){let e,l;if(i){let t={className:z.title,prefixCls:"".concat(S,"-title"),...!n&&a?{width:"38%"}:n&&a?{width:"50%"}:{},...A(m),style:Z.title};e=r.createElement(N,{...t})}if(a){let e={className:z.paragraph,prefixCls:"".concat(S,"-paragraph"),...function(e,t){let n={};return e&&t||(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}(n,i),...A(v),style:Z.paragraph};l=r.createElement(R,{...e})}t=r.createElement("div",{className:(0,o.W)(z.section,"".concat(S,"-section")),style:Z.section},e,l)}let l=(0,o.W)(S,{["".concat(S,"-with-avatar")]:n,["".concat(S,"-active")]:y,["".concat(S,"-rtl")]:"rtl"===w,["".concat(S,"-round")]:b},z.root,E,c,u,I,O);return r.createElement("div",{ref:W,className:l,style:Z.root},e,t)}return null!=g?g:null});j.Button=e=>{let{prefixCls:t,className:n,rootClassName:i,classNames:a,active:u,style:d,styles:f,block:h=!1,size:g,...p}=e,{getPrefixCls:m}=r.useContext(l.E_),v=m("skeleton",t),[y,b]=P(v),x=(0,c.Z)(e=>null!=g?g:e),w=(0,o.W)(v,"".concat(v,"-element"),{["".concat(v,"-active")]:u,["".concat(v,"-block")]:h},null==a?void 0:a.root,n,i,y,b);return r.createElement("div",{className:w,style:null==f?void 0:f.root},r.createElement(s,{prefixCls:"".concat(v,"-button"),className:null==a?void 0:a.content,style:{...null==f?void 0:f.content,...d},size:x,...p}))},j.Avatar=e=>{let{prefixCls:t,className:n,classNames:i,rootClassName:a,active:u,style:d,styles:f,shape:h="circle",size:g,...p}=e,{getPrefixCls:m}=r.useContext(l.E_),v=m("skeleton",t),[y,b]=P(v),x=(0,c.Z)(e=>null!=g?g:e),w=(0,o.W)(v,"".concat(v,"-element"),{["".concat(v,"-active")]:u},null==i?void 0:i.root,n,a,y,b);return r.createElement("div",{className:w,style:null==f?void 0:f.root},r.createElement(s,{prefixCls:"".concat(v,"-avatar"),className:null==i?void 0:i.content,style:{...null==f?void 0:f.content,...d},shape:h,size:x,...p}))},j.Input=e=>{let{prefixCls:t,className:n,classNames:i,rootClassName:a,active:u,block:d,style:f,styles:h,size:g,...p}=e,{getPrefixCls:m}=r.useContext(l.E_),v=m("skeleton",t),[y,b]=P(v),x=(0,c.Z)(e=>null!=g?g:e),w=(0,o.W)(v,"".concat(v,"-element"),{["".concat(v,"-active")]:u,["".concat(v,"-block")]:d},null==i?void 0:i.root,n,a,y,b);return r.createElement("div",{className:w,style:null==h?void 0:h.root},r.createElement(s,{prefixCls:"".concat(v,"-input"),className:null==i?void 0:i.content,style:{...null==h?void 0:h.content,...f},size:x,...p}))},j.Image=e=>{let{getPrefixCls:t}=r.useContext(l.E_),n=t("skeleton",e.prefixCls);return r.createElement(I,{...e,internalClassName:"".concat(n,"-image")},r.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:"".concat(n,"-image-svg"),"aria-hidden":"true",focusable:"false"},r.createElement("title",null,"Image placeholder"),r.createElement("path",{d:"M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6",className:"".concat(n,"-image-path")})))},j.Node=I;var $=j},64886:function(e,t,n){n.d(t,{BR:function(){return f},ZP:function(){return g},ri:function(){return d}});var r=n(60635),o=n(13063),i=n(86937),a=n(34673),l=n(73703),c=n(78679),s=(0,n(14482).I$)(["Space","Compact"],e=>{let{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},()=>({}),{resetStyle:!1});let u=r.createContext(null),d=(e,t)=>{let n=r.useContext(u),o=r.useMemo(()=>{if(!n)return"";let{compactDirection:r,isFirstItem:o,isLastItem:a}=n,l="vertical"===r?"-vertical-":"-";return(0,i.W)("".concat(e,"-compact").concat(l,"item"),{["".concat(e,"-compact").concat(l,"first-item")]:o,["".concat(e,"-compact").concat(l,"last-item")]:a,["".concat(e,"-compact").concat(l,"item-rtl")]:"rtl"===t})},[e,t,n]);return{compactSize:null==n?void 0:n.compactSize,compactDirection:null==n?void 0:n.compactDirection,compactItemClassnames:o}},f=e=>{let{children:t}=e;return r.createElement(u.Provider,{value:null},t)},h=e=>{let{children:t,...n}=e;return r.createElement(u.Provider,{value:r.useMemo(()=>n,[n])},t)};var g=r.forwardRef((e,t)=>{let{getPrefixCls:n,direction:d}=r.useContext(l.E_),{size:f,direction:g,orientation:p,block:m,prefixCls:v,className:y,rootClassName:b,children:x,vertical:w,...E}=e,[C,k]=(0,a.R)(p,w,g),F=(0,c.Z)(e=>null!=f?f:e),S=n("space-compact",v),[P]=s(S),I=(0,i.W)(S,P,{["".concat(S,"-rtl")]:"rtl"===d,["".concat(S,"-block")]:m,["".concat(S,"-vertical")]:k},y,b),O=r.useContext(u),R=r.useRef(null);r.useImperativeHandle(t,()=>({nativeElement:R.current}));let N=(0,o.qo)(x),A=r.useMemo(()=>N.map((e,t)=>{let n=(null==e?void 0:e.key)||"".concat(S,"-item-").concat(t);return r.createElement(h,{key:n,compactSize:F,compactDirection:C,isFirstItem:0===t&&(!O||(null==O?void 0:O.isFirstItem)),isLastItem:t===N.length-1&&(!O||(null==O?void 0:O.isLastItem))},e)}),[N,O,C,F,S]);return 0===N.length?null:r.createElement("div",{ref:R,className:I,...E},A)})},37320:function(e,t,n){n.d(t,{c:function(){return r}});function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{focus:!0},{componentCls:n}=e,{componentCls:r}=t,o=r||n,i="".concat(o,"-compact");return{[i]:{...function(e,t,n,r){let{focusElCls:o,focus:i,borderElCls:a}=n,l=a?"> *":"",c=l?" ".concat(l):"",s=e=>e.filter(Boolean).map(e=>"&:".concat(e).concat(c)).join(","),u=s(["hover",o?"hover".concat(o):null]),d=s([i?"focus":null,"active"]);return{["&-item:not(".concat(t,"-last-item)")]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},["&-item:not(".concat(r,"-status-success)")]:{zIndex:2},"&-item":{[d]:{zIndex:3},[u]:{zIndex:4},...o?{["&".concat(o)]:{zIndex:3}}:{},["&[disabled] ".concat(l)]:{zIndex:0}}}}(e,i,t,o),...function(e,t,n){let{borderElCls:r}=n,o=r?"> ".concat(r):"";return{["&-item:not(".concat(t,"-first-item):not(").concat(t,"-last-item) ").concat(o)]:{borderRadius:0},["&-item:not(".concat(t,"-last-item)").concat(t,"-first-item")]:{["& ".concat(o,", &").concat(e,"-sm ").concat(o,", &").concat(e,"-lg ").concat(o)]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&-item:not(".concat(t,"-first-item)").concat(t,"-last-item")]:{["& ".concat(o,", &").concat(e,"-sm ").concat(o,", &").concat(e,"-lg ").concat(o)]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}(o,i,t)}}}},38747:function(e,t,n){n.d(t,{o:function(){return r},v:function(){return o}});let r=()=>({"@media (prefers-reduced-motion: reduce)":{"&, &::before, &::after":{transition:"none",animation:"none"}}}),o=()=>({"@media (prefers-reduced-motion: reduce)":{transition:"none",animation:"none"}})},14482:function(e,t,n){n.d(t,{A1:function(){return s},I$:function(){return c},bk:function(){return u},o_:function(){return d}});var r=n(60635),o=n(46282),i=n(73703),a=n(28811),l=n(80971);let{genStyleHooks:c,genComponentStyleHook:s,genSubStyleComponent:u}=(0,o.rb)({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,r.useContext)(i.E_);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,n,r,o,i]=(0,l.ZP)();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{let{csp:e}=(0,r.useContext)(i.E_);return null!=e?e:{}},getResetStyles:(e,t)=>{var n;let r=(0,a.Lx)(e);return[r,{"&":r},(0,a.JT)(null!==(n=null==t?void 0:t.prefix.iconPrefixCls)&&void 0!==n?n:i.oR)]},getCommonStyle:a.du,getCompUnitless:()=>l.NJ}),d=(e,t)=>{let n="--".concat(e.replace(/\./g,""),"-").concat(t,"-");return[e=>"".concat(n).concat(e),(e,t)=>t?"var(".concat(n).concat(e,", ").concat(t,")"):"var(".concat(n).concat(e,")")]}},76394:function(e,t,n){n.d(t,{H:function(){return l}});var r=n(60635),o=n(13063);function i(){}let a=r.createContext({add:i,remove:i});function l(e){let t=r.useContext(a),n=r.useRef(null);return(0,o.zX)(r=>{if(r){let o=e?r.querySelector(e):r;o&&(t.add(o),n.current=o)}else t.remove(n.current)})}},84747:function(e,t,n){n.d(t,{Z:function(){return r}});function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}},36310:function(e,t,n){n.d(t,{Z:function(){return r}});function r(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},58579:function(e,t,n){n.d(t,{Z:function(){return r}});function r(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}},77134:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(64570);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,r.Z)(o.key),o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},38687:function(e,t,n){n.d(t,{Z:function(){return r}});function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}},41414:function(e,t,n){function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}n.d(t,{Z:function(){return o}})},81603:function(e,t,n){n.d(t,{Z:function(){return r}});function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r=function(){return!!e})()}},90054:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(53987),o=n(36310);function i(e,t){if(t&&("object"==(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}},78652:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(84747),o=n(82942);function i(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.Z)(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},64570:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(53987);function o(e){var t=function(e,t){if("object"!=(0,r.Z)(e)||!e)return e;if("undefined"!=typeof Symbol&&void 0!==(n=e[Symbol.toPrimitive])){var n,o=n.call(e,t||"default");if("object"!=(0,r.Z)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.Z)(t)?t:t+""}},53987:function(e,t,n){n.d(t,{Z:function(){return r}});function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}},82942:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(84747);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}}}]);
@@ -1 +1 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2e1802ae-7305-456c-8beb-e41a49eb5840",e._sentryDebugIdIdentifier="sentry-dbid-2e1802ae-7305-456c-8beb-e41a49eb5840")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[964],{41937:function(e,t,s){Promise.resolve().then(s.bind(s,30854))},27473:function(e,t,s){"use strict";var a=s(38321);s.o(a,"useParams")&&s.d(t,{useParams:function(){return a.useParams}}),s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}}),s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}}),s.o(a,"useServerInsertedHTML")&&s.d(t,{useServerInsertedHTML:function(){return a.useServerInsertedHTML}})},30854:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return P}});var a=s(72835),l=s(60635),r=s(27473),n=s(74431),c=s(8448),i=s(94518),o=s(63718);function d(e){var t;let{customer:s}=e,i=(0,r.useRouter)(),[o,d]=(0,l.useState)(null),[x,u]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[b,h]=(0,l.useState)(s.id),[g,y]=(0,l.useState)(!1),[f,j]=(0,l.useState)("");(0,l.useEffect)(()=>{let e=!0;return d(null),j(""),(async()=>{try{let t=await (0,n.aA)("/customers/".concat(s.id,"/duplicates"));e&&d(t.candidates)}catch(t){e&&d([])}})(),()=>{e=!1}},[s.id]);let v=async()=>{let e=(null!=o?o:[]).filter(e=>!m.has(e.id)).map(e=>e.id);if(b!==s.id&&e.push(s.id),0===e.length){j("未勾选任何候选参与合并");return}y(!0);let t=!0;for(let s of e)try{await (0,n.aA)("/customers/merge",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keepId:b,removeId:s})})}catch(e){t=!1;break}if(y(!1),!t){j("合并失败,请重试");return}i.replace("/companies?id=".concat(b)),i.refresh(),window.location.reload()};if(null===o||0===o.length)return null;let N=b===s.id?{canonicalName:s.canonicalName,aliases:s.aliases}:o.find(e=>e.id===b),k=o.filter(e=>!m.has(e.id)),w=N?((e,t)=>{var s,a;let l=new Set(null!==(s=e.aliases)&&void 0!==s?s:[]);for(let s of t)if(b!==s.id)for(let t of[s.canonicalName,...null!==(a=s.aliases)&&void 0!==a?a:[]])t&&t!==e.canonicalName&&l.add(t);return Array.from(l)})(N,k):[];return(0,a.jsxs)("div",{className:"mb-4 rounded-lg border border-amber-300 bg-amber-50 p-3",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{className:"text-sm font-medium text-amber-800",children:["发现 ",o.length," 条可能重复的公司记录"]}),(0,a.jsx)("button",{onClick:()=>u(!0),disabled:g,className:"rounded bg-amber-600 px-3 py-1 text-sm text-white hover:bg-amber-700 disabled:opacity-50",children:"查看并处理"}),f?(0,a.jsx)("span",{className:"text-sm text-red-600",children:f}):null]}),x?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30 p-2 sm:p-4",onClick:()=>u(!1),children:(0,a.jsxs)("div",{className:"flex max-h-[90vh] w-full max-w-3xl flex-col overflow-hidden rounded-lg bg-white shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 border-b border-gray-200 px-4 py-3",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"重复公司合并工作区"}),(0,a.jsxs)("span",{className:"text-sm text-gray-500",children:["当前 #",s.id," \xb7 ",s.canonicalName]}),(0,a.jsx)("button",{onClick:()=>u(!1),className:"ml-auto text-sm text-gray-500 hover:text-gray-700",children:"关闭"})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium text-gray-500",children:"候选(勾选=重复,参与合并;合并后其交付职位与备注重指保留行)"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"flex items-start gap-2 rounded-lg border p-2 ".concat(b===s.id?"border-blue-400 bg-blue-50":"border-gray-200"),children:[(0,a.jsx)("input",{type:"radio",name:"company-keep",checked:b===s.id,onChange:()=>h(s.id),title:"保留这一行"}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-900",children:s.canonicalName}),(0,a.jsx)("span",{className:"ml-2 rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-600",children:"当前行"}),(null===(t=s.aliases)||void 0===t?void 0:t.length)?(0,a.jsxs)("span",{className:"block truncate text-xs text-gray-500",children:["别名:",s.aliases.join("、")]}):null]})]}),o.map(e=>{var t;return(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border p-2 ".concat(b===e.id?"border-blue-400 bg-blue-50":"border-gray-200"),children:[(0,a.jsx)("input",{type:"checkbox",checked:!m.has(e.id),disabled:g,onChange:t=>{p(s=>{let a=new Set(s);return t.target.checked?a.delete(e.id):a.add(e.id),a})},title:"勾选=重复公司,参与合并"}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("span",{className:"text-sm font-medium text-gray-900",children:["#",e.id," ",e.canonicalName]}),(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-100 px-1.5 py-0.5 text-xs text-amber-700",children:e.reason}),1===e.isCustomer?(0,a.jsx)("span",{className:"ml-1 rounded bg-amber-100 px-1.5 py-0.5 text-xs text-amber-700",children:"客户"}):null,(0,a.jsxs)("span",{className:"block truncate text-xs text-gray-500",children:[e.jobCaseCount," 个职位案件 \xb7 更新于 ",(0,c.d3)(e.updatedAt),(null===(t=e.aliases)||void 0===t?void 0:t.length)?" \xb7 别名:".concat(e.aliases.join("、")):""]})]}),(0,a.jsx)("input",{type:"radio",name:"company-keep",checked:b===e.id,onChange:()=>h(e.id),title:"保留这一行"})]},e.id)})]}),w.length?(0,a.jsxs)("div",{className:"mt-3 rounded-lg border border-gray-200 bg-gray-50 p-3",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-gray-500",children:"合并后别名(预览)"}),(0,a.jsx)("div",{className:"mt-1 text-sm text-gray-800",children:w.join("、")})]}):null]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-gray-200 px-4 py-3",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>void v(),disabled:g,className:"rounded bg-blue-600 px-4 py-1.5 text-sm text-white hover:bg-blue-700 disabled:opacity-50",children:["确认合并(保留 #",b,")"]}),(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"保留行吸收其余行的别名/档案/联系人;被合并行走墓碑外传删除(云端同步删)"}),f?(0,a.jsx)("span",{className:"text-sm text-red-600",children:f}):null]})]})}):null]})}function x(e){var t;let s=(null===(t=e.aliases)||void 0===t?void 0:t.length)?"(别名:".concat(e.aliases.join("、"),")"):"";return"调研公司「".concat(e.canonicalName,"」").concat(s,"(hunter-mate 公司注册表 ID=").concat(e.id,")。")}function u(e,t){return["调研结果写回(每步一个键,键名用下方约定,值为中文正文、关键名词保留英文):","curl -X PATCH ".concat(e.origin,"/customers/").concat(e.id," \\")," -H 'Content-Type: application/json' \\",' -d \'{"profile":{"'.concat(t,'":{"<步骤键>":"<内容>"}}}\''),"只写你实际完成且确有依据的步骤,不确定的标注「待核实」;不要编造。写回后告知用户更新了哪些步骤。"].join("\n")}let m={bd:{title:"BD 档案(竞对分析)",button:"让 agent 调研(BD)",builder:function(e){return[x(e),"按「公司竞争对手分析与BD分步操作SOP V0.1」(bd-competitor-sop)执行调研,覆盖以下步骤:",...["第一步\xb7公司主体:集团/母公司/子公司/品牌/海外法人关系","第二步\xb7业务与竞争关系:主要产品与服务、目标客户、竞争格局","第三步\xb7近12个月海外发展与投资:新市场、建厂、并购、融资动态","第四步\xb7海外招聘信号:在招岗位、地区、规模与趋势","第五步\xb7岗位映射:海外动作对应的组织能力与关键岗位","第六步\xb7内部人才与案例资产:我司已有人才/案例与之的关联","第七步\xb7BD优先级与打法建议:是否值得跟、从哪切入"].map(e=>"- ".concat(e)),"",u(e,"bd")].join("\n")}},op:{title:"OP 档案(职位操作)",button:"让 agent 调研(OP)",builder:function(e){return[x(e),"按「寻访操作SOP V3.1」(rs-sourcing-sop)的公司调研口径执行,产出服务职位推荐与人才寻访:",...["核心业务:产品/服务是什么、卖给谁、应用场景","规模与业绩:营收/人员规模,当地业务规模","海外布局:开展业务的国家、海外团队规模与管理方式","当前招聘需求与背景:在招什么岗、为什么招","未来战略与规划:用于候选人沟通的 marketing 话术素材","对标公司名单:喜欢挖猎的对标公司,不少于 20 家,按梯队分组(给名单即可,梯队用一/二/三)","公司介绍 Hook:一段话介绍该公司(用于 Connect 模板,可编辑)","当地可挖猎公司名单:该岗位 base 地存在该岗位的公司名单,不低于 20 家"].map(e=>"- ".concat(e)),"",u(e,"op")].join("\n")}}};function p(e){return null==e||""===e?"":"string"==typeof e?e:JSON.stringify(e,null,2)}function b(e){let{customer:t,onSaved:s}=e,[r,c]=(0,l.useState)(!1),[i,o]=(0,l.useState)(!1),[d,x]=(0,l.useState)(""),[u,b]=(0,l.useState)(null),[h,g]=(0,l.useState)(""),[y,f]=(0,l.useState)(""),[j,v]=(0,l.useState)(""),[N,k]=(0,l.useState)({bd:[],op:[]}),w=async e=>{x("");let s={id:t.id,canonicalName:t.canonicalName,aliases:t.aliases,origin:window.location.origin};try{await navigator.clipboard.writeText(m[e].builder(s)),b(e),setTimeout(()=>b(null),4e3)}catch(e){var a;x("复制失败:".concat(null!==(a=null==e?void 0:e.message)&&void 0!==a?a:e))}},C=(e,t)=>k(s=>({...s,[e]:t})),S=async()=>{o(!0),x("");let e=e=>{let t={};for(let s of e){let e=s.key.trim();e&&(t[e]=function(e){let t=e.trim();if(!t)return"";try{return JSON.parse(t)}catch(t){return e}}(s.text))}return t};try{await (0,n.aA)("/customers/".concat(t.id),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:h.trim()||void 0,aliases:y.split(/[、,,]/).map(e=>e.trim()).filter(Boolean),notes:j,profile:{bd:e(N.bd),op:e(N.op)}})})}catch(e){o(!1),x("保存失败,请重试");return}o(!1),c(!1),s()};return(0,a.jsxs)("section",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-gray-800",children:"公司信息"}),r?null:(0,a.jsx)("button",{type:"button",onClick:()=>{var e,s,a,l;g(t.canonicalName),f((null!==(a=t.aliases)&&void 0!==a?a:[]).join("、")),v(null!==(l=t.notes)&&void 0!==l?l:"");let r=e=>Object.entries(null!=e?e:{}).map(e=>{let[t,s]=e;return{key:t,text:p(s)}});k({bd:r(null===(e=t.profile)||void 0===e?void 0:e.bd),op:r(null===(s=t.profile)||void 0===s?void 0:s.op)}),c(!0),x("")},className:"rounded border border-gray-300 px-2 py-0.5 text-xs text-gray-600 hover:bg-gray-50",children:"编辑"}),d?(0,a.jsx)("span",{className:"text-xs text-red-600",children:d}):null]}),r?(0,a.jsxs)("div",{className:"mb-3 space-y-2 rounded-lg border border-blue-200 bg-blue-50/50 p-3",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"公司名称(改名后旧名自动入别名)"}),(0,a.jsx)("input",{value:h,onChange:e=>g(e.target.value),className:"mt-0.5 w-full rounded border border-gray-300 px-2 py-1 text-sm"})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"别名(顿号/逗号分隔)"}),(0,a.jsx)("input",{value:y,onChange:e=>f(e.target.value),className:"mt-0.5 w-full rounded border border-gray-300 px-2 py-1 text-sm"})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"备注"}),(0,a.jsx)("textarea",{value:j,onChange:e=>v(e.target.value),rows:2,className:"mt-0.5 w-full rounded border border-gray-300 px-2 py-1 text-sm"})]})]}):null,(0,a.jsx)("div",{className:"space-y-3",children:["bd","op"].map(e=>{var s,l;let n=m[e],c=r?N[e]:Object.entries(null!==(l=null===(s=t.profile)||void 0===s?void 0:s[e])&&void 0!==l?l:{}).map(e=>{let[t,s]=e;return{key:t,text:p(s)}});return(0,a.jsxs)("section",{className:"rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-gray-100 px-3 py-2",children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-gray-900",children:n.title}),r?null:(0,a.jsx)("button",{type:"button",onClick:()=>void w(e),className:"rounded bg-blue-50 px-2 py-0.5 text-xs text-blue-700 hover:bg-blue-100",children:u===e?"已复制 ✓ 请发给 agent":n.button})]}),0===c.length?(0,a.jsx)("p",{className:"px-3 py-2 text-xs text-gray-400",children:r?"暂无条目,可在下方添加":"尚未调研,点上方「".concat(n.button,"」让 agent 调研")}):(0,a.jsxs)("div",{className:r?"space-y-2 p-3":"divide-y divide-gray-50",children:[c.map((t,s)=>r?(0,a.jsxs)("div",{className:"grid grid-cols-[1fr,2fr,auto] items-start gap-2",children:[(0,a.jsx)("input",{value:t.key,placeholder:"条目名(如:核心业务)",onChange:t=>{let a=[...c];a[s]={...a[s],key:t.target.value},C(e,a)},className:"rounded border border-gray-300 px-2 py-1 text-xs"}),(0,a.jsx)("textarea",{value:t.text,placeholder:"内容(纯文本,或合法 JSON)",rows:3,onChange:t=>{let a=[...c];a[s]={...a[s],text:t.target.value},C(e,a)},className:"w-full rounded border border-gray-300 px-2 py-1 text-xs"}),(0,a.jsx)("button",{type:"button",onClick:()=>C(e,c.filter((e,t)=>t!==s)),className:"rounded border border-red-200 px-2 py-0.5 text-xs text-red-600 hover:bg-red-50",children:"删"})]},s):(0,a.jsxs)("div",{className:"px-3 py-1.5",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-gray-500",children:t.key}),(0,a.jsx)("div",{className:"whitespace-pre-wrap text-sm text-gray-800",children:t.text||"—"})]},t.key)),r?(0,a.jsx)("button",{type:"button",onClick:()=>C(e,[...c,{key:"",text:""}]),className:"rounded border border-dashed border-gray-300 px-2 py-1 text-xs text-gray-500 hover:border-blue-400 hover:text-blue-600",children:"+ 添加条目"}):null]})]},e)})}),r?(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>void S(),disabled:i,className:"rounded bg-blue-600 px-3 py-1 text-sm text-white hover:bg-blue-700 disabled:opacity-50",children:i?"保存中…":"保存"}),(0,a.jsx)("button",{type:"button",onClick:()=>c(!1),disabled:i,className:"rounded border border-gray-300 px-3 py-1 text-sm text-gray-600 hover:bg-gray-50 disabled:opacity-50",children:"取消"})]}):null]})}var h=s(27828),g=s(26119),y=s(65777),f=s(93464);function j(e){let{sources:t}=e,s=[{on:t.customer,cls:"bg-amber-100 text-amber-700",label:"客户"},{on:t.parsed,cls:"bg-blue-100 text-blue-700",label:"解析"},{on:t.resume,cls:"bg-green-100 text-green-700",label:"简历"},{on:t.hmhLocal,cls:"bg-purple-100 text-purple-700",label:"本地"}];return(0,a.jsx)("span",{className:"inline-flex flex-wrap gap-1",children:s.filter(e=>e.on).map(e=>(0,a.jsx)("span",{className:"rounded px-1.5 py-0.5 text-xs ".concat(e.cls),children:e.label},e.label))})}let v=[{key:"customer",label:"客户",cls:"bg-amber-100 text-amber-700"},{key:"parsed",label:"解析",cls:"bg-blue-100 text-blue-700"},{key:"resume",label:"简历",cls:"bg-green-100 text-green-700"},{key:"hmhLocal",label:"本地",cls:"bg-purple-100 text-purple-700"}];function N(){var e,t,s,x,u,m;let p=(0,r.useRouter)(),N=(0,r.useSearchParams)(),k=N.get("id")||"",w=N.get("q")||"",C=(null!==(t=N.get("oc"))&&void 0!==t?t:"1")!=="0",[S,P]=(0,l.useState)(null),[T,A]=(0,l.useState)(!1),[L,O]=(0,l.useState)(!1),[I,D]=(0,l.useState)(0),[U,E]=(0,l.useState)(!1),[_,B]=(0,l.useState)(!1),[J,M]=(0,l.useState)(""),[H,R]=(0,l.useState)(!1),[q,V]=(0,l.useState)("profile"),z=N.get("src")||"",F=(0,l.useMemo)(()=>z.split(",").map(e=>e.trim()).filter(Boolean),[z]),[X,Y]=(0,l.useState)({customer:0,parsed:0,resume:0,hmhLocal:0}),[G,K]=(0,l.useState)(0),{session:Q,sync:W}=(0,y.nu)(),Z=null!==(s=null==W?void 0:W.activeTenantId)&&void 0!==s?s:null,$=(0,g.B)({deleteUrl:"/customers",label:"公司",onDeleted:()=>ee.refresh(),currentUserId:null!==(x=null==Q?void 0:Q.hmUserId)&&void 0!==x?x:null}),ee=(0,f.k)({fetchPage:(0,l.useCallback)(async(e,t)=>{var s,a;let l=new URLSearchParams;w&&l.set("query",w),C&&l.set("onlyCustomers","1"),F.length&&l.set("sources",F.join(",")),l.set("limit",String(t)),l.set("offset",String(e));let r=await (0,n.aA)("/customers/unified?".concat(l.toString()));return Y(null!==(s=r.sourceCounts)&&void 0!==s?s:{customer:0,parsed:0,resume:0,hmhLocal:0}),K(null!==(a=r.customerCount)&&void 0!==a?a:0),{items:r.items,total:r.total}},[w,C,F,Z]),pageSize:50,deps:[w,C,F,Z]}),et=ee.items,es=ee.total,ea=ee.loading;(0,l.useEffect)(()=>{$.prune(et.map(e=>String(e.id)))},[et,$]);let el=(0,l.useCallback)(e=>{var t,s,a;let l=new URLSearchParams(N.toString());void 0!==e.id&&(e.id?l.set("id",e.id):l.delete("id"));let r=null!==(t=e.q)&&void 0!==t?t:w;r?l.set("q",r):l.delete("q"),(null!==(s=e.oc)&&void 0!==s?s:C)?l.delete("oc"):l.set("oc","0");let n=null!==(a=e.src)&&void 0!==a?a:F;n.length?l.set("src",n.join(",")):l.delete("src"),p.replace("/companies?".concat(l.toString()))},[p,N,w,C,F]);(0,l.useEffect)(()=>{V("profile")},[k]);let er=(0,l.useCallback)(async()=>{if(k)try{let e=await (0,n.aA)("/customers/".concat(k,"/related"));P(e),O(!1)}catch(e){P(null),O(!0)}},[k]);(0,l.useEffect)(()=>{if(!k){P(null),O(!1);return}A(!0),er().then(()=>A(!1))},[k,er,I]);let en=(0,l.useCallback)(async()=>{let e=null==S?void 0:S.companyProfile;if(null==e?void 0:e.sourceUrl){M("重新适配中…(浏览器编排重跑,稍候)");try{await (0,n.aA)("/extract/adapter",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.sourceUrl})}),M("已重新适配并入库 ✓"),await er()}catch(e){M("重新适配失败(需扩展在线且页面可访问),请重试")}setTimeout(()=>M(""),6e3)}},[null==S?void 0:S.companyProfile,er]),ec=(0,l.useCallback)(async()=>{let e=null==S?void 0:S.companyProfile;if(e){M("");try{let t=await fetch("".concat((0,n.Ox)(),"/entities/company/").concat(e.id,"/repair-prompt"));if(!t.ok)throw Error("HTTP ".concat(t.status));let s=await t.json();await navigator.clipboard.writeText(s.prompt),R(!0),setTimeout(()=>R(!1),4e3)}catch(e){var t;M("复制失败:".concat(null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e))}}},[null==S?void 0:S.companyProfile]),ei=(0,l.useCallback)(async(e,t)=>{E(!0),B(!1);try{await (0,n.aA)("/customers/".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({isCustomer:t?1:0})})}catch(e){E(!1),B(!0);return}ee.refresh(),await er(),E(!1)},[ee,er]),eo=(0,l.useMemo)(()=>et.map(e=>({id:String(e.id),content:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[$.checkbox(String(e.id)),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-medium text-gray-900",children:e.canonicalName}),e.activeJobCount>0?(0,a.jsxs)("span",{className:"rounded bg-emerald-100 px-1.5 py-0.5 text-xs text-emerald-700",children:["交付中 ",e.activeJobCount]}):null]}),(0,a.jsx)("div",{className:"mt-0.5",children:(0,a.jsx)(j,{sources:e.sources})}),(0,a.jsxs)("div",{className:"mt-0.5 text-xs text-gray-400",children:[e.jobCaseCount>0?"".concat(e.jobCaseCount," 个职位案件 \xb7 "):"","更新于 ",(0,c.d3)(e.updatedAt)]})]})]})})),[et,$]),ed=k?T?(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"加载中…"}):L?(0,a.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,a.jsx)("button",{type:"button",onClick:()=>D(e=>e+1),className:"text-blue-500 hover:underline",children:"重试"})]}):S?(0,a.jsxs)("div",{className:"h-full overflow-y-auto p-4",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:S.customer.canonicalName}),(0,a.jsx)(j,{sources:null!==(u=S.customer.sources)&&void 0!==u?u:{customer:1===S.customer.isCustomer,parsed:!1,resume:!1,hmhLocal:!1}}),(0,a.jsx)("button",{type:"button",disabled:U,onClick:()=>void ei(S.customer.id,1!==S.customer.isCustomer),className:"rounded px-2 py-1 text-xs ".concat(1===S.customer.isCustomer?"bg-amber-100 text-amber-700 hover:bg-amber-200":"bg-gray-100 text-gray-600 hover:bg-gray-200"," disabled:opacity-50"),children:1===S.customer.isCustomer?"✓ 我服务的客户(点击取消)":"标注为我服务的客户"})]}),_?(0,a.jsx)("div",{className:"mb-2 text-xs text-red-500",children:"标注失败,请重试"}):null,(null===(e=S.customer.aliases)||void 0===e?void 0:e.length)?(0,a.jsxs)("div",{className:"mb-2 text-xs text-gray-500",children:["别名:",S.customer.aliases.join("、")]}):null,(0,a.jsxs)("div",{className:"mb-4 text-xs text-gray-400",children:["更新于 ",(0,c.d3)(S.customer.updatedAt)]}),S.customer.notes?(0,a.jsxs)("section",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-medium text-gray-800",children:"备注"}),(0,a.jsx)("p",{className:"whitespace-pre-wrap text-sm text-gray-700",children:S.customer.notes})]}):null,(0,a.jsx)(d,{customer:{id:S.customer.id,canonicalName:S.customer.canonicalName,aliases:S.customer.aliases}}),S.companyProfile?(0,a.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-3 py-2",children:[(0,a.jsxs)("span",{className:"text-xs text-gray-500",children:["解析档案:(",S.companyProfile.source,") ",null!==(m=S.companyProfile.name)&&void 0!==m?m:""," \xb7 更新于"," ",(0,c.d3)(S.companyProfile.updatedAt)]}),(0,a.jsx)("button",{type:"button",onClick:()=>void en(),className:"rounded border border-gray-300 bg-white px-2 py-0.5 text-xs text-gray-700 hover:bg-gray-100",children:"重新适配"}),(0,a.jsx)("button",{type:"button",onClick:()=>void ec(),className:"rounded border border-gray-300 bg-white px-2 py-0.5 text-xs text-gray-700 hover:bg-gray-100",children:H?"已复制 ✓ 请发给 agent":"解析有误让agent修复"}),J?(0,a.jsx)("span",{className:"text-xs text-gray-600",children:J}):null]}):null,(0,a.jsx)("div",{className:"mb-2 flex flex-wrap gap-1 border-b border-gray-200",children:[{key:"profile",label:"公司信息"},{key:"jobCases",label:"关联交付职位(".concat(S.jobCases.length,")")},{key:"jobPostings",label:"招聘网站解析职位(".concat(S.jobPostings.length,")")},{key:"talents",label:"相关简历(".concat(S.talents.length,")")},{key:"parseLogs",label:"录制解析(".concat(S.parseLogs.length,")")}].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>V(e.key),className:"rounded-t px-3 py-1.5 text-sm ".concat(q===e.key?"border-b-2 border-blue-500 font-medium text-blue-600":"text-gray-500 hover:text-gray-700"),children:e.label},e.key))}),"profile"===q?(0,a.jsx)(b,{customer:S.customer,onSaved:()=>void er()}):null,"jobCases"===q?(0,a.jsx)("section",{className:"mb-4",children:0===S.jobCases.length?(0,a.jsx)("div",{className:"text-sm text-gray-400",children:"暂无交付职位"}):(0,a.jsx)("ul",{className:"space-y-1",children:S.jobCases.map(e=>{var t;return(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"/jobs?id=".concat(e.id),className:"flex items-start gap-2 rounded border border-gray-200 bg-white px-3 py-2 text-sm hover:border-blue-300",children:(0,a.jsx)(h.dy,{title:function(e){var t,s;let a;let l=(null!==(t=e.folderPath)&&void 0!==t?t:"").split("/").filter(Boolean).filter(e=>!["job","jd","raw"].includes(e));return(a=e.title)&&!["job","jd","raw"].includes(a)?e.title:null!==(s=l.at(-1))&&void 0!==s?s:"案件 #".concat(e.id)}(e),status:e.status,hmhLocal:(null!==(t=e.folderPath)&&void 0!==t?t:"").includes("/local/clients/"),time:e.updatedAt})})},e.id)})})}):null,"jobPostings"===q?(0,a.jsx)("section",{className:"mb-4",children:0===S.jobPostings.length?(0,a.jsx)("div",{className:"text-sm text-gray-400",children:"暂无解析职位"}):(0,a.jsx)("ul",{className:"space-y-1",children:S.jobPostings.map(e=>{var t;return(0,a.jsx)("li",{className:"flex items-start gap-2 rounded border border-gray-200 bg-white px-3 py-2 text-sm",children:(0,a.jsx)(h.rY,{title:null!==(t=e.title)&&void 0!==t?t:"(无标题)",source:e.source,company:e.company,sourceUrl:e.sourceUrl,updatedAt:e.updatedAt})},e.id)})})}):null,"talents"===q?(0,a.jsx)("section",{className:"mb-4",children:0===S.talents.length?(0,a.jsx)("div",{className:"text-sm text-gray-400",children:"暂无相关简历"}):(0,a.jsx)("ul",{className:"space-y-1",children:S.talents.map(e=>{var t;return(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"/talents?id=".concat(e.id),className:"flex items-start gap-2 rounded border border-gray-200 bg-white px-3 py-2 text-sm hover:border-blue-300",children:(0,a.jsx)(h.oj,{name:null!==(t=e.name)&&void 0!==t?t:"(简历 #".concat(e.id,")"),headline:e.headline,updatedAt:e.updatedAt})})},e.id)})})}):null,"parseLogs"===q?(0,a.jsx)("section",{className:"mb-4",children:0===S.parseLogs.length?(0,a.jsx)("div",{className:"text-sm text-gray-400",children:"暂无解析记录(该公司尚未从网页解析入库)"}):(0,a.jsx)("ul",{className:"space-y-1",children:S.parseLogs.map(e=>(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded border border-gray-200 bg-white px-3 py-2 text-sm",children:[(0,a.jsx)("span",{className:"rounded px-1.5 py-0.5 text-xs ".concat("ok"===e.status?"bg-emerald-100 text-emerald-700":"bg-gray-100 text-gray-500"),children:e.status}),e.hasSnapshot?(0,a.jsx)("span",{className:"rounded bg-green-50 px-1.5 py-0.5 text-xs text-green-700",children:"有快照"}):null,e.adapterVersion?(0,a.jsxs)("span",{className:"text-xs text-gray-400",children:["adapter ",e.adapterVersion]}):null,(0,a.jsxs)("span",{className:"truncate text-xs text-gray-500",title:e.sourceUrl,children:[e.domain," \xb7 session ",e.sessionId]}),(0,a.jsx)("a",{href:e.sourceUrl,target:"_blank",rel:"noreferrer",className:"ml-auto shrink-0 text-xs text-blue-500 hover:underline",children:"来源"}),(0,a.jsx)("span",{className:"shrink-0 text-xs text-gray-400",children:(0,c.d3)(e.createdAt)})]},e.id))})}):null]}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-red-500",children:"未找到该公司"}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"请在左侧选择一家公司查看详情(客户、职位与备注)"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.m,{filterBar:(0,a.jsxs)("div",{className:"space-y-2 border-b border-gray-200 bg-white p-3",children:[(0,a.jsx)("input",{type:"text",value:w,onChange:e=>el({q:e.target.value}),placeholder:"搜索公司名/别名…",className:"w-full rounded border border-gray-300 px-2 py-1.5 text-sm outline-none focus:border-blue-500"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-gray-600 hover:text-gray-800",children:[(0,a.jsx)("input",{type:"checkbox",checked:C,onChange:e=>el({oc:e.target.checked}),className:"accent-amber-600"}),"只看我服务的客户",(0,a.jsx)("span",{className:"rounded bg-amber-100 px-1.5 py-0.5 text-amber-700",children:G})]}),(0,a.jsx)("span",{className:"text-gray-300",children:"|"}),(0,a.jsx)("span",{className:"text-gray-400",children:"来源:"}),v.map(e=>{let t=F.includes(e.key);return(0,a.jsxs)("button",{type:"button",title:t?"点击取消该来源筛选":"点击按该来源过滤(可多选,同时命中)",onClick:()=>el({src:t?F.filter(t=>t!==e.key):[...F,e.key]}),className:"rounded px-1.5 py-0.5 text-xs transition ".concat(t?"".concat(e.cls," ring-1 ring-current"):"".concat(e.cls," opacity-40 hover:opacity-80")),children:[e.label," ",X[e.key]]},e.key)}),F.length?(0,a.jsx)("button",{type:"button",onClick:()=>el({src:[]}),className:"text-xs text-gray-400 hover:text-gray-600",children:"清除来源筛选"}):null,(0,a.jsxs)("span",{className:"ml-auto text-gray-400",children:["共 ",es," 家"]})]}),$.bar(eo)]}),listPanel:ee.error?(0,a.jsxs)("div",{className:"flex-1 overflow-auto p-4 text-center text-sm",children:[(0,a.jsx)("span",{className:"text-red-500",children:"加载失败"}),(0,a.jsx)("button",{type:"button",onClick:()=>ee.refresh(),className:"ml-2 text-blue-500 hover:underline",children:"重试"})]}):(0,a.jsx)(o.L,{items:eo,selectedId:k,onSelect:e=>el({id:e}),loading:ea,emptyText:C?"暂无符合筛选条件的客户(取消勾选或清除来源筛选可浏览全部)":"暂无公司数据",onLoadMore:ee.loadMore,loadingMore:ee.loadingMore,exhausted:ee.exhausted}),detailPanel:ed}),$.modal()]})}function k(){return(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)("div",{className:"p-6 text-gray-500",children:"加载中…"}),children:(0,a.jsx)(N,{})})}var w=s(49616);function C(){var e,t;let[s,r]=(0,l.useState)(""),[c,d]=(0,l.useState)(""),[x,u]=(0,l.useState)(""),[m,p]=(0,l.useState)([]),[b,h]=(0,l.useState)(0),[g,f]=(0,l.useState)(!1),[j,v]=(0,l.useState)(null),[N,k]=(0,l.useState)(null),[C,S]=(0,l.useState)(null),{sync:P}=(0,y.nu)(),T=null!==(e=null==P?void 0:P.activeTenantId)&&void 0!==e?e:null,A=(0,l.useCallback)(async()=>{f(!0);let e=new URLSearchParams;c&&e.set("q",c),x&&e.set("touched",x),e.set("limit","200");try{let t=await (0,n.aA)("/market/companies?".concat(e.toString()));v(null),p(t.items),h(t.total)}catch(e){v("加载失败")}finally{f(!1)}},[c,x,T]);(0,l.useEffect)(()=>{let e=setTimeout(()=>d(s.trim()),300);return()=>clearTimeout(e)},[s]),(0,l.useEffect)(()=>{A()},[A]),(0,l.useEffect)(()=>{S(null),null!=N&&(0,n.aA)("/market/companies/".concat(N)).then(S).catch(()=>{})},[N,T]);let L=(0,l.useMemo)(()=>m.map(e=>({id:String(e.id),content:(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"truncate font-medium text-gray-900",children:e.name}),e.touched?(0,a.jsx)("span",{className:"rounded bg-emerald-100 px-1.5 py-0.5 text-[10px] text-emerald-700",children:"已操作"}):null]}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-0.5",children:[e.platforms.length?e.platforms.map(e=>(0,a.jsx)(w.v,{platform:e},e)):(0,a.jsx)("span",{className:"text-[10px] text-gray-300",children:"无职位发布数据"}),(0,a.jsxs)("span",{className:"ml-1 text-[10px] text-gray-400",children:["在招 ",e.postingsCount," \xb7 ",e.source]})]})]})})),[m]);return(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-amber-200 bg-[color:var(--brand-soft)] px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-[color:var(--brand-strong)]",children:"\uD83E\uDDED 市场公司(BD 视角:目标/对手公司在各平台的发布与操作痕迹)"}),(0,a.jsx)("span",{className:"ml-auto text-[10px] text-gray-400",children:"下方统一列表 = 客户/解析来源维度"})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1",children:(0,a.jsx)(i.m,{filterBar:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-gray-200 bg-white p-3",children:[(0,a.jsx)("input",{type:"text",value:s,onChange:e=>r(e.target.value),placeholder:"搜索公司名…",className:"w-56 rounded border border-gray-300 px-2 py-1.5 text-sm outline-none focus:border-blue-500"}),["","1","0"].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>u(e),className:"rounded px-2 py-1 text-xs ".concat(x===e?"bg-[color:var(--brand-soft)] font-medium text-[color:var(--brand-strong)]":"text-gray-500 hover:bg-gray-100"),children:""===e?"全部":"1"===e?"已操作过":"未操作"},e)),(0,a.jsxs)("span",{className:"ml-auto text-xs text-gray-400",children:["共 ",b," 家"]})]}),listPanel:j?(0,a.jsxs)("div",{className:"flex-1 overflow-auto p-4 text-center text-sm",children:[(0,a.jsx)("span",{className:"text-red-500",children:j}),(0,a.jsx)("button",{type:"button",onClick:()=>void A(),className:"ml-2 text-blue-500 hover:underline",children:"重试"})]}):(0,a.jsx)(o.L,{items:L,selectedId:null!=N?String(N):void 0,onSelect:e=>k(Number(e)),loading:g,emptyText:"暂无市场公司数据"}),detailPanel:N?C?(0,a.jsxs)("div",{className:"h-full overflow-y-auto p-4",children:[(0,a.jsx)("h2",{className:"mb-1 text-lg font-semibold text-gray-900",children:null!==(t=C.profile.name)&&void 0!==t?t:"(未命名)"}),(0,a.jsx)("a",{href:C.profile.sourceUrl,target:"_blank",rel:"noreferrer",className:"mb-4 block truncate text-xs text-blue-600 hover:underline",children:C.profile.sourceUrl}),(0,a.jsxs)("section",{className:"mb-4",children:[(0,a.jsxs)("h3",{className:"mb-2 text-sm font-medium text-gray-800",children:["在招职位(",C.postings.length,")"]}),0===C.postings.length?(0,a.jsx)("div",{className:"text-xs text-gray-400",children:"名下暂无职位发布(解析库 company 字段归一后自动出现)"}):(0,a.jsx)("div",{className:"space-y-1",children:C.postings.map(e=>{var t;return(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded border border-gray-100 px-2 py-1.5 text-sm",children:[(0,a.jsx)(w.v,{platform:e.source}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:null!==(t=e.title)&&void 0!==t?t:"(无标题)"}),(0,a.jsx)("a",{href:e.sourceUrl,target:"_blank",rel:"noreferrer",className:"text-xs text-blue-600 hover:underline",children:"打开"})]},e.id)})})]}),(0,a.jsxs)("section",{children:[(0,a.jsxs)("h3",{className:"mb-2 text-sm font-medium text-gray-800",children:["对手公司(同类型在招,",C.peers.length,")"]}),0===C.peers.length?(0,a.jsx)("div",{className:"text-xs text-gray-400",children:"暂无(需要职位标题数据支撑;解析质量修复后自动点亮)"}):(0,a.jsx)("div",{className:"space-y-1",children:C.peers.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.id),className:"flex w-full items-center gap-2 rounded border border-gray-100 px-2 py-1.5 text-left text-sm hover:bg-amber-50",children:[(0,a.jsx)("span",{className:"flex-1 truncate",children:e.name}),(0,a.jsxs)("span",{className:"text-xs text-gray-400",children:["在招 ",e.postingsCount]})]},e.id))})]})]}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"加载中…"}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"选择左侧公司查看发布与对手"})})})]})}var S=s(88801);function P(){return"bd"===(0,S.mJ)()?(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)("div",{className:"min-h-0 flex-[2] border-b border-gray-200",children:(0,a.jsx)(C,{})}),(0,a.jsx)("div",{className:"min-h-0 flex-[3] overflow-auto",children:(0,a.jsx)(k,{})})]}):(0,a.jsx)(k,{})}}},function(e){e.O(0,[253,686,400,935,744],function(){return e(e.s=41937)}),_N_E=e.O()}]);
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b6004d53-9e85-40b9-841a-1015b228aa4c",e._sentryDebugIdIdentifier="sentry-dbid-b6004d53-9e85-40b9-841a-1015b228aa4c")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[964],{41937:function(e,t,s){Promise.resolve().then(s.bind(s,30854))},27473:function(e,t,s){"use strict";var a=s(38321);s.o(a,"useParams")&&s.d(t,{useParams:function(){return a.useParams}}),s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}}),s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}}),s.o(a,"useServerInsertedHTML")&&s.d(t,{useServerInsertedHTML:function(){return a.useServerInsertedHTML}})},30854:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return P}});var a=s(72835),r=s(60635),l=s(27473),n=s(74431),o=s(8448),c=s(94518),i=s(63718);function d(e){var t;let{customer:s}=e,c=(0,l.useRouter)(),[i,d]=(0,r.useState)(null),[u,x]=(0,r.useState)(!1),[m,p]=(0,r.useState)(new Set),[h,b]=(0,r.useState)(s.id),[g,f]=(0,r.useState)(!1),[y,v]=(0,r.useState)("");(0,r.useEffect)(()=>{let e=!0;return d(null),v(""),(async()=>{try{let t=await (0,n.aA)("/customers/".concat(s.id,"/duplicates"));e&&d(t.candidates)}catch(t){e&&d([])}})(),()=>{e=!1}},[s.id]);let j=async()=>{let e=(null!=i?i:[]).filter(e=>!m.has(e.id)).map(e=>e.id);if(h!==s.id&&e.push(s.id),0===e.length){v("未勾选任何候选参与合并");return}f(!0);let t=!0;for(let s of e)try{await (0,n.aA)("/customers/merge",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keepId:h,removeId:s})})}catch(e){t=!1;break}if(f(!1),!t){v("合并失败,请重试");return}c.replace("/companies?id=".concat(h)),c.refresh(),window.location.reload()};if(null===i||0===i.length)return null;let N=h===s.id?{canonicalName:s.canonicalName,aliases:s.aliases}:i.find(e=>e.id===h),w=i.filter(e=>!m.has(e.id)),k=N?((e,t)=>{var s,a;let r=new Set(null!==(s=e.aliases)&&void 0!==s?s:[]);for(let s of t)if(h!==s.id)for(let t of[s.canonicalName,...null!==(a=s.aliases)&&void 0!==a?a:[]])t&&t!==e.canonicalName&&r.add(t);return Array.from(r)})(N,w):[];return(0,a.jsxs)("div",{className:"mb-4 rounded-lg border border-amber-300 bg-amber-50 p-3",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{className:"text-sm font-medium text-amber-800",children:["发现 ",i.length," 条可能重复的公司记录"]}),(0,a.jsx)("button",{onClick:()=>x(!0),disabled:g,className:"rounded bg-amber-600 px-3 py-1 text-sm text-white hover:bg-amber-700 disabled:opacity-50",children:"查看并处理"}),y?(0,a.jsx)("span",{className:"text-sm text-red-600",children:y}):null]}),u?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30 p-2 sm:p-4",onClick:()=>x(!1),children:(0,a.jsxs)("div",{className:"flex max-h-[90vh] w-full max-w-3xl flex-col overflow-hidden rounded-lg bg-white shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 border-b border-gray-200 px-4 py-3",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"重复公司合并工作区"}),(0,a.jsxs)("span",{className:"text-sm text-gray-500",children:["当前 #",s.id," \xb7 ",s.canonicalName]}),(0,a.jsx)("button",{onClick:()=>x(!1),className:"ml-auto text-sm text-gray-500 hover:text-gray-700",children:"关闭"})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium text-gray-500",children:"候选(勾选=重复,参与合并;合并后其交付职位与备注重指保留行)"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"flex items-start gap-2 rounded-lg border p-2 ".concat(h===s.id?"border-blue-400 bg-blue-50":"border-gray-200"),children:[(0,a.jsx)("input",{type:"radio",name:"company-keep",checked:h===s.id,onChange:()=>b(s.id),title:"保留这一行"}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-900",children:s.canonicalName}),(0,a.jsx)("span",{className:"ml-2 rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-600",children:"当前行"}),(null===(t=s.aliases)||void 0===t?void 0:t.length)?(0,a.jsxs)("span",{className:"block truncate text-xs text-gray-500",children:["别名:",s.aliases.join("、")]}):null]})]}),i.map(e=>{var t;return(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border p-2 ".concat(h===e.id?"border-blue-400 bg-blue-50":"border-gray-200"),children:[(0,a.jsx)("input",{type:"checkbox",checked:!m.has(e.id),disabled:g,onChange:t=>{p(s=>{let a=new Set(s);return t.target.checked?a.delete(e.id):a.add(e.id),a})},title:"勾选=重复公司,参与合并"}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("span",{className:"text-sm font-medium text-gray-900",children:["#",e.id," ",e.canonicalName]}),(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-100 px-1.5 py-0.5 text-xs text-amber-700",children:e.reason}),1===e.isCustomer?(0,a.jsx)("span",{className:"ml-1 rounded bg-amber-100 px-1.5 py-0.5 text-xs text-amber-700",children:"客户"}):null,(0,a.jsxs)("span",{className:"block truncate text-xs text-gray-500",children:[e.jobCaseCount," 个职位案件 \xb7 更新于 ",(0,o.d3)(e.updatedAt),(null===(t=e.aliases)||void 0===t?void 0:t.length)?" \xb7 别名:".concat(e.aliases.join("、")):""]})]}),(0,a.jsx)("input",{type:"radio",name:"company-keep",checked:h===e.id,onChange:()=>b(e.id),title:"保留这一行"})]},e.id)})]}),k.length?(0,a.jsxs)("div",{className:"mt-3 rounded-lg border border-gray-200 bg-gray-50 p-3",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-gray-500",children:"合并后别名(预览)"}),(0,a.jsx)("div",{className:"mt-1 text-sm text-gray-800",children:k.join("、")})]}):null]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-gray-200 px-4 py-3",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>void j(),disabled:g,className:"rounded bg-blue-600 px-4 py-1.5 text-sm text-white hover:bg-blue-700 disabled:opacity-50",children:["确认合并(保留 #",h,")"]}),(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"保留行吸收其余行的别名/档案/联系人;被合并行走墓碑外传删除(云端同步删)"}),y?(0,a.jsx)("span",{className:"text-sm text-red-600",children:y}):null]})]})}):null]})}function u(e){var t;let s=(null===(t=e.aliases)||void 0===t?void 0:t.length)?"(别名:".concat(e.aliases.join("、"),")"):"";return"调研公司「".concat(e.canonicalName,"」").concat(s,"(hunter-mate 公司注册表 ID=").concat(e.id,")。")}function x(e,t){return["调研结果写回(每步一个键,键名用下方约定,值为中文正文、关键名词保留英文):","curl -X PATCH ".concat(e.origin,"/customers/").concat(e.id," \\")," -H 'Content-Type: application/json' \\",' -d \'{"profile":{"'.concat(t,'":{"<步骤键>":"<内容>"}}}\''),"只写你实际完成且确有依据的步骤,不确定的标注「待核实」;不要编造。写回后告知用户更新了哪些步骤。"].join("\n")}let m={bd:{title:"BD 档案(竞对分析)",button:"让 agent 调研(BD)",builder:function(e){return[u(e),"按「公司竞争对手分析与BD分步操作SOP V0.1」(bd-competitor-sop)执行调研,覆盖以下步骤:",...["第一步\xb7公司主体:集团/母公司/子公司/品牌/海外法人关系","第二步\xb7业务与竞争关系:主要产品与服务、目标客户、竞争格局","第三步\xb7近12个月海外发展与投资:新市场、建厂、并购、融资动态","第四步\xb7海外招聘信号:在招岗位、地区、规模与趋势","第五步\xb7岗位映射:海外动作对应的组织能力与关键岗位","第六步\xb7内部人才与案例资产:我司已有人才/案例与之的关联","第七步\xb7BD优先级与打法建议:是否值得跟、从哪切入"].map(e=>"- ".concat(e)),"",x(e,"bd")].join("\n")}},op:{title:"OP 档案(职位操作)",button:"让 agent 调研(OP)",builder:function(e){return[u(e),"按「寻访操作SOP V3.1」(rs-sourcing-sop)的公司调研口径执行,产出服务职位推荐与人才寻访:",...["核心业务:产品/服务是什么、卖给谁、应用场景","规模与业绩:营收/人员规模,当地业务规模","海外布局:开展业务的国家、海外团队规模与管理方式","当前招聘需求与背景:在招什么岗、为什么招","未来战略与规划:用于候选人沟通的 marketing 话术素材","对标公司名单:喜欢挖猎的对标公司,不少于 20 家,按梯队分组(给名单即可,梯队用一/二/三)","公司介绍 Hook:一段话介绍该公司(用于 Connect 模板,可编辑)","当地可挖猎公司名单:该岗位 base 地存在该岗位的公司名单,不低于 20 家"].map(e=>"- ".concat(e)),"",x(e,"op")].join("\n")}}};function p(e){return null==e||""===e?"":"string"==typeof e?e:JSON.stringify(e,null,2)}function h(e){let{customer:t,onSaved:s}=e,[l,o]=(0,r.useState)(!1),[c,i]=(0,r.useState)(!1),[d,u]=(0,r.useState)(""),[x,h]=(0,r.useState)(null),[b,g]=(0,r.useState)(""),[f,y]=(0,r.useState)(""),[v,j]=(0,r.useState)(""),[N,w]=(0,r.useState)({bd:[],op:[]}),k=async e=>{u("");let s={id:t.id,canonicalName:t.canonicalName,aliases:t.aliases,origin:window.location.origin};try{await navigator.clipboard.writeText(m[e].builder(s)),h(e),setTimeout(()=>h(null),4e3)}catch(e){var a;u("复制失败:".concat(null!==(a=null==e?void 0:e.message)&&void 0!==a?a:e))}},S=(e,t)=>w(s=>({...s,[e]:t})),C=async()=>{i(!0),u("");let e=e=>{let t={};for(let s of e){let e=s.key.trim();e&&(t[e]=function(e){let t=e.trim();if(!t)return"";try{return JSON.parse(t)}catch(t){return e}}(s.text))}return t};try{await (0,n.aA)("/customers/".concat(t.id),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:b.trim()||void 0,aliases:f.split(/[、,,]/).map(e=>e.trim()).filter(Boolean),notes:v,profile:{bd:e(N.bd),op:e(N.op)}})})}catch(e){i(!1),u("保存失败,请重试");return}i(!1),o(!1),s()};return(0,a.jsxs)("section",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-gray-800",children:"公司信息"}),l?null:(0,a.jsx)("button",{type:"button",onClick:()=>{var e,s,a,r;g(t.canonicalName),y((null!==(a=t.aliases)&&void 0!==a?a:[]).join("、")),j(null!==(r=t.notes)&&void 0!==r?r:"");let l=e=>Object.entries(null!=e?e:{}).map(e=>{let[t,s]=e;return{key:t,text:p(s)}});w({bd:l(null===(e=t.profile)||void 0===e?void 0:e.bd),op:l(null===(s=t.profile)||void 0===s?void 0:s.op)}),o(!0),u("")},className:"rounded border border-gray-300 px-2 py-0.5 text-xs text-gray-600 hover:bg-gray-50",children:"编辑"}),d?(0,a.jsx)("span",{className:"text-xs text-red-600",children:d}):null]}),l?(0,a.jsxs)("div",{className:"mb-3 space-y-2 rounded-lg border border-blue-200 bg-blue-50/50 p-3",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"公司名称(改名后旧名自动入别名)"}),(0,a.jsx)("input",{value:b,onChange:e=>g(e.target.value),className:"mt-0.5 w-full rounded border border-gray-300 px-2 py-1 text-sm"})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"别名(顿号/逗号分隔)"}),(0,a.jsx)("input",{value:f,onChange:e=>y(e.target.value),className:"mt-0.5 w-full rounded border border-gray-300 px-2 py-1 text-sm"})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"备注"}),(0,a.jsx)("textarea",{value:v,onChange:e=>j(e.target.value),rows:2,className:"mt-0.5 w-full rounded border border-gray-300 px-2 py-1 text-sm"})]})]}):null,(0,a.jsx)("div",{className:"space-y-3",children:["bd","op"].map(e=>{var s,r;let n=m[e],o=l?N[e]:Object.entries(null!==(r=null===(s=t.profile)||void 0===s?void 0:s[e])&&void 0!==r?r:{}).map(e=>{let[t,s]=e;return{key:t,text:p(s)}});return(0,a.jsxs)("section",{className:"rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-gray-100 px-3 py-2",children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-gray-900",children:n.title}),l?null:(0,a.jsx)("button",{type:"button",onClick:()=>void k(e),className:"rounded bg-blue-50 px-2 py-0.5 text-xs text-blue-700 hover:bg-blue-100",children:x===e?"已复制 ✓ 请发给 agent":n.button})]}),0===o.length?(0,a.jsx)("p",{className:"px-3 py-2 text-xs text-gray-400",children:l?"暂无条目,可在下方添加":"尚未调研,点上方「".concat(n.button,"」让 agent 调研")}):(0,a.jsxs)("div",{className:l?"space-y-2 p-3":"divide-y divide-gray-50",children:[o.map((t,s)=>l?(0,a.jsxs)("div",{className:"grid grid-cols-[1fr,2fr,auto] items-start gap-2",children:[(0,a.jsx)("input",{value:t.key,placeholder:"条目名(如:核心业务)",onChange:t=>{let a=[...o];a[s]={...a[s],key:t.target.value},S(e,a)},className:"rounded border border-gray-300 px-2 py-1 text-xs"}),(0,a.jsx)("textarea",{value:t.text,placeholder:"内容(纯文本,或合法 JSON)",rows:3,onChange:t=>{let a=[...o];a[s]={...a[s],text:t.target.value},S(e,a)},className:"w-full rounded border border-gray-300 px-2 py-1 text-xs"}),(0,a.jsx)("button",{type:"button",onClick:()=>S(e,o.filter((e,t)=>t!==s)),className:"rounded border border-red-200 px-2 py-0.5 text-xs text-red-600 hover:bg-red-50",children:"删"})]},s):(0,a.jsxs)("div",{className:"px-3 py-1.5",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-gray-500",children:t.key}),(0,a.jsx)("div",{className:"whitespace-pre-wrap text-sm text-gray-800",children:t.text||"—"})]},t.key)),l?(0,a.jsx)("button",{type:"button",onClick:()=>S(e,[...o,{key:"",text:""}]),className:"rounded border border-dashed border-gray-300 px-2 py-1 text-xs text-gray-500 hover:border-blue-400 hover:text-blue-600",children:"+ 添加条目"}):null]})]},e)})}),l?(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>void C(),disabled:c,className:"rounded bg-blue-600 px-3 py-1 text-sm text-white hover:bg-blue-700 disabled:opacity-50",children:c?"保存中…":"保存"}),(0,a.jsx)("button",{type:"button",onClick:()=>o(!1),disabled:c,className:"rounded border border-gray-300 px-3 py-1 text-sm text-gray-600 hover:bg-gray-50 disabled:opacity-50",children:"取消"})]}):null]})}var b=s(27828),g=s(26119),f=s(65777),y=s(93464);function v(e){let{sources:t}=e,s=[{on:t.customer,cls:"bg-amber-100 text-amber-700",label:"客户"},{on:t.parsed,cls:"bg-blue-100 text-blue-700",label:"解析"},{on:t.resume,cls:"bg-green-100 text-green-700",label:"简历"},{on:t.hmhLocal,cls:"bg-purple-100 text-purple-700",label:"本地"}];return(0,a.jsx)("span",{className:"inline-flex flex-wrap gap-1",children:s.filter(e=>e.on).map(e=>(0,a.jsx)("span",{className:"rounded px-1.5 py-0.5 text-xs ".concat(e.cls),children:e.label},e.label))})}let j=[{key:"customer",label:"客户",cls:"bg-amber-100 text-amber-700"},{key:"parsed",label:"解析",cls:"bg-blue-100 text-blue-700"},{key:"resume",label:"简历",cls:"bg-green-100 text-green-700"},{key:"hmhLocal",label:"本地",cls:"bg-purple-100 text-purple-700"}];function N(){var e,t,s,u,x,m;let p=(0,l.useRouter)(),N=(0,l.useSearchParams)(),w=N.get("id")||"",k=N.get("q")||"",S=(null!==(t=N.get("oc"))&&void 0!==t?t:"1")!=="0",[C,P]=(0,r.useState)(null),[E,T]=(0,r.useState)(!1),[A,I]=(0,r.useState)(!1),[L,U]=(0,r.useState)(0),[O,_]=(0,r.useState)(!1),[D,R]=(0,r.useState)(!1),[H,B]=(0,r.useState)(""),[M,J]=(0,r.useState)(!1),[X,z]=(0,r.useState)("profile"),q=N.get("src")||"",V=(0,r.useMemo)(()=>q.split(",").map(e=>e.trim()).filter(Boolean),[q]),[K,G]=(0,r.useState)({customer:0,parsed:0,resume:0,hmhLocal:0}),[F,Q]=(0,r.useState)(0),{session:Y,sync:W}=(0,f.nu)(),Z=null!==(s=null==W?void 0:W.activeTenantId)&&void 0!==s?s:null,$=(0,g.B)({deleteUrl:"/customers",label:"公司",onDeleted:()=>ee.refresh(),currentUserId:null!==(u=null==Y?void 0:Y.hmUserId)&&void 0!==u?u:null}),ee=(0,y.k)({fetchPage:(0,r.useCallback)(async(e,t)=>{var s,a;let r=new URLSearchParams;k&&r.set("query",k),S&&r.set("onlyCustomers","1"),V.length&&r.set("sources",V.join(",")),r.set("limit",String(t)),r.set("offset",String(e));let l=await (0,n.aA)("/customers/unified?".concat(r.toString()));return G(null!==(s=l.sourceCounts)&&void 0!==s?s:{customer:0,parsed:0,resume:0,hmhLocal:0}),Q(null!==(a=l.customerCount)&&void 0!==a?a:0),{items:l.items,total:l.total}},[k,S,V,Z]),pageSize:50,deps:[k,S,V,Z]}),et=ee.items,es=ee.total,ea=ee.loading;(0,r.useEffect)(()=>{$.prune(et.map(e=>String(e.id)))},[et,$]);let er=(0,r.useCallback)(e=>{var t,s,a;let r=new URLSearchParams(N.toString());void 0!==e.id&&(e.id?r.set("id",e.id):r.delete("id"));let l=null!==(t=e.q)&&void 0!==t?t:k;l?r.set("q",l):r.delete("q"),(null!==(s=e.oc)&&void 0!==s?s:S)?r.delete("oc"):r.set("oc","0");let n=null!==(a=e.src)&&void 0!==a?a:V;n.length?r.set("src",n.join(",")):r.delete("src"),p.replace("/companies?".concat(r.toString()))},[p,N,k,S,V]);(0,r.useEffect)(()=>{z("profile")},[w]);let el=(0,r.useCallback)(async()=>{if(w)try{let e=await (0,n.aA)("/customers/".concat(w,"/related"));P(e),I(!1)}catch(e){P(null),I(!0)}},[w]);(0,r.useEffect)(()=>{if(!w){P(null),I(!1);return}T(!0),el().then(()=>T(!1))},[w,el,L]);let en=(0,r.useCallback)(async()=>{let e=null==C?void 0:C.companyProfile;if(null==e?void 0:e.sourceUrl){B("重新适配中…(浏览器编排重跑,稍候)");try{await (0,n.aA)("/extract/adapter",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.sourceUrl})}),B("已重新适配并入库 ✓"),await el()}catch(e){B("重新适配失败(需扩展在线且页面可访问),请重试")}setTimeout(()=>B(""),6e3)}},[null==C?void 0:C.companyProfile,el]),eo=(0,r.useCallback)(async()=>{let e=null==C?void 0:C.companyProfile;if(e){B("");try{let t=await fetch("".concat((0,n.Ox)(),"/entities/company/").concat(e.id,"/repair-prompt"));if(!t.ok)throw Error("HTTP ".concat(t.status));let s=await t.json();await navigator.clipboard.writeText(s.prompt),J(!0),setTimeout(()=>J(!1),4e3)}catch(e){var t;B("复制失败:".concat(null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e))}}},[null==C?void 0:C.companyProfile]),ec=(0,r.useCallback)(async(e,t)=>{_(!0),R(!1);try{await (0,n.aA)("/customers/".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({isCustomer:t?1:0})})}catch(e){_(!1),R(!0);return}ee.refresh(),await el(),_(!1)},[ee,el]),ei=(0,r.useMemo)(()=>et.map(e=>({id:String(e.id),content:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[$.checkbox(String(e.id)),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-medium text-gray-900",children:e.canonicalName}),e.activeJobCount>0?(0,a.jsxs)("span",{className:"rounded bg-emerald-100 px-1.5 py-0.5 text-xs text-emerald-700",children:["交付中 ",e.activeJobCount]}):null]}),(0,a.jsx)("div",{className:"mt-0.5",children:(0,a.jsx)(v,{sources:e.sources})}),(0,a.jsxs)("div",{className:"mt-0.5 text-xs text-gray-400",children:[e.jobCaseCount>0?"".concat(e.jobCaseCount," 个职位案件 \xb7 "):"","更新于 ",(0,o.d3)(e.updatedAt)]})]})]})})),[et,$]),ed=w?E?(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"加载中…"}):A?(0,a.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,a.jsx)("button",{type:"button",onClick:()=>U(e=>e+1),className:"text-blue-500 hover:underline",children:"重试"})]}):C?(0,a.jsxs)("div",{className:"h-full overflow-y-auto p-4",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:C.customer.canonicalName}),(0,a.jsx)(v,{sources:null!==(x=C.customer.sources)&&void 0!==x?x:{customer:1===C.customer.isCustomer,parsed:!1,resume:!1,hmhLocal:!1}}),(0,a.jsx)("button",{type:"button",disabled:O,onClick:()=>void ec(C.customer.id,1!==C.customer.isCustomer),className:"rounded px-2 py-1 text-xs ".concat(1===C.customer.isCustomer?"bg-amber-100 text-amber-700 hover:bg-amber-200":"bg-gray-100 text-gray-600 hover:bg-gray-200"," disabled:opacity-50"),children:1===C.customer.isCustomer?"✓ 我服务的客户(点击取消)":"标注为我服务的客户"})]}),D?(0,a.jsx)("div",{className:"mb-2 text-xs text-red-500",children:"标注失败,请重试"}):null,(null===(e=C.customer.aliases)||void 0===e?void 0:e.length)?(0,a.jsxs)("div",{className:"mb-2 text-xs text-gray-500",children:["别名:",C.customer.aliases.join("、")]}):null,(0,a.jsxs)("div",{className:"mb-4 text-xs text-gray-400",children:["更新于 ",(0,o.d3)(C.customer.updatedAt)]}),C.customer.notes?(0,a.jsxs)("section",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-medium text-gray-800",children:"备注"}),(0,a.jsx)("p",{className:"whitespace-pre-wrap text-sm text-gray-700",children:C.customer.notes})]}):null,(0,a.jsx)(d,{customer:{id:C.customer.id,canonicalName:C.customer.canonicalName,aliases:C.customer.aliases}}),C.companyProfile?(0,a.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-3 py-2",children:[(0,a.jsxs)("span",{className:"text-xs text-gray-500",children:["解析档案:(",C.companyProfile.source,") ",null!==(m=C.companyProfile.name)&&void 0!==m?m:""," \xb7 更新于"," ",(0,o.d3)(C.companyProfile.updatedAt)]}),(0,a.jsx)("button",{type:"button",onClick:()=>void en(),className:"rounded border border-gray-300 bg-white px-2 py-0.5 text-xs text-gray-700 hover:bg-gray-100",children:"重新适配"}),(0,a.jsx)("button",{type:"button",onClick:()=>void eo(),className:"rounded border border-gray-300 bg-white px-2 py-0.5 text-xs text-gray-700 hover:bg-gray-100",children:M?"已复制 ✓ 请发给 agent":"解析有误让agent修复"}),H?(0,a.jsx)("span",{className:"text-xs text-gray-600",children:H}):null]}):null,(0,a.jsx)("div",{className:"mb-2 flex flex-wrap gap-1 border-b border-gray-200",children:[{key:"profile",label:"公司信息"},{key:"jobCases",label:"关联交付职位(".concat(C.jobCases.length,")")},{key:"jobPostings",label:"招聘网站解析职位(".concat(C.jobPostings.length,")")},{key:"talents",label:"相关简历(".concat(C.talents.length,")")},{key:"parseLogs",label:"录制解析(".concat(C.parseLogs.length,")")}].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>z(e.key),className:"rounded-t px-3 py-1.5 text-sm ".concat(X===e.key?"border-b-2 border-blue-500 font-medium text-blue-600":"text-gray-500 hover:text-gray-700"),children:e.label},e.key))}),"profile"===X?(0,a.jsx)(h,{customer:C.customer,onSaved:()=>void el()}):null,"jobCases"===X?(0,a.jsx)("section",{className:"mb-4",children:0===C.jobCases.length?(0,a.jsx)("div",{className:"text-sm text-gray-400",children:"暂无交付职位"}):(0,a.jsx)("ul",{className:"space-y-1",children:C.jobCases.map(e=>{var t;return(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"/jobs?id=".concat(e.id),className:"flex items-start gap-2 rounded border border-gray-200 bg-white px-3 py-2 text-sm hover:border-blue-300",children:(0,a.jsx)(b.dy,{title:function(e){var t,s;let a;let r=(null!==(t=e.folderPath)&&void 0!==t?t:"").split("/").filter(Boolean).filter(e=>!["job","jd","raw"].includes(e));return(a=e.title)&&!["job","jd","raw"].includes(a)?e.title:null!==(s=r.at(-1))&&void 0!==s?s:"案件 #".concat(e.id)}(e),status:e.status,hmhLocal:(null!==(t=e.folderPath)&&void 0!==t?t:"").includes("/local/clients/"),time:e.updatedAt})})},e.id)})})}):null,"jobPostings"===X?(0,a.jsx)("section",{className:"mb-4",children:0===C.jobPostings.length?(0,a.jsx)("div",{className:"text-sm text-gray-400",children:"暂无解析职位"}):(0,a.jsx)("ul",{className:"space-y-1",children:C.jobPostings.map(e=>{var t;return(0,a.jsx)("li",{className:"flex items-start gap-2 rounded border border-gray-200 bg-white px-3 py-2 text-sm",children:(0,a.jsx)(b.rY,{title:null!==(t=e.title)&&void 0!==t?t:"(无标题)",source:e.source,company:e.company,sourceUrl:e.sourceUrl,updatedAt:e.updatedAt})},e.id)})})}):null,"talents"===X?(0,a.jsx)("section",{className:"mb-4",children:0===C.talents.length?(0,a.jsx)("div",{className:"text-sm text-gray-400",children:"暂无相关简历"}):(0,a.jsx)("ul",{className:"space-y-1",children:C.talents.map(e=>{var t;return(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:"/talents?id=".concat(e.id),className:"flex items-start gap-2 rounded border border-gray-200 bg-white px-3 py-2 text-sm hover:border-blue-300",children:(0,a.jsx)(b.oj,{name:null!==(t=e.name)&&void 0!==t?t:"(简历 #".concat(e.id,")"),headline:e.headline,updatedAt:e.updatedAt})})},e.id)})})}):null,"parseLogs"===X?(0,a.jsx)("section",{className:"mb-4",children:0===C.parseLogs.length?(0,a.jsx)("div",{className:"text-sm text-gray-400",children:"暂无解析记录(该公司尚未从网页解析入库)"}):(0,a.jsx)("ul",{className:"space-y-1",children:C.parseLogs.map(e=>(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded border border-gray-200 bg-white px-3 py-2 text-sm",children:[(0,a.jsx)("span",{className:"rounded px-1.5 py-0.5 text-xs ".concat("ok"===e.status?"bg-emerald-100 text-emerald-700":"bg-gray-100 text-gray-500"),children:e.status}),e.hasSnapshot?(0,a.jsx)("span",{className:"rounded bg-green-50 px-1.5 py-0.5 text-xs text-green-700",children:"有快照"}):null,e.adapterVersion?(0,a.jsxs)("span",{className:"text-xs text-gray-400",children:["adapter ",e.adapterVersion]}):null,(0,a.jsxs)("span",{className:"truncate text-xs text-gray-500",title:e.sourceUrl,children:[e.domain," \xb7 session ",e.sessionId]}),(0,a.jsx)("a",{href:e.sourceUrl,target:"_blank",rel:"noreferrer",className:"ml-auto shrink-0 text-xs text-blue-500 hover:underline",children:"来源"}),(0,a.jsx)("span",{className:"shrink-0 text-xs text-gray-400",children:(0,o.d3)(e.createdAt)})]},e.id))})}):null]}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-red-500",children:"未找到该公司"}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"请在左侧选择一家公司查看详情(客户、职位与备注)"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.m,{filterBar:(0,a.jsxs)("div",{className:"space-y-2 border-b border-gray-200 bg-white p-3",children:[(0,a.jsx)("input",{type:"text",value:k,onChange:e=>er({q:e.target.value}),placeholder:"搜索公司名/别名…",className:"w-full rounded border border-gray-300 px-2 py-1.5 text-sm outline-none focus:border-blue-500"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-gray-600 hover:text-gray-800",children:[(0,a.jsx)("input",{type:"checkbox",checked:S,onChange:e=>er({oc:e.target.checked}),className:"accent-amber-600"}),"只看我服务的客户",(0,a.jsx)("span",{className:"rounded bg-amber-100 px-1.5 py-0.5 text-amber-700",children:F})]}),(0,a.jsx)("span",{className:"text-gray-300",children:"|"}),(0,a.jsx)("span",{className:"text-gray-400",children:"来源:"}),j.map(e=>{let t=V.includes(e.key);return(0,a.jsxs)("button",{type:"button",title:t?"点击取消该来源筛选":"点击按该来源过滤(可多选,同时命中)",onClick:()=>er({src:t?V.filter(t=>t!==e.key):[...V,e.key]}),className:"rounded px-1.5 py-0.5 text-xs transition ".concat(t?"".concat(e.cls," ring-1 ring-current"):"".concat(e.cls," opacity-40 hover:opacity-80")),children:[e.label," ",K[e.key]]},e.key)}),V.length?(0,a.jsx)("button",{type:"button",onClick:()=>er({src:[]}),className:"text-xs text-gray-400 hover:text-gray-600",children:"清除来源筛选"}):null,(0,a.jsxs)("span",{className:"ml-auto text-gray-400",children:["共 ",es," 家"]})]}),$.bar(ei)]}),listPanel:ee.error?(0,a.jsxs)("div",{className:"flex-1 overflow-auto p-4 text-center text-sm",children:[(0,a.jsx)("span",{className:"text-red-500",children:"加载失败"}),(0,a.jsx)("button",{type:"button",onClick:()=>ee.refresh(),className:"ml-2 text-blue-500 hover:underline",children:"重试"})]}):(0,a.jsx)(i.L,{items:ei,selectedId:w,onSelect:e=>er({id:e}),loading:ea,emptyText:S?"暂无符合筛选条件的客户(取消勾选或清除来源筛选可浏览全部)":"暂无公司数据",onLoadMore:ee.loadMore,loadingMore:ee.loadingMore,exhausted:ee.exhausted}),detailPanel:ed}),$.modal()]})}function w(){return(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)("div",{className:"p-6 text-gray-500",children:"加载中…"}),children:(0,a.jsx)(N,{})})}var k=s(49616);function S(){var e,t;let[s,l]=(0,r.useState)(""),[o,d]=(0,r.useState)(""),[u,x]=(0,r.useState)(""),[m,p]=(0,r.useState)([]),[h,b]=(0,r.useState)(0),[g,y]=(0,r.useState)(!1),[v,j]=(0,r.useState)(null),[N,w]=(0,r.useState)(null),[S,C]=(0,r.useState)(null),{sync:P}=(0,f.nu)(),E=null!==(e=null==P?void 0:P.activeTenantId)&&void 0!==e?e:null,T=(0,r.useCallback)(async()=>{y(!0);let e=new URLSearchParams;o&&e.set("q",o),u&&e.set("touched",u),e.set("limit","200");try{let t=await (0,n.aA)("/market/companies?".concat(e.toString()));j(null),p(t.items),b(t.total)}catch(e){j("加载失败")}finally{y(!1)}},[o,u,E]);(0,r.useEffect)(()=>{let e=setTimeout(()=>d(s.trim()),300);return()=>clearTimeout(e)},[s]),(0,r.useEffect)(()=>{T()},[T]),(0,r.useEffect)(()=>{C(null),null!=N&&(0,n.aA)("/market/companies/".concat(N)).then(C).catch(()=>{})},[N,E]);let A=(0,r.useMemo)(()=>m.map(e=>({id:String(e.id),content:(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"truncate font-medium text-gray-900",children:e.name}),e.touched?(0,a.jsx)("span",{className:"rounded bg-emerald-100 px-1.5 py-0.5 text-[10px] text-emerald-700",children:"已操作"}):null]}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-0.5",children:[e.platforms.length?e.platforms.map(e=>(0,a.jsx)(k.v,{platform:e},e)):(0,a.jsx)("span",{className:"text-[10px] text-gray-300",children:"无职位发布数据"}),(0,a.jsxs)("span",{className:"ml-1 text-[10px] text-gray-400",children:["在招 ",e.postingsCount," \xb7 ",e.source]})]})]})})),[m]);return(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-amber-200 bg-[color:var(--brand-soft)] px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-[color:var(--brand-strong)]",children:"\uD83E\uDDED 市场公司(BD 视角:目标/对手公司在各平台的发布与操作痕迹)"}),(0,a.jsx)("span",{className:"ml-auto text-[10px] text-gray-400",children:"下方统一列表 = 客户/解析来源维度"})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1",children:(0,a.jsx)(c.m,{filterBar:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-gray-200 bg-white p-3",children:[(0,a.jsx)("input",{type:"text",value:s,onChange:e=>l(e.target.value),placeholder:"搜索公司名…",className:"w-56 rounded border border-gray-300 px-2 py-1.5 text-sm outline-none focus:border-blue-500"}),["","1","0"].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>x(e),className:"rounded px-2 py-1 text-xs ".concat(u===e?"bg-[color:var(--brand-soft)] font-medium text-[color:var(--brand-strong)]":"text-gray-500 hover:bg-gray-100"),children:""===e?"全部":"1"===e?"已操作过":"未操作"},e)),(0,a.jsxs)("span",{className:"ml-auto text-xs text-gray-400",children:["共 ",h," 家"]})]}),listPanel:v?(0,a.jsxs)("div",{className:"flex-1 overflow-auto p-4 text-center text-sm",children:[(0,a.jsx)("span",{className:"text-red-500",children:v}),(0,a.jsx)("button",{type:"button",onClick:()=>void T(),className:"ml-2 text-blue-500 hover:underline",children:"重试"})]}):(0,a.jsx)(i.L,{items:A,selectedId:null!=N?String(N):void 0,onSelect:e=>w(Number(e)),loading:g,emptyText:"暂无市场公司数据"}),detailPanel:N?S?(0,a.jsxs)("div",{className:"h-full overflow-y-auto p-4",children:[(0,a.jsx)("h2",{className:"mb-1 text-lg font-semibold text-gray-900",children:null!==(t=S.profile.name)&&void 0!==t?t:"(未命名)"}),(0,a.jsx)("a",{href:S.profile.sourceUrl,target:"_blank",rel:"noreferrer",className:"mb-4 block truncate text-xs text-blue-600 hover:underline",children:S.profile.sourceUrl}),(0,a.jsxs)("section",{className:"mb-4",children:[(0,a.jsxs)("h3",{className:"mb-2 text-sm font-medium text-gray-800",children:["在招职位(",S.postings.length,")"]}),0===S.postings.length?(0,a.jsx)("div",{className:"text-xs text-gray-400",children:"名下暂无职位发布(解析库 company 字段归一后自动出现)"}):(0,a.jsx)("div",{className:"space-y-1",children:S.postings.map(e=>{var t;return(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded border border-gray-100 px-2 py-1.5 text-sm",children:[(0,a.jsx)(k.v,{platform:e.source}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:null!==(t=e.title)&&void 0!==t?t:"(无标题)"}),(0,a.jsx)("a",{href:e.sourceUrl,target:"_blank",rel:"noreferrer",className:"text-xs text-blue-600 hover:underline",children:"打开"})]},e.id)})})]}),(0,a.jsxs)("section",{children:[(0,a.jsxs)("h3",{className:"mb-2 text-sm font-medium text-gray-800",children:["对手公司(同类型在招,",S.peers.length,")"]}),0===S.peers.length?(0,a.jsx)("div",{className:"text-xs text-gray-400",children:"暂无(需要职位标题数据支撑;解析质量修复后自动点亮)"}):(0,a.jsx)("div",{className:"space-y-1",children:S.peers.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>w(e.id),className:"flex w-full items-center gap-2 rounded border border-gray-100 px-2 py-1.5 text-left text-sm hover:bg-amber-50",children:[(0,a.jsx)("span",{className:"flex-1 truncate",children:e.name}),(0,a.jsxs)("span",{className:"text-xs text-gray-400",children:["在招 ",e.postingsCount]})]},e.id))})]})]}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"加载中…"}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"选择左侧公司查看发布与对手"})})})]})}var C=s(88801);function P(){return"bd"===(0,C.mJ)()?(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsx)("div",{className:"min-h-0 flex-[2] border-b border-gray-200",children:(0,a.jsx)(S,{})}),(0,a.jsx)("div",{className:"min-h-0 flex-[3] overflow-auto",children:(0,a.jsx)(w,{})})]}):(0,a.jsx)(w,{})}},65777:function(e,t,s){"use strict";let a;s.d(t,{Cd:function(){return S},Xc:function(){return P},aG:function(){return w},cp:function(){return k},nu:function(){return N},tQ:function(){return C}});var r=s(60635),l=s(74431),n=s(67002),o=s(60529);let c=null,i=null,d=null,u=new Set;function x(){u.forEach(e=>e())}function m(e){c=c?{...c,refreshing:e}:{...y,refreshing:e},x()}async function p(){try{return await (0,l.aA)("/auth/session")}catch(e){return null}}async function h(e){let t=new Headers,s=(0,n.Xc)();s&&t.set("Authorization","UTOKEN ".concat(s));try{return await (0,l.aA)(e,{headers:t})}catch(e){return null}}async function b(){m(!0);try{var e;let[t,s]=await Promise.all([p(),h("/datasync/state")]),r=(null==t?void 0:t.loggedIn)&&t.token?t.token:null,l=null!=s?s:null;!l&&t&&r&&r!==(0,n.Xc)()?((0,n.GK)(r),l=await h("/datasync/state")):(0,n.GK)(r),function(e){if(void 0===a){a=e;return}if(e!==a){a=e;try{window.localStorage.removeItem("hm-view-mode")}catch(e){}}}((null==t?void 0:t.loggedIn)&&null!==(e=t.hmUserId)&&void 0!==e?e:null);let o=!!((null==t?void 0:t.loggedIn)||(null==l?void 0:l.loggedIn));if(!t&&!l){c=c?{...c,loadError:"本地服务无响应"}:{...y,loadError:"本地服务无响应"},x();return}c={session:null!=t?t:{loggedIn:!1},sync:l,utoken:(0,n.Xc)(),loadError:null,refreshing:!1,authStatus:o?"in":"out",refresh:g},x()}finally{(null==c?void 0:c.refreshing)&&m(!1)}}function g(){return i||(i=b().finally(()=>{i=null}))}function f(e){return u.add(e),1===u.size&&(g(),d=setInterval(()=>void g(),6e4)),()=>{u.delete(e),0===u.size&&d&&(clearInterval(d),d=null)}}let y={session:null,sync:null,utoken:null,loadError:null,refreshing:!1,authStatus:"loading",refresh:g};function v(){return null!=c?c:y}function j(){return v()}function N(){return(0,r.useSyncExternalStore)(f,v,j)}function w(e){var t;return(null!==(t=null==e?void 0:e.memberships)&&void 0!==t?t:[]).filter(e=>!e.isPersonal&&!e.leftAt)}function k(e){var t,s;let a=null!==(t=null==e?void 0:e.activeTenantId)&&void 0!==t?t:null;if(null==a)return null;let r=(null!==(s=null==e?void 0:e.memberships)&&void 0!==s?s:[]).find(e=>e.tenantId===a&&!e.leftAt);return!r||r.isPersonal?null:a}function S(e,t){var s,a;if(!t)return null;let r=(null!==(s=null==e?void 0:e.memberships)&&void 0!==s?s:[]).find(e=>e.tenantId===t&&!e.leftAt&&!e.isPersonal);return null!==(a=null==r?void 0:r.role)&&void 0!==a?a:null}function C(){return o.env.NEXT_PUBLIC_HUNTER_MATE_SERVER_URL||""}function P(){return(0,n.Xc)()}},8448:function(e,t,s){"use strict";function a(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("zh-CN",{hour12:!1}):""}s.d(t,{d3:function(){return a}})},74431:function(e,t,s){"use strict";s.d(t,{Ox:function(){return l},aA:function(){return c}});var a=s(67002),r=s(60529);function l(){return r.env.HUNTER_MATE_SERVER_URL||""}let n=l();class o extends Error{constructor(e,t,s){super(null!=s?s:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function c(e,t){let s;try{s=await fetch("".concat(n).concat(e),{cache:"no-store",...function(e){let t=(0,a.Xc)();if(!t)return e;let s=new Headers(null==e?void 0:e.headers);return s.has("Authorization")||s.set("Authorization","UTOKEN ".concat(t)),{...e,headers:s}}(t)})}catch(t){throw new o(0,e,t instanceof Error?t.message:"网络错误")}if(!s.ok)throw new o(s.status,e,"HTTP ".concat(s.status));try{return await s.json()}catch(t){throw new o(s.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,s){"use strict";s.d(t,{GK:function(){return n},Lc:function(){return o},Xc:function(){return l}});let a=null,r=new Set;function l(){return a}function n(e){e!==a&&(a=e,r.forEach(e=>e()))}function o(e){return r.add(e),()=>{r.delete(e)}}}},function(e){e.O(0,[327,686,400,935,744],function(){return e(e.s=41937)}),_N_E=e.O()}]);