aldehyde 0.2.154 → 0.2.156
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.
- package/dist/bundle.01a0b7dbabd823a67a31.js +2 -0
- package/dist/bundle.01a0b7dbabd823a67a31.js.LICENSE.txt +30 -0
- package/dist/bundle.01a0b7dbabd823a67a31.js.gz +0 -0
- package/dist/bundle.021f784b1c84781461d2.js +1 -0
- package/dist/bundle.03c542ca824e205fe307.js +2 -0
- package/dist/bundle.03c542ca824e205fe307.js.LICENSE.txt +27 -0
- package/dist/bundle.03c542ca824e205fe307.js.gz +0 -0
- package/dist/bundle.15cb660c34802f6cccf5.js +1 -0
- package/dist/bundle.15cb660c34802f6cccf5.js.gz +0 -0
- package/dist/bundle.1efe3c525f7cb5289934.js +1 -0
- package/dist/bundle.1efe3c525f7cb5289934.js.gz +0 -0
- package/dist/bundle.23c961ccfebfb418bb3f.js +1 -0
- package/dist/bundle.23c961ccfebfb418bb3f.js.gz +0 -0
- package/dist/bundle.2465eaaa7b912bcdfa45.js +2 -0
- package/dist/bundle.2465eaaa7b912bcdfa45.js.LICENSE.txt +32 -0
- package/dist/bundle.2465eaaa7b912bcdfa45.js.gz +0 -0
- package/dist/bundle.320c02187dd135005102.js +2 -0
- package/dist/bundle.320c02187dd135005102.js.LICENSE.txt +6 -0
- package/dist/bundle.320c02187dd135005102.js.gz +0 -0
- package/dist/bundle.35a4af7e2d0da1942d79.js +10 -0
- package/dist/bundle.35a4af7e2d0da1942d79.js.gz +0 -0
- package/dist/bundle.3b2c7bdbe61a4cf963e4.js +1 -0
- package/dist/bundle.3b2c7bdbe61a4cf963e4.js.gz +0 -0
- package/dist/bundle.3f9072b1629cdb384b46.js +2 -0
- package/dist/bundle.3f9072b1629cdb384b46.js.LICENSE.txt +5 -0
- package/dist/bundle.3f9072b1629cdb384b46.js.gz +0 -0
- package/dist/bundle.46e2295b5360a725bcd5.js +1 -0
- package/dist/bundle.46e2295b5360a725bcd5.js.gz +0 -0
- package/dist/bundle.492530b9d526ae515db6.js +2 -0
- package/dist/bundle.492530b9d526ae515db6.js.LICENSE.txt +7 -0
- package/dist/bundle.492530b9d526ae515db6.js.gz +0 -0
- package/dist/bundle.4c3c988531c3cf360b87.js +1 -0
- package/dist/bundle.4c3c988531c3cf360b87.js.gz +0 -0
- package/dist/bundle.4da1a8a32161584fc0af.js +1 -0
- package/dist/bundle.5a9afb9ee6cceca506fa.js +5 -0
- package/dist/bundle.5a9afb9ee6cceca506fa.js.LICENSE.txt +10 -0
- package/dist/bundle.5a9afb9ee6cceca506fa.js.gz +0 -0
- package/dist/bundle.5e6cccd06b34a0e3a2ff.js +1 -0
- package/dist/bundle.5e6cccd06b34a0e3a2ff.js.gz +0 -0
- package/dist/bundle.61cf0615267bbaa0da3d.js +2 -0
- package/dist/bundle.61cf0615267bbaa0da3d.js.LICENSE.txt +16 -0
- package/dist/bundle.61cf0615267bbaa0da3d.js.gz +0 -0
- package/dist/bundle.66521244df6a9af1f8d7.js +1 -0
- package/dist/bundle.66521244df6a9af1f8d7.js.gz +0 -0
- package/dist/bundle.6fd2dadd29083268c5a6.js +2 -0
- package/dist/bundle.6fd2dadd29083268c5a6.js.LICENSE.txt +17 -0
- package/dist/bundle.6fd2dadd29083268c5a6.js.gz +0 -0
- package/dist/bundle.7fd0f10501de7fdda584.js +1 -0
- package/dist/bundle.7fd0f10501de7fdda584.js.gz +0 -0
- package/dist/bundle.8241d8d05e35988dd480.js +1 -0
- package/dist/bundle.8241d8d05e35988dd480.js.gz +0 -0
- package/dist/bundle.840e28984e710e12f467.js +75 -0
- package/dist/bundle.840e28984e710e12f467.js.LICENSE.txt +8 -0
- package/dist/bundle.840e28984e710e12f467.js.gz +0 -0
- package/dist/bundle.a049dc8814bbbf59160f.js +1 -0
- package/dist/bundle.a049dc8814bbbf59160f.js.gz +0 -0
- package/dist/bundle.a40e498a0d3d2ac8fb3c.js +1 -0
- package/dist/bundle.a40e498a0d3d2ac8fb3c.js.gz +0 -0
- package/dist/bundle.b7b86a025aa95dea0e19.js +2 -0
- package/dist/bundle.b7b86a025aa95dea0e19.js.LICENSE.txt +8 -0
- package/dist/bundle.b7b86a025aa95dea0e19.js.gz +0 -0
- package/dist/bundle.b7e3eb480b649b3de67b.js +2 -0
- package/dist/bundle.b7e3eb480b649b3de67b.js.LICENSE.txt +5 -0
- package/dist/bundle.b7e3eb480b649b3de67b.js.gz +0 -0
- package/dist/bundle.c1c6028fd703ebf78c2e.js +2 -0
- package/dist/bundle.c1c6028fd703ebf78c2e.js.LICENSE.txt +5 -0
- package/dist/bundle.c1c6028fd703ebf78c2e.js.gz +0 -0
- package/dist/bundle.cd10ae07e0e0c36d0dee.js +2 -0
- package/dist/bundle.cd10ae07e0e0c36d0dee.js.LICENSE.txt +22 -0
- package/dist/bundle.cd10ae07e0e0c36d0dee.js.gz +0 -0
- package/dist/bundle.cf6a1933769c2aee4e6e.js +1 -0
- package/dist/bundle.cf6a1933769c2aee4e6e.js.gz +0 -0
- package/dist/bundle.e760a70171cf0ae4567b.js +1 -0
- package/dist/bundle.e760a70171cf0ae4567b.js.gz +0 -0
- package/dist/bundle.f2b373e87dc8616576e5.js +2 -0
- package/dist/bundle.f2b373e87dc8616576e5.js.LICENSE.txt +1 -0
- package/dist/bundle.f2b373e87dc8616576e5.js.gz +0 -0
- package/dist/bundle.f6e1c4fda58154810fe2.js +2 -0
- package/dist/bundle.f6e1c4fda58154810fe2.js.LICENSE.txt +41 -0
- package/dist/bundle.f6e1c4fda58154810fe2.js.gz +0 -0
- package/dist/bundle.fa1e5bf8d58b99ef68e5.js +2 -0
- package/dist/bundle.fa1e5bf8d58b99ef68e5.js.LICENSE.txt +1 -0
- package/dist/bundle.fa1e5bf8d58b99ef68e5.js.gz +0 -0
- package/dist/bundle.fe9c09b8ace9c3117b0a.js +1 -0
- package/dist/bundle.fe9c09b8ace9c3117b0a.js.gz +0 -0
- package/dist/bundle.feaa17bec2057a4ee54f.js +1 -0
- package/dist/bundle.feaa17bec2057a4ee54f.js.gz +0 -0
- package/dist/css/chemstruc-graph-6437e59640f8b99b774f.css +12 -0
- package/dist/css/chemstruc-graph-6437e59640f8b99b774f.css.gz +0 -0
- package/dist/css/common-901df6b21f13391f2a53.css +56 -0
- package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css +886 -0
- package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css.gz +0 -0
- package/dist/css/main-d450a9a253ac65933d37.css +1071 -0
- package/dist/css/main-d450a9a253ac65933d37.css.gz +0 -0
- package/dist/images/logo-54b328b7.png +0 -0
- package/dist/index.html +4 -0
- package/lib/controls/entry-control.d.ts.map +1 -1
- package/lib/controls/entry-control.js +7 -42
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/controls/rfield/index.d.ts.map +1 -1
- package/lib/controls/rfield/index.js.map +1 -1
- package/lib/controls/select/index.d.ts +30 -0
- package/lib/controls/select/index.d.ts.map +1 -0
- package/lib/controls/select/index.js +145 -0
- package/lib/controls/select/index.js.map +1 -0
- package/lib/form/criteria-form.d.ts.map +1 -1
- package/lib/form/criteria-form.js +6 -3
- package/lib/form/criteria-form.js.map +1 -1
- package/lib/tmpl/hc-data-source.d.ts +1 -0
- package/lib/tmpl/hc-data-source.d.ts.map +1 -1
- package/lib/tmpl/hc-data-source.js +28 -3
- package/lib/tmpl/hc-data-source.js.map +1 -1
- package/lib/tmpl/hcservice-v3.js +7 -7
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +2 -1
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/superagent.d.ts.map +1 -1
- package/lib/tmpl/superagent.js +21 -9
- package/lib/tmpl/superagent.js.map +1 -1
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +5 -3
- package/lib/units/index.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/entry-control.tsx +10 -91
- package/src/aldehyde/controls/rfield/index.tsx +1 -0
- package/src/aldehyde/controls/select/index.tsx +215 -0
- package/src/aldehyde/form/criteria-form.tsx +7 -2
- package/src/aldehyde/tmpl/hc-data-source.tsx +357 -349
- package/src/aldehyde/tmpl/hcservice-v3.tsx +7 -7
- package/src/aldehyde/tmpl/interface.tsx +3 -2
- package/src/aldehyde/tmpl/superagent.js +18 -10
- package/src/aldehyde/units/index.tsx +5 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see bundle.f2b373e87dc8616576e5.js.LICENSE.txt */
|
|
2
|
+
!function(){var t,e,r,n,o,a={22503:function(t,e,r){"use strict";r.d(e,{A:function(){return W}});var n=r(62477),o=r(44274),a=r(2532),i=r(63549),c=r(91985),u=r(11504),l=r(50828),s=r(96540),f=r(28073),h=r(45038),p=r(37977),d=r(16044),v=r(42455),y=r(17636),g=r(677),m=r(28392),w=r(47852),b=r(89467),A=r(43455),x=r(17437);function k(){k=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:S(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};l(A,i,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(T([])));L&&L!==r&&n.call(L,i)&&(A=L);var C=b.prototype=m.prototype=Object.create(A);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==(0,v.A)(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function S(e,r,n){var o=h;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?y:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError((0,v.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),l(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),l(C,u,"Generator"),l(C,i,(function(){return this})),l(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function L(t,e,r){return e=(0,c.A)(e),(0,i.A)(t,C()?Reflect.construct(e,r||[],(0,c.A)(t).constructor):e.apply(t,r))}function C(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(C=function(){return!!t})()}var O=function(t){function e(){var t;(0,o.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=L(this,e,[].concat(n)),(0,l.A)(t,"state",{}),t}return(0,u.A)(e,t),(0,a.A)(e,[{key:"componentDidMount",value:(r=(0,y.A)(k().mark((function t(){return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.formRef,r=t.fields,n=t.value,o=t.onFinish,a=t.onValuesChange,i=t.serverKey;return(0,x.Y)(s.Fragment,null,(0,x.Y)(b.A,{onValuesChange:a,labelWrap:!0,ref:e,name:"control-hooks",onFinish:o},(0,x.Y)(A.A,{serverKey:i,formRef:e,nameAttr:"id",fields:r,valueMap:n})))}}]);var r}(s.PureComponent),E=r(1026);function S(){S=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};l(A,i,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&n.call(k,i)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==(0,v.A)(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function E(e,r,n){var o=h;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?y:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError((0,v.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),l(L,u,"Generator"),l(L,i,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Y(t,e,r){return e=(0,c.A)(e),(0,i.A)(t,j()?Reflect.construct(e,r||[],(0,c.A)(t).constructor):e.apply(t,r))}function j(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(j=function(){return!!t})()}var P=function(t){function e(){var t;(0,o.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=Y(this,e,[].concat(n)),(0,l.A)(t,"state",{}),(0,l.A)(t,"context",void 0),(0,l.A)(t,"reset",(function(){t.props.formRef.current&&t.props.formRef.current.resetFields()})),(0,l.A)(t,"onOk",(function(){t.props.formRef.current.submit()})),t}return(0,u.A)(e,t),(0,a.A)(e,[{key:"componentDidMount",value:(i=(0,y.A)(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,y.A)(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.reset();case 1:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.title,r=(t.height,t.onOk),o=t.fields,a=t.value,i=t.onCancel,c=t.okButtonType,u=t.needConfirm,l=t.okDanger,f=t.onValuesChange,p=t.serverKey,v=t.formRef;(0,n.A)(this.state);var y=this.context.translate;return(0,x.Y)(g.A,{size:"small",style:{width:1e3},title:e,bodyStyle:{overflow:"auto"},extra:(0,x.Y)(s.Fragment,null,(0,x.Y)(m.A,{size:[8,0]},(0,x.Y)(h.Ay,{onClick:this.reset},y("${重置}")),function(t){return u?l?(0,x.Y)(d.A,{placement:"rightBottom",title:y("${确定要执行提交吗}?"),onConfirm:t,okText:y("${确定}"),cancelText:y("${取消}"),okType:"danger"},(0,x.Y)(h.Ay,{type:c,danger:!0},y("${确定}"))):(0,x.Y)(d.A,{placement:"rightBottom",title:y("${确定要执行提交吗}?"),onConfirm:t,okText:y("${确定}"),cancelText:y("${取消}")},(0,x.Y)(h.Ay,{type:c},y("${确定}"))):(0,x.Y)(h.Ay,{type:c,onClick:t},y("${确定}"))}(this.onOk),i?(0,x.Y)(h.Ay,{onClick:i},(0,x.Y)(w.A,null)):""))},(0,x.Y)(O,{serverKey:p,onValuesChange:f,fields:o,formRef:v,value:a,onFinish:r}))}}]);var r,i}(s.PureComponent);(0,l.A)(P,"defaultProps",{forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"},needConfirm:!1,okButtonType:"primary",okDanger:!1}),(0,l.A)(P,"contextType",E.U);var I=r(27251),T=r(20922),N=r(26067),_=r(99552),D=r(5813),R=r(70462);function F(t,e,r){return e=(0,c.A)(e),(0,i.A)(t,G()?Reflect.construct(e,r||[],(0,c.A)(t).constructor):e.apply(t,r))}function G(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(G=function(){return!!t})()}var M={FileDoneOutlined:T.A,CheckOutlined:N.A,CloseCircleOutlined:_.A,FileAddOutlined:D.A,ThunderboltOutlined:R.A},$=function(t){function e(){return(0,o.A)(this,e),F(this,e,arguments)}return(0,u.A)(e,t),(0,a.A)(e,[{key:"render",value:function(){var t=this.props.type;return M[t]?s.createElement(M[t]):(0,x.Y)(R.A,null)}}])}(s.PureComponent),K=r(8130);function B(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function q(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?B(Object(r),!0).forEach((function(e){(0,l.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function V(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return U(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function H(t,e,r){return e=(0,c.A)(e),(0,i.A)(t,z()?Reflect.construct(e,r||[],(0,c.A)(t).constructor):e.apply(t,r))}function z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(z=function(){return!!t})()}var W=function(t){function e(){var t;(0,o.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=H(this,e,[].concat(n)),(0,l.A)(t,"context",void 0),(0,l.A)(t,"state",{popoverOpen:!1,appDtmplConfig:null,formRef:s.createRef()}),(0,l.A)(t,"isShow",(function(){var e=t.props,r=e.actionConfig,n=e.data;return I.A.isShow(r,n,t.getFormRef())})),(0,l.A)(t,"getFormRef",(function(){return t.state.formRef})),(0,l.A)(t,"getValue",(function(){var e,r=t.props,n=r.data,o=r.actionConfig,a=r.formRef,i={},c=n?n[0]:void 0,u=a?a.current:t.getFormRef().current,l=V(o.writes);try{for(l.s();!(e=l.n()).done;){var s=e.value;s&&(u&&u.getFieldValue(s.id)?i[s.id]=I.A.getFormRefValue(u,s.id):c&&(c.fieldMap?i[s.id]=c?c.fieldMap[s.id]:void 0:i[s.id]=c?c[s.id]:void 0))}}catch(t){l.e(t)}finally{l.f()}return console.log("actionValue:",i),i})),(0,l.A)(t,"onOk",(function(e){console.log("action form value:",e);var r=t.props,n=r.actionConfig,o=r.doAction;t.setState({popoverOpen:!1}),o(n.id,t.getCodes(),e)})),(0,l.A)(t,"onCancel",(function(){t.setState({popoverOpen:!1})})),(0,l.A)(t,"onValuesChange",(function(e,r){var n=t.props,o=n.data,a=n.formRef,i=t.state.appDtmplConfig;a&&a.current&&a.current.setFieldsValue(e),null!=i&&i.onValuesChange&&i.onValuesChange(e,{code:o?o[0].code:null,fieldMap:r},t.getFormRef().current)})),(0,l.A)(t,"getButtonType",(function(){var e=t.props,r=e.buttonType,n=e.actionConfig,o=r?"dashed"==r.split("-")[0]?"dashed":"primary":"dashed";return r?o:n.buttonType?n.buttonType:"dashed"})),(0,l.A)(t,"blockButton",(function(){var e=t.props.buttonType;return e&&e.includes("block")})),(0,l.A)(t,"formButton",(function(){var e=t.state.popoverOpen,r=t.props,n=r.actionConfig,o=r.disabled,a=r.hiddenType,i=r.buttonSize,c=r.serverKey,u=o;if(!t.isShow()){if(!a||"hidden"==a)return null;u=!0}return(0,x.Y)(f.A,{placement:"top",open:e,trigger:"click",content:(0,x.Y)(P,{formRef:t.getFormRef(),serverKey:c,okDanger:"danger"==n.beforeExeConfirm,needConfirm:!0,title:n.title,onCancel:function(){return t.onCancel()},fields:n.writes,value:t.getValue(),onOk:t.onOk,onValuesChange:t.onValuesChange})},(0,x.Y)(h.Ay,{danger:n.danger,type:t.getButtonType(),shape:n.buttonShape,block:t.blockButton(),size:i,onClick:function(){return t.setState({popoverOpen:!e})},disabled:u},t.getTitle()))})),(0,l.A)(t,"getTitle",(function(){var e=t.props,r=e.actionConfig,n=e.iconType,o=t.context.translate,a=null;return a=r.icon?"icon-title"==n?(0,x.Y)(s.Fragment,null,(0,x.Y)($,{type:r.icon}),o("${"+r.title+"}")):"icon"==n?(0,x.Y)(p.A,{placement:"top",title:o("${"+r.title+"}")},(0,x.Y)($,{type:r.icon}),""):o("${"+r.title+"}"):o("${"+r.title+"}"),r.tip&&"icon"!=n&&(a=(0,x.Y)(s.Fragment,null,(0,x.Y)(p.A,{title:r.tip},o("${"+r.title+"}")))),a})),(0,l.A)(t,"getCodes",(function(){var e=t.props.data,r=[];if(e&&e instanceof Array){var n,o=V(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;a&&r.push(a.code)}}catch(t){o.e(t)}finally{o.f()}}return r})),(0,l.A)(t,"withoutFormButton",(function(){var e=t.props,r=e.actionConfig,n=e.doAction,o=(e.data,e.disabled),a=(e.buttonType,e.hiddenType),i=(e.buttonSize,t.context.translate),c=o;if(!t.isShow()){if(!a||"hidden"==a)return null;c=!0}var u=t.getCodes(),l=t.blockButton(),s=t.getButtonType();return r.beforeExeConfirm&&"default"!=r.beforeExeConfirm?"danger"==r.beforeExeConfirm?(0,x.Y)(d.A,{key:r.id,placement:"rightBottom",title:i("${确定要执行}【${"+r.title+"}】?"),onConfirm:function(){n(r.id,u,{})},disabled:c,okText:i("${确定}"),cancelText:i("${取消}"),okType:"danger"},(0,x.Y)(h.Ay,{type:s,block:l,danger:!0,shape:r.buttonShape,disabled:c},t.getTitle())):(0,x.Y)(h.Ay,{type:s,block:l,shape:r.buttonShape,danger:r.danger,onClick:function(){return n(r.id,u,{})},disabled:c},t.getTitle()):(0,x.Y)(d.A,{key:r.id,placement:"rightBottom",title:i("${确定要执行}【${"+r.title+"}】?"),onConfirm:function(){n(r.id,u,{})},disabled:c,okText:i("${确定}"),cancelText:i("${取消}")},(0,x.Y)(h.Ay,{danger:r.danger,type:s,shape:r.buttonShape,block:l,disabled:c},t.getTitle()))})),t}return(0,u.A)(e,t),(0,a.A)(e,[{key:"componentDidMount",value:function(){var t=this.props,e=t.data,r=t.actionConfig,n=e&&e[0]?e[0]:null,o=K.A.getAppDtmplConfig({id:r.id,groups:[{fields:r.writes}]},n&&e[0].fieldMap?q({},n):n?{fieldMap:q({},n)}:{},null);this.setState({appDtmplConfig:o})}},{key:"componentDidUpdate",value:function(t){(0,n.A)(this.props),this.props}},{key:"render",value:function(){(0,n.A)(this.state);var t=this.props.actionConfig;return(0,x.Y)(s.Fragment,null,t.writes&&t.writes.length>0?this.formButton():this.withoutFormButton())}}])}(s.PureComponent);(0,l.A)(W,"defaultProps",{hiddenType:"hidden",buttonSize:void 0,iconType:"icon-title"}),(0,l.A)(W,"contextType",E.U)},27251:function(t,e,r){"use strict";r.d(e,{A:function(){return l}});var n=r(44274),o=r(2532),a=r(69036),i=r(78229);function c(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var l=function(){return(0,o.A)((function t(){(0,n.A)(this,t)}),null,[{key:"isShow",value:function(t,e,r){var n=t.preposes;return!n||n.length<=0||this.isMatch(n,e,null==r?void 0:r.current,null)}},{key:"isMatch",value:function(t,e,r,n){var o=!0;if(r){var a,u=[],l=c(t);try{for(l.s();!(a=l.n()).done;){var s=a.value;if(s){var f=n?i.A.getFieldId(n,s.mstrucId):s.id;if(this.containsField(r,f)){var h=this.getFormRefValue(r,f);if(!this.comparator(s.comparator,h,s.defaultValue)){o=!1;break}}else u.push(s)}}}catch(t){l.e(t)}finally{l.f()}o&&u.length>0&&(o=this.matchDtmplData(u,e,n))}else o=!!e&&this.matchDtmplData(t,e,n);return o}},{key:"matchDtmplData",value:function(t,e,r){var n=!0;if(!e)return!1;var o,a=c(e);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(!u){n=!1;break}var l,s=c(t);try{for(s.s();!(l=s.n()).done;){var f=l.value;if(u.fieldMap){var h=r?i.A.getFieldId(r,f.mstrucId):f.id;if(!this.comparator(f.comparator,u.fieldMap[h],f.defaultValue)){n=!1;break}}else if(!this.comparator(f.comparator,u[f.id],f.defaultValue)){n=!1;break}}}catch(t){s.e(t)}finally{s.f()}}}catch(t){a.e(t)}finally{a.f()}return n}},{key:"comparator",value:function(t,e,r){if(t||(t="equals"),!r)return!0;if(!e&&"0"!=e)return!1;switch(t){case"contain":return e.includes(r);case"equal":case"equals":return e==r;case"exclude":return!("string"==typeof r?r.split(","):r).includes(e);case"includeOne":case"include_anyone":return("string"==typeof r?r.split(","):r).includes(e);case"noGreater":case"nogreater":return e<=r;case"noLess":case"noless":return e>=r;case"unequal":case"unequals":return e!=r;default:return void a.Ay.error("暂不支持的比较关系:"+t+";请联系管理员添加。",5)}}},{key:"getFormRefValue",value:function(t,e){return!!t&&t.getFieldValue(e)}},{key:"containsField",value:function(t,e){return!!t&&!!t.getFieldInstance(e)}}])}()},56953:function(t,e,r){"use strict";var n=r(65425),o=(r(96540),r(17355)),a=r(37457),i=r(46704),c=r(94300),u=r(17437),l=o.A.TextArea;e.A=function(t){var e=t.id,r=t.value,o=(t.itemType,t.fieldConfig),s=t.onChange,f=(0,c.Y)().translate,h={id:e,placeholder:o.disabled?f("${无需输入}"):f("${请输入}${"+o.title+"}"),disabled:o.disabled};return(0,u.Y)(a.A,{allowClear:!0,dropdownMatchSelectWidth:!0,options:function(){var t=i.A.getEnums(o.mstrucId);if(!t)return[];var e=[];return t.map((function(t){var r={value:"@@"+t.value,label:t.title};return e.push(r),!1})),e}(),onChange:function(t){if(s){var e;if(void 0===t)return"";e=t.startsWith("@@")?(r||"")+t.substring(2,t.length):t,s(e)}},value:f("${"+r+"}")},(0,u.Y)(l,(0,n.A)({style:{height:150}},h)))}},49814:function(t,e,r){"use strict";r.d(e,{A:function(){return C}});var n=r(42455),o=r(65425),a=r(38452),i=r(17636),c=r(44274),u=r(2532),l=r(63549),s=r(91985),f=r(11504),h=r(50828),p=r(96540),d=r(71057),v=r(46704),y=r(17437),g=["fieldConfig","onChange","value"];function m(){m=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(x=L);var C=A.prototype=w.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(C,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function w(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?w(Object(r),!0).forEach((function(e){(0,h.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function A(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return x(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function k(t,e,r){return e=(0,s.A)(e),(0,l.A)(t,L()?Reflect.construct(e,r||[],(0,s.A)(t).constructor):e.apply(t,r))}function L(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(L=function(){return!!t})()}var C=function(t){function e(){var t;(0,c.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=k(this,e,[].concat(n)),(0,h.A)(t,"state",{options:[]}),(0,h.A)(t,"handleChange",(function(e){var r=t.props.onChange,n=void 0;e&&(n=e.join("->")),r&&r(n)})),(0,h.A)(t,"getOptions",(0,i.A)(m().mark((function e(){var r,n,o,a,i,c,u,l,s;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props,n=r.fieldConfig,o=r.baseValue,a=r.serverKey,e.next=3,v.A.getOptions(a,n.mstrucId);case 3:return i=e.sent,c=[],l=i,s=u=[],o.length>0?o.map((function(t,e){if(e>0&&(s[0].subOptions=[],s=s[0].subOptions),l){var r,n=A(l);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.title==t&&(s.push(b({},o)),l=o.subOptions)}}catch(t){n.e(t)}finally{n.f()}}})):u=i,t.buildOptions(u,c),e.abrupt("return",c);case 11:case"end":return e.stop()}}),e)})))),(0,h.A)(t,"buildOptions",(function(e,r){e.forEach((function(e){var n={};if(n.value=e.title,n.label=e.title,n.key=e.id,r.push(n),e.subOptions){var o=[];n.children=o,t.buildOptions(e.subOptions,o)}else n.isLeaf=!0}))})),t}return(0,f.A)(e,t),(0,u.A)(e,[{key:"componentDidMount",value:(r=(0,i.A)(m().mark((function t(){var e;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getOptions();case 2:e=t.sent,this.setState({options:e});case 4:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state.options,e=this.props,r=(e.fieldConfig,e.onChange,e.value),n=(0,a.A)(e,g);return(0,y.Y)(d.A,(0,o.A)({displayRender:function(t){return t.join("->")},options:t,value:r?r.split("->"):void 0,onChange:this.handleChange},n))}}]);var r}(p.PureComponent);(0,h.A)(C,"defaultProps",{baseValue:[]})},13050:function(t,e,r){"use strict";r.d(e,{A:function(){return x}});var n=r(65425),o=r(38452),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(45038),p=r(677),d=r(68e3),v=r(14103),y=r(84957),g=r(1026),m=r(17437),w=["extra","title","className","initCollapse","showRightNav"];function b(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,A()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function A(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(A=function(){return!!t})()}var x=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=b(this,e,[].concat(n)),(0,s.A)(t,"state",{collapse:!1}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"cardTitle",(function(){var e=t.props,r=e.title,n=e.tip,o=t.state.collapse,a=t.context.translate;if(!r||"null"==r)return null;var i;return i=o?(0,m.Y)(h.Ay,{type:"text",onClick:function(){t.setState({collapse:!1})}},(0,m.Y)(d.A,null),a("${"+r+"}")):(0,m.Y)(h.Ay,{type:"text",onClick:function(){t.setState({collapse:!0})}},(0,m.Y)(v.A,null),"string"==typeof r?a("${"+r+"}"):r),(0,m.Y)(f.Fragment,null,i,(0,m.Y)(y.A,{content:n}))})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:function(){var t=this.props.initCollapse;this.setState({collapse:t})}},{key:"componentDidUpdate",value:function(t){var e=this.props.initCollapse;this.props!=t&&this.setState({collapse:e})}},{key:"render",value:function(){var t=this.state.collapse,e=this.props,r=e.extra,a=(e.title,e.className),i=(e.initCollapse,e.showRightNav),c=(0,o.A)(e,w);return(0,m.Y)(p.A,(0,n.A)({},c,{size:"small",extra:t?"":r,style:{width:i?"90%":"100%"},className:"".concat(a," ").concat(t?"collapse":""),title:this.cardTitle()}),t?null:this.props.children)}}])}(f.PureComponent);(0,s.A)(x,"contextType",g.U)},1490:function(t,e,r){"use strict";var n=r(65425),o=r(38452),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(45038),p=r(1849),d=r(28392),v=r(46935),y=r(40261),g=r(8130),m=r(46675),w=r(1026),b=r(17437),A=["cQueryConfig","mainCode","type","pageType","serverKey"];function x(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,k()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}var L={EditOutlined:(0,b.Y)(y.A,null)},C=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=x(this,e,[].concat(n)),(0,s.A)(t,"state",{showDraw:!1}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"showDraw",(function(e){t.setState({showDraw:!0})})),(0,s.A)(t,"closeDrawer",(function(){t.setState({showDraw:!1})})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"render",value:function(){var t=this,e=this.props,r=e.cQueryConfig,a=e.mainCode,i=e.type,c=e.pageType,u=e.serverKey,l=(0,o.A)(e,A),s=this.state.showDraw,y=this.context.translate,w=a&&a.indexOf("@R@")>0?a.split("@R@")[0]:a;return(0,b.Y)(f.Fragment,null,"text"==i?(0,b.Y)("span",{className:"cquickTextButton",onClick:function(){t.setState({showDraw:!s})}},r.title):(0,b.Y)(h.Ay,(0,n.A)({},l,{onClick:function(){t.setState({showDraw:!s})}}),L[r.title]?L[r.title]:r.title),s?"edit"==r.type?(0,b.Y)(m.A,{serverKey:u,pageType:c,open:s,onCancel:function(){t.setState({showDraw:!1})},sourceId:r.id,code:w,onOk:this.closeDrawer}):(0,b.Y)(p.A,{placement:"left",title:y("${关联查询}"),closable:!0,mask:!1,onClose:this.closeDrawer,open:s,width:"calc(100% - 280px)",style:{maxWidth:1960},extra:(0,b.Y)(d.A,null,(0,b.Y)(h.Ay,{onClick:this.closeDrawer},y("${关闭}")))},r.path?f.createElement(g.A.getCustomPage(r.path)):(0,b.Y)(v.A,{serverKey:u,sourceId:r.id,mainCode:w})):null)}}])}(f.PureComponent);(0,s.A)(C,"contextType",w.U),(0,s.A)(C,"defaultProps",{pageType:"modal"}),e.A=C},23605:function(t,e,r){"use strict";var n=r(50828),o=(r(96540),r(34303)),a=r(15622),i=r(74353),c=r.n(i),u=r(8130),l=r(17437);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){(0,n.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var h=o.A.RangePicker;e.A=function(t){var e,r=t.id,n=t.value,i=t.itemType,s=t.fieldConfig,p=t.onChange,d=t.style,v=t.min,y=t.max,g=n,m=u.A.getDayjsFormat(i),w=function(t){p&&p(t?t.format(m):void 0)},b=function(t){p&&(t?2===t.length&&t[0]&&t[1]&&p(t[0].format(m)+"~"+t[1].format(m)):p(t))},A=function(t){return t&&(y&&c()(t.format(m),m)>c()(y,m)||v&&c()(t.format(m),m)<c()(v,m))},x=void 0,k="date";switch(i){case"date-YY":case"date-M1":case"date":e=g?c()(g,m):void 0,k="date-YY"==i?"year":"date-M1"==i?"month":"date",x=(0,l.Y)(o.A,{id:r,style:f({},d),picker:k,format:m,disabledDate:A,value:e,disabled:s.disabled,onChange:w});break;case"datetime-HH":case"datetime-mm":case"datetime":e=g?c()(g,m):void 0,x=(0,l.Y)(o.A,{id:r,style:f({},d),disabledDate:A,showTime:{format:u.A.getDateTimeFormat(i)},picker:"date",format:m,value:e,disabled:s.disabled,onChange:w});break;case"daterange-YY":case"daterange-M1":case"daterange":var L=g&&g.indexOf("~")>0?g.split("~")[0]:void 0,C=g&&g.indexOf("~")>0?g.split("~")[1]:void 0;e=[L?c()(L,m):void 0,C?c()(C,m):void 0],k="daterange-YY"==i?"year":"daterange-M1"==i?"month":"date",x=(0,l.Y)(h,{id:r,picker:k,style:f({},d),format:m,disabledDate:A,value:e,disabled:s.disabled,onChange:b});break;case"datetimerange-HH":case"datetimerange-mm":case"datetimerange":var O=g&&g.indexOf("~")>0?g.split("~")[0]:void 0,E=g&&g.indexOf("~")>0?g.split("~")[1]:void 0;e=[O?c()(O,m):void 0,E?c()(E,m):void 0],x=(0,l.Y)(h,{id:r,showTime:{format:u.A.getDateTimeFormat(i)},format:m,style:f({},d),value:e,disabledDate:A,disabled:s.disabled,onChange:b});break;case"time-HH":case"time-mm":case"time":e=g?c()(g,m):void 0,x=(0,l.Y)(a.A,{id:r,value:e,style:f({},d),disabled:s.disabled,onChange:w,format:m});break;case"timerange-HH":case"timerange-mm":case"timerange":case"timerange-HH-unorder":case"timerange-mm-unorder":case"timerange-unorder":var S=g&&g.indexOf("~")>0?g.split("~")[0]:void 0,Y=g&&g.indexOf("~")>0?g.split("~")[1]:void 0;e=[S?c()(S,m):void 0,Y?c()(Y,m):void 0],x=(0,l.Y)(a.A.RangePicker,{order:!i.includes("unorder"),id:r,value:e,style:f({},d),disabled:s.disabled,onChange:b,format:m})}return x}},36586:function(t,e,r){"use strict";r.d(e,{A:function(){return V}});var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(36552),d=r(47152),v=r(16370),y=r(45038),g=r(69036),m=r(67034),w=r(36492),b=r(76139),A=r(13341),x=r(49237),k=r(60149),L=r(11058),C=r(40261),O=r(42877),E=r(38221),S=r.n(E),Y=r(92749),j=r(46704),P=r(44920),I=r(46675),T=r(56522),N=r(40403),_=r(1026),D=r(49604),R=r(17437);function F(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function G(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?F(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function M(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return $(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function K(){K=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function B(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,q()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function q(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(q=function(){return!!t})()}var V=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),c=0;c<r;c++)n[c]=arguments[c];return t=B(this,e,[].concat(n)),(0,f.A)(t,"state",{titleId:void 0,optionCacheKey:void 0,pageNo:1,loading:!1,optionsCache:{},codeLabel:{},ltmplConfig:void 0,showView:!1,showEdit:!1,showTable:!1,drawCode:void 0,preMainCode:void 0}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"dropdownRender",(function(e){var r=t.props.fieldConfig.actions;return(0,R.Y)(h.Fragment,null,e,(0,R.Y)(h.Fragment,null,(0,R.Y)(p.A,{style:{margin:"8px 0"}}),(0,R.Y)(d.A,{justify:"end"},r&&r.indexOf("table")>=0?(0,R.Y)(v.A,null,(0,R.Y)(y.Ay,{type:"text",icon:(0,R.Y)(A.A,{style:{color:"#0958d9"}}),onClick:function(){return t.showTable()}})):null,r&&r.indexOf("add")>=0?(0,R.Y)(v.A,null,(0,R.Y)(y.Ay,{type:"text",icon:(0,R.Y)(x.A,{style:{color:"#0958d9"}}),onClick:function(){return t.editItem()}})):null,(0,R.Y)(v.A,null,(0,R.Y)(y.Ay,{type:"text",icon:(0,R.Y)(k.A,{style:{color:"#0958d9"}}),onClick:function(){return t.initCache()}})))))})),(0,f.A)(t,"editItem",function(){var e=(0,a.A)(K().mark((function e(r){var n;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.loadLtmplConfig();case 2:n=e.sent,t.setState({showEdit:!0,showTable:!1,showView:!1,drawCode:r,ltmplConfig:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"showTable",(0,a.A)(K().mark((function e(){return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.setState({showEdit:!1,showTable:!0,showView:!1,drawCode:void 0});case 1:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"loadLtmplConfig",(0,a.A)(K().mark((function e(){var r,n,o,a,i;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.fieldConfig,o=r.serverKey,a=t.state.ltmplConfig,i=a){e.next=7;break}return e.next=6,j.A.requestLtmplConfig(n.serverKey?n.serverKey:o,n.sourceId?n.sourceId:n.id);case 6:i=e.sent.ltmplConfig;case 7:return t.setState({ltmplConfig:i}),e.abrupt("return",i);case 9:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"showItem",function(){var e=(0,a.A)(K().mark((function e(r){var n;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.loadLtmplConfig();case 2:n=e.sent,t.setState({showEdit:!1,showTable:!1,showView:!0,drawCode:r,ltmplConfig:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"initCache",(function(){t.setState({optionsCache:{},codeLabel:{}})})),(0,f.A)(t,"toOption",(function(e,r,n){var o=t.props,a=o.fieldConfig,i=o.valueOnly,c=a.actions;return t.state.codeLabel[i?r:e]=r,{value:i?r:e,label:(0,R.Y)(h.Fragment,null,r,c&&c.indexOf("detail")>=0?(0,R.Y)(y.Ay,{size:"small",type:"text",onClick:function(r){r.stopPropagation(),t.showItem(e)}},(0,R.Y)(L.A,{style:{color:"#0958d9"}})):null,c&&c.indexOf("edit")>=0?(0,R.Y)(y.Ay,{size:"small",type:"text",onClick:function(r){r.stopPropagation(),t.editItem(e)}},(0,R.Y)(C.A,{style:{color:"#0958d9"}})):null)}})),(0,f.A)(t,"doClose",(function(){t.setState({drawCode:void 0,showEdit:!1,showView:!1,showTable:!1})})),(0,f.A)(t,"drawSubmited",(function(){t.initCache(),t.doClose()})),(0,f.A)(t,"closeTable",(function(){t.drawSubmited()})),(0,f.A)(t,"toValueArray",(function(e){var r,n=[],o=M(t.toArray(e));try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a)if(t.props.valueOnly)n.push(a);else{var i=a.split("@R@");"null"!=i[1]&&n.push(i[0])}}}catch(t){o.e(t)}finally{o.f()}return n})),(0,f.A)(t,"toArray",(function(t){return t instanceof Array?t:t?t.split(","):[]})),(0,f.A)(t,"toOptions",(function(e,r){var n,o=t.props,a=o.fieldConfig,i=o.valueOnly,c=[],u=M(t.toArray(e));try{for(u.s();!(n=u.n()).done;){var l=n.value;if(l)if(i)c.push(t.toOption(l,l,r));else{var s=l.split("@R@");"null"!=s[1]&&c.push(t.toOption(s[0],s[1],r))}}}catch(t){u.e(t)}finally{u.f()}return a.suppleOptions&&a.suppleOptions.forEach((function(e){var r=!1;c.forEach((function(t){t.value!=e.code||(r=!0)})),r||c.push(t.toOption(e.code,e.title,void 0))})),c})),(0,f.A)(t,"fetchNextPage",(0,a.A)(K().mark((function e(){var r,n,a,i,c,u,l;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.state,n=r.optionCacheKey,a=r.titleId,i=r.optionsCache,c=i[n],u=c.pageInfo,c.touchEnd){e.next=10;break}return u.pageNo=u.pageNo+1,e.next=7,t.loadData(c.queryKey.key,G({},u),a);case 7:(l=e.sent)&&(c.options=[].concat((0,o.A)(c.options),(0,o.A)(l.options)),c.touchEnd=l.touchEnd),t.setState({pageNo:u.pageNo});case 10:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"fetchOptions",function(){var e=(0,a.A)(K().mark((function e(r){var n,o,a,i,c,u,l,s,f,h,p,d,v,y,m,w,b,A,x,k,L,C;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,o=n.fieldConfig,a=n.mainCode,i=n.baseCriteria,c=n.serverKey,u=t.state,l=u.optionsCache,s=u.ltmplConfig,f=u.preMainCode,h=i||o.baseCriteria,p=a||o.mainCode,f!=p&&(t.setState({preMainCode:p.toString()}),t.initCache()),d="withoutValue",r&&(d=r),v=t.state.titleId,y=l[d]){e.next=40;break}if(t.setState({loading:!0}),m=s){e.next=16;break}return e.next=15,t.loadLtmplConfig();case 15:m=e.sent;case 16:if(m){e.next=19;break}return g.Ay.error("请配置正确查询页面",5),e.abrupt("return");case 19:return w={pageNo:1,pageSize:6,virtualEndPageNo:void 0},v=m.primaryColumn.id,b=m.primaryCriteria,A="undefinedCriteria",b&&(A="c_"+b.id),(x=m.defaultPageSize)&&(w.pageSize=x),k={},h&&(k=G({},h)),k[A]=r,e.next=31,Y.A.requestLtmplQueryKey(o.serverKey?o.serverKey:c,o.sourceId,G(G(G({},k),w),{},{mainCode:p}));case 31:return L=e.sent,e.next=34,t.loadData(L.key,w,v);case 34:C=e.sent,y={options:C.options,pageInfo:w,queryKey:L,searchValue:r,touchEnd:C.touchEnd},l[d]=y,t.setState({optionCacheKey:d,titleId:v,optionsCache:G({},l),loading:!1}),e.next=41;break;case 40:t.state.optionCacheKey==d&&"withoutValue"==d?t.setState({loading:!1,optionCacheKey:d}):S()((function(){t.setState({loading:!1,optionCacheKey:d})}),500)();case 41:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"onChange",(function(e){var r=t.state.codeLabel,n=t.props,a=n.maxSelected,i=n.valueOnly,c=(0,o.A)(e);e&&e.length>a&&c.shift();var u=[];c.forEach((function(t){i?t.indexOf("@R@")>0?u.push(t.split("@R@")[1]):u.push(r[t]):t.indexOf("@R@")>0?u.push(t):u.push(t+"@R@"+r[t])})),t.props.onChange(u)})),(0,f.A)(t,"tagRender",(function(t){var e=t.label,r=t.closable,n=t.onClose;return(0,R.Y)(m.A,{onMouseDown:function(t){t.preventDefault(),t.stopPropagation()},closable:r,onClose:n,style:{marginRight:3}},e)})),(0,f.A)(t,"loadData",function(){var e=(0,a.A)(K().mark((function e(r,n,o){var a,i,c,u,l,s,f;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.props,i=a.onEntityClick,c=a.baseCriteria,u=a.serverKey,l=a.fieldConfig,c||l.baseCriteria,e.next=4,Y.A.requestQueryData(l.serverKey?l.serverKey:u,r,n);case 4:return s=e.sent,f=[],n=s.pageInfo,s.entities&&s.entities.forEach((function(e,r){var n=e.fieldMap[o];if(j.A.cache(e),n){var a=n.split("@R@"),c=a&&a.length>0?a[a.length-1]:n;if("null"!=c){var u=t.toOption(e.code,c,i);f.push(u)}}})),e.abrupt("return",{options:f,touchEnd:s.touchEnd});case 9:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"debounceFetcher",(function(){return S()((function(e){t.fetchOptions(e)}),800)})),(0,f.A)(t,"debounceFetchNextPage",(function(){S()(t.fetchNextPage,200)()})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidUpdate",value:function(t){var e=this.props,r=e.baseCriteria,n=e.mainCode,o=e.fieldConfig,a=t.baseCriteria,i=t.mainCode,c=t.fieldConfig,u=r||o.baseCriteria,l=a||c.baseCriteria;(u&&JSON.stringify(u)!=JSON.stringify(l)||n&&n!=i||o&&c&&o.id!=c.id)&&this.initCache()}},{key:"render",value:function(){var t,e=this,r=this.props,n=r.id,a=r.value,i=r.fieldConfig,c=(r.onChange,r.disabled),u=r.style,l=(r.maxSelected,r.onEntityClick),s=r.mainCode,f=r.serverKey,p=i.actions,d=this.state,v=d.optionCacheKey,y=d.loading,g=d.optionsCache,m=d.drawCode,A=d.showEdit,x=d.showView,k=d.showTable,L=d.ltmplConfig,C=this.context.translate,E=i.serverKey?i.serverKey:f,Y=this.toOptions(a,l),j=(0,o.A)(Y),_=256;if(v&&g[v]){var F=g[v];F.pageInfo&&F.pageInfo.pageSize<8&&(_=32*F.pageInfo.pageSize-10);var $,K=M(F.options);try{for(K.s();!($=K.n()).done;){var B=$.value;t=!1;var q,V=M(Y);try{for(V.s();!(q=V.n()).done;){var U=q.value;U.value==B.value&&(t=!0,U.label=B.label)}}catch(t){V.e(t)}finally{V.f()}t||j.push(B)}}catch(t){K.e(t)}finally{K.f()}}return c&&a?(0,R.Y)(D.A,this.props):(0,R.Y)(h.Fragment,null,(0,R.Y)(w.A,{disabled:c,id:n,listHeight:_,style:G({},u),onChange:this.onChange,value:this.toValueArray(a),mode:"multiple",placeholder:C("${请选择}${"+i.title+"}"),notFoundContent:y?(0,R.Y)(b.A,{size:"small"}):C("${无数据}"),allowClear:!0,showArrow:!0,suffixIcon:(0,R.Y)(O.A,null),filterOption:!1,dropdownRender:this.dropdownRender,tagRender:p&&(p.indexOf("detail")>=0||p.indexOf("edit")>=0)?this.tagRender:void 0,onSearch:this.debounceFetcher(),onClick:c?null:function(){S()(e.fetchOptions,100)(void 0)},options:y?[]:j,onPopupScroll:function(t){var r=t.target;r.scrollTop+r.offsetHeight+1>=r.scrollHeight&&e.debounceFetchNextPage()}}),x&&m?(0,R.Y)(P.A,{serverKey:E,placement:"left",onClose:this.doClose,open:x,sourceId:i.sourceId,code:m}):null,A&&L?L.customEditPagePath?(0,R.Y)(T.A,{open:A,onOk:function(){e.drawSubmited()},customPath:L.customEditPagePath,sourceId:i.sourceId,mainCode:s,code:m}):(0,R.Y)(I.A,{defaultDtmplData:i.defaultDtmplData,serverKey:E,pageType:"modal",open:A,onCancel:this.doClose,mainCode:s,sourceId:i.sourceId,code:m,onOk:this.drawSubmited}):null,k?(0,R.Y)(N.$h,{serverKey:E,open:k,height:"76vh",onCancel:this.closeTable,sourceId:i.sourceId,mainCode:s}):null)}}])}(h.PureComponent);(0,f.A)(V,"defaultProps",{maxSelected:100,valueOnly:!1}),(0,f.A)(V,"contextType",_.U)},18015:function(t,e,r){"use strict";r.d(e,{A:function(){return b}});var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(21102),d=r(92749),v=r(1026),y=r(17437);function g(){g=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(x=L);var C=A.prototype=w.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(C,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function m(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,w()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}var b=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),c=0;c<r;c++)n[c]=arguments[c];return t=m(this,e,[].concat(n)),(0,f.A)(t,"state",{treeData:[]}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"loadSchoolLevelUnit",(0,a.A)(g().mark((function t(){var e,r;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],t.next=3,d.A.requestLtmplQueryTop(null,"221036732522497",{});case 3:return(r=t.sent).entities&&r.entities.forEach((function(t,r){var n={};n.id=t.code,n.level=1,n.pId=0,n.title=t.fieldMap[0xcfc1f06ca002],n.value=n.id+"@R@"+n.title,n.key=n.value,n.selectable=!1,e.push(n)})),t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})))),(0,f.A)(t,"loadLab",function(){var t=(0,a.A)(g().mark((function t(e){var r,n;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],t.next=3,d.A.requestLtmplQueryTop(null,"228261345665025",{mainCode:e});case 3:return(n=t.sent).entities&&n.entities.forEach((function(t,n){var o={};o.id=t.code,o.level=2,o.pId=e,o.title=t.fieldMap[0xcec62beca003],o.value=o.id+"@R@"+o.title,o.key=o.value,o.selectable=!1,r.push(o)})),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,f.A)(t,"loadRoom",function(){var t=(0,a.A)(g().mark((function t(e){var r,n;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],t.next=3,d.A.requestLtmplQueryTop(null,"228261733638145",{mainCode:e});case 3:return(n=t.sent).entities&&n.entities.forEach((function(t,n){var o={};o.id=t.code,o.level=3,o.pId=e,o.title=t.fieldMap[0xd239b3eca005],o.value=o.id+"@R@"+o.title,o.key=o.value,o.isLeaf=!0,r.push(o)})),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,f.A)(t,"onChange",(function(e){(0,t.props.onChange)(e)})),(0,f.A)(t,"onLoadData",function(){var e=(0,a.A)(g().mark((function e(r){var n,a,i;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.state.treeData,1!=r.level){e.next=8;break}return e.next=4,t.loadLab(r.id);case 4:a=e.sent,t.setState({treeData:[].concat((0,o.A)(n),(0,o.A)(a))}),e.next=13;break;case 8:if(2!=r.level){e.next=13;break}return e.next=11,t.loadRoom(r.id);case 11:i=e.sent,t.setState({treeData:[].concat((0,o.A)(n),(0,o.A)(i))});case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(r=(0,a.A)(g().mark((function t(){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=this,t.next=3,this.loadSchoolLevelUnit();case 3:t.t1=t.sent,t.t2={treeData:t.t1},t.t0.setState.call(t.t0,t.t2);case 6:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t,e=this.props,r=(e.id,e.value),n=(e.fieldConfig,e.style,this.state.treeData),o=this.context.translate;return r&&(t=r.split("@R@")[1]),(0,y.Y)(p.A,{treeDataSimpleMode:!0,style:{width:"100%",minWidth:"260px"},value:t,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:o("--${请选择}--"),onChange:this.onChange,loadData:this.onLoadData,treeData:n})}}]);var r}(h.PureComponent);(0,f.A)(b,"defaultProps",{maxSelected:100}),(0,f.A)(b,"contextType",v.U)},59090:function(t,e,r){"use strict";r.d(e,{A:function(){return L}});var n=r(62477),o=r(44274),a=r(2532),i=r(63549),c=r(91985),u=r(11504),l=r(50828),s=r(96540),f=r(45038),h=r(28073),p=r(36492),d=r(42877),v=r(65560),y=r(1026),g=r(17437);function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){(0,l.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function b(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function x(t,e,r){return e=(0,c.A)(e),(0,i.A)(t,k()?Reflect.construct(e,r||[],(0,c.A)(t).constructor):e.apply(t,r))}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}var L=function(t){function e(){var t;(0,o.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=x(this,e,[].concat(n)),(0,l.A)(t,"state",{}),(0,l.A)(t,"context",void 0),(0,l.A)(t,"onClick",(function(){t.setState({showSelectTable:!0})})),(0,l.A)(t,"onSelect",(function(e){var r=t.props,n=(r.value,r.onChange),o=[];if(e){var a,i=b(e);try{for(i.s();!(a=i.n()).done;){var c=a.value,u=null;if(u=c.title instanceof Array?c.title[0]:c.title,c.title&&c.title.includes("@R@")){var l=u.split("@R@");u=l[l.length-1]}o.push(c.code+"@R@"+u)}}catch(t){i.e(t)}finally{i.f()}}n(o)})),(0,l.A)(t,"toArray",(function(t){return t instanceof Array?t:t?t.split(","):[]})),(0,l.A)(t,"toValueArray",(function(e){var r,n=[],o=b(t.toArray(e));try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a){var i=a.split("@R@");"null"!=i[1]&&n.push(i[0])}}}catch(t){o.e(t)}finally{o.f()}return n})),t}return(0,u.A)(e,t),(0,a.A)(e,[{key:"render",value:function(){var t=this.props,e=t.id,r=t.value,o=(t.itemType,t.fieldConfig),a=t.onChange,i=t.style,c=t.maxSelected,u=t.onEntityClick,l=t.mainCode,y=t.serverKey;(0,n.A)(this.state);var m=this.context.translate,b=[],A=[],x=this.toArray(r);return x.forEach((function(t){if(t.indexOf("@R@")>0){var e=t.split("@R@");b.push({code:e[0],title:e[1]}),A.push({value:e[0],label:u?(0,g.Y)(f.Ay,{size:"small",style:{padding:"0px"},type:"link",title:"",onClick:function(t){t.stopPropagation(),u(e[0])}},e[1]):e[1]})}})),(0,g.Y)(s.Fragment,null,(0,g.Y)(h.A,{overlayClassName:"-popover",placement:"bottom",color:"#f0f0f0",overlayStyle:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"},overlayInnerStyle:{padding:"0px"},content:(0,g.Y)("div",{style:{height:300,backgroundColor:"#fafafa",overflow:"auto",borderStyle:"solid",borderRadius:"6px",borderWidth:"0px",borderColor:"#8c8c8c"}},(0,g.Y)(v.A,{serverKey:y,mainCode:l,maxSelectedRows:c,selectedRows:b,sourceId:o.sourceId,onChange:this.onSelect})),trigger:"click"},(0,g.Y)(p.A,{id:e,style:w({},i),value:this.toValueArray(x),mode:"multiple",placeholder:m("${请选择}${"+o.title+"}"),notFoundContent:m("${请选择}"),allowClear:!0,showArrow:!0,suffixIcon:(0,g.Y)(d.A,null),dropdownStyle:{display:"none"},onChange:function(t){a(t)},options:A})))}}])}(s.PureComponent);(0,l.A)(L,"defaultProps",{maxSelected:100}),(0,l.A)(L,"contextType",y.U)},97135:function(t,e,r){"use strict";var n=r(38452),o=r(65425),a=r(50828),i=r(96540),c=r(50770),u=r(17355),l=r(36492),s=r(15039),f=r(54763),h=r(68876),p=r(24262),d=r(56953),v=r(80243),y=r(66941),g=r(17595),m=r(49814),w=r(36586),b=r(59090),A=r(18015),x=r(8130),k=r(40403),L=r(75763),C=r(23605),O=r(70686),E=r(17437),S=["value","onChange","style"],Y=["value"],j=["fieldConfig","value","onChange","id","mainCode"];function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function I(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?P(Object(r),!0).forEach((function(e){(0,a.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var T=c.Ay.Group,N=(0,E.Y)(i.Fragment,null,"loading"),_=(0,v.Ay)({resolved:{},chunkName:function(){return"signature"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(87)]).then(r.bind(r,4556))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 4556}},{fallback:N}),D=(0,v.Ay)({resolved:{},chunkName:function(){return"chemstruc-graph"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(689),r.e(651),r.e(390),r.e(469),r.e(63),r.e(613),r.e(419),r.e(543),r.e(724),r.e(809),r.e(670)]).then(r.bind(r,85998))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 85998}},{fallback:N}),R=(0,v.Ay)({resolved:{},chunkName:function(){return"html-editor-draft"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(689),r.e(651),r.e(900)]).then(r.bind(r,12536))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 12536}},{fallback:N}),F=(0,v.Ay)({resolved:{},chunkName:function(){return"code-editor-sql-code-editor"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(112),r.e(695)]).then(r.bind(r,74025))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 74025}},{fallback:N}),G=(0,v.Ay)({resolved:{},chunkName:function(){return"color-picker"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(671)]).then(r.bind(r,33442))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 33442}},{fallback:N}),M=u.A.TextArea;e.A=function(t){var e=t.fieldConfig,r=t.value,a=t.onChange;return function(t,e,r,a,v,j,P){var N=(0,k.Ym)().translate,$=f.A.getControlType(r,a),K=void 0,B=r.disabled?N("${无需输入}"):N("${请输入}${"+r.title+"}"),q=r.disabled,V=r.min,U=V||"0"==V?x.A.configParamTrans(V):void 0,H=(V=r.max)||"0"==V?x.A.configParamTrans(V):void 0,z=I({id:t,mainCode:e,fieldConfig:r,min:U,max:H,itemType:$,viewOrEdit:"edit",onChange:v,disabled:q,value:a,style:{minWidth:220,width:"100%"}},P),W=I({id:t,placeholder:B,disabled:q,value:a,onChange:v,style:{minWidth:220,width:"100%"}},P),Q=(0,E.Y)(u.A,{type:"text",placeholder:N("${暂未实现}-${"+$+"}"),disabled:!0});if(k.vr.getCustomEditControl($))return i.createElement(k.vr.getCustomEditControl($),z);switch($){case"int":case"decimal":case"float":case"double":case"intrange":case"decimalrange":K=(0,E.Y)(h.A,z);break;case"text":K=(0,E.Y)(u.A,(0,o.A)({allowClear:!0,type:"text"},W));break;case"range":K=(0,E.Y)(p.A,z);break;case"yes-no-select":K=(0,E.Y)(l.A,(0,o.A)({},W,{notFoundContent:N("${暂无选项}"),allowClear:!0,showSearch:!0,optionFilterProp:"label",options:[{value:"是",label:"是"},{value:"否",label:"否"}]}));break;case"select":case"multiselect":case"texttags":case"checkbox":case"radio":case"steps":K=(0,E.Y)(O.A,z);break;case"yes-no-switch":var J=W.value,X=W.onChange,Z=(W.style,(0,n.A)(W,S));K=(0,E.Y)(s.A,(0,o.A)({style:{width:"60px"},checkedChildren:N("${是}"),unCheckedChildren:N("${否}"),checked:J==N("${是}"),onChange:function(t){X(N(t?"${是}":"${否}"))}},Z));break;case"yes-no-radio":var tt=W.value,et=(0,n.A)(W,Y);K=(0,E.Y)(T,(0,o.A)({value:tt?tt==N("${是}")?N("${是}"):N("${否}"):null},et),(0,E.Y)(c.Ay,{value:N("${是}")},N("${是}")),(0,E.Y)(c.Ay,{value:N("${否}")},N("${否}")));break;case"date-YY":case"daterange-YY":case"date-M1":case"daterange-M1":case"date":case"daterange":case"datetime-HH":case"datetimerange-HH":case"datetime-mm":case"datetimerange-mm":case"datetime":case"datetimerange":case"time-HH":case"timerange-HH":case"time-mm":case"timerange-mm":case"time":case"timerange":case"timerange-HH-unorder":case"timerange-mm-unorder":case"timerange-unorder":K=(0,E.Y)(C.A,z);break;case"textarea":case"url":K=(0,E.Y)(M,(0,o.A)({rows:3,allowClear:!0},W));break;case"html":K=(0,E.Y)(R,(0,o.A)({viewOrEdit:"edit"},z));break;case"password":K=(0,E.Y)(u.A.Password,(0,o.A)({},W,{autoComplete:"new-password",prefix:(0,E.Y)(L.A,{className:"site-form-item-icon"})}));break;case"preselect":K=(0,E.Y)(d.A,z);break;case"caselect":K=(0,E.Y)(m.A,z);break;case"relation":default:K=Q;break;case"file":case"video":case"picture":case"non-download-file":K=(0,E.Y)(y.A,z);break;case"chemstruc":K=(0,E.Y)(D,(0,o.A)({viewOrEdit:"edit"},z));break;case"sql-code-editor":K=(0,E.Y)(F,(0,o.A)({viewOrEdit:"edit"},z));break;case"relselect":case"refselect":case"entity-select":K=(0,E.Y)(w.A,(0,o.A)({baseCriteria:r.baseCriteria,maxSelected:H?parseInt(H):void 0},z));break;case"relselectvalue":K=(0,E.Y)(w.A,(0,o.A)({valueOnly:!0,baseCriteria:r.baseCriteria,maxSelected:H?parseInt(H):void 0},z));break;case"table-entity-select":K=(0,E.Y)(b.A,(0,o.A)({maxSelected:H?parseInt(H):void 0},z));break;case"lab-tree-select":K=(0,E.Y)(A.A,(0,o.A)({maxSelected:H?parseInt(H):void 0},z));break;case"progress":K=(0,E.Y)(g.A,z);break;case"signature":K=(0,E.Y)(_,z);break;case"color":K=(0,E.Y)(G,z);break;case"hidden":K=(0,E.Y)(u.A,{type:"hidden",value:a,disabled:!0})}return K}(t.id,t.mainCode,e,r,a,0,(0,n.A)(t,j))}},75283:function(t,e,r){"use strict";r(96540);var n=r(52120),o=r(46704),a=r(94300),i=r(17437);e.A=function(t){var e=(0,a.Y)().translate,r=t.value,c=(t.itemType,t.fieldConfig),u=o.A.getEnumValueColor(c.mstrucId,r);return(0,i.Y)("span",{className:"infoStyle"},r?(0,i.Y)(n.A,{color:u||"green",text:e("${"+r+"}")}):null)}},78550:function(t,e,r){"use strict";r(96540);var n=r(67034),o=r(46704),a=r(94300),i=r(17437);e.A=function(t){var e=(0,a.Y)().translate,r=t.value,c=(t.itemType,t.fieldConfig),u=[];if(r){var l=r;r instanceof Array||(l=r.split(",")),l.forEach((function(t){var a=o.A.getEnumValueColor(c.mstrucId,r);u.push((0,i.Y)(n.A,{key:t,color:a||"blue"},e("${"+t+"}")))}))}return(0,i.Y)("span",{className:"infoStyle"},u)}},66480:function(t,e,r){"use strict";r.d(e,{A:function(){return O}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(76139),p=r(45038),d=r(1849),v=r(28392),y=r(40756),g=r(47852),m=r(92749),w=r(80243),b=r(17437);function A(){A=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(x=L);var C=b.prototype=m.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function x(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,k()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}var L=(0,b.Y)(h.A,{tip:"Loading..."}),C=(0,w.Ay)({resolved:{},chunkName:function(){return"react-file-viewer"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return r.e(374).then(r.t.bind(r,29787,23))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 29787}},{fallback:L}),O=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=x(this,e,[].concat(n)),(0,s.A)(t,"state",{drawerOpen:!1}),(0,s.A)(t,"onClose",(function(){t.setState({drawerOpen:!1})})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"onError",value:function(t){console.log(t,"error in file-viewer")}},{key:"render",value:function(){var t=this,e=this.props,r=e.file,n=e.downloadable,a=e.serverKey,i=this.state.drawerOpen;return(0,b.Y)("span",{className:"labelcss"},(0,b.Y)(p.Ay,{type:"link",onClick:function(){t.setState({drawerOpen:!0})},size:"small"},r.base.fileName),n?(0,b.Y)(p.Ay,{type:"text",onClick:(0,o.A)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.A.download(a,r.base.path);case 2:case"end":return t.stop()}}),t)}))),size:"small"},(0,b.Y)(y.A,null)):null,i?(0,b.Y)(d.A,{title:r.base.fileName,placement:"left",closable:!1,onClose:this.onClose,width:"1200px",open:i,extra:(0,b.Y)(v.A,null,n?(0,b.Y)(p.Ay,{onClick:(0,o.A)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.A.download(a,r.base.path);case 2:case"end":return t.stop()}}),t)})))},(0,b.Y)(y.A,null)):null,(0,b.Y)(p.Ay,{onClick:this.onClose},(0,b.Y)(g.A,null)))},(0,b.Y)(C,{style:{width:"100%"},fileType:r.base.type,filePath:m.A.getFileUrl(a,r.base.path),errorComponent:void 0,onError:this.onError})):null)}}])}(f.PureComponent);(0,s.A)(O,"defaultProps",{downloadable:!0})},78122:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return O}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(62070),p=r(47152),d=r(16370),v=r(45038),y=r(28392),g=r(66480),m=r(40756),w=r(92749),b=r(77004),A=r(17437);function x(){x=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(A=L);var C=b.prototype=m.prototype=Object.create(A);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function k(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,L()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function L(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(L=function(){return!!t})()}var C=b.Ay,O=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t=k(this,e,[].concat(n)),(0,s.A)(t,"state",{urlData:void 0}),(0,s.A)(t,"loadData",(0,o.A)(x().mark((function e(){var r,n,o,a;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.value,o=r.serverKey,!(a=t.getJsonValue(n))){e.next=10;break}if(!/^image\/\w+;base64/.test(a.base.type)){e.next=10;break}return e.t0=t,e.next=7,w.A.loadFileTxt(o,a.base.path);case 7:e.t1=e.sent,e.t2={urlData:e.t1},e.t0.setState.call(e.t0,e.t2);case 10:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"getJsonValue",(function(t){var e=t;if(t)return"string"==typeof t&&(e=JSON.parse(t)),e})),(0,s.A)(t,"packFile2Show",(function(e,r){var n=t.state.urlData,a=t.props.downloadable,i=t.getJsonValue(r);if(i){if("new"==i.valid)return i.fileName;if("delete"==i.valid)return;if(["png","jpg","jpeg","gif","PNG","JPG","JPEG","GIF","svg","SVG"].includes(i.base.type))return(0,A.Y)(h.A,{width:90,src:i.icon.type?w.A.getFileUrl(e,i.icon.path):w.A.getFileUrl(e,i.base.path),preview:{src:w.A.getFileUrl(e,i.base.path)}});if(n)return(0,A.Y)(h.A,{width:90,src:n,preview:{src:n}});if(["mp4","MP4","mov","MOV","avi","AVI","WMV","wmv"].includes(i.base.type)){var c={ld:{play_url:w.A.getFileUrl(e,i.base.path)}};return(0,A.Y)(p.A,{align:"middle"},(0,A.Y)(d.A,{style:{height:"60px",width:"300px"}},(0,A.Y)(C,{locale:"zh-Hans",sources:c,id:i.base.fileName})))}return["xlsx","docx","csv","webm","bmp"].includes(i.base.type)?(0,A.Y)(g.A,{serverKey:e,file:i,downloadable:a}):["pdf","txt"].includes(i.base.type)?(0,A.Y)("span",{className:"labelcss"},(0,A.Y)(v.Ay,{type:"link",onClick:(0,o.A)(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w.A.openfile(e,i.base.path,a?"":"#toolbar=0");case 2:case"end":return t.stop()}}),t)}))),size:"small"},i.base.fileName),a?(0,A.Y)(v.Ay,{type:"text",onClick:(0,o.A)(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w.A.download(e,i.base.path);case 2:case"end":return t.stop()}}),t)}))),size:"small"},(0,A.Y)(m.A,null)):null):(0,A.Y)(y.A,{className:"labelcss"},a?(0,A.Y)(f.Fragment,null,(0,A.Y)(v.Ay,{type:"link",onClick:(0,o.A)(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w.A.download(e,i.base.path);case 2:case"end":return t.stop()}}),t)}))),size:"small"},i.base.fileName),(0,A.Y)(v.Ay,{type:"text",onClick:(0,o.A)(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w.A.download(e,i.base.path);case 2:case"end":return t.stop()}}),t)}))),size:"small",icon:(0,A.Y)(m.A,null)})):(0,A.Y)(v.Ay,{type:"text",size:"small"},i.base.fileName))}})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:function(){this.loadData()}},{key:"componentDidUpdate",value:function(t,e,r){this.props.value!=this.props.value&&this.loadData()}},{key:"render",value:function(){return(0,A.Y)(f.Fragment,null,this.packFile2Show(this.props.serverKey,this.props.value))}}])}(f.PureComponent);(0,s.A)(O,"defaultProps",{downloadable:!0})},68876:function(t,e,r){"use strict";var n=r(65425),o=r(50828),a=(r(96540),r(7142)),i=r(28392),c=r(8130),u=r(94300),l=r(17437);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){(0,o.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e.A=function(t){var e=t.id,r=t.value,o=t.itemType,s=t.fieldConfig,h=t.onChange,p=t.style,d=t.min,v=t.max,y=(0,u.Y)().translate,g=void 0,m=function(t){h&&h(t)},w=c.A.splitValue(r),b=w.valueBegin,A=w.valueEnd,x=r||0==r?r:null,k=function(t){h&&h(c.A.concatValue(t,A))},L=function(t){h&&h(c.A.concatValue(b,t))},C=function(t){(!t.target.value&&0!=t.target.value||isNaN(t.target.value))&&(t.target.value=null)},O=s.disabled?y("${无需输入}"):y("${请输入}${"+s.title+"}"),E=s.disabled,S={id:e,placeholder:O,disabled:E,value:r};switch(o){case"int":g=(0,l.Y)(a.A,(0,n.A)({style:f({},p),min:d,max:v,stringMode:!0,precision:0},S,{value:x,onChange:m}));break;case"decimal":case"float":case"double":g=(0,l.Y)(a.A,(0,n.A)({style:f({},p)},S,{value:x,min:d,max:v,step:.1,onChange:m}));break;case"intrange":g=(0,l.Y)(i.A,null,(0,l.Y)(a.A,{min:d,max:v,placeholder:y("${开始}"),value:b,precision:0,onKeyUp:C,onChange:k,disabled:E}),"~",(0,l.Y)(a.A,{min:d,max:v,placeholder:y("${结束}"),value:A,precision:0,onKeyUp:C,onChange:L,disabled:E}));break;case"decimalrange":g=(0,l.Y)(i.A,null,(0,l.Y)(a.A,{min:d,max:v,placeholder:y("${开始}"),value:b,onChange:k,step:.1,disabled:E}),"~",(0,l.Y)(a.A,{min:d,max:v,placeholder:y("${结束}"),value:A,step:.1,onChange:L,disabled:E}))}return g}},24262:function(t,e,r){"use strict";r(96540);var n=r(17355),o=r(8130),a=r(94300),i=r(17437);e.A=function(t){var e,r=t.id,c=t.value,u=(t.itemType,t.fieldConfig),l=t.onChange,s=(t.style,(0,a.Y)().translate),f=o.A.splitValue(c),h=f.valueBegin,p=f.valueEnd,d=u.disabled;return e=(0,i.Y)(n.A.Group,{compact:!0},(0,i.Y)(n.A,{id:r,style:{width:"45%"},disabled:d,min:u.min,max:u.max,placeholder:s("${开始}"),value:h,onChange:function(t){var e=t.target.value;l&&l(o.A.concatValue(e,p))}}),"~",(0,i.Y)(n.A,{style:{width:"45%"},disabled:d,min:u.min,max:u.max,placeholder:s("${结束}"),value:p,onChange:function(t){var e=t.target.value;l&&l(o.A.concatValue(h,e))}})),e}},17595:function(t,e,r){"use strict";var n=r(65425),o=r(50828),a=(r(96540),r(6754)),i=r(7142),c=r(94300),u=r(17437);function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){(0,o.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e.A=function(t){var e,r=t.value,o=(t.itemType,t.fieldConfig),l=t.onChange,f=t.style,h=t.viewOrEdit,p=(0,c.Y)().translate;e=r?isNaN(r)?r:r.toString():0;var d,v={placeholder:o.disabled?p("${无需输入}"):p("${请输入}${"+o.title+"}"),disabled:o.disabled,value:r};return d="view"==h||o.disabled?(0,u.Y)(a.A,{width:90,percent:e}):(0,u.Y)(i.A,(0,n.A)({style:s({},f),min:0,max:100},v,{onKeyUp:function(t){t.target.value&&!isNaN(t.target.value)?t.target.value=parseInt(t.target.value):t.target.value=0},onChange:function(t){l&&l(t)}})),d}},49604:function(t,e,r){"use strict";r.d(e,{A:function(){return x}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(28392),f=r(45038),h=r(28073),p=r(22733),d=r(1026),v=r(78122),y=r(55208),g=r(68455),m=r(17437);function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function b(t,e,r){return e=(0,i.A)(e),(0,a.A)(t,A()?Reflect.construct(e,r||[],(0,i.A)(t).constructor):e.apply(t,r))}function A(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(A=function(){return!!t})()}var x=function(t){function e(){var t;(0,n.A)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=b(this,e,[].concat(o)),(0,u.A)(t,"state",{showDtmplView:!1,showSelectTable:!1,selectedCodes:void 0,openCode:void 0}),(0,u.A)(t,"context",void 0),(0,u.A)(t,"showRfieldDtmplView",(function(e){t.setState({openCode:e,showDtmplView:!0})})),(0,u.A)(t,"hiddenDtmplView",(function(){t.setState({showDtmplView:!1})})),(0,u.A)(t,"handleRFieldSelect",(function(t){})),(0,u.A)(t,"deleteRFieldValue",(function(t){})),(0,u.A)(t,"showCount",(function(){var e=t.props.value,r="";if(e instanceof Array){var n,o=0,a=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return w(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(e);try{for(a.s();!(n=a.n()).done;){var i=n.value;if(o++,(r+=i&&i.indexOf("@R@")>0?i.split("@R@")[1]:i).length>=32)break}}catch(t){a.e(t)}finally{a.f()}return o}return 1})),(0,u.A)(t,"needMore",(function(){var e=t.props.value,r=t.showCount();return(e instanceof Array?e.length:1)>r})),(0,u.A)(t,"getValue",(function(e){var r,n=t.props,o=n.fieldConfig,a=n.value,i=o.buttons;return r=a instanceof Array?e&&e>0&&a.length>e?a.slice(0,e):a:a?a.split(","):[],i&&i.includes("detail")?(0,m.Y)(s.A,{key:e?e+1:1,size:[8,8],wrap:!0},r.map((function(e,r){var n=!!e&&e.indexOf("@R@")>0,o=n?e.split("@R@")[1]:e,a=e?e.split("@R@")[0]:void 0;return n?(0,m.Y)(f.Ay,{key:r,style:{padding:"0px 0px",height:"100%"},type:"link",title:"",onClick:function(){t.showRfieldDtmplView(a)}},t.showValue(o)):(0,m.Y)("span",{key:r},t.showValue(o))}))):(0,m.Y)(s.A,{key:e?e+2:2,size:[8,16],wrap:!0},r.map((function(e,r){var n=e&&e.indexOf("@R@")>0?e.split("@R@")[1]:e;return e&&e.split("@R@")[0],(0,m.Y)("span",{key:r},t.showValue(n))})))})),(0,u.A)(t,"showValue",(function(t){if(!/^\s*[\[{].*[\]}]\s*$/.test(t))return(0,m.Y)(y.A,{isHtml:!1,value:t,showMax:32});var e=JSON.parse(t);return e.valid&&e.base?(0,m.Y)("div",{onClick:function(t){t.stopPropagation()}},(0,m.Y)(v.default,{fieldConfig:{id:"1",title:"文件"},value:e})):void 0})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this.props,e=t.fieldConfig,r=(t.value,t.itemType,t.serverKey),n=this.state,o=n.showDtmplView,a=n.openCode,i=e.buttons,c=this.context.translate,u=this.getValue(this.showCount());return(0,m.Y)(l.Fragment,null,(0,m.Y)(s.A,{key:3,size:[8,16],wrap:!0,style:{minWidth:"80px"}},u,this.needMore()?(0,m.Y)(h.A,{overlayStyle:{maxWidth:"360px"},placement:"leftBottom",trigger:"click",content:this.getValue()},(0,m.Y)(f.Ay,{key:"more",type:"link",size:"small"},c("${更多}..."))):null,i&&i.includes("dtmplEdit")?(0,m.Y)(g.A,{serverKey:r,key:"dem",open:o,onCancel:this.hiddenDtmplView,onOk:this.hiddenDtmplView,sourceId:e.sourceId,code:a}):i&&i.includes("detail")?(0,m.Y)(p.A,{serverKey:r,key:"mdv",open:o,onCancel:this.hiddenDtmplView,sourceId:e.sourceId,code:a}):""))}}])}(l.PureComponent);(0,u.A)(x,"contextType",d.U)},70686:function(t,e,r){"use strict";r.d(e,{A:function(){return Y}});var n=r(65425),o=r(38452),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(91196),p=r(50770),d=r(36492),v=r(17355),y=r(1026),g=r(46704),m=r(48287),w=r(4283),b=r(17437),A=["itemType","id","fieldConfig","style","disabled","onChange"];function x(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function k(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return L(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function C(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,O()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}var E=h.A.Group,S=p.Ay.Group,Y=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,i=new Array(r),c=0;c<r;c++)i[c]=arguments[c];return t=C(this,e,[].concat(i)),(0,s.A)(t,"state",{}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"getValue",(function(){var e=t.props,r=e.value,n=e.fieldConfig,o=r&&""!=r?"string"==typeof r?r.split(","):r:void 0,a=[];if(o&&Array.isArray(o)){var i,c=k(o);try{for(c.s();!(i=c.n()).done;){var u=i.value;u.includes("@E@")?a.push(u[1]):a.push(u)}}catch(t){c.e(t)}finally{c.f()}}else a=o;var l=[];if(a){var s=g.A.getEnumsValueMap(n.mstrucId);if(s){var f,h=k(a);try{for(h.s();!(f=h.n()).done;){var p=f.value,d=s.get(p);d?l.push(d):l.push(p)}}catch(t){h.e(t)}finally{h.f()}}}else l=a;return l})),(0,s.A)(t,"getOptions",(function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=[],o=g.A.getEnums(t);return o&&o.map((function(t){var o=t.order&&parseInt(t.order)>0&&parseInt(t.order)<1e3?t.order+".":"",a=(0,m.A)("${"+t.title+"}");n.push({label:e?o+a:a,value:r?t.id:t.value})})),n})),(0,s.A)(t,"render",(function(){var e,r=t.props,a=r.itemType,i=r.id,c=r.fieldConfig,u=r.style,l=r.disabled,h=r.onChange,p=(0,o.A)(r,A),y=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?x(Object(r),!0).forEach((function(e){(0,s.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({id:i,placeholder:c.disabled?(0,m.A)("${无需输入}"):(0,m.A)("${请输入}${"+c.title+"}"),disabled:l,onChange:h,style:u},p);switch(a){case"select":e=(0,b.Y)(d.A,(0,n.A)({},y,{value:t.getValue(),notFoundContent:(0,m.A)("${暂无选项}"),allowClear:!0,showSearch:!0,optionFilterProp:"label",options:t.getOptions(c.mstrucId,!0)}));break;case"multiselect":case"texttags":e=(0,b.Y)(d.A,(0,n.A)({mode:"multiple"},y,{value:t.getValue(),notFoundContent:(0,m.A)("${暂无选项}"),allowClear:!0,showSearch:!0,optionFilterProp:"label",options:t.getOptions(c.mstrucId,!0)}));break;case"checkbox":e=(0,b.Y)(E,(0,n.A)({},y,{options:t.getOptions(c.mstrucId,!0),value:t.getValue()}));break;case"radio":e=(0,b.Y)(S,(0,n.A)({},y,{options:t.getOptions(c.mstrucId,!0),value:t.getValue()}));case"steps":e=(0,b.Y)(w.A,(0,n.A)({},t.props,{options:t.getOptions(c.mstrucId,!0)}));break;default:e=(0,b.Y)(v.A,{type:"text",placeholder:(0,m.A)("${暂未实现}-${"+a+"}"),disabled:!0})}return(0,b.Y)(f.Fragment,null,e)})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidUpdate",value:function(t){}}])}(f.PureComponent);(0,s.A)(Y,"defaultProps",{maxSelected:100,valueOnly:!1}),(0,s.A)(Y,"contextType",y.U)},4283:function(t,e,r){"use strict";var n=r(38452),o=(r(96540),r(53515)),a=r(36492),i=r(46704),c=r(94300),u=r(17437),l=["viewOrEdit"];e.A=function(t){var e,r=t.viewOrEdit,s=void 0===r?"view":r,f=(0,n.A)(t,l),h=f.value,p=f.fieldConfig,d=f.onChange,v=f.options,y=(0,c.Y)().translate,g=i.A.getEnums(p.mstrucId),m=void 0;for(var w in g)h==g[w].value&&(m=parseInt(w));var b=[];return g.map((function(t){return b.push({title:t.title})})),e=p.disabled||"view"==s?(0,u.Y)(o.A,{items:b,current:m,size:"small"}):(0,u.Y)(a.A,{placeholder:y("${请选择}${"+p.title+"}"),notFoundContent:y("${暂无选项}"),allowClear:!0,showSearch:!0,value:h,onChange:function(t){d&&d(t)},options:v}),e}},55208:function(t,e,r){"use strict";r.d(e,{A:function(){return y}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(8130),f=r(28073),h=r(1026),p=r(17437);function d(t,e,r){return e=(0,i.A)(e),(0,a.A)(t,v()?Reflect.construct(e,r||[],(0,i.A)(t).constructor):e.apply(t,r))}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}var y=function(t){function e(){var t;(0,n.A)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=d(this,e,[].concat(o)),(0,u.A)(t,"state",{}),(0,u.A)(t,"context",void 0),(0,u.A)(t,"toString",(function(t){return t?t.toString():t})),(0,u.A)(t,"viewButton",(function(e){var r=t.props,n=r.value,o=r.isHtml;return t.context.translate,(0,p.Y)(l.Fragment,null,(0,p.Y)(f.A,{overlayStyle:{maxWidth:360},placement:"leftBottom",content:(0,p.Y)(l.Fragment,null,o?(0,p.Y)("div",{style:{padding:"6px"},dangerouslySetInnerHTML:{__html:n}}):(0,p.Y)("div",{style:{padding:"6px"}},n))},e))})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t,e=this.props,r=e.value,n=e.isHtml,o=e.showMax,a=this.toString(r);if(n){var i=new RegExp("<[^<>]+>","g");a=null==r?void 0:r.replace(i,"")}var c=s.A.getLongTextStyle(null===(t=a)||void 0===t?void 0:t.substring(0,o));return(0,p.Y)(l.Fragment,null,a?a.length<=o||o<=0?(0,p.Y)("span",{className:"infoStyle",style:c},a):(0,p.Y)("span",{className:"infoStyle",style:c},this.viewButton(a.substring(0,o)+"...")):(0,p.Y)(l.Fragment,null))}}])}(l.PureComponent);(0,u.A)(y,"contextType",h.U),(0,u.A)(y,"defaultProps",{isHtml:!1,showMax:30})},66941:function(t,e,r){"use strict";r.d(e,{A:function(){return L}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(69036),p=r(77829),d=r(45038),v=r(77028),y=r(92749),g=r(19612),m=r(8130),w=r(1026),b=r(17437);function A(){A=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(x=L);var C=b.prototype=m.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function x(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,k()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}var L=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t=x(this,e,[].concat(n)),(0,s.A)(t,"state",{}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"handleRemove",(function(e){t.props.onChange(JSON.stringify({valid:"delete"}))})),(0,s.A)(t,"handleChange",function(){var e=(0,o.A)(A().mark((function e(r){var n;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("file change:",r),"done"==r.file.status&&(n={valid:"new",fileKey:r.file.response.fileKey,fileName:r.file.originFileObj.name},(0,t.props.onChange)(JSON.stringify(n)));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"beforeUpload",(function(e){var r=t.context.translate;return!!(e.size/1024/1024<40)||(h.Ay.error(r("${超过40M限制 不允许上传~}"),5),!1)})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"render",value:function(){var t=this.props,e=t.id,r=t.itemType,n=t.disabled,o=t.value,a=t.serverKey,i=this.context.translate,c=[];if(o){var u=o;"string"==typeof u&&(u=JSON.parse(o)),!0===u.valid?c.push({uid:"-1",name:u.base.fileName,status:"done",url:m.A.joinPath(m.A.joinPath(m.A.api(),"/v3/files"),u.base.path)+"?@token=".concat(m.A.hydrocarbonToken(),"&@programToken=").concat(m.A.programCode(),"&disposition=attachment")}):"new"==u.valid&&c.push({uid:"-2",name:u.fileName})}return(0,b.Y)("div",null,(0,b.Y)(p.A,{id:e,maxCount:1,accept:"picture"===r?".png, .jpg, .jpeg":"video"===r?".mp4":void 0,listType:"picture"==r?"picture":"text",fileList:0==c.length?void 0:c,disabled:n,name:"file",headers:g.A.getHeaderObj(),action:function(t){return y.A.postFileAction(a,t)},beforeUpload:this.beforeUpload,onChange:this.handleChange,onRemove:this.handleRemove},c&&c.length>=1?"":(0,b.Y)(d.Ay,{disabled:n},(0,b.Y)(v.A,null)," ",i(n?"${无需上传}":"${点击上传}"))))}}])}(f.PureComponent);(0,s.A)(L,"contextType",w.U)},74712:function(t,e,r){"use strict";var n=r(38452),o=r(65425),a=r(50828),i=r(96540),c=r(52120),u=r(37977),l=r(17355),s=r(80243),f=r(54763),h=r(78550),p=r(75283),d=r(4283),v=r(8130),y=r(49604),g=r(74353),m=r.n(g),w=r(17595),b=r(55208),A=r(40403),x=r(17437),k=["fieldConfig","value","holderType"];function L(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var C=(0,x.Y)(i.Fragment,null,"loading"),O=(0,s.Ay)({resolved:{},chunkName:function(){return"signature"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(87)]).then(r.bind(r,4556))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 4556}},{fallback:C}),E=(0,s.Ay)({resolved:{},chunkName:function(){return"chemstruc-graph"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(689),r.e(651),r.e(390),r.e(469),r.e(63),r.e(613),r.e(419),r.e(543),r.e(724),r.e(809),r.e(670)]).then(r.bind(r,85998))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 85998}},{fallback:C}),S=(0,s.Ay)({resolved:{},chunkName:function(){return"code-editor-sql-code-editor"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(112),r.e(695)]).then(r.bind(r,74025))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 74025}},{fallback:C}),Y=(0,s.Ay)({resolved:{},chunkName:function(){return"color-picker"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(671)]).then(r.bind(r,33442))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 33442}},{fallback:C}),j=(0,s.Ay)({resolved:{},chunkName:function(){return"controls-file-view"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.resolve().then(r.bind(r,78122))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 78122}},{fallback:C});function P(t,e,r,n,s){var g=(0,A.Ym)().translate,k=f.A.getControlType(t,e),C=r;C||(C="descriptions");t.colNum;var P=void 0,I=(t.disabled?g("${无需输入}"):g("${请输入}${"+t.title+"}"),t.disabled,e||(t.defaultValue&&!v.A.isConfigDefaultValue(t.defaultValue)?t.defaultValue:"")),T=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?L(Object(r),!0).forEach((function(e){(0,a.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({fieldConfig:t,itemType:k,value:I,viewOrEdit:"view"},s);if(A.vr.getCustomEditControl(k))return i.createElement(A.vr.getCustomViewControl(k),T);var N=(0,x.Y)("span",{className:"infoStyle"},g("${暂未完成}-${"+k+"}"));if(!I||"null"==I||I.toString().includes("@R@null"))P=(0,x.Y)(i.Fragment,null);else switch(k){case"int":case"decimal":case"float":case"double":case"intrange":case"decimalrange":case"range":case"daterange-YY":case"daterange-M1":case"daterange":case"datetimerange-HH":case"datetimerange-mm":case"datetimerange":case"timerange-HH":case"timerange-mm":case"timerange":case"caselect":P=(0,x.Y)("span",{className:"infoStyle"},I);break;case"date-YY":case"date-M1":case"date":case"datetime-HH":case"datetime-mm":case"datetime":case"time-HH":case"time-mm":case"time":P=(0,x.Y)("span",{className:"infoStyle"},I?"Invalid Date"==m()(I).format(v.A.getDayjsFormat(k))?I:m()(I).format(v.A.getDayjsFormat(k)):void 0);break;case"text":case"textarea":case"preselect":P="table"==C?(0,x.Y)(b.A,{isHtml:!1,value:I,showMax:t.ellipsisLength?t.ellipsisLength:28}):(0,x.Y)("span",{className:"infoStyle"},I);break;case"select":case"radio":case"yes-no-switch":P=(0,x.Y)(p.A,T);break;case"yes-no-radio":P=(0,x.Y)("span",{className:"infoStyle"},I?(0,x.Y)(c.A,{color:"是"==I||1==I?"green":"red",text:g("${"+(0==I?"否":I)+"}")}):null);break;case"multiselect":case"checkbox":P=(0,x.Y)(h.A,T);break;case"html":P="table"==C?(0,x.Y)(b.A,{isHtml:!0,value:I}):(0,x.Y)("div",{dangerouslySetInnerHTML:{__html:I}});break;case"steps":P=(0,x.Y)(d.A,T);break;case"password":P=I?(0,x.Y)(u.A,(0,o.A)({title:I,color:"#fff1b8"},T),(0,x.Y)("span",{className:"infoStyle"},"********")):null;break;case"relation":default:P=N;break;case"file":case"picture":case"video":P=(0,x.Y)(j,T);break;case"non-download-file":P=(0,x.Y)(j,(0,o.A)({},T,{downloadable:!1}));break;case"chemstruc":P=(0,x.Y)(E,T);break;case"sql-code-editor":P=(0,x.Y)(S,(0,o.A)({viewOrEdit:"view"},T));break;case"relselect":case"refselect":case"entity-select":case"table-entity-select":P=(0,x.Y)(y.A,T);break;case"progress":P=(0,x.Y)(w.A,T);break;case"signature":P=(0,x.Y)(O,T);break;case"color":P=(0,x.Y)(Y,T);break;case"url":P=(0,x.Y)("a",{target:"_blank",href:I},g("${网址}"));break;case"hidden":P=(0,x.Y)(l.A,{type:"hidden",value:e,disabled:!0})}return P}e.A=function(t){return P(t.fieldConfig,t.value,t.holderType,0,(0,n.A)(t,k))}},88133:function(t,e,r){"use strict";r(96540);var n=r(57529),o=r(94300),a=r(17437),i=n.A.Title;e.A=function(t){var e=(0,o.Y)().translate;return(0,a.Y)(n.A,null,(0,a.Y)(i,null,e("${没有找到自定义页面}")),(0,a.Y)(i,{level:5},"url:/",t.pageName),(0,a.Y)(i,{level:5},e("${请确认配置}")))}},56522:function(t,e,r){"use strict";r.d(e,{A:function(){return m}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(45038),f=r(37187),h=r(88133),p=r(40403),d=r(1026),v=r(17437);function y(t,e,r){return e=(0,i.A)(e),(0,a.A)(t,g()?Reflect.construct(e,r||[],(0,i.A)(t).constructor):e.apply(t,r))}function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(g=function(){return!!t})()}var m=function(t){function e(){var t;(0,n.A)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=y(this,e,[].concat(o)),(0,u.A)(t,"state",{}),(0,u.A)(t,"context",void 0),(0,u.A)(t,"getFooter",(function(){var e=t.props.onOk,r=t.context.translate,n=[];return n.unshift((0,v.Y)(s.Ay,{onClick:e,type:"primary"},r("${关闭}"))),n})),(0,u.A)(t,"customPage",(function(){var e=t.props,r=e.code,n=e.sourceId,o=e.open,a=e.mainCode,i=e.customPath,c=e.onOk;if(o){var u=p.vr.getCustomPage(i)||h.A;return l.createElement(u,{code:r,sourceId:n,mainCode:a,pageName:i,onOk:c})}})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this.props,e=t.height,r=t.onOk,n=t.open,o=t.width,a=t.title,i=t.bodyWidth,c=this.context.translate;return(0,v.Y)(f.A,{open:n,width:o,title:a,closable:!1,bodyStyle:{height:e,width:i,overflow:"auto"},destroyOnClose:!0,centered:!0,onCancel:r,footer:[(0,v.Y)(s.Ay,{onClick:function(){return r()}},c("${关闭}"))]},this.customPage())}}])}(l.PureComponent);(0,u.A)(m,"contextType",d.U),(0,u.A)(m,"defaultProps",{height:"82vh",width:"82vw",bodyWidth:"100%",forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"}})},97823:function(t,e,r){"use strict";var n=r(62477),o=r(44274),a=r(2532),i=r(63549),c=r(91985),u=r(11504),l=r(50828),s=r(96540),f=r(28392),h=r(99326),p=r(28073),d=r(45038),v=r(50329),y=r(1490),g=r(1026),m=r(17437);function w(t,e,r){return e=(0,c.A)(e),(0,i.A)(t,b()?Reflect.construct(e,r||[],(0,c.A)(t).constructor):e.apply(t,r))}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}var A=function(t){function e(){var t;(0,o.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=w(this,e,[].concat(n)),(0,l.A)(t,"state",{}),(0,l.A)(t,"context",void 0),(0,l.A)(t,"calcOffsetBottom",(function(t){return t.length>=3?120:2==t.length?86:80})),t}return(0,u.A)(e,t),(0,a.A)(e,[{key:"render",value:function(){(0,n.A)(this.state);var t=this.props,e=t.dtmplConfig,r=t.mainCode,o=t.serverKey,a=this.context.translate;if(!e)return null;e.buttons;var i,c=e.cQuerys;return c&&c.length>3&&(i=(0,m.Y)("div",{style:{width:"100px"},className:"btns"},(0,m.Y)(f.A,{direction:"vertical"},c.map((function(t,e){if(e>2)return(0,m.Y)(y.A,{serverKey:o,block:!0,key:t.id,mainCode:r,cQueryConfig:t})}))))),c&&c.length>0&&r?(0,m.Y)(h.A,{style:{position:"absolute",top:180,right:10,maxHeight:90},offsetTop:300},(0,m.Y)("div",{className:"submitButtonBar"},(0,m.Y)("ul",null,c?c.map((function(t,e){if(e<3)return(0,m.Y)("li",{key:e},(0,m.Y)(y.A,{serverKey:o,type:"text",block:!0,key:t.id,mainCode:r,cQueryConfig:t}))})):"",c&&c.length>2?(0,m.Y)(p.A,{placement:"leftTop",content:i,trigger:"hover"},(0,m.Y)(d.Ay,{block:!0},(0,m.Y)(v.A,null),a("${更多}"))):""))):""}}])}(s.PureComponent);(0,l.A)(A,"contextType",g.U),e.A=A},54040:function(t,e,r){"use strict";r.d(e,{A:function(){return v}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(99326),f=r(1026),h=r(17437);function p(t,e,r){return e=(0,i.A)(e),(0,a.A)(t,d()?Reflect.construct(e,r||[],(0,i.A)(t).constructor):e.apply(t,r))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}var v=function(t){function e(){var t;(0,n.A)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=p(this,e,[].concat(o)),(0,u.A)(t,"context",void 0),(0,u.A)(t,"scrollToAnchor",(function(e){if(e){var r=document.getElementById(t.props.parentId+e.id);r&&r.scrollIntoView({behavior:"smooth",block:"end"})}})),(0,u.A)(t,"scroll",(function(t){t.preventDefault(),t.stopPropagation();var e=document.getElementsByClassName("rightBar")[0];e&&(e.getElementsByTagName("ul")[0].style.marginTop="")})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this,e=this.props,r=e.dtmplConfig,n=e.positionRight,o=[],a=this.context.translate;return r&&r.groups.forEach((function(t){o.push({title:t.title,id:t.id})})),r&&r.premises&&r.premises.length>0&&o.push({id:r.premises[0].id,title:a("${默认字段}")}),o&&o.length>3?(0,h.Y)(s.A,{style:{position:"absolute",top:60,right:n},offsetTop:80},(0,h.Y)("div",{className:"rightBar",onScroll:this.scroll},(0,h.Y)("ul",null,o?o.map((function(e,r){return(0,h.Y)("li",{onClick:function(){return t.scrollToAnchor(e)},key:r},e.title)})):""))):""}}])}(l.PureComponent);(0,u.A)(v,"defaultProps",{positionRight:15}),(0,u.A)(v,"contextType",f.U)},84957:function(t,e,r){"use strict";r.d(e,{A:function(){return w}});var n=r(65425),o=r(38452),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(21348),p=r(28073),d=r(45038),v=r(17437),y=["placement","icon","content"];function g(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,m()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(m=function(){return!!t})()}var w=function(t){function e(){return(0,a.A)(this,e),g(this,e,arguments)}return(0,l.A)(e,t),(0,i.A)(e,[{key:"render",value:function(){var t=this.props,e=t.placement,r=t.icon,a=t.content,i=(0,o.A)(t,y);return a?(0,v.Y)(p.A,{placement:e,content:(0,v.Y)("div",{dangerouslySetInnerHTML:{__html:a}})},(0,v.Y)(d.Ay,(0,n.A)({},i,{icon:r||(0,v.Y)(h.A,null)}))):null}}])}(f.PureComponent);(0,s.A)(w,"defaultProps",{placement:"right",size:"small",type:"text"})},76390:function(t,e,r){"use strict";r.d(e,{A:function(){return J}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(69036),p=r(677),d=r(45038),v=r(37977),y=r(89467),g=r(40261),m=r(33748),w=r(80581),b=r(46704),A=r(33835),x=r(1849),k=r(92749),L=r(8130),C=r(73729),O=r(69068),E=r(54040),S=r(13050),Y=r(97823),j=r(78229),P=r(46935),I=r(45705),T=r(17437);function N(){N=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function _(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,D()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function D(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(D=function(){return!!t})()}var R=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t=_(this,e,[].concat(n)),(0,s.A)(t,"state",{loading:!0,id:"dtmplView"+L.A.getRandomNum(6),snapshotOpen:!1,dtmplData:void 0,premisesTitle:"默认字段",layout:{labelCol:{span:8},wrapperCol:{span:16}}}),(0,s.A)(t,"loadData",(0,o.A)(N().mark((function e(){var r,n,o,a,i,c,u,l;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.sourceId,o=r.code,a=r.versionId,i=r.serverKey,c=r.codeSource,(u=o)||!c){e.next=6;break}return e.next=5,k.A.queryCode(n,c,i);case 5:u=e.sent;case 6:if(!u){e.next=14;break}return t.setState({loading:!0,dtmplData:void 0}),e.next=10,k.A.requestViewDtmplData(i,n,u,a);case 10:l=e.sent,t.setState({dtmplData:l,loading:!1}),e.next=15;break;case 14:t.setState({loading:!1});case 15:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"fieldGroupList",(function(){var e=t.props,r=e.dtmplConfig,n=e.serverKey,o=e.mainCode,a=e.showRightNav,i=e.parentId,c=t.state,u=c.dtmplData,l=c.loading,s=c.id,f=[];return r&&(f=r.groups),f.map((function(t){if("embed"==t.type){if(!u)return;var e=void 0,c=j.A.getFieldValueCodeOfMstrucId(r,u.fieldMap,t.codeSourceFieldMstrucId),f=j.A.getFieldValueCodeOfMstrucId(r,u.fieldMap,t.pageSourceFieldMstrucId);if(!(f=f||t.pointSourceId))return null;if("列表"==t.embedType)return(0,T.Y)(p.A,{bodyStyle:{padding:0},bordered:!1,style:{width:a?"90%":"100%"}},(0,T.Y)(P.A,{readOnly:!0,serverKey:null,collapsible:!0,initCollapse:!1,title:t.title,mainCode:o,funcMode:"common",sourceId:f}));if("详情"==t.embedType)return e="listop",(0,T.Y)(S.A,{showRightNav:a,tip:t.tip,title:t.title,key:t.id,id:i+t.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:l,bodyStyle:{padding:"6px"}},(0,T.Y)(I.A,{showHeader:!1,codeSource:e,code:c,sourceId:f})," ");switch(t.embedType){case"编辑":e="listop";break;case"编辑或添加":e="new"}return(0,T.Y)(S.A,{showRightNav:a,tip:t.tip,title:t.title,key:t.id,id:i+t.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:l,bodyStyle:{padding:"6px"}},(0,T.Y)(I.A,{showHeader:!1,codeSource:e,code:c,sourceId:f})," ")}if("relation"!=t.type)return(0,T.Y)(S.A,{tip:t.tip,title:t.title,key:t.id,id:s+t.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:l},(0,T.Y)(O.A,{serverKey:n,fields:t.fields,valueMap:u?u.fieldMap:void 0,width:220}));if(t.fields){var h=void 0;return u&&(h=u.arrayMap[t.id]),(0,T.Y)(C.A,{serverKey:n,initCollapse:u&&(!h||h.length<=0),loading:l,parentId:s,key:t.id,fieldGroupConfig:t,value:h,viewOrEdit:"view"})}}))})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(n=(0,o.A)(N().mark((function t(){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,o.A)(N().mark((function t(e){var r,n,o,a,i,c;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=this.props).sourceId,n=r.code,o=r.versionId,a=r.refreshCode,i=e.code,e.versionId,c=e.refreshCode,!(n!=i||o&&o!=e.versionId||a&&a!=c)){t.next=5;break}return t.next=5,this.loadData();case 5:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.showRightNav,r=t.rightBarPositionRight,n=t.code,o=(t.sourceId,t.dtmplConfig),a=t.serverKey,i=this.state,c=i.premisesTitle,u=i.loading,l=i.dtmplData,s=(i.layout,i.snapshotOpen,i.id),f=o?o.premises:void 0;return o&&l?(0,T.Y)("div",null,this.fieldGroupList(),f&&f.length>0?(0,T.Y)(S.A,{title:c,key:c,id:s+f[0].id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:u},(0,T.Y)(O.A,{serverKey:a,fields:f})):"",e?(0,T.Y)(E.A,{parentId:s,positionRight:r,dtmplConfig:o}):"",(0,T.Y)(Y.A,{serverKey:a,dtmplConfig:o,mainCode:n})):(0,T.Y)(p.A,{loading:!0})}}]);var r,n}(f.PureComponent);(0,s.A)(R,"defaultProps",{showRightNav:!0});var F=R,G=r(1026);function M(){M=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function $(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,K()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function K(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(K=function(){return!!t})()}var B=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t=$(this,e,[].concat(n)),(0,s.A)(t,"state",{list:void 0,loading:!1,current:void 0}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"loadData",(0,o.A)(M().mark((function e(){var r,n,o,a,i,c;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.sourceId,o=r.code,r.showSnapshot,a=r.serverKey,i=t.state.current,!o){e.next=8;break}return t.setState({loading:!0}),e.next=6,k.A.requestVersionList(a,n,o);case 6:c=e.sent,t.setState({list:c,current:!i&&c.length>0?c[0].code:i,loading:!1});case 8:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"onChange",(function(e){var r=t.props.showSnapshot;t.setState({current:e}),r(e)})),(0,s.A)(t,"detailHistory",(function(){var e=t.state,r=e.list,n=e.current,o=t.context.translate;if(r.length>0)return r.map((function(e,r){var a=!!n&&e.code===n,i=a?"red":"blue";return(0,T.Y)(A.A.Item,{color:i,key:r},L.A.formateDate(e.time),(0,T.Y)("br",null),""+e.userName,a?"":(0,T.Y)(d.Ay,{style:{marginLeft:10},type:"primary",size:"small",onClick:function(){return t.onChange(e.code)}},o("${查看}")))}))})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(n=(0,o.A)(M().mark((function t(){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,o.A)(M().mark((function t(e){var r,n;return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.props.open,n=this.state.list,r&&!n&&this.loadData();case 3:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.open,r=t.onClose,n=t.dtmplConfig,o=t.sourceId,a=t.code,i=t.serverKey,c=this.state,u=c.list,l=c.current,s=this.context.translate;return(0,T.Y)(f.Fragment,null,(0,T.Y)(x.A,{title:s("${快照列表}"),closable:!0,onClose:r,open:e,width:350},u&&u.length>0?(0,T.Y)(A.A,{mode:"alternate"},this.detailHistory()):s("${暂无历史记录}")),(0,T.Y)(x.A,{placement:"left",title:s("${快照查看}"),closable:!0,mask:!1,onClose:r,open:e,width:"calc(100% - 380px)",style:{maxWidth:1960}},(0,T.Y)(F,{serverKey:i,showRightNav:!1,dtmplConfig:n,sourceId:o,code:a,versionId:l})))}}]);var r,n}(f.PureComponent);(0,s.A)(B,"defaultProps",{}),(0,s.A)(B,"contextType",G.U);var q=B,V=r(84957),U=r(22503);function H(){H=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function z(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,W()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function W(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(W=function(){return!!t})()}var Q=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t=z(this,e,[].concat(n)),(0,s.A)(t,"formRef",f.createRef()),(0,s.A)(t,"context",void 0),(0,s.A)(t,"state",{loading:!0,dtmplConfig:void 0,snapshotOpen:!1,premisesTitle:"默认字段",layout:{labelCol:{span:8},wrapperCol:{span:16}},refreshCode:void 0}),(0,s.A)(t,"doRefresh",(0,o.A)(H().mark((function e(){return H().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.setState({refreshCode:L.A.getRandomNum(6)});case 1:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"goEdit",(function(){var e=t.props;(0,e.goDtmpl)(e.code)})),(0,s.A)(t,"showSnapshot",(function(){t.setState({snapshotOpen:!0})})),(0,s.A)(t,"onSnapshotClose",(function(){t.setState({snapshotOpen:!1})})),(0,s.A)(t,"toSnapshot",(function(){})),(0,s.A)(t,"onSubmit",function(){var e=(0,o.A)(H().mark((function e(r){var n,o,a,i,c;return H().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),n=t.props,o=n.sourceId,a=n.code,i=n.serverKey,a&&(r["唯一编码"]=a),e.next=5,k.A.postDtmplData(i,o,r,h.Ay);case 5:c=e.sent,t.setState({loading:!1}),"success"===c.status&&t.doRefresh();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"doSubmit",(function(e,r,n){var o=t.props.mainCode;t.formRef.current.setFieldsValue({actionId:e}),o&&t.formRef.current.setFieldsValue({mainCode:o}),n&&t.formRef.current.setFieldsValue(n),t.formRef.current.submit()})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(r=(0,o.A)(H().mark((function t(){var e,r,n,o;return H().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.props,r=e.sourceId,n=e.serverKey,t.next=3,b.A.requestViewDtmplConfig(n,r);case 3:o=t.sent,this.setState({dtmplConfig:o});case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t,e=this,r=this.props,n=r.showRightNav,o=r.rightBarPositionRight,a=r.code,i=r.sourceId,c=r.goDtmpl,u=r.serverKey,l=r.codeSource,s=r.title,f=r.showHeader,h=this.state,b=h.dtmplConfig,A=(h.premisesTitle,h.loading,h.layout,h.snapshotOpen),x=h.refreshCode,k=this.context.translate,L=b?b.buttons:void 0,C=(b&&b.premises,n);return b&&b.groups.length<4&&(C=!1),(0,T.Y)("div",{className:"detailPage ".concat(C?"showRightNav":"noRightNav")},f?(0,T.Y)(p.A,{bordered:!1,size:"small",key:"detailTitle",className:"hoverable pageHeader"},(0,T.Y)("h3",null,k("${"+(s||"详情")+"}"),b?(0,T.Y)(V.A,{content:b.tip}):null,(0,T.Y)("div",{className:"fr"},L&&L.includes("dtmplEdit")&&c&&!b.editAction?(0,T.Y)(d.Ay,{className:"hoverbig",onClick:this.goEdit},(0,T.Y)(g.A,null)):"",null==b||null===(t=b.viewActions)||void 0===t?void 0:t.map((function(t){return(0,T.Y)(U.A,{serverKey:u,iconType:"icon-title",hiddenType:"disabled",key:t.id,formRef:e.formRef,actionConfig:t,doAction:e.doSubmit})})),L&&L.includes("history")?(0,T.Y)(v.A,{title:k("${数据快照}")},(0,T.Y)(d.Ay,{className:"hoverbig",onClick:this.showSnapshot},(0,T.Y)(m.A,null))):"",(0,T.Y)(d.Ay,{className:"hoverbig",title:k("${刷新}"),onClick:this.doRefresh},(0,T.Y)(w.A,null)),(0,T.Y)(q,{serverKey:u,dtmplConfig:b,code:a,onClose:this.onSnapshotClose,showSnapshot:this.toSnapshot,sourceId:i,open:A})))):null,(0,T.Y)(F,{codeSource:l,serverKey:u,refreshCode:x,showRightNav:C,rightBarPositionRight:o,dtmplConfig:b,sourceId:i,code:a}),(0,T.Y)(y.A,{scrollToFirstError:!0,labelWrap:!0,ref:this.formRef,name:"control-hooks",onFinish:this.onSubmit},(0,T.Y)(y.A.Item,{hidden:!0,name:"actionId"}),(0,T.Y)(y.A.Item,{hidden:!0,name:"mainCode"})))}}]);var r}(f.PureComponent);(0,s.A)(Q,"defaultProps",{showRightNav:!0,rightBarPositionRight:15,showHeader:!0}),(0,s.A)(Q,"contextType",G.U);var J=Q},69068:function(t,e,r){"use strict";r.d(e,{A:function(){return y}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(55957),f=r(74712),h=r(1026),p=r(17437);function d(t,e,r){return e=(0,i.A)(e),(0,a.A)(t,v()?Reflect.construct(e,r||[],(0,i.A)(t).constructor):e.apply(t,r))}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}var y=function(t){function e(t){var r;return(0,n.A)(this,e),r=d(this,e,[t]),(0,u.A)(r,"context",void 0),(0,u.A)(r,"initViewList",(function(){var t=r.props,e=t.fields,n=t.valueMap,o=t.serverKey,a=r.context.translate,i=[];return e.length>0&&e.forEach((function(t,e){t.title;var r=n?n[t.id]:void 0;if(r=r||(t.defaultValue?t.defaultValue:void 0),t.id,Math.random(),"hidden"!=t.extControlType&&!t.hidden){var c=(0,p.Y)(s.A.Item,{label:a("${"+t.title+"}"),span:t.colNum,key:e,className:"labelcss"},(0,p.Y)(f.A,{serverKey:o,holderType:"descriptions",value:r,fieldConfig:t}));i.push(c)}})),i})),r.state={fileList:[]},r}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){return(0,p.Y)(s.A,{column:2},this.initViewList())}}])}(l.PureComponent);(0,u.A)(y,"contextType",h.U)},22733:function(t,e,r){"use strict";r.d(e,{A:function(){return w}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(37187),f=r(45038),h=r(89467),p=r(76390),d=r(35880),v=r(1026),y=r(17437);function g(t,e,r){return e=(0,i.A)(e),(0,a.A)(t,m()?Reflect.construct(e,r||[],(0,i.A)(t).constructor):e.apply(t,r))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(m=function(){return!!t})()}var w=function(t){function e(){var t;(0,n.A)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=g(this,e,[].concat(o)),(0,u.A)(t,"context",void 0),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this.props,e=t.code,r=t.sourceId,n=t.serverKey,o=t.open,a=t.onCancel,i=t.height,c=this.context.translate;return(0,y.Y)(s.A,{open:o,title:c("${查看}"),width:"82vw",centered:!0,wrapClassName:"aaa",bodyStyle:{height:i,overflow:"auto"},onCancel:a,footer:[(0,y.Y)(f.Ay,{key:"back",onClick:a},c("${取消}"))]},(0,y.Y)(d.Ay,{autoHide:!0,autoHideTimeout:1e3},e?(0,y.Y)(p.A,{serverKey:n,showRightNav:!1,sourceId:r,code:e}):""))}}])}(l.PureComponent);(0,u.A)(w,"defaultProps",{showConfirm:!0,height:500,forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"},cancelText:"取消",form:h.A.useForm}),(0,u.A)(w,"state",{viewOrEdit:"view"}),(0,u.A)(w,"contextType",v.U)},11733:function(t,e,r){"use strict";var n=r(65425),o=r(50828),a=r(33227),i=r(96540),c=r(39356),u=r(89467),l=r(45038),s=r(36492),f=r(677),h=r(47152),p=r(16370),d=r(28392),v=r(16044),y=r(97135),g=r(22503),m=r(1490),w=r(94300),b=r(42877),A=r(17437);function x(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function k(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?x(Object(r),!0).forEach((function(e){(0,o.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}c.A.Panel;var L=u.A.Item,C=(new Date).getTime(),O=function(t){var e=(0,w.Y)().translate,r=t.ltmplConfig,o=t.doSearch,c=t.doAction,x=t.doJump,O=t.doDelete,E=t.selectedRows,S=t.data,Y=t.open,j=(t.loading,t.selectedDatas),P=t.doCQuery,I=t.serverKey,T=u.A.useForm(),N=(0,a.A)(T,1)[0],_=r.buttons,D=r.actions,R=r.jumps,F=r.cQuerys,G=r.criterias,M=r.drillingParams,$=r.columns,K=r.updrillButtonConfigs,B=r.innerParams,q={},V=(0,i.useState)(null),U=(0,a.A)(V,2),H=U[0],z=(U[1],(0,i.useState)(null)),W=(0,a.A)(z,2),Q=W[0];W[1],(0,i.useEffect)((function(){N.resetFields()}));var J=_.includes("query")&&o,X=_.includes("batchDelete")&&O,Z=!(E&&E.length>0),tt=function(r){if(r){var n=t.hiddenCriteriaIds,a=t.serverKey;return r.map((function(t){var e="c_"+t.id,r=S?S[e]:void 0;q[e]=r})),o?r.map((function(r){var o="c_"+r.id,i=S?S[o]:void 0;if(!n.includes(r.id))return(0,A.Y)(L,{label:e("${"+r.title+"}"),name:o,key:r.id,tooltip:r.tip,rules:r.required?[{required:!0,message:e("${请选择}"+r.title)}]:void 0},(0,A.Y)(y.A,{serverKey:a,mainCode:t.mainCode,value:i,fieldConfig:r}))})):void 0}};return(0,A.Y)(u.A,{form:N,name:"control-hooks",initialValues:q,layout:"inline",onFinish:function(t){var e=(new Date).getTime();o&&e-C>3e3&&(C=e,o(k(k({},t),{},{serial_number:C}))),o&&o(k(k({},t),{},{serial_number:C}))},style:{width:"100%"}},(0,A.Y)(f.A,{size:"small",style:{display:Y?"block":"none",width:"100%"}},(0,A.Y)(h.A,null,(0,A.Y)(p.A,null,(0,A.Y)(d.A,{size:"small",wrap:!0},J||K&&K.length>0?tt(B):null,_.includes("drilling")&&Y&&(M.length>0||($.forEach((function(t){if("dimension"==t.statColType)return!0})),0)||r.showDim)?(0,A.Y)(i.Fragment,null,tt(M),function(){var t="drillingColIds",o=[],a=[];$.forEach((function(t){"dimension"==t.statColType&&(a.push({label:t.title,value:t.id}),o.push(t.id))})),a.push({label:e("${无}"),value:"5"}),q[t]=S&&S[t]?S[t]:o;var i=S?S[t]:o,c={placeholder:e("${请选择}${维度}"),disabled:!1,value:i,style:{minWidth:220,width:"100%"}};return r.showDim?(0,A.Y)(L,{label:e("${维度}"),name:t,key:t,rules:[{required:!0,message:e("${请选择维度,上钻到顶层请只选[无]}")}]},(0,A.Y)(s.A,(0,n.A)({mode:"multiple"},c,{notFoundContent:e("${暂无选项}"),allowClear:!0,showSearch:!0,showArrow:!0,options:a}))):(0,A.Y)(u.A.Item,{hidden:!0,name:"drillingColIds"})}()):null,J||K&&K.length>0?tt(G):null,(0,A.Y)(d.A,{className:"btns"},J?(0,A.Y)(l.Ay,{type:"primary",htmlType:"submit"},e("${查询}")):"",X?(0,A.Y)(v.A,{placement:"rightBottom",title:e("${确定要[删除]选中数据吗}?"),onConfirm:function(){O()},okText:e("${确定}"),cancelText:e("${取消}"),okType:"danger"},(0,A.Y)(l.Ay,{danger:!0,disabled:Z},e("${删除选中}"))):"",function(){if(c&&D&&D.length>0)return D.map((function(t){var e=!0;return E&&(E.length>0&&t.multible||1==E.length)&&(e=!1),(0,A.Y)(g.A,{serverKey:I,hiddenType:"disabled",key:t.id,disabled:e,data:j,actionConfig:t,doAction:c,serial:1})}))}(),function(){if(x&&R&&R.length>0)return R.map((function(t){var e=!0;return E&&1==E.length&&(e=!1),(0,A.Y)(l.Ay,{key:t.id,onClick:function(){return x(t)},disabled:e},t.title)}))}(),function(){var e=t.serverKey;if(P&&F&&F.length>0)return F.map((function(t){var r=!0;return E&&1==E.length&&(r=!1),(0,A.Y)(m.A,{serverKey:e,key:t.id,disabled:r,cQueryConfig:t,mainCode:r?void 0:E[0].code})}))}(),function(){if(K&&K.length>0){var t=0;return K.map((function(r){return t++,(0,A.Y)(i.Fragment,null,1==t?(0,A.Y)(u.A.Item,{hidden:!0,name:"updrillButtonId"}):null,(0,A.Y)(l.Ay,{loading:Q==r.id,disabled:!(!Q||Q==r.id),icon:H==r.id?(0,A.Y)(b.A,null):null,type:r.buttonType,shape:r.buttonShape,htmlType:"submit",onClick:function(){N.setFieldValue("updrillButtonId",r.id),N.setFieldValue("drillingColIds",r.dimensions),N.submit()}},e("${"+r.title+"}")))}))}}()))))))};O.defaultProps={hiddenCriteriaIds:[],open:!0},e.A=O},70870:function(t,e,r){"use strict";r.d(e,{A:function(){return K}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(69036),p=r(89467),d=r(677),v=r(15039),y=r(45038),g=r(92749),m=r(43455),w=r(80581),b=r(69068),A=r(73729),x=r(13050),k=r(40403),L=r(84957),C=r(46704),O=r(8130),E=r(17437);function S(){S=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Y(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,j()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function j(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(j=function(){return!!t})()}var P=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t=Y(this,e,[].concat(n)),(0,s.A)(t,"formRef",f.createRef()),(0,s.A)(t,"state",{id:"EmbedDtmplEditPage"+O.A.getRandomNum(6),dtmplConfig:void 0,loading:!0,dtmplData:void 0}),(0,s.A)(t,"doSubmit",(function(e){var r=t.props.mainCode;t.formRef.current.setFieldsValue({actionId:e}),r&&t.formRef.current.setFieldsValue({mainCode:r}),t.formRef.current.submit()})),(0,s.A)(t,"loadConfigData",(0,o.A)(S().mark((function e(){var r,n,o,a,i,c,u,l,s;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.props,a=o.code,i=o.sourceId,c=o.serverKey,o.group,u=o.addTmplId,t.setState({loading:!0}),l=void 0,!a){e.next=9;break}return e.next=6,C.A.requestDtmplConfig(c,i,a);case 6:l=e.sent,e.next=12;break;case 9:return e.next=11,C.A.requestAddDtmplConfig(c,i,u);case 11:l=e.sent;case 12:if(null===(r=l)||void 0===r||!r.entity||(null===(n=l)||void 0===n||null===(n=n.entity)||void 0===n?void 0:n.code)!=a){e.next=18;break}s=l.entity,l.entity=void 0,t.setState({dtmplData:s,id:a,loading:!1}),e.next=20;break;case 18:return e.next=20,t.loadData(l);case 20:t.setState({dtmplConfig:l,loading:!1});case 21:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"loadData",function(){var e=(0,o.A)(S().mark((function e(r){var n,o,a,i,c,u,l,s;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,o=n.sourceId,a=n.code,i=n.defaultDtmplData,c=n.serverKey,u=n.codeSource,(l=a)||!u){e.next=6;break}return e.next=5,g.A.queryCode(o,u,c);case 5:l=e.sent;case 6:if(!l){e.next=14;break}return t.setState({loading:!0,dtmplData:void 0}),e.next=10,g.A.getDtmplData(r,c,o,l);case 10:s=e.sent,t.setState({dtmplData:s,id:l,loading:!1}),e.next=15;break;case 14:i?t.setState({dtmplData:i,loading:!1}):t.setState({dtmplData:{code:void 0,title:void 0,fieldMap:{},arrayMap:{}},loading:!1});case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(r=(0,o.A)(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadConfigData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var t=this.props,e=t.sourceId,r=t.serverKey,n=t.mainCode,o=t.onFinish,a=this.state,i=a.dtmplConfig,c=a.id,u=a.dtmplData;return(0,E.Y)(K,{serverKey:r,mainCode:n,parentId:c,dtmplConfig:i,formRef:this.formRef,onFinish:o,sourceId:e,dtmplData:u})}}]);var r}(f.PureComponent);(0,s.A)(P,"defaultProps",{});var I=r(46935),T=r(78229),N=r(45705),_=r(1026);function D(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return R(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function F(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function G(){G=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function M(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,$()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function $(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($=function(){return!!t})()}var K=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t=M(this,e,[].concat(n)),(0,s.A)(t,"fuseMode",!1),(0,s.A)(t,"premisestitle","默认字段"),(0,s.A)(t,"context",void 0),(0,s.A)(t,"state",{loading:!0,currentDtmplData:void 0,appDtmplConfig:void 0,embedForm:{},embedRefValue:{}}),(0,s.A)(t,"loadData",(0,o.A)(G().mark((function e(){var r,n,o,a,i,c,u,l,s;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.sourceId,o=r.code,a=r.formRef,i=r.dtmplData,c=r.dtmplConfig,u=r.serverKey,!o){e.next=8;break}return t.setState({loading:!0}),e.next=5,g.A.requestDtmplData(u,n,o,null);case 5:l=e.sent,e.next=9;break;case 8:l=i||{code:void 0,title:void 0,fieldMap:{},arrayMap:{}};case 9:s=k.vr.getAppDtmplConfig(c,i,t.props),t.setState({appDtmplConfig:s,currentDtmplData:l,loading:!1,embedRefValue:{}}),setTimeout((function(){return a.current?a.current.resetFields():void 0}),200);case 12:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"doRefresh",(0,o.A)(G().mark((function e(){var r;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.loadData();case 2:r=t.context.translate,h.Ay.info(r("${已刷新}!"));case 4:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"onGroupChange",(function(e,r){var n=t.state.currentDtmplData;n.arrayMap[e.id]=r;var o=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?F(Object(r),!0).forEach((function(e){(0,s.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},n);t.setState({currentDtmplData:o})})),(0,s.A)(t,"changeFuseMode",(function(e){t.fuseMode=!e})),(0,s.A)(t,"postForm",function(){var e=(0,o.A)(G().mark((function e(r){var n,o,a,i,c,u;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),n=t.props,o=n.sourceId,a=n.code,i=n.dtmplData,c=n.serverKey,a?r["唯一编码"]=a:i&&i.code&&(r["唯一编码"]=i.code),e.next=5,g.A.postDtmplData(c,o,r,h.Ay);case 5:u=e.sent,t.setState({loading:!1}),"success"===u.status&&t.props.onFinish(u.code);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"onSubmit",function(){var e=(0,o.A)(G().mark((function e(r){var n,o,a,i,c,u,l,s,f,h,p;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.props.dtmplConfig,o=t.state,a=o.currentDtmplData,i=o.appDtmplConfig,c=o.embedForm,u=o.embedRefValue,l=r,s=D(n.groups),e.prev=5,h=G().mark((function t(){var e,r,n;return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("embed"!=(e=f.value).type||"列表"==e.embedType){t.next=11;break}if(u[e.id]){t.next=7;break}return c[e.id].current.doSubmit(),t.abrupt("return",{v:void 0});case 7:r=T.A.getFieldId(i,e.codeSourceFieldMstrucId),l[r]=u[e.id];case 9:t.next=12;break;case 11:"relation"!=e.type||e.readOnly||(l["".concat(e.id,".$$flag$$")]=!0,(n=a.arrayMap[e.id])&&n.forEach((function(t,r){if(l["".concat(e.id,"[").concat(r,"].$$relation$$")]=t.relationLabel,t.editStatus&&"new"==t.editStatus){var n,o=D(e.fields);try{for(o.s();!(n=o.n()).done;){var a=n.value;l["".concat(e.id,"[").concat(r,"].").concat(a.id)]=t.fieldMap[a.id]}}catch(t){o.e(t)}finally{o.f()}}else if(t.editStatus&&"changed"==t.editStatus){l["".concat(e.id,"[").concat(r,"].唯一编码")]=t.code;var i,c=D(e.fields);try{for(c.s();!(i=c.n()).done;){var u=i.value;l["".concat(e.id,"[").concat(r,"].").concat(u.id)]=t.fieldMap[u.id]}}catch(t){c.e(t)}finally{c.f()}}else l["".concat(e.id,"[").concat(r,"].唯一编码")]=t.code})));case 12:case"end":return t.stop()}}),t)})),s.s();case 8:if((f=s.n()).done){e.next=15;break}return e.delegateYield(h(),"t0",10);case 10:if(!(p=e.t0)){e.next=13;break}return e.abrupt("return",p.v);case 13:e.next=8;break;case 15:e.next=20;break;case 17:e.prev=17,e.t1=e.catch(5),s.e(e.t1);case 20:return e.prev=20,s.f(),e.finish(20);case 23:return e.next=25,t.postForm(l);case 25:e.sent;case 26:case"end":return e.stop()}}),e,null,[[5,17,20,23]])})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"onEmbedPageFinish",(function(e,r){t.state.embedRefValue[e.id]=r,t.props.formRef.current.submit()})),(0,s.A)(t,"addHiddenItem",(function(t){if(t)return t.map((function(t){return(0,E.Y)(p.A.Item,{hidden:!0,name:t.id,initialValue:t.value})}))})),(0,s.A)(t,"fieldGroupList",(function(e,r){var n=t.props,o=n.parentId,a=n.maxColsOnRow,i=n.mainCode,c=n.formRef,u=n.serverKey,l=n.showRightNav,s=t.state,h=s.loading,p=s.embedForm,v=[];return e&&(v=e.groups),v.map((function(n){if("embed"==n.type){var s=void 0,v=T.A.getFieldValueCodeOfMstrucId(e,r.fieldMap,n.codeSourceFieldMstrucId),y=T.A.getFieldValueCodeOfMstrucId(e,r.fieldMap,n.pageSourceFieldMstrucId);if(!(y=y||n.pointSourceId))return null;if("列表"==n.embedType)return(0,E.Y)(d.A,{bodyStyle:{padding:0},bordered:!1,style:{width:l?"90%":"100%"}},(0,E.Y)(I.A,{serverKey:null,collapsible:!0,initCollapse:!1,title:n.title,mainCode:i,funcMode:"common",sourceId:y}));if("详情"==n.embedType)return s="listop",(0,E.Y)(x.A,{showRightNav:l,tip:n.tip,title:n.title,key:n.id,id:o+n.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:h,bodyStyle:{padding:"6px"}},(0,E.Y)(N.A,{showHeader:!1,codeSource:s,code:v,sourceId:y})," ");switch(p[n.id]=f.createRef(),n.embedType){case"编辑":s="listop";break;case"编辑或添加":s="new"}return(0,E.Y)(x.A,{showRightNav:l,tip:n.tip,title:n.title,key:n.id,id:o+n.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:h,bodyStyle:{padding:"6px"}},(0,E.Y)(P,{ref:p[n.id],onFinish:function(e){t.onEmbedPageFinish(n,e)},codeSource:s,code:v,sourceId:y})," ")}if("relation"!=n.type)return(0,E.Y)(x.A,{showRightNav:l,tip:n.tip,title:n.title,key:n.id,id:o+n.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:h,bodyStyle:{padding:"6px"}},(0,E.Y)(m.A,{serverKey:u,formRef:c,mainCode:i,maxColsOnRow:a,fields:n?n.fields:void 0,valueMap:r?r.fieldMap:void 0}));if(n.fields){var g=void 0;return r&&(g=r.arrayMap[n.id]),(0,E.Y)(A.A,{showRightNav:l,serverKey:u,mainCode:i||o,loading:h,parentId:o,key:n.id,fieldGroupConfig:n,value:g,viewOrEdit:n.readOnly?"view":"edit",onChange:t.onGroupChange})}}))})),(0,s.A)(t,"onValuesChange",(function(e,r){var n=t.props,o=n.onValuesChange,a=n.formRef,i=n.code,c=t.state,u=c.appDtmplConfig,l=c.currentDtmplData;u.onValuesChange&&u.onValuesChange(e,{code:i,fieldMap:r,arrayMap:l.arrayMap},a.current),o&&o()})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(n=(0,o.A)(G().mark((function t(){return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,o.A)(G().mark((function t(e){var r;return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=this.props).code,r.formRef,e.code,e==this.props){t.next=5;break}return t.next=5,this.loadData();case 5:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.formRef,r=t.dtmplConfig,n=t.code,o=t.parentId,a=t.showHeader,i=t.serverKey,c=t.dtmplData,u=this.state,l=u.currentDtmplData,s=u.appDtmplConfig,h=this.context.translate;if(!r||!c)return(0,E.Y)(d.A,{loading:!0},h("${加载中}"),"... ...");var g=s||{buttons:void 0,premises:void 0},m=g.buttons,A=g.premises;return(0,E.Y)(f.Fragment,null,a?(0,E.Y)(d.A,{bordered:!1,key:"detailTitle",className:"hoverable pageHeader"},(0,E.Y)("h3",null,n||l&&l.code?h("[${编辑}]"):h("[${新增}]"),r?(0,E.Y)(L.A,{content:r.tip}):null,(0,E.Y)("div",{className:"fr"},m&&m.includes("fusionMode")?(0,E.Y)(v.A,{checkedChildren:h("${开}"),unCheckedChildren:h("${关}"),style:{marginRight:10},title:h("${融合模式}"),onChange:this.changeFuseMode}):"",(0,E.Y)(y.Ay,{className:"hoverbig",title:h("${刷新}"),onClick:this.doRefresh},(0,E.Y)(w.A,null))))):null,(0,E.Y)(p.A,{scrollToFirstError:!0,labelWrap:!0,ref:e,name:"control-hooks",onValuesChange:this.onValuesChange,onFinish:this.onSubmit},(0,E.Y)(p.A.Item,{hidden:!0,name:"actionId"}),(0,E.Y)(p.A.Item,{hidden:!0,name:"mainCode"}),this.addHiddenItem(r.hiddenFields),this.fieldGroupList(s,l)),A&&A.length>0?(0,E.Y)(x.A,{title:this.premisestitle,key:this.premisestitle,id:o+A[0].id,className:"hoverable",headStyle:{background:"#f2f4f5"}},(0,E.Y)(b.A,{serverKey:i,fields:A})):"")}}]);var r,n}(f.PureComponent);(0,s.A)(K,"contextType",_.U),(0,s.A)(K,"defaultPorps",{maxCols:2,showHeader:!0,showRightNav:!1})},43455:function(t,e,r){"use strict";r.d(e,{A:function(){return A}});var n=r(42455),o=r(44274),a=r(2532),i=r(63549),c=r(91985),u=r(11504),l=r(50828),s=r(96540),f=r(89467),h=r(16370),p=r(47152),d=r(97135),v=r(8130),y=r(1026),g=r(17437);function m(t,e,r){return e=(0,c.A)(e),(0,i.A)(t,w()?Reflect.construct(e,r||[],(0,c.A)(t).constructor):e.apply(t,r))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}var b=f.A.Item,A=function(t){function e(t){var r;return(0,o.A)(this,e),r=m(this,e,[t]),(0,l.A)(r,"context",void 0),(0,l.A)(r,"isPromise",(function(t){return!!t&&("object"===(0,n.A)(t)||"function"==typeof t)&&"function"==typeof t.then})),(0,l.A)(r,"getMainCode",(function(t,e){var n=r.props.formRef;return t.mainCode?"function"==typeof t.mainCode?t.mainCode(n.current):t.mainCode:e})),(0,l.A)(r,"getFieldConfig",(function(t){var e=r.props.formRef;return t.updateSelf?t.updateSelf(e.current):t})),(0,l.A)(r,"initFormItem",(function(t,e){var n=r.props,o=n.nameAttr,a=n.maxColsOnRow,i=n.mainCode,c=n.serverKey,u=r.context.translate,l=r.getFieldConfig(t),s=l.title;return(0,g.Y)(b,{label:u("${"+l.title+"}"),hidden:l.hidden,name:l[o],key:l.id,labelCol:1==a||1==l.colNum?{span:6}:{span:3},wrapperCol:1==a?{span:18}:1==l.colNum?{span:15}:{span:19},tooltip:l.tip,initialValue:e,style:{margin:4},rules:l.required?[{required:!0,message:u("${请输入}${"+s+"}")}]:void 0},(0,g.Y)(d.A,{serverKey:c,mainCode:r.getMainCode(l,i),value:e,fieldConfig:l}))})),(0,l.A)(r,"initFormList",(function(){var t=r.props,e=t.fields,n=t.valueMap,o=t.nameAttr,a=t.maxColsOnRow,i=t.mainCode,c=t.serverKey,u=[];e&&e.length>0&&e.forEach((function(t,e){var a=n?n[t.id]:void 0;t.id,Math.random(),a=a||0==a?a:t.defaultValue?v.A.configParamTrans(t.defaultValue):void 0;var l;l="hidden"==t.extControlType?(0,g.Y)(b,{hidden:!0,initialValue:a,name:t[o],key:t.id},(0,g.Y)(d.A,{serverKey:c,mainCode:r.getMainCode(t,i),value:a,fieldConfig:t})):t.shouldUpdate?(0,g.Y)(b,{noStyle:!0,shouldUpdate:t.shouldUpdate},(function(){return r.initFormItem(t,a)})):r.initFormItem(t,a),u.push(l)}));for(var l=[],s=0;s<u.length;s+=1){var f=e[s].colNum;"hidden"==e[s].extControlType?f=0:a&&1==a&&(f=2);var y=(0,g.Y)(h.A,{key:s,span:12*f},u[s]);l.push(y)}return(0,g.Y)(p.A,{gutter:[16,8],key:1},l)})),r.state={fileList:[]},r}return(0,u.A)(e,t),(0,a.A)(e,[{key:"render",value:function(){return this.initFormList()}}])}(s.PureComponent);(0,l.A)(A,"defaultProps",{nameAttr:"id",maxColsOnRow:2}),(0,l.A)(A,"contextType",y.U)},40403:function(t,e,r){"use strict";r.d(e,{L:function(){return Ir},at:function(){return uo},L9:function(){return dn},F9:function(){return ro.A},Q0:function(){return ar},rV:function(){return hr},O4:function(){return Lo},Fj:function(){return o.A},YO:function(){return x.Y},$h:function(){return go},RW:function(){return xn},Hu:function(){return Ne},vr:function(){return n.A},n9:function(){return Cr},Rm:function(){return eo},bs:function(){return Yo.bs},Ym:function(){return ie.Y}});var n=r(8130),o=r(92749),a=r(42455),i=r(65425),c=r(38452),u=r(17636),l=r(44274),s=r(2532),f=r(63549),h=r(91985),p=r(11504),d=r(50828),v=r(96540),y=r(52120),g=r(45038),m=r(677),w=r(28392),b=r(8554),A=(r(71436),r(46704)),x=r(1026),k=r(17437),L=["title"];function C(){C=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function O(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return E(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function S(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Y()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Y=function(){return!!t})()}var j=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=S(this,e,[].concat(n)),(0,d.A)(t,"state",{l2Menus:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"intervals",[]),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(C().mark((function t(){var e,r,n,a,i=this;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.A.fastMenu("QuickQueryBar");case 2:if(!(e=t.sent)){t.next=23;break}r=O(e),t.prev=5,a=C().mark((function t(){var e,r,a;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=n.value).disabled){t.next=3;break}return t.abrupt("return",1);case 3:if(1!=e.displayTotal){t.next=11;break}return r=setInterval((0,u.A)(C().mark((function t(){var r;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.requestLtmplCount(null,e.id);case 2:r=t.sent,e.count=r,i.setState({});case 5:case"end":return t.stop()}}),t)}))),18e4),i.intervals.push(r),t.next=8,o.A.requestLtmplCount(null,e.id);case 8:a=t.sent,e.count=a,i.setState({});case 11:case"end":return t.stop()}}),t)})),r.s();case 8:if((n=r.n()).done){t.next=14;break}return t.delegateYield(a(),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("continue",12);case 12:t.next=8;break;case 14:t.next=19;break;case 16:t.prev=16,t.t1=t.catch(5),r.e(t.t1);case 19:return t.prev=19,r.f(),t.finish(19);case 22:this.setState({l2Menus:e});case 23:case"end":return t.stop()}}),t,this,[[5,16,19,22]])}))),function(){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){if(this.intervals.length>0){var t,e=O(this.intervals);try{for(e.s();!(t=e.n()).done;){var r=t.value;clearInterval(r)}}catch(t){e.e(t)}finally{e.f()}}this.intervals=[]}},{key:"render",value:function(){var t=this.props,e=(t.title,(0,c.A)(t,L)),r=this.state.l2Menus,n=this.context.translate,o=[];return r&&r.forEach((function(t){if(t.disabled)return null;var e=(0,k.Y)(y.A,{key:t.id,count:t.count},(0,k.Y)(g.Ay,{shape:"round",icon:(0,k.Y)(b.A,null),href:"#/".concat(t.id,"/act-table?menuId=").concat(t.id),size:"large"},t.title));o.push(e)})),(0,k.Y)(m.A,(0,i.A)({size:"small"},e,{title:n("${快速访问}")}),(0,k.Y)(w.A,{size:[16,16],wrap:!0},o))}}]);var r}(v.PureComponent);(0,d.A)(j,"contextType",x.U);var P=j,I=r(6544),T=r(82626),N=["title"];function _(){_=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function D(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return R(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function F(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,G()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function G(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(G=function(){return!!t})()}var M=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=F(this,e,[].concat(n)),(0,d.A)(t,"state",{l2Menus:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"intervals",[]),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(_().mark((function t(){var e,r,n,a,i=this;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.A.fastMenu("QuickPanel");case 2:if(!(e=t.sent)){t.next=23;break}r=D(e),t.prev=5,a=_().mark((function t(){var e,r,a;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=n.value).disabled){t.next=3;break}return t.abrupt("return",1);case 3:return r=setInterval((0,u.A)(_().mark((function t(){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.requestLtmplCount(null,e.id);case 2:r=t.sent,e.count=r,i.setState({});case 5:case"end":return t.stop()}}),t)}))),18e4),i.intervals.push(r),t.next=7,o.A.requestLtmplCount(null,e.id);case 7:a=t.sent,e.count=a,i.setState({});case 10:case"end":return t.stop()}}),t)})),r.s();case 8:if((n=r.n()).done){t.next=14;break}return t.delegateYield(a(),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("continue",12);case 12:t.next=8;break;case 14:t.next=19;break;case 16:t.prev=16,t.t1=t.catch(5),r.e(t.t1);case 19:return t.prev=19,r.f(),t.finish(19);case 22:this.setState({l2Menus:e});case 23:case"end":return t.stop()}}),t,this,[[5,16,19,22]])}))),function(){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){if(this.intervals.length>0){var t,e=D(this.intervals);try{for(e.s();!(t=e.n()).done;){var r=t.value;console.log("workbanch移除定时任务"),clearInterval(r)}}catch(t){e.e(t)}finally{e.f()}}this.intervals=[]}},{key:"render",value:function(){var t=this.props,e=t.title,r=(0,c.A)(t,N),n=this.state.l2Menus,o=this.context.translate,a=[];return n&&n.forEach((function(t){if(t.disabled)return null;var e=(0,k.Y)(m.A,{size:"small",key:t.id},(0,k.Y)(I.A,{prefix:(0,k.Y)(T.A,null),title:t.title,value:t.count}),(0,k.Y)(g.Ay,{style:{marginTop:12},href:"#/".concat(t.id,"/act-table?menuId=").concat(t.id)},o("${查看}")));a.push(e)})),(0,k.Y)(m.A,(0,i.A)({size:"small"},r,{title:e||o("${工作台}")}),(0,k.Y)(w.A,{size:[16,16],wrap:!0},a))}}]);var r}(v.PureComponent);(0,d.A)(M,"contextType",x.U);var $=M,K=(r(59090),r(19612)),B=r(49);function q(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,V()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function V(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(V=function(){return!!t})()}var U=B.A.Footer,H=function(t){function e(){return(0,l.A)(this,e),q(this,e,arguments)}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this.props.content;return(0,k.Y)(U,{style:{textAlign:"center"}},(0,k.Y)("div",{className:"footer"},t||"Enterprise Applications ©2022 Created by 旷识科技"))}}])}(v.Component),z=r(5131),W=r(47152),Q=r(16370),J=r(71371),X=r(76157),Z=r(31201),tt=r(76945),et=r(37977),rt=r(84976),nt=r(48287);function ot(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return at(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?at(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var it={getMenu:function(t,e){return t.l1Menus?this.toL1Menu(t.l1Menus,e,""):this.toSubMenu(t.items,e,"")},toL1Menu:function(t,e){var r,n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=[];return t&&t.map((function(t){r={key:t.id};var i=t.l2Menus;i&&(r.label=(0,nt.A)("${"+t.title+"}"),r.title=(0,nt.A)("${"+t.title+"}"),r.children=n.toSubMenu(i,e,o)),a.push(r)})),a},toSubMenu:function(t,e){var r,n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=[];return t&&t.map((function(t){r={key:t.id,title:(0,nt.A)("${"+t.title+"}")};var i=t.items;if(i)r.label=(0,nt.A)("${"+t.title+"}"),r.children=n.toSubMenu(i,e,o);else{var c=t;c.disabled?c.hiddenOnDisabled?r=null:(r.disabled=c.disabled,c.tip?r.label=(0,k.Y)(et.A,{placement:"top",title:(0,nt.A)("${"+c.tip+"}")},(0,nt.A)("${"+c.title+"}")):r.label=(0,nt.A)("${"+c.title+"}")):(r.label=n.toL2MenuTitle(c,e,o),r.path=c.path)}r&&a.push(r)})),a},getRoutePath:function(t,e,r){if(t){var n="act-table",o="";switch(t.pageType){case"列表":n="act-table";break;case"树":n="act-tree";break;case"添加":n="detail-edit",o="&codeSource=new";break;case"编辑":n="detail-edit",o="&codeSource=listop";break;case"编辑或添加":n="detail-edit",o="&codeSource=listop-new";break;case"详情":n="detail-view",o="&codeSource=listop"}return"".concat(e,"/").concat(t.id,"/").concat(n,"?menuId=").concat(t.id).concat(o).concat(r)}return null},toL2MenuTitle:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!t)return null;var o="/",a=t.customPath;a&&(a.startsWith("/")||a.startsWith("\\"))&&(o="");var i="";t.defaultCriteriaValue&&(i="&"+n.A.transQueryParamsToStr(t.defaultCriteriaValue));var c=a?"".concat(r,"/page/").concat(t.id).concat(o).concat(a,"?menuId=").concat(t.id):this.getRoutePath(t,r,i);return t.path=c,(0,k.Y)(rt.k2,{to:c,target:t.linkTarget?t.linkTarget:e},(0,nt.A)("${"+t.title+"}"))},findOpenId:function(t,e){var r=void 0;if(t.l1Menus){var n,o=ot(t.l1Menus);try{for(o.s();!(n=o.n()).done;){var a,i=n.value,c=ot(i.l2Menus);try{for(c.s();!(a=c.n()).done;)if(a.value.id==e)return r=i.id}catch(t){c.e(t)}finally{c.f()}}}catch(t){o.e(t)}finally{o.f()}}else{var u,l=ot(t.items);try{for(l.s();!(u=l.n()).done;){var s=u.value;if(s.items){var f,h=ot(s.items);try{for(h.s();!(f=h.n()).done;)if(f.value.id==e)return r=s.id}catch(t){h.e(t)}finally{h.f()}}else if(s.id==e)return r=s.id}}catch(t){l.e(t)}finally{l.f()}}return r}};function ct(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ut(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ut(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function lt(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,st()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function st(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(st=function(){return!!t})()}var ft=function(t){function e(t){var r;return(0,l.A)(this,e),r=lt(this,e,[t]),(0,d.A)(r,"context",void 0),(0,d.A)(r,"getSubMenu",(function(t){return it.getMenu(t,null)})),(0,d.A)(r,"findBlockId",(function(t,e){var r,n=void 0,o=ct(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a.l1Menus){var i,c=ct(a.l1Menus);try{for(c.s();!(i=c.n()).done;){var u,l=ct(i.value.l2Menus);try{for(l.s();!(u=l.n()).done;)if(u.value.id===e)return n=a.id}catch(t){l.e(t)}finally{l.f()}}}catch(t){c.e(t)}finally{c.f()}}else{var s,f=ct(a.items);try{for(f.s();!(s=f.n()).done;){var h,p=ct(s.value.items);try{for(p.s();!(h=p.n()).done;)if(h.value.id===e)return n=a.id}catch(t){p.e(t)}finally{p.f()}}}catch(t){f.e(t)}finally{f.f()}}}}catch(t){o.e(t)}finally{o.f()}return n})),r}return(0,p.A)(e,t),(0,s.A)(e,[{key:"computedBlocks",get:function(){var t=this.context.translate,e=JSON.parse(JSON.stringify(this.props.blocks));return e&&Array.isArray(e)&&e.forEach((function(e){e.title=t("${"+e.title+"}");var r=e.items;r&&Array.isArray(r)&&r.forEach((function(e){e.title=t("${"+e.title+"}")}))})),e}},{key:"menuItems",get:function(){var t=this,e=this.computedBlocks,r=[];return console.log(r),e.forEach((function(e){var n={className:"menu-item",key:e.id,children:t.getSubMenu(e)};n.label=(0,k.Y)(rt.k2,{to:t.getDefaultIndexPath(e),style:{color:"inherit",width:"100%",height:"100%",display:"block"}},e.title),r.push(n)})),r}},{key:"getDefaultIndexPath",value:function(t){return t.items?this.getDefaultIndexPath(t.items[0]):t.path}},{key:"render",value:function(){var t=this.props,e=t.currentBlockId,r=t.blocks,n=t.currentL2MenuId;if(t.activeColor,!r||r.length<1)return(0,k.Y)(v.Fragment,null);var o=e;return n&&!o&&(o=this.findBlockId(r,n)),o||(o=r.at(0).id),(0,k.Y)(tt.A,{mode:"horizontal",defaultSelectedKeys:[e,n],items:this.menuItems,selectedKeys:[e,n],style:{flex:1,minWidth:0}})}}])}(v.PureComponent);(0,d.A)(ft,"contextType",x.U);var ht=ft,pt=r(34267),dt=r(40562);function vt(){vt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function yt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return gt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function mt(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,wt()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wt=function(){return!!t})()}var bt=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=mt(this,e,[].concat(o)),(0,d.A)(t,"state",{messageBars:void 0,anyState:!1}),(0,d.A)(t,"renderMessageBar",(function(e){var r=t.props.backgroudColor,o=0,a={"--message-bar-backgroupd":r},i=(0,k.Y)(tt.A,{key:1},e.map((function(t,e){t.count&&(o+=t.count);var r="";return t.l2Menu.defaultCriteriaValue&&(r="&"+n.A.transQueryParamsToStr(t.l2Menu.defaultCriteriaValue)),(0,k.Y)(tt.A.Item,{key:e},(0,k.Y)(rt.k2,{to:"/".concat(t.l2Menu.id,"/act-table?menuId=").concat(t.l2Menu.id).concat(r)},t.l2Menu.title,(0,k.Y)(y.A,{count:t.count,overflowCount:99,offset:[2,-2],size:"small"})))})));if(e&&0!=e.length){if(1==e.length){var c=e[0],u=c.l2Menu,l="";return u.defaultCriteriaValue&&(l="&"+n.A.transQueryParamsToStr(u.defaultCriteriaValue)),(0,k.Y)("div",{className:"message-bar",style:a},(0,k.Y)("a",{href:u.customPath?"/page/".concat(u.id).concat(u.customPath,"?menuId=").concat(u.id):"#/".concat(u.id,"/act-table?menuId=").concat(u.id).concat(l),className:"head-example"},(0,k.Y)(y.A,{count:c.count,overflowCount:99,offset:[8,-2]},(0,k.Y)("span",{style:{fontSize:"20px",color:"#08c"}},(0,k.Y)(dt.A,null)))))}return(0,k.Y)(pt.A,{overlay:i,placement:"bottomCenter"},(0,k.Y)("div",{className:"message-bar",style:a},(0,k.Y)(y.A,{count:o,size:"small",overflowCount:99,offset:[6,0]},(0,k.Y)("span",{style:{fontSize:"20px",color:"#08c"}},(0,k.Y)(dt.A,null)))))}})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(vt().mark((function t(){var e,r,n,a,i,c=this;return vt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.A.fastMenu("MessageBar");case 2:if(e=t.sent,r=[],!e){t.next=23;break}n=yt(e),t.prev=6,i=vt().mark((function t(){var e,n,i;return vt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=a.value).disabled){t.next=3;break}return t.abrupt("return",1);case 3:return n={l2Menu:e,count:0},setInterval((0,u.A)(vt().mark((function t(){var r;return vt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.requestLtmplCount(null,e.id);case 2:r=t.sent,n.count=r,c.setState({anyState:!c.state.anyState});case 5:case"end":return t.stop()}}),t)}))),18e4),t.next=8,o.A.requestLtmplCount(null,e.id);case 8:i=t.sent,n.count=i,r.push(n);case 11:case"end":return t.stop()}}),t)})),n.s();case 9:if((a=n.n()).done){t.next=15;break}return t.delegateYield(i(),"t0",11);case 11:if(!t.t0){t.next=13;break}return t.abrupt("continue",13);case 13:t.next=9;break;case 15:t.next=20;break;case 17:t.prev=17,t.t1=t.catch(6),n.e(t.t1);case 20:return t.prev=20,n.f(),t.finish(20);case 23:this.setState({messageBars:r});case 24:case"end":return t.stop()}}),t,this,[[6,17,20,23]])}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state.messageBars;return(0,k.Y)(v.Fragment,null,t?this.renderMessageBar(t):"")}}]);var r}(v.PureComponent);(0,d.A)(bt,"defaultProps",{backgroudColor:"#4a5f74"});var At=bt,xt=r(1849),kt=r(1372),Lt=r(46935);function Ct(){Ct=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Ot(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Et(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Et(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function Et(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function St(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Yt()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Yt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Yt=function(){return!!t})()}var jt=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=St(this,e,[].concat(n)),(0,d.A)(t,"state",{quickBars:void 0,anyState:!1,currentId:void 0,showDraw:!1}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"showDraw",(function(e){t.setState({currentId:e,showDraw:!0})})),(0,d.A)(t,"closeDrawer",(function(){t.setState({showDraw:!1})})),(0,d.A)(t,"renderQuickBar",(function(e){var r={"--message-bar-backgroupd":t.props.backgroudColor},n=(0,k.Y)(tt.A,{key:1},e.map((function(e,r){return e.count&&e.count,(0,k.Y)(tt.A.Item,{key:r},(0,k.Y)("span",{onClick:function(){return t.showDraw(e.l2Menu.id)}},e.l2Menu.title))})));if(e&&0!=e.length){if(1==e.length){var o=e[0];return o.l2Menu,(0,k.Y)("div",{className:"message-bar",style:r,onClick:function(){return t.showDraw(o.l2Menu.id)}},(0,k.Y)("span",{style:{fontSize:"20px",color:"#08c"}},(0,k.Y)(kt.A,null)))}return(0,k.Y)(pt.A,{overlay:n,placement:"bottomCenter"},(0,k.Y)("div",{className:"message-bar",style:r},(0,k.Y)("span",{style:{fontSize:"20px",color:"#08c"}},(0,k.Y)(kt.A,null))))}})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(Ct().mark((function t(){var e,r,n,o,a,i;return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.A.fastMenu("QuickQueryBar");case 2:if(e=t.sent,r=[],!e){t.next=25;break}n=Ot(e),t.prev=6,n.s();case 8:if((o=n.n()).done){t.next=17;break}if(!(a=o.value).disabled){t.next=12;break}return t.abrupt("continue",15);case 12:i={l2Menu:a,count:0},r.push(i);case 15:t.next=8;break;case 17:t.next=22;break;case 19:t.prev=19,t.t0=t.catch(6),n.e(t.t0);case 22:return t.prev=22,n.f(),t.finish(22);case 25:this.setState({quickBars:r});case 26:case"end":return t.stop()}}),t,this,[[6,19,22,25]])}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state,e=t.quickBars,r=t.showDraw,n=t.currentId,o=this.context.translate;return(0,k.Y)(v.Fragment,null,e?this.renderQuickBar(e):"",(0,k.Y)(xt.A,{placement:"left",title:o("${快捷查询}"),closable:!0,mask:!1,onClose:this.closeDrawer,open:r,width:"calc(100% - 280px)",style:{maxWidth:1960},extra:(0,k.Y)(w.A,null,(0,k.Y)(g.Ay,{onClick:this.closeDrawer},"关闭"))},(0,k.Y)(Lt.A,{serverKey:null,sourceId:n})))}}]);var r}(v.PureComponent);(0,d.A)(jt,"defaultProps",{backgroudColor:"#4a5f74"}),(0,d.A)(jt,"contextType",x.U);var Pt=jt,It=r(66647),Tt=r(74336),Nt=r(26555),_t=r(87450),Dt=r(44920);function Rt(){Rt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Ft(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Gt()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gt=function(){return!!t})()}var Mt=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=Ft(this,e,[].concat(n)),(0,d.A)(t,"state",{showDraw:!1}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"showDraw",(function(){t.setState({showDraw:!0})})),(0,d.A)(t,"closeDrawer",(function(){t.setState({showDraw:!1})})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(Rt().mark((function t(){return Rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state.showDraw,e=this.props,r=e.gtmplSourceId,n=e.userCode,o=e.editable,a=this.context.translate;return(0,k.Y)(v.Fragment,null,n?(0,k.Y)(v.Fragment,null,(0,k.Y)("span",{onClick:this.showDraw},a("${个人信息}")),t?(0,k.Y)(Dt.A,{serverKey:null,editable:o,title:a("${个人信息}"),sourceId:r,open:t,code:n,onClose:this.closeDrawer}):null):null," ")}}]);var r}(v.PureComponent);(0,d.A)(Mt,"contextType",x.U),(0,d.A)(Mt,"defaultProps",{editable:!1});var $t=Mt,Kt=r(69036),Bt=r(89467),qt=r(17355),Vt=r(28073),Ut=r(75763);function Ht(){Ht=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function zt(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Wt()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wt=function(){return!!t})()}var Qt=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=zt(this,e,[].concat(n)),(0,d.A)(t,"state",{showPopover:!1,pubkey:void 0,loading:!1}),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"context",void 0),(0,d.A)(t,"handleSubmit",function(){var e=(0,u.A)(Ht().mark((function e(r){var n,a,i;return Ht().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.context.translate,t.setState({loading:!0}),a=t.state.pubkey,i=t.props.serverKey,e.next=6,o.A.resetPassword(i,r.oldPassword,r.newPassword,a);case 6:"success"==e.sent.status&&(Kt.Ay.info(n("${密码已重置,请重新登录}")),o.A.logout()),t.setState({loading:!1});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"handleBlurCapture",(function(){var e=t.context.translate,r=t.formRef.current.getFieldValue("newPassword"),n=t.formRef.current.getFieldValue("reNewPassword");r&&n&&r!=n?t.formRef.current.setFields([{name:"reNewPassword",value:n,errors:[e("${两次密码输入不一致}!")]}]):t.formRef.current.setFields([{name:"reNewPassword",value:n,errors:[]}])})),(0,d.A)(t,"getForm",(function(){var e=t.state.loading,r=t.context.translate;return(0,k.Y)(W.A,{justify:"center",align:"middle"},(0,k.Y)(Q.A,null,(0,k.Y)(Bt.A,{style:{width:350},ref:t.formRef,name:"normal_login",className:"login-form",onFinish:t.handleSubmit},(0,k.Y)(Bt.A.Item,{label:r("${原密码}"),name:"oldPassword",rules:[{required:!0,message:r("${请输入}${原密码}")}]},(0,k.Y)(qt.A.Password,{placeholder:r("${密码}"),prefix:(0,k.Y)(Ut.A,{className:"site-form-item-icon"})})),(0,k.Y)(Bt.A.Item,{label:r("${新设密码}"),name:"newPassword",rules:[{required:!0,message:r("${请输入}${新密码}!")}]},(0,k.Y)(qt.A.Password,{placeholder:r("${新设密码}"),onBlurCapture:t.handleBlurCapture,prefix:(0,k.Y)(Ut.A,{className:"site-form-item-icon"})})),(0,k.Y)(Bt.A.Item,{label:r("${确认密码}"),name:"reNewPassword",rules:[{required:!0,message:r("${请输入}${确认密码}")},function(t){var e=t.getFieldValue;return{validator:function(t,n){return n&&e("newPassword")!==n?Promise.reject(new Error(r("${两次密码输入不一致}!"))):Promise.resolve()}}}]},(0,k.Y)(qt.A.Password,{placeholder:r("${确认密码}"),prefix:(0,k.Y)(Ut.A,{className:"site-form-item-icon"})})),(0,k.Y)(Bt.A.Item,null,(0,k.Y)(W.A,{align:"middle",gutter:32},(0,k.Y)(Q.A,{span:12},(0,k.Y)(g.Ay,{style:{width:"100%"},type:"primary",loading:e,onClick:function(){return t.formRef.current.submit()}},r("${确定}"))),(0,k.Y)(Q.A,{span:12},(0,k.Y)(g.Ay,{style:{width:"100%"},onClick:function(){t.setState({showPopover:!1})}},r("${取消}"))))))))})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(Ht().mark((function t(){var e,r;return Ht().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.props.serverKey,t.next=3,o.A.getRasPubkey(e);case 3:r=t.sent,this.setState({pubkey:r});case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.state,r=e.showPopover,n=(e.loading,this.context.translate);return(0,k.Y)(v.Fragment,null,(0,k.Y)(Vt.A,{destroyTooltipOnHide:!0,open:r,overlayStyle:{maxWidth:"400px"},title:n("${修改密码}"),placement:"leftBottom",trigger:"click",content:this.getForm()},(0,k.Y)("span",{onClick:function(){t.setState({showPopover:!r})}},n("${修改密码}"))))}}]);var r}(v.PureComponent);(0,d.A)(Qt,"contextType",x.U);var Jt=Qt;function Xt(){Xt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Zt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function te(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ee(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,re()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(re=function(){return!!t})()}var ne=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=ee(this,e,[].concat(n)),(0,d.A)(t,"state",{id:void 0,name:void 0,roles:[],context:void 0,cleanCachable:!1,gtmplSourceId:void 0,changePasswordable:void 0,changePersonalInfoable:void 0,viewPersonalInfoable:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"cleanCache",(function(){var e=t.state.roles,r=document.getElementById("ajaxLoading");r.style.display="block",A.A.reload(e),r.style.display="none"})),(0,d.A)(t,"getContext",(function(){var e=t.state.context,r=t.context.translate;return e?(console.log("context",e),(0,k.Y)(v.Fragment,null,e.map((function(t){return(0,k.Y)(W.A,null,(0,k.Y)(Q.A,null,t.label," : ",t.content))})))):r("${无}")})),(0,d.A)(t,"toSetContext",(function(){window.location.hash="#/context-setter"})),(0,d.A)(t,"getTitle",(function(){var e=t.state,r=e.name,n=e.context;return(0,k.Y)(v.Fragment,null,(0,k.Y)("p",null,r),n?n.map((function(t){return(0,k.Y)("p",null,t.label," : ",t.content)})):null)})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(Xt().mark((function t(){var e,r;return Xt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.getUser();case 2:return e=t.sent,t.next=5,o.A.getContextSourceValue();case 5:r=t.sent,this.setState(te({context:r},e));case 7:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.backgroudColor,r=t.showUserInfo,n=t.showChangePassword,a=t.menu,i=this.state,c=i.name,u=i.context,l=i.cleanCachable,s=i.gtmplSourceId,f=i.changePasswordable,h=i.changePersonalInfoable,p=i.viewPersonalInfoable,d=i.id,y=this.context,g=y.translate,m=y.changeLocale,w=y.locale,b=y.availableLang,A={"--message-bar-backgroupd":e},x=[],L=[{label:(0,k.Y)("span",{onClick:function(){return m("fr")},style:"fr"===w?{color:e}:{}},"fr"),key:"fr"},{label:(0,k.Y)("span",{onClick:function(){return m("en")},style:"en"===w?{color:e}:{}},"en"),key:"en"}].filter((function(t){var e=t.key;return b.findIndex((function(t){return e===t}))>-1}));return L.unshift({label:(0,k.Y)("span",{onClick:function(){return m("zh")},style:"zh"===w?{color:e}:{}},"中文"),key:"zh"}),x.push({key:"locale",label:g("${切换语言}"),children:L}),c?(r&&p&&x.push({key:"1",label:(0,k.Y)($t,{gtmplSourceId:s,editable:h,userCode:d})}),u&&u.length>0&&x.push({key:"2",label:(0,k.Y)("span",{onClick:this.toSetContext},g("${全局配置}"))}),n&&f&&x.push({key:"3",label:(0,k.Y)(Jt,null)}),l&&x.push({key:"4",label:(0,k.Y)("span",{onClick:this.cleanCache},g("${清空缓存}"))}),x.push({key:"5",label:(0,k.Y)("span",{onClick:o.A.logout},(0,k.Y)(Tt.A,null)," ",g("${退出}"))})):x.push({key:"2",label:(0,k.Y)("span",{onClick:o.A.logout},(0,k.Y)(Nt.A,null)," ",g("${登录}"))}),(0,k.Y)(v.Fragment,null,(0,k.Y)(pt.A,{menu:a||{items:x},placement:"bottomRight",trigger:["click"]},(0,k.Y)("div",{className:"userLogin",style:te(te(te({},A),{display:"flex",justifyContent:"center",alignItems:"center"}),{},{height:55})},(0,k.Y)(et.A,{placement:"left",title:this.getTitle()},(0,k.Y)(It.A,{className:"loginAvatar",icon:(0,k.Y)(_t.A,null),size:"large"})))))}}]);var r}(v.PureComponent);(0,d.A)(ne,"contextType",x.U),(0,d.A)(ne,"defaultProps",{backgroudColor:"#4a5f74",showUserInfo:!0,showChangePassword:!0});var oe=ne,ae=r(82441),ie=r(94300),ce=z.A.useToken,ue=function(t){var e=ce().token,r=(0,ie.Y)(),n=r.getLocale,o=r.setLocale,a=r.availableLang;console.log(a);var c=[{label:(0,k.Y)("span",{style:"en"===n()?{color:e.colorPrimary}:{}},"en"),key:"en"},{label:(0,k.Y)("span",{style:"fr"===n()?{color:e.colorPrimary}:{}},"fr"),key:"fr"}].filter((function(t){var e=t.key;return a.findIndex((function(t){return e===t}))>-1}));return c.unshift({label:(0,k.Y)("span",{style:"zh"===n()?{color:e.colorPrimary}:{}},"中文"),key:"zh"}),(0,k.Y)(pt.A,{overlayClassName:"localeButton",menu:{items:c,onClick:function(t){var e=t.key;o(e)}}},(0,k.Y)(g.Ay,(0,i.A)({type:"primary",shape:"circle",icon:(0,k.Y)(ae.A,null)},t)))},le=B.A.Header,se=z.A.useToken,fe=function(t){var e=se().token,r=t.collapsed,n={"--antd-color-primary":e.colorPrimary};return(0,k.Y)(le,{style:{position:"sticky",top:0,zIndex:100,width:"100%",padding:0,height:"auto",minWidth:"760px"}},(0,k.Y)(W.A,{className:"header-top",style:n,wrap:!1,justify:"space-between"},(0,k.Y)(Q.A,{className:"header-col",style:{flex:1}},(0,k.Y)("div",{style:{float:"left"}},v.createElement(r?X.A:Z.A,{className:"trigger",onClick:function(){t.toggle()}})),(0,k.Y)("div",{className:"header-menu"},(0,k.Y)(ht,(0,i.A)({},t,{activeColor:e.colorPrimary})))),(0,k.Y)(Q.A,{style:{display:"flex",justifyContent:"center",alignItems:"center"}},(0,k.Y)("div",{className:"right-block"},(0,k.Y)(Pt,{backgroudColor:e.colorPrimary})),(0,k.Y)("div",{className:"right-block"},(0,k.Y)(At,{backgroudColor:e.colorPrimary})),(0,k.Y)("div",{className:"right-block"},(0,k.Y)(J.Ay,{theme:{components:{Button:{colorText:"rgb(0, 136, 204)",colorBgTextHover:"var(--antd-color-primary)"}}}},(0,k.Y)(ue,{shape:"default",size:"large",type:"text",style:{width:"100%",height:"100%",boxSizing:"border-box",padding:"0 10px",borderRadius:0}}))),(0,k.Y)("div",{className:"right-block",style:{width:80}},(0,k.Y)(oe,{backgroudColor:e.colorPrimary})))))},he=["blockMenu","collapsed","currentL2MenuId","basePath"];function pe(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,de()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function de(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(de=function(){return!!t})()}var ve=function(t){function e(t){var r;return(0,l.A)(this,e),r=pe(this,e,[t]),(0,d.A)(r,"context",void 0),(0,d.A)(r,"handleOpen",(function(t){t&&t.length>1&&t.splice(0,1),r.setState({openKeys:t})})),r.state={openKeys:[]},r}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:function(){var t=this.props,e=t.currentL2MenuId,r=t.blockMenu,n=(t.collapsed,this.state.openKeys),o=r?it.findOpenId(r,e):void 0;o&&n.length<1&&this.setState({openKeys:[o.toString()]})}},{key:"componentDidUpdate",value:function(t){var e=this.props,r=e.currentL2MenuId,n=e.blockMenu,o=(e.collapsed,t.currentL2MenuId),a=t.blockMenu;if(this.state.openKeys,a&&n&&n.id==a.id){var i=n?it.findOpenId(n,r):void 0,c=n?it.findOpenId(a,o):void 0;(!c&&i||i&&i!=c)&&this.setState({openKeys:[i]})}else{var u=n?it.findOpenId(n,r):void 0;u&&this.setState({openKeys:[u]})}}},{key:"computedBlockMenu",get:function(){var t=this.context.translate,e=JSON.parse(JSON.stringify(this.props.blockMenu));return e&&Array.isArray(e.items)&&e.items.forEach((function(e){return e.title=t("${"+e.title+"}"),e})),e}},{key:"render",value:function(){var t=this.props,e=t.blockMenu,r=t.collapsed,n=t.currentL2MenuId,o=t.basePath,a=(0,c.A)(t,he),u=this.state.openKeys,l=e?it.getMenu(this.computedBlockMenu,void 0,o):[];return a.title="",(0,k.Y)(tt.A,(0,i.A)({},a,{onOpenChange:this.handleOpen,selectedKeys:n?[n.toString()]:void 0,openKeys:r?void 0:u,items:l}))}}])}(v.PureComponent);(0,d.A)(ve,"contextType",x.U);var ye=ve,ge=r(35880),me=r(62070),we=z.A.useToken,be=function(t){var e=(0,ie.Y)().translate,r={"--logo-blue-background":we().token.colorPrimary},o=t.collapsed,a=t.header,c=t.collapsedHeader;return(0,k.Y)("div",null,(0,k.Y)(ge.Ay,{style:{height:"calc(100vh)"},autoHide:!0,autoHideTimeout:1e3},(0,k.Y)("div",{className:o?"logonly":"logo-blue",style:r},(0,k.Y)("a",{href:"#/home"},o?c?(0,k.Y)("div",{style:{overflow:"hidden",height:"56px",padding:"2px"}},c):t.logo?(0,k.Y)(me.A,{src:t.logo}):(0,k.Y)("h1",{style:{overflow:"hidden",height:"56px",paddingLeft:"-20px"}},"M"):a?(0,k.Y)("div",{style:{overflow:"hidden",height:"56px",padding:"2px"}},a):(0,k.Y)(v.Fragment,null,(0,k.Y)("h1",{style:{overflow:"hidden",height:"56px",paddingLeft:"-20px"}},(0,k.Y)(v.Fragment,null,t.logo?(0,k.Y)(me.A,{width:"30px",src:t.logo}):(0,k.Y)(v.Fragment,null),e(t.title?t.title:n.A.programName_NavLeft())))))),(0,k.Y)(ye,(0,i.A)({mode:"inline",theme:"light"},t))))},Ae=r(38093),xe=r.n(Ae),ke=r(33227),Le=r(47767),Ce=function(t){return function(e){var r=(0,Le.zy)(),n=(0,Le.Zp)(),o=(0,Le.g)(),a=(0,rt.ok)(),c=(0,ke.A)(a,2),u=c[0];return c[1],(0,k.Y)(t,(0,i.A)({},e,{location:r,navigate:n,params:o,searchParams:u}))}};function Oe(){Oe=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Ee(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Se(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Se(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function Se(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ye(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,je()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function je(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(je=function(){return!!t})()}var Pe=B.A.Content,Ie=B.A.Sider,Te=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=Ye(this,e,[].concat(o)),(0,d.A)(t,"scrollbarRef",v.createRef()),(0,d.A)(t,"state",{collapsed:!1,blocks:[],currentL2MenuId:void 0,currentBlockId:void 0,isImporter:!1,sideBartitle:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"findBlockTitle",(function(e){var r,o=t.state.blocks;if(e){var a,i=Ee(o);try{for(i.s();!(a=i.n()).done;){var c=a.value;if(c.id==e){r=c.title;break}}}catch(t){i.e(t)}finally{i.f()}}return(r?r+"-":"")+(n.A.programName()?n.A.programName():"HYDROCARBON")})),(0,d.A)(t,"findBlockIdOfL2Menu",(function(e){var r=void 0,n=t.state.blocks;if(e){var o,a=Ee(n);try{for(a.s();!(o=a.n()).done;){var i=o.value;if(i.l1Menus){var c,u=Ee(i.l1Menus);try{for(u.s();!(c=u.n()).done;){var l,s=Ee(c.value.l2Menus);try{for(s.s();!(l=s.n()).done;)if(l.value.id==e){r=i.id;break}}catch(t){s.e(t)}finally{s.f()}}}catch(t){u.e(t)}finally{u.f()}}else{var f,h=Ee(i.items);try{for(h.s();!(f=h.n()).done;){var p=f.value;if(p.items){var d,v=Ee(p.items);try{for(v.s();!(d=v.n()).done;)if(d.value.id==e){r=i.id;break}}catch(t){v.e(t)}finally{v.f()}}else if(p.id==e){r=i.id;break}}}catch(t){h.e(t)}finally{h.f()}}}}catch(t){a.e(t)}finally{a.f()}}return r})),(0,d.A)(t,"findCurrentBlock",(function(){var e=t.state,r=e.blocks,n=e.currentL2MenuId,o=e.currentBlockId,a=void 0;if(n){var i,c=Ee(r);try{for(c.s();!(i=c.n()).done;){var u=i.value;if(u.l1Menus){var l,s=Ee(u.l1Menus);try{for(s.s();!(l=s.n()).done;){var f,h=Ee(l.value.l2Menus);try{for(h.s();!(f=h.n()).done;)if(f.value.id==n){a=u;break}}catch(t){h.e(t)}finally{h.f()}}}catch(t){s.e(t)}finally{s.f()}}else{var p,d=Ee(u.items);try{for(d.s();!(p=d.n()).done;){var v=p.value;if(v.items){var y,g=Ee(v.items);try{for(g.s();!(y=g.n()).done;)if(y.value.id==n){a=u;break}}catch(t){g.e(t)}finally{g.f()}}else if(v.id==n){a=u;break}}}catch(t){d.e(t)}finally{d.f()}}}}catch(t){c.e(t)}finally{c.f()}}if(o&&!a){var m,w=Ee(r);try{for(w.s();!(m=w.n()).done;){var b=m.value;if(b.id===o){a=b;break}}}catch(t){w.e(t)}finally{w.f()}}return a||(a=r.at(0)),a})),(0,d.A)(t,"toggle",(function(){t.setState((function(e){return{collapsed:!t.state.collapsed}}))})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(o=(0,u.A)(Oe().mark((function t(){var e,r,n,o,a,i,c,u,l;return Oe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new URL(window.location.href),r=window.location.href.split("?")[1],n=new URLSearchParams("?"+r),o=n.get("blockId"),(a=n.get("menuId"))||(i=e.hash.match(/[\w]+\-[\d]+/))&&"menu"===(c=i[0].split("-"))[0]&&(a=c[1]),u=this.props.sideBartitle,t.next=9,A.A.requestBlocks(a||void 0,o||void 0);case 9:l=t.sent,this.setState((function(t){return{isImporter:e.hash.indexOf("/importer")>0,blocks:l&&l.blocks?l.blocks:[],currentL2MenuId:l?l.l2MenuId:null,currentBlockId:l?l.blockId:null,sideBartitle:u||(l?l.programName:null)}}));case 11:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,u.A)(Oe().mark((function t(e,r){var n,o,a,i,c,u,l,s,f,h,p;return Oe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new URL(window.location.href),o=window.location.href.split("?")[1],a=new URLSearchParams("?"+o),i=a.get("blockId"),c=a.get("menuId"),u=n.hash.indexOf("/importer")>0,r.isImporter!=u&&this.setState((function(t){return{isImporter:u}})),c||(l=n.hash.match(/[\w]+\-[\d]+/))&&"menu"===(s=l[0].split("-"))[0]&&(c=s[1]),f=this.state,h=f.currentL2MenuId,p=f.currentBlockId,c&&h!=c&&this.setState((function(t){return{currentL2MenuId:c}})),i||(i=this.findBlockIdOfL2Menu(c)),i&&p!=i&&this.setState((function(t){return{currentBlockId:i}}));case 12:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"render",value:function(){var t,e=this.props,r=e.footer,n=e.sideBarLogo,o=e.leftHeader,a=e.leftCollapsedHeader,c=this.state,u=c.collapsed,l=c.currentL2MenuId,s=c.currentBlockId,f=c.isImporter,h=c.sideBartitle,p=this.context.translate;return null===(t=this.scrollbarRef)||void 0===t||null===(t=t.current)||void 0===t||t.scrollToTop(),(0,k.Y)(ge.Ay,{ref:this.scrollbarRef,style:{height:"calc(100vh)"},autoHide:!0,autoHideTimeout:1e3},(0,k.Y)(xe(),{title:(f?p("${导入}-"):"")+this.findBlockTitle(s)},(0,k.Y)(B.A,null,(0,k.Y)(Ie,{theme:"light",style:{overflow:"auto",height:"100vh",position:"fixed",left:0,top:0,bottom:0},collapsed:u},(0,k.Y)(be,{header:o,collapsedHeader:a,title:p("${"+h+"}"),logo:n,blockMenu:this.findCurrentBlock(),currentL2MenuId:l,collapsed:u})),(0,k.Y)(B.A,{style:u?{background:"#fff",marginLeft:80}:{background:"#fff",marginLeft:200}},(0,k.Y)(fe,(0,i.A)({toggle:this.toggle},this.state)),(0,k.Y)(Pe,{style:{margin:"24px 16px 0",overflow:"initial",minHeight:"calc(100vh)",minWidth:760,paddingBottom:"8px"}},this.props.children),(0,k.Y)(H,{content:r})))))}}]);var r,o}(v.PureComponent);(0,d.A)(Te,"contextType",x.U);var Ne=Ce(Te),_e=r(21745),De=r(91196),Re=r(57529),Fe=r(7142),Ge=r(77829),Me=r(6754),$e=r(42652),Ke=r(80581),Be=r(77028),qe=r(40756),Ve=r(78602);function Ue(){Ue=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function He(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ze(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ze(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function We(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Qe()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Qe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qe=function(){return!!t})()}var Je=De.A.Group,Xe=["INFO","SUC","ERROR","WARN"],Ze=Re.A.Text,tr=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=We(this,e,[].concat(o)),(0,d.A)(t,"state",{maxMsgCount:100,inputMaxMsgCount:100,importStatus:"waitingFile",importFile:void 0,logs:[],percent:0,statusMsg:void 0,logSetterOpen:!1,showLogLevelList:[].concat(Xe),logSerialId:void 0,ltmplConfig:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"timerId",void 0),(0,d.A)(t,"handleUpload",(function(){var e=t.props,r=e.sourceId,n=e.serverKey,o=t.state.importFile,a=t.context.translate,i=new FormData;i.append("file",o),i.append("sourceId",r.toString()),K.A.super({url:"/v3/ltmpl/importer",serverKey:n,method:"POST",data:i},"formdata").then((function(e){"success"===e.status?(t.setState({importStatus:"importing"}),t.timerId=setInterval((function(){return t.handleStatus(e.importId)}),500)):(Kt.Ay.error(a("${失败}!"),5),t.setState({importStatus:"fail"}))}))})),(0,d.A)(t,"handleStopImport",(function(){t.setState({importStatus:"stop"})})),(0,d.A)(t,"handleStatus",(function(e){var r=t.props.serverKey,o=t.state,a=o.maxMsgCount,i=o.importStatus,c=o.logs,u=t.context.translate;K.A.super({url:"/v3/importer/status",serverKey:r,method:"GET",query:{importId:e,msgIndex:0,maxMsgCount:a,interrupted:"stop"==i}},"","none").then((function(e){var r=[];if("error"===e.status)clearInterval(t.timerId);else{if(e.messageSequence.messages){var o,l=He(e.messageSequence.messages);try{for(l.s();!(o=l.n()).done;){var s=o.value,f="",h="",p=n.A.formateDate(s.createTime);"SUC"===s.type?(f="green",h=u("${成功}")):"INFO"===s.type?(f="black",h=u("${常规}")):"ERROR"===s.type?(f="red",h=u("${错误}")):"WARN"===s.type&&(f="rgb(250, 225, 4)",h=u("${警告}"));var d=(0,k.Y)("div",null,(0,k.Y)("p",null,p),(0,k.Y)("p",{style:{color:f}},"【".concat(h,"】")+s.text));r.push({level:s.type,msg:d})}}catch(t){l.e(t)}finally{l.f()}}var v=Math.floor(e.current/e.totalCount*100);1==e.completed&&(t.timerId&&(clearInterval(t.timerId),t.timerId=void 0,Kt.Ay.success(u("${导入完成}!")),t.setState({})),v=100),"stop"==i&&clearInterval(t.timerId);var y=[].concat((0,_e.A)(c),r);y=y.length>a?y.slice(c.length-a):y,t.setState({statusMsg:e.message,percent:v,importStatus:100==v?"success":"importing",logs:y})}}))})),(0,d.A)(t,"onChangeShowLogLevelList",(function(e){t.setState({showLogLevelList:e})})),(0,d.A)(t,"fresh",(function(){})),(0,d.A)(t,"handleLogSetter",(function(){var e=t.state.inputMaxMsgCount,r=t.context.translate;t.setState({maxMsgCount:e,logSetterOpen:!1}),Kt.Ay.success(r("${设置成功}!"))})),(0,d.A)(t,"changeLogSetterOpen",(function(e){t.setState({logSetterOpen:e})})),(0,d.A)(t,"download",(function(){var e=t.props,r=e.sourceId,o=e.serverKey,a=n.A.hydrocarbonToken();n.A.downloadFile(n.A.joinPath(n.A.api(o),"/v3/ltmpl/importer/template?sourceId=".concat(r,"&@token=").concat(a,"&@programToken=").concat(n.A.programCode(o))),"导入模板")})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(Ue().mark((function t(){var e,r,n,o;return Ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.props,r=e.sourceId,n=e.serverKey,t.next=3,A.A.requestLtmplConfig(n,r);case 3:o=t.sent,this.setState({ltmplConfig:o.ltmplConfig});case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.timerId&&clearInterval(this.timerId)}},{key:"render",value:function(){var t,e=this,r=this.state,n=r.ltmplConfig,o=r.importFile,a=r.maxMsgCount,i=r.percent,c=r.importStatus,u=r.showLogLevelList,l=r.logSetterOpen,s=[],f=He(r.logs);try{for(f.s();!(t=f.n()).done;){var h=t.value;u.includes(h.level)&&s.push(h.msg)}}catch(t){f.e(t)}finally{f.f()}var p={accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/vnd.ms-excel",onChange:function(){},onRemove:function(t){e.setState({importFile:void 0,importStatus:"waitingFile",percent:0})},beforeUpload:function(t){return e.setState({percent:0,importFile:t,importStatus:"fileSelected"}),!1},fileList:o?[o]:void 0},d=this.context.translate,v=(0,k.Y)("div",null,(0,k.Y)("label",null,d("${日志消息数上限}: ")),(0,k.Y)(Fe.A,{defaultValue:a,onChange:function(t){return e.setState({inputMaxMsgCount:t})}}),(0,k.Y)(g.Ay,{type:"primary",style:{marginLeft:"10px"},onClick:this.handleLogSetter},d("${确定}: ")));return(0,k.Y)("div",{className:"importData"},(0,k.Y)("h3",null,d("${导入} -> "),n?n.title:"",(0,k.Y)("p",{className:"fr"},(0,k.Y)(g.Ay,{className:"hoverbig",title:d("${刷新}"),onClick:this.fresh},(0,k.Y)(Ke.A,null)))),(0,k.Y)(W.A,null,(0,k.Y)(Q.A,{span:14,offset:5},(0,k.Y)(m.A,{size:"small",style:{minWidth:600}},(0,k.Y)(w.A,null,(0,k.Y)(Ge.A,p,(0,k.Y)(g.Ay,{type:"primary"},(0,k.Y)(Be.A,null),d("${选择导入文件}"))),(0,k.Y)(g.Ay,{onClick:this.download},(0,k.Y)(qe.A,null),d("${下载导入模板}"))),(0,k.Y)(Me.A,{percent:i,size:"small",status:"active"}),(0,k.Y)("div",{className:"importBtns"},(0,k.Y)(w.A,null,(0,k.Y)(g.Ay,{type:"primary",onClick:this.handleUpload,disabled:!["fileSelected","stop"].includes(c),loading:"importing"==c},d("importing"==c?"${正在导入}":"stop"==c?"${重新导入}":"${开始导入}")),(0,k.Y)(g.Ay,{onClick:this.handleStopImport,disabled:"importing"!=c},d("${停止导入}")))),(0,k.Y)($e.A,{header:(0,k.Y)("div",{className:"listHeader"},(0,k.Y)("h4",null,d("${导入日志}")),(0,k.Y)("div",{className:"checks"},(0,k.Y)(Je,{value:u,onChange:this.onChangeShowLogLevelList},(0,k.Y)(De.A,{value:"INFO",className:"infoColor"},d("${常规}")),(0,k.Y)(De.A,{value:"SUC",className:"sucColor"},d("${成功}")),(0,k.Y)(De.A,{value:"ERROR",className:"errorColor"},d("${错误}")),(0,k.Y)(De.A,{value:"WARN",className:"warnColor"},d("${警告}"))),(0,k.Y)("div",{className:"btns"},(0,k.Y)(Vt.A,{content:v,title:d("${日志设置}"),trigger:"click",placement:"top",open:l,overlayStyle:{width:350},onOpenChange:this.changeLogSetterOpen},(0,k.Y)(g.Ay,{title:d("${日志设置}"),type:"primary",size:"small"},(0,k.Y)(Ve.A,null)))))),footer:(0,k.Y)(Ze,{type:"fail"==c||"stop"==c?"danger":"success"},c),bordered:!0,dataSource:s,renderItem:function(t){return(0,k.Y)($e.A.Item,null,t)},className:"importList"})))))}}]);var r}(v.PureComponent);function er(){er=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function rr(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,nr()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function nr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nr=function(){return!!t})()}(0,d.A)(tr,"contextType",x.U);var or=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=rr(this,e,[].concat(n)),(0,d.A)(t,"state",{}),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(er().mark((function t(){return er().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.params,r=t.serverKey,n=e.sourceId;return(0,k.Y)(tr,{serverKey:r,sourceId:n})}}]);var r}(v.PureComponent),ar=Ce(or),ir=r(88133);function cr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ur(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?cr(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function lr(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,sr()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function sr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(sr=function(){return!!t})()}var fr=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=lr(this,e,[].concat(n)),(0,d.A)(t,"goBackToLtmpl",(function(){var e=t.props.match.params.sourceId,r=t.props.basePath,n="".concat(r?r+"/":"","/").concat(e,"/act-table?menuId=").concat(t.getMenuId()),o=t.getMainCode();o&&(n+="&mainCode=".concat(o)),t.props.navigate(n)})),(0,d.A)(t,"getMainCode",(function(){return t.props.searchParams.get("mainCode")})),(0,d.A)(t,"getMenuId",(function(){return t.props.searchParams.get("menuId")})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this.props.params.pageName,e=this.props.location.search,r=n.A.transQueryStrToParams(e),o=n.A.getCustomPage("/"+t)||ir.A;return v.createElement(o,ur(ur({},this.props.params),{},{goBack:this.goBackToLtmpl},r))}}])}(v.PureComponent),hr=Ce(fr),pr=r(80112);function dr(t,e){return Math.round(Math.random()*(e-t)+t)}function vr(t,e){return t+e}function yr(t){return t*t}r(65560);var gr=(0,v.memo)((function(t){var e=t.width,r=void 0===e?320:e,n=t.height,o=void 0===n?160:n,a=t.l,i=void 0===a?42:a,c=t.r,u=void 0===c?9:c,l=t.imgUrl,s=t.text,f=t.refreshIcon,h=void 0===f?"http://cdn.dooring.cn/dr/icon12.png":f,p=t.visible,d=void 0===p||p,y=t.onDraw,g=t.onCustomVertify,m=t.onSuccess,w=t.onFail,b=t.onRefresh,A=(0,ie.Y)().translate,x=(0,v.useState)(!1),L=(0,ke.A)(x,2),C=L[0],O=L[1],E=(0,v.useState)(0),S=(0,ke.A)(E,2),Y=S[0],j=S[1],P=(0,v.useState)("sliderContainer"),I=(0,ke.A)(P,2),T=I[0],N=I[1],_=(0,v.useState)(s),D=(0,ke.A)(_,2),R=D[0],F=D[1],G=(0,v.useRef)(null),M=(0,v.useRef)(null),$=(0,v.useRef)(null),K=(0,v.useRef)(!1),B=(0,v.useRef)([]),q=(0,v.useRef)(0),V=(0,v.useRef)(0),U=(0,v.useRef)(0),H=(0,v.useRef)(0),z=Math.PI,W=i+2*u+3,Q=function(t,e,r,n){t.beginPath(),t.moveTo(e,r),t.arc(e+i/2,r-u+2,u,.72*z,2.26*z),t.lineTo(e+i,r),t.arc(e+i+u-2,r+i/2,u,1.21*z,2.78*z),t.lineTo(e+i,r+i),t.lineTo(e,r+i),t.arc(e+u-2,r+i/2,u+.4,2.76*z,1.24*z,!0),t.lineTo(e,r),t.lineWidth=2,t.fillStyle="rgba(255, 255, 255, 0.7)",t.strokeStyle="rgba(255, 255, 255, 0.7)",t.stroke(),t.globalCompositeOperation="destination-over","fill"===n?t.fill():t.clip()},J=function(){return l||"https://picsum.photos/id/".concat(dr(0,1084),"/").concat(r,"/").concat(o)},X=function(){var t=G.current.getContext("2d"),e=M.current.getContext("2d");j(0),N("sliderContainer"),M.current.width=r,M.current.style.left="0px",t.clearRect(0,0,r,o),e.clearRect(0,0,r,o),O(!0),$.current.setSrc(J())},Z=function(){var t=B.current,e=t.reduce(vr)/t.length,r=t.map((function(t){return t-e})),n=Math.sqrt(r.map(yr).reduce(vr)/t.length),o=parseInt(M.current.style.left);return{spliced:Math.abs(o-U.current)<10,verified:0!==n,left:o,destX:U.current}},tt=function(t){q.current=t.clientX||t.touches[0].clientX,V.current=t.clientY||t.touches[0].clientY,K.current=!0},et=function(t){if(!K.current)return!1;t.preventDefault();var e=t.clientX||t.touches[0].clientX,n=t.clientY||t.touches[0].clientY,o=e-q.current,a=n-V.current;if(o<0||o+38>=r)return!1;j(o);var i=(r-40-20)/(r-40)*o;M.current.style.left=i+"px",N("sliderContainer sliderContainer_active"),B.current.push(a),y&&y(i)},rt=function(t){if(!K.current)return!1;if(K.current=!1,(t.clientX||t.changedTouches[0].clientX)===q.current)return!1;N("sliderContainer");var e=g?g(Z()):Z(),r=e.spliced,n=e.verified;r?n?(N("sliderContainer sliderContainer_success"),"function"==typeof m&&m()):(N("sliderContainer sliderContainer_fail"),F(A("${请再试一次}")),X()):(N("sliderContainer sliderContainer_fail"),"function"==typeof w&&w(),setTimeout(X.bind(void 0),1e3))};return(0,v.useEffect)((function(){d&&($.current?X():function(){O(!0);var t=function(t){var e=new Image;return e.crossOrigin="Anonymous",e.onload=t,e.onerror=function(){e.setSrc(J())},e.setSrc=function(t){if(window.navigator.userAgent.indexOf("Trident")>-1){var r=new XMLHttpRequest;r.onloadend=function(t){var r=new FileReader;r.readAsDataURL(t.target.response),r.onloadend=function(t){var r;e.src=null==t||null===(r=t.target)||void 0===r?void 0:r.result}},r.open("GET",t),r.responseType="blob",r.send()}else e.src=t},e.setSrc(J()),e}((function(){O(!1),function(t){var e=G.current.getContext("2d"),n=M.current.getContext("2d");U.current=dr(W+10,r-(W+10)),H.current=dr(10+2*u,o-(W+10)),Q(e,U.current,H.current,"fill"),Q(n,U.current,H.current,"clip"),e.drawImage(t,0,0,r,o),n.drawImage(t,0,0,r,o);var a=H.current-2*u-1,i=n.getImageData(U.current-3,a,W,W);M.current.width=W,n.putImageData(i,0,a)}(t)}));$.current=t}())}),[d]),(0,k.Y)("div",{className:"vertifyWrap",style:{width:r+"px",margin:"0 auto",display:d?"":"none",background:"white"},onMouseMove:et,onMouseUp:rt,onTouchMove:et,onTouchEnd:rt},(0,k.Y)("div",{className:"canvasArea"},(0,k.Y)("canvas",{ref:G,width:r,height:o}),(0,k.Y)("canvas",{ref:M,className:"block",width:r,height:o,onMouseDown:tt,onTouchStart:tt})),(0,k.Y)("div",{className:T,style:{pointerEvents:C?"none":"auto",width:r+"px"}},(0,k.Y)("div",{className:"sliderMask",style:{width:Y+"px"}},(0,k.Y)("div",{className:"slider",style:{left:Y+"px"},onMouseDown:tt,onTouchStart:tt},(0,k.Y)("div",{className:"sliderIcon"},"→"))),(0,k.Y)("div",{className:"sliderText"},R)),(0,k.Y)("div",{className:"refreshIcon",onClick:function(){X(),"function"==typeof b&&b()},style:{backgroundImage:"url(".concat(h,")")}}),(0,k.Y)("div",{className:"loadingContainer",style:{width:r+"px",height:o+"px",display:C?"":"none"}},(0,k.Y)("div",{className:"loadingIcon"})))}));function mr(){mr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function wr(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,br()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function br(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(br=function(){return!!t})()}var Ar=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=wr(this,e,[].concat(n)),(0,d.A)(t,"state",{username:"",password:"",loading:!0,needKaptcha:!1,kaptchaImg:null,kaptchaToken:null,pubkey:void 0,vertify:!1,showSlideVertify:!1}),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"context",void 0),(0,d.A)(t,"componentDidMount",(0,u.A)(mr().mark((function e(){var r,n;return mr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.programCode,window.removeEventListener("keydown",t.handleKeyDown),e.next=4,o.A.getRasPubkey(null,r);case 4:n=e.sent,t.setState({pubkey:n,loading:!1});case 6:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"getKaptchaToken",(0,u.A)(mr().mark((function e(){var r,n,a;return mr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.programCode,e.next=3,o.A.getKaptchaToken(r);case 3:(n=e.sent)&&(a=n.img&&0==n.img.indexOf("data:")?n.img:"data:image/png;base64,".concat(n.img),t.setState({kaptchaImg:a,kaptchaToken:n.kaptchaToken,needKaptcha:!0}));case 5:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"handleSubmit",(0,u.A)(mr().mark((function e(){var r,n,a,i,c;return mr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),r=t.state,n=r.kaptchaToken,a=r.pubkey,i=r.needKaptcha,c=r.vertify,e.next=4,t.formRef.current.validateFields().then(function(){var e=(0,u.A)(mr().mark((function e(r){var u,l,s;return mr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i||c){e.next=2;break}return e.abrupt("return",t.setState({showSlideVertify:!0}));case 2:return u=t.props.programCode,l={username:r.username,password:r.password},e.next=6,o.A.login(l,n,r.kaptchaText,a,u);case 6:if("success"!==(s=e.sent).status){e.next=11;break}t.props.onFinish(s.token),e.next=15;break;case 11:if("error"!==s.status){e.next=15;break}return t.setState({needKaptcha:!0,vertify:!1}),e.next=15,t.getKaptchaToken();case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(t){}));case 4:t.setState({loading:!1});case 5:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"handleKeyDown",(function(e){13===e.keyCode&&t.handleSubmit()})),(0,d.A)(t,"changeKaptcha",function(){var e=(0,u.A)(mr().mark((function e(r){return mr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getKaptchaToken();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this,e=this.state,r=e.loading,n=(e.needKaptcha,e.kaptchaImg,e.showSlideVertify),o=this.props.autoSaveUser,a=void 0===o||o,i=this.context.translate;return(0,k.Y)(v.Fragment,null,(0,k.Y)(Bt.A,{style:{width:350},ref:this.formRef,name:"normal_login",initialValues:{remember:!0}},this.props.title,(0,k.Y)(Bt.A.Item,{name:"username",rules:[{required:!0,message:i("${请输入}${用户名}!")},{max:30,min:0,message:i("${请输入}${0-30个字符}!")}]},(0,k.Y)(qt.A,{prefix:(0,k.Y)(_t.A,{className:"site-form-item-icon"}),placeholder:i("${用户名}"),autoComplete:a?"on":"off"})),(0,k.Y)(Bt.A.Item,{name:"password",rules:[{required:!0,message:i("${请输入}${密码}!")}]},(0,k.Y)(qt.A,{style:a?{}:{"-webkit-text-security":"disc"},type:a?"password":"text",placeholder:i("${密码}"),onKeyDown:this.handleKeyDown,autoComplete:a?"on":"off",prefix:(0,k.Y)(Ut.A,{className:"site-form-item-icon"})})),(0,k.Y)(Bt.A.Item,null,(0,k.Y)(g.Ay,{type:"primary",style:{width:"100%"},loading:r,onClick:this.handleSubmit},i("${登录}")))),n?(0,k.Y)("div",{style:{width:"100%",height:"100%",background:"white"}},(0,k.Y)(gr,{onSuccess:function(){return t.setState({vertify:!0,showSlideVertify:!1},(function(){return t.handleSubmit()}))},onFail:function(){return t.setState({vertify:!1,showSlideVertify:!0})}})):(0,k.Y)(v.Fragment,null))}}])}(v.PureComponent);(0,d.A)(Ar,"contextType",x.U);var xr=Ar,kr=z.A.useToken,Lr=function(t){var e=kr().token,r=t.params,o=t.autoSaveUser,a=t.centerStyle,i=t.themePosition,c=t.theme,u=(0,ie.Y)().translate;n.A.setProgramCode4RoutePath(r);var l=function(){return(0,k.Y)(xr,{onFinish:function(t){A.A.clear(),window.location.hash="#/context-setter",n.A.setHydrocarbonToken(t)},title:(0,k.Y)("h3",null,u("${欢迎登录}")),autoSaveUser:o})};return(0,k.Y)(W.A,{justify:"center",align:"middle",className:"login-blue",style:"center"==i?a:{background:e.colorPrimary}},i?"left"==i?(0,k.Y)(v.Fragment,null,(0,k.Y)(Q.A,{span:12},c),(0,k.Y)(Q.A,{span:12},l()," ")):"center"==i?(0,k.Y)(v.Fragment,null,(0,k.Y)(Q.A,{span:24},l()," ")):void 0:(0,k.Y)(v.Fragment,null,(0,k.Y)(Q.A,null,l())))},Cr=Ce((function(t){return(0,k.Y)("div",{style:{position:"relative",width:"100%",height:"100%"}},(0,k.Y)("div",{style:{position:"absolute",top:"10px",right:"10px",zIndex:"10000"}},(0,k.Y)(ue,{size:"large"})),(0,k.Y)(Lr,t))})),Or=r(37187),Er=r(97135);function Sr(){Sr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Yr(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,jr()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function jr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jr=function(){return!!t})()}var Pr=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=Yr(this,e,[].concat(n)),(0,d.A)(t,"state",{loading:!1,config:null,context:null}),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"context",void 0),(0,d.A)(t,"handleSubmit",(0,u.A)(Sr().mark((function e(){var r;return Sr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),r=t.state.config,e.next=4,t.formRef.current.validateFields().then(function(){var t=(0,u.A)(Sr().mark((function t(e){var n;return Sr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={},r.forEach((function(t){n[t.id]=e[t.id]})),t.next=4,o.A.setContext(n);case 4:t.sent;case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){}));case 4:t.setState({loading:!1});case 5:case"end":return e.stop()}}),e)})))),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(n=(0,u.A)(Sr().mark((function t(){var e,r;return Sr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.getContextSourceConfig();case 2:return e=t.sent,t.next=5,o.A.getContextSourceValue();case 5:if(r=t.sent,e&&0!=e.length){t.next=10;break}return e=[],window.location.hash="#/home",t.abrupt("return");case 10:this.setState({config:e,context:r,loading:!1});case 11:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,u.A)(Sr().mark((function t(e){return Sr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.context.translate,e=this.state,r=e.config,n=e.loading,o=e.context,a=this.props.serverKey;return(0,k.Y)(Or.A,{title:t("${全局配置}"),closable:!1,open:!0,footer:[]},(0,k.Y)(W.A,{justify:"center",align:"middle"},(0,k.Y)(Q.A,null,(0,k.Y)(Bt.A,{style:{width:350},ref:this.formRef,name:"normal_login",className:"login-form",initialValues:{remember:!0}},r?r.map((function(t){var e=null;return o&&o.forEach((function(r){r.moduleName==t.moduleName&&(e=r.selectedValues)})),(0,k.Y)(Bt.A.Item,{name:t.id,initialValue:e,rules:[{required:!0,message:"请选择"+t.title}]},(0,k.Y)(Er.A,{serverKey:a,id:"14",fieldConfig:{id:t.groupId,title:t.title,controlType:"entity-select",max:"1",required:!0,sourceId:t.groupId,suppleOptions:t.canNotSet?[{code:"all",title:"不设置"}]:void 0}}))})):null,(0,k.Y)(Bt.A.Item,null,(0,k.Y)(g.Ay,{type:"primary",style:{width:"100%"},loading:n,onClick:this.handleSubmit,className:"login-form-button"},t("${确定}")))))))}}]);var r,n}(v.PureComponent);(0,d.A)(Pr,"defaultProps",{}),(0,d.A)(Pr,"contextType",x.U);var Ir=Ce(Pr),Tr=r(17308),Nr=r(70870),_r=r(14378),Dr=["resultStatus"],Rr=function(t){var e=t.resultStatus,r=void 0===e?"success":e,n=(0,c.A)(t,Dr),o=n.title,a=n.open,i=n.subtitle,u=n.goAdd,l=n.goEdit,s=n.goList,f=n.jumpTypes,h=n.addOrUpdate,p=(0,ie.Y)().translate;return(0,k.Y)(Or.A,{title:o||p("${保存提示}"),open:a,closable:!1,destroyOnClose:!0,footer:[],bodyStyle:{height:430,overflow:"auto"},width:560,maskClosable:!0},(0,k.Y)(_r.Ay,{status:r,title:p("success"===r?"${保存成功}":"${保存失败}"),subTitle:i,extra:[u&&f&&f.includes("add")?(0,k.Y)(g.Ay,{key:"goOnAdd",onClick:function(){return u()}},p("update"===h?"${转添加}":"${继续添加}")):void 0,l&&f&&f.includes("edit")?(0,k.Y)(g.Ay,{type:"primary",key:"goOnEdit",onClick:function(){return l()}},p("update"===h?"${继续编辑}":"${编辑实体}")):"",s&&f&&f.includes("list")?(0,k.Y)(g.Ay,{type:"primary",key:"onBackList",onClick:function(){return s()}},p("${返回列表}")):""]}))},Fr=r(54040),Gr=r(62477),Mr=r(99326),$r=r(43903),Kr=r(50329),Br=r(22503);function qr(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Vr()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Vr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vr=function(){return!!t})()}var Ur=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=qr(this,e,[].concat(n)),(0,d.A)(t,"state",{}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"calcOffsetBottom",(function(t,e){var r=0;return e&&(r+=e.length),t&&t.includes("dtmplSave")&&(r+=1),r>=3?120:2==r?86:80})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){(0,Gr.A)(this.state);var t,e=this.props,r=e.dtmplConfig,n=e.doSubmit,o=e.formRef,a=e.serial,i=e.serverKey,c=e.dtmplData,u=r.buttons,l=r.actions,s=[],f=this.context.translate;return r.premises&&r.premises.length>0&&s.push({id:"1",title:f("${默认字段}")}),r.groups.forEach((function(t){s.push({title:t.title,id:t.id})})),l&&l.length>1&&(t=(0,k.Y)("div",{className:"btns"},l.map((function(t,e){if(e>1)return(0,k.Y)(Br.A,{serverKey:i,data:[c],iconType:"icon-title",hiddenType:"disabled",buttonType:"primary",serial:a,key:t.id,formRef:o,actionConfig:t,doAction:n})})))),(0,k.Y)(Mr.A,{style:{position:"absolute",bottom:60,right:15},offsetBottom:this.calcOffsetBottom(u,l)},(0,k.Y)("div",{className:"submitButtonBar"},(0,k.Y)("ul",null,u.includes("dtmplSave")?(0,k.Y)("li",{key:100},(0,k.Y)(g.Ay,{onClick:function(){return n()},type:"primary",icon:(0,k.Y)($r.A,null),key:"btn",block:!0},f("${保存}"))):"",l?l.map((function(t,e){if(e<2)return(0,k.Y)("li",{key:e},(0,k.Y)(Br.A,{data:[c],serverKey:i,hiddenType:"disabled",buttonType:"primary-block",serial:a,key:t.id,formRef:o,actionConfig:t,doAction:n}))})):"",l&&l.length>2?(0,k.Y)(Vt.A,{placement:"leftTop",content:t,trigger:"hover"},(0,k.Y)(g.Ay,{block:!0},(0,k.Y)(Kr.A,null),f("${更多}"))):"")))}}])}(v.PureComponent);(0,d.A)(Ur,"contextType",x.U);var Hr=Ur;function zr(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Wr()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Wr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wr=function(){return!!t})()}var Qr=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=zr(this,e,[].concat(n)),(0,d.A)(t,"state",{}),(0,d.A)(t,"context",void 0),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){(0,Gr.A)(this.state);var t=this.props,e=t.dtmplConfig,r=t.position,n=t.doSubmit,o=t.formRef,a=t.serial,i=t.serverKey,c=t.dtmplData,u=e.buttons,l=e.actions,s=this.context.translate;return(0,k.Y)(m.A,{bordered:!1},(0,k.Y)(W.A,{align:"middle",justify:"bottomLeft"==r?"start":"bottomRight"==r?"end":"center"},(0,k.Y)(w.A,null,u.includes("dtmplSave")?(0,k.Y)(Q.A,null,(0,k.Y)(g.Ay,{onClick:function(){return n()},type:"primary",icon:(0,k.Y)($r.A,null),key:"btn",block:!0},s("${保存}"))):null,l?l.map((function(t,e){return(0,k.Y)(Q.A,null,(0,k.Y)(Br.A,{serverKey:i,serial:a,key:t.id,data:[c],formRef:o,actionConfig:t,doAction:n}))})):"")))}}])}(v.PureComponent);(0,d.A)(Qr,"contextType",x.U);var Jr=Qr;function Xr(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Zr()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Zr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zr=function(){return!!t})()}var tn=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=Xr(this,e,[].concat(n)),(0,d.A)(t,"state",{}),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this.props,e=t.position,r=t.doSubmit,n=t.serial,o=t.dtmplConfig,a=t.formRef,i=t.dtmplData,c=e||(o.buttonPosition?o.buttonPosition:void 0);return(0,k.Y)(v.Fragment,null,c&&"fixedBottomRight"!=c?(0,k.Y)(Jr,{position:c,doSubmit:r,serial:n,dtmplConfig:o,formRef:a,dtmplData:i}):(0,k.Y)(Hr,{doSubmit:r,serial:n,dtmplConfig:o,formRef:a,dtmplData:i}))}}])}(v.PureComponent);(0,d.A)(tn,"defaultProps",{});var en=tn,rn=r(97823);function nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function on(){on=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function an(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,cn()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function cn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(cn=function(){return!!t})()}var un=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return t=an(this,e,[].concat(a)),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"newCode",void 0),(0,d.A)(t,"state",{id:"dtmplEdit"+n.A.getRandomNum(6),showPostResult:!1,dtmplConfig:void 0,loading:!0,serial:1,dtmplData:void 0}),(0,d.A)(t,"autoSaveTimer",-1e15),(0,d.A)(t,"autoSaveInterval",void 0),(0,d.A)(t,"onClickBody",(function(e){t.autoSaveTimer=0})),(0,d.A)(t,"onValuesChange",(function(){t.setState({serial:t.state.serial+1})})),(0,d.A)(t,"loadConfigData",(0,u.A)(on().mark((function e(){var r,n,o,a,i,c,u,l,s;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.props,a=o.sourceId,i=o.code,c=o.serverKey,u=o.addTmplId,t.setState({loading:!0}),l=void 0,!i){e.next=9;break}return e.next=6,A.A.requestDtmplConfig(c,a,i);case 6:l=e.sent,e.next=12;break;case 9:return e.next=11,A.A.requestAddDtmplConfig(c,a,u);case 11:l=e.sent;case 12:if(null===(r=l)||void 0===r||!r.entity||(null===(n=l)||void 0===n||null===(n=n.entity)||void 0===n?void 0:n.code)!=i){e.next=18;break}s=l.entity,l.entity=void 0,t.setState({dtmplData:s,id:i,loading:!1}),e.next=20;break;case 18:return e.next=20,t.loadData(l);case 20:return t.setState({dtmplConfig:l,loading:!1}),e.abrupt("return",l);case 22:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"loadData",function(){var e=(0,u.A)(on().mark((function e(r){var n,a,i,c,u,l,s,f;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,a=n.sourceId,i=n.code,c=n.addOrUpdate,u=n.serverKey,l=n.codeSource,(s=i)||!l){e.next=6;break}return e.next=5,o.A.queryCode(a,l,u);case 5:s=e.sent;case 6:if(r.autoSaveInterval&&r.autoSaveInterval>0&&(t.autoSaveInterval&&clearInterval(t.autoSaveInterval),t.autoSaveInterval=setInterval((function(){t.autoSaveTimer>=r.autoSaveInterval?(t.autoSaveTimer=-1e15,t.doSubmit(void 0)):t.autoSaveTimer=t.autoSaveTimer+1}),1e3)),!s){e.next=16;break}return t.setState({loading:!0,dtmplData:void 0}),e.next=11,o.A.getDtmplData(r,u,a,s);case 11:f=e.sent,t.props.code!=f.code||f.sourceId&&t.props.sourceId!=f.sourceId||("copy"==c&&f&&(f.code=void 0),t.setState({dtmplData:f,id:s})),t.setState({loading:!1}),e.next=17;break;case 16:t.setState({dtmplData:{code:void 0,title:void 0,fieldMap:{},arrayMap:{}},loading:!1});case 17:setTimeout((function(){return t.onValuesChange()}),300);case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"doSubmit",(function(e){var r=t.props.mainCode;t.formRef.current.setFieldsValue({actionId:e}),r&&t.formRef.current.setFieldsValue({mainCode:r}),t.formRef.current.submit()})),(0,d.A)(t,"onFinish",(function(e){t.newCode=e;var r=t.state.dtmplConfig,n=r.saveJumpTo?r.saveJumpTo:[];n.length>1?t.setState({showPostResult:!0}):n.includes("edit")?t.goEdit():n.includes("add")?t.goAdd():n.includes("nothing")||t.goList()})),(0,d.A)(t,"goList",(function(){t.newCode=void 0,t.props.goBackToLtmpl()})),(0,d.A)(t,"goEdit",(function(){var e=t.newCode,r=t.props,n=r.goDtmpl;r.code,r.goBackToLtmpl,t.newCode=void 0,n(e),t.setState((function(t){return{showPostResult:!1}}))})),(0,d.A)(t,"goAdd",(function(){t.newCode=void 0;var e=t.props,r=e.goDtmpl;e.code&&r(),t.setState((function(t){return{showPostResult:!1}}))})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:function(){this.loadConfigData()}},{key:"componentDidUpdate",value:(r=(0,u.A)(on().mark((function t(e,r,n){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&e==this.props){t.next=7;break}return t.t0=this,t.next=4,this.loadConfigData();case 4:return t.t1=t.sent,t.next=7,t.t0.loadData.call(t.t0,t.t1);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}},{key:"render",value:function(){var t=this.state,e=t.dtmplConfig,r=t.showPostResult,n=t.loading,o=t.id,a=t.serial,i=t.dtmplData,c=this.props,u=c.sourceId,l=c.showRightNav,s=c.code,f=c.addOrUpdate,h=c.maxColsOnRow,p=c.mainCode,d=c.serverKey,v=[];if(!e)return(0,k.Y)(m.A,{loading:n});var y=e.actions;if(y){var g,w=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return nn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(y);try{for(w.s();!(g=w.n()).done;){var b=g.value;b.writes&&b.writes.forEach((function(t){v.push({id:t.id,value:t.value})}))}}catch(t){w.e(t)}finally{w.f()}e.hiddenFields=v}return(0,k.Y)("div",{className:"detailPage ",onClick:this.onClickBody},(0,k.Y)(Nr.A,{showRightNav:l,serverKey:d,mainCode:p,parentId:o,dtmplConfig:e,formRef:this.formRef,sourceId:u,onFinish:this.onFinish,maxColsOnRow:h,showConfirm:!0,dtmplData:i,onValuesChange:this.onValuesChange}),l?(0,k.Y)(Fr.A,{parentId:o,dtmplConfig:e}):"",(0,k.Y)(en,{dtmplData:i,serverKey:d,serial:a,dtmplConfig:e,doSubmit:this.doSubmit,formRef:this.formRef}),(0,k.Y)(rn.A,{serverKey:d,dtmplConfig:e,mainCode:s}),(0,k.Y)(Rr,{open:r,addOrUpdate:"copy"==f?"add":f,resultStatus:"success",goList:this.goList,goEdit:this.goEdit,goAdd:this.goAdd,jumpTypes:e.saveJumpTo}))}}]);var r}(v.PureComponent);(0,d.A)(un,"defaultProps",{showRightNav:!0});var ln=r(76390);function sn(){sn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function fn(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,hn()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function hn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hn=function(){return!!t})()}var pn=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=fn(this,e,[].concat(n)),(0,d.A)(t,"state",{codeSource:void 0,queriedCode:void 0}),(0,d.A)(t,"queryCode",(0,u.A)(sn().mark((function e(){var r,n,a,i;return sn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.params,n=r.sourceId,a=t.getCodeSource(),e.next=5,o.A.queryCode(n,a);case 5:i=e.sent,t.setState({codeSource:a,queriedCode:i});case 7:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"getMenuId",(function(){return t.props.searchParams.get("menuId")})),(0,d.A)(t,"getCodeSource",(function(){return t.props.searchParams.get("codeSource")})),(0,d.A)(t,"goBackToLtmpl",(function(){t.props.navigate(-1)})),(0,d.A)(t,"goDtmpl",(function(e){var r=t.props.params.sourceId,n=t.props.basePath,o="".concat(n,"/").concat(r,"/detail-edit?menuId=").concat(t.getMenuId());e&&(o+="&code=".concat(e));var a=t.getMainCode();a&&(o+="&mainCode=".concat(a)),t.props.navigate(o)})),(0,d.A)(t,"getMainCode",(function(){return t.props.searchParams.get("mainCode")})),(0,d.A)(t,"getCode",(function(){var e=t.state,r=e.codeSource,n=e.queriedCode,o=t.props.searchParams;return r?n:o.get("code")})),(0,d.A)(t,"getMode",(function(){var e=t.props.searchParams;return t.getCode()?e.get("mode"):"add"})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(n=(0,u.A)(sn().mark((function t(){return sn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.queryCode();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"shouldComponentUpdate",value:function(t,e){return t&&t==this.props||this.setState({codeSource:void 0,queriedCode:void 0}),!0}},{key:"componentDidUpdate",value:(r=(0,u.A)(sn().mark((function t(e,r,n){return sn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&e==this.props){t.next=3;break}return t.next=3,this.queryCode();case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.location,r=t.params,n=t.searchParams,o=r.sourceId,a=this.state.codeSource;if(!e)return(0,k.Y)(v.Fragment,null);var i=this.getCode();if(i&&"bad-code"==i)return(0,k.Y)(Tr.A,null);var c=r.versionId;return e.pathname.endsWith("detail-view")?(0,k.Y)(ln.A,{serverKey:null,goDtmpl:this.goDtmpl,sourceId:o,versionId:c,code:i,mainCode:this.getMainCode()}):(0,k.Y)(un,{addTmplId:n.get("addTmplId"),serverKey:null,addOrUpdate:this.getMode(),sourceId:o,code:i,mainCode:this.getMainCode(),goBackToLtmpl:a?void 0:this.goBackToLtmpl,goDtmpl:this.goDtmpl})}}]);var r,n}(v.Component);(0,d.A)(pn,"defaultProps",{basePath:"",codeSource:void 0,queriedCode:void 0});var dn=Ce(pn);function vn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function yn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vn(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gn(){gn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function mn(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,wn()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function wn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wn=function(){return!!t})()}var bn=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=mn(this,e,[].concat(o)),(0,d.A)(t,"context",void 0),(0,d.A)(t,"state",{ltmplConfigRes:void 0,pageNo:void 0,pageSize:void 0,selectedCode:void 0,showDraw:!1,ractionId:void 0}),(0,d.A)(t,"onRoute",(function(e){t.props.navigate(e)})),(0,d.A)(t,"getMenuId",(function(){return t.props.searchParams.get("menuId")})),(0,d.A)(t,"loadData",(0,u.A)(gn().mark((function e(){var r,n,o;return gn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.params,n=r.sourceId,e.next=4,A.A.requestLtmplConfig(null,n);case 4:o=e.sent,t.setState({ltmplConfigRes:o});case 6:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"showView",(function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.props.basePath,o=t.props.params.sourceId,a=t.state.ltmplConfigRes,i="".concat(n,"/").concat(o,"/detail-view?code=").concat(e,"&menuId=").concat(t.getMenuId());r&&a.ltmplConfig.customViewPagePath&&(i="".concat(n).concat(a.ltmplConfig.customViewPagePath,"?menuId=").concat(t.getMenuId(),"&sourceId=").concat(o)),t.onRoute(i)})),(0,d.A)(t,"doEdit",(function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=t.props.basePath,a=t.props.params.sourceId,i=t.state.ltmplConfigRes,c=t.getMainCode(),u="".concat(o,"/").concat(a,"/detail-edit?code=").concat(e,"&menuId=").concat(t.getMenuId(),"&mode=").concat(r);n&&i.ltmplConfig.customEditPagePath&&(u="".concat(o,"/page/").concat(a).concat(i.ltmplConfig.customEditPagePath,"?code=").concat(e,"&menuId=").concat(t.getMenuId())),c&&(u+="&mainCode=".concat(c)),t.onRoute(u)})),(0,d.A)(t,"getMainCode",(function(){var e=void 0,r=t.props.searchParams.get("mainCode");return r&&(e=r),e})),(0,d.A)(t,"doCreate",(function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.props.basePath,o=t.props.params.sourceId,a=t.state.ltmplConfigRes,i="".concat(n,"/").concat(o,"/detail-edit?menuId=").concat(t.getMenuId(),"&addTmplId=").concat(e||"");r&&a.ltmplConfig.customEditPagePath&&(i="".concat(n,"/page/").concat(o).concat(a.ltmplConfig.customEditPagePath,"?menuId=").concat(t.getMenuId()));var c=t.getMainCode();c&&(i+="&mainCode=".concat(c)),t.onRoute(i)})),(0,d.A)(t,"doRAction",(function(e,r){t.setState({selectedCode:r,showDraw:!0,ractionId:e})})),(0,d.A)(t,"closeDrawer",(function(){t.setState({showDraw:!1})})),(0,d.A)(t,"doSearch",(function(e){var r=t.props.basePath,o=t.props.params.sourceId,a=yn({},e),i=n.A.transQueryParamsToStr(a);t.props.navigate("".concat(r,"/").concat(o,"/act-table?").concat(i),{replace:!0})})),(0,d.A)(t,"onChangeSearch",(function(e){var r=yn({},e),n=t.props.searchParams.get("mainCode");n&&(r.mainCode=n);var o=t.state,a=o.pageSize,i=o.pageNo;a&&(r.pageNo=i),i&&(r.pageSize=a),r.menuId=t.getMenuId(),r.sourceId=t.getMenuId(),t.doSearch(r)})),(0,d.A)(t,"onChangePage",(function(e,r){var o=t.props.location.search,a=n.A.transQueryStrToParams(o);a.pageNo=e,a.pageSize=r,t.doSearch(a)})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(o=(0,u.A)(gn().mark((function t(){return gn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.loadData();case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,u.A)(gn().mark((function t(e){var r,n,o,a,i,c;return gn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.props,n=r.location,o=r.params,a=o.sourceId,i=e.params.sourceId,c=e.location,!(!a||!i&&this.state.ltmplConfigRes||n.pathname==c.pathname&&n.search==c.search)){t.next=6;break}return t.abrupt("return");case 6:this.loadData();case 7:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state,e=t.ltmplConfigRes,r=t.showDraw,o=t.ractionId,a=t.selectedCode,i=this.props,c=i.location,u=i.params.sourceId,l=this.context.translate,s=void 0,f=c.search,h=n.A.transQueryStrToParams(f),p=h.pageSize,d=h.pageNo;return f.indexOf("mainCode")>0&&(s=h.mainCode),e?(0,k.Y)(v.Fragment,null,(0,k.Y)(pr.A,{serverKey:null,pageSize:p,pageNo:d,onChangePage:this.onChangePage,menuId:this.getMenuId(),mainCode:s,showView:this.showView,doSearch:this.onChangeSearch,doEdit:this.doEdit,doCreate:this.doCreate,sourceId:u,criteriaData:h,ltmplConfig:e?e.ltmplConfig:null,doRAction:this.doRAction}),r?(0,k.Y)(xt.A,{placement:"left",title:l("${关联查询}"),closable:!0,mask:!1,onClose:this.closeDrawer,open:r,width:"calc(100% - 280px)",style:{maxWidth:1960},extra:(0,k.Y)(w.A,null,(0,k.Y)(g.Ay,{onClick:this.closeDrawer},l("${关闭}")))},(0,k.Y)(Lt.A,{serverKey:null,sourceId:o,mainCode:a})):null):(0,k.Y)(v.Fragment,null)}}]);var r,o}(v.PureComponent);(0,d.A)(bn,"contextType",x.U),(0,d.A)(bn,"defaultProps",{basePath:""});var An,xn=Ce(bn),kn=r(16044),Ln=r(87937),Cn=r(93598),On=r(40261),En=r(11058),Sn=r(55140),Yn=r(49237);function jn(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Pn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function Pn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function In(){In=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Tn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Nn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tn(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var _n=(0,s.A)((function t(){(0,l.A)(this,t)}));function Dn(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Rn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function Rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Fn(){Fn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Gn(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Mn()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Mn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Mn=function(){return!!t})()}An=_n,(0,d.A)(_n,"initTtmplNodeConfig",function(){var t=(0,u.A)(In().mark((function t(e){var r,n,o,a,i,c,u;return In().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return",null);case 2:if(!(r=Nn({},e)).rootGtmplId){t.next=10;break}return t.next=6,A.A.requestLtmplConfig(null,r.rootGtmplId);case 6:n=t.sent,o=n.ltmplConfig,r.rootLTmplConfig=o,r.rootTitleId=o.primaryColumn.id;case 10:if(!r.branchRatmplId){t.next=17;break}return t.next=13,A.A.requestLtmplConfig(null,r.branchRatmplId);case 13:a=t.sent,i=a.ltmplConfig,r.branchLTmplConfig=i,r.branchTitleId=i.primaryColumn.id;case 17:if(!r.leafRatmplId){t.next=24;break}return t.next=20,A.A.requestLtmplConfig(null,r.leafRatmplId);case 20:c=t.sent,u=c.ltmplConfig,r.leafLTmplConfig=u,r.leafTitleId=u.primaryColumn.id;case 24:return t.abrupt("return",r);case 25:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,d.A)(_n,"loadRootNodeData",function(){var t=(0,u.A)(In().mark((function t(e){var r,n;return In().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.requestTtmplRootData(null,e.id,{});case 2:return r=t.sent,n=[],r.entities&&r.entities.forEach((function(t,r){n.push(An.toTreeNodeData(t,e.rootTitleId,null,!1,"R"))})),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,d.A)(_n,"pushNodeData",(function(t,e,r,n){t.children.splice(0,t.children.length),r&&r.forEach((function(r,n){t.children.push(An.toBanchTreeNodeData(r,e,t))})),n&&n.forEach((function(r,n){t.children.push(An.toLeafTreeNodeData(r,e,t))}))})),(0,d.A)(_n,"pushSameCodeNodeData",function(){var t=(0,u.A)(In().mark((function t(e,r){var n,a,i,c,u,l,s;return In().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.length>0)){t.next=13;break}if(!r.branchRatmplId){t.next=6;break}return t.next=4,o.A.requestLtmplQueryTop(null,r.branchRatmplId,{mainCode:e[0].code});case 4:a=t.sent,n=a.entities;case 6:if(!r.leafRatmplId){t.next=11;break}return t.next=9,o.A.requestLtmplQueryTop(null,r.leafRatmplId,{mainCode:e[0].code});case 9:c=t.sent,i=c.entities;case 11:u=jn(e);try{for(u.s();!(l=u.n()).done;)s=l.value,An.pushNodeData(s,r,n,i)}catch(t){u.e(t)}finally{u.f()}case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),(0,d.A)(_n,"toLeafTreeNodeData",(function(t,e,r){return An.toTreeNodeData(t,e.leafTitleId,r,!0,"B")})),(0,d.A)(_n,"toBanchTreeNodeData",(function(t,e,r){return An.toTreeNodeData(t,e.branchTitleId,r,!1,"L")})),(0,d.A)(_n,"toTreeNodeData",(function(t,e,r,n,o){var a=t.fieldMap[e];return{code:t.code,key:o+(null==r?void 0:r.code)+t.code,name:a,title:(0,k.Y)(v.Fragment,null,(0,k.Y)("span",null,a||t.code)),children:[],isLeaf:n,parent:r}})),(0,d.A)(_n,"filterNode",(function(t,e){var r=(0,_e.A)(t.children),n=[],o=[];return r.forEach((function(t){var r=Nn({},t);if((r.searchValue?r.searchValue:r.name).indexOf(e)>=0&&n.push(r),r.children&&r.children.length>0){var a=An.filterNode(r,e);a.length>0?(r.children=a,(r.searchValue?r.searchValue:r.name).indexOf(e)<0&&n.push(r)):(r.children=[],o.push(r))}})),t.children=n,n})),(0,d.A)(_n,"filterTree",(function(t,e){var r={code:"",config:void 0,key:void 0,children:(0,_e.A)(t)};return An.filterNode(r,e),r.children})),Re.A.Text,Re.A.Title;var $n=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=Gn(this,e,[].concat(n)),(0,d.A)(t,"state",{data:[],expandedKeys:[],loadedKeys:[],loading:!1,currentEditKey:void 0,parentNodeData:void 0,currentNodeData:void 0,rootAddable:!1,searchValue:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"doDelete",function(){var e=(0,u.A)(Fn().mark((function e(r){var n,a;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props.ttmplNodeConfig,a=r.isLeaf?n.leafRatmplId:n.branchRatmplId?n.branchRatmplId:n.rootLTmplConfig,e.next=4,o.A.deleteByCode(null,a,[r.code]);case 4:if(e.sent,!r.parent){e.next=10;break}return e.next=8,t.reloadData(r.parent.code);case 8:e.next=12;break;case 10:return e.next=12,t.reloadData(null);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"loadRootNodeData",(0,u.A)(Fn().mark((function e(){var r,n;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.ttmplNodeConfig,e.next=3,_n.loadRootNodeData(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"onExpand",function(){var e=(0,u.A)(Fn().mark((function e(r,n){var o,a;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.props.ttmplNodeConfig,a=t.state.data,!n.expanded){e.next=5;break}return e.next=5,_n.pushSameCodeNodeData([n.node],o);case 5:t.setState({data:(0,_e.A)(a),expandedKeys:r});case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,d.A)(t,"onClickNode",(function(e){var r=t.props,n=r.doEditRoot,o=r.doViewRoot,a=r.doViewSub,i=r.doEditSub,c=r.ttmplNodeConfig;e.parent?e.isLeaf?c.leafLTmplConfig.buttons.indexOf("dtmplEdit")>0?i(c.leafTitle,c.leafRatmplId,e.parent.code,e.code):c.leafLTmplConfig.buttons.indexOf("detail")>0&&a(c.leafTitle,c.leafRatmplId,e.parent.code,e.code):c.branchLTmplConfig.buttons.indexOf("dtmplEdit")>0?i(c.branchTitle,c.branchRatmplId,e.parent.code,e.code):c.branchLTmplConfig.buttons.indexOf("detail")>0&&a(c.branchTitle,c.branchRatmplId,e.parent.code,e.code):c.rootLTmplConfig.buttons.indexOf("dtmplEdit")>0?n(c.branchTitle,e.code):c.rootLTmplConfig.buttons.indexOf("detail")>0&&o(c.branchTitle,e.code)})),(0,d.A)(t,"stopPropagation",(function(t){t.stopPropagation?t.stopPropagation():window.event.cancelBubble=!0})),(0,d.A)(t,"reloadData",function(){var e=(0,u.A)(Fn().mark((function e(r){var n,o,a,i,c,u,l,s,f,h;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props.ttmplNodeConfig,o=t.state,a=o.data,i=o.expandedKeys,null!=r){e.next=10;break}return e.next=5,t.loadRootNodeData();case 5:c=e.sent,t.mergeRootData(a,c),t.setState({data:c}),e.next=17;break;case 10:return u=[],t.searchNode(a,r,u),e.next=14,_n.pushSameCodeNodeData(u,n);case 14:for(l=[],s=0,f=u;s<f.length;s++)h=f[s],l.push(h.key);t.setState({expandedKeys:[].concat((0,_e.A)(i),l),data:(0,_e.A)(a)});case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"mergeRootData",(function(t,e){if(e&&t){var r,n=Dn(e);try{for(n.s();!(r=n.n()).done;){var o,a=r.value,i=Dn(t);try{for(i.s();!(o=i.n()).done;){var c=o.value;if(a.code==c.code){a.children=c.children;break}}}catch(t){i.e(t)}finally{i.f()}}}catch(t){n.e(t)}finally{n.f()}}})),(0,d.A)(t,"searchNode",(function(e,r,n){if(e){var o,a=Dn(e);try{for(a.s();!(o=a.n()).done;){var i=o.value;if(i.code==r){n.push(i);break}i.children.length>0&&t.searchNode(i.children,r,n)}}catch(t){a.e(t)}finally{a.f()}}})),(0,d.A)(t,"getDeleteButton",(function(e,r){var n=t.props.doDelete,o=t.context.translate;return(0,k.Y)("div",{onClick:function(e){t.stopPropagation(e)}},(0,k.Y)(kn.A,{placement:"topLeft",title:o("${确定要删除吗}?"),onConfirm:(0,u.A)(Fn().mark((function o(){return Fn().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,n(e,r.code);case 2:if(!r.parent){o.next=7;break}return o.next=5,t.reloadData(r.parent.code);case 5:o.next=9;break;case 7:return o.next=9,t.reloadData(null);case 9:case"end":return o.stop()}}),o)}))),okText:o("${确定}"),cancelText:o("${取消}")},(0,k.Y)(et.A,null,(0,k.Y)(g.Ay,{size:"small",danger:!0},(0,k.Y)(Cn.A,null)))))})),(0,d.A)(t,"getAddButton",(function(e,r,n,o){var a=t.props.doAddSub;return(0,k.Y)(g.Ay,{onClick:function(r){t.stopPropagation(r),a(e,n,o,null)},size:"small"},r,e)})),(0,d.A)(t,"packageTitle",(function(e){var r,n,o,a,i=t.props,c=i.doEditRoot,u=i.doViewRoot,l=i.doViewSub,s=i.doEditSub,f=i.ttmplNodeConfig,h=t.context.translate,p=[];if(e.parent){if(e.isLeaf)(null===(r=f.leafLTmplConfig)||void 0===r?void 0:r.buttons.indexOf("dtmplEdit"))>0&&p.push((0,k.Y)(g.Ay,{onClick:function(r){t.stopPropagation(r),s(f.leafTitle,f.leafRatmplId,e.parent.code,e.code)},size:"small"},(0,k.Y)(On.A,null),h("${编辑}"))),(null===(n=f.leafLTmplConfig)||void 0===n?void 0:n.buttons.indexOf("detail"))>0&&p.push((0,k.Y)(g.Ay,{onClick:function(r){t.stopPropagation(r),l(f.leafTitle,f.leafRatmplId,e.parent.code,e.code)},size:"small"},(0,k.Y)(En.A,null),h("${查看}"))),(null===(o=f.leafLTmplConfig)||void 0===o?void 0:o.buttons.indexOf("singleDelete"))>0&&p.push(t.getDeleteButton(f.leafRatmplId,e));else if(f.branchLTmplConfig){var d,y,m,b;f.branchLTmplConfig.buttons.indexOf("dtmplEdit")>0&&p.push((0,k.Y)(g.Ay,{onClick:function(r){t.stopPropagation(r),s(f.branchTitle,f.branchRatmplId,e.parent.code,e.code)},size:"small"},(0,k.Y)(On.A,null),h("${编辑}"))),(null===(d=f.branchLTmplConfig)||void 0===d?void 0:d.buttons.indexOf("detail"))>0&&p.push((0,k.Y)(g.Ay,{onClick:function(r){t.stopPropagation(r),l(f.branchTitle,f.branchRatmplId,e.parent.code,e.code)},size:"small"},(0,k.Y)(En.A,null),h("${查看}"))),(null===(y=f.branchLTmplConfig)||void 0===y?void 0:y.buttons.indexOf("dtmplAdd"))>0&&p.push(t.getAddButton(f.branchTitle,(0,k.Y)(Sn.A,null),f.branchRatmplId,e.code)),(null===(m=f.leafLTmplConfig)||void 0===m?void 0:m.buttons.indexOf("dtmplAdd"))>0&&p.push(t.getAddButton(f.leafTitle,(0,k.Y)(Yn.A,null),f.leafRatmplId,e.code)),(null===(b=f.branchLTmplConfig)||void 0===b?void 0:b.buttons.indexOf("singleDelete"))>0&&p.push(t.getDeleteButton(f.branchRatmplId,e))}}else f.rootLTmplConfig.buttons.indexOf("dtmplEdit")>0&&p.push((0,k.Y)(g.Ay,{onClick:function(r){t.stopPropagation(r),c(f.branchTitle,e.code)},size:"small"},(0,k.Y)(On.A,{style:{color:"blue"}}),h("${编辑}"))),f.rootLTmplConfig.buttons.indexOf("detail")>0&&p.push((0,k.Y)(g.Ay,{onClick:function(r){t.stopPropagation(r),u(f.branchTitle,e.code)},size:"small"},(0,k.Y)(En.A,null),h("${查看}"))),f.branchLTmplConfig&&f.rootLTmplConfig.buttons.indexOf("dtmplAdd")>0&&p.push(t.getAddButton(f.branchTitle,(0,k.Y)(Sn.A,null),f.branchRatmplId,e.code)),(null===(a=f.leafLTmplConfig)||void 0===a?void 0:a.buttons.indexOf("dtmplAdd"))>0&&p.push(t.getAddButton(f.leafTitle,(0,k.Y)(Yn.A,null),f.leafRatmplId,e.code)),f.rootLTmplConfig.buttons.indexOf("singleDelete")>0&&p.push(t.getDeleteButton(f.branchRatmplId?f.branchRatmplId:f.rootGtmplId,e));return 0==p.length?e.title:(0,k.Y)(Vt.A,{zIndex:100,content:(0,k.Y)(v.Fragment,null,(0,k.Y)(w.A,null,p)),arrow:!1},e.title)})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(i=(0,u.A)(Fn().mark((function t(){return Fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.refresh();case 2:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"componentDidUpdate",value:(a=(0,u.A)(Fn().mark((function t(e){var r,n;return Fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.ttmplNodeConfig,(n=this.props.ttmplNodeConfig)&&(!r||n.id!=r.id)){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,this.refresh();case 6:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"refresh",value:(n=(0,u.A)(Fn().mark((function t(){var e,r;return Fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.props.ttmplNodeConfig){t.next=3;break}return t.abrupt("return");case 3:return this.setState({loading:!0}),t.next=6,this.loadRootNodeData();case 6:r=t.sent,this.setState({searchValue:null,data:r,rootAddable:e.rootLTmplConfig.buttons.indexOf("dtmplAdd")>0,loading:!1});case 8:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentWillUnmount",value:(r=(0,u.A)(Fn().mark((function t(){return Fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props,r=e.doEditRoot,n=e.ttmplNodeConfig,o=this.state,a=o.data,i=o.loading,c=o.expandedKeys,u=o.rootAddable,l=o.searchValue,s=a,f=this.context.translate;return l&&(s=_n.filterTree(a,l)),(0,k.Y)(v.Fragment,null,(0,k.Y)(W.A,null,(0,k.Y)(Q.A,{span:24},(0,k.Y)(m.A,{style:{marginBottom:0,width:"100%"},bordered:!1,bodyStyle:{padding:"4px 2px 4px 8px"}},(0,k.Y)(W.A,{align:"middle"},(0,k.Y)(Q.A,{span:8},u&&r?(0,k.Y)(g.Ay,{type:"link",onClick:function(){return r(n.branchTitle)}},f("${添加}")):null),(0,k.Y)(Q.A,{span:16},(0,k.Y)(qt.A.Search,{value:l,allowClear:!0,placeholder:f("${输入查找内容}"),onChange:function(e){t.setState({searchValue:e.target.value})},onSearch:function(e){t.refresh()},enterButton:(0,k.Y)(Ke.A,null)})))))),(0,k.Y)(W.A,null,(0,k.Y)(Q.A,{span:24},(0,k.Y)(m.A,{bodyStyle:{padding:"4px 4px 4px 16px",height:"80vh",minWidth:"292px"},loading:i},0==s.length?f("${没有找到数据}"):(0,k.Y)(ge.Ay,{style:{height:"80vh"},autoHide:!0,autoHideTimeout:1e3},(0,k.Y)(Ln.A,{blockNode:!0,showLine:n.showLine,checkable:!1,expandedKeys:c,onExpand:this.onExpand,titleRender:function(e){return(0,k.Y)("div",{onClick:function(){return t.onClickNode(e)}},t.packageTitle(e))},treeData:s}))))))}}]);var r,n,a,i}(v.PureComponent);(0,d.A)($n,"defaultProps",{draggable:!1,readOnly:!1}),(0,d.A)($n,"contextType",x.U);var Kn=$n;function Bn(){Bn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function qn(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Vn()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Vn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vn=function(){return!!t})()}var Un=B.A.Content,Hn=B.A.Sider,zn=(Re.A.Text,Re.A.Title,function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=qn(this,e,[].concat(n)),(0,d.A)(t,"state",{ttmplNodeConfig:void 0,recordCode:void 0,showEdit:!1,showView:!1,mainCode:void 0,sourceId:void 0,cardtitle:void 0,addTmplId:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"refTmplTree",v.createRef()),(0,d.A)(t,"loadData",(0,u.A)(Bn().mark((function e(){var r,n;return Bn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.ttmplConfig,e.next=3,_n.initTtmplNodeConfig(r);case 3:n=e.sent,t.setState({ttmplNodeConfig:n,showEdit:!1,showView:!1});case 5:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"onEditRoot",(function(e,r){var n=t.props.ttmplConfig;t.showCard(e,n.rootGtmplId,null,r,!0,!1)})),(0,d.A)(t,"showCard",(function(e,r,n,o,a,i,c){t.setState({mainCode:n,cardtitle:e,recordCode:o,showEdit:a,showView:i,sourceId:r,addTmplId:c})})),(0,d.A)(t,"onViewRoot",(function(e,r){var n=t.props.ttmplConfig;t.showCard(e,n.rootGtmplId,null,r,!1,!0,null)})),(0,d.A)(t,"onEditSub",(function(e,r,n,o){t.showCard(e,r,n,o,!0,!1,null)})),(0,d.A)(t,"onViewSub",(function(e,r,n,o){t.showCard(e,r,n,o,!1,!0,null)})),(0,d.A)(t,"onDelete",function(){var t=(0,u.A)(Bn().mark((function t(e,r){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.deleteByCode(null,e,[r]);case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),(0,d.A)(t,"onAddSub",(function(e,r,n,o){t.showCard(e,r,n,null,!0,!1,o)})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(n=(0,u.A)(Bn().mark((function t(){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,u.A)(Bn().mark((function t(e){var r,n;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.ttmplConfig,!(n=this.props.ttmplConfig)||!r||n.id!=r.id){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,this.loadData();case 6:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this;(0,Gr.A)(this.props);var e=this.context.translate,r=this.state,n=r.ttmplNodeConfig,o=r.showView,a=r.showEdit,i=r.recordCode,c=r.mainCode,u=r.sourceId,l=r.cardtitle,s=r.addTmplId;return n?(0,k.Y)(B.A,{hasSider:!0,style:{backgroundColor:"#fff"}},(0,k.Y)(Hn,{width:300,theme:"light",style:{height:"90vh",position:"fixed",left:0,top:66,bottom:0,marginLeft:210}},(0,k.Y)(Kn,{doEditRoot:this.onEditRoot,doEditSub:this.onEditSub,doDelete:this.onDelete,doViewRoot:this.onViewRoot,doViewSub:this.onViewSub,doAddSub:this.onAddSub,ttmplNodeConfig:n,ref:this.refTmplTree})),(0,k.Y)(B.A,{style:{marginLeft:322,backgroundColor:"#fff"}},(0,k.Y)(Un,{style:{overflow:"initial"}},a?(0,k.Y)(uo,{addTmplId:s,title:(0,k.Y)(v.Fragment,null,i?(0,k.Y)(v.Fragment,null,e("${编辑}")," ",l||""):(0,k.Y)(v.Fragment,null,e("${添加}")," ",l||"")," "),mainCode:c,sourceId:u,code:i,onOk:function(e){var r;null===(r=t.refTmplTree)||void 0===r||null===(r=r.current)||void 0===r||r.reloadData(c),t.setState({recordCode:e})}}):null,o?(0,k.Y)(ro.A,{mainCode:c,sourceId:u,code:i}):null))):(0,k.Y)(m.A,{loading:!0})}}]);var r,n}(v.PureComponent));function Wn(){Wn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Qn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Qn(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xn(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,Zn()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function Zn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zn=function(){return!!t})()}(0,d.A)(zn,"defaultProps",{}),(0,d.A)(zn,"contextType",x.U);var to=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=Xn(this,e,[].concat(n)),(0,d.A)(t,"state",{ttmplConfig:void 0}),(0,d.A)(t,"onRoute",(function(e){t.props.navigate(e)})),(0,d.A)(t,"getMenuId",(function(){return t.props.searchParams.get("menuId")})),(0,d.A)(t,"loadData",(0,u.A)(Wn().mark((function e(){var r,n,o;return Wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.params,n=r.sourceId,e.next=4,A.A.requestTtmplConfig(null,n);case 4:"1M"==(o=e.sent).type?t.props.navigate("/".concat(o.id,"/act-table")):t.setState({ttmplConfig:Jn({},o)});case 6:case"end":return e.stop()}}),e)})))),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(n=(0,u.A)(Wn().mark((function t(){return Wn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.loadData();case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,u.A)(Wn().mark((function t(e){var r,n,o,a;return Wn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=this.props).location,n=r.params,o=n.sourceId,a=e.params.sourceId,e.location,!o||!a||o!=a){t.next=6;break}return t.abrupt("return");case 6:return t.next=8,this.loadData();case 8:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){(0,Gr.A)(this.props);var t=this.state.ttmplConfig;return t?(0,k.Y)(v.Fragment,null,(0,k.Y)(zn,{ttmplConfig:t})):(0,k.Y)(m.A,{loading:!0})}}]);var r,n}(v.PureComponent);(0,d.A)(to,"defaultProps",{basePath:""});var eo=Ce(to),ro=r(45705);r(46675);function no(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function oo(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?no(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):no(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ao(){ao=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function io(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,co()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function co(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(co=function(){return!!t})()}v.PureComponent,r(68455);var uo=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return t=io(this,e,[].concat(a)),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"autoSaveTimer",-1e15),(0,d.A)(t,"autoSaveInterval",void 0),(0,d.A)(t,"context",void 0),(0,d.A)(t,"onClickBody",(function(e){t.autoSaveTimer=0})),(0,d.A)(t,"state",{id:"dtmplEditCard"+n.A.getRandomNum(6),queryingCode:void 0,dtmplConfig:void 0,loading:!0,serial:1,dtmplData:void 0}),(0,d.A)(t,"loadConfigData",(0,u.A)(ao().mark((function e(){var r,n,o,a,i,c,u;return ao().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.sourceId,o=r.code,a=r.serverKey,i=r.addTmplId,t.setState({loading:!0}),c=void 0,!o){e.next=9;break}return e.next=6,A.A.requestDtmplConfig(a,n,o);case 6:c=e.sent,e.next=12;break;case 9:return e.next=11,A.A.requestAddDtmplConfig(a,n,i);case 11:c=e.sent;case 12:if(!c.entity){e.next=18;break}u=c.entity,c.entity=void 0,t.setState({queryingCode:o,dtmplData:u,dtmplConfig:c,loading:!1}),e.next=21;break;case 18:return e.next=20,t.loadData(c);case 20:t.setState({dtmplConfig:c,loading:!1});case 21:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"loadData",function(){var e=(0,u.A)(ao().mark((function e(r){var n,a,i,c,u,l;return ao().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,a=n.sourceId,i=n.serverKey,c=n.code,u=n.codeSource,(l=c)||!u){e.next=6;break}return e.next=5,o.A.queryCode(a,u,i);case 5:l=e.sent;case 6:return e.next=8,t.loadCodeData(r,l);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"reloadData",(0,u.A)(ao().mark((function e(){var r,n,a,i,c,u,l,s,f;return ao().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.state,n=r.queryingCode,a=r.dtmplConfig,i=t.props,c=i.sourceId,u=i.serverKey,l=i.code,s=i.codeSource,(f=l||n)||!s){e.next=7;break}return e.next=6,o.A.queryCode(c,s,u);case 6:f=e.sent;case 7:return e.next=9,t.loadCodeData(a,f);case 9:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"loadCodeData",function(){var e=(0,u.A)(ao().mark((function e(r,n){var a,i,c,u,l;return ao().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.props,i=a.sourceId,c=a.defaultDtmplData,u=a.serverKey,a.codeSource,r.autoSaveInterval&&r.autoSaveInterval>0&&(t.autoSaveInterval&&clearInterval(t.autoSaveInterval),t.autoSaveInterval=setInterval((function(){t.autoSaveTimer>=r.autoSaveInterval?(t.autoSaveTimer=-1e15,t.doSubmit(void 0)):t.autoSaveTimer=t.autoSaveTimer+1}),1e3)),!n){e.next=11;break}return t.setState({loading:!0,queryingCode:n,dtmplData:void 0}),e.next=6,o.A.getDtmplData(r,u,i,n);case 6:l=e.sent,t.state.queryingCode&&t.state.queryingCode!=l.code||l.sourceId&&t.props.sourceId!=l.sourceId||t.setState({dtmplData:l,id:n}),t.setState({loading:!1}),e.next=12;break;case 11:c?t.setState({dtmplData:c,loading:!1}):t.setState({dtmplData:{code:void 0,title:void 0,fieldMap:{},arrayMap:{}},loading:!1});case 12:setTimeout((function(){return t.onValuesChange()}),300);case 13:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,d.A)(t,"onValuesChange",(function(){t.setState({serial:t.state.serial+1})})),(0,d.A)(t,"doSubmit",(function(e,r,n){var o=t.props.mainCode;t.formRef.current.setFieldsValue({actionId:e}),o&&t.formRef.current.setFieldsValue({mainCode:o}),n&&t.formRef.current.setFieldsValue(n),t.formRef.current.submit()})),(0,d.A)(t,"getFooter",(function(){var e=t.props.serverKey,r=t.state,n=(r.dtmplData,r.serial),o=t.context.translate,a=[];a.unshift((0,k.Y)(g.Ay,{onClick:function(){return t.reloadData()}},o("${刷新}"))),a.unshift((0,k.Y)(g.Ay,{onClick:function(){return t.doSubmit()},type:"primary"},o("${保存}")));var i=t.state.dtmplConfig;return i&&i.actions.forEach((function(r,o){a.unshift((0,k.Y)(Br.A,{serverKey:e,iconType:"icon-title",hiddenType:"disabled",serial:n,key:r.id,formRef:t.formRef,actionConfig:r,doAction:t.doSubmit}))})),a})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(a=(0,u.A)(ao().mark((function t(){return ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadConfigData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,u.A)(ao().mark((function t(e){var r,n,o,a,i;return ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.state,n=r.dtmplConfig,o=r.dtmplData,a=r.queryingCode,!e||e==this.props){t.next=16;break}if(i=this.props.code?this.props.code:a,e.sourceId==this.props.sourceId&&null!=n){t.next=8;break}return t.next=6,this.loadConfigData();case 6:case 12:t.next=16;break;case 8:if(e.sourceId==this.props.sourceId&&a==i&&o){t.next=16;break}if(!i){t.next=14;break}return t.next=12,this.loadCodeData(n,i);case 14:return t.next=16,this.loadData(n);case 16:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}},{key:"render",value:function(){var t=this.props,e=t.onOk,r=t.sourceId,n=t.mainCode,o=t.style,a=t.maxColsOnRow,i=t.title,c=t.serverKey,u=this.state,l=u.dtmplConfig,s=u.id,f=u.dtmplData;return(0,k.Y)(v.Fragment,null,(0,k.Y)(m.A,{onClick:this.onClickBody,headStyle:{alignItems:"center"},title:i,style:oo({minWidth:1==a?"360px":"720px"},o),bodyStyle:{padding:"6px"},extra:(0,k.Y)(w.A,null,this.getFooter())},(0,k.Y)(Nr.A,{serverKey:c,showHeader:!1,mainCode:n,parentId:s,dtmplConfig:l,formRef:this.formRef,sourceId:r,onFinish:e,maxColsOnRow:a,showConfirm:!1,dtmplData:f,onValuesChange:this.onValuesChange})))}}]);var r,a}(v.PureComponent);(0,d.A)(uo,"contextType",x.U),(0,d.A)(uo,"defaultProps",{showConfirm:!1,okText:"确定"});var lo=["title","placement","width","onCancel","open"];function so(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,fo()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function fo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fo=function(){return!!t})()}var ho=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=so(this,e,[].concat(n)),(0,d.A)(t,"state",{}),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this.props,e=t.title,r=t.placement,n=t.width,o=t.onCancel,a=t.open,i=(0,c.A)(t,lo);return(0,k.Y)(xt.A,{title:e,placement:r,closable:!0,mask:!1,onClose:o,open:a,width:n,style:{maxWidth:"92vw"}},(0,k.Y)(Lt.A,i))}}])}(v.PureComponent);(0,d.A)(ho,"defaultProps",{showConfirm:!0,width:"76vw",forceRender:!0,style:{maxWidth:"92vw",maxHeight:"92vh"},okText:"确定",cancelText:"取消",placement:"left"});var po=["title","height","width","onCancel","open"];function vo(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,yo()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function yo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yo=function(){return!!t})()}var go=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=vo(this,e,[].concat(n)),(0,d.A)(t,"state",{}),(0,d.A)(t,"context",void 0),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this.props,e=t.title,r=t.height,n=t.width,o=t.onCancel,a=t.open,i=(0,c.A)(t,po),u=this.context.translate;return(0,k.Y)(Or.A,{open:a,width:n,title:e,closable:!1,bodyStyle:{height:r,overflow:"auto",padding:"6 0 6 6"},destroyOnClose:!0,centered:!0,onOk:o,onCancel:o,footer:[(0,k.Y)(g.Ay,{onClick:o},u("${关闭}"))]},(0,k.Y)(ge.Ay,{autoHide:!0,autoHideTimeout:1e3},(0,k.Y)(m.A,{bordered:!1,bodyStyle:{padding:"4px 10px 0 0"}},(0,k.Y)(Lt.A,i))))}}])}(v.PureComponent);(0,d.A)(go,"defaultProps",{showConfirm:!0,height:"82vh",width:"82vw",forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)",padding:10},okText:"确定",cancelText:"取消"}),(0,d.A)(go,"contextType",x.U),r(74712);var mo=r(30845);function wo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bo(){bo=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Ao(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,xo()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function xo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xo=function(){return!!t})()}r(68144),r(1157);var ko=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=Ao(this,e,[].concat(n)),(0,d.A)(t,"state",{openDrawer:!1}),(0,d.A)(t,"intervals",[]),(0,d.A)(t,"componentDidMount",(0,u.A)(bo().mark((function e(){return bo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.setState({openDrawer:!1});case 3:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"cardStyle",{height:"400px"}),(0,d.A)(t,"carouselStyle",{background:"#fff",borderRadius:"6px"}),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentWillUnmount",value:function(){if(this.intervals.length>0){var t,e=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return wo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wo(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(this.intervals);try{for(e.s();!(t=e.n()).done;){var r=t.value;clearInterval(r)}}catch(t){e.e(t)}finally{e.f()}}this.intervals=[]}},{key:"render",value:function(){var t=this.props.params;return this.state.openDrawer,n.A.setProgramCode4RoutePath(t),(0,k.Y)(v.Fragment,null,(0,k.Y)(W.A,{className:"home-page",gutter:{xs:4,sm:8,md:12,lg:16}},(0,k.Y)(Q.A,{span:24},(0,k.Y)(W.A,{style:{minHeight:"100px"},gutter:{xs:4,sm:8,md:12,lg:16}},(0,k.Y)(Q.A,{span:12,style:{width:"100%"}},(0,k.Y)($,{className:"hovercard"})),(0,k.Y)(Q.A,{span:12,style:{width:"100%"}},(0,k.Y)(P,{className:"hovercard"})))),(0,k.Y)(Q.A,{span:24},(0,k.Y)(W.A,{gutter:{xs:4,sm:8,md:12,lg:16}},(0,k.Y)(Q.A,{style:{width:"100%"}},(0,k.Y)(m.A,{className:"hovercard",title:(0,k.Y)(mo.A,{style:{fontSize:30}})},(0,k.Y)(W.A,{gutter:[{xs:4,sm:8,md:12,lg:16},{xs:4,sm:8,md:12,lg:16}]},(0,k.Y)(Q.A,{span:16,style:{height:"400px"},id:"echart1"}),(0,k.Y)(Q.A,{span:8,style:{height:"400px"},id:"echart2"}))))))))}}])}(v.Component),Lo=Ce(ko);function Co(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Oo(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Co(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Co(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Eo(){Eo=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}r(23605);var So=function(){return(0,s.A)((function t(){(0,l.A)(this,t)}),null,[{key:"post",value:(r=(0,u.A)(Eo().mark((function t(e,r,n){var o,a,i;return Eo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(o=new FormData).append("sourceId",e),o.append("jsonEntity",JSON.stringify(r)),t.next=5,K.A.super({url:this.url,serverKey:n,data:o,method:"POST"},"formdata",null);case 5:return a=t.sent,i=null,a?"success"===a.status&&(Kt.Ay&&(a.message?Kt.Ay.warning((0,nt.A)("${保存成功}!")+a.message,4):Kt.Ay.success((0,nt.A)("${保存成功}!"),1)),i=a.entityCode?a.entityCode:a.code):Kt.Ay&&Kt.Ay.error((0,nt.A)("${保存失败}!"),5),t.abrupt("return",{code:i,status:a?a.status:"error"});case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})},{key:"get",value:(e=(0,u.A)(Eo().mark((function t(e,r,n){var o;return Eo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,K.A.super({url:this.url,serverKey:n,query:Oo({pageSize:1e3,sourceId:e},r),method:"GET"},null,null);case 2:return(o=t.sent)?"success"===o.status?(Kt.Ay&&o.message&&Kt.Ay.warning((0,nt.A)("${查询成功}!")+o.message,4),o.entityCode?o.entityCode:o.code):o.message&&Kt.Ay.error((0,nt.A)("${查询失败}!")+o.message,5):Kt.Ay&&Kt.Ay.error((0,nt.A)("${查询失败}!"),5),t.abrupt("return",o||{status:"error"});case 6:case"end":return t.stop()}}),t,this)}))),function(t,r,n){return e.apply(this,arguments)})},{key:"delete",value:(t=(0,u.A)(Eo().mark((function t(e,r,n){var o;return Eo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,K.A.super({url:this.url,serverKey:n,query:{sourceId:e,codes:r},method:"DELETE"},null,null);case 2:return(o=t.sent)?"success"===o.status?(Kt.Ay&&o.message&&Kt.Ay.warning((0,nt.A)("${删除成功}!")+o.message,4),o.entityCode?o.entityCode:o.code):o.message&&Kt.Ay.error((0,nt.A)("${删除失败}!")+o.message,5):Kt.Ay&&Kt.Ay.error((0,nt.A)("${删除失败}!"),5),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t,this)}))),function(e,r,n){return t.apply(this,arguments)})}]);var t,e,r}();(0,d.A)(So,"url","/v3/mstruc/data"),r(78229);var Yo=r(95424)},1026:function(t,e,r){"use strict";r.d(e,{U:function(){return m},Y:function(){return b}});var n=r(42455),o=r(21745),a=r(50828),i=r(33227),c=r(17636),u=r(96540),l=r(94300),s=r(95424),f=r(92749),h=r(17437);function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){(0,a.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function v(){v=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(x=L);var C=A.prototype=w.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?g:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(C,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function y(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var m=(0,u.createContext)({locale:void 0,availableLang:[],langPkg:{},changeLocale:function(){},t:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.join("")},translate:function(t){var e,r=[],n="",o="",a=!1,i=y(t);try{for(i.s();!(e=i.n()).done;){var c=e.value;if("$"===c)a=!0,r.push(n),n="";else{if(a&&"{"===c)continue;a&&"}"===c?(r.push(o),a=!1,o=""):a?o+=c:n+=c}}}catch(t){i.e(t)}finally{i.f()}return r.push(n),r.join("")}}),w=function(){var t=(0,c.A)(v().mark((function t(e,r){var n,o,a;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("zh"!==(n=(0,s.EV)(e))){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,f.A.getLocale(n,r);case 5:if(o=t.sent,a=o.value,"success"!==o.status){t.next=10;break}return t.abrupt("return",a);case 10:return t.abrupt("return",{});case 11:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),b=function(t){var e=t.serverKey,r=void 0===e?"":e,n=t.children,a=(0,l.t)().navigatorLanguage,p=window.localStorage.getItem("locale"),g=JSON.parse(window.localStorage.getItem("langPkg")),b=(0,u.useState)(p||(0,s.oK)(a)),A=(0,i.A)(b,2),x=A[0],k=A[1],L=(0,u.useState)(g||{}),C=(0,i.A)(L,2),O=C[0],E=C[1],S=(0,u.useState)([]),Y=(0,i.A)(S,2),j=Y[0],P=Y[1],I=function(){var t=(0,c.A)(v().mark((function t(e){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:k(e);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),T=function(){var t=(0,c.A)(v().mark((function t(e){var r,n,o,a,i;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=d({},O),n=y(e),t.prev=2,n.s();case 4:if((o=n.n()).done){t.next=19;break}if(a=o.value,i=void 0,""!==a){t.next=13;break}return t.next=10,w(x);case 10:i=t.sent,t.next=16;break;case 13:return t.next=15,w(x,a);case 15:i=t.sent;case 16:void 0!==r[x]?Object.assign(r[x],i):r[x]=i;case 17:t.next=4;break;case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(2),n.e(t.t0);case 24:return t.prev=24,n.f(),t.finish(24);case 27:window.localStorage.setItem("locale",x),E(r);case 29:case"end":return t.stop()}}),t,null,[[2,21,24,27]])})));return function(e){return t.apply(this,arguments)}}();return(0,u.useEffect)((function(){Array.isArray(r)||(r=(0,o.A)(new Set(["",r]))),T((0,o.A)(new Set([""].concat((0,o.A)(r))))),f.A.getAllLang().then((function(t){"success"===t.status&&P(t.languages?t.languages.map((function(t){return(0,s.oK)(t)})):[])}))}),[x]),(0,u.useEffect)((function(){window.localStorage.setItem("langPkg",JSON.stringify(O))}),[O]),(0,h.Y)(m.Provider,{value:{locale:x,availableLang:j,langPkg:O,changeLocale:I,t:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if("zh"===x)return e.join("");for(var n="",o=!1,a=0,i=e;a<i.length;a++){var c=i[a],u=void 0===O[x]?void 0:O[x][c];if(void 0===u){o=!0;break}n+=u+" "}return o?e.join(""):n.slice(0,n.length-1)},translate:function(t){var e,r=[],n=[],o=!1,a="",i="",c=!1,u=y(t);try{for(u.s();!(e=u.n()).done;){var l=e.value;if("$"!==l||c){if(c&&"{"===l)continue;c&&"}"===l?(void 0===(void 0===O[x]?void 0:O[x][i])&&(o=!0),r.push(i),n.push(!0),c=!1,i=""):c?i+=l:a+=l}else c=!0,""!==a&&(r.push(a),a="",n.push(!1))}}catch(t){u.e(t)}finally{u.f()}if(""!==a&&(r.push(a),n.push(!1)),o)return r.join("");for(var s="",f=0;f<r.length;f++)n[f]?s+=(0!==f?" ":"")+O[x][r[f]]:s+=r[f];return s},getServiceLangStr:function(){return(0,s.EV)(x)}}},n)}},95424:function(t,e,r){"use strict";r.d(e,{EV:function(){return s},bs:function(){return f},oK:function(){return l}});var n=r(33227),o=r(99536),a=r(92187),i=r(13173),c={fr:["fra","fr-FR"],zh:["zh","zh-CN"],en:["en"]},u={fra:["fr","fr-FR"],zh:["zh","zh-CN"],en:["en"]},l=function(t){for(var e=0,r=Object.entries(c);e<r.length;e++){var o=(0,n.A)(r[e],2),a=o[0];if(o[1].findIndex((function(e){return e===t}))>-1)return a}return"zh"},s=function(t){for(var e=0,r=Object.entries(u);e<r.length;e++){var o=(0,n.A)(r[e],2),a=o[0];if(o[1].findIndex((function(e){return e===t}))>-1)return a}return"zh"},f={zh:a.A,fr:o.A,en:i.A}},48287:function(t,e){"use strict";function r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,a=function(){};return{s:a,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}e.A=function(t){var e=window.localStorage.getItem("locale"),n=JSON.parse(window.localStorage.getItem("langPkg"));if(!e||!n)return function(t){var e,n=[],o="",a="",i=!1,c=r(t);try{for(c.s();!(e=c.n()).done;){var u=e.value;if("$"!==u||i){if(i&&"{"===u)continue;i&&"}"===u?(n.push(a),i=!1,a=""):i?a+=u:o+=u}else i=!0,n.push(o),o=""}}catch(t){c.e(t)}finally{c.f()}return n.push(o),n.join("")}(t);var o,a=[],i=[],c=!1,u="",l="",s=!1,f=r(t);try{for(f.s();!(o=f.n()).done;){var h=o.value;if("$"!==h||s){if(s&&"{"===h)continue;s&&"}"===h?(void 0===(void 0===n[e]?void 0:n[e][l])&&(c=!0),a.push(l),i.push(!0),s=!1,l=""):s?l+=h:u+=h}else s=!0,""!==u&&(a.push(u),u="",i.push(!1))}}catch(t){f.e(t)}finally{f.f()}if(""!==u&&(a.push(u),i.push(!1)),c)return a.join("");for(var p="",d=0;d<a.length;d++)i[d]?p+=(0!==d?" ":"")+n[e][a[d]]:p+=a[d];return p}},94300:function(t,e,r){"use strict";r.d(e,{Y:function(){return c},t:function(){return i}});var n=r(33227),o=r(96540),a=r(1026),i=function(){var t,e=null===(t=window)||void 0===t?void 0:t.navigator,r=Boolean(e&&"language"in e),a=(0,o.useState)(null==e?void 0:e.language),i=(0,n.A)(a,2),c=i[0],u=i[1];return window.addEventListener("languagechange",(function(){e&&u(e.language)})),{isSupported:r,navigatorLanguage:c}},c=function(){var t=(0,o.useContext)(a.U),e=t.locale,r=(t.langPkg,t.changeLocale);return{getLocale:function(){return e},setLocale:function(t){r(t)},t:t.t,translate:t.translate,availableLang:t.availableLang}}},1157:function(t,e,r){"use strict";r.d(e,{A:function(){return L}});var n=r(42455),o=r(38452),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(69036),d=r(1849),v=r(45038),y=r(68144),g=r(92749),m=r(48287),w=r(17437),b=["placement","width","onCancel","open"];function A(){A=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(x=L);var C=b.prototype=m.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function x(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,k()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}var L=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=x(this,e,[].concat(n)),(0,f.A)(t,"state",{selectedAuths:[],loading:!0,role:void 0}),(0,f.A)(t,"loadData",(0,a.A)(A().mark((function e(){var r,n;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props.roleCode){e.next=3;break}return e.abrupt("return");case 3:return t.setState({loading:!0}),e.next=6,g.A.requestRoleAuths(r);case 6:n=e.sent,t.setState({loading:!1,selectedAuths:null==n?void 0:n.auths,role:null==n?void 0:n.role});case 8:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"saveAuth",(0,a.A)(A().mark((function e(){var r,n,o;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props,n=r.roleCode,o=r.onOk,e.next=3,g.A.postRoleAuths(n,t.state.selectedAuths);case 3:"success"==e.sent.status&&p.Ay.success((0,m.A)("${保存成功}!")),o&&o();case 6:case"end":return e.stop()}}),e)})))),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(A().mark((function t(e){var r,n;return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.props.roleCode,(n=e.roleCode)&&n==r){t.next=5;break}return t.next=5,this.loadData();case 5:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props,r=e.placement,n=e.width,a=e.onCancel,i=e.open,c=((0,o.A)(e,b),this.state),u=c.loading,l=c.role;return(0,w.Y)(d.A,{loading:u,title:null==l?void 0:l.name,placement:r,closable:!0,mask:!1,onClose:a,open:i,width:n,extra:[(0,w.Y)(v.Ay,{type:"primary",onClick:this.saveAuth},"保存")],style:{maxWidth:"92vw"}},(0,w.Y)(y.A,{checks:this.state.selectedAuths,onChange:function(e){t.setState({selectedAuths:e})}}))}}]);var r,n}(h.PureComponent);(0,f.A)(L,"defaultProps",{showConfirm:!0,width:"500",forceRender:!0,style:{maxWidth:"92vw",maxHeight:"92vh"},placement:"left",roleCode:void 0})},68455:function(t,e,r){"use strict";r.d(e,{A:function(){return p}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(96540),l=r(46675),s=r(17437);function f(t,e,r){return e=(0,i.A)(e),(0,a.A)(t,h()?Reflect.construct(e,r||[],(0,i.A)(t).constructor):e.apply(t,r))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(h=function(){return!!t})()}var p=function(t){function e(){return(0,n.A)(this,e),f(this,e,arguments)}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){return(0,s.Y)(l.A,this.props)}}])}(u.PureComponent)},46675:function(t,e,r){"use strict";r.d(e,{A:function(){return Y}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(45038),p=r(16044),d=r(37187),v=r(1849),y=r(28392),g=r(677),m=r(70870),w=r(46704),b=r(8130),A=r(92749),x=r(22503),k=r(35880),L=r(1026),C=r(17437);function O(){O=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function E(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,S()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(S=function(){return!!t})()}var Y=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t=E(this,e,[].concat(n)),(0,s.A)(t,"formRef",f.createRef()),(0,s.A)(t,"autoSaveTimer",-1e15),(0,s.A)(t,"autoSaveInterval",void 0),(0,s.A)(t,"onClickBody",(function(e){t.autoSaveTimer=0})),(0,s.A)(t,"state",{id:"modelDtmplEdit"+b.A.getRandomNum(6),dtmplConfig:void 0,queryingCode:void 0,loading:!0,serial:1,dtmplData:void 0}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"loadConfigData",(0,o.A)(O().mark((function e(){var r,n,o,a,i,c,u,l,s;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.props,a=o.sourceId,o.open,i=o.code,c=o.serverKey,u=o.addTmplId,t.setState({loading:!0}),l=void 0,!i){e.next=9;break}return e.next=6,w.A.requestDtmplConfig(c,a,i);case 6:l=e.sent,e.next=12;break;case 9:return e.next=11,w.A.requestAddDtmplConfig(c,a,u);case 11:l=e.sent;case 12:if(null===(r=l)||void 0===r||!r.entity||(null===(n=l)||void 0===n||null===(n=n.entity)||void 0===n?void 0:n.code)!=i){e.next=18;break}s=l.entity,l.entity=void 0,t.setState({dtmplData:s,id:i,loading:!1}),e.next=20;break;case 18:return e.next=20,t.loadData(l);case 20:t.setState({dtmplConfig:l,loading:!1});case 21:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"loadData",function(){var e=(0,o.A)(O().mark((function e(r){var n,o,a,i,c,u,l,s,f;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,o=n.sourceId,a=n.code,i=n.defaultDtmplData,c=n.open,u=n.serverKey,l=n.codeSource,c){e.next=3;break}return e.abrupt("return");case 3:if(r.autoSaveInterval&&r.autoSaveInterval>0&&(t.autoSaveInterval&&clearInterval(t.autoSaveInterval),t.autoSaveInterval=setInterval((function(){t.autoSaveTimer>=r.autoSaveInterval?(t.autoSaveTimer=-1e15,t.doSubmit(void 0)):t.autoSaveTimer=t.autoSaveTimer+1}),1e3)),(s=a)||!l){e.next=9;break}return e.next=8,A.A.queryCode(o,l,u);case 8:s=e.sent;case 9:if(!s){e.next=18;break}return t.setState({loading:!0,queryingCode:s,dtmplData:void 0}),e.next=13,A.A.getDtmplData(r,u,o,s);case 13:f=e.sent,t.state.queryingCode&&t.state.queryingCode!=f.code||f.sourceId&&t.props.sourceId!=f.sourceId||t.setState({dtmplData:f,id:s}),t.setState({loading:!1}),e.next=19;break;case 18:i?t.setState({dtmplData:i,loading:!1}):t.setState({dtmplData:{code:void 0,title:void 0,fieldMap:{},arrayMap:{}},loading:!1});case 19:setTimeout((function(){return t.onValuesChange()}),300);case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"onValuesChange",(function(){t.setState({serial:t.state.serial+1})})),(0,s.A)(t,"doSubmit",(function(e,r,n){var o=t.props.mainCode;t.formRef.current.setFieldsValue({actionId:e}),o&&t.formRef.current.setFieldsValue({mainCode:o}),n&&t.formRef.current.setFieldsValue(n),t.formRef.current.submit()})),(0,s.A)(t,"getFooter",(function(){var e=t.props,r=e.onCancel,n=e.serverKey,o=t.state,a=(o.dtmplData,o.serial),i=[],c=t.state.dtmplConfig,u=t.context.translate;return c&&c.buttons&&c.buttons.includes("dtmplSave")&&i.unshift((0,C.Y)(h.Ay,{type:"primary",onClick:function(){return t.doSubmit()}},u("${保存}"))),c&&c.actions.forEach((function(e,r){i.unshift((0,C.Y)(x.A,{serverKey:n,iconType:"icon-title",hiddenType:"disabled",serial:a,key:e.id,formRef:t.formRef,actionConfig:e,doAction:t.doSubmit}))})),i.unshift((0,C.Y)(p.A,{key:"back",placement:"topLeft",title:u("${确定要取消本次修改内容吗}?"),onConfirm:r,okText:u("${确定}"),cancelText:u("${取消}")},(0,C.Y)(h.Ay,null,u("${取消}")))),i})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(n=(0,o.A)(O().mark((function t(){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.props.open){t.next=3;break}return t.next=3,this.loadConfigData();case 3:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,o.A)(O().mark((function t(e){var r;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.state.dtmplConfig,!e||e==this.props){t.next=9;break}if(e.sourceId==this.props.sourceId&&e.code==this.props.code&&e.addTmplId==this.props.addTmplId&&null!=r){t.next=7;break}return t.next=5,this.loadConfigData();case 5:t.next=9;break;case 7:return t.next=9,this.loadData(r);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}},{key:"render",value:function(){var t=this.props,e=t.height,r=t.onOk,n=t.onCancel,o=(t.code,t.bodyWidth,t.sourceId),a=t.open,i=t.mainCode,c=t.width,u=t.pageType,l=t.placement,s=t.maxColsOnRow,h=t.title,p=t.serverKey,w=this.state,b=w.dtmplConfig,A=w.id,x=w.dtmplData,L=h||(b?b.title:"");return(0,C.Y)(f.Fragment,null," ","modal"==u?(0,C.Y)(d.A,{open:a,width:c,title:L,closable:!1,bodyStyle:{height:e,overflow:"auto"},destroyOnClose:!0,centered:!0,onCancel:n,footer:this.getFooter()},(0,C.Y)(k.Ay,{autoHide:!0,autoHideTimeout:1e3},(0,C.Y)("div",{onClick:this.onClickBody},(0,C.Y)(m.A,{serverKey:p,mainCode:i,parentId:A,dtmplConfig:b,formRef:this.formRef,sourceId:o,onFinish:r,maxColsOnRow:s,showConfirm:!1,dtmplData:x,onValuesChange:this.onValuesChange})))):"drawer"==u?(0,C.Y)(v.A,{onClick:this.onClickBody,title:L,placement:l,closable:!0,mask:!1,onClose:n,open:a,width:c,style:{maxWidth:1960},extra:(0,C.Y)(y.A,null,this.getFooter())},(0,C.Y)(m.A,{serverKey:p,mainCode:i,parentId:A,dtmplConfig:b,formRef:this.formRef,sourceId:o,onFinish:r,maxColsOnRow:s,showConfirm:!1,dtmplData:x,onValuesChange:this.onValuesChange})):(0,C.Y)(g.A,{title:L},(0,C.Y)(m.A,{serverKey:p,mainCode:i,parentId:A,dtmplConfig:b,formRef:this.formRef,sourceId:o,onFinish:r,maxColsOnRow:s,showConfirm:!1,dtmplData:x,onValuesChange:this.onValuesChange})))}}]);var r,n}(f.PureComponent);(0,s.A)(Y,"defaultProps",{showConfirm:!0,height:"76vh",width:"76vw",bodyWidth:"100%",forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"},okText:"确定",cancelText:"取消",pageType:"modal",placement:"left"}),(0,s.A)(Y,"contextType",L.U)},45705:function(t,e,r){"use strict";var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(76390),f=r(68455),h=r(17437);function p(t,e,r){return e=(0,i.A)(e),(0,a.A)(t,d()?Reflect.construct(e,r||[],(0,i.A)(t).constructor):e.apply(t,r))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}var v=function(t){function e(){var t;(0,n.A)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=p(this,e,[].concat(o)),(0,u.A)(t,"state",{showDtmplEdit:!1}),(0,u.A)(t,"goDtmpl",(function(){t.setState({showDtmplEdit:!0})})),(0,u.A)(t,"handleDtmplEdit",(function(e){t.setState({showDtmplEdit:!1})})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this,e=this.state.showDtmplEdit,r=this.props,n=r.sourceId,o=r.code,a=r.mainCode,i=r.editable,c=r.serverKey,u=r.codeSource,p=r.title,d=r.showHeader,v=r.addTmplId;return(0,h.Y)(l.Fragment,null,(0,h.Y)(s.A,{showHeader:d,title:p,codeSource:u,serverKey:c,goDtmpl:i?this.goDtmpl:null,sourceId:n,code:o,mainCode:a}),e?(0,h.Y)(f.A,{addTmplId:v,codeSource:u,serverKey:c,open:e,onCancel:function(){t.setState({showDtmplEdit:!1})},sourceId:n,code:o,onOk:this.handleDtmplEdit}):null)}}])}(l.PureComponent);(0,u.A)(v,"defaultProps",{editable:!0,showHeader:!0}),e.A=v},44920:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(1849),p=r(28392),d=r(45038),v=r(45705),y=r(17437);function g(){g=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(x=L);var C=A.prototype=w.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(C,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function m(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,w()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}var b=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=m(this,e,[].concat(n)),(0,s.A)(t,"state",{}),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(r=(0,o.A)(g().mark((function t(){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.title,r=t.sourceId,n=t.code,o=t.placement,a=t.open,i=t.onClose,c=t.width,u=t.cancelText,l=t.editable,s=t.serverKey,g=t.codeSource;return(0,y.Y)(h.A,{placement:o,title:(0,y.Y)(f.Fragment,null,e),closable:!0,mask:!1,onClose:i,open:a,width:c,style:{maxWidth:"92vw"},extra:(0,y.Y)(p.A,null,(0,y.Y)(d.Ay,{onClick:function(){return i()}},u))},(0,y.Y)(v.A,{codeSource:g,serverKey:s,editable:l,sourceId:r,code:n}))}}]);var r}(f.PureComponent);(0,s.A)(b,"defaultProps",{height:"82vh",width:"82vw",forceRender:!0,cancelText:"关闭",placement:"left",open:!1,editable:!0}),e.A=b},46935:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(8130),p=r(80112),d=r(46704),v=r(22733),y=r(46675),g=r(1849),m=r(28392),w=r(45038),b=r(56522),A=r(1026),x=r(17437);function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function L(){L=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function C(t,e,r){return e=(0,u.A)(e),(0,c.A)(t,O()?Reflect.construct(e,r||[],(0,u.A)(t).constructor):e.apply(t,r))}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}var E=function(t){function e(){var t;(0,a.A)(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t=C(this,e,[].concat(n)),(0,s.A)(t,"state",{ltmplConfigRes:void 0,pageNo:void 0,pageSize:void 0,criteriaData:void 0,showDtmplView:!1,showDtmplEdit:!1,showDtmplCustomEdit:!1,selectedCode:void 0,showDraw:!1,ractionId:void 0,collapse:!1,addTmplId:void 0}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"loadLtmplConfig",(0,o.A)(L().mark((function e(){var r,n,o,a,i,c;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props,n=r.sourceId,o=r.serverKey,e.next=3,d.A.requestLtmplConfig(o,n);case 3:(a=e.sent)&&(c=a.ltmplConfig.defaultCriteriaValue)&&(i=t.toCriteriaData(c)),t.setState({ltmplConfigRes:a,criteriaData:i});case 6:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"toCriteriaData",(function(t){var e={};if(t)for(var r in t)e[r]=h.A.configParamTrans(t[r]);return e.sequence=h.A.getRandomNum(6),e})),(0,s.A)(t,"showView",(function(e){t.setState({selectedCode:e,showDtmplView:!0})})),(0,s.A)(t,"doEdit",(function(e,r,n){var o=t.props.doCustomEdit;n?o?o(e,r,(function(){t.doSearch(t.state.criteriaData)})):t.setState({selectedCode:e,showDtmplCustomEdit:!0}):t.setState({selectedCode:e,showDtmplEdit:!0})})),(0,s.A)(t,"doRAction",(function(e,r){t.setState({selectedCode:r,showDraw:!0,ractionId:e})})),(0,s.A)(t,"doCreate",(function(e,r){var n=t.props.doCustomCreate;r?n?n((function(){t.doSearch(t.state.criteriaData)})):t.setState({selectedCode:null,showDtmplCustomEdit:!0}):t.setState({selectedCode:null,showDtmplEdit:!0,addTmplId:e})})),(0,s.A)(t,"closeDrawer",(function(){t.setState({showDraw:!1})})),(0,s.A)(t,"doSearch",(function(e){var r=t.props,n=r.sourceId,o=r.mainCode,a=r.collapsible,i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?k(Object(r),!0).forEach((function(e){(0,s.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e);o&&(i.mainCode=o),i.sourceId=n,a&&t.setState({collapse:!1}),t.setState({criteriaData:t.toCriteriaData(i)})})),(0,s.A)(t,"onChangePage",(function(e,r){t.setState({pageNo:e,pageSize:r})})),(0,s.A)(t,"handleDtmplEdit",(function(e){t.doSearch(t.state.criteriaData),t.setState({showDtmplEdit:!1})})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(n=(0,o.A)(L().mark((function t(){var e,r,n;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.loadLtmplConfig(),e=this.props,r=e.collapsible,n=e.initCollapse,r&&this.setState({collapse:n});case 3:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,o.A)(L().mark((function t(e){var r,n,o;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.props,n=r.sourceId,o=r.mainCode,e&&e.sourceId==n?o&&e.mainCode!=o&&this.loadLtmplConfig():this.loadLtmplConfig();case 2:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,r=this.state,n=r.ltmplConfigRes,o=r.criteriaData,a=r.pageSize,i=r.pageNo,c=r.showDtmplView,u=r.selectedCode,l=r.showDtmplEdit,s=r.showDtmplCustomEdit,h=r.ractionId,d=r.showDraw,A=r.collapse,k=r.addTmplId,L=this.props,C=L.sourceId,O=L.mainCode,E=L.showView,S=L.doSearch,Y=L.doRAction,j=L.funcMode,P=L.tip,I=L.title,T=L.collapsible,N=L.initCollapse,_=L.doCustomEdit,D=L.doCustomCreate,R=L.serverKey,F=L.readOnly,G=this.context.translate;if(n){var M=n.ltmplConfig,$=M.buttons,K=M.customEditPagePath;return(0,x.Y)(f.Fragment,null,(0,x.Y)(p.A,{readOnly:F,tip:P,serverKey:R,pageSize:a,pageNo:i,onChangePage:this.onChangePage,collapsible:T,initCollapse:N&&A,title:I,funcMode:j,mainCode:O,showView:E||this.showView,doRAction:Y||this.doRAction,doSearch:S||this.doSearch,doEdit:this.doEdit,doCreate:this.doCreate,sourceId:C,criteriaData:o,customEditable:!!_,customCreatable:!!D,ltmplConfig:n.ltmplConfig}),$.includes("detail")&&c?(0,x.Y)(v.A,{serverKey:R,open:c,onCancel:function(){t.setState({showDtmplView:!1})},mainCode:O,sourceId:C,code:u}," "):"",($.includes("dtmplEdit")||$.includes("dtmplAdd"))&&l?(0,x.Y)(y.A,{addTmplId:k,serverKey:R,open:l,onCancel:function(){t.setState({showDtmplEdit:!1})},sourceId:C,mainCode:O,code:u,onOk:this.handleDtmplEdit}):"",s?(0,x.Y)(b.A,{serverKey:R,open:s,onOk:function(){t.doSearch(t.state.criteriaData),t.setState({showDtmplCustomEdit:!1})},customPath:K,sourceId:C,mainCode:O,code:u}):"",d?(0,x.Y)(g.A,{placement:"left",title:G("${关联查询}"),closable:!0,mask:!1,onClose:this.closeDrawer,open:d,width:"calc(100% - 280px)",style:{maxWidth:1960},extra:(0,x.Y)(m.A,null,(0,x.Y)(w.Ay,{onClick:this.closeDrawer},G("${关闭}")))},(0,x.Y)(e,{serverKey:R,sourceId:h,mainCode:u})):null)}return(0,x.Y)(f.Fragment,null)}}]);var r,n}(f.PureComponent);(0,s.A)(E,"contextType",A.U),(0,s.A)(E,"defaultProps",{collapsible:!1,initCollapse:!1,readOnly:!1}),e.A=E},80112:function(t,e,r){"use strict";r.d(e,{A:function(){return te}});var n=r(42455),o=r(62477),a=r(21745),i=r(17636),c=r(44274),u=r(2532),l=r(63549),s=r(91985),f=r(11504),h=r(50828),p=r(96540),d=r(39356),v=r(37977),y=r(45038),g=r(28392),m=r(16044),w=r(28073),b=r(91196),A=r(47152),x=r(16370),k=r(677),L=r(36552),C=r(45806),O=r(29197),E=r(30234),S=r(8597),Y=r(11058),j=r(92295),P=r(40261),I=r(25714),T=r(39277),N=r(57046),_=r(93598),D=r(42877),R=r(49237),F=r(39822),G=r(77028),M=r(40756),$=r(84890),K=r(71822),B=r(25668),q=r(13341),V=r(80581),U=r(21426),H=r(54763),z=r(92749),W=r(33958),Q=r(11733),J=r(74712),X=r(8130),Z=r(61021),tt=r(53357),et=r(94300),rt=r(17437);function nt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ot(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ot(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function at(t,e,r){return e=(0,s.A)(e),(0,l.A)(t,it()?Reflect.construct(e,r||[],(0,s.A)(t).constructor):e.apply(t,r))}function it(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(it=function(){return!!t})()}var ct=(0,Z.Zj)((function(t){var e=t.value,r=t.index,n=t.disabledColIds,o=(0,et.Y)().translate;return(0,rt.Y)(x.A,{key:r,span:24},(0,rt.Y)(b.A,{disabled:n.includes(e.id),value:e.id},(0,rt.Y)(ut,null)," ",o("${"+e.title+"}")))})),ut=(0,Z.D)((function(){return(0,rt.Y)(O.A,{style:{cursor:"grab",color:"#999"}})})),lt=(0,Z.q6)((function(t){var e=t.items,r=t.selected,n=t.onChange,o=t.disabledColIds;return(0,rt.Y)(b.A.Group,{value:r,onChange:n},(0,rt.Y)(A.A,{style:{width:"148px"}},e.map((function(t,e){return(0,rt.Y)(ct,{key:"item-".concat(t.id),index:e,value:t,disabledColIds:o})}))))})),st=function(t){function e(){var t;(0,c.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=at(this,e,[].concat(n)),(0,h.A)(t,"onChange",(function(e){var r,n=t.props,o=n.onChangeHiddenCols,a=n.columns,i=n.ignoredColIds,c=[],u=nt(a);try{for(u.s();!(r=u.n()).done;){var l=r.value;0==e.length||e.includes(l.id)||i.includes(l.id)||c.push(l.id)}}catch(t){u.e(t)}finally{u.f()}o(c)})),(0,h.A)(t,"onSortEnd",(function(e){var r=e.oldIndex,n=e.newIndex,o=t.props,a=o.columns,i=o.onChangeColSort;r!==n&&i((0,tt.p)([].concat(a),r,n).filter((function(t){return!!t})))})),t}return(0,f.A)(e,t),(0,u.A)(e,[{key:"render",value:function(){var t=this.props,e=t.hiddenColIds,r=t.columns,n=t.disabledColIds,o=[];if(r){var a,i=nt(r);try{for(i.s();!(a=i.n()).done;){var c=a.value;e&&e.includes(c.id)||o.push(c.id)}}catch(t){i.e(t)}finally{i.f()}}return(0,rt.Y)(lt,{disabledColIds:n,helperClass:"row-dragging",items:r,selected:o,onChange:this.onChange,onSortEnd:this.onSortEnd})}}])}(p.PureComponent);(0,h.A)(st,"defaultProps",{ignoredColIds:[]});var ft=st,ht=r(50770),pt=r(7142),dt=r(6754),vt=r(19612),yt=r(1026);function gt(t,e,r){return e=(0,s.A)(e),(0,l.A)(t,mt()?Reflect.construct(e,r||[],(0,s.A)(t).constructor):e.apply(t,r))}function mt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mt=function(){return!!t})()}var wt=ht.Ay.Group,bt=function(t){function e(){var t;(0,c.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=gt(this,e,[].concat(n)),(0,h.A)(t,"state",{interrupted:!1,disabledPageNoInput:!1,disabledCurrentPageRadio:!1,disabledAllPageRadio:!1,exportId:void 0,startPageNo:1,endPageNo:10,exportMode:"all",percent:0,exportStatus:"ready",exportingMsg:""}),(0,h.A)(t,"context",void 0),(0,h.A)(t,"onChangeRadio",(function(e){t.setState({exportMode:e.target.value,startPageNo:1,endPageNo:10})})),(0,h.A)(t,"timerID",void 0),(0,h.A)(t,"setInerval",(function(e){t.timerID&&clearInterval(t.timerID),t.timerID=e})),(0,h.A)(t,"handleStart",(function(){var e=t.props,r=e.queryKey,n=e.currentPage,o=(e.title,e.serverKey),a=t.state,i=a.startPageNo,c=a.endPageNo,u=a.exportMode;t.setState({exportStatus:"ready"});var l=t.context.getServiceLangStr;vt.A.super({url:"/v3/ltmp/data/exporter",serverKey:o,method:"GET",query:{language:l(),scope:u,withDetail:!1,queryKey:r.key,startPageNo:"page"==u?i:null==n?void 0:n.pageNo,endPageNo:"page"==u?c:null==n?void 0:n.pageNo}}).then((function(e){e.exportId?(t.setState({exportId:e.exportId,exportStatus:"exporting"}),t.statusOut(e.exportId),t.setInerval(setInterval((function(){return t.statusOut(e.exportId)}),2e3))):t.setState({exportStatus:"fail"})}))})),(0,h.A)(t,"statusOut",(function(e){var r=t.props.serverKey,n=t.state.exportStatus;vt.A.super({url:"/v3/exporter/status",serverKey:r,query:{interrupted:"stop"==n,exportId:e},method:"GET"},"","none").then((function(e){"error"==e.status?(clearInterval(t.timerID),console.log(e.statusMsg,t.timerID),t.setState({exportingMsg:e.statusMsg,exportStatus:"stop",percent:0})):e.breaked?(clearInterval(t.timerID),t.setState({exportingMsg:"已终止",exportStatus:"stop",percent:0})):t.setState({exportingMsg:e.statusMsg,percent:Math.floor(e.current/e.totalCount*100)}),"stop"==n&&clearInterval(t.timerID),!0===e.completed&&(clearInterval(t.timerID),t.setState({exportStatus:"success",exportingMsg:e.statusMsg,percent:Math.floor(e.current/e.totalCount*100)}))}))})),(0,h.A)(t,"download",(function(){var e=t.props,r=e.title,n=e.serverKey,o=t.state.exportId,a=X.A.hydrocarbonToken();X.A.downloadFile(X.A.joinPath(X.A.api(n),"/v3/exporter/excel?exportId=".concat(o,"&@token=").concat(a,"&@programToken=").concat(X.A.programCode(n))),r)})),(0,h.A)(t,"handleCancel",(function(){t.setState({percent:0,exportStatus:"stop",exportId:void 0})})),t}return(0,f.A)(e,t),(0,u.A)(e,[{key:"componentWillUnmount",value:function(){console.log("销毁")}},{key:"shouldComponentUpdate",value:function(t,e){return t&&t.queryKey&&this.props.queryKey&&this.props.queryKey.key!=t.queryKey.key&&this.setState({exportStatus:"ready",percent:0,exportingMsg:""}),!0}},{key:"render",value:function(){var t=this,e=this.props,r=e.defaultExportMode,n=(e.currentPage,this.state),o=n.startPageNo,a=n.endPageNo,i=n.disabledPageNoInput,c=n.exportMode,u=n.exportStatus,l=n.percent,s=n.exportingMsg,f=this.context.translate;return(0,rt.Y)("div",{style:{width:"400px"},className:"exportFrame"},(0,rt.Y)(p.Fragment,null,(0,rt.Y)(wt,{onChange:this.onChangeRadio,value:c,defaultValue:r},(0,rt.Y)(ht.Ay,{value:"current",disabled:"exporting"==u},f("${当前页}")),(0,rt.Y)(ht.Ay,{value:"page",disabled:"exporting"==u},f("${多页}")),(0,rt.Y)(ht.Ay,{value:"all",disabled:"exporting"==u},f("${全部}"))),(0,rt.Y)(L.A,null)),"page"==c?(0,rt.Y)("div",null,f("${页号}:"),(0,rt.Y)(pt.A,{min:1,value:o,placeholder:f("${开始页号}"),onChange:function(e){return t.setState({startPageNo:e})},disabled:i}),"-",(0,rt.Y)(pt.A,{min:1,value:a,placeholder:f("${结束页号}"),onChange:function(e){return t.setState({endPageNo:e})},disabled:i}),(0,rt.Y)(L.A,null)):"",(0,rt.Y)("div",null,"ready"==u?(0,rt.Y)(p.Fragment,null,(0,rt.Y)(y.Ay,{type:"primary",onClick:this.handleStart},f("${开始导出}"))):"exporting"==u?(0,rt.Y)(y.Ay,{onClick:this.handleCancel},f("${取消导出}")):(0,rt.Y)(y.Ay,{onClick:this.handleStart},f("${重新导出}")),"success"==u?(0,rt.Y)(y.Ay,{type:"primary",style:{marginLeft:10},disabled:"success"!=u,onClick:this.download},f("${下载文件}")):"",l>0?(0,rt.Y)(dt.A,{percent:l,size:"small",status:"active"}):"",(0,rt.Y)("p",null,f("${"+s+"}"))))}}])}(p.PureComponent);(0,h.A)(bt,"defaultProps",{defaultExportMode:"all"}),(0,h.A)(bt,"contextType",yt.U);var At=r(46704);function xt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xt(Object(r),!0).forEach((function(e){(0,h.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Lt(){Lt=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Ct(t,e,r){return e=(0,s.A)(e),(0,l.A)(t,Ot()?Reflect.construct(e,r||[],(0,s.A)(t).constructor):e.apply(t,r))}function Ot(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ot=function(){return!!t})()}var Et=function(t){function e(){var t;(0,c.A)(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t=Ct(this,e,[].concat(n)),(0,h.A)(t,"state",{pageNo:void 0,pageSize:void 0,ltmplConfigRes:void 0,criteriaData:{}}),(0,h.A)(t,"loadData",function(){var e=(0,i.A)(Lt().mark((function e(r){var n,o,a,i;return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props,o=n.sourceId,a=n.serverKey,e.next=3,At.A.requestL2LtmplConfig(a,o);case 3:i=e.sent,t.setState({ltmplConfigRes:i,criteriaData:r});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,h.A)(t,"doSearch",(function(e){var r=t.props,n=r.sourceId,a=r.innerQueryKey,i=kt({},e);(0,o.A)(t.state),i.innerQueryKey=a,i.sourceId=n,t.setState({criteriaData:i})})),(0,h.A)(t,"onChangePage",(function(e,r){t.setState({pageNo:e,pageSize:r})})),t}return(0,f.A)(e,t),(0,u.A)(e,[{key:"componentDidMount",value:(n=(0,i.A)(Lt().mark((function t(){var e,r,n,o;return Lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.state.criteriaData,r=this.props,n=r.sourceId,o=r.innerQueryKey,e.innerQueryKey=o,e.sourceId=n,this.loadData(e);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,i.A)(Lt().mark((function t(e){var r,n,o,a,i,c,u,l;return Lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.props,n=r.sourceId,o=r.innerQueryKey,a=e.sourceId,i=e.innerQueryKey,c=this.state.criteriaData,n&&n!=a?((u={}).innerQueryKey=o,u.sourceId=n,this.loadData(u)):o!=i&&((l=kt({},c)).innerQueryKey=o,this.setState({criteriaData:l}));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state,e=t.ltmplConfigRes,r=t.criteriaData,n=t.pageNo,o=t.pageSize,a=this.props,i=a.sourceId,c=a.serverKey;return e?(0,rt.Y)(te,{serverKey:c,pageSize:o,pageNo:n,onChangePage:this.onChangePage,doSearch:this.doSearch,level:"l2",criteriaData:r,sourceId:i,ltmplConfig:e.ltmplConfig}):""}}]);var r,n}(p.PureComponent),St=Et,Yt=r(22503),jt=r(89467),Pt=r(47852),It=r(56679),Tt=r(43455);function Nt(){Nt=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function _t(t,e,r){return e=(0,s.A)(e),(0,l.A)(t,Dt()?Reflect.construct(e,r||[],(0,s.A)(t).constructor):e.apply(t,r))}function Dt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Dt=function(){return!!t})()}var Rt=function(t){function e(){var t;(0,c.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=_t(this,e,[].concat(n)),(0,h.A)(t,"state",{popoverOpen:!1,loading:!1}),(0,h.A)(t,"context",void 0),(0,h.A)(t,"formRef",p.createRef()),(0,h.A)(t,"onRestat",function(){var e=(0,i.A)(Nt().mark((function e(r){var n,o,a,i;return Nt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props,o=n.sourceId,a=n.onfinish,i=n.serverKey,t.setState({loading:!0}),e.next=4,z.A.increCalc(i,o,r);case 4:t.setState({loading:!1}),a();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t}return(0,f.A)(e,t),(0,u.A)(e,[{key:"render",value:function(){var t=this,e=this.state,r=e.popoverOpen,n=e.loading,o=this.props,a=o.fields,i=o.value,c=o.serverKey,u=this.context.translate;return(0,rt.Y)(w.A,{open:r,content:(0,rt.Y)(k.A,{loading:n,style:{width:1e3},title:u("${重新统计}"),bodyStyle:{overflow:"auto"},extra:(0,rt.Y)(p.Fragment,null,(0,rt.Y)(g.A,{size:[8,0]},(0,rt.Y)(y.Ay,{type:"primary",onClick:function(){t.formRef.current.submit()}},u("${确定}")),(0,rt.Y)(y.Ay,{onClick:function(){t.setState({popoverOpen:!1})}},(0,rt.Y)(Pt.A,null))))},(0,rt.Y)(jt.A,{labelWrap:!0,ref:this.formRef,name:"control-hooks",onFinish:this.onRestat},(0,rt.Y)(Tt.A,{serverKey:c,nameAttr:"id",fields:a,valueMap:i}))),placement:"bottomLeft",trigger:"click"},(0,rt.Y)(v.A,{title:u("${重新统计}")},(0,rt.Y)(y.Ay,{onClick:function(){t.setState({popoverOpen:!r})}},(0,rt.Y)(It.A,null))))}}])}(p.PureComponent);(0,h.A)(Rt,"defaultProps",{}),(0,h.A)(Rt,"contextType",yt.U);var Ft=Rt,Gt=r(27251),Mt=r(1490),$t=r(13050),Kt=r(84957),Bt=r(1157);function qt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Vt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function Vt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ut(){Ut=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Ht(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ht(Object(r),!0).forEach((function(e){(0,h.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ht(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Wt(t,e,r){return e=(0,s.A)(e),(0,l.A)(t,Qt()?Reflect.construct(e,r||[],(0,s.A)(t).constructor):e.apply(t,r))}function Qt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qt=function(){return!!t})()}var Jt=(0,Z.D)((function(){return(0,rt.Y)(O.A,{style:{cursor:"grab",color:"#999"}})})),Xt=(d.A.Panel,["20000","10000"]),Zt=function(t){function e(){var t;(0,c.A)(this,e);for(var r=arguments.length,n=new Array(r),u=0;u<r;u++)n[u]=arguments[u];return t=Wt(this,e,[].concat(n)),(0,h.A)(t,"state",{sortedColConfigs:void 0,queryKey:void 0,loading:!0,disableCols:void 0,hiddenColIds:Xt,selectedRows:[],selectedDatas:[],hiddenRowCodes:[],viewModels:[],drillingColIds:void 0,disabledColIds:void 0,showL2ActTable:!1,showL2Chart:!1,recordCode:void 0,blockMenuTreeDrawerOpen:!1}),(0,h.A)(t,"context",void 0),(0,h.A)(t,"loadData",function(){var e=(0,i.A)(Ut().mark((function e(r,n,o){var i,c,u,l,s,f,h,p,d,v,y,g,m,w,b;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.props,c=i.sourceId,u=i.criteriaData,l=i.ltmplConfig,s=i.mainCode,f=i.level,h=i.pageNo,p=i.pageSize,d=i.serverKey,l){e.next=3;break}return e.abrupt("return");case 3:if(t.setState({loading:!0}),v=[],y=(0,a.A)(r),u&&u.drillingColIds&&(g=(0,a.A)(u.drillingColIds),l.columns.forEach((function(t){"dimension"!=t.statColType||g.includes(t.id)||y.includes(t.id)||(y.push(t.id),v.push(t.id)),"dimension"!=t.statColType||g.includes(t.id)||v.includes(t.id)||v.push(t.id)})),y=y.filter((function(t){return!g.includes(t)}))),l.columns.forEach((function(t){t.hidden&&y.push(t.id)})),m=l.defaultPageSize,w={pageNo:h||1,pageSize:p||m||10,virtualEndPageNo:void 0},!f||"l2"!=f){e.next=16;break}return e.next=13,z.A.requestL2LtmplQueryKey(d,c,zt(zt(zt({},u),w),{},{mainCode:s}));case 13:b=e.sent,e.next=19;break;case 16:return e.next=18,z.A.requestLtmplQueryKey(d,c,zt(zt(zt({},u),w),{},{mainCode:s}));case 18:b=e.sent;case 19:b.sourceId&&b.sourceId!=t.props.sourceId||t.setState({disabledColIds:v,hiddenColIds:y,hiddenRowCodes:n,sortedColConfigs:o,queryKey:b,showL2Chart:!1,selectedRows:[],selectedDatas:[],viewModels:t.state.viewModels.length>0?t.state.viewModels:["table"]}),t.setState({loading:!1});case 21:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,h.A)(t,"buildTableColumns",(function(e,r,n,o){var a=t.props,c=a.showView,u=a.doEdit,l=a.doRAction,s=a.customEditable,f=a.serverKey,h=a.readOnly,d=a.sourceId,w=t.context.translate,b=e.buttons,A=e.builtInButtons,x=[],k=0,L=o||e.columns,C=0;return L.forEach((function(o){var a={};r&&r.includes(o.id)||x.push(a),a.title=o.title,a.dataIndex=o.id,o.colWidth&&(a.width=o.colWidth),o.statColType&&(a.statColType=o.statColType),o.aggFunc&&(a.cal=o.aggFunc),o.order&&(a.order=Number(o.order)),k++;var L=H.A.getSupportControlType(o);k<12&&"操作"!=o.title&&"序号"!=o.title&&r.includes("10000")&&U.A.sort(a,L),"序号"===o.title?(a.width=o.colWidth?o.colWidth:50,a.title=w("${序号}"),a.align=o.valueAlign?o.valueAlign:"center",a.render=function(t,e,r){return(0,rt.Y)("label",null,r+1)},o.sorter=void 0):"10000"==o.id?(a.title=(0,rt.Y)(v.A,{title:w("${拖拽排序}")},w("${"+o.title+"}")),a.width=30,a.dataIndex=o.id,a.className="drag-visible",a.render=function(){return(0,rt.Y)(Jt,null)}):"20000"==o.id?(a.align="center",a.width=40,a.title=(0,rt.Y)(p.Fragment,null,n.length>0?(0,rt.Y)(v.A,{title:w("${取消隐藏}")},(0,rt.Y)(y.Ay,{style:{marginRight:"0px"},size:"small",shape:"circle",icon:(0,rt.Y)(E.A,null),type:"text",onClick:function(){return t.unHiden()}})):""),a.render=function(e,r){return(0,rt.Y)(v.A,{title:w("${隐藏}")}," ",(0,rt.Y)(y.Ay,{style:{marginRight:"0px"},icon:(0,rt.Y)(S.A,null),type:"dashed",size:"small",onClick:function(){return t.onHide(r.code)}}))}):"操作"===o.title?(a.fixed="right",a.align="center",a.width=o.colWidth?o.colWidth:160,a.className="opsColumn",a.title=(0,rt.Y)(p.Fragment,null,w("${操作}")),a.render=function(r,n){return(0,rt.Y)(g.A,{size:[0,4],wrap:!0},b.includes("detail")&&c?(0,rt.Y)(y.Ay,{size:"small",type:"primary",icon:(0,rt.Y)(Y.A,null),onClick:function(){return c(n.code)}}):"",b.includes("customDetail")&&c?(0,rt.Y)(y.Ay,{size:"small",type:"primary",icon:(0,rt.Y)(j.A,null),onClick:function(){return c(n.code,!0)}}):"",!b.includes("dtmplEdit")||!u||h||e.editAction&&!Gt.A.isShow(e.editAction,[n],void 0)?"":(0,rt.Y)(y.Ay,{size:"small",type:"dashed",icon:(0,rt.Y)(P.A,null),onClick:function(){return u(n.code,"update")}}),null!=A&&A.includes("blockAuthMenuTree")&&!h?(0,rt.Y)(y.Ay,{size:"small",type:"dashed",icon:(0,rt.Y)(I.A,{rotate:180,style:{color:"#f5222d",marginRight:"4px"}}),onClick:function(){return t.setState({blockMenuTreeDrawerOpen:!0,recordCode:n.code})}}):"",!b.includes("dtmplCustomEdit")&&!s||!u||h||e.editAction&&!Gt.A.isShow(e.editAction,[n],void 0)?"":(0,rt.Y)(y.Ay,{size:"small",type:"dashed",icon:(0,rt.Y)(T.A,null),onClick:function(){return u(n.code,"update",!0)}}),b.includes("copy")&&u&&!h?(0,rt.Y)(v.A,{title:w("${复制}")},(0,rt.Y)(y.Ay,{size:"small",type:"dashed",icon:(0,rt.Y)(N.A,null),onClick:(0,i.A)(Ut().mark((function t(){var e,r;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=!1,(b.includes("dtmplCustomEdit")||s)&&(e=!0),t.next=4,z.A.doCopy(f,d,n.code);case 4:(r=t.sent)&&u(r,"update",e);case 6:case"end":return t.stop()}}),t)})))})):"",e.ractions&&!h?e.ractions.map((function(t){return(0,rt.Y)(y.Ay,{key:t.id,size:"small",type:"dashed",onClick:function(){return l(t.id,n.code)}},w("${"+t.title+"}"))})):"",e.rowActions&&!h&&e.rowActions.length>0?e.rowActions.map((function(e){return(0,rt.Y)(Yt.A,{serverKey:f,iconType:"icon",key:e.id,data:[n],actionConfig:e,doAction:t.doRowAction,buttonSize:"small",serial:1})})):"",e.rowJumps&&e.rowJumps.length>0&&!h?e.rowJumps.map((function(e){return(0,rt.Y)(y.Ay,{key:e.id,size:"small",type:"dashed",onClick:function(){return t.doRowJump(e,n)}},w("${"+e.title+"}"))})):"",e.rowCQuerys&&e.rowCQuerys.length>0&&!h?e.rowCQuerys.map((function(t){return(0,rt.Y)(Mt.A,{serverKey:f,key:t.id,size:"small",pageType:"drawer",cQueryConfig:t,mainCode:t.mainCodeColId?n[t.mainCodeColId]:n.code})})):"",!b.includes("singleDelete")||h||e.deleteAction&&!Gt.A.isShow(e.deleteAction,[n],void 0)?"":(0,rt.Y)(m.A,{placement:"rightBottom",title:w("${确定要[删除]此数据吗}?"),onConfirm:function(){t.doDeleteByCode(n.code)},okText:w("${确定}"),cancelText:w("${取消}"),okType:"danger"},(0,rt.Y)(y.Ay,{size:"small",type:"dashed",danger:!0},(0,rt.Y)(_.A,null))))}):(C++,a.className="opsColumn",a.title=w("${"+o.title+"}"),a.width=o.colWidth?o.colWidth:160,a.ellipsis={showTitle:!0},a.align=o.valueAlign?o.valueAlign:"left",e.leftFixedCols&&e.leftFixedCols>=C?a.fixed="left":a.fixed=!!o.colFixed&&("right"==o.colFixed?"right":"left"),a.render=function(t,e){return(0,rt.Y)(J.A,{serverKey:f,fieldConfig:o,value:e[o.id],holderType:"table"})})})),console.log(x),x})),(0,h.A)(t,"handleShowChart",(function(){t.setState({showL2Chart:!t.state.showL2Chart})})),(0,h.A)(t,"handleDataAnalysis",(function(){t.setState({showL2ActTable:!t.state.showL2ActTable})})),(0,h.A)(t,"unHiden",(function(){t.props.ltmplConfig;var e=t.state;e.hiddenColIds,e.sortedColConfigs,t.setState({hiddenRowCodes:[]})})),(0,h.A)(t,"onHide",(function(e){t.props.ltmplConfig;var r=t.state,n=r.hiddenRowCodes,o=(r.hiddenColIds,r.sortedColConfigs,[].concat((0,a.A)(n),[e]));t.setState({hiddenRowCodes:o})})),(0,h.A)(t,"changeViewModel",(function(e){t.setState({viewModels:e})})),(0,h.A)(t,"changeHiddenColumns",(function(e){(0,o.A)(t.props),(0,o.A)(t.state),t.setState({showL2Chart:!1,hiddenColIds:e})})),(0,h.A)(t,"doSelectedAction",function(){var e=(0,i.A)(Ut().mark((function e(r,n,o){var a;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=t.state.selectedRows,t.doAction(r,a,o);case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,h.A)(t,"doAction",function(){var e=(0,i.A)(Ut().mark((function e(r,n,o){var a,i,c,u,l;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.props.serverKey,i=t.state,c=i.hiddenColIds,u=i.hiddenRowCodes,l=i.sortedColConfigs,t.setState({loading:!0}),e.next=5,z.A.postActions(a,r,n,o);case 5:e.sent?t.loadData(c,u,l):t.setState({loading:!1});case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,h.A)(t,"doRowAction",function(){var e=(0,i.A)(Ut().mark((function e(r,n,o){return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.doAction(r,[{title:void 0,code:n[0]}],o);case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,h.A)(t,"doDelete",(0,i.A)(Ut().mark((function e(){var r,n,o,a,i,c,u,l;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props,n=r.sourceId,o=r.serverKey,a=t.state,i=a.selectedRows,c=a.hiddenColIds,u=a.hiddenRowCodes,l=a.sortedColConfigs,t.setState({loading:!0}),e.next=5,z.A.deleteData(o,n,i);case 5:e.sent?t.loadData(c,u,l):t.setState({loading:!1});case 7:case"end":return e.stop()}}),e)})))),(0,h.A)(t,"doDeleteByCode",function(){var e=(0,i.A)(Ut().mark((function e(r){var n,o,a,i,c,u,l;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props,o=n.sourceId,a=n.serverKey,i=t.state,c=i.hiddenColIds,u=i.hiddenRowCodes,l=i.sortedColConfigs,t.setState({loading:!0}),e.next=5,z.A.deleteByCode(a,o,[r]);case 5:e.sent?t.loadData(c,u,l):t.setState({loading:!1});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,h.A)(t,"doSelectedCQuery",function(){var t=(0,i.A)(Ut().mark((function t(e){return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,h.A)(t,"doJump",function(){var t=(0,i.A)(Ut().mark((function t(e,r){var n,o,a,i,c,u,l,s,f,h,p,d,v,y,g,m,w;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=r.fieldMap?r.fieldMap:r,o=null,(a=e.path)||(a="/"),0==a.indexOf("#")||0==o.indexOf("/#")?o="":0==a.indexOf("http://")||0==a.indexOf("HTTP://")||0==a.indexOf("https://")||0==a.indexOf("HTTPS://")?(o=a.split("//")[0]+"//",a=a.split("//")[1]):o=new URL(window.location.href).pathname,i=a.split("/"),!(c=e.routeParams)){t.next=37;break}u=0;case 9:if(!(u<i.length)){t.next=34;break}if(0!=i[u].indexOf(":")){t.next=31;break}l=i[u].substring(1),s=qt(c),t.prev=13,s.s();case 15:if((f=s.n()).done){t.next=23;break}if(!(h=f.value)||l!=h.title){t.next=21;break}return p=n[h.id]?n[h.id]:h.defaultValue,i[u]=p,t.abrupt("break",23);case 21:t.next=15;break;case 23:t.next=28;break;case 25:t.prev=25,t.t0=t.catch(13),s.e(t.t0);case 28:return t.prev=28,s.f(),t.finish(28);case 31:u++,t.next=9;break;case 34:o=X.A.joinPath(o,i.join("/")),t.next=38;break;case 37:o=X.A.joinPath(o,a);case 38:if(d=e.searchParams,v=[],e.tokenName&&(v[0]=e.tokenName+"="+X.A.hydrocarbonToken()),d)for(y=v.length,g=0;g<d.length;g++)m=d[g],(w=n[m.id]?n[m.id]:m.defaultValue)||"code"!=m.title||(w=r.code),v[y+g]=m.title+"="+w;v.length>0&&(o.indexOf("?")!=o.length-1&&(o+="?"),o+=v.join("&")),0==o.indexOf("#")||0==o.indexOf("/#")||0==o.indexOf("//#")?window.location.hash=o.substring(o.indexOf("#")+1):window.open(o);case 44:case"end":return t.stop()}}),t,null,[[13,25,28,31]])})));return function(e,r){return t.apply(this,arguments)}}()),(0,h.A)(t,"doRowJump",function(){var e=(0,i.A)(Ut().mark((function e(r,n){return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.doJump(r,n);case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,h.A)(t,"doSelectedJump",function(){var e=(0,i.A)(Ut().mark((function e(r){var n;return Ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:1==(n=t.state.selectedDatas).length&&t.doJump(r,n[0]);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,h.A)(t,"changeRowSelection",(function(e,r){t.setState({selectedRows:e,selectedDatas:r})})),(0,h.A)(t,"onChangeColSort",(function(e){t.props.ltmplConfig;var r=t.state;r.hiddenRowCodes,r.hiddenColIds,t.setState({sortedColConfigs:e})})),(0,h.A)(t,"getAddTmplButton",(function(e){var r=t.context.translate;return e&&e.length<1?r("${没有分类添加按钮}"):e.map((function(e){return(0,rt.Y)("p",null,(0,rt.Y)(y.Ay,{size:"small",type:"text",onClick:function(){return t.props.doCreate(e.id,!1)}},e.title))}))})),(0,h.A)(t,"renderHeaderButtons",(function(){var e=t.state,r=e.hiddenColIds,n=e.queryKey,o=e.viewModels,a=e.sortedColConfigs,i=e.disabledColIds,c=e.showL2Chart,u=e.showL2ActTable,l=t.props,s=l.ltmplConfig,f=l.sourceId,h=l.doCreate,d=l.doSearch,m=l.menuId,k=l.funcMode,L=l.customCreatable,C=l.serverKey,O=l.readOnly,E=l.pageNo,S=l.pageSize,Y=t.context.translate,j=s.buttons;return(0,rt.Y)(p.Fragment,null,(0,rt.Y)(g.A,null,"common"==k&&t.criteriaFormUseful()?(0,rt.Y)(w.A,{trigger:"click",content:t.renderCriteriaForm()},(0,rt.Y)(y.Ay,null,(0,rt.Y)(D.A,null))):null,j.includes("dtmplAdd")&&h&&!O?s.classifiedAddConfigs&&s.classifiedAddConfigs.length>0?(0,rt.Y)(w.A,{arrow:!1,content:t.getAddTmplButton(s.classifiedAddConfigs),placement:"bottomRight"},(0,rt.Y)(v.A,null,(0,rt.Y)(y.Ay,null,(0,rt.Y)(R.A,null)))):(0,rt.Y)(v.A,{title:Y("${创建}")},(0,rt.Y)(y.Ay,{onClick:function(){return h(null,!1)}},(0,rt.Y)(R.A,null))," "):"",(j.includes("dtmplCustomAdd")||L)&&h&&!O?(0,rt.Y)(v.A,{title:Y("${创建}")},(0,rt.Y)(y.Ay,{onClick:function(){return h(null,!0)}},(0,rt.Y)(F.A,null))):"",j.includes("importLtmplExcel")&&!O?(0,rt.Y)(v.A,{title:Y("${导入}")}," ",(0,rt.Y)(y.Ay,{href:"#/".concat(f,"/importer?menuId=").concat(m),target:"_blank"},(0,rt.Y)(G.A,null))):"",j.includes("exportLtmplExcel")&&!O?(0,rt.Y)(w.A,{content:(0,rt.Y)(bt,{currentPage:{pageNo:E||1,pageSize:S||s.defaultPageSize},serverKey:C,queryKey:n,title:Y("${"+s.title+"}")}),title:Y("${导出}"),placement:"bottomRight",trigger:"click"},(0,rt.Y)(v.A,{title:Y("${导出}")},(0,rt.Y)(y.Ay,{style:{display:j.includes("exportLtmplExcel")&&!O?"inline":"none",marginLeft:"5px"}},(0,rt.Y)(M.A,null)))):"",j.includes("showChart")?(0,rt.Y)(v.A,{title:Y(c?"${隐藏}${图表}":"${展示}${图表}")},(0,rt.Y)(y.Ay,{onClick:t.handleShowChart},(0,rt.Y)($.A,null))):"",j.includes("analysis")?(0,rt.Y)(v.A,{title:Y(u?"${隐藏}${数据分析}":"${展示}${数据分析}")},(0,rt.Y)(y.Ay,{onClick:t.handleDataAnalysis},(0,rt.Y)(K.A,null))):"",j.includes("reStat")&&!O?(0,rt.Y)(Ft,{serverKey:C,fields:s.reStatParams,sourceId:f,onfinish:function(){return d(null)}}):"",(0,rt.Y)(w.A,{content:(0,rt.Y)(b.A.Group,{value:o,onChange:t.changeViewModel},(0,rt.Y)(A.A,{style:{width:"120px"}},(0,rt.Y)(x.A,{span:24},(0,rt.Y)(b.A,{value:"table"},Y("${表格}"))),(0,rt.Y)(x.A,{span:24},(0,rt.Y)(b.A,{value:"verticalList"},Y("${纵向列表}"))))),title:Y("${视图}"),placement:"bottomRight",trigger:"click"},(0,rt.Y)(v.A,{title:Y("${选择视图}")},(0,rt.Y)(y.Ay,null,(0,rt.Y)(B.A,null)))),(0,rt.Y)(w.A,{content:(0,rt.Y)(ft,{columns:a,disabledColIds:i,hiddenColIds:r,onChangeColSort:t.onChangeColSort,onChangeHiddenCols:t.changeHiddenColumns}),title:Y("${排序和选择列}"),placement:"bottomRight",trigger:"click"},(0,rt.Y)(v.A,{title:Y("${点击排序和选择列}")},(0,rt.Y)(y.Ay,null,(0,rt.Y)(q.A,null)))),d?(0,rt.Y)(y.Ay,{className:"hoverbig",title:Y("${刷新}"),onClick:function(){d(null)}},(0,rt.Y)(V.A,null)):""))})),(0,h.A)(t,"criteriaFormUseful",(function(){var e=t.props.ltmplConfig,r=e.buttons,n=e.criterias,o=e.updrillButtonConfigs;return!!((r.includes("query")||o&&o.length>0)&&(n&&n.length>0||r.includes("drilling"))||t.checkBoxUseful())})),(0,h.A)(t,"checkBoxUseful",(function(){var e=t.props.ltmplConfig,r=e.buttons,n=e.jumps,o=e.actions;return!!(r.includes("batchDelete")||o&&o.length>0||n&&n.length>0)})),(0,h.A)(t,"renderCriteriaForm",(function(){var e=t.state,r=e.loading,n=e.selectedRows,o=e.selectedDatas,a=t.props,i=a.ltmplConfig,c=a.doSearch,u=a.criteriaData,l=a.serverKey;return(0,rt.Y)(Q.A,{serverKey:l,loading:r,selectedDatas:o,selectedRows:n,ltmplConfig:i,data:u,doCQuery:t.doSelectedCQuery,doAction:t.doSelectedAction,doDelete:t.doDelete,doJump:t.doSelectedJump,doSearch:c})})),(0,h.A)(t,"renderContent",(function(){var e=t.state,r=e.queryKey,n=e.loading,o=e.selectedRows,a=e.hiddenRowCodes,i=e.viewModels,c=e.sortedColConfigs,u=e.hiddenColIds,l=e.showL2ActTable,s=t.props,f=s.sourceId,h=s.ltmplConfig,d=s.funcMode,v=s.title,y=s.collapsible,g=s.pageSize,m=s.pageNo,w=s.onChangePage,b=s.serverKey,A=t.context.translate;if(!h||!f)return(0,rt.Y)(p.Fragment,null,(0,rt.Y)(k.A,{loading:n}),(0,rt.Y)(C.A,{loading:n}));var x=t.buildTableColumns(h,u,a,c),O=h.buttons,E=!1;"simple"==d||"common"==d?E=!1:t.criteriaFormUseful()&&(E=!0);var S=[];if(c){var Y,j=qt(c);try{for(j.s();!(Y=j.n()).done;){var P=Y.value;u.includes(P.id)||S.push(P)}}catch(t){j.e(t)}finally{j.f()}}return(0,rt.Y)(p.Fragment,null,O.includes("analysis")&&l?(0,rt.Y)("div",null,(0,rt.Y)(St,{serverKey:b,innerQueryKey:r.key,sourceId:f}),(0,rt.Y)(L.A,{dashed:!0,style:{borderTopColor:"#40a9ff"},plain:!0})):"",(0,rt.Y)("div",{className:"actTable"},"complete"==d||"common"==d?y?null:(0,rt.Y)("span",null,h.header?(0,rt.Y)("div",{style:{padding:"6px"},dangerouslySetInnerHTML:{__html:h.header}}):null,(0,rt.Y)("h3",null," ",v?"string"==typeof v?A("${"+v+"}"):v:A("${"+h.title+"}"),(0,rt.Y)("p",{className:"fr"},t.renderHeaderButtons()))):null,E?t.renderCriteriaForm():null,n?(0,rt.Y)(C.A,{loading:n}):(0,rt.Y)(W.A,{serverKey:b,onChangePage:w,viewModels:i,primaryColumn:h.primaryColumn,columnConfigs:S,summaryConfigs:h.totalColumnConfigs,maxSelectedRows:t.checkBoxUseful()?1e4:-1,selectedRows:o,columns:x,hiddenRowCodes:a,pageInfo:{pageNo:m||1,pageSize:g||h.defaultPageSize},queryKey:r,onChangeRowSelection:t.changeRowSelection,subtotalXColumn:null==h.subtotalXColumn||h.subtotalXColumn.length<=0?null:h.subtotalXColumn,subtotalYColumn:null==h.subtotalYColumn||h.subtotalYColumn.length<=0?null:h.subtotalYColumn,groupIColumns:h.groupIColumns}),h.footer?(0,rt.Y)("div",{style:{padding:"6px"},dangerouslySetInnerHTML:{__html:h.footer}}):null))})),t}return(0,f.A)(e,t),(0,u.A)(e,[{key:"componentDidMount",value:(n=(0,i.A)(Ut().mark((function t(){var e,r,n;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.props.ltmplConfig,r=this.context.translate,n=void 0,e&&(n=[{id:"10000",title:r("${排序}")}].concat((0,a.A)(e.columns),[{id:"20000",title:r("${隐藏}")}])),this.loadData(Xt,[],n);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,i.A)(Ut().mark((function t(e){var r,n,o,i,c,u,l,s,f,h,p,d;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.props,n=r.sourceId,o=r.criteriaData,i=r.ltmplConfig,c=this.context.translate,u=e.ltmplConfig,l=e.criteriaData,s=e.sourceId,f=this.state,h=f.hiddenColIds,p=f.sortedColConfigs,!(n&&s!=n||i&&(!u||i.id!=u.id)||X.A.transQueryParamsToStr(o,!1,["pageSize","pageNo"])!=X.A.transQueryParamsToStr(l,!1,["pageSize","pageNo"]))){t.next=15;break}if(i.id!=u.id){t.next=10;break}return t.next=8,this.loadData(h,[],p);case 8:t.next=15;break;case 10:return d=void 0,i&&(d=[{id:"10000",title:c("${排序}")}].concat((0,a.A)(i.columns),[{id:"20000",title:c("${隐藏}")}])),this.setState({viewModels:["table"]}),t.next=15,this.loadData(Xt,[],d);case 15:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.state,r=e.queryKey,n=e.loading,o=e.blockMenuTreeDrawerOpen,a=e.recordCode,i=this.props,c=i.sourceId,u=i.ltmplConfig,l=i.title,s=i.collapsible,f=i.initCollapse,h=i.tip;return this.context.translate,u&&c?(0,rt.Y)(p.Fragment,null," ",s?(0,rt.Y)($t.A,{initCollapse:f,title:(0,rt.Y)(p.Fragment,null,l||u.title,(0,rt.Y)(Kt.A,{content:h||(u?u.tip:null)})),id:r+u.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:n,bodyStyle:{padding:"6px"},extra:this.renderHeaderButtons()},this.renderContent()):(0,rt.Y)(p.Fragment,null,this.renderContent()),(0,rt.Y)(Bt.A,{onOk:function(){t.setState({blockMenuTreeDrawerOpen:!1})},onCancel:function(){t.setState({blockMenuTreeDrawerOpen:!1})},open:o,roleCode:a})):(0,rt.Y)(p.Fragment,null,(0,rt.Y)(k.A,{loading:n}),(0,rt.Y)(C.A,{loading:n}))}}]);var r,n}(p.PureComponent);(0,h.A)(Zt,"contextType",yt.U),(0,h.A)(Zt,"defaultProps",{criteriaData:{},funcMode:"complete",collapsible:!1,initCollapse:!1,readOnly:!1});var te=Zt},45806:function(t,e,r){"use strict";var n=r(65425),o=r(96540),a=r(42729),i=r(17437),c=function(t,e){var r,c=(r=(0,o.useRef)(null),(0,o.useEffect)((function(){var t=r.current.nativeElement.querySelector(".ant-table"),e=!1,n=function(t){3===t.which&&(e=!0)},o=function(t){3===t.which&&(e=!1)},a=function(r){if(e){var n=r.movementX;r.movementY,r.offsetX,r.offsetY,t.scrollBy(5*n,0),r.preventDefault()}},i=function(t){t.preventDefault()};return t&&(t.addEventListener("mousedown",n),t.addEventListener("mousemove",a),t.addEventListener("mouseup",o),t.addEventListener("contextmenu",i)),function(){t&&(t.removeEventListener("mousedown",n),t.removeEventListener("mousemove",a),t.removeEventListener("mouseup",o),t.removeEventListener("contextmenu",i))}}),[]),{table:r}).table;return(0,o.useImperativeHandle)(e,(function(){return{nativeElement:c.current.nativeElement,scrollTo:c.current.scrollTo}}),[]),(0,i.Y)(a.A,(0,n.A)({},t,{ref:c}))},u=(0,o.forwardRef)(c);u.SELECTION_COLUMN=a.A.SELECTION_COLUMN,u.EXPAND_COLUMN=a.A.EXPAND_COLUMN,u.SELECTION_ALL=a.A.SELECTION_ALL,u.SELECTION_INVERT=a.A.SELECTION_INVERT,u.SELECTION_NONE=a.A.SELECTION_NONE,u.Column=a.A.Column,u.ColumnGroup=a.A.ColumnGroup,u.Summary=a.A.Summary,e.A=u},33958:function(t,e,r){"use strict";r.d(e,{A:function(){return q}});var n=r(33227),o=r(21745),a=r(42455),i=r(17636),c=r(38452),u=r(65425),l=r(44274),s=r(2532),f=r(63549),h=r(91985),p=r(11504),d=r(50828),v=r(96540),y=r(39356),g=r(55957),m=r(677),w=r(42652),b=r(45806),A=r(92749),x=r(84769),k=r(1026),L=r(17437);function C(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,O()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}var E=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=C(this,e,[].concat(n)),(0,d.A)(t,"context",void 0),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t,e=this.props,r=e.queryTotal,n=e.pageInfo,o=e.total,a=e.pageTo,i=(e.touchEnd,this.context.translate);if(!n)return(0,L.Y)(v.Fragment,null);var c=!0,u="";return o&&o>=0?(t=o,c=!0,o>0&&(u=i("${总共}"+o+"${条}"))):(c=!1,t=n.virtualEndPageNo*n.pageSize+1,u=i("${点击查看总数}")),!t||t<n.pageSize?"":(0,L.Y)("div",{className:"Pagination"},(0,L.Y)("span",{className:c?"sewTotal":"seeTotal",onClick:r},u),(0,L.Y)(x.A,{style:{display:"inline-block"},showQuickJumper:!0,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100","200","500"],defaultCurrent:1,current:parseInt(n.pageNo.toString()),pageSize:n.pageSize,onChange:function(t,e){return a(t,e)},onShowSizeChange:function(t,e){return a(t,e)},hideOnSinglePage:0===o,total:t}))}}])}(v.PureComponent);(0,d.A)(E,"contextType",k.U);var S=E,Y=r(61021),j=r(53357),P=r(74712),I=r(60346),T=["className","style"];function N(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function D(){D=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&n.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function R(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function F(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?R(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function G(t,e,r){return e=(0,h.A)(e),(0,f.A)(t,M()?Reflect.construct(e,r||[],(0,h.A)(t).constructor):e.apply(t,r))}function M(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(M=function(){return!!t})()}y.A.Panel;var $=(0,Y.Zj)((function(t){return(0,L.Y)("tr",t)})),K=(0,Y.q6)((function(t){return(0,L.Y)("tbody",t)})),B=function(t){function e(){var t;(0,l.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=G(this,e,[].concat(n)),(0,d.A)(t,"state",{queryDataCache:void 0,virtualEndPageNo:void 0,dataSource:void 0,loading:!0,touchEnd:void 0,total:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"DraggableContainer",(function(e){return(0,L.Y)(K,(0,u.A)({useDragHandle:!0,disableAutoscroll:!0,helperClass:"row-dragging",onSortEnd:t.onSortEnd},e))})),(0,d.A)(t,"DraggableBodyRow",(function(e){e.className,e.style;var r=(0,c.A)(e,T),n=t.state.dataSource;if(n){var o=n.findIndex((function(t){return t.key===r["data-row-key"]}));return(0,L.Y)($,(0,u.A)({key:o,index:o},r))}return(0,L.Y)(v.Fragment,null)})),(0,d.A)(t,"onSortEnd",(function(e){var r=e.oldIndex,n=e.newIndex,o=t.state.dataSource;if(r!==n){var a=(0,j.p)([].concat(o),r,n).filter((function(t){return!!t}));t.setState({dataSource:a})}})),(0,d.A)(t,"loadData",function(){var e=(0,i.A)(D().mark((function e(r,n,o){var a,i,c,u,l,s,f,h,p,d,v,y,g,m,w;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.setState({loading:!0}),c=t.state.queryDataCache,u=t.props,l=u.serverKey,s=u.tableProps,o||!c?(f=new Map,t.setState({total:void 0})):f=c,!f.has((null===(a=n)||void 0===a?void 0:a.pageNo)+"_"+(null===(i=n)||void 0===i?void 0:i.pageSize))){e.next=9;break}d=f.get((null===(h=n)||void 0===h?void 0:h.pageNo)+"_"+(null===(p=n)||void 0===p?void 0:p.pageSize)),t.setState({dataSource:d.dataSource,virtualEndPageNo:d.pageInfo.virtualEndPageNo,loading:!1}),e.next=25;break;case 9:return e.next=11,A.A.requestQueryData(l,r,n);case 11:if((v=e.sent).key==t.props.queryKey.key){e.next=16;break}return e.abrupt("return");case 16:if(m=[],n=v.pageInfo,v.entities&&v.entities.forEach((function(t,e){var r=F(F({key:t.code,code:t.code},t.fieldMap),{},{index:e});m.push(r)})),w=v.touchEnd,f.set((null===(y=n)||void 0===y?void 0:y.pageNo)+"_"+(null===(g=n)||void 0===g?void 0:g.pageSize),{dataSource:m,pageInfo:n}),t.setState({dataSource:m,virtualEndPageNo:n.virtualEndPageNo,queryDataCache:f,touchEnd:w,loading:!1}),s.clickDisplayTotal){e.next=25;break}return e.next=25,t.queryTotal();case 25:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,d.A)(t,"pageTo",function(){var e=(0,i.A)(D().mark((function e(r,n){var o,a,i,c;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.props.onChangePage,a=t.state.virtualEndPageNo,i={pageNo:r,pageSize:n||10,virtualEndPageNo:a},c=t.props.queryKey,e.next=6,t.loadData(c.key,i);case 6:o(r,n);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,d.A)(t,"queryTotal",(0,i.A)(D().mark((function e(){var r,n,o,a;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props,n=r.queryKey,o=r.serverKey,e.next=3,A.A.requestQueryCount(o,n.key);case 3:a=e.sent,t.setState({total:a});case 5:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"getRowSelection",(function(){var e,r=t.props,n=r.columns,o=r.onChangeRowSelection,a=r.selectedRows,i=r.maxSelectedRows,c=r.primaryColumn,u=t.state.dataSource,l=[],s=N(a);try{for(s.s();!(e=s.n()).done;){var f=e.value;l.push(f.code)}}catch(t){s.e(t)}finally{s.f()}var h=[];if(u){var p,d=N(u);try{for(d.s();!(p=d.n()).done;){var v=p.value;h.push(v.code)}}catch(t){d.e(t)}finally{d.f()}}if(-1==i)return null;var y={fixed:!0,type:1==i?"radio":"checkbox",selectedRowKeys:l,onChange:function(t,e){var r=[],a=[],i=null==c?void 0:c.id;i||n.forEach((function(t){"序号"==t.title||null!=i||(i=t.dataIndex)})),e.forEach((function(t){r.push({code:t.code,title:t[i]}),a.push(t)})),o&&o(r,a,h)}};return y})),(0,d.A)(t,"getUnHidenDataSource",(function(){var e=t.state.dataSource,r=t.props.hiddenRowCodes,n=[];if(e){var o,a=N(e);try{for(a.s();!(o=a.n()).done;){var i=o.value;r.includes(i.code)||n.push(i)}}catch(t){a.e(t)}finally{a.f()}}return n})),(0,d.A)(t,"initViewList",(function(e){var r=t.context.translate,n=t.props,o=(n.columns,n.columnConfigs),a=n.serverKey,i=[];return o.length>0&&o.forEach((function(t,n){if("10000"!=t.id&&"20000"!=t.id&&"操作"!=t.title){var o=t.title,c=e?e[t.id]:void 0;"序号"==o&&(c=e.index),c=c||(t.defaultValue?t.defaultValue:void 0),t.id,Math.random();var u=(0,L.Y)(g.A.Item,{label:r("${"+t.title+"}"),key:n,className:"labelcss"},(0,L.Y)(P.A,{serverKey:a,holderType:"table",value:c,fieldConfig:t}));i.push(u)}})),i})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(f=(0,i.A)(D().mark((function t(){var e,r,n;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.props,r=e.queryKey,n=e.pageInfo,!r){t.next=4;break}return t.next=4,this.loadData(r.key,n);case 4:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.setState=function(){return!1}}},{key:"componentDidUpdate",value:(r=(0,i.A)(D().mark((function t(e){var r,n,o,a,i;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.queryKey,n=e.pageInfo,o=this.props,a=o.queryKey,i=o.pageInfo,this.state.total,!a){t.next=12;break}if((null==r?void 0:r.key)==a.key){t.next=9;break}return t.next=7,this.loadData(a.key,i,!0);case 7:t.next=12;break;case 9:if((null==n?void 0:n.pageNo)==i.pageNo&&(null==n?void 0:n.pageSize)==i.pageSize){t.next=12;break}return t.next=12,this.loadData(a.key,i,!1);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"getTableSummaryNumberValue",value:function(t){return null==t?0:Number("string"==typeof t?t:t[0].split("@R@")[1])}},{key:"deepClone",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if("object"!==(0,a.A)(t)||null===t)return t;if(r.has(t))return r.get(t);var n=Array.isArray(t)?[]:{};return Reflect.ownKeys(t).forEach((function(o){var i=t[o];"object"===(0,a.A)(i)&&null!=i?n[o]=e.deepClone(i,r):n[o]=i})),n}},{key:"buildKeys",value:function(t){return t.map((function(t){return t.title})).join("-")}},{key:"buildColTag",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=N(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;a.children?this.buildColTag(a.children,[].concat((0,o.A)(r),[{dataKey:a._type?a._type:a.title,title:a.title}])):(a.dataIndex=this.buildKeys([].concat((0,o.A)(r),[{dataKey:a._type?a._type:a.title,title:a.title}])),void 0===a.keys&&(a.keys=[].concat((0,o.A)(r),[{dataKey:a._type?a._type:a.title,title:a.title}])))}}catch(t){n.e(t)}finally{n.f()}}},{key:"getCurCalKeys",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=N(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;Array.isArray(o.children)?this.getCurCalKeys(o.children,r):r.push({factIndex:o.keys[o.keys.length-1],dataIndex:o.dataIndex})}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"setSumColKeys",value:function(t,e){if(0!==e.length)if(Array.isArray(t.children))this.setSumColKeys(t.children,e);else{var r,n=N(t);try{var o=function(){var t=r.value,n=t.keys[t.keys.length-1].dataKey;t.sumDataIndex=e.filter((function(t){return t.factIndex.dataKey===n})),t.keys[t.keys.length-1].sumDataIndex=t.sumDataIndex.map((function(t){return t.dataIndex}))};for(n.s();!(r=n.n()).done;)o()}catch(t){n.e(t)}finally{n.f()}}}},{key:"handleProSummaryTable",value:function(t){var e,r,a=this;if(!Boolean(this.props.subtotalXColumn||this.props.subtotalYColumn))return{proSummaryTableColumns:[],proSummaryTableData:[]};var i,c=this.context.translate,u=this.props,l=u.subtotalXColumn,s=u.subtotalYColumn,f=u.columns,h=N(t);try{for(h.s();!(i=h.n()).done;)for(var p=i.value,v=0,y=Object.entries(p);v<y.length;v++){var g=(0,n.A)(y[v],2),m=g[0],w=g[1];null==w||"null"==w?p[m]="":"string"==typeof w&&null!=w&&w.includes("@R@")&&(p[m]=w.split("@R@")[1])}}catch(t){h.e(t)}finally{h.f()}console.log("data",t),console.log("columns",f);var b,A={dimension:[],fact:[],others:[{dataIndex:"orderInGroup",title:"orderInGroup"}]},x={},k={},L=N(f);try{for(L.s();!(b=L.n()).done;){var C=b.value;x[C.dataIndex]=C.title,k[C.title]=C.dataIndex,void 0!==C.statColType?A[C.statColType].push(this.deepClone(C)):"序号"!==C.title&&A.others.push(this.deepClone(C))}}catch(t){L.e(t)}finally{L.f()}console.log("colIdToNameMp",x),console.log("colNameToIdMp",k),console.log("colMp",A);var O,E=[],S=0,Y=N(t);try{for(Y.s();!(O=Y.n()).done;){for(var j=O.value,P={},T=function(){var t=(0,n.A)(D[_],2),e=t[0],r=t[1],o=r;A.fact.findIndex((function(t){return t.dataIndex===e}))>-1&&null===r&&(o=0),P[x[e]]=o},_=0,D=Object.entries(j);_<D.length;_++)T();E.push(F(F({},P),{},{orderInGroup:S++}))}}catch(t){Y.e(t)}finally{Y.f()}console.log("canReadData",E);var R=[].concat((0,o.A)(this.deepClone(A.dimension)),(0,o.A)(this.deepClone(A.others))),G=[],M=[],$=null===(e=A.fact[0])||void 0===e?void 0:e.cal,K=c("sum"===$?"小计":"均值");if(s&&Array.isArray(s)&&s.length){for(var B,q=[],V=function(){var e,r=s[U].id,i={},c=[],u=N(t);try{for(u.s();!(e=u.n()).done;)i[e.value[r]]=x[r]}catch(t){u.e(t)}finally{u.f()}for(var l=0,f=Object.entries(i);l<f.length;l++){var h=(0,n.A)(f[l],2),p={title:h[0],_type:h[1],children:(0,o.A)(a.deepClone(0===U?A.fact:q))};c.push(p)}a.buildColTag(c),console.log("_tnodes",JSON.parse(JSON.stringify(c)));var d={title:K,children:(0,o.A)(a.deepClone(A.fact)),TYPE:$};a.buildColTag([d]),a.setSumColKeys(d,a.getCurCalKeys(c)),c.unshift(d),q=c,R.splice(R.findIndex((function(t){return t.dataIndex===r})),1)},U=0;U<s.length;U++)V();(B=R).push.apply(B,(0,o.A)(q))}else{var H;(H=R).push.apply(H,(0,o.A)(A.fact))}this.buildColTag(R);var z,W={},Q=[],J=N(R);try{for(J.s();!(z=J.n()).done;){var X=z.value;Array.isArray(X.keys)&&1===X.keys.length&&Q.push(X)}}catch(t){J.e(t)}finally{J.f()}console.log("rowKey",Q);for(var Z=0,tt=E;Z<tt.length;Z++){for(var et=tt[Z],rt=W,nt=0;nt<Q.length;nt++){var ot=Q[nt].title;void 0===rt[et[ot]]&&(nt!==Q.length-1?rt[et[ot]]={}:rt[et[ot]]=[]),rt=rt[et[ot]]}Array.isArray(rt)&&rt.push(et)}console.log("rowMp",W);var at,it=[],ct=this.flatSummaryCol(R),ut=N(R);try{for(ut.s();!(at=ut.n()).done;){var lt=at.value;"fact"!==lt.statColType&&!Array.isArray(lt.children)||void 0!==lt.TYPE||it.push(lt)}}catch(t){ut.e(t)}finally{ut.f()}var st=this.flatSummaryCol(it),ft=this.flatSummaryCol(Q),ht=this.flatSummaryCol(R.filter((function(t){return void 0!==t.TYPE})));if(console.log("colKey",it),console.log("colKeyTitle",ct),console.log("flatSummaryColTitle",st),console.log("flatSummaryRowTitle",ft),console.log("flatSummaryCalTitle",ht),G=this.handleColData(W,ft,st,ht,$),M=this.deepClone(G),console.log("excludeGroupSumData",M),l&&Array.isArray(l)&&l.length){var pt=l.map((function(t){var e=t.id;return x[e]})),dt=this.buildRowMp(G,pt);console.log("rowSumMp",dt);var vt=[].concat((0,o.A)(ht),(0,o.A)(st)).map((function(t){return a.buildKeys(t)}));console.log("calRowKeys",vt),G=this.handleRowData(dt,vt,$,K,pt[0])}if("序号"===f[0].title){var yt={dataIndex:"序号",title:"序号",width:160};f[0].colWidth&&(yt.width=f[0].colWidth),R.unshift(yt),G.forEach((function(t,e){t["序号"]=e+1}))}if(this.props.summaryConfigs&&0!==(null===(r=this.props.summaryConfigs)||void 0===r?void 0:r.length)&&ft.length&&G.length){var gt,mt,wt=[].concat((0,o.A)(ht),(0,o.A)(st)).map((function(t){return a.buildKeys(t)})),bt=(0,d.A)((0,d.A)((0,d.A)({},null===(gt=R[0])||void 0===gt?void 0:gt.dataIndex,c("sum"===$?"${合计}":"${均值}")),"_type",$),"_calRange","all"),At=N(wt);try{var xt=function(){var t,e=mt.value;"sum"===$&&(bt[e]=M.reduce((function(t,r){return t.plus((0,I.g)(r[e]))}),(0,I.g)(0))),"avg"===$&&(bt[e]=M.reduce((function(t,r){return t.plus((0,I.g)(r[e]).div(M.length))}),(0,I.g)(0))),bt[e]=null===(t=bt[e])||void 0===t?void 0:t.toString()};for(At.s();!(mt=At.n()).done;)xt()}catch(t){At.e(t)}finally{At.f()}G.push(bt)}return this.stain(R),(R=R.sort((function(t,e){return t.order<e.order?-1:1}))).splice(R.findIndex((function(t){return"orderInGroup"===t.dataIndex})),1),console.log("proSummaryTableColumns",R),console.log("proSummaryTableData",G),{proSummaryTableColumns:R,proSummaryTableData:G}}},{key:"flatSummaryCol",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=N(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;o.children?this.flatSummaryCol(o.children,r):r.push(o.keys)}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"handleColData",value:function(t,e,r,o,a){var i=this,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[];if(Array.isArray(t)){var s,f=N(r);try{var h=function(){var e,r,n,o=s.value,c=i.buildKeys(o),l=[],f=o.slice(0,o.length-1),h=o.slice(o.length-1)[0].title,p=N(t);try{var d=function(){var t=n.value;f.every((function(e){var r=e.dataKey,n=e.title;return t[r]===n}))&&l.push(t)};for(p.s();!(n=p.n()).done;)d()}catch(t){p.e(t)}finally{p.f()}void 0!==u[c]&&""!=u[c]||(u[c]=(0,I.g)(0)),"sum"===a&&(u[c]=l.reduce((function(t,e){return t.plus((0,I.g)(e[h]))}),(0,I.g)(0))),"avg"===a&&(u[c]=l.reduce((function(t,e){return t.plus((0,I.g)(e[h]).div(l.length))}),(0,I.g)(0))),u[c]="NaN"==(null===(e=u[c])||void 0===e?void 0:e.toString())?"0":null===(r=u[c])||void 0===r?void 0:r.toString()};for(f.s();!(s=f.n()).done;)h()}catch(t){f.e(t)}finally{f.f()}var p,d=N(o);try{var v=function(){var t,e=p.value,r=i.buildKeys(e),n=e[e.length-1].sumDataIndex;void 0!==u[r]&&""!=u[r]||(u[r]=(0,I.g)(0)),"sum"===a&&(u[r]=n.reduce((function(t,e){return t.plus((0,I.g)(u[e]))}),(0,I.g)(0))),"avg"===a&&(u[r]=n.reduce((function(t,e){return t.plus((0,I.g)(u[e]).div(n.length))}),(0,I.g)(0))),u[r]=null===(t=u[r])||void 0===t?void 0:t.toString()};for(d.s();!(p=d.n()).done;)v()}catch(t){d.e(t)}finally{d.f()}l.push(u)}else for(var y=0,g=Object.entries(t);y<g.length;y++){var m=(0,n.A)(g[y],2),w=m[0],b=m[1],A=e[c][0].dataKey;u[A]=w,this.handleColData(b,e,r,o,a,c+1,this.deepClone(u),l)}return l}},{key:"buildRowMp",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(r>=e.length)return t;var a,i=e[r],c=N(t);try{for(c.s();!(a=c.n()).done;){var u=a.value;void 0===o[u[i]]&&(o[u[i]]=[]),o[u[i]].push(u)}}catch(t){c.e(t)}finally{c.f()}for(var l=0,s=Object.entries(o);l<s.length;l++){var f=(0,n.A)(s[l],2),h=f[0],p=f[1];o[h]=this.buildRowMp(p,e,r+1)}return o}},{key:"handleRowData",value:function(t,e,r,a,i){for(var c=this,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],l=function(){var t=(0,n.A)(f[s],2),l=(t[0],t[1]);if(Array.isArray(l)){var h,p=(0,d.A)((0,d.A)((0,d.A)({},i,a),"_type",r),"_calRange","small"),v=N(e);try{var y=function(){var t,e=h.value;"sum"===r&&(p[e]=l.reduce((function(t,r){return t.plus((0,I.g)(r[e]))}),(0,I.g)(0))),"avg"===r&&(p[e]=l.reduce((function(t,r){return t.plus((0,I.g)(r[e]).div(l.length))}),(0,I.g)(0))),p[e]=null===(t=p[e])||void 0===t?void 0:t.toString()};for(v.s();!(h=v.n()).done;)y()}catch(t){v.e(t)}finally{v.f()}l.sort((function(t,e){return Number(t.orderInGroup)<Number(e.orderInGroup)?-1:1})),u.push.apply(u,(0,o.A)(l).concat([p]))}else c.handleRowData(l,e,r,a,i,u)},s=0,f=Object.entries(t);s<f.length;s++)l();return u}},{key:"stain",value:function(t){var e,r=N(t);try{for(r.s();!(e=r.n()).done;){var n=e.value;Array.isArray(n.children)?this.stain(n.children):n.render=function(t,e,r){var n="";return void 0!==e._type&&(n="small"===e._calRange?"xiaoji":"zongji"),(0,L.Y)("div",{className:n},t)}}}catch(t){r.e(t)}finally{r.f()}}},{key:"render",value:function(){var t=this,e=this.props,r=e.pageInfo,n=e.columns,a=e.viewModels,i=e.summaryConfigs,c=e.subtotalXColumn,u=e.subtotalYColumn,l=e.tableProps,s=e.groupIColumns,f=this.state,h=f.touchEnd,p=f.total,d=f.loading,y=f.virtualEndPageNo,A=this.context.translate,x=Boolean(c||u),k=this.handleProSummaryTable(this.getUnHidenDataSource()),C=k.proSummaryTableColumns,O=k.proSummaryTableData,E=x?C:n||[];console.log(E);var Y=20;return E.forEach((function(t){Y+=t.width?t.width:140})),(0,L.Y)(v.Fragment,null,a.includes("table")?(0,L.Y)(b.A,{size:l.size?l.size:void 0,rowSelection:this.getRowSelection(),columns:E,dataSource:x?O:this.getUnHidenDataSource(),scroll:-1==l.scrollY?null:{y:0==l.scrollY?420:l.scrollY,x:Y},bordered:!0,pagination:!1,style:{display:n?"block":"none"},summary:function(e){if(!i||0===(null==i?void 0:i.length)||0===e.length)return(0,L.Y)(v.Fragment,null);var r=x?C:t.props.columns,n={sum:[],avg:[]};t.getRowSelection()&&(n.avg.push({value:"",id:"",columnConfig:{align:"center"}}),n.sum.push({value:"",id:"",columnConfig:{align:"center"}})),n.sum.push({value:A("${合计}"),id:"title",columnConfig:{align:"center"}}),n.avg.push({value:A("${均值}"),id:"title",columnConfig:{align:"center"}});for(var a=0,c=0,u=function(){var u,f,h=l,p=r[l].dataIndex;if(0===h)return 0;var d={value:"",id:"",columnConfig:r[l]},v=i.findIndex((function(t){return t.id===p}));if(-1===v)return n.sum.push(d),n.avg.push(d),0;var y=i[v].aggFunc;"sum"===y&&(d.value=null===(u=e.reduce((function(e,r){return e.plus(new I.g(t.getTableSummaryNumberValue(r[p])))}),new I.g(0)))||void 0===u?void 0:u.toString()),"avg"===y&&(d.value=null===(f=e.reduce((function(r,n){return r.plus(new I.g(t.getTableSummaryNumberValue(n[p])).div(e.length))}),new I.g(0)))||void 0===f?void 0:f.toString());var g=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.join("-")},m=function(t,e){return g.apply(void 0,(0,o.A)(e.map((function(e){return t[e]}))))};if("groupIsum"===y){var w,b=null==s?void 0:s.map((function(t){return t.id})),A=new Set;d.value=null===(w=e.reduce((function(e,r){return A.has(m(r,b))?e:(A.add(m(r,b)),e.plus(new I.g(t.getTableSummaryNumberValue(r[p]))))}),new I.g(0)))||void 0===w?void 0:w.toString()}if("groupIavg"===y){var x,k=new Set,L=0,C=null==s?void 0:s.map((function(t){return t.id}));e.forEach((function(t){k.has(m(t,C))||(k.add(m(t,C)),L++)})),k.clear(),d.value=null===(x=e.reduce((function(e,r){return k.has(m(r,C))?e:(k.add(m(r,C)),e.plus(new I.g(t.getTableSummaryNumberValue(r[p])).div(L)))}),new I.g(0)))||void 0===x?void 0:x.toString()}d.id=p,"avg"===y||"groupIavg"===y?(n.avg.push(d),c++):n.avg.push({value:"",id:""}),"sum"===y||"groupIsum"===y?(n.sum.push(d),a++):n.sum.push({value:"",id:""})},l=0;l<r.length;l++)u();return console.log("sumConfigs",n,a,c),(0,L.Y)(v.Fragment,null,0===a?(0,L.Y)(v.Fragment,null):(0,L.Y)(b.A.Summary.Row,null,n.sum.map((function(t,e){t.id;var r=t.value,n=t.columnConfig;return(0,L.Y)(b.A.Summary.Cell,{align:null==n?void 0:n.align,index:e,className:"zongji"},r)}))),0===c?(0,L.Y)(v.Fragment,null):(0,L.Y)(b.A.Summary.Row,null,n.avg.map((function(t,e){t.id;var r=t.value,n=t.columnConfig;return(0,L.Y)(b.A.Summary.Cell,{align:null==n?void 0:n.align,index:e,className:"zongji"},r)}))))},loading:d,components:{body:{wrapper:this.DraggableContainer,row:this.DraggableBodyRow}}}):"",(0,L.Y)(S,{touchEnd:h,pageInfo:F(F({},r),{},{virtualEndPageNo:y}),pageTo:this.pageTo,queryTotal:this.queryTotal,total:p}),a.includes("verticalList")?(0,L.Y)(m.A,{style:{marginTop:"10px"}},(0,L.Y)(w.A,{dataSource:this.getUnHidenDataSource(),renderItem:function(e){return(0,L.Y)(w.A.Item,{key:e.id},(0,L.Y)(m.A,{size:"small",bodyStyle:{padding:"4px"}},(0,L.Y)(g.A,{column:4},t.initViewList(e))))}})):"")}}]);var r,f}(v.PureComponent);(0,d.A)(B,"defaultProps",{pageInfo:{pageNo:1,pageSize:10,virtualEndPageNo:void 0},tableProps:{size:"small",clickDisplayTotal:!1,scrollY:500},hiddenRowCodes:[],selectedRows:[],viewModels:["table"],summaryConfigs:[]}),(0,d.A)(B,"contextType",k.U);var q=B},73729:function(t,e,r){"use strict";r.d(e,{A:function(){return Dt}});var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(89467),d=r(57529),v=r(45038),y=r(37977),g=r(69036),m=r(47152),w=r(16370),b=r(28392),A=r(28073),x=r(45806),k=r(11058),L=r(39277),C=r(40261),O=r(93598),E=r(55140),S=r(56798),Y=r(54763),j=r(21426),P=r(74712),I=r(22733),T=r(46675),N=r(37187),_=r(46704),D=r(92749),R=r(33958),F=r(11733),G=r(67034),M=r(1026),$=r(17437);function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function B(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,q()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function q(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(q=function(){return!!t})()}var V=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=B(this,e,[].concat(n)),(0,f.A)(t,"context",void 0),(0,f.A)(t,"handleClose",(function(e){var r=t.props,n=r.onChange,o=r.value;if(n){var a,i=[],c=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return K(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(o);try{for(c.s();!(a=c.n()).done;){var u=a.value;u.code!=e.code&&i.push(u)}}catch(t){c.e(t)}finally{c.f()}n(i)}})),(0,f.A)(t,"renderTag",(function(){var e=t.props.value,r=[];return e?(e.forEach((function(e,n){var o=e.title instanceof Array?e.title[0]:e.title;r.push((0,$.Y)(G.A,{key:n,style:{fontSize:14},color:"geekblue",closable:!0,onClose:function(r){r.preventDefault(),t.handleClose(e)}},o&&o.includes("@R@")?o.split("@R@")[1]:e.title))})),r):""})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"render",value:function(){var t=this.context.translate;return(0,$.Y)("div",null,(0,$.Y)("h3",null,t("${查询点选}:"),this.renderTag()))}}])}(h.PureComponent);(0,f.A)(V,"contextType",M.U);var U=V,H=r(35880);function z(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return W(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Q(){Q=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function J(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function X(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?J(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Z(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,tt()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function tt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(tt=function(){return!!t})()}var et=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),c=0;c<r;c++)n[c]=arguments[c];return t=Z(this,e,[].concat(n)),(0,f.A)(t,"context",void 0),(0,f.A)(t,"state",{selectConfig:void 0,columns:void 0,queryKey:void 0,loading:!0,criteriaData:void 0,pageNo:void 0,pageSize:void 0,disableCols:void 0,selectedRows:[]}),(0,f.A)(t,"loadData",function(){var e=(0,a.A)(Q().mark((function e(r,n){var o,a,i,c,u,l,s,f,h,p,d;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),o=t.state,a=o.pageNo,i=o.pageSize,c=r.defaultPageSize,u={pageNo:a,pageSize:i||c,virtualEndPageNo:void 0},l=t.props,s=l.sourceId,f=l.exceptCodes,h=l.serverKey,p=l.mainCode,e.next=7,D.A.requestLtmplQueryKey(h,s,X(X(X({exceptCodes:f},n),u),{},{mainCode:p}));case 7:d=e.sent,t.setState({queryKey:d,criteriaData:n,loading:!1});case 9:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,f.A)(t,"loadConfig",(0,a.A)(Q().mark((function e(){var r,n,o,a,i,c,u,l,s;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.context.translate,n=t.props,o=n.sourceId,n.exceptCodes,a=n.serverKey,i=n.defaultCriteriaValue,t.setState({loading:!0}),e.next=5,_.A.requestSelectConfig(a,o);case 5:return c=e.sent,u=[],l=0,c.columns.forEach((function(t){var e={};"操作"!=t.title&&u.push(e),e.title=r("${"+t.title+"}"),e.width=t.colWidth?t.colWidth:160,e.align=t.valueAlign?t.valueAlign:"left",e.dataIndex=t.id,l++;var n=Y.A.getSupportControlType(t);l<12&&j.A.sort(e,n),"序号"===t.title?(e.width=t.colWidth?t.colWidth:50,e.align=t.valueAlign?t.valueAlign:"center",e.render=function(t,e,r){return(0,$.Y)("label",null,r+1)},t.sorter=void 0):e.render=function(e,r){return(0,$.Y)(P.A,{serverKey:a,fieldConfig:t,value:r[t.id],holderType:"table"})}})),s=X(X({},c.defaultCriteriaValue),i),t.setState({columns:u,selectConfig:c,loading:!1,criteriaData:s}),e.abrupt("return",{selectConfig:c,criteriaData:s});case 12:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"doSearch",function(){var e=(0,a.A)(Q().mark((function e(r){var n,o;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state.selectConfig,o=X({},r),e.next=4,t.loadData(n,o);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"onChangePage",(function(e,r){t.setState({pageNo:e,pageSize:r})})),(0,f.A)(t,"handleOk",(function(){t.props.onOK(t.state.selectedRows),t.setState({selectedRows:[],queryKey:void 0})})),(0,f.A)(t,"handleCancel",(function(){t.setState({queryKey:void 0}),t.props.onCancel()})),(0,f.A)(t,"changeRowSelection",(function(e,r,n){var a=t.props.maxSelectedRows;if(n){var i=t.state.selectedRows,c=[],u=[];1!=a&&u.push.apply(u,(0,o.A)(i));var l,s=!1,f=z(e);try{for(f.s();!(l=f.n()).done;){var h=l.value;s=!1;var p,d=z(u);try{for(d.s();!(p=d.n()).done;){var v=p.value;h.code==v.code&&(s=!0)}}catch(t){d.e(t)}finally{d.f()}s||u.push(h),c.push(h.code)}}catch(t){f.e(t)}finally{f.f()}var y=[];y.push.apply(y,u);for(var g=0,m=u;g<m.length;g++){var w=m[g];if(n.includes(w.code)&&!c.includes(w.code))for(var b in y)y[b].code==w.code&&y.splice(Number(b),1)}t.setState({selectedRows:y})}else t.setState({selectedRows:e})})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(Q().mark((function t(){var e,r,n,o;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.props,r=e.sourceId,n=e.open,e.defaultCriteriaValue,!r||!n){t.next=7;break}return t.next=4,this.loadConfig();case 4:return o=t.sent,t.next=7,this.loadData(o.selectConfig,o.criteriaData);case 7:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(Q().mark((function t(e){var r,n,o,a,i,c,u,l,s,f,h;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=this.props).exceptCodes,n=r.open,o=r.defaultCriteriaValue,a=this.state,i=a.selectConfig,c=a.criteriaData,u=a.queryKey,l=a.loading,e.exceptCodes,e.open,s=i,f=c,!n){t.next=15;break}if(s){t.next=12;break}return t.next=9,this.loadConfig();case 9:h=t.sent,s=h.selectConfig,f=h.criteriaData;case 12:if(u||l){t.next=15;break}return t.next=15,this.loadData(s,X(X({},f),o));case 15:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.open,r=t.maxSelectedRows,n=t.serverKey,o=this.state,a=o.queryKey,i=o.columns,c=o.selectConfig,u=o.criteriaData,l=o.loading,s=o.selectedRows,f=o.pageSize,p=o.pageNo;if(!c)return(0,$.Y)(h.Fragment,null);var d=c.buttons,v=c.criterias,y=c.jumps,g=c.actions;return d.includes("batchDelete")||d.includes("query")&&v&&v.length>0||g&&g.length>0||y&&y.length,(0,$.Y)(N.A,{open:e,title:(0,$.Y)(U,{value:s,onChange:this.changeRowSelection}),width:1150,destroyOnClose:!0,centered:!0,bodyStyle:{height:"80vh",overflow:"auto"},onCancel:this.handleCancel,onOk:this.handleOk},(0,$.Y)(H.Ay,{style:{height:"80vh"},autoHide:!0,autoHideTimeout:1e3},(0,$.Y)("div",{className:"actTable"},(0,$.Y)(F.A,{serverKey:n,selectedRows:s,ltmplConfig:c,data:u,doSearch:this.doSearch,loading:l}),(0,$.Y)(R.A,{serverKey:n,pageInfo:{pageNo:p||1,pageSize:f||c.defaultPageSize},onChangePage:this.onChangePage,maxSelectedRows:r,selectedRows:s,primaryColumn:c.primaryColumn,columns:i,queryKey:a,onChangeRowSelection:this.changeRowSelection}))," "))}}]);var r,n}(h.PureComponent);(0,f.A)(et,"contextType",M.U),(0,f.A)(et,"defaultProps",{defaultCriteriaValue:{}});var rt=et,nt=r(13050),ot=r(16044),at=r(677),it=r(47852),ct=r(50770),ut=r(43455),lt=r(8130);function st(){st=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function ft(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,ht()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function ht(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ht=function(){return!!t})()}var pt=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=ft(this,e,[].concat(n)),(0,f.A)(t,"state",{}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"onSubmit",(function(e){var r=t.props,n=r.dtmplData,o=r.fieldGroupConfig,a={code:n?n.code:"new"+lt.A.getRandomNum(6),editStatus:n&&n.code&&!n.code.startsWith("new")?"changed":"new",relationLabel:e.relationLabel?e.relationLabel:o.relationNames[0],fieldMap:e};t.props.onFinish(a)})),(0,f.A)(t,"selectRelation",(function(){var e=t.props,r=e.fieldGroupConfig,n=e.dtmplData,o=t.context.translate;return r.relationNames.length>1?(0,$.Y)(p.A.Item,{name:"relationLabel",initialValue:n?n.relationLabel:void 0,rules:[{required:!0,message:o("${请选择}${关系}")}],label:o("${关系}")},(0,$.Y)(ct.Ay.Group,null,r.relationNames.map((function(t){return(0,$.Y)(ct.Ay,{value:"item"},t)})))):""})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(r=(0,a.A)(st().mark((function t(){return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.formRef,r=t.fieldGroupConfig,n=t.dtmplData,o=t.serverKey;return(0,$.Y)(h.Fragment,null,(0,$.Y)(p.A,{labelWrap:!0,ref:e,name:"control-hooks",onFinish:this.onSubmit},this.selectRelation(),(0,$.Y)(ut.A,{serverKey:o,formRef:e,nameAttr:"id",fields:r?r.fields:void 0,valueMap:n?n.fieldMap:{}})))}}]);var r}(h.PureComponent);function dt(){dt=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function vt(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,yt()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function yt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yt=function(){return!!t})()}(0,f.A)(pt,"contextType",M.U);var gt=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=vt(this,e,[].concat(n)),(0,f.A)(t,"formRef",h.createRef()),(0,f.A)(t,"state",{isAdded:!1}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"reset",(function(){})),(0,f.A)(t,"onOk",(function(){t.setState({isAdded:!1}),t.formRef.current.submit()})),(0,f.A)(t,"add",(function(){t.setState({isAdded:!0}),t.formRef.current.submit()})),(0,f.A)(t,"getTitle",(function(){var e=t.props,r=e.fieldGroupConfig,n=e.dtmplData,o=t.context.translate;return r.title+o(n?"[${行编辑}]":"[${新建一行}]")})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(dt().mark((function t(){return dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(dt().mark((function t(){return dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=(t.height,t.onOk),r=t.fieldGroupConfig,n=t.dtmplData,o=t.onCancel,a=t.okButtonType,i=t.needConfirm,c=t.okDanger,u=t.serverKey,l=this.state.isAdded,s=this.context.translate;return(0,$.Y)(at.A,{style:{width:1e3},title:this.getTitle(),bodyStyle:{overflow:"auto"},extra:(0,$.Y)(h.Fragment,null,(0,$.Y)(b.A,{size:[8,0]},function(t){return i?c?(0,$.Y)(ot.A,{placement:"rightBottom",title:s("${确定要执行提交吗}?"),onConfirm:t,okText:s("${确定}"),cancelText:s("${取消}"),okType:"danger"},(0,$.Y)(v.Ay,{type:a,danger:!0,size:"small"},"确定")):(0,$.Y)(ot.A,{placement:"rightBottom",title:s("${确定要执行提交吗}?"),onConfirm:t,okText:s("${确定}"),cancelText:s("${取消}")},(0,$.Y)(v.Ay,{size:"small",type:a},s("${确定}"))):(0,$.Y)(v.Ay,{type:a,size:"small",onClick:t},s("${确定}"))}(this.onOk),o?(0,$.Y)(v.Ay,{onClick:o},(0,$.Y)(it.A,null)):""))},(0,$.Y)(pt,{serverKey:u,fieldGroupConfig:r,formRef:this.formRef,onFinish:function(t){return e(t,!l)},dtmplData:n}))}}]);var r,n}(h.PureComponent);function mt(){mt=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function wt(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,bt()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function bt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bt=function(){return!!t})()}(0,f.A)(gt,"defaultProps",{forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"},needConfirm:!1,okButtonType:"primary",okDanger:!1}),(0,f.A)(gt,"contextType",M.U);var At=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=wt(this,e,[].concat(n)),(0,f.A)(t,"formRef",h.createRef()),(0,f.A)(t,"state",{popoverOpen:!1}),(0,f.A)(t,"onOk",(function(e){(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t.setState({popoverOpen:!1}),t.props.onOk(e)})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(mt().mark((function t(){return mt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(mt().mark((function t(){return mt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.state.popoverOpen,r=this.props,n=r.disabled,o=r.buttonIcon,a=r.buttonTitle,i=r.tooltipTitle,c=r.fieldGroupConfig,u=r.dtmplData,l=r.buttonStyle,s=r.serverKey;return(0,$.Y)(A.A,{destroyTooltipOnHide:!0,placement:"leftBottom",open:e,content:(0,$.Y)(gt,{serverKey:s,fieldGroupConfig:c,dtmplData:u,onCancel:function(){t.setState({popoverOpen:!1})},onOk:this.onOk}),trigger:"click"},(0,$.Y)(y.A,{placement:"left",title:i},(0,$.Y)(v.Ay,{disabled:n,style:l,icon:o,size:"small",onClick:function(){t.setState({popoverOpen:!e})}},a||"")))}}]);var r,n}(h.PureComponent);(0,f.A)(At,"defaultProps",{buttonIcon:void 0,disabled:!1});var xt=r(22503),kt=r(62477);function Lt(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,Ct()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function Ct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ct=function(){return!!t})()}var Ot=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=Lt(this,e,[].concat(n)),(0,f.A)(t,"refreshTime",(new Date).getTime()),(0,f.A)(t,"onChange",(function(e){var r=(new Date).getTime();if(e||r-t.refreshTime>10){var n=t.props,o=n.count,a=n.onChange,i=n.min;t.refreshTime=r,a((o||0==o)&&o>=Number(i)?1:null)}})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:function(){(0,kt.A)(this.props),this.onChange(!0)}},{key:"componentDidUpdate",value:function(t){var e=this.props.count;!e&&0!=e||t.count==e||this.onChange(!1)}},{key:"render",value:function(){var t=this.props;return t.count,t.min,t.value,(0,$.Y)(h.Fragment,null)}}])}(h.PureComponent);function Et(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return St(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?St(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function St(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Yt(){Yt=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function jt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Pt(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,It()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function It(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(It=function(){return!!t})()}(0,f.A)(Ot,"defaultProps",{min:0});var Tt=p.A.Item,Nt=d.A.Text,_t=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),c=0;c<r;c++)n[c]=arguments[c];return t=Pt(this,e,[].concat(n)),(0,f.A)(t,"state",{showDtmplView:!1,selectedCode:void 0,showSelectTable:!1,showDtmplEdit:!1,tableLoading:!1,showRowEdit:!1,selectedDtmplData:void 0,filterStr:void 0,pageSize:10,addTmplId:void 0}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"buildDataSource",(function(){var e=t.state.filterStr,r=t.props.value,n=void 0;return r&&(n=[],r.forEach((function(t,r){var o=!0;if(e){o=!1;for(var a=0,i=Object.values(t.fieldMap);a<i.length;a++){var c=i[a];c&&c.toString().indexOf(e)>=0&&(o=!0)}}if(o){var u=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({key:r,relationLabel:t.relationLabel,code:t.code},t.fieldMap);n.push(u)}}))),n})),(0,f.A)(t,"buildColumns",(function(){var e=t.props,r=e.viewOrEdit,n=(e.value,e.fieldGroupConfig),o=e.serverKey,a=(n.title,n.buttons),i=n.fields,c=n.showRelationName,u=n.relationNames,l=(n.showRowNum,n.disabled),s=t.context.translate,f=[],h=0;if(i.forEach((function(t){var e={};f.push(e),e.title=s("${"+t.title+"}"),e.dataIndex=t.id,h++;var r=Y.A.getControlType(t,null);h<12&&j.A.sort(e,r),e.render=function(e,r){return(0,$.Y)(P.A,{serverKey:o,holderType:"table",fieldConfig:t,value:r[t.id]})}})),c){var p={dataIndex:"relationLabel",name:"relation",title:s("${关系}"),type:"relation",editable:!0,fieldAvailable:!0,id:"10000",options:u};f.unshift(p)}var d=a.includes("detail"),g=a.includes("rowEdit"),m=a.includes("dtmplEdit"),w=a.includes("singleDelete");if("edit"==r&&(d||g||m||w)){var b={};f.push(b),b.title=s("${操作}"),b.fixed="right",b.key="action",b.render=function(e){return(0,$.Y)("div",{className:"actionbtn"},d?(0,$.Y)(v.Ay,{disabled:l,title:s("${当前实体}"),type:"primary",icon:(0,$.Y)(k.A,null),size:"small",onClick:function(){return t.showEntityView(e)}}):"",m?(0,$.Y)(v.Ay,{disabled:l,title:s("${编辑}${当前实体}"),icon:(0,$.Y)(L.A,null),size:"small",onClick:function(){return t.showEditDtmplModel(e)}}):"",n.rowActions&&n.rowActions.length>0?n.rowActions.map((function(r){return(0,$.Y)(xt.A,{serverKey:o,disabled:l,key:r.id,data:[e],actionConfig:r,doAction:t.doRowAction,buttonSize:"small"})})):"",g?(0,$.Y)(At,{serverKey:o,disabled:l,buttonIcon:(0,$.Y)(C.A,null),dtmplData:t.getRowEditData(e.code),fieldGroupConfig:n,onOk:t.handleRowEdit,tooltipTitle:s("${编辑}${当前行}")}):"",w?(0,$.Y)(y.A,{placement:"right",title:s("${删除}${当前行}")},(0,$.Y)(v.Ay,{disabled:l,danger:!0,type:"primary",icon:(0,$.Y)(O.A,null),size:"small",onClick:function(){return t.delete(e)}})):"")}}else if("view"==r&&d){var A={};f.push(A),A.title=s("${操作}"),A.fixed="right",A.key="action",A.render=function(e){return(0,$.Y)("div",{className:"actionbtn"},d?(0,$.Y)(v.Ay,{disabled:l,title:s("${当前实体}"),type:"primary",icon:(0,$.Y)(k.A,null),size:"small",onClick:function(){return t.showEntityView(e)}}):"")}}return f})),(0,f.A)(t,"doRowAction",function(){var e=(0,a.A)(Yt().mark((function e(r,n,o){return Yt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.doAction(r,[{title:void 0,code:n[0]}],o);case 2:t.handleDtmplEdit(n[0]);case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"doAction",function(){var e=(0,a.A)(Yt().mark((function e(r,n,o){var a;return Yt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({tableLoading:!0}),a=t.props.serverKey,e.next=4,D.A.postActions(a,r,n,o);case 4:e.sent,t.setState({tableLoading:!1});case 6:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"showEntityView",(function(e){t.setState({selectedCode:e.code,showDtmplView:!0})})),(0,f.A)(t,"hiddenEntityView",(function(){t.setState({showDtmplView:!1})})),(0,f.A)(t,"hiddenEntityEdit",(function(){t.setState({showDtmplEdit:!1})})),(0,f.A)(t,"editRow",(function(t){})),(0,f.A)(t,"delete",(function(e){var r=t.props,n=r.value,o=r.fieldGroupConfig,a=r.onChange,i=[];if(n){var c,u=Et(n);try{for(u.s();!(c=u.n()).done;){var l=c.value;l.code!=e.code&&i.push(l)}}catch(t){u.e(t)}finally{u.f()}}a(o,i)})),(0,f.A)(t,"searchValue",(function(e){t.setState({filterStr:e})})),(0,f.A)(t,"tabChange",(function(e){t.setState({pageSize:e.pageSize})})),(0,f.A)(t,"showSelect",(function(){t.setState({showSelectTable:!0})})),(0,f.A)(t,"select",function(){var e=(0,a.A)(Yt().mark((function e(r){var n,o,a,i;return Yt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.setState({showSelectTable:!1}),r&&!(r.length<=0)){e.next=3;break}return e.abrupt("return");case 3:n=[],o=Et(r);try{for(o.s();!(a=o.n()).done;)i=a.value,n.push(i.code)}catch(t){o.e(t)}finally{o.f()}return e.next=8,t.add(n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"add",function(){var e=(0,a.A)(Yt().mark((function e(r){var n,a,i,c,u,l,s,f,h;return Yt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props,a=n.value,i=n.fieldGroupConfig,c=n.onChange,u=n.serverKey,l=i.relationNames,t.setState({tableLoading:!0}),e.next=5,D.A.requestSelectedData(u,i.id,r);case 5:if(s=e.sent){f=Et(s);try{for(f.s();!(h=f.n()).done;)h.value.relationLabel=l[0]}catch(t){f.e(t)}finally{f.f()}}a&&s.unshift.apply(s,(0,o.A)(a)),c(i,s),t.setState({tableLoading:!1});case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"getRowEditData",(function(e){var r=t.props.value,n=void 0;if(e){var o,a=Et(r);try{for(a.s();!(o=a.n()).done;){var i=o.value;if(e==i.code){n=i;break}}}catch(t){a.e(t)}finally{a.f()}}return n})),(0,f.A)(t,"handleDtmplAdd",function(){var e=(0,a.A)(Yt().mark((function e(r){return Yt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({showDtmplEdit:!1}),e.next=3,t.add([r]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"handleDtmplEdit",function(){var e=(0,a.A)(Yt().mark((function e(r){var n,a,i,c,u,l,s,f,h,p;return Yt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props,a=n.value,i=n.fieldGroupConfig,c=n.onChange,i.title,i.fields,i.showRelationName,i.relationNames,i.showRowNum,u=i.serverKey,t.setState({tableLoading:!0,showDtmplEdit:!1}),e.next=5,D.A.requestSelectedData(u,i.id,[r]);case 5:if(l=e.sent[0],(s=(0,o.A)(a))&&l){f=Et(s);try{for(f.s();!(h=f.n()).done;)(p=h.value).code==l.code&&(p.fieldMap=l.fieldMap)}catch(t){f.e(t)}finally{f.f()}}c(i,s),t.setState({tableLoading:!1});case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"handleRowEdit",(function(e){var r=t.props,n=r.value,a=r.fieldGroupConfig,i=r.onChange,c=t.context.translate,u=[];n&&(u=(0,o.A)(n));var l,s=!0,f=Et(u);try{for(f.s();!(l=f.n()).done;){var h=l.value;if(h.code==e.code){s=!1,h.editStatus=e.editStatus,h.fieldMap=e.fieldMap,h.relationLabel=e.relationLabel;break}}}catch(t){f.e(t)}finally{f.f()}s&&u.unshift(e),i(a,u),s?g.Ay.success(c("${已添加}")):g.Ay.success(c("${已修改}"))})),(0,f.A)(t,"showAddDtmplModel",(function(e){t.setState({showDtmplEdit:!0,addTmplId:e,selectedCode:void 0})})),(0,f.A)(t,"showEditDtmplModel",(function(e){t.setState({showDtmplEdit:!0,addTmplId:void 0,selectedCode:e.code})})),(0,f.A)(t,"getAddTmplButton",(function(e){var r=t.context.translate;return e&&e.length<1?r("${没有分类添加按钮}"):e.map((function(e){return(0,$.Y)("p",null,(0,$.Y)(v.Ay,{size:"small",type:"text",onClick:function(){return t.showAddDtmplModel(e.id)}},e.title))}))})),(0,f.A)(t,"buildButtons",(function(){var e=t.props,r=e.fieldGroupConfig,n=e.viewOrEdit,o=e.value,a=e.serverKey,i=t.context.translate,c=r.buttons,u=r.disabled,l=(t.state.showRowEdit,u||!!r.max&&r.max<=(o?o.length:0));return"edit"==n?(0,$.Y)(m.A,null,(0,$.Y)(w.A,{span:20},(0,$.Y)(b.A,null,c.includes("rowAdd")?(0,$.Y)(At,{serverKey:a,disabled:l,buttonStyle:{marginBottom:10},buttonTitle:i("${新建一行}"),fieldGroupConfig:r,onOk:t.handleRowEdit}):"",c.includes("dtmplAdd")?r.classifiedAddConfigs&&r.classifiedAddConfigs.length>0?(0,$.Y)(A.A,{arrow:!1,content:t.getAddTmplButton(r.classifiedAddConfigs),placement:"bottomRight"},(0,$.Y)(y.A,null,(0,$.Y)(v.Ay,{icon:(0,$.Y)(E.A,null)},i("${新增}")))):(0,$.Y)(v.Ay,{disabled:l,icon:(0,$.Y)(E.A,null),size:"small",onClick:function(){return t.showAddDtmplModel()},style:{marginBottom:10}},i("${新增}")):"",c.includes("selectAdd")?(0,$.Y)(v.Ay,{disabled:l,type:"primary",icon:(0,$.Y)(S.A,null),size:"small",onClick:t.showSelect,style:{marginBottom:10}},i("${选择}")):"",r.min&&(!o||o.length<=0)?(0,$.Y)(Nt,{style:{color:"red"}},i("${请选择或添加}"),i("${"+r.title+"}")):null,(0,$.Y)(Tt,{name:"$virtual"+r.id,style:{margin:0,maxHeight:"32px"},rules:r.min?[{required:!0,message:""}]:null},(0,$.Y)(Ot,{min:r.min+"",style:{marginBottom:10},count:o?o.length:0,value:o}))))):""})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(Yt().mark((function t(){return Yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(Yt().mark((function t(e){var r,n;return Yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.props.fieldGroupConfig,n=e.fieldGroupConfig,r.disabled==n.disabled&&r.mainCode==n.mainCode||this.setState({filterStr:""});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props,r=e.fieldGroupConfig,n=e.value,o=e.parentId,a=e.loading,i=e.initCollapse,c=e.mainCode,u=e.serverKey,l=e.showRightNav,s=this.state,f=s.pageSize,p=s.selectedCode,d=s.showDtmplView,v=s.showSelectTable,y=s.showDtmplEdit,g=s.addTmplId,m=s.tableLoading,w=(s.showRowEdit,s.selectedDtmplData,this.context.translate),b=r.buttons,A=r.mainCode?r.mainCode:c||o,k={pageSize:f,hideOnSinglePage:!0,defaultCurrent:1,total:n?n.length:void 0,showTotal:function(t){return w("${总共}"+t+"${条}")}},L=[];if(n){var C,O=Et(n);try{for(O.s();!(C=O.n()).done;){var E=C.value;L.push(E.code)}}catch(t){O.e(t)}finally{O.f()}}return r.displayConfig.includes("nonDataNonDisplayed")&&(!n||n.length<=0)?"":(0,$.Y)(h.Fragment,null,(0,$.Y)(nt.A,{showRightNav:l,initCollapse:i||r.displayConfig.includes("folded"),title:r.title,tip:r.tip,id:o+r.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:a,bodyStyle:{padding:"6px"}},(0,$.Y)("div",{className:"editTableList"},this.buildButtons(),(0,$.Y)(x.A,{size:"small",locale:{emptyText:(0,$.Y)("div",{style:{textAlign:"center",width:"100%"}},(0,$.Y)(Nt,{disabled:!0},w("${暂无数据}...")))},bordered:!0,loading:m,dataSource:this.buildDataSource(),columns:this.buildColumns(),pagination:k,onChange:this.tabChange}))),b.includes("detail")?(0,$.Y)(I.A,{serverKey:u,mainCode:A,open:d,onCancel:this.hiddenEntityView,sourceId:r.id,code:p}," "):"",b.includes("dtmplEdit")||b.includes("dtmplAdd")?(0,$.Y)(T.A,{addTmplId:g,serverKey:u,mainCode:A,open:y,onCancel:this.hiddenEntityEdit,sourceId:r.id,code:p,onOk:p?this.handleDtmplEdit:this.handleDtmplAdd}):"",b.includes("selectAdd")?(0,$.Y)(rt,{serverKey:u,defaultCriteriaValue:r.defaultCriteriaValue,maxSelectedRows:r.max,open:v,onOK:this.select,onCancel:function(){t.setState({showSelectTable:!1})},exceptCodes:L,mainCode:A,sourceId:r.id}):"")}}]);var r,n}(h.PureComponent);(0,f.A)(_t,"contextType",M.U),(0,f.A)(_t,"defaultProps",{});var Dt=_t},65560:function(t,e,r){"use strict";var n=r(42455),o=r(62477),a=r(21745),i=r(17636),c=r(44274),u=r(2532),l=r(63549),s=r(91985),f=r(11504),h=r(50828),p=r(96540),d=r(21426),v=r(54763),y=r(46704),g=r(92749),m=r(33958),w=r(11733),b=r(74712),A=r(1026),x=r(17437);function k(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return L(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function C(){C=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function E(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach((function(e){(0,h.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function S(t,e,r){return e=(0,s.A)(e),(0,l.A)(t,Y()?Reflect.construct(e,r||[],(0,s.A)(t).constructor):e.apply(t,r))}function Y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Y=function(){return!!t})()}var j=function(t){function e(){var t;(0,c.A)(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t=S(this,e,[].concat(n)),(0,h.A)(t,"context",void 0),(0,h.A)(t,"state",{selectConfig:void 0,columns:void 0,queryKey:void 0,loading:!0,criteriaData:void 0,disableCols:void 0,pageNo:1,pageSize:void 0}),(0,h.A)(t,"loadData",function(){var e=(0,i.A)(C().mark((function e(r,n){var o,a,i,c,u,l,s,f,h,p;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),o=t.props,a=o.mainCode,i=o.serverKey,c=o.sourceId,u=t.state,l=u.pageNo,s=u.pageSize,f=r.defaultPageSize,h={pageNo:l,pageSize:s||f||10,virtualEndPageNo:void 0},e.next=7,g.A.requestLtmplQueryKey(i,c,E(E(E({},n),h),{},{mainCode:a}));case 7:p=e.sent,t.setState({queryKey:p,criteriaData:n,loading:!1});case 9:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,h.A)(t,"loadConfig",(0,i.A)(C().mark((function e(){var r,n,o,a,i,c,u;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.context.translate,n=t.props,o=n.sourceId,a=n.serverKey,n.showActions,t.setState({loading:!0}),e.next=5,y.A.requestSelectConfig(a,o);case 5:return i=e.sent,c=[],u=0,i.columns.forEach((function(t){var e={};t.title,c.push(e),e.dataIndex=t.id,e.title=r("${"+t.title+"}"),e.width=t.colWidth?t.colWidth:160,e.align=t.valueAlign?t.valueAlign:"left",u++;var n=v.A.getSupportControlType(t);u<12&&d.A.sort(e,n),"序号"===t.title?(e.width=t.colWidth?t.colWidth:50,e.align=t.valueAlign?t.valueAlign:"center",e.render=function(t,e,r){return(0,x.Y)("label",null,r+1)},t.sorter=void 0):e.render=function(e,r){return(0,x.Y)(b.A,{serverKey:a,holderType:"table",fieldConfig:t,value:r[t.id]})}})),t.setState({columns:c,selectConfig:i,loading:!1}),e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)})))),(0,h.A)(t,"doSearch",function(){var e=(0,i.A)(C().mark((function e(r){var n,o;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state.selectConfig,o=E({},r),e.next=4,t.loadData(n,o);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,h.A)(t,"changeRowSelection",(function(e,r,n){var o,i=[],c=t.props,u=c.selectedRows,l=c.selectedDatas,s=c.onChange,f=c.maxSelectedRows;if(n){var h=[],p=[];1!=f&&p.push.apply(p,(0,a.A)(u));var d,v=!1,y=k(e);try{for(y.s();!(d=y.n()).done;){var g=d.value;v=!1;var m,w=k(p);try{for(w.s();!(m=w.n()).done;){var b=m.value;g.code==b.code&&(v=!0)}}catch(t){w.e(t)}finally{w.f()}v||p.push(g),h.push(g.code)}}catch(t){y.e(t)}finally{y.f()}var A=[];A.push.apply(A,p);for(var x=0,L=p;x<L.length;x++){var C=L[x];if(n.includes(C.code)&&!h.includes(C.code))for(var O in A)A[O].code==C.code&&A.splice(Number(O),1)}o=A}else o=e;var E,S=[].concat((0,a.A)(l),(0,a.A)(r)),Y=k(o);try{for(Y.s();!(E=Y.n()).done;){var j,P=E.value,I=k(S);try{for(I.s();!(j=I.n()).done;){var T=j.value;T.code==P.code&&i.push(T)}}catch(t){I.e(t)}finally{I.f()}}}catch(t){Y.e(t)}finally{Y.f()}s(o,i)})),(0,h.A)(t,"onChangePage",(function(e,r){t.setState({pageNo:e,pageSize:r})})),t}return(0,f.A)(e,t),(0,u.A)(e,[{key:"componentDidMount",value:(n=(0,i.A)(C().mark((function t(){return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=this,t.next=3,this.loadConfig();case 3:return t.t1=t.sent,t.t2={},t.next=7,t.t0.loadData.call(t.t0,t.t1,t.t2);case 7:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,i.A)(C().mark((function t(e){var r,n,a,i,c,u;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((0,o.A)(this.props),r=this.state,n=r.selectConfig,a=r.criteriaData,i=r.queryKey,c=r.loading,e.exceptCodes,e.open,u=n){t.next=8;break}return t.next=7,this.loadConfig();case 7:u=t.sent;case 8:if(i||c){t.next=11;break}return t.next=11,this.loadData(u,a);case 11:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.maxSelectedRows,r=t.selectedRows,n=t.selectedDatas,o=t.serverKey,a=this.state,i=a.queryKey,c=a.columns,u=a.selectConfig,l=a.criteriaData,s=a.loading,f=a.pageNo,h=a.pageSize;if(!u)return(0,x.Y)(p.Fragment,null);var d=u.buttons,v=u.criterias,y=u.jumps,g=u.actions;return d.includes("batchDelete")||d.includes("query")&&v&&v.length>0||g&&g.length>0||y&&y.length,(0,x.Y)("div",{className:"actTable"},(0,x.Y)(w.A,{serverKey:o,selectedRows:r,selectedDatas:n,ltmplConfig:u,data:l,doSearch:this.doSearch,loading:s}),(0,x.Y)(m.A,{serverKey:o,maxSelectedRows:e,selectedRows:r,primaryColumn:u.primaryColumn,columns:c,pageInfo:{pageNo:f,pageSize:h||u.defaultPageSize},onChangePage:this.onChangePage,queryKey:i,onChangeRowSelection:this.changeRowSelection}))}}]);var r,n}(p.PureComponent);(0,h.A)(j,"contextType",A.U),(0,h.A)(j,"defaultProps",{maxSelectedRows:1e3,selectedDatas:[],showActions:!1}),e.A=j},21426:function(t,e){"use strict";e.A={sort:function(t,e,r){var n=t.dataIndex;t.sorter="decimal"==e||"int"==e||"float"==e||"double"==e?function(t,e){return t[n]-e[n]}:"text"==e||"textarea"==e||"date"==e||"datetime"==e?function(t,e){return t[n]?t[n].localeCompare(e[n],"zh-CN"):-1}:function(t,e){return t[n]&&e[n]&&t[n].localeCompare?t[n]?t[n].localeCompare(e[n],"zh-CN"):-1:1},r&&(t.defaultSortOrder=r),t.showSorterTooltip=!1}}},54763:function(t,e,r){"use strict";var n=r(40403),o=new Set;function a(){}o.add("date-YY"),o.add("daterange-YY"),o.add("date-M1"),o.add("daterange-M1"),o.add("date"),o.add("daterange"),o.add("datetime-HH"),o.add("datetimerange-HH"),o.add("datetime-mm"),o.add("datetimerange-mm"),o.add("datetime"),o.add("datetimerange"),o.add("timestamp"),o.add("time-HH"),o.add("timerange-HH"),o.add("time-mm"),o.add("timerange-mm"),o.add("time"),o.add("timerange"),o.add("timerange-HH-unorder"),o.add("timerange-mm-unorder"),o.add("timerange-unorder"),o.add("text"),o.add("textarea"),o.add("html"),o.add("steps"),o.add("progress"),o.add("password"),o.add("preselect"),o.add("select"),o.add("multiselect"),o.add("checkbox"),o.add("radio"),o.add("yes-no-select"),o.add("yes-no-radio"),o.add("yes-no-switch"),o.add("caselect"),o.add("relation"),o.add("file"),o.add("picture"),o.add("chemstruc"),o.add("sql-code-editor"),o.add("video"),o.add("takeVideo"),o.add("signature"),o.add("non-download-file"),o.add("decimal"),o.add("float"),o.add("double"),o.add("int"),o.add("relselect"),o.add("relselectvalue"),o.add("refselect"),o.add("range"),o.add("intrange"),o.add("decimalrange"),o.add("texttags"),o.add("entity-select"),o.add("table-entity-select"),o.add("modal-entity-select"),o.add("color"),o.add("url"),o.add("hidden"),o.add("lab-tree-select"),a.isSupport=function(t){return!!t&&(!!n.vr.getCustomViewControl(t)||o.has(t))},a.getSupportControlType=function(t){return this.isSupport(t.extControlType)?t.extControlType:this.isSupport(t.controlType)?t.controlType:"text"},a.getControlType=function(t,e){var r;return r=this.getSupportControlType(t),e&&"string"==typeof e&&-1===e.indexOf("@R@")&&"relselect"===r&&-1!=e.indexOf("download-files/")&&(r="file"),r},e.A=a},46704:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(92749),i=r(54763),c=r(69036),u=r(48287);function l(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(){f=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(x=L);var C=A.prototype=w.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=p(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=d;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?g:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=p(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(C,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(h(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var h,p=[],d=!1,v=!1,y=new Map,g=new Map,m=new Map,w=new Map,b=new Map,A=new Map,x=new Map,k=new Map,L=new Map,C=new Map,O=new Map;function E(t){var e=[];return t&&t.forEach((function(t){var r=i.A.getSupportControlType(t);"caselect"!=r&&"select"!=r&&"multiselect"!=r&&"steps"!=r&&"preselect"!=r&&"checkbox"!=r&&"radio"!=r||g.has(t.mstrucId)||e.push(t.mstrucId)})),e}function S(t){var e=[];return t&&t.forEach((function(t){var r=E(t.writes);P(e,r),r=E(t.preposes),P(e,r)})),e}function Y(t,e){return j.apply(this,arguments)}function j(){return(j=(0,o.A)(f().mark((function t(e,r){var n,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=[],!r){t.next=7;break}return r.groups&&r.groups.forEach((function(t){var e=E(t.fields);P(n,e)})),o=S(r.actions),P(n,o),t.next=7,D(e,n);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function P(t,e){return e&&e.forEach((function(e){t.includes(e)||t.push(e)})),t}function I(t,e){return T.apply(this,arguments)}function T(){return(T=(0,o.A)(f().mark((function t(e,r){var n,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[],o=E(r.columns),P(n,o),o=E(r.criterias),P(n,o),t.next=7,D(e,n);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(t,e){return _.apply(this,arguments)}function _(){return(_=(0,o.A)(f().mark((function t(e,r){var n,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=[],r){t.next=3;break}return t.abrupt("return");case 3:return o=E(r.columns),P(n,o),o=E(r.criterias),P(n,o),o=E(r.drillingParams),P(n,o),o=E(r.reStatParams),P(n,o),o=S(r.actions),P(n,o),o=S(r.rowActions),P(n,o),t.next=17,D(e,n);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(t,e,r){return R.apply(this,arguments)}function R(){return(R=(0,o.A)(f().mark((function t(e,r,n){var o,i,c,u,s,h;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r&&r.length>0)){t.next=5;break}return t.next=3,a.A.requestEnum(e,r,n);case 3:for(i in o=t.sent){c=o[i],u=l(c);try{for(u.s();!(s=u.n()).done;)(h=s.value).css&&(h.color=h.css.color)}catch(t){u.e(t)}finally{u.f()}g.set(i,c)}case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function F(){}F.loadEnumOfFields=function(){var t=(0,o.A)(f().mark((function t(e,r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=E(r),t.next=3,D(e,n);case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.loadEnumOfFieldsWithPath=function(){var t=(0,o.A)(f().mark((function t(e,r,n){var o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=E(r),t.next=3,D(e,o,n);case 3:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),F.getOptions=function(){var t=(0,o.A)(f().mark((function t(e,r){var n,o,i,c;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=2;break}return t.abrupt("return",null);case 2:if(g.has(r)){t.next=7;break}return t.next=5,a.A.requestOptions(e,r)[r];case 5:if(null!=(n=t.sent)){o=l(n);try{for(o.s();!(i=o.n()).done;)(c=i.value).css&&(c.color=c.css.color)}catch(t){o.e(t)}finally{o.f()}g.set(r,n)}case 7:return t.abrupt("return",g.get(r));case 8:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestLtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(b.has(r)){t.next=10;break}return t.t0=b,t.t1=r,t.next=5,a.A.requestLtmplConfig(e,r);case 5:return t.t2=t.sent,t.t0.set.call(t.t0,t.t1,t.t2),n=b.get(r),t.next=10,N(e,n.ltmplConfig);case 10:return t.abrupt("return",b.get(r));case 11:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestL2LtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A.has(r)){t.next=10;break}return t.t0=A,t.t1=r,t.next=5,a.A.requestL2LtmplConfig(e,r);case 5:return t.t2=t.sent,t.t0.set.call(t.t0,t.t1,t.t2),n=A.get(r),t.next=10,N(e,n.ltmplConfig);case 10:return t.abrupt("return",A.get(r));case 11:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestSelectConfig=function(){var t=(0,o.A)(f().mark((function t(e,r){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w.has(r)){t.next=9;break}return t.t0=w,t.t1=r,t.next=5,a.A.requestSelectConfig(e,r);case 5:return t.t2=t.sent,t.t0.set.call(t.t0,t.t1,t.t2),t.next=9,I(e,w.get(r));case 9:return t.abrupt("return",w.get(r));case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestDtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r,n){var o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(x.has(r)){t.next=11;break}return t.next=3,a.A.requestDtmplConfig(e,r,n);case 3:if(!(o=t.sent)||o.dynamic){t.next=8;break}x.set(r,o),t.next=9;break;case 8:return t.abrupt("return",o);case 9:return t.next=11,Y(e,o);case 11:return t.abrupt("return",x.get(r));case 12:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),F.requestTtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k.has(r)){t.next=6;break}return t.next=3,a.A.requestTtmplConfig(e,r);case 3:n=t.sent,k.set(r,n),k.set(n.id,n);case 6:return t.abrupt("return",k.get(r));case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestViewDtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(L.has(r)){t.next=9;break}return t.t0=L,t.t1=r,t.next=5,a.A.requestViewDtmplConfig(e,r);case 5:return t.t2=t.sent,t.t0.set.call(t.t0,t.t1,t.t2),t.next=9,Y(e,L.get(r));case 9:return t.abrupt("return",L.get(r));case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestAddDtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r,n){var o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=n||r,C.has(o)){t.next=10;break}return t.t0=C,t.t1=o,t.next=6,a.A.requestAddDtmplConfig(e,r,n);case 6:return t.t2=t.sent,t.t0.set.call(t.t0,t.t1,t.t2),t.next=10,Y(e,C.get(o));case 10:return t.abrupt("return",C.get(o));case 11:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),F.getEnums=function(t){return g.get(t)},F.getEnumsValueMap=function(t){var e=m.get(t);if(!e){var r=g.get(t);if(!r)return null;e=new Map,m.set(t,e),r.map((function(t){e.set(t.value,t.value),e.set(t.id,t.value)}))}return e},F.getEnumOption=function(t,e){if(!e)return null;var r=this.getEnums(t),n=void 0;return r&&r.forEach((function(t){t.value!==e||(n=t)})),n},F.getEnumValueColor=function(t,e){var r=F.getEnumOption(t,e);return r?r.color:void 0},F.requestBlocks=function(){var t=(0,o.A)(f().mark((function t(e,r){var n,o,i,c,u;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v){t.next=8;break}return v=!0,t.next=4,a.A.requestBlocks(e||void 0,r||void 0);case 4:if(o=t.sent){i=l(o.blocks);try{for(i.s();!(c=i.n()).done;)u=c.value,p.push(u)}catch(t){i.e(t)}finally{i.f()}h=o.programName,n={blocks:o.blocks,l2MenuId:o.l2MenuId,blockId:o.blockId,programName:o.programName}}t.next=9;break;case 8:n={blocks:p,blockId:r,l2MenuId:e,programName:h};case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.initfastMenu=(0,o.A)(f().mark((function t(){var e,r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(y.size<1)){t.next=5;break}return t.next=3,a.A.requestFastMenu();case 3:if(e=t.sent)for(r in e)y.set(r,e[r]);case 5:case"end":return t.stop()}}),t)}))),F.fastMenu=function(){var t=(0,o.A)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d){t.next=4;break}return d=!0,t.next=4,F.initfastMenu();case 4:return t.abrupt("return",y.get(e));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),F.reload=function(){var t=(0,o.A)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.A.reload();case 2:if("success"==t.sent.status){t.next=5;break}return t.abrupt("return");case 5:this.clear(),c.Ay.success((0,u.A)("${执行成功}"));case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),F.cache=function(t){t&&O.set(t.code,t)},F.getCache=function(t){return O.get(t)},F.clear=(0,o.A)(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:y.clear(),g.clear(),b.clear(),x.clear(),L.clear(),C.clear(),w.clear(),A.clear(),p.splice(0,p.length),O.clear();case 10:case"end":return t.stop()}}),t)}))),e.A=F},92749:function(t,e,r){"use strict";r.d(e,{A:function(){return E}});var n=r(42455),o=r(50828),a=r(17636),i=r(44274),c=r(2532),u=r(8130),l=r(19612),s=r(69036),f=r(21396),h=r.n(f),p=r(34572),d=function(){return(0,c.A)((function t(){(0,i.A)(this,t)}),null,[{key:"aesEncrypt",value:function(t,e){e=e||"kuangkie";var r=h().enc.Utf8.parse(e),n=h().enc.Utf8.parse(t);return h().AES.encrypt(n,r,{mode:h().mode.ECB,padding:h().pad.Pkcs7}).toString()}},{key:"aesDecrypt",value:function(t,e){var r=e||"kuangkie",n=h().enc.Utf8.parse(r),o=h().AES.decrypt(t,n,{mode:h().mode.ECB,padding:h().pad.Pkcs7});return h().enc.Utf8.stringify(o).toString()}},{key:"rsaEncrypt",value:function(t,e){var r=new p.A;return r.setPublicKey(e),r.encrypt(t)}},{key:"rsaDecrypt",value:function(t,e){var r=new p.A;return r.setPrivateKey(e),r.decrypt(t)}}])}(),v=(r(65826),r(74353)),y=r.n(v),g=r(83826),m=r.n(g),w=r(88569),b=r.n(w),A=r(40403),x=r(48287);function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function L(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function C(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?L(Object(r),!0).forEach((function(e){(0,o.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function O(){O=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},C(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}y().extend(m()),y().extend(b());var E=function(){return(0,c.A)((function t(){(0,i.A)(this,t)}),null,[{key:"requestEnum",value:(vt=(0,a.A)(O().mark((function t(e,r,n){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=6;break}return t.next=3,this.requestEnumWithPath(e,r,"/enum");case 3:case 8:return t.abrupt("return",t.sent);case 6:return t.next=8,this.requestEnumWithPath(e,r,n);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return vt.apply(this,arguments)})},{key:"requestEnumWithPath",value:(dt=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r.length>0)){t.next=7;break}return t.next=3,l.A.super({url:u.A.joinPath("/v3",n),serverKey:e,data:{mstrucIds:r}});case 3:return o=t.sent,t.abrupt("return",o.enumMap);case 7:return t.abrupt("return",{});case 8:case"end":return t.stop()}}),t)}))),function(t,e,r){return dt.apply(this,arguments)})},{key:"requestOptions",value:(pt=(0,a.A)(O().mark((function t(e,r){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.requestEnum(e,[r],null);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return pt.apply(this,arguments)})},{key:"requestDtmplConfig",value:(ht=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/dtmpl/config",serverKey:e,method:"GET",query:{sourceId:r,code:n}});case 3:return o=t.sent,t.abrupt("return",o.dtmplConfig);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return ht.apply(this,arguments)})},{key:"requestTtmplConfig",value:(ft=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/ttmpl/config",serverKey:e,method:"GET",query:{sourceId:r}});case 3:return n=t.sent,t.abrupt("return",n.ttmplConfig);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return ft.apply(this,arguments)})},{key:"requestViewDtmplConfig",value:(st=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/view-dtmpl/config",serverKey:e,method:"GET",query:{sourceId:r}});case 3:return n=t.sent,t.abrupt("return",n.dtmplConfig);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return st.apply(this,arguments)})},{key:"requestAddDtmplConfig",value:(lt=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/add-dtmpl/config",serverKey:e,method:"GET",query:{sourceId:r,addTmplId:n}});case 3:return o=t.sent,t.abrupt("return",o.dtmplConfig);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return lt.apply(this,arguments)})},{key:"requestSelectConfig",value:(ut=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/select/config",serverKey:e,method:"GET",query:{sourceId:r}});case 3:return n=t.sent,t.abrupt("return",n.selectConfig);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return ut.apply(this,arguments)})},{key:"requestLtmplConfig",value:(ct=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/ltmpl/config",serverKey:e,method:"GET",query:{sourceId:r}});case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return ct.apply(this,arguments)})},{key:"requestL2LtmplConfig",value:(it=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/l2/ltmpl/config",serverKey:e,method:"GET",query:{sourceId:r}});case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return it.apply(this,arguments)})},{key:"requestLtmplQueryKey",value:(at=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/ltmpl/query/key",serverKey:e,method:"GET",query:C(C({},n),{},{sourceId:r})});case 3:return o=t.sent,t.abrupt("return",o);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return at.apply(this,arguments)})},{key:"requestLtmplQueryTop",value:(ot=(0,a.A)(O().mark((function t(e,r,n){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonLtmplQueryTop(e,r,n,"/v3/ltmpl/top-data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return ot.apply(this,arguments)})},{key:"requestTtmplRootData",value:(nt=(0,a.A)(O().mark((function t(e,r,n){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonLtmplQueryTop(e,r,n,"/v3/ttmpl/root-data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return nt.apply(this,arguments)})},{key:"requestMstrucLtmplQueryTop",value:(rt=(0,a.A)(O().mark((function t(e,r,n){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonLtmplQueryTop(e,r,n,"/v3/mstruc/ltmpl/top-data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return rt.apply(this,arguments)})},{key:"queryTop1",value:(et=(0,a.A)(O().mark((function t(e,r){var n,o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.requestMstrucLtmplQueryTop(e,r,{top:1});case 2:return n=t.sent,o=null,n&&n.entities&&n.entities[0]&&(o=n.entities[0].code),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return et.apply(this,arguments)})},{key:"requestCommonLtmplQueryTop",value:(tt=(0,a.A)(O().mark((function t(e,r,n,o){var a;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=4;break}s.Ay.error("SourceId is undefined!",5),t.next=8;break;case 4:return t.next=6,l.A.super({url:o,serverKey:e,method:"GET",query:C(C({},n),{},{sourceId:r})});case 6:return a=t.sent,t.abrupt("return",a);case 8:case"end":return t.stop()}}),t)}))),function(t,e,r,n){return tt.apply(this,arguments)})},{key:"requestSelectedData",value:(Z=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=3;break}return s.Ay.warning((0,x.A)("${没有选择实体}")),t.abrupt("return",null);case 3:return t.next=6,l.A.super({url:"/v3/field-group/data/selected",serverKey:e,query:{codes:n,sourceId:r},method:"GET"});case 6:if("success"!==(o=t.sent).status){t.next=11;break}return t.abrupt("return",o.entities);case 11:return s.Ay.error((0,x.A)("${没有找到实体}!"),5),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t)}))),function(t,e,r){return Z.apply(this,arguments)})},{key:"requestVersionList",value:(X=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/dtmpl/data/versions",serverKey:e,query:{pageNo:1,sourceId:r,code:n},method:"GET"});case 2:return o=t.sent,t.abrupt("return",o.versions);case 4:case"end":return t.stop()}}),t)}))),function(t,e,r){return X.apply(this,arguments)})},{key:"requestCommonDtmplData",value:(J=(0,a.A)(O().mark((function t(e,r,n,o,a){var i;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:a,serverKey:e,query:{code:n,versionId:o,sourceId:r},method:"GET"});case 2:if("success"!==(i=t.sent).status){t.next=7;break}return t.abrupt("return",C({sourceId:r},i.entity));case 7:return t.abrupt("return",null);case 8:case"end":return t.stop()}}),t)}))),function(t,e,r,n,o){return J.apply(this,arguments)})},{key:"requestDtmplData",value:(Q=(0,a.A)(O().mark((function t(e,r,n,o){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonDtmplData(e,r,n,o,"/v3/dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return Q.apply(this,arguments)})},{key:"getDtmplData",value:(W=(0,a.A)(O().mark((function t(e,r,n,o){var a;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&e.dynamic&&(a=e.entity),a){t.next=5;break}return t.next=4,this.requestDtmplData(r,n,o,null);case 4:a=t.sent;case 5:return t.abrupt("return",a);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return W.apply(this,arguments)})},{key:"requestMstrucDtmplData",value:(z=(0,a.A)(O().mark((function t(e,r,n,o){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonDtmplData(e,r,n,o,"/v3/mstruc/dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return z.apply(this,arguments)})},{key:"requestViewDtmplData",value:(H=(0,a.A)(O().mark((function t(e,r,n,o){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonDtmplData(e,r,n,o,"/v3/view-dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return H.apply(this,arguments)})},{key:"requestMstrucViewDtmplData",value:(U=(0,a.A)(O().mark((function t(e,r,n,o){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonDtmplData(e,r,n,o,"/v3/mstruc/view-dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return U.apply(this,arguments)})},{key:"postCommonDtmplData",value:(V=(0,a.A)(O().mark((function t(e,r,n,o,a){var i,c,u,s;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(c in i=new FormData,n)c.startsWith("$virtual")||i.append(c,n[c]||0==n[c]?n[c]:"");return i.append("sourceId",r.toString()),t.next=5,l.A.super({url:a,serverKey:e,data:i,method:"POST"},"formdata");case 5:return u=t.sent,s=null,u?"success"===u.status&&(o&&(u.message?o.warning((0,x.A)("${保存成功}!")+u.message,4):o.success((0,x.A)("${保存成功}!"),1)),s=u.entityCode?u.entityCode:u.code):o&&o.error((0,x.A)("${保存失败}!"),5),t.abrupt("return",{code:s,status:u?u.status:"error"});case 9:case"end":return t.stop()}}),t)}))),function(t,e,r,n,o){return V.apply(this,arguments)})},{key:"postDtmplData",value:(q=(0,a.A)(O().mark((function t(e,r,n,o){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.postCommonDtmplData(e,r,n,o,"/v3/dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return q.apply(this,arguments)})},{key:"postMstrucDtmplData",value:(B=(0,a.A)(O().mark((function t(e,r,n,o){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.postCommonDtmplData(e,r,n,o,"/v3/mstruc/dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return B.apply(this,arguments)})},{key:"postFileAction",value:function(t,e){return u.A.joinPath(u.A.api(t),"/v3/upload")}},{key:"requestL2LtmplQueryKey",value:(K=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"v3/l2/ltmpl/query/key",serverKey:e,method:"GET",query:C(C({},n),{},{sourceId:r})});case 3:return o=t.sent,t.abrupt("return",o);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return K.apply(this,arguments)})},{key:"requestLtmplCount",value:($=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/ltmpl/data/count",serverKey:e,query:{sourceId:r},method:"GET"});case 3:return n=t.sent,t.abrupt("return",n.count);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return $.apply(this,arguments)})},{key:"requestQueryData",value:(M=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/ltmpl/query/data",serverKey:e,method:"GET",query:C({queryKey:r},n)});case 2:return o=t.sent,t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e,r){return M.apply(this,arguments)})},{key:"getCodesOfSelectedRows",value:function(t){var e=[];if(t&&!(t.length<1)){var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return k(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.code?e.push(o.code):s.Ay.error((0,x.A)("${没找到所选数据的Code}!!"),5)}}catch(t){n.e(t)}finally{n.f()}return e.length<1&&s.Ay.error((0,x.A)("${没找到所选数据的Code}!!"),5),e}}},{key:"deleteData",value:(G=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=this.getCodesOfSelectedRows(n),t.next=3,this.deleteByCode(e,r,o);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return G.apply(this,arguments)})},{key:"deleteByCode",value:(F=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/ltmpl/data",serverKey:e,data:{codes:n,sourceId:r},method:"DELETE"});case 2:if(!(o=t.sent)||"success"!=o.status){t.next=8;break}return s.Ay.success((0,x.A)("${删除成功}"),1),t.abrupt("return",!0);case 8:return s.Ay.error((0,x.A)("${删除失败}"),3),t.abrupt("return",!1);case 10:case"end":return t.stop()}}),t)}))),function(t,e,r){return F.apply(this,arguments)})},{key:"requestQueryCount",value:(R=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/ltmpl/query/count",serverKey:e,method:"GET",query:{queryKey:r}});case 2:return n=t.sent,t.abrupt("return",n.count);case 4:case"end":return t.stop()}}),t)}))),function(t,e){return R.apply(this,arguments)})},{key:"postActions",value:(D=(0,a.A)(O().mark((function t(e,r,n,o){var a,i,c,u;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(c in a=this.getCodesOfSelectedRows(n),i=new FormData,o)i.append(c,o[c]?o[c]:"");return i.append("sourceId",r.toString()),i.append("codes",a.join(",")),t.next=7,l.A.super({url:"/v3/action",serverKey:e,data:i,method:"POST"},"formdata",null);case 7:return u=t.sent,t.abrupt("return",u);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return D.apply(this,arguments)})},{key:"increCalc",value:(_=(0,a.A)(O().mark((function t(e,r){var n,o,a=arguments;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:{},t.next=3,l.A.super({url:"/v3/stat/increcalc",serverKey:e,method:"POST",data:C(C({},n),{},{sourceId:r})});case 3:return(o=t.sent)&&"success"===o.status?s.Ay.success((0,x.A)("${统计成功}"),1):s.Ay.error((0,x.A)("${统计失败}")),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t)}))),function(t,e){return _.apply(this,arguments)})},{key:"doCopy",value:(N=(0,a.A)(O().mark((function t(e,r,n,o,a){var i;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/mstruc/copy-data",serverKey:e,method:"POST",query:{sourceId:r,code:n,copyRelation:o,copyOpp2One:a}},null,null);case 2:return(i=t.sent)&&"success"==i.status&&i.message&&s.Ay.info(i.message,4),t.abrupt("return",i.entityCode);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r,n,o){return N.apply(this,arguments)})},{key:"queryCode",value:(T=(0,a.A)(O().mark((function t(e,r,n){var o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=void 0,!r){t.next=16;break}if("listop"!=r){t.next=9;break}return t.next=5,this.queryTop1(n,e);case 5:(o=t.sent)||(o="bad-code"),t.next=16;break;case 9:if("listop-new"!=r){t.next=15;break}return t.next=12,this.queryTop1(n,e);case 12:o=t.sent,t.next=16;break;case 15:"new"==r&&(o=null);case 16:return t.abrupt("return",o);case 17:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return T.apply(this,arguments)})},{key:"download",value:function(t,e){var r=e.split("/"),n=r[r.length-1];u.A.downloadFile(this.getFileUrl(t,e)+"&disposition=attachment",n)}},{key:"openfile",value:function(t,e,r){var n=e.split("/"),o=n[n.length-1];u.A.openFile(this.getFileUrl(t,e),o,r)}},{key:"getFileUrl",value:function(t,e){var r=u.A.hydrocarbonToken(u.A.programCode(t));return u.A.joinPath(u.A.api(t),u.A.joinPath("/v3/files",e))+"?@token=".concat(r,"&@programToken=").concat(u.A.programCode())}},{key:"getFileTxtUrl",value:function(t,e){var r=u.A.hydrocarbonToken(u.A.programCode(t));return u.A.joinPath(u.A.api(t),u.A.joinPath("/v3/files/text",e))+"?@token=".concat(r,"&@programToken=").concat(u.A.programCode())}},{key:"loadFileTxt",value:(I=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:u.A.joinPath("/v3/files/text",r),serverKey:e,method:"GET"});case 2:return n=t.sent,t.abrupt("return",n.text);case 4:case"end":return t.stop()}}),t)}))),function(t,e){return I.apply(this,arguments)})},{key:"requestBlocks",value:(P=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/menu/blocks",method:"GET",query:{l2MenuId:e,blockId:r}});case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return P.apply(this,arguments)})},{key:"requestBlockMenuAuths",value:(j=(0,a.A)(O().mark((function t(){var e;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/menu/block-menu-auths",method:"GET",query:{}});case 3:return e=t.sent,t.abrupt("return",null==e?void 0:e.blocks);case 5:case"end":return t.stop()}}),t)}))),function(){return j.apply(this,arguments)})},{key:"requestRoleAuths",value:(Y=(0,a.A)(O().mark((function t(e){var r;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/auth/role-auths",method:"GET",query:{roleCode:e}});case 3:return r=t.sent,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)}))),function(t){return Y.apply(this,arguments)})},{key:"postRoleAuths",value:(S=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/auth/role-auths",method:"POST",query:{roleCode:e,auths:r}});case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return S.apply(this,arguments)})},{key:"logout",value:(E=(0,a.A)(O().mark((function t(){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l.A.super({url:"/v3/auth/token",method:"DELETE"}).then((function(t){u.A.toLogin()}));case 1:case"end":return t.stop()}}),t)}))),function(){return E.apply(this,arguments)})},{key:"resetPassword",value:(L=(0,a.A)(O().mark((function t(e,r,n,o){var a,i,c;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=d.rsaEncrypt(r,o),i=d.rsaEncrypt(n,o),t.next=4,l.A.super({url:"/v3/auth/password",serverKey:e,query:{oldPassword:a,newPassword:i},method:"POST"});case 4:return c=t.sent,t.abrupt("return",c);case 6:case"end":return t.stop()}}),t)}))),function(t,e,r,n){return L.apply(this,arguments)})},{key:"getContextSourceConfig",value:(b=(0,a.A)(O().mark((function t(){var e;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/context-source-config",method:"GET"});case 2:if(!(e=t.sent)){t.next=7;break}return t.abrupt("return",e.config);case 7:return t.abrupt("return",null);case 8:case"end":return t.stop()}}),t)}))),function(){return b.apply(this,arguments)})},{key:"getContextSourceValue",value:(w=(0,a.A)(O().mark((function t(){var e;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/auth/context-source-value",method:"GET"});case 2:return e=t.sent,t.abrupt("return",e?e.value:null);case 4:case"end":return t.stop()}}),t)}))),function(){return w.apply(this,arguments)})},{key:"login",value:(m=(0,a.A)(O().mark((function t(e,r,n,o,a,i){var c,u,s;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=y()(new Date).tz("Europe/London").format("YYYY-MM-DD HH:mm:ss"),e.datetime=c,u=d.rsaEncrypt(JSON.stringify(e),o),t.next=5,l.A.super({url:"/v3/auth/hctoken",serverKey:i,header:{programCode:a},query:{userInfo:u,kaptchaToken:r,kaptchaText:n},method:"GET"});case 5:return s=t.sent,t.abrupt("return",s);case 7:case"end":return t.stop()}}),t)}))),function(t,e,r,n,o,a){return m.apply(this,arguments)})},{key:"setContext",value:(g=(0,a.A)(O().mark((function t(e){var r,n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new FormData).append("context",JSON.stringify(e)),t.next=4,l.A.super({url:"/v3/auth/context",data:r,method:"POST"},"formdata");case 4:return(n=t.sent)&&"success"===n.status&&(window.location.hash="#/home"),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t)}))),function(t){return g.apply(this,arguments)})},{key:"getKaptchaToken",value:(v=(0,a.A)(O().mark((function t(e){var r;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/auth/kaptcha",header:{programCode:e},method:"POST"});case 2:if(!(r=t.sent)||"success"!==r.status){t.next=7;break}return t.abrupt("return",r);case 7:return t.abrupt("return",null);case 8:case"end":return t.stop()}}),t)}))),function(t){return v.apply(this,arguments)})},{key:"getRasPubkey",value:(p=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/auth/ras-pubkey",header:{programCode:r},serverKey:e,method:"GET"});case 2:if(!(n=t.sent)||"success"!==n.status){t.next=7;break}return t.abrupt("return",n.rasPubkey);case 7:return t.abrupt("return",null);case 8:case"end":return t.stop()}}),t)}))),function(t,e){return p.apply(this,arguments)})},{key:"getUser",value:(h=(0,a.A)(O().mark((function t(e,r){var n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({header:{programCode:e,hydrocarbonToken:r},url:"/v3/current-user"});case 2:return n=t.sent,t.abrupt("return",n?n.user:null);case 4:case"end":return t.stop()}}),t)}))),function(t,e){return h.apply(this,arguments)})},{key:"requestFastMenu",value:(f=(0,a.A)(O().mark((function t(){var e;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/menu/fast-menu",method:"GET"});case 3:return e=t.sent,t.abrupt("return",e?e.fastMenu:null);case 5:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"reload",value:(o=(0,a.A)(O().mark((function t(){var e;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/tmpl/reload",method:"GET"});case 3:return e=t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getAllLang",value:(r=(0,a.A)(O().mark((function t(e){var r,n;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={url:"/v3/languages",method:"GET"},void 0!==e&&(r.serverKey=e),t.next=5,l.A.super(r);case 5:return n=t.sent,t.abrupt("return",n);case 7:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)})},{key:"getLocale",value:(e=(0,a.A)(O().mark((function t(e,r){var n,o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={url:"".concat("/v3/multilingual","?language=").concat(e),method:"GET"},void 0!==r&&(n.serverKey=r),t.next=5,l.A.super(n);case 5:return o=t.sent,t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)}))),function(t,r){return e.apply(this,arguments)})},{key:"initProgramConfig",value:(t=(0,a.A)(O().mark((function t(e){var r,o,a;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.programCode&&A.vr.setProgramCode(e.programCode),e.hydrocarbonServer&&A.vr.setHydrocarbonServer(e.hydrocarbonServer),e.extendServer&&(r=e.extendServer,"object"==(0,n.A)(r)&&(o=[],Array.isArray(r)?o=r:o.push(r),A.vr.putExtendServers(o))),A.vr.setProgramName(e.programName),A.vr.setProgramName_sub(e.programName_sub),A.vr.setProgramName_NavLeft(e.programName_NavLeft),A.vr.setProgramName_Logo(e.programName_Logo),t.next=9,l.A.getProramConfig();case 9:(a=t.sent)&&(A.vr.setProgramCode(a.programCode),A.vr.setHydrocarbonServer(a.hydrocarbonServer),A.vr.setProgramName(a.programName),A.vr.setProgramName_sub(a.programName_NavLeft),A.vr.setProgramName_NavLeft(a.programName_NavLeft),A.vr.setProgramName_Logo(a.programName_Logo));case 11:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}]);var t,e,r,o,f,h,p,v,g,m,w,b,L,E,S,Y,j,P,I,T,N,_,D,R,F,G,M,$,K,B,q,V,U,H,z,W,Q,J,X,Z,tt,et,rt,nt,ot,at,it,ct,ut,lt,st,ft,ht,pt,dt,vt}()},19612:function(t,e,r){"use strict";r.d(e,{A:function(){return s}});var n=r(44274),o=r(2532),a=r(15734),i=r.n(a),c=r(69036),u=r(8130),l=r(48287),s=function(){return(0,o.A)((function t(){(0,n.A)(this,t)}),null,[{key:"super",value:function(t,e,r){var n,o,a=t.serverKey;o=null!==(n=t.header)&&void 0!==n&&n.programCode?t.header.programCode:u.A.programCode(a);var s=null;t.header&&t.header.hydrocarbonToken?s=t.header.hydrocarbonToken:u.A.hydrocarbonToken(o)?s=u.A.hydrocarbonToken(o):a?u.A.hydrocarbonToken():u.A.getAnoHydrocarbonToken(),t.data&&!1!==t.data.isShowLoading&&(document.getElementById("ajaxLoading").style.display=r||"block");var f="form";"formdata"===e?f=null:"json"===e&&(f="application/json");var h=t.method?t.method:"POST";return new Promise((function(e,r){var n=t.hydrocarbonServer?t.hydrocarbonServer:u.A.api(a);i()(h,u.A.joinPath(n,t.url)).type(f).set("hydrocarbon-token",s).set("hydrocarbon-program-token",o).query(t.query||"").send(t.data).end((function(n,o){if(o)if(t.data&&!1!==t.data.isShowLoading&&(document.getElementById("ajaxLoading").style.display="none"),200===o.status){var a=o.body;a&&"error"===a.status&&c.Ay.error((0,l.A)("${错误消息}: ")+a.message,5),e(a)}else 201===o.status?e(o):403===o.status?u.A.toLogin():405===o.status||406===o.status?(c.Ay.error((0,l.A)("${权限不足}"),5),e(o)):404===o.status||504===o.status?(console.log((0,l.A)("${没找到服务}(")+t.url+")",5),e(o)):500===o.status?(o.body&&o.body.message?c.Ay.error((0,l.A)("${后台处理错误}(")+o.body.message+")",5):o.text&&c.Ay.error(o.text),console.log(o.text),e(void 0)):(c.Ay.error((0,l.A)("${请求服务失败}(")+t.url+")",5),r(o.body));else c.Ay.error((0,l.A)("${服务器连接失败}")),e(null)}))}))}},{key:"getProramConfig",value:function(){return new Promise((function(t,e){i().get("programConfig.json").end((function(r,n){n?200===n.status?t(n.body):e(n.body):e()}))})).catch((function(t){console.log(t)}))}},{key:"getHeaderObj",value:function(){return{"hydrocarbon-token":u.A.hydrocarbonToken()?u.A.hydrocarbonToken():u.A.getAnoHydrocarbonToken(),"hydrocarbon-program-token":u.A.programCode()}}}])}()},78229:function(t,e,r){"use strict";var n=r(74353),o=r.n(n),a=r(27251);function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(){}u.current=function(t,e){var r=e;if(r||(r="YYYY-MM-DD HH:mm:ss SSS"),!t)return null;var n=[t];t.includes("~")&&(n=t.split("~"));var o=[];for(var a in n){var i=this.currentL1(n[a],r);o[a]=i||""}return 1==n.length?o[0]:o[0]+"~"+o[1]},u.currentL1=function(t,e){if(!t)return null;var r=new RegExp("current:?([-,+]?)([0-9]*)([D,M,Y,m,s,h]?)").exec(t);if(r){var n=r[3];if(""==n)return o()().format(e);var a=r[1];""==a&&(a="+");var i=r[2];""==i&&(i="1");var c=parseInt(i),u="days";switch(n){case"D":u="days";break;case"M":u="months";break;case"Y":u="years";break;case"W":u="weeks";break;case"h":u="hours";break;case"m":u="minutes";break;case"s":u="seconds"}return"-"==a?o()().subtract(c,u).format(e):o()().add(c,u).format(e)}return null},u.getFieldValueTitleOfMstrucId=function(t,e,r,n){var o=u.getFieldId(t,r),a=e&&e[o];if("null"!=a&&a){if(Array.isArray(a)){var i="";a.forEach((function(t){i=t.indexOf("@R@")>0?t.split("@R@")[1]+",":t+","})),a=i.substring(0,i.lastIndexOf(","))}}else a=null;return a?a=a.indexOf("@R@")>0?a.split("@R@")[1]:a:n},u.getFieldValueCodeOfMstrucId=function(t,e,r,n){var o=u.getFieldId(t,r),a=e&&e[o];if(!a)return n;if(a instanceof Array){var i=[];a.forEach((function(t){i.push(t.indexOf("@R@")>0?t.split("@R@")[0]:t)})),a=i.toString()}else a=a.indexOf("@R@")>0?a.split("@R@")[0]:a;return a},u.getFieldValueOfMstrucId=function(t,e,r,n){var o=u.getFieldId(t,r),a=e&&e[o];return a?a=a instanceof Array?a.toString():e[o]:n},u.getFieldId=function(t,e){var r=void 0,n=t.groups;if(null!=n){var o,a=i(n);try{for(a.s();!(o=a.n()).done;){var c,u=i(o.value.fields);try{for(u.s();!(c=u.n()).done;){var l=c.value;if(l.mstrucId==e){r=l.id;break}}}catch(t){u.e(t)}finally{u.f()}if(r)break}}catch(t){a.e(t)}finally{a.f()}}else{var s=t.columns;if(null!=s){var f,h=i(s);try{for(h.s();!(f=h.n()).done;){var p=f.value;if(p.mstrucId==e){r=p.id;break}}}catch(t){h.e(t)}finally{h.f()}}}return r},u.getRelMstrucFieldId=function(t,e,r){var n=u.getFieldId(t,r);return e&&e[n]?e[n].split("@R@")[0]:void 0},u.buildInDtmplConfig=function(t,e,r){if(!t.buildInFuncFields){var n,o=[],c=i(t.groups);try{for(c.s();!(n=c.n()).done;){var u,l=i(n.value.fields);try{for(l.s();!(u=l.n()).done;){var s=u.value;(s.requiredRuleCriterias&&s.requiredRuleCriterias.length>0||s.usableRuleCriterias&&s.usableRuleCriterias.length>0)&&(s.shouldUpdate=!0,o.push(s))}}catch(t){l.e(t)}finally{l.f()}}}catch(t){c.e(t)}finally{c.f()}t.buildInFuncFields=o}if(t.buildInFuncFields.length>0){var f=function(e,r,n){var o,c=i(t.buildInFuncFields);try{for(c.s();!(o=c.n()).done;){var u=o.value;null!=u.requiredRuleCriterias&&u.requiredRuleCriterias.length>0&&(a.A.isMatch(u.requiredRuleCriterias,[r],n,t)?u.required=!0:u.required=!1),null!=u.usableRuleCriterias&&u.usableRuleCriterias.length>0&&(a.A.isMatch(u.usableRuleCriterias,[r],n,t)?u.disabled=!1:u.disabled=!0)}}catch(t){c.e(t)}finally{c.f()}};return f(0,e,null),t.onValuesChange=function(t,e,r){f(0,e,r)},t}return t},e.A=u},68144:function(t,e,r){"use strict";var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(677),d=r(47152),v=r(16370),y=r(28392),g=r(87937),m=r(92749),w=r(25714),b=r(17437);function A(){A=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(x=L);var C=b.prototype=m.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function x(t,e,r){return e=(0,l.A)(e),(0,u.A)(t,k()?Reflect.construct(e,r||[],(0,l.A)(t).constructor):e.apply(t,r))}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}var L=function(t){function e(){var t;(0,i.A)(this,e);for(var r=arguments.length,n=new Array(r),c=0;c<r;c++)n[c]=arguments[c];return t=x(this,e,[].concat(n)),(0,f.A)(t,"treekeyAuthId",{}),(0,f.A)(t,"authIdtreekeys",{}),(0,f.A)(t,"state",{treeData:void 0,loading:!1}),(0,f.A)(t,"initData",(0,a.A)(A().mark((function e(){var r,n;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),e.next=3,m.A.requestBlockMenuAuths();case 3:r=e.sent,n=[],r&&(n=t.toTreeNode(r),console.log("treeData",n)),t.setState({treeData:n,loading:!1});case 7:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"toTreeNode",(function(e){var r=[];return e&&e.forEach((function(e){var n={key:e.id,title:e.title};r.push(n);var a=[];n.children=a,a.push.apply(a,(0,o.A)(t.toTreeNode(e.items))),e.programAuths&&e.programAuths.forEach((function(e){var r=n.key+e.id;t.treekeyAuthId[r]=e.id,t.authIdtreekeys[e.id]||(t.authIdtreekeys[e.id]=[]),t.authIdtreekeys[e.id].push(r);var o={key:r,title:e.title,isLeaf:!0};o.code=e.id,a.push(o)}))})),r})),(0,f.A)(t,"onCheck",(function(e){var r=[];e&&e.forEach((function(e){t.treekeyAuthId[e]&&r.push(t.treekeyAuthId[e])})),t.props.onChange(r)})),(0,f.A)(t,"renderTitle",(function(t){return(0,b.Y)(p.A,{bordered:!1,style:{width:"100%",minWidth:"180px",marginBottom:2},bodyStyle:{padding:"2px"}},(0,b.Y)(d.A,null,(0,b.Y)(v.A,{span:24},(0,b.Y)(y.A,null,t.isLeaf?(0,b.Y)(w.A,{rotate:180,style:{color:"#f5222d",marginRight:"4px"}}):null,t.title))))})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(l=(0,a.A)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.refresh();case 2:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"componentDidUpdate",value:(u=(0,a.A)(A().mark((function t(e,r){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(t,e){return u.apply(this,arguments)})},{key:"componentWillUnmount",value:(n=(0,a.A)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"refresh",value:(r=(0,a.A)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.setState({loading:!0}),t.next=3,this.initData();case 3:this.setState({loading:!1});case 4:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props,r=e.checks,n=(e.onChange,this.state),a=n.loading,i=n.treeData,c=[];return r.forEach((function(e){t.authIdtreekeys[e]&&c.push.apply(c,(0,o.A)(t.authIdtreekeys[e]))})),console.log("treeData",i),console.log("checkedKeys",c),(0,b.Y)(p.A,{bodyStyle:{padding:"2px",overflowY:"scroll",height:"calc(78vh)",minWidth:"420px"},loading:a},(0,b.Y)(g.A,{checkable:!0,defaultExpandAll:!0,checkedKeys:c,showLine:{showLeafIcon:!1},selectable:!1,onCheck:function(e){return t.onCheck(e)},titleRender:function(e){return t.renderTitle(e)},treeData:i}))}}]);var r,n,u,l}(h.PureComponent);(0,f.A)(L,"defaultProps",{checkeds:[]}),e.A=L},8130:function(t,e,r){"use strict";var n=r(42455),o=r(74353),a=r.n(o),i=r(78229),c=r(40403);function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var l=void 0,s={},f={},h={},p={},d={},v=void 0;e.A={setAntdUseToken:function(t){v=t},getAntdUseToken:function(){return v},setAppDtmplConfigFunc:function(t,e){h[t]=e},getAppDtmplConfig:function(t,e,r){return t?h[t.id]?h[t.id](t,e,r):i.A.buildInDtmplConfig(t,e,r):t},isDynamicDtmplConfig:function(t){return!(!t||!h[t.id])},setCustomPage:function(t,e){var r=t;r&&(r.startsWith("/")||(r="/"+r),s[r]=e)},setCustomControl:function(t,e,r){var n=t;n.startsWith("/")||(n="/"+n),f[n]=e,p[n]=r},getCustomViewControl:function(t){return t?t.startsWith("/")?f[t]:f["/"+t]:null},getCustomEditControl:function(t){return t?t.startsWith("/")?p[t]:p["/"+t]:null},getCustomPage:function(t){return t?t.startsWith("/")?s[t]:s["/"+t]:null},setProgramCode:function(t,e){t&&(e?window.localStorage.setItem(e+"programCode",t):(window.localStorage.setItem("programCode",t),window.sessionStorage.setItem("programCode",t)))},setSessionProgramCode:function(t){t&&window.sessionStorage.setItem("programCode",t)},programCode:function(t){var e=null;return(e=t?window.localStorage.getItem(t+"programCode"):window.sessionStorage.getItem("programCode"))||(e=window.localStorage.getItem("programCode"),this.setSessionProgramCode(e)),e},setHydrocarbonServer:function(t,e){e?window.localStorage.setItem(e+"hydrocarbonServer",t):this.programCode()?window.localStorage.setItem(this.programCode()+"hydrocarbonServer",t):window.localStorage.setItem("hydrocarbonServer",t)},setProgramName_Logo:function(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName_Logo",t):window.localStorage.setItem("programName_Logo",t)},api:function(t){var e=null;if((e=t?window.localStorage.getItem(t+"hydrocarbonServer"):window.localStorage.getItem(this.programCode()+"hydrocarbonServer"))||(e=window.localStorage.getItem("hydrocarbonServer")),e)if("/"==e){var r=new URL(window.location.href),n=r.pathname.split("/kuangkie")[0];e=this.joinPath(r.origin,n)}else e.startsWith("http")||(e=this.joinPath(new URL(window.location.href).origin,e));else{var o=new URL(window.location.href),a=null;o.pathname.indexOf("/kuangkie")>0&&(a=o.pathname.split("/kuangkie")[0]),e=this.joinPath(o.origin,a)}return e},hydrocarbonToken:function(t){var e=t||this.programCode(),r=window.sessionStorage.getItem(e+"hydrocarbonToken");return r||(r=window.sessionStorage.getItem("hydrocarbonToken")),r||(r=window.localStorage.getItem(e+"hydrocarbonToken"))&&this.setSessionHydrocarbonToken(r,e),r},putExtendServers:function(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(t);try{for(r.s();!(e=r.n()).done;){var n=e.value;d[n.key]=n,n.key&&n.hydrocarbonServer&&(c.vr.setProgramCode(n.programCode,n.key),c.vr.setHydrocarbonServer(n.hydrocarbonServer,n.key))}}catch(t){r.e(t)}finally{r.f()}},getExtendServers:function(t){return d[t]},setHydrocarbonToken:function(t,e){var r=this.programCode(e);r?(window.sessionStorage.setItem(r+"hydrocarbonToken",t),window.localStorage.setItem(r+"hydrocarbonToken",t)):(window.sessionStorage.setItem("hydrocarbonToken",t),window.localStorage.setItem("hydrocarbonToken",t))},setSessionHydrocarbonToken:function(t,e){var r=e||this.programCode();r?window.sessionStorage.setItem(r+"hydrocarbonToken",t):window.sessionStorage.setItem("hydrocarbonToken",t)},setProgramName:function(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName",t):window.localStorage.setItem("programName",t)},programName:function(){return this.programCode()?window.localStorage.getItem(this.programCode()+"programName"):window.localStorage.getItem("programName")},setProgramName_sub:function(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName_sub",t):window.localStorage.setItem("programName_sub",t)},programName_sub:function(){return this.programCode()?window.localStorage.getItem(this.programCode()+"programName_sub"):window.localStorage.getItem("programName_sub")},setProgramName_NavLeft:function(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName_NavLeft",t):window.localStorage.setItem("programName_NavLeft",t)},programName_NavLeft:function(){var t;return this.programCode()&&(t=window.localStorage.getItem(this.programCode()+"programName_NavLeft")),t||(t=window.localStorage.getItem("programName_NavLeft")),t||"旷识科技"},programName_Logo:function(){var t=null;return this.programCode()&&(t=window.localStorage.getItem(this.programCode()+"programName_Logo")),t||(t=window.localStorage.getItem("programName_Logo")),t&&"undefined"==t?null:t},formateDate:function(t){return t?a()(new Date(t)).format("YYYY-MM-DD HH:mm:ss"):""},dateToString:function(t){var e=t.getFullYear(),r=(t.getMonth()+1).toString(),n=t.getDate().toString();return 1===r.length&&(r="0"+r),1===n.length&&(n="0"+n),e+"-"+r+"-"+n},pagination:function(t,e){return{onchange:function(t){e(t)},current:t.pageInfo.pageNo,pageSize:t.pageInfo.pageSize,total:t.pageInfo.count,showTotal:function(){return"共".concat(t.pageInfo.count,"条")},showQuickIumper:!0}},openFile:function(t,e,r){try{var n=document.createElement("a");n.href=t+r,n.target="_blank",document.body.appendChild(n),n.click(),document.body.removeChild(n)}catch(t){console.log(t)}},toLogin:function(){var t=this.programCode();window.location.hash=t&&"null"!=t&&"undefined"!=t?"#/login/"+t:"#/login"},downloadFile:function(t,e){try{var r=document.createElement("a");r.download=e,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}catch(t){console.log(t)}},downloadFile_old:function(t){try{var e=document.createElement("form");e.action=t,document.body.appendChild(e),e.submit(),document.body.removeChild(e)}catch(t){console.log(t)}},getRandomNum:function(t){var e="",r=Math.floor(10*Math.random());e+=0==r?"1":r+"";for(var n=1;n<t;n++)e+=Math.floor(10*Math.random());return e},getStorageKeyPrefix:function(){return void 0===l&&(l=window.location.pathname||""),l},getLongTextStyle:function(t){if(!t)return{};var e={minWidth:"normal",maxWidth:"1000px",display:"block",whiteSpace:"normal",lineHeight:"20px"},r=t.length>200?"350px":t.length>150?"300px":t.length>100?"250px":t.length>50?"200px":t.length>=20?"160px":"80px";return e.minWidth=r,e},setLocalStorge:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60;if(t&&(t=this.getStorageKeyPrefix()+t),e){var n=r||60,o=new Date,a=60*n*1e3;localStorage.setItem(t,JSON.stringify({value:e,expireAddTime:a,expires:o.getTime()+a}))}else localStorage.removeItem(t)},getLocalStorge:function(t){t&&(t=this.getStorageKeyPrefix()+t);try{var e=JSON.parse(localStorage[t]);return!e||e.expires<Date.now()?null:(e.expires=Date.now()+e.expireAddTime,localStorage.setItem(t,JSON.stringify(e)),e.value)}catch(e){return localStorage[t]}},getAnoHydrocarbonToken:function(){var t=this.getLocalStorge("anoHydrocarbonToken");return t||(t="tmpl"+this.getRandomNum(6),this.setLocalStorge("anoHydrocarbonToken",t)),t},transQueryParamsToStr:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"?":"",n=[],o=[];for(var a in t)if(!(e.indexOf(a)>=0)){var i=t[a];[void 0,null].includes(i)?i="":o.push(a)}o.sort();for(var c=function(){var e=l[u],r=t[e],o=encodeURI(e);r&&(r&&r.constructor===Array?r.forEach((function(t){n.push(o+"[]="+encodeURI(t))})):n.push(o+"="+encodeURI(r)))},u=0,l=o;u<l.length;u++)c();return n.length?r+n.join("&"):""},transQueryStrToParams:function(t){var e={},r=t.split("?");if(r&&2==r.length)for(var n=r[1].split("&"),o=0;o<n.length;o++)if(n[o].indexOf("[]=")>0){var a=n[o].split("[]="),i=a[0];e[i]||(e[i]=[]),e[i].push(decodeURI(this.configParamTrans(a[1])))}else{var c=n[o].split("="),u=c[0];u&&(e[u]=decodeURI(this.configParamTrans(c[1])))}return e},isConfigDefaultValue:function(t){return!!t&&t.startsWith("$$current")},configParamTrans:function(t){return t&&t.startsWith&&t.startsWith("$$current")?i.A.current(t):t},uniq:function(t,e){var r=[];return t.map((function(t){var n=!0;return r.map((function(r){return t[e]===r[e]&&(n=!1),!1})),n&&r.push(t),!1})),r},deepCopy:function(t){var e=Array.isArray(t)?[]:{};for(var r in t)t.hasOwnProperty(r)&&("object"===(0,n.A)(t[r])?e[r]=this.deepCopy(t[r]):e[r]=t[r]);return e},getFileUrl:function(t){return t?t.constructor===String?t:t.constructor===Object?t.props.children.props?t.props.children.props.href:t.props.owlner?t.props.owlner:t:t:t},getOptionColor:function(t,e){return e?(t&&t.forEach((function(t){t.value!==e||t.color&&(r=t.color)})),r):null;var r},getFieldItemType:function(t){return t.extType?t.extType:t.msExtType?t.msExtType:t.msType?t.msType:t.type},isEmpty:function(t){if(!t)return!0;for(var e in t)return!1;return!0},getDayjsFormat:function(t){var e="YYYY-MM-DD HH:mm:ss";switch(t){case"daterange-YY":case"date-YY":e="YYYY";break;case"date-M1":case"daterange-M1":e="YYYY-MM";break;case"date":case"daterange":e="YYYY-MM-DD";break;case"datetime-HH":case"datetimerange-HH":e="YYYY-MM-DD HH";break;case"datetime-mm":case"datetimerange-mm":e="YYYY-MM-DD HH:mm";break;case"datetime":case"datetimerange":e="YYYY-MM-DD HH:mm:ss";break;case"timestamp":e="YYYY-MM-DD HH:mm:ss SSS";break;case"time-HH":case"timerange-HH":case"timerange-HH-unorder":e="HH";break;case"time-mm":case"timerange-mm":case"timerange-mm-unorder":e="HH:mm";break;case"time":case"timerange":case"timerange-unorder":e="HH:mm:ss"}return e},getDateTimeFormat:function(t){switch(t){case"time-HH":case"timerange-HH":case"datetime-HH":case"datetimerange-HH":return"HH";case"time-mm":case"timerange-mm":case"datetime-mm":case"datetimerange-mm":return"HH:mm";case"timestamp":case"time":case"timerange":case"datetime":case"datetimerange":return"HH:mm:ss";default:return""}return""},concatValue:function(t,e){var r=void 0;return r=t?t+"~":"~",e&&(r+=e),r},splitValue:function(t){var e,r;if(t)if(t.toString().indexOf("~")>=0){var n=t.split("~");e=n[0]?n[0]:void 0,r=n[1]?n[1]:void 0}else e=t;return{valueBegin:e,valueEnd:r}},str2UTF8:function(t){var e,r,n=new Array;e=t.length;for(var o=0;o<e;o++)(r=t.charCodeAt(o))>=65536&&r<=1114111?(n.push(r>>18&7|240),n.push(r>>12&63|128),n.push(r>>6&63|128),n.push(63&r|128)):r>=2048&&r<=65535?(n.push(r>>12&15|224),n.push(r>>6&63|128),n.push(63&r|128)):r>=128&&r<=2047?(n.push(r>>6&31|192),n.push(63&r|128)):n.push(255&r);return n},joinPath:function(t,e){var r=t;return r.endsWith("/")||r.endsWith("\\")||(r+="/"),e&&(e.startsWith("/")||r.startsWith("\\")?r+=e.slice(1):r+=e),r},setProgramCode4RoutePath:function(t){var e=t.programCode;this.setProgramCode(e)},setSessionProgramCode4RoutePath:function(t){var e=t.programCode;this.setSessionProgramCode(e)}}},42061:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=(r(18128),r(96540),r(5338)),i=r(39912),c=(r(71436),r(80243)),u=r(40403),l=JSON.parse('{"hydrocarbonServer1":"/hydrogen","hydrocarbonServer":"http://localhost:9109","programName_NavLeft1":"HYDROCARBON","programName1":"旷识企业应用","programName_sub":"CARBON","programName_Logo1":"./logo.png","programCode1":"253564453860974594","programName":"旷识开发平台","programName_NavLeft":"旷识开发平台","extendServer":[{"key":"carbonthinking","programCode":"253564453860974594","hydrocarbonServer":"https://carbonthinking.kuangkie.com/"}]}'),s=r(17437);function f(){f=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==r&&o.call(L,c)&&(x=L);var C=A.prototype=w.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=p(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=d;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?g:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=p(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(C,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(h(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function h(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}(0,c.ai)((0,o.A)(f().mark((function t(){var e;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,a.H)(document.getElementById("root")),u.vr.setAppDtmplConfigFunc("229650889220097",(function(t,e){var r=t.groups[0].fields[0];return r.shouldUpdate=function(t,e){return!0},r.mainCode=function(t){return console.log("调用了 update",r.title),t.getFieldValue(r.id),t.getFieldInstance(r.id),r.id},r.updateSelf=function(t){return"11"==t.getFieldValue(0xd0ddc3aca007)?r.required=!0:r.required=!1,r},t.onValuesChange=function(t,e,r){"22"==t[0xd0ddc3aca007]&&r.setFieldValue("229650889220101",e.fieldMap[0xd0ddc3aca005]+23)},t})),u.vr.setAppDtmplConfigFunc("281357880958977",(function(t,e){var r,n=t.groups[0],o=t.groups[1],a=e?e.fieldMap[0xffe4d9aca005]:void 0,i=h(n.fields);try{for(i.s();!(r=i.n()).done;){var c=r.value;if("bf3977ff49f1946ff35366e6b3e9bd16"==c.mstrucId)if(c.shouldUpdate=function(t,e){return!0},a&&a.length>0){var u=a.split("@R@")[0];c.disabled=!1,c.mainCode=u,o.disabled=!1,o.mainCode=u}else c.disabled=!0,o.disabled=!0;else"281358369595397"==c.id&&(c.shouldUpdate=function(t,e){return!0})}}catch(t){i.e(t)}finally{i.f()}return t.onValuesChange=function(e,r,n){var o="281358369595397",a="281358369595399",i=e[o],c=t.groups[0],u=t.groups[1];if(null!=i){var l,s=h(c.fields);try{for(s.s();!(l=s.n()).done;){var f=l.value;if(f.id==a)if(n.isFieldTouched(a),n.setFieldValue(a,[]),n.setFieldValue("$virtual281358369595402",1),i&&i.length>0){var p=i[0].split("@R@")[0];f.disabled=!1,f.mainCode=p,u.disabled=!1,u.mainCode=p}else f.disabled=!0,u.disabled=!0}}catch(t){s.e(t)}finally{s.f()}}else if(e.hasOwnProperty("$virtual281358369595402"))if(e.$virtual281358369595402>0){var d,v=h(c.fields);try{for(v.s();!(d=v.n()).done;){var y=d.value;y.id==o&&(y.disabled=!0)}}catch(t){v.e(t)}finally{v.f()}}else{var g,m=h(c.fields);try{for(m.s();!(g=m.n()).done;){var w=g.value;w.id==o&&(w.disabled=!1)}}catch(t){m.e(t)}finally{m.f()}}},t})),t.next=5,u.Fj.initProgramConfig(l);case 5:e.render((0,s.Y)(i.A,null));case 6:case"end":return t.stop()}}),t)}))))},39912:function(t,e,r){"use strict";r.d(e,{A:function(){return b}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(96540),l=r(84976),s=r(47767),f=r(80243),h=r(57529),p=r(76139),d=r(40403),v=(r(8130),r(55096),r(17437));function y(t,e,r){return e=(0,i.A)(e),(0,a.A)(t,g()?Reflect.construct(e,r||[],(0,i.A)(t).constructor):e.apply(t,r))}function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(g=function(){return!!t})()}h.A.Text;var m=(0,v.Y)(p.A,{tip:"Loading..."}),w=(0,f.Ay)({resolved:{},chunkName:function(){return"App"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(180)]).then(r.bind(r,86876))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 86876}},{fallback:m}),b=function(t){function e(){return(0,n.A)(this,e),y(this,e,arguments)}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=d.vr.getCustomPage(d.vr.programCode())?u.createElement(d.vr.getCustomPage(d.vr.programCode())):(0,v.Y)(d.O4,null);return(0,v.Y)(u.Fragment,null,(0,v.Y)(l.I9,null,(0,v.Y)(w,null,(0,v.Y)(s.BV,null,(0,v.Y)(s.qh,{path:"login",element:(0,v.Y)(d.n9,null)}),(0,v.Y)(s.qh,{path:"login/:programCode",element:(0,v.Y)(d.n9,{autoSaveUser:!0})}),(0,v.Y)(s.qh,{path:"context-setter",element:(0,v.Y)(d.L,null)}),(0,v.Y)(s.qh,{path:"*",element:(0,v.Y)(d.Hu,null,(0,v.Y)(s.BV,null,(0,v.Y)(s.qh,{path:"/home/:programCode",element:t}," "),(0,v.Y)(s.qh,{path:"/home",element:t}," "),(0,v.Y)(s.qh,{path:"/page/:sourceId/:pageName",element:(0,v.Y)(d.rV,null),exact:!0}),(0,v.Y)(s.qh,{path:"/:sourceId/act-table",element:(0,v.Y)(d.RW,null),exact:!0}),(0,v.Y)(s.qh,{path:"/:sourceId/act-Tree",element:(0,v.Y)(d.Rm,null),exact:!0}),(0,v.Y)(s.qh,{path:"/:sourceId/detail-view",element:(0,v.Y)(d.L9,null),exact:!0}),(0,v.Y)(s.qh,{path:"/:sourceId/detail-edit",element:(0,v.Y)(d.L9,null),exact:!0}),(0,v.Y)(s.qh,{path:"/:sourceId/importer",element:(0,v.Y)(d.Q0,null),exact:!0}),(0,v.Y)(s.qh,{path:"/",element:t,exact:!0})))})))))}}])}(u.Component)},55096:function(t,e,r){"use strict";r.p},50477:function(){}},i={};function c(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={id:t,loaded:!1,exports:{}};return a[t].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=a,c.amdO={},t=[],c.O=function(e,r,n,o){if(!r){var a=1/0;for(s=0;s<t.length;s++){r=t[s][0],n=t[s][1],o=t[s][2];for(var i=!0,u=0;u<r.length;u++)(!1&o||a>=o)&&Object.keys(c.O).every((function(t){return c.O[t](r[u])}))?r.splice(u--,1):(i=!1,o<a&&(a=o));if(i){t.splice(s--,1);var l=n();void 0!==l&&(e=l)}}return e}o=o||0;for(var s=t.length;s>0&&t[s-1][2]>o;s--)t[s]=t[s-1];t[s]=[r,n,o]},c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},r=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},c.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var o=Object.create(null);c.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((function(e){a[e]=function(){return t[e]}}));return a.default=function(){return t},c.d(o,a),o},c.d=function(t,e){for(var r in e)c.o(e,r)&&!c.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},c.f={},c.e=function(t){return Promise.all(Object.keys(c.f).reduce((function(e,r){return c.f[r](t,e),e}),[]))},c.u=function(t){return"bundle."+{16:"feaa17bec2057a4ee54f",63:"35a4af7e2d0da1942d79",76:"fa1e5bf8d58b99ef68e5",87:"6fd2dadd29083268c5a6",112:"5e6cccd06b34a0e3a2ff",180:"4da1a8a32161584fc0af",374:"cd10ae07e0e0c36d0dee",390:"5a9afb9ee6cceca506fa",419:"840e28984e710e12f467",469:"8241d8d05e35988dd480",537:"4c3c988531c3cf360b87",543:"b7b86a025aa95dea0e19",613:"320c02187dd135005102",651:"3f9072b1629cdb384b46",670:"021f784b1c84781461d2",671:"a40e498a0d3d2ac8fb3c",689:"3b2c7bdbe61a4cf963e4",695:"15cb660c34802f6cccf5",724:"a049dc8814bbbf59160f",809:"03c542ca824e205fe307",864:"c1c6028fd703ebf78c2e",900:"b7e3eb480b649b3de67b"}[t]+".js"},c.miniCssF=function(t){return"css/"+{76:"common",670:"chemstruc-graph",900:"html-editor-draft"}[t]+"-"+{76:"901df6b21f13391f2a53",670:"6437e59640f8b99b774f",900:"5e8e152675ab7d201c00"}[t]+".css"},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n={},o="aldehyde:",c.l=function(t,e,r,a){if(n[t])n[t].push(e);else{var i,u;if(void 0!==r)for(var l=document.getElementsByTagName("script"),s=0;s<l.length;s++){var f=l[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==o+r){i=f;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,c.nc&&i.setAttribute("nonce",c.nc),i.setAttribute("data-webpack",o+r),i.src=t),n[t]=[e];var h=function(e,r){i.onerror=i.onload=null,clearTimeout(p);var o=n[t];if(delete n[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((function(t){return t(r)})),e)return e(r)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=h.bind(null,i.onerror),i.onload=h.bind(null,i.onload),u&&document.head.appendChild(i)}},c.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t}(),function(){if("undefined"!=typeof document){var t={792:0};c.f.miniCss=function(e,r){t[e]?r.push(t[e]):0!==t[e]&&{76:1,670:1,900:1}[e]&&r.push(t[e]=function(t){return new Promise((function(e,r){var n=c.miniCssF(t),o=c.p+n;if(function(t,e){for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var o=(i=r[n]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(o===t||o===e))return i}var a=document.getElementsByTagName("style");for(n=0;n<a.length;n++){var i;if((o=(i=a[n]).getAttribute("data-href"))===t||o===e)return i}}(n,o))return e();!function(t,e,r,n,o){var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",c.nc&&(a.nonce=c.nc),a.onerror=a.onload=function(r){if(a.onerror=a.onload=null,"load"===r.type)n();else{var i=r&&r.type,c=r&&r.target&&r.target.href||e,u=new Error("Loading CSS chunk "+t+" failed.\n("+i+": "+c+")");u.name="ChunkLoadError",u.code="CSS_CHUNK_LOAD_FAILED",u.type=i,u.request=c,a.parentNode&&a.parentNode.removeChild(a),o(u)}},a.href=e,document.head.appendChild(a)}(t,o,0,e,r)}))}(e).then((function(){t[e]=0}),(function(r){throw delete t[e],r})))}}}(),function(){var t={792:0};c.f.j=function(e,r){var n=c.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise((function(r,o){n=t[e]=[r,o]}));r.push(n[2]=o);var a=c.p+c.u(e),i=new Error;c.l(a,(function(r){if(c.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;i.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+e,e)}},c.O.j=function(e){return 0===t[e]};var e=function(e,r){var n,o,a=r[0],i=r[1],u=r[2],l=0;if(a.some((function(e){return 0!==t[e]}))){for(n in i)c.o(i,n)&&(c.m[n]=i[n]);if(u)var s=u(c)}for(e&&e(r);l<a.length;l++)o=a[l],c.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return c.O(s)},r=self.webpackChunkaldehyde=self.webpackChunkaldehyde||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))}(),c.nc=void 0;var u=c.O(void 0,[649,800,270,698,911,899,595,449,207,221,179,4,810],(function(){return c(42061)}));u=c.O(u)}();
|