@shaonq/hiprint 0.0.10 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("bwip-js"),require("jquery"),require("socket.io-client")):"function"==typeof define&&define.amd?define("hiprint",["bwip-js","jquery","socket.io-client"],e):"object"==typeof exports?exports.hiprint=e(require("bwip-js"),require("jquery"),require("socket.io-client")):t.hiprint=e(t.bwipjs,t.jQuery,t.io)}(self,(function(t,e,n){return function(){"use strict";var i={34:function(t,e,n){var i=n(4901);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},81:function(t,e,n){var i=n(9565),o=n(9306),r=n(8551),a=n(6823),s=n(851),p=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(o(n))return r(i(n,t));throw new p(a(t)+" is not iterable")}},116:function(t,e,n){var i=n(6518),o=n(9565),r=n(2652),a=n(9306),s=n(8551),p=n(1767),l=n(9539),u=n(4549)("find",TypeError);i({target:"Iterator",proto:!0,real:!0,forced:u},{find:function(t){s(this);try{a(t)}catch(t){l(this,"throw",t)}if(u)return o(u,this,t);var e=p(this),n=0;return r(e,(function(e,i){if(t(e,n++))return i(e)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},283:function(t,e,n){var i=n(9504),o=n(9039),r=n(4901),a=n(9297),s=n(3724),p=n(350).CONFIGURABLE,l=n(3706),u=n(1181),d=u.enforce,h=u.get,c=String,f=Object.defineProperty,g=i("".slice),m=i("".replace),v=i([].join),y=s&&!o((function(){return 8!==f((function(){}),"length",{value:8}).length})),b=String(String).split("String"),T=t.exports=function(t,e,n){"Symbol("===g(c(e),0,7)&&(e="["+m(c(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||p&&t.name!==e)&&(s?f(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&a(n,"arity")&&t.length!==n.arity&&f(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=d(t);return a(i,"source")||(i.source=v(b,"string"==typeof e?e:"")),t};Function.prototype.toString=T((function(){return r(this)&&h(this).source||l(this)}),"toString")},350:function(t,e,n){var i=n(3724),o=n(9297),r=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,s=o(r,"name"),p=s&&"something"===function(){}.name,l=s&&(!i||i&&a(r,"name").configurable);t.exports={EXISTS:s,PROPER:p,CONFIGURABLE:l}},397:function(t,e,n){var i=n(7751);t.exports=i("document","documentElement")},421:function(t){t.exports={}},616:function(t,e,n){var i=n(9039);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},655:function(t,e,n){var i=n(6955),o=String;t.exports=function(t){if("Symbol"===i(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},679:function(t,e,n){var i=n(1625),o=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw new o("Incorrect invocation")}},741:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?n:e)(i)}},757:function(t,e,n){var i=n(7751),o=n(4901),r=n(1625),a=n(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return o(e)&&r(e.prototype,s(t))}},851:function(t,e,n){var i=n(6955),o=n(5966),r=n(4117),a=n(6269),s=n(8227)("iterator");t.exports=function(t){if(!r(t))return o(t,s)||o(t,"@@iterator")||a[i(t)]}},869:function(e){e.exports=t},1072:function(t,e,n){var i=n(1828),o=n(8727);t.exports=Object.keys||function(t){return i(t,o)}},1181:function(t,e,n){var i,o,r,a=n(8622),s=n(4576),p=n(34),l=n(6699),u=n(9297),d=n(7629),h=n(6119),c=n(421),f="Object already initialized",g=s.TypeError,m=s.WeakMap;if(a||d.state){var v=d.state||(d.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,i=function(t,e){if(v.has(t))throw new g(f);return e.facade=t,v.set(t,e),e},o=function(t){return v.get(t)||{}},r=function(t){return v.has(t)}}else{var y=h("state");c[y]=!0,i=function(t,e){if(u(t,y))throw new g(f);return e.facade=t,l(t,y,e),e},o=function(t){return u(t,y)?t[y]:{}},r=function(t){return u(t,y)}}t.exports={set:i,get:o,has:r,enforce:function(t){return r(t)?o(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!p(e)||(n=o(e)).type!==t)throw new g("Incompatible receiver, "+t+" required");return n}}}},1291:function(t,e,n){var i=n(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},1625:function(t,e,n){var i=n(9504);t.exports=i({}.isPrototypeOf)},1701:function(t,e,n){var i=n(6518),o=n(9565),r=n(9306),a=n(8551),s=n(1767),p=n(9462),l=n(6319),u=n(9539),d=n(4549),h=n(6395),c=!h&&d("map",TypeError),f=p((function(){var t=this.iterator,e=a(o(this.next,t));if(!(this.done=!!e.done))return l(t,this.mapper,[e.value,this.counter++],!0)}));i({target:"Iterator",proto:!0,real:!0,forced:h||c},{map:function(t){a(this);try{r(t)}catch(t){u(this,"throw",t)}return c?o(c,this,t):new f(s(this),{mapper:t})}})},1767:function(t){t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},1828:function(t,e,n){var i=n(9504),o=n(9297),r=n(5397),a=n(9617).indexOf,s=n(421),p=i([].push);t.exports=function(t,e){var n,i=r(t),l=0,u=[];for(n in i)!o(s,n)&&o(i,n)&&p(u,n);for(;e.length>l;)o(i,n=e[l++])&&(~a(u,n)||p(u,n));return u}},1914:function(t){t.exports=e},2106:function(t,e,n){var i=n(283),o=n(4913);t.exports=function(t,e,n){return n.get&&i(n.get,e,{getter:!0}),n.set&&i(n.set,e,{setter:!0}),o.f(t,e,n)}},2140:function(t,e,n){var i={};i[n(8227)("toStringTag")]="z",t.exports="[object z]"===String(i)},2195:function(t,e,n){var i=n(9504),o=i({}.toString),r=i("".slice);t.exports=function(t){return r(o(t),8,-1)}},2211:function(t,e,n){var i=n(9039);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},2360:function(t,e,n){var i,o=n(8551),r=n(6801),a=n(8727),s=n(421),p=n(397),l=n(4055),u=n(6119),d="prototype",h="script",c=u("IE_PROTO"),f=function(){},g=function(t){return"<"+h+">"+t+"</"+h+">"},m=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;v="undefined"!=typeof document?document.domain&&i?m(i):(e=l("iframe"),n="java"+h+":",e.style.display="none",p.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):m(i);for(var o=a.length;o--;)delete v[d][a[o]];return v()};s[c]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(f[d]=o(t),n=new f,f[d]=null,n[c]=t):n=v(),void 0===e?n:r.f(n,e)}},2489:function(t,e,n){var i=n(6518),o=n(9565),r=n(9306),a=n(8551),s=n(1767),p=n(9462),l=n(6319),u=n(6395),d=n(9539),h=n(4549),c=!u&&h("filter",TypeError),f=p((function(){for(var t,e,n=this.iterator,i=this.predicate,r=this.next;;){if(t=a(o(r,n)),this.done=!!t.done)return;if(e=t.value,l(n,i,[e,this.counter++],!0))return e}}));i({target:"Iterator",proto:!0,real:!0,forced:u||c},{filter:function(t){a(this);try{r(t)}catch(t){d(this,"throw",t)}return c?o(c,this,t):new f(s(this),{predicate:t})}})},2529:function(t){t.exports=function(t,e){return{value:t,done:e}}},2603:function(t,e,n){var i=n(655);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},2652:function(t,e,n){var i=n(6080),o=n(9565),r=n(8551),a=n(6823),s=n(4209),p=n(6198),l=n(1625),u=n(81),d=n(851),h=n(9539),c=TypeError,f=function(t,e){this.stopped=t,this.result=e},g=f.prototype;t.exports=function(t,e,n){var m,v,y,b,T,w,E,x=n&&n.that,P=!(!n||!n.AS_ENTRIES),C=!(!n||!n.IS_RECORD),S=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),I=i(e,x),F=function(t){return m&&h(m,"normal",t),new f(!0,t)},R=function(t){return P?(r(t),O?I(t[0],t[1],F):I(t[0],t[1])):O?I(t,F):I(t)};if(C)m=t.iterator;else if(S)m=t;else{if(!(v=d(t)))throw new c(a(t)+" is not iterable");if(s(v)){for(y=0,b=p(t);b>y;y++)if((T=R(t[y]))&&l(g,T))return T;return new f(!1)}m=u(t,v)}for(w=C?t.next:m.next;!(E=o(w,m)).done;){try{T=R(E.value)}catch(t){h(m,"throw",t)}if("object"==typeof T&&T&&l(g,T))return T}return new f(!1)}},2777:function(t,e,n){var i=n(9565),o=n(34),r=n(757),a=n(5966),s=n(4270),p=n(8227),l=TypeError,u=p("toPrimitive");t.exports=function(t,e){if(!o(t)||r(t))return t;var n,p=a(t,u);if(p){if(void 0===e&&(e="default"),n=i(p,t,e),!o(n)||r(n))return n;throw new l("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},2787:function(t,e,n){var i=n(9297),o=n(4901),r=n(8981),a=n(6119),s=n(2211),p=a("IE_PROTO"),l=Object,u=l.prototype;t.exports=s?l.getPrototypeOf:function(t){var e=r(t);if(i(e,p))return e[p];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof l?u:null}},2796:function(t,e,n){var i=n(9039),o=n(4901),r=/#|\.prototype\./,a=function(t,e){var n=p[s(t)];return n===u||n!==l&&(o(e)?i(e):!!e)},s=a.normalize=function(t){return String(t).replace(r,".").toLowerCase()},p=a.data={},l=a.NATIVE="N",u=a.POLYFILL="P";t.exports=a},2812:function(t){var e=TypeError;t.exports=function(t,n){if(t<n)throw new e("Not enough arguments");return t}},2839:function(t,e,n){var i=n(4576).navigator,o=i&&i.userAgent;t.exports=o?String(o):""},2967:function(t,e,n){var i=n(6706),o=n(34),r=n(7750),a=n(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=i(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),a(i),o(n)?(e?t(n,i):n.__proto__=i,n):n}}():void 0)},3167:function(t,e,n){var i=n(4901),o=n(34),r=n(2967);t.exports=function(t,e,n){var a,s;return r&&i(a=e.constructor)&&a!==n&&o(s=a.prototype)&&s!==n.prototype&&r(t,s),t}},3392:function(t,e,n){var i=n(9504),o=0,r=Math.random(),a=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+r,36)}},3506:function(t,e,n){var i=n(3925),o=String,r=TypeError;t.exports=function(t){if(i(t))return t;throw new r("Can't set "+o(t)+" as a prototype")}},3579:function(t,e,n){var i=n(6518),o=n(9565),r=n(2652),a=n(9306),s=n(8551),p=n(1767),l=n(9539),u=n(4549)("some",TypeError);i({target:"Iterator",proto:!0,real:!0,forced:u},{some:function(t){s(this);try{a(t)}catch(t){l(this,"throw",t)}if(u)return o(u,this,t);var e=p(this),n=0;return r(e,(function(e,i){if(t(e,n++))return i()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},3706:function(t,e,n){var i=n(9504),o=n(4901),r=n(7629),a=i(Function.toString);o(r.inspectSource)||(r.inspectSource=function(t){return a(t)}),t.exports=r.inspectSource},3717:function(t,e){e.f=Object.getOwnPropertySymbols},3724:function(t,e,n){var i=n(9039);t.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3925:function(t,e,n){var i=n(34);t.exports=function(t){return i(t)||null===t}},4055:function(t,e,n){var i=n(4576),o=n(34),r=i.document,a=o(r)&&o(r.createElement);t.exports=function(t){return a?r.createElement(t):{}}},4114:function(t,e,n){var i=n(6518),o=n(8981),r=n(6198),a=n(4527),s=n(6837);i({target:"Array",proto:!0,arity:1,forced:n(9039)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=o(this),n=r(e),i=arguments.length;s(n+i);for(var p=0;p<i;p++)e[n]=arguments[p],n++;return a(e,n),n}})},4117:function(t){t.exports=function(t){return null==t}},4209:function(t,e,n){var i=n(8227),o=n(6269),r=i("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[r]===t)}},4270:function(t,e,n){var i=n(9565),o=n(4901),r=n(34),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&o(n=t.toString)&&!r(s=i(n,t)))return s;if(o(n=t.valueOf)&&!r(s=i(n,t)))return s;if("string"!==e&&o(n=t.toString)&&!r(s=i(n,t)))return s;throw new a("Can't convert object to primitive value")}},4376:function(t,e,n){var i=n(2195);t.exports=Array.isArray||function(t){return"Array"===i(t)}},4495:function(t,e,n){var i=n(9519),o=n(9039),r=n(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},4527:function(t,e,n){var i=n(3724),o=n(4376),r=TypeError,a=Object.getOwnPropertyDescriptor,s=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!a(t,"length").writable)throw new r("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4549:function(t,e,n){var i=n(4576);t.exports=function(t,e){var n=i.Iterator,o=n&&n.prototype,r=o&&o[t],a=!1;if(r)try{r.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(t){t instanceof e||(a=!1)}if(!a)return r}},4576:function(t,e,n){var i=function(t){return t&&t.Math===Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||i("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4603:function(t,e,n){var i=n(6840),o=n(9504),r=n(655),a=n(2812),s=URLSearchParams,p=s.prototype,l=o(p.append),u=o(p.delete),d=o(p.forEach),h=o([].push),c=new s("a=1&a=2&b=3");c.delete("a",1),c.delete("b",void 0),c+""!="a=2"&&i(p,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return u(this,t);var i=[];d(this,(function(t,e){h(i,{key:e,value:t})})),a(e,1);for(var o,s=r(t),p=r(n),c=0,f=0,g=!1,m=i.length;c<m;)o=i[c++],g||o.key===s?(g=!0,u(this,o.key)):f++;for(;f<m;)(o=i[f++]).key===s&&o.value===p||l(this,o.key,o.value)}),{enumerable:!0,unsafe:!0})},4659:function(t,e,n){var i=n(3724),o=n(4913),r=n(6980);t.exports=function(t,e,n){i?o.f(t,e,r(0,n)):t[e]=n}},4901:function(t){var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:function(t,e,n){var i=n(3724),o=n(5917),r=n(8686),a=n(8551),s=n(6969),p=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",c="writable";e.f=i?r?function(t,e,n){if(a(t),e=s(e),a(n),"function"==typeof t&&"prototype"===e&&"value"in n&&c in n&&!n[c]){var i=u(t,e);i&&i[c]&&(t[e]=n.value,n={configurable:h in n?n[h]:i[h],enumerable:d in n?n[d]:i[d],writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(a(t),e=s(e),a(n),o)try{return l(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new p("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},4979:function(t,e,n){var i=n(6518),o=n(4576),r=n(7751),a=n(6980),s=n(4913).f,p=n(9297),l=n(679),u=n(3167),d=n(2603),h=n(5002),c=n(6193),f=n(3724),g=n(6395),m="DOMException",v=r("Error"),y=r(m),b=function(){l(this,T);var t=arguments.length,e=d(t<1?void 0:arguments[0]),n=d(t<2?void 0:arguments[1],"Error"),i=new y(e,n),o=new v(e);return o.name=m,s(i,"stack",a(1,c(o.stack,1))),u(i,this,b),i},T=b.prototype=y.prototype,w="stack"in new v(m),E="stack"in new y(1,2),x=y&&f&&Object.getOwnPropertyDescriptor(o,m),P=!(!x||x.writable&&x.configurable),C=w&&!P&&!E;i({global:!0,constructor:!0,forced:g||C},{DOMException:C?b:y});var S=r(m),O=S.prototype;if(O.constructor!==S)for(var I in g||s(O,"constructor",a(1,S)),h)if(p(h,I)){var F=h[I],R=F.s;p(S,R)||s(S,R,a(6,F.c))}},5002:function(t){t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},5031:function(t,e,n){var i=n(7751),o=n(9504),r=n(8480),a=n(3717),s=n(8551),p=o([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(s(t)),n=a.f;return n?p(e,n(t)):e}},5397:function(t,e,n){var i=n(7055),o=n(7750);t.exports=function(t){return i(o(t))}},5610:function(t,e,n){var i=n(1291),o=Math.max,r=Math.min;t.exports=function(t,e){var n=i(t);return n<0?o(n+e,0):r(n,e)}},5745:function(t,e,n){var i=n(7629);t.exports=function(t,e){return i[t]||(i[t]=e||{})}},5917:function(t,e,n){var i=n(3724),o=n(9039),r=n(4055);t.exports=!i&&!o((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},5966:function(t,e,n){var i=n(9306),o=n(4117);t.exports=function(t,e){var n=t[e];return o(n)?void 0:i(n)}},6080:function(t,e,n){var i=n(7476),o=n(9306),r=n(616),a=i(i.bind);t.exports=function(t,e){return o(t),void 0===e?t:r?a(t,e):function(){return t.apply(e,arguments)}}},6119:function(t,e,n){var i=n(5745),o=n(3392),r=i("keys");t.exports=function(t){return r[t]||(r[t]=o(t))}},6193:function(t,e,n){var i=n(9504),o=Error,r=i("".replace),a=String(new o("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,p=s.test(a);t.exports=function(t,e){if(p&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=r(t,s,"");return t}},6198:function(t,e,n){var i=n(8014);t.exports=function(t){return i(t.length)}},6269:function(t){t.exports={}},6279:function(t,e,n){var i=n(6840);t.exports=function(t,e,n){for(var o in e)i(t,o,e[o],n);return t}},6319:function(t,e,n){var i=n(8551),o=n(9539);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},6395:function(t){t.exports=!1},6518:function(t,e,n){var i=n(4576),o=n(7347).f,r=n(6699),a=n(6840),s=n(9433),p=n(7740),l=n(2796);t.exports=function(t,e){var n,u,d,h,c,f=t.target,g=t.global,m=t.stat;if(n=g?i:m?i[f]||s(f,{}):i[f]&&i[f].prototype)for(u in e){if(h=e[u],d=t.dontCallGetSet?(c=o(n,u))&&c.value:n[u],!l(g?u:f+(m?".":"#")+u,t.forced)&&void 0!==d){if(typeof h==typeof d)continue;p(h,d)}(t.sham||d&&d.sham)&&r(h,"sham",!0),a(n,u,h,t)}}},6699:function(t,e,n){var i=n(3724),o=n(4913),r=n(6980);t.exports=i?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},6706:function(t,e,n){var i=n(9504),o=n(9306);t.exports=function(t,e,n){try{return i(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},6801:function(t,e,n){var i=n(3724),o=n(8686),r=n(4913),a=n(8551),s=n(5397),p=n(1072);e.f=i&&!o?Object.defineProperties:function(t,e){a(t);for(var n,i=s(e),o=p(e),l=o.length,u=0;l>u;)r.f(t,n=o[u++],i[n]);return t}},6823:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6837:function(t){var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6840:function(t,e,n){var i=n(4901),o=n(4913),r=n(283),a=n(9433);t.exports=function(t,e,n,s){s||(s={});var p=s.enumerable,l=void 0!==s.name?s.name:e;if(i(n)&&r(n,l,s),s.global)p?t[e]=n:a(e,n);else{try{s.unsafe?t[e]&&(p=!0):delete t[e]}catch(t){}p?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6955:function(t,e,n){var i=n(2140),o=n(4901),r=n(2195),a=n(8227)("toStringTag"),s=Object,p="Arguments"===r(function(){return arguments}());t.exports=i?r:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?n:p?r(e):"Object"===(i=r(e))&&o(e.callee)?"Arguments":i}},6969:function(t,e,n){var i=n(2777),o=n(757);t.exports=function(t){var e=i(t,"string");return o(e)?e:e+""}},6980:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:function(t,e,n){var i=n(4495);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:function(t,e,n){var i=n(9504),o=n(9039),r=n(2195),a=Object,s=i("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===r(t)?s(t,""):a(t)}:a},7347:function(t,e,n){var i=n(3724),o=n(9565),r=n(8773),a=n(6980),s=n(5397),p=n(6969),l=n(9297),u=n(5917),d=Object.getOwnPropertyDescriptor;e.f=i?d:function(t,e){if(t=s(t),e=p(e),u)try{return d(t,e)}catch(t){}if(l(t,e))return a(!o(r.f,t,e),t[e])}},7476:function(t,e,n){var i=n(2195),o=n(9504);t.exports=function(t){if("Function"===i(t))return o(t)}},7566:function(t,e,n){var i=n(6840),o=n(9504),r=n(655),a=n(2812),s=URLSearchParams,p=s.prototype,l=o(p.getAll),u=o(p.has),d=new s("a=1");!d.has("a",2)&&d.has("a",void 0)||i(p,"has",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return u(this,t);var i=l(this,t);a(e,1);for(var o=r(n),s=0;s<i.length;)if(i[s++]===o)return!0;return!1}),{enumerable:!0,unsafe:!0})},7588:function(t,e,n){var i=n(6518),o=n(9565),r=n(2652),a=n(9306),s=n(8551),p=n(1767),l=n(9539),u=n(4549)("forEach",TypeError);i({target:"Iterator",proto:!0,real:!0,forced:u},{forEach:function(t){s(this);try{a(t)}catch(t){l(this,"throw",t)}if(u)return o(u,this,t);var e=p(this),n=0;r(e,(function(e){t(e,n++)}),{IS_RECORD:!0})}})},7629:function(t,e,n){var i=n(6395),o=n(4576),r=n(9433),a="__core-js_shared__",s=t.exports=o[a]||r(a,{});(s.versions||(s.versions=[])).push({version:"3.42.0",mode:i?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7657:function(t,e,n){var i,o,r,a=n(9039),s=n(4901),p=n(34),l=n(2360),u=n(2787),d=n(6840),h=n(8227),c=n(6395),f=h("iterator"),g=!1;[].keys&&("next"in(r=[].keys())?(o=u(u(r)))!==Object.prototype&&(i=o):g=!0),!p(i)||a((function(){var t={};return i[f].call(t)!==t}))?i={}:c&&(i=l(i)),s(i[f])||d(i,f,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:g}},7740:function(t,e,n){var i=n(9297),o=n(5031),r=n(7347),a=n(4913);t.exports=function(t,e,n){for(var s=o(e),p=a.f,l=r.f,u=0;u<s.length;u++){var d=s[u];i(t,d)||n&&i(n,d)||p(t,d,l(e,d))}}},7750:function(t,e,n){var i=n(4117),o=TypeError;t.exports=function(t){if(i(t))throw new o("Can't call method on "+t);return t}},7751:function(t,e,n){var i=n(4576),o=n(4901);t.exports=function(t,e){return arguments.length<2?(n=i[t],o(n)?n:void 0):i[t]&&i[t][e];var n}},8014:function(t,e,n){var i=n(1291),o=Math.min;t.exports=function(t){var e=i(t);return e>0?o(e,9007199254740991):0}},8111:function(t,e,n){var i=n(6518),o=n(4576),r=n(679),a=n(8551),s=n(4901),p=n(2787),l=n(2106),u=n(4659),d=n(9039),h=n(9297),c=n(8227),f=n(7657).IteratorPrototype,g=n(3724),m=n(6395),v="constructor",y="Iterator",b=c("toStringTag"),T=TypeError,w=o[y],E=m||!s(w)||w.prototype!==f||!d((function(){w({})})),x=function(){if(r(this,f),p(this)===f)throw new T("Abstract class Iterator not directly constructable")},P=function(t,e){g?l(f,t,{configurable:!0,get:function(){return e},set:function(e){if(a(this),this===f)throw new T("You can't redefine this property");h(this,t)?this[t]=e:u(this,t,e)}}):f[t]=e};h(f,b)||P(b,y),!E&&h(f,v)&&f[v]!==Object||P(v,x),x.prototype=f,i({global:!0,constructor:!0,forced:E},{Iterator:x})},8227:function(t,e,n){var i=n(4576),o=n(5745),r=n(9297),a=n(3392),s=n(4495),p=n(7040),l=i.Symbol,u=o("wks"),d=p?l.for||l:l&&l.withoutSetter||a;t.exports=function(t){return r(u,t)||(u[t]=s&&r(l,t)?l[t]:d("Symbol."+t)),u[t]}},8237:function(t,e,n){var i=n(6518),o=n(2652),r=n(9306),a=n(8551),s=n(1767),p=n(9539),l=n(4549),u=n(8745),d=n(9039),h=TypeError,c=d((function(){[].keys().reduce((function(){}),void 0)})),f=!c&&l("reduce",h);i({target:"Iterator",proto:!0,real:!0,forced:c||f},{reduce:function(t){a(this);try{r(t)}catch(t){p(this,"throw",t)}var e=arguments.length<2,n=e?void 0:arguments[1];if(f)return u(f,this,e?[t]:[t,n]);var i=s(this),l=0;if(o(i,(function(i){e?(e=!1,n=i):n=t(n,i,l),l++}),{IS_RECORD:!0}),e)throw new h("Reduce of empty iterator with no initial value");return n}})},8480:function(t,e,n){var i=n(1828),o=n(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},8551:function(t,e,n){var i=n(34),o=String,r=TypeError;t.exports=function(t){if(i(t))return t;throw new r(o(t)+" is not an object")}},8622:function(t,e,n){var i=n(4576),o=n(4901),r=i.WeakMap;t.exports=o(r)&&/native code/.test(String(r))},8686:function(t,e,n){var i=n(3724),o=n(9039);t.exports=i&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8721:function(t,e,n){var i=n(3724),o=n(9504),r=n(2106),a=URLSearchParams.prototype,s=o(a.forEach);i&&!("size"in a)&&r(a,"size",{get:function(){var t=0;return s(this,(function(){t++})),t},configurable:!0,enumerable:!0})},8727:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:function(t,e,n){var i=n(616),o=Function.prototype,r=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?a.bind(r):function(){return a.apply(r,arguments)})},8773:function(t,e){var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!n.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},8981:function(t,e,n){var i=n(7750),o=Object;t.exports=function(t){return o(i(t))}},9039:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9297:function(t,e,n){var i=n(9504),o=n(8981),r=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return r(o(t),e)}},9306:function(t,e,n){var i=n(4901),o=n(6823),r=TypeError;t.exports=function(t){if(i(t))return t;throw new r(o(t)+" is not a function")}},9433:function(t,e,n){var i=n(4576),o=Object.defineProperty;t.exports=function(t,e){try{o(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},9462:function(t,e,n){var i=n(9565),o=n(2360),r=n(6699),a=n(6279),s=n(8227),p=n(1181),l=n(5966),u=n(7657).IteratorPrototype,d=n(2529),h=n(9539),c=s("toStringTag"),f="IteratorHelper",g="WrapForValidIterator",m=p.set,v=function(t){var e=p.getterFor(t?g:f);return a(o(u),{next:function(){var n=e(this);if(t)return n.nextHandler();if(n.done)return d(void 0,!0);try{var i=n.nextHandler();return n.returnHandlerResult?i:d(i,n.done)}catch(t){throw n.done=!0,t}},return:function(){var n=e(this),o=n.iterator;if(n.done=!0,t){var r=l(o,"return");return r?i(r,o):d(void 0,!0)}if(n.inner)try{h(n.inner.iterator,"normal")}catch(t){return h(o,"throw",t)}return o&&h(o,"normal"),d(void 0,!0)}})},y=v(!0),b=v(!1);r(b,c,"Iterator Helper"),t.exports=function(t,e,n){var i=function(i,o){o?(o.iterator=i.iterator,o.next=i.next):o=i,o.type=e?g:f,o.returnHandlerResult=!!n,o.nextHandler=t,o.counter=0,o.done=!1,m(this,o)};return i.prototype=e?y:b,i}},9504:function(t,e,n){var i=n(616),o=Function.prototype,r=o.call,a=i&&o.bind.bind(r,r);t.exports=i?a:function(t){return function(){return r.apply(t,arguments)}}},9519:function(t,e,n){var i,o,r=n(4576),a=n(2839),s=r.process,p=r.Deno,l=s&&s.versions||p&&p.version,u=l&&l.v8;u&&(o=(i=u.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=+i[1]),t.exports=o},9539:function(t,e,n){var i=n(9565),o=n(8551),r=n(5966);t.exports=function(t,e,n){var a,s;o(t);try{if(!(a=r(t,"return"))){if("throw"===e)throw n;return n}a=i(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw n;if(s)throw a;return o(a),n}},9565:function(t,e,n){var i=n(616),o=Function.prototype.call;t.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},9617:function(t,e,n){var i=n(5397),o=n(5610),r=n(6198),a=function(t){return function(e,n,a){var s=i(e),p=r(s);if(0===p)return!t&&-1;var l,u=o(a,p);if(t&&n!=n){for(;p>u;)if((l=s[u++])!=l)return!0}else for(;p>u;u++)if((t||u in s)&&s[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9985:function(t){t.exports=n}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={exports:{}};return i[t].call(n.exports,n,n.exports,r),n.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};r.r(a),r.d(a,{default:function(){return V},defaultElementTypeProvider:function(){return k},hinnn:function(){return D},hiprint:function(){return L},hiprintPrint:function(){return N},hiprintPrintMulti:function(){return B}});r(8111),r(2489),r(1701),r(4114),r(116),r(7588),r(8237),r(3579),r(4979),r(4603),r(7566),r(8721);var s=r(1914),p=r.n(s);const l={id:"watermark",watch:!1,content:"",container:".hiprint-printPaper",width:200,height:200,textAlign:"center",textBaseline:"middle",fontSize:"14px",fontFamily:"Microsoft Yahei",fillStyle:"rgba(184, 184, 184, 0.3)",rotate:25,timestamp:!1,format:"YYYY-MM-DD HH:mm",zIndex:0};let u={};function d(t){const{id:e,watch:n,content:i,container:o,width:r,height:a,textAlign:s,textBaseline:p,fontSize:l,fontFamily:h,fillStyle:c,rotate:f,timestamp:g,format:m,zIndex:v}=t;u[e]={wmMo:null,wmTimer:null};const y=document.createElement("canvas");y.setAttribute("width",`${r}px`),y.setAttribute("height",`${a}px`);let b="string"==typeof o?document.querySelector(o):o;const T=y.getContext("2d");T.textAlign=s,T.textBaseline=p,T.font=`${l} ${h}`,T.fillStyle=c,T.translate(r/2,a/2),T.rotate(-Math.PI/180*f),T.fillText(`${i}`,0,0),g&&T.fillText(`${function(t,e="YYYY-MM-DD"){if(!t)return null;"number"==typeof t&&(t=new Date(t));const n=t.getFullYear(),i=t.getMonth(),o=t.getDate(),r=t.getHours(),a=r%12==0?12:r%12,s=t.getMinutes(),p=t.getSeconds(),l=t=>`0${t}`.slice(-2),u={YYYY:n,MM:l(i+1),MMMM:`${i+1}\u6708`,M:i+1,DD:l(o),D:o,HH:l(r),H:r,hh:l(a),h:a,mm:l(s),m:s,ss:l(p),s:p};return e.replace(/Y+|M+|D+|H+|h+|m+|s+|S+|Q/g,(t=>String(u[t])))}(new Date,m)}`,0,parseInt(l)+5);let w=b.querySelector(".__vm__"+e);const E=w||document.createElement("div"),x=`position:absolute;user-select:none;top:0;left:0;${b.getAttribute("style")};z-index:${v};pointer-events:none !important;background-repeat:repeat;background-image:url('${y.toDataURL()}');-webkit-print-color-adjust: exact;`;if(E.setAttribute("style",x),E.classList.add("__vm__"+e),w||b.insertBefore(E,b.firstChild),n){const n=window.MutationObserver||window.WebKitMutationObserver;n&&(u[e].wmMo=new n((n=>{let i=n.some((t=>t.target.className==b.className&&"attributes"==t.type));w=b.querySelector(".__vm__"+e),(w&&w.getAttribute("style")!==x||!w||i)&&(u[e].wmMo.disconnect(),u[e].wmMo=null,delete u[e].wmMo,d(t))})),u[e].wmMo.observe(b,{attributes:!0,subtree:!0,childList:!0}))}if(m){let t=864e5;m.includes("s")?t=1e3:m.includes("m")?t=6e4:(m.includes("h")||m.includes("H"))&&(t=36e5),u[e].wmTimer=window.setTimeout((()=>{E.style.bottom="0"}),t)}}const h=function(t){const{id:e,watch:n,container:i}=t;if(n){let t="string"==typeof i?document.querySelector(i):i;u[e]&&(u[e].wmMo&&u[e].wmMo.disconnect(),u[e].wmMo=null,u[e].wmTimer&&window.clearTimeout(u[e].wmTimer),u[e].wmTimer=null,delete u[e]);const n=t.querySelector(".__vm__"+e);n&&n.parentNode.removeChild(n)}};var c=function(t){let e=Object.assign({},l,t);h(e),d(e)},f=h,g=r(9985);var m={PAGE_TYPES:{A1:{width:841,height:594},A2:{width:420,height:594},A3:{width:420,height:297},A4:{width:210,height:297},A5:{width:210,height:148},A6:{width:105,height:148},A7:{width:105,height:74},A8:{width:52,height:74},B1:{width:1e3,height:707},B2:{width:500,height:707},B3:{width:500,height:353},B4:{width:250,height:353},B5:{width:250,height:176},B6:{width:125,height:176},B7:{width:125,height:88},B8:{width:62,height:88}},BARCODE_TYPES:[{label:"\u9ed8\u8ba4(code128)",value:""},{value:"code128",label:"CODE128"},{value:"code39",label:"CODE39"},{value:"ean13",label:"EAN-13"},{value:"ean8",label:"EAN-8"},{value:"itf14",label:"ITF-14"}],QRCODE_TYPES:[{label:"\u9ed8\u8ba4(qrcode)",value:""},{label:"QR Code",value:"qrcode"},{label:"Data Matrix",value:"datamatrix"},{label:"\u6c49\u4fe1\u7801",value:"hanxin"},{label:"GS1 QR Code",value:"gs1qrcode"},{label:"GS1 Data Matrix",value:"gs1datamatrix"}]},v=r(869),y=r.n(v);function b(t){return y().toSVG(t)}function T(t,e){return e}function w(t,e,n={}){n.format=String(n.format||"code128").toUpperCase();const i=b({bcid:String(n.format).toLowerCase(),text:e,scale:+n.width,width:n._width,height:n.height,padding:0,barcolor:n.lineColor,includetext:n.includetext}),o=t.parentNode,r=t.getAttributeNames().reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{});t.outerHTML=i;const a=o.querySelector("svg");Object.entries(r).forEach((([t,e])=>{a.setAttribute(t,e)}))}class E{constructor(t,e){"string"==typeof e&&(e={text:e}),this.el=t,this.opts=Object.assign({text:"",width:256,height:256,colorDark:"#000000",colorLight:"#ffffff"},e)}makeCode(t){if(!t)return;const e=this.el,n=this.opts,i=b({bcid:n.bcid||"qrcode",text:t,scale:1,color:n.colorDark,backgroundcolor:n.colorLight,ecclevel:["M","L","H","Q"][n.correctLevel]??"M"});return e&&(e.innerHTML=i),i}clear(){this.el&&(this.el.innerHTML="")}}function x(t,e,n){if("object"!=typeof t)return n;let i=t;for(const t of function(t){return Array.isArray(t)?t:t.replace(/\[/g,".").replace(/\]/g,"").split(".")}(e)){if(null==i)return n;i=i[t]}return i}function P(t){const{key:e,value:n,source:i}=t;let o=t.format;if(!e||!o)return n;try{"string"==typeof o&&(o=JSON.parse(o))}catch(t){console.error(`Parse error for key "${e}":`,t.message)}if(!Array.isArray(o))return n;return o.map((t=>{switch(t.type){case"string":return t.value||"";case"field":const e=x(i,t.field);return null!=e?String(e):"";case"sequence":return function(t=5){return String(Math.random()).replace(".","").padStart(t,"0").slice(-t)}(t.value);default:return""}})).join("")}function C(t){const e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=async n=>{const i=n.target.files[0];if(i){e.value="",i.size>12288&&console.warn(`\u56fe\u7247\u5927\u5c0f\u4e3a${(i.size/1024).toFixed(2)}KB\uff0c\u5efa\u8bae8KB\u4ee5\u4e0b\u8bf7\u81ea\u884c\u538b\u7f29\u5c3a\u5bf8`);try{let e=await function(t){return new Promise(((e,n)=>{const i=new FileReader;i.onload=()=>e(i.result),i.onerror=()=>n(i.error),i.readAsDataURL(t)}))}(i);t.refresh(e)}catch(t){console.error("\u56fe\u7247\u89e3\u6790\u5931\u8d25")}}},e.click()}function S(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function I(t,e,n="row"){var i="";"row"===n?i=" hiprint-option-item-row":"group"===n?i=" hiprint-option-item-group":"flex"===n&&(i=" hiprint-option-item-flex");var o=e?"hiprint-option-item-field":"";return p()(`<div class="hiprint-option-item${i}"><div class="hiprint-option-item-label">${t}</div><div class="${o}">${e}</div></div>`)}var F={movingDistance:1.5,paperHeightTrim:1,showPosition:!0,positionLineMode:!1,positionUnit:!0,showSizeBox:!0,adsorbMin:3,showAdsorbLine:!0,adsorbLineMin:6,paperNumberContinue:!1,panel:{supportOptions:[{name:"paperList",hidden:!1},{name:"panelPaperRule",hidden:!1},{name:"panelPageRule",hidden:!1},{name:"firstPaperFooter",hidden:!1},{name:"evenPaperFooter",hidden:!1},{name:"oddPaperFooter",hidden:!1},{name:"lastPaperFooter",hidden:!1},{name:"leftOffset",hidden:!1},{name:"topOffset",hidden:!1},{name:"fontFamily",hidden:!1},{name:"orient",hidden:!1},{name:"paperNumberDisabled",hidden:!1},{name:"paperNumberContinue",hidden:!1},{name:"paperNumberFormat",hidden:!1},{name:"watermarkOptions",hidden:!1},{name:"panelLayoutOptions",hidden:!1}],default:{}},text:{tabs:[{name:"\u57fa\u7840",options:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"dataType",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"textDecoration",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"textContentWrap",hidden:!1},{name:"lineHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u8fb9\u6846",options:[{name:"optionsGroup",hidden:!1},{name:"borderLeft",hidden:!1},{name:"borderTop",hidden:!1},{name:"borderRight",hidden:!1},{name:"borderBottom",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderColor",hidden:!1},{name:"contentPaddingLeft",hidden:!1},{name:"contentPaddingTop",hidden:!1},{name:"contentPaddingRight",hidden:!1},{name:"contentPaddingBottom",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"textType",hidden:!1},{name:"barcodeMode",hidden:!1},{name:"barTextMode",hidden:!1},{name:"barWidth",hidden:!1},{name:"barAutoWidth",hidden:!1},{name:"qrcodeType",hidden:!1},{name:"qrCodeLevel",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"upperCase",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}]}],supportOptions:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"dataType",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"textDecoration",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"textContentWrap",hidden:!1},{name:"lineHeight",hidden:!1},{name:"textType",hidden:!1},{name:"barcodeMode",hidden:!1},{name:"barTextMode",hidden:!1},{name:"barWidth",hidden:!1},{name:"barAutoWidth",hidden:!1},{name:"qrCodeLevel",hidden:!1},{name:"hideTitle",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"optionsGroup",hidden:!1},{name:"borderLeft",hidden:!1},{name:"borderTop",hidden:!1},{name:"borderRight",hidden:!1},{name:"borderBottom",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderColor",hidden:!1},{name:"contentPaddingLeft",hidden:!1},{name:"contentPaddingTop",hidden:!1},{name:"contentPaddingRight",hidden:!1},{name:"contentPaddingBottom",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{width:120,height:9.75}},image:{tabs:[{name:"\u57fa\u7840",options:[{name:"field",hidden:!1},{name:"src",hidden:!1},{name:"fit",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"borderRadius",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}]}],supportOptions:[{name:"field",hidden:!1},{name:"src",hidden:!1},{name:"fit",hidden:!1},{name:"borderRadius",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{}},longText:{tabs:[{name:"\u57fa\u7840",options:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"textAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"color",hidden:!1},{name:"longTextIndent",hidden:!1},{name:"leftSpaceRemoved",hidden:!1},{name:"lHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}]}],supportOptions:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"textAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"color",hidden:!1},{name:"hideTitle",hidden:!1},{name:"longTextIndent",hidden:!1},{name:"leftSpaceRemoved",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"lHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"optionsGroup",hidden:!1},{name:"borderLeft",hidden:!1},{name:"borderTop",hidden:!1},{name:"borderRight",hidden:!1},{name:"borderBottom",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderColor",hidden:!1},{name:"contentPaddingLeft",hidden:!1},{name:"contentPaddingTop",hidden:!1},{name:"contentPaddingRight",hidden:!1},{name:"contentPaddingBottom",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{height:42,width:550}},table:{tabs:[{name:"\u57fa\u7840",options:[{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"tableHeaderRepeat",hidden:!1},{name:"tableFooterRepeat",hidden:!1},{name:"autoCompletion",hidden:!1},{name:"maxRows",hidden:!1},{name:"columns",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"lineHeight",hidden:!1},{name:"textAlign",hidden:!1},{name:"gridColumns",hidden:!1},{name:"gridColumnsGutter",hidden:!1},{name:"tableBorder",hidden:!1},{name:"tableHeaderBorder",hidden:!1},{name:"tableHeaderCellBorder",hidden:!1},{name:"tableHeaderRowHeight",hidden:!1},{name:"tableHeaderBackground",hidden:!1},{name:"tableHeaderFontSize",hidden:!1},{name:"tableHeaderFontWeight",hidden:!1},{name:"tableBodyRowHeight",hidden:!1},{name:"tableBodyRowBorder",hidden:!1},{name:"tableBodyCellBorder",hidden:!1},{name:"tableFooterBorder",hidden:!1},{name:"tableFooterCellBorder",hidden:!1},{name:"lHeight",hidden:!1}]},{name:"\u5217",options:[]},{name:"\u9ad8\u7ea7",options:[{name:"axis",hidden:!1},{name:"styler",hidden:!1},{name:"rowStyler",hidden:!1},{name:"footerFormatter",hidden:!1},{name:"rowsColumnsMerge",hidden:!1},{name:"rowsColumnsMergeClean",hidden:!1},{name:"groupSequenceContinue",hidden:!1},{name:"groupFieldsFormatter",hidden:!1},{name:"groupFormatter",hidden:!1},{name:"groupFooterFormatter",hidden:!1},{name:"gridColumnsFooterFormatter",hidden:!1}]}],supportOptions:[{name:"field",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"lineHeight",hidden:!1},{name:"textAlign",hidden:!1},{name:"gridColumns",hidden:!1},{name:"gridColumnsGutter",hidden:!1},{name:"tableHeaderRepeat",hidden:!1},{name:"tableBorder",hidden:!1},{name:"tableHeaderBorder",hidden:!1},{name:"tableHeaderCellBorder",hidden:!1},{name:"tableHeaderRowHeight",hidden:!1},{name:"tableHeaderBackground",hidden:!1},{name:"tableHeaderFontSize",hidden:!1},{name:"tableHeaderFontWeight",hidden:!1},{name:"tableBodyRowHeight",hidden:!1},{name:"tableBodyRowBorder",hidden:!1},{name:"tableBodyCellBorder",hidden:!1},{name:"tableFooterBorder",hidden:!1},{name:"tableFooterCellBorder",hidden:!1},{name:"axis",hidden:!1},{name:"lHeight",hidden:!1},{name:"autoCompletion",hidden:!1},{name:"maxRows",hidden:!1},{name:"columns",hidden:!1},{name:"styler",hidden:!1},{name:"rowStyler",hidden:!1},{name:"tableFooterRepeat",hidden:!1},{name:"footerFormatter",hidden:!1},{name:"rowsColumnsMerge",hidden:!1},{name:"rowsColumnsMergeClean",hidden:!1},{name:"groupSequenceContinue",hidden:!1},{name:"groupFieldsFormatter",hidden:!1},{name:"groupFormatter",hidden:!1},{name:"groupFooterFormatter",hidden:!1},{name:"gridColumnsFooterFormatter",hidden:!1}],default:{width:550}},hline:{tabs:[{name:"\u57fa\u7840",options:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1}]}],supportOptions:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}],default:{borderWidth:.75,height:9,width:90}},vline:{tabs:[{name:"\u57fa\u7840",options:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1}]}],supportOptions:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}],default:{borderWidth:void 0,height:90,width:9}},rect:{tabs:[{name:"\u57fa\u7840",options:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1}]}],supportOptions:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}],default:{borderWidth:void 0,height:90,width:90}},oval:{tabs:[{name:"\u57fa\u7840",options:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1}]}],supportOptions:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}],default:{borderWidth:void 0,height:90,width:90}},html:{tabs:[{name:"\u57fa\u7840",options:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1}]}],supportOptions:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"zIndex",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1}],default:{height:90,width:90}},tableColumn:{supportOptions:[{name:"title",hidden:!1},{name:"align",hidden:!1},{name:"halign",hidden:!1},{name:"vAlign",hidden:!1},{name:"tableTextType",hidden:!1},{name:"tableBarcodeMode",hidden:!1},{name:"tableQRCodeLevel",hidden:!1},{name:"tableColumnHeight",hidden:!1},{name:"showCodeTitle",hidden:!1},{name:"paddingLeft",hidden:!1},{name:"paddingRight",hidden:!1},{name:"tableSummaryTitle",hidden:!1},{name:"tableSummaryText",hidden:!1},{name:"tableSummaryColspan",hidden:!1},{name:"tableSummary",hidden:!1},{name:"tableSummaryAlign",hidden:!1},{name:"tableSummaryNumFormat",hidden:!1},{name:"tableSummaryFormatter",hidden:!1},{name:"upperCase",hidden:!1},{name:"renderFormatter",hidden:!1},{name:"formatter2",hidden:!1},{name:"styler2",hidden:!1},{name:"stylerHeader",hidden:!1}],default:{height:90,width:90}},barcode:{tabs:[{name:"\u57fa\u7840",options:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"barcodeType",hidden:!1},{name:"barWidth",hidden:!1},{name:"barAutoWidth",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"barColor",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}]}],supportOptions:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"barcodeType",hidden:!1},{name:"barWidth",hidden:!1},{name:"barAutoWidth",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"barColor",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{width:160,height:40,title:"\u6761\u5f62\u7801",barcodeType:"code128",testData:"barcode"}},qrcode:{tabs:[{name:"\u57fa\u7840",options:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"qrcodeType",hidden:!1},{name:"qrCodeLevel",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"barColor",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}]}],supportOptions:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"qrcodeType",hidden:!1},{name:"qrCodeLevel",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"barColor",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{width:80,height:80,title:"\u4e8c\u7ef4\u7801",qrcodeType:"qrcode",testData:"qrcode"}}};window.autoConnect=!1,p().fn||(p().fn=p().prototype);var R=p(),D={paperList:m.PAGE_TYPES},H={},L=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==O(t)&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=21)}([function(t,e,n){var i;n.d(e,"a",(function(){return D})),D.event=(i={},{on:function(t,e){i[t]||(i[t]=[]),i[t].push(e)},id:0,off:function(t,e){var n=i[t];if(n){for(var o=-1,r=0;r<n.length;r++)if(n[r]===e){o=r;break}o<0||i[t].splice(o,1)}},trigger:function(t){var e=i[t];if(e&&e.length)for(var n=Array.prototype.slice.call(arguments,1),o=0;o<e.length;o++)e[o].apply(this,n)},clear:function(t){i[t]=[]},getId:function(){return this.id+=1,this.id},getNameWithId:function(t){return t+"-"+this.getId()}}),D.form={serialize:function(t){var e=p()(t).serializeArray(),n={};return p().each(e,(function(){n[this.name]?"[object Array]"==Object.prototype.toString.call(n[this.name])?n[this.name].push(this.value):n[this.name]=[n[this.name],this.value]:n[this.name]=this.value})),n}},D.pt={toPx:function(t){return t*(this.getDpi()/72)},toMm:function(t){return D.px.toMm(D.pt.toPx(t))},dpi:0,getDpi:function(){if(!this.dpi){var t=document.createElement("DIV");t.style.cssText="width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden",document.body.appendChild(t),this.dpi=t.offsetHeight}return this.dpi}},D.px={toPt:function(t){return t*(72/this.getDpi())},toMm:function(t){return Math.round(t/this.getDpi()*25.4*100)/100},dpi:0,getDpi:function(){if(!this.dpi){var t=document.createElement("DIV");t.style.cssText="width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden",document.body.appendChild(t),this.dpi=t.offsetHeight}return this.dpi}},D.mm={toPt:function(t){return 72/25.4*t},toPx:function(t){return D.pt.toPx(D.mm.toPt(t))}},D.throttle=function(t,e,n){var i,o,r,a=null,s=0;n||(n={});var p=function(){s=!1===n.leading?0:_.now(),a=null,r=t.apply(i,o),a||(i=o=null)};return function(){var l=_.now();s||!1!==n.leading||(s=l);var u=e-(l-s);return i=this,o=arguments,u<=0||u>e?(a&&(clearTimeout(a),a=null),s=l,r=t.apply(i,o),a||(i=o=null)):a||!1===n.trailing||(a=setTimeout(p,u)),r}},D.debounce=function(t,e,n){var i,o,r,a,s,p=function p(){var l=_.now()-a;l<e&&l>=0?i=setTimeout(p,e-l):(i=null,n||(s=t.apply(r,o),i||(r=o=null)))};return function(){r=this,o=arguments,a=_.now();var l=n&&!i;return i||(i=setTimeout(p,e)),l&&(s=t.apply(r,o),r=o=null),s}},D.toUtf8=function(t){var e,n,i,o;for(e="",i=t.length,n=0;n<i;n++)(o=t.charCodeAt(n))>=1&&o<=127?e+=t.charAt(n):o>2047?(e+=String.fromCharCode(224|o>>12&15),e+=String.fromCharCode(128|o>>6&63),e+=String.fromCharCode(128|63&o)):(e+=String.fromCharCode(192|o>>6&31),e+=String.fromCharCode(128|63&o));return e},D.groupBy=function(t,e,n){var i={};return t.forEach((function(t){var o=JSON.stringify(n(t));i[o]||(i[o]={rows:[]},e.forEach((function(e){i[o][e]=t[e]}))),i[o].rows.push(t)})),Object.keys(i).map((function(t){return i[t]}))},D.orderBy=function(t,e){if(t.length<=1)return t;var n=Math.floor(t.length/2),i=t.splice(n,1)[0],o=[],r=[],a=!0,s=!1,p=void 0;try{for(var l,u=t[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var d=l.value;e(d)<e(i)?o.push(d):r.push(d)}}catch(t){s=!0,p=t}finally{try{a||null==u.return||u.return()}finally{if(s)throw p}}return this.orderBy(o,e).concat([i],this.orderBy(r,e))},D.dateFormat=function(t,e){if(t)try{var n=t instanceof Date?t:new Date(t),i={"y+":n.getFullYear(),"M+":n.getMonth()+1,"d+":n.getDate(),"H+":n.getHours(),"m+":n.getMinutes(),"s+":n.getSeconds(),"q+":Math.floor((n.getMonth()+3)/3),S:n.getMilliseconds()};for(var o in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(n.getFullYear()+"").substr(4-RegExp.$1.length))),i)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?i[o]:("00"+i[o]).substr((""+i[o]).length)));return e}catch(t){return console.log(t),""}return""},D.numFormat=function(t,e){if(null!=t)try{var n="string"==typeof t?parseFloat(t):t,i=parseInt(e);return i>0?n.toFixed(i):parseInt(n.toString())}catch(t){return console.log(t),""}return""},D.toUpperCase=T},function(t,e,n){n.d(e,"a",(function(){return o}));var i=n(9),o=function(){function t(){}return t.prototype.init=function(t){t&&p().extend(this,t)},t.prototype.on=function(t,e){D.event.on(t,e)},t.prototype.clear=function(t){D.event.clear(t)},t.prototype.registerItems=function(t){t.forEach((function(t){i.a.registerItem(new t)}))},Object.defineProperty(t,"instance",{get:function(){return t._instance||(t._instance=new t,F&&p().extend(t._instance,F),t._instance.optionItems&&t._instance.optionItems.forEach((function(t){i.a.registerItem(new t)}))),t._instance},enumerable:!0,configurable:!0}),t}()},function(t,e,n){var i=function(){function t(t){this.printElement=t}return t.prototype.updatePosition=function(t,e){this.left=t,this.top=e},t}();n.d(e,"a",(function(){return o}));var o=function(){function t(){if(this.printTemplateContainer={},Object.keys(D.paperList).forEach((t=>this[t]=D.paperList[t])),this.dragLengthCNum=function(t,e){var n=.75*t;return Math.round(n/e)*e},!this.A4)throw new Error("\u7eb8\u5f20\u7c7b\u578b\u4e22\u5931")}return Object.defineProperty(t,"instance",{get:function(){return this._instance||(this._instance=new t),this._instance},enumerable:!0,configurable:!0}),t.prototype.getDragingPrintElement=function(){return t.instance.dragingPrintElement},t.prototype.setDragingPrintElement=function(e){t.instance.dragingPrintElement=new i(e)},t.prototype.guid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},t.prototype.imageToBase64=function(t){if(-1==p()(t).attr("src").indexOf("base64"))try{var e=document.createElement("canvas"),n=new Image;n.src=t.attr("src"),e.width=n.width,e.height=n.height,e.getContext("2d").drawImage(n,0,0),t.attr("src",e.toDataURL("image/png"))}catch(e){try{this.xhrLoadImage(t)}catch(t){console.log(t)}}},t.prototype.xhrLoadImage=function(t){},t.prototype.transformImg=function(t){var e=this;t.map((function(t,n){e.imageToBase64(p()(n))}))},t.prototype.getPrintTemplateById=function(e){return t.instance.printTemplateContainer[e]},t.prototype.setPrintTemplateById=function(e,n){return t.instance.printTemplateContainer[e]=n},t}()},function(t,e,n){var i=function(){};n.d(e,"a",(function(){return o}));var o=function(){function t(t){t=t||{},this.left=t.left,this.top=t.top,this.topInDesign=this.top,this.height=t.height,this.width=t.width,this.transform=t.transform,this.init(t)}return t.prototype.setDefault=function(t){this.defaultOptions=t,this.initSize(),Object.keys(this.defaultOptions).forEach((t=>{this[t]=this[t]||this.defaultOptions[t]}))},t.prototype.initSize=function(){this.width||this.setWidth(this.defaultOptions.width),this.height||this.setHeight(this.defaultOptions.height)},t.prototype.initSizeByHtml=function(t,e){this.width||this.setWidth(t),this.height||this.setHeight(e)},t.prototype.getRectInfo=function(){var t={w:0,h:0,diffW:0,diffH:0};if(this.transform){var e=this.transform*Math.PI/180,n=this.width,i=this.height,o=Math.sin(e),r=Math.cos(e),a=Math.abs(n*r)+Math.abs(i*o),s=Math.abs(n*o)+Math.abs(i*r),p=(n-a)/2,l=(i-s)/2;t.w=a,t.h=s,t.diffW=p,t.diffH=l}return t},t.prototype.getLeft=function(){return this.left-0},t.prototype.posLeft=function(){var t=this.left;return this.transform&&(t+=this.getRectInfo().diffW),Math.floor(10*t)/10},t.prototype.setRotate=function(t){null!=t&&(this.transform=t)},t.prototype.displayLeft=function(t){return this.transform&&t?this.left+this.getRectInfo().diffW+"pt":this.left+"pt"},t.prototype.setLeft=function(t){null!=t&&(this.left=t)},t.prototype.getTop=function(){return this.top-0},t.prototype.posTop=function(){var t=this.top;return this.transform&&(t+=this.getRectInfo().diffH),Math.floor(10*t)/10},t.prototype.getTopInDesign=function(){return this.topInDesign},t.prototype.displayTop=function(t){return this.transform&&t?this.top+this.getRectInfo().diffH+"pt":this.top+"pt"},t.prototype.setTop=function(t){null!=t&&(this.top=t)},t.prototype.copyDesignTopFromTop=function(){this.topInDesign=this.top},t.prototype.getHeight=function(){if(this.transform){var t=this.getRectInfo();return t.h+t.diffH}return this.height-0},t.prototype.displayHeight=function(){return this.height+"pt"},t.prototype.setHeight=function(t){null!=t&&(this.height=t)},t.prototype.getWidth=function(){if(this.transform){var t=this.getRectInfo();return t.w+t.diffW}return this.width-0},t.prototype.displayWidth=function(){return this.width+"pt"},t.prototype.setWidth=function(t){null!=t&&(this.width=t)},t.prototype.getValueFromOptionsOrDefault=function(t){return null==this[t]?this.defaultOptions[t]:this[t]},t.prototype.getPrintElementOptionEntity=function(){var t=new i,e=this;return Object.keys(this).filter((function(t){return"topInDesign"!=t})).forEach((function(n){if("number"!=typeof e[n]&&"string"!=typeof e[n]&&!["fields"].includes(n)&&O(e[n])!=O(!0)||(t[n]=e[n]),"style"==n){t.style={};var i=e[n];i&&Object.keys(i).forEach((function(e){"number"!=typeof i[e]&&"string"!=typeof i[e]||(t.style[e]=i[e])}))}})),t},t.prototype.init=function(t){var e=this;t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))},t}()},function(t,e,n){n.d(e,"a",(function(){return u}));var i=n(17),o=n(1),r=n(9),a=n(6),s=(n(0),n(8)),l=n(2),u=function(){function t(t){this.printElementType=t,this.id=l.a.instance.guid()}return t.prototype.getConfigOptionsByName=function(t){return o.a.instance[t]},t.prototype.getProxyTarget=function(t){t&&this.SetProxyTargetOption(t);var e=this.getData(),n=this.createTarget(this.getTitle(),e);return this.updateTargetSize(n),this.css(n,e),n},t.prototype.SetProxyTargetOption=function(t){this.options.getPrintElementOptionEntity(),p().extend(this.options,t),this.copyFromType()},t.prototype.showInPage=function(t,e){var n=this.options.showInPage,i=this.options.unShowInPage;if(n){if("first"==n)return 0==t;if(t==e-1&&"last"==i)return!1;if("odd"==n)return(0!=t||"first"!=i)&&t%2==0;if("even"==n)return t%2==1;if("last"==n)return t==e-1}return!(0==t&&"first"==i||t==e-1&&"last"==i)},t.prototype.setTemplateId=function(t){this.templateId=t},t.prototype.setPanel=function(t){this.panel=t},t.prototype.getField=function(){return this.options.field||this.printElementType.field},t.prototype.getTitle=function(){return this.printElementType.title},t.prototype.updateSizeAndPositionOptions=function(t,e,n,i){const o=l.a.instance.getPrintTemplateById(this.templateId);if(void 0!==this.panel&&!o.willOutOfBounds){const n=D.mm.toPt(this.panel.width),i=D.mm.toPt(this.panel.height);if(t<0)return;if(e<0)return;if(t+this.options.width>n)return;if(e+this.options.height>i)return}this.options.setLeft(t),this.options.setTop(e),this.options.copyDesignTopFromTop(),this.options.setWidth(n),this.options.setHeight(i)},t.prototype.initSizeByHtml=function(t){if(t&&t.length){this.createTempContainer();var e=t.clone();this.getTempContainer().append(e),this.options.initSizeByHtml(parseInt(D.px.toPt(e.width()).toString()),parseInt(D.px.toPt(e.height()).toString())),this.removeTempContainer()}},t.prototype.updateTargetSize=function(t){t.css("width",this.options.displayWidth()),t.css("height",this.options.displayHeight())},t.prototype.updateTargetWidth=function(t){t.css("width",this.options.displayWidth())},t.prototype.getDesignTarget=function(t){var e=this,n=0;return this.designTarget=this.getHtml(t)[0].target,this.designPaper=t,this.designTarget.click((function(t){t.timeStamp-n>500&&D.event.trigger(e.getPrintElementSelectEventKey(),{printElement:e}),n=t.timeStamp})),this.designTarget.dblclick((function(t){var n=e.designTarget.find(".hiprint-printElement-content");if(n){var i=e.designTarget.find(".resize-panel");"text"!=e.printElementType.type||e.options.textType&&"text"!=e.options.textType||(e._editing=!0,e.designTarget.hidraggable("update",{draggable:!1}),n.css("cursor","text"),n.addClass("editing"),e.designTarget.addClass("editing"),n.click((function(t){e._editing&&t.stopPropagation()})),n.attr("contenteditable",!0),i&&i.css("display","none"),e.selectEnd(n))}})),this.designTarget},t.prototype.selectEnd=function(t){if(t.focus(),void 0!==window.getSelection&&void 0!==document.createRange){(n=document.createRange()).selectNodeContents(t[0]),n.collapse(!1);var e=window.getSelection();e.removeAllRanges(),e.addRange(n)}else if(void 0!==document.body.createTextRange){var n;(n=document.body.createTextRange()).moveToElementText(t[0]),n.collapse(!1),n.select()}},t.prototype.updateByContent=function(t){var e=this,n=e.designTarget.find(".hiprint-printElement-content");if(e._editing){n&&n.css("cursor","")&&n.removeClass("editing")&&n.removeAttr("contenteditable"),e.designTarget.removeClass("editing");var i=n.text(),o=e.options.title;i.startsWith(o)&&e.options.field?i.length>o.length?e.options.testData=i.split("\uff1a")[1]:(e.options.title=i,e.options.testData=""):e.options.title=i,e.options.title=e.options.title.split("\uff1a")[0],t||D.event.trigger(e.getPrintElementSelectEventKey(),{printElement:e}),e.updateDesignViewFromOptions(),D.event.trigger("hiprintTemplateDataChanged_"+e.templateId,"\u7f16\u8f91\u4fee\u6539"),e._editing=!1;var r=null==e.options.draggable||1==e.options.draggable;e.designTarget.hidraggable("update",{draggable:r})}},t.prototype.getPrintElementSelectEventKey=function(){return"PrintElementSelectEventKey_"+this.templateId},t.prototype.design=function(t,e){var n=this;this.designTarget.hidraggable({draggable:n.options.draggable,axis:n.options.axis?n.options.axis:void 0,designTarget:n,onDrag:function(t,i,o){var r=n.panel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&t.designTarget.children().last().hasClass("selected")&&!t.printElementType.type.includes("table")})),a=r.length>1,s=!n.designTarget.children().last().hasClass("selected");if(a){var p=i-n.options.left,u=o-n.options.top;r.forEach((function(t){t.updateSizeAndPositionOptions(p+t.options.getLeft(),u+t.options.getTop()),t.designTarget.css("left",t.options.displayLeft()),t.designTarget.css("top",t.options.displayTop()),t.createLineOfPosition(e)})),s&&(n.updateSizeAndPositionOptions(i,o),n.createLineOfPosition(e))}else n.updateSizeAndPositionOptions(i,o),n.createLineOfPosition(e);l.a.instance.changed=!0},moveUnit:"pt",minMove:o.a.instance.movingDistance,onBeforeDrag:function(t){l.a.instance.draging=!0,n.designTarget.focus(),n.createLineOfPosition(e)},onBeforeSelectAllDrag:function(){l.a.instance.draging=!0,n.designTarget.focus()},getScale:function(){return n.designPaper.scale||1},onStopDrag:function(t){l.a.instance.changed&&D.event.trigger("hiprintTemplateDataChanged_"+n.templateId,"\u79fb\u52a8"),l.a.instance.draging=!1,l.a.instance.changed=!1;var e=n.panel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&!t.printElementType.type.includes("table")}));e.length>1?e.forEach((function(t){t.removeLineOfPosition()})):n.removeLineOfPosition()}}),this.setResizePanel(),this.bingCopyEvent(this.designTarget),this.bingKeyboardMoveEvent(this.designTarget,e)},t.prototype.getPrintElementEntity=function(t){return t?new i.a(void 0,this.options.getPrintElementOptionEntity(),this.printElementType.getPrintElementTypeEntity()):new i.a(this.printElementType.tid,this.options.getPrintElementOptionEntity())},t.prototype.submitOption=function(){var t=this.panel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&t.designTarget.children().last().hasClass("selected")&&!t.printElementType.type.includes("table")}));t=t.filter((t=>t.printElementType.type==this.printElementType.type));var e=this,n=this.getConfigOptions();n&&n.tabs&&n.tabs.length?this.getPrintElementOptionTabs().forEach((function(n){"\u6837\u5f0f"===n.name&&t.length?n.list.forEach((function(e){t.forEach((t=>{var n=e.getValue(),i="textType"==e.name&&t.options[e.name]!==n,o="axis"==e.name&&t.options[e.name]!==n;n&&"object"==O(n)?Object.keys(n).forEach((function(e){t.options[e]=n[e]})):t.options[e.name]=n,i&&t.setResizePanel(),o&&t.designTarget.hidraggable("update",{axis:n})}))})):n.list.forEach((function(t){var n=t.getValue(),i="textType"==t.name&&e.options[t.name]!==n,o="axis"==t.name&&e.options[t.name]!==n;n&&"object"==O(n)?Object.keys(n).forEach((function(t){e.options[t]=n[t]})):e.options[t.name]=n,i&&e.setResizePanel(),o&&e.designTarget.hidraggable("update",{axis:n})}))})):this.getPrintElementOptionItems().forEach((function(t){var n=t.getValue(),i="textType"==t.name&&e.options[t.name]!==n,o="axis"==t.name&&e.options[t.name]!==n;n&&"object"==O(n)?Object.keys(n).forEach((function(t){e.options[t]=n[t]})):e.options[t.name]=n,i&&e.setResizePanel(),o&&e.designTarget.hidraggable("update",{axis:n})})),this.updateDesignViewFromOptions(),D.event.trigger("hiprintTemplateDataChanged_"+this.templateId,"\u5143\u7d20\u4fee\u6539")},t.prototype.updateOption=function(t,e,n){try{var i=this.getConfigOptions(),o=["draggable"];i&&i.tabs&&i.tabs.length?i.tabs.forEach((function(t){t.options.forEach((function(t){o.push(t.name)}))})):o=i.supportOptions.map((function(t){return t.name})),o&&o.includes(t)&&(this.options[t]=e,this.updateDesignViewFromOptions(),n||D.event.trigger("hiprintTemplateDataChanged_"+this.templateId,"\u53c2\u6570\u4fee\u6539")),this.getPrintElementOptionTabs().forEach((n=>{n.list.forEach((n=>{n.name===t&&n.target&&(n.target.find("select")?.val(e.toString()),n.target.find("input")?.val(e.toString()))}))}))}catch(i){console.log("updateOption error",i)}},t.prototype.getReizeableShowPoints=function(){return["barcode","qrcode"].includes(this.options.textType)?["se","s","e","r"]:["s","e","r"]},t.prototype.setResizePanel=function(){var t=this,e=this.designPaper;this.designTarget.hireizeable({showPoints:t.getReizeableShowPoints(),draggable:t.options.draggable,showSizeBox:o.a.instance.showSizeBox,getScale:function(){return t.designPaper.scale||1},onBeforeResize:function(){l.a.instance.draging=!0},onResize:function(n,i,o,r,a,s){null!=s?t.onRotate(n,s):t.onResize(n,i,o,r,a),t.createLineOfPosition(e)},onStopResize:function(e){D.event.trigger("hiprintTemplateDataChanged_"+t.templateId,e?"\u65cb\u8f6c":"\u5927\u5c0f"),l.a.instance.draging=!1,t.removeLineOfPosition()}})},t.prototype.onRotate=function(t,e){this.options.setRotate(e)},t.prototype.onResize=function(t,e,n,i,o){this.updateSizeAndPositionOptions(o,i,n,e)},t.prototype.getOrderIndex=function(){return this.options.getTop()},t.prototype.getHtml=function(t,e,n){var i=0;this.setCurrenttemplateData(e);var o=[],r=this.getBeginPrintTopInPaperByReferenceElement(t),p=t.getPaperFooter(i);this.isHeaderOrFooter()||this.isFixed()||r>p&&"none"!=t.panelPageRule&&(o.push(new a.a({target:void 0,printLine:void 0})),r=r-p+t.paperHeader,i++,p=t.getPaperFooter(i));var l=this.getData(e),u=this.createTarget(this.getTitle(),l,n);return this.updateTargetSize(u),this.css(u,l),u.css("position","absolute"),u.css("left",this.options.displayLeft()),u.css("top",r+"pt"),o.push(new a.a({target:u,printLine:r+this.options.getHeight(),referenceElement:new s.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:r+this.options.getHeight(),printTopInPaper:r})})),e&&this.options.pageBreak&&(o[0].target.css("top",t.paperHeader+"pt"),o[0].referenceElement.top=this.options.getTop()-this.options.getHeight()-t.paperHeader,o[0].printLine=t.paperHeader,o[0].referenceElement.bottomInLastPaper=0,o[0].referenceElement.printTopInPaper=t.paperHeader,o.unshift(new a.a({target:u,printLine:t.height,referenceElement:new s.a({top:0,left:0,height:0,width:0,beginPrintPaperIndex:t.index,bottomInLastPaper:t.height,printTopInPaper:t.paperHeader})}))),o},t.prototype.getHtml2=function(t,e,n){var i=0;this.setCurrenttemplateData(e);var o=[],r=this.getBeginPrintTopInPaperByReferenceElement(t),p=t.getPaperFooter(i);this.isHeaderOrFooter()||this.isFixed()||("none"!=t.panelPageRule&&r>p&&(o.push(new a.a({target:void 0,printLine:void 0})),r=r-p+t.paperHeader,i++,p=t.getPaperFooter(i)),r<=p&&e&&r+this.options.getHeight()>p&&"none"!=t.panelPageRule&&(o.push(new a.a({target:void 0,printLine:void 0})),r=t.paperHeader,i++,p=t.getPaperFooter(i)));var l=this.getData(e),u=this.createTarget(this.getTitle(),l);return"none"==t.panelPageRule&&r+this.options.getHeight()>p&&this.updatePanelHeight(r+this.options.getHeight(),t),this.updateTargetSize(u),this.css(u,l),u.css("position","absolute"),u.css("left",this.options.displayLeft()),u.css("top",r+"pt"),o.push(new a.a({target:u,printLine:r+this.options.getHeight(),referenceElement:new s.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:r+this.options.getHeight(),printTopInPaper:r})})),e&&this.options.pageBreak&&(o[0].target.css("top",t.paperHeader+"pt"),o[0].referenceElement.top=this.options.getTop()-this.options.getHeight()-t.paperHeader,o[0].printLine=t.paperHeader,o[0].referenceElement.bottomInLastPaper=0,o[0].referenceElement.printTopInPaper=t.paperHeader,o.unshift(new a.a({target:u,printLine:t.height,referenceElement:new s.a({top:0,left:0,height:0,width:0,beginPrintPaperIndex:t.index,bottomInLastPaper:t.height,printTopInPaper:t.paperHeader})}))),o},t.prototype.updatePanelHeight=function(t,e){if("none"==this.panel.panelPageRule){var n=D.pt.toMm(t);e.paperFooter=t,e.target.css("height",n+"mm"),e.target.attr("original-height",n)}},t.prototype.getBeginPrintTopInPaperByReferenceElement=function(t){var e=this.options.getTop();return this.isHeaderOrFooter()||this.isFixed()?e:t.referenceElement.isPositionLeftOrRight(e)?t.referenceElement.printTopInPaper+(e-t.referenceElement.top):t.referenceElement.bottomInLastPaper+(e-(t.referenceElement.top+t.referenceElement.height))},t.prototype.css=function(t,e){var n,i=this,o=[],a=this.getConfigOptions();a&&(a.tabs&&a.tabs.length?(n=[],a.tabs.forEach((function(t){n=n.concat(t.options)}))):n=a.supportOptions,n&&n.forEach((function(e){var n=r.a.getItem(e.name);if(n&&n.css){var a=n.css(t,i.options.getValueFromOptionsOrDefault(e.name));a&&o.push(a)}})));this.stylerCss(t,e)},t.prototype.stylerCss=function(t,e){var n=this.getStyler();if(n){var i=n(e,this.options,t,this._currenttemplateData);i&&"object"==typeof i&&Object.keys(i).forEach((function(e){t.css(e,i[e])}))}},t.prototype.getData=function(t){var e=this.getField();return t?e&&e.split(".").reduce(((e,n)=>e?e[n]:t?t[n]:""),!1)||"":this.printElementType.getData()},t.prototype.copyFromType=function(){var t=this.options,e=this.printElementType,n=this.getConfigOptions(),i=[];return n&&n.tabs&&n.tabs.length?n.tabs.forEach((function(t){t.options.forEach((function(t){i.push(t.name)}))})):i=n.supportOptions.map((function(t){return t.name})),Object.keys(e).forEach((function(n){e[n]&&"columns"!=n&&i.indexOf(n)>-1&&(t[n]="function"==O(e[n])?e[n].toString():e[n])})),t},t.prototype.getPrintElementOptionTabs=function(){if(this._printElementOptionTabs)return this._printElementOptionTabs;var t=[],e=this.getConfigOptions();if(e){var n=e.tabs;n&&n.forEach((function(e,n){t.push({name:e.name,list:[]}),e.options.filter((function(t){return!t.hidden})).forEach((function(e){var i=r.a.getItem(e.name);t[n].list.push(i)}))}))}return this._printElementOptionTabs=t,this._printElementOptionItems=void 0,this._printElementOptionTabs},t.prototype.getPrintElementOptionItems=function(){if(this._printElementOptionItems)return this._printElementOptionItems;var t,e=[],n=this.getConfigOptions();n&&(n.tabs&&n.tabs.length?(t=[],n.tabs.forEach((function(t){t=t.concat(t.options)}))):t=n.supportOptions,t&&t.filter((function(t){return!t.hidden})).forEach((function(t){var n=r.a.getItem(t.name);e.push(n)})));return this._printElementOptionItems=this.filterOptionItems(e.concat()),this._printElementOptionTabs=void 0,this._printElementOptionItems},t.prototype.getPrintElementOptionItemsByName=function(t){var e,n=[],i=this.getConfigOptionsByName(t);i&&(i.tabs&&i.tabs.length?(e=[],i.tabs.forEach((function(t){e=e.concat(t.options)}))):e=i.supportOptions,e&&e.filter((function(t){return!t.hidden})).forEach((function(t){var e=r.a.getItem(t.name);n.push(e)})));return n.concat()},t.prototype.filterOptionItems=function(t){return this.printElementType.field?t.filter((function(t){return"field"!=t.name})):t},t.prototype.createTempContainer=function(){this.removeTempContainer(),p()("body").append(p()('<div class="hiprint_temp_Container hiprint-printPaper" style="overflow:hidden;height: 0px;box-sizing: border-box;"></div>'))},t.prototype.removeTempContainer=function(){p()(".hiprint_temp_Container").remove()},t.prototype.getTempContainer=function(){return p()(".hiprint_temp_Container")},t.prototype.isHeaderOrFooter=function(){return this.options.getTopInDesign()<this.panel.paperHeader||this.options.getTopInDesign()>=this.panel.paperFooter},t.prototype.delete=function(){this.designTarget&&this.designTarget.remove()},t.prototype.setCurrenttemplateData=function(t){this._currenttemplateData=t},t.prototype.isFixed=function(){return this.options.fixed},t.prototype.onRendered=function(t,e){this.printElementType&&this.printElementType.onRendered&&this.printElementType.onRendered(e,this.options,t.getTarget())},t.prototype.createLineOfPosition=function(t){var e=p()(".toplineOfPosition.id"+this.id),n=p()(".topPosition.id"+this.id),i=p()(".leftlineOfPosition.id"+this.id),r=p()(".leftPosition.id"+this.id),a=p()(".rightlineOfPosition.id"+this.id),s=p()(".bottomlineOfPosition.id"+this.id),l=o.a.instance;e.length?e.css("top",this.options.displayTop(!0)):((e=p()('<div class="toplineOfPosition id'+this.id+'" style="position: absolute; width: 100%;"></div>')).css("top",this.options.displayTop(!0)),e.css("width",t.displayWidth()),this.designTarget.parents(".hiprint-printPaper-content").append(e));l.showPosition&&(n.length?(n.toggleClass("topPosition-lineMode",l.positionLineMode),n.text(this.options.posTop()+(l.positionUnit?"pt":"")),n.css("top",this.options.posTop()-n.height()+"pt"),l.positionLineMode?n.css("left",this.options.posLeft()-n.width()/2+"pt"):n.css("left",this.options.posLeft()+2+"pt"),this.designTarget.find(".size-box")&&this.designTarget.find(".size-box").toggleClass("hide",!0)):((n=p()('<div class="topPosition id'+this.id+'" style="position: absolute;"></div>')).toggleClass("topPosition-lineMode",l.positionLineMode),n.text(this.options.posTop()+(l.positionUnit?"pt":"")),l.positionLineMode?n.css("left",this.options.posLeft()-n.width()/2+"pt"):n.css("left",this.options.posLeft()+2+"pt"),this.designTarget.find(".size-box")&&this.designTarget.find(".size-box").toggleClass("hide",!0),this.designTarget.parents(".hiprint-printPaper-content").append(n),n.css("top",this.options.posTop()-n.height()+"pt")));if(i.length)i.css("left",this.options.displayLeft(!0));else{var u=p()('<div class="leftlineOfPosition id'+this.id+'" style="position: absolute;height: 100%;"></div>');u.css("left",this.options.displayLeft(!0)),u.css("height",t.displayHeight()),this.designTarget.parents(".hiprint-printPaper-content").append(u)}l.showPosition&&(r.length?(r.text(this.options.posLeft()+(l.positionUnit?"pt":"")),r.toggleClass("leftPosition-lineMode",l.positionLineMode),r.css("left",this.options.posLeft()-r.width()+"pt"),l.positionLineMode?r.css("top",this.options.posTop()-r.height()/3+"pt"):r.css("top",this.options.posTop()+2+"pt")):((r=p()('<div class="leftPosition id'+this.id+'" style="position: absolute;"></div>')).text(this.options.posLeft()+(l.positionUnit?"pt":"")),r.toggleClass("leftPosition-lineMode",l.positionLineMode),l.positionLineMode?r.css("top",this.options.posTop()-r.height()/3+"pt"):r.css("top",this.options.posTop()+2+"pt"),this.designTarget.parents(".hiprint-printPaper-content").append(r),r.css("left",this.options.posLeft()-r.width()+"pt")));if(a.length)a.css("left",this.options.getLeft()+this.options.getWidth()+"pt");else{var d=p()('<div class="rightlineOfPosition id'+this.id+'" style="position: absolute;height: 100%;"></div>');d.css("left",this.options.getLeft()+this.options.getWidth()+"pt"),d.css("height",t.displayHeight()),this.designTarget.parents(".hiprint-printPaper-content").append(d)}if(s.length)s.css("top",this.options.getTop()+this.options.getHeight()+"pt");else{var h=p()('<div class="bottomlineOfPosition id'+this.id+'" style="position: absolute;width: 100%;"></div>');h.css("top",this.options.getTop()+this.options.getHeight()+"pt"),h.css("width",t.displayWidth()),this.designTarget.parents(".hiprint-printPaper-content").append(h)}},t.prototype.removeLineOfPosition=function(){p()(".toplineOfPosition.id"+this.id).remove(),p()(".topPosition.id"+this.id).remove(),this.designTarget.find(".size-box")&&this.designTarget.find(".size-box").toggleClass("hide",!1),p()(".leftlineOfPosition.id"+this.id).remove(),p()(".leftPosition.id"+this.id).remove(),p()(".rightlineOfPosition.id"+this.id).remove(),p()(".bottomlineOfPosition.id"+this.id).remove()},t.prototype.getFontList=function(){var t=this.options.fontList;return t||l.a.instance.getPrintTemplateById(this.templateId).getFontList()},t.prototype.getFields=function(){return"table"==this.printElementType.type?this.options.tableFields:this.options.fields||l.a.instance.getPrintTemplateById(this.templateId).getFields()},t.prototype.getOnImageChooseClick=function(){var t=this.options.onImageChooseClick;return t||(t=l.a.instance.getPrintTemplateById(this.templateId).getOnImageChooseClick())||C},t.prototype.bingCopyEvent=function(t){var e=this;t.keydown((function(t){e._editing?t.altKey||13!=t.keyCode||e.updateByContent():(t.ctrlKey||t.metaKey)&&67==t.keyCode&&(e.copyJson(),t.preventDefault())}))},t.prototype.copyJson=function(){try{var t=p()("#copyArea");t.length||(t=p()('<textarea id="copyArea" style="position: absolute; left: 0px; top: 0px;opacity: 0"></textarea>')),p()("body").append(t);let i=this.panel.printElements.filter((t=>"block"==t.designTarget.children().last().css("display")&&!t.printElementType.type.includes("table")));if(i=i.map((t=>({options:t.options,printElementType:t.printElementType,id:t.id,templateId:t.templateId}))),!i.length)return!1;var e=JSON.stringify(i);t.text(e),t.css("visibility","visible"),t.setSelectionRange?t.setSelectionRange(0,t.value.length):t.select();var n=!1;n=document.execCommand("copy"),t.css("visibility","hidden"),this.designTarget.focus(),console.log("copyJson success")}catch(t){n=!1,console.log("copyJson error",t)}return n},t.prototype.clone=function(t){var e=this;let n=e.printElementType.createPrintElement();return Object.keys(e.options).forEach((function(t){n.options[t]=e.options[t]})),n},t.prototype.getFormatter=function(){var t=void 0;if(this.printElementType.formatter&&(t=this.printElementType.formatter),this.options.formatter)try{t=new Function("title","value","options","data","target",`data = data || {}; ${this.options.formatter}`)}catch(t){console.log(`formatter: ${this.getTitle()} : `,t)}return t},t.prototype.getStyler=function(){var t=void 0;if(this.printElementType.styler&&(t=this.printElementType.styler),this.options.styler)try{t=new Function("title","value","target","data",`data = data || {}; ${this.options.styler}`)}catch(t){console.log(`styler: ${this.getTitle()} : `,t)}return t},t.prototype.bingKeyboardMoveEvent=function(t,e){var n=this,i=void 0,r=void 0;t.attr("tabindex","1"),t.keydown((function(e){if("INPUT"!=e.target.tagName&&(!n._editing||e.altKey)){var a=n.panel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&!t.printElementType.type.includes("table")})),s=a.length>1,p=o.a.instance.movingDistance;switch(e.keyCode){case 8:case 46:var u=l.a.instance.getPrintTemplateById(n.templateId);u.deletePrintElement(n),D.event.trigger("hiprintTemplateDataChanged_"+n.templateId,"\u5220\u9664"),D.event.trigger("clearSettingContainer"),a.forEach((t=>{u.deletePrintElement(t),D.event.trigger("hiprintTemplateDataChanged_"+t.templateId,"\u5220\u9664")})),D.event.trigger("clearSettingContainer");break;case 37:i=n.options.getLeft(),s?a.forEach((function(t){t.updatePositionByMultipleSelect(0-p,0)})):(n.updateSizeAndPositionOptions(i-p),t.css("left",n.options.displayLeft())),e.preventDefault();break;case 38:r=n.options.getTop(),s?a.forEach((function(t){t.updatePositionByMultipleSelect(0,0-p)})):(n.updateSizeAndPositionOptions(void 0,r-p),t.css("top",n.options.displayTop())),e.preventDefault();break;case 39:i=n.options.getLeft(),s?a.forEach((function(t){t.updatePositionByMultipleSelect(p,0)})):(n.updateSizeAndPositionOptions(i+p),t.css("left",n.options.displayLeft())),e.preventDefault();break;case 40:r=n.options.getTop(),s?a.forEach((function(t){t.updatePositionByMultipleSelect(0,p)})):(n.updateSizeAndPositionOptions(void 0,r+p),t.css("top",n.options.displayTop())),e.preventDefault()}[37,38,39,40].includes(e.keyCode)&&D.event.trigger("hiprintTemplateDataChanged_"+n.templateId,"\u952e\u76d8\u79fb\u52a8")}}))},t.prototype.inRect=function(t){var e=this.designPaper.scale||1,n=this.designTarget[0].offsetLeft,i=this.designTarget[0].offsetTop,o=this.designTarget[0].offsetHeight,r=n+this.designTarget[0].offsetWidth,a=i+o,s=p()(t.target[0]).position().left/e,l=p()(t.target[0]).position().top/e,u=t.target[0].offsetHeight,d=t.target[0].offsetWidth;return s<r&&s+d>n&&i<l+u&&a>l},t.prototype.multipleSelect=function(t){t?this.designTarget.addClass("multipleSelect"):this.designTarget.removeClass("multipleSelect")},t.prototype.updatePositionByMultipleSelect=function(t,e){!1!==this.options.draggable&&(this.updateSizeAndPositionOptions(t+this.options.getLeft(),e+this.options.getTop()),this.designTarget.css("left",this.options.displayLeft()),this.designTarget.css("top",this.options.displayTop()))},t}()},function(t,e,n){var i=function(){function t(){}return t.prototype.init=function(t){this.target=p()('<input type="text" class="hitable-editor-text" value="" />'),t.getTarget().append(this.target),this.target.focus()},t.prototype.getValue=function(){return this.target.val()},t.prototype.setValue=function(t){this.target.val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),o=function(){function t(){this.text=new i}return Object.defineProperty(t,"Instance",{get:function(){return t._instance||(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t}(),r=function(){function t(){}return t.prototype.init=function(t,e){var n='<select class="auto-submit" style="width:100%"> <option value="" disabled>\u8bf7\u9009\u62e9\u5b57\u6bb5</option>';t.forEach((function(t,i){t.field==e.field?n+=' <option value="'+(t.field||"")+'" selected >'+(t.text||"")+"</option>":n+=' <option value="'+(t.field||"")+'" >'+(t.text||"")+"</option>"})),n+=" </select>",this.target=p()(n),e.getTarget().append(this.target),this.target.focus()},t.prototype.getValue=function(){var t=this.target.val();return this.target.find('option[value="'+t+'"]').text()+"#"+t},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),a=function(){function t(){this.select=new r}return Object.defineProperty(t,"Instance",{get:function(){return t._instance||(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t}(),s=function(){function t(){}return Object.defineProperty(t,"Instance",{get:function(){return o._instance||(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t.prototype.createEditor=function(t){return p().extend({},o.Instance[t])},t.prototype.createSelect=function(t){return p().extend({},a.Instance[t])},t}(),l=n(10),u=n(14),d=n(11),h=function(){function t(){}return t.prototype.init=function(t,e){var n=this;this.tableOptions=e,this.title=t.title,this.field=t.field,t.getTarget().unbind("dblclick.hitable").bind("dblclick.hitable",(function(){t.isEditing=!0,n.beginEdit(t)}))},t.prototype.getDisplayHtml=function(){return this.title},t.prototype.beginEdit=function(t){var e=this;e.tableOptions.options.fields&&e.tableOptions.options.fields.length?(this.editor=s.Instance.createSelect("select"),t.getTarget().html(""),this.editor.init(e.tableOptions.options.fields,t),this.editor.setValue(this.field||""),p()(this.editor.target).keydown((function(n){13==n.keyCode&&e.endEdit(t)})),p()(this.editor.target).change((function(n){e.endEdit(t)})),p()(this.editor.target).blur((function(n){e.endEdit(t)}))):(this.editor=s.Instance.createEditor("text"),t.getTarget().html(""),this.editor.init(t),(this.title||this.field)&&(this.tableOptions.options.isEnableEditField?this.editor.setValue((this.title||"")+"#"+(this.field||"")):this.editor.setValue(this.title||"")),p()(this.editor.target).keydown((function(n){13==n.keyCode&&e.endEdit(t)})),p()(this.editor.target).blur((function(n){e.endEdit(t)})),this.tableOptions.editingCell&&this.tableOptions.editingCell.id!=t.id&&this.tableOptions.editingCell.innerElement.endEdit(this.tableOptions.editingCell),this.tableOptions.editingCell=t)},t.prototype.endEdit=function(t){t.isEditing=0;var e=this.editor.getValue();if(e)if(this.tableOptions.options.isEnableEditField||this.tableOptions.options.fields){var n=e.split("#");t.title=this.title=n[0],n.length>0&&(t.columnId=t.field=this.field=n[1]),t.id&&t.target.attr("id",t.id),t.columnId&&t.target.attr("column-id",t.columnId),D.event.trigger("hiprintTemplateDataChanged_"+this.tableOptions.options.templateId,"\u8c03\u6574\u8868\u683c\u5217\u5b57\u6bb5")}else t.title=this.title=e;else this.tableOptions.options.isEnableEditField?(t.title=this.title="",t.field=this.field=""):t.title=this.title="";this.editor.destroy(),t.getTarget().html(this.title)},t}(),c=function(t){this.title=t.title,this.field=t.field,this.width=t.width,this.align=t.align,this.halign=t.halign,this.vAlign=t.vAlign,this.colspan=t.colspan,this.rowspan=t.rowspan,this.checked=t.checked,this.columnId=t.columnId,this.tableSummaryTitle=t.tableSummaryTitle,this.tableSummaryText=t.tableSummaryText,this.tableSummaryColspan=t.tableSummaryColspan,this.tableSummary=t.tableSummary,this.tableSummaryAlign=t.tableSummaryAlign,this.tableSummaryNumFormat=t.tableSummaryNumFormat,this.tableSummaryFormatter=t.tableSummaryFormatter,this.showCodeTitle=t.showCodeTitle,this.upperCase=t.upperCase,this.renderFormatter=t.renderFormatter&&t.renderFormatter.toString(),this.formatter2=t.formatter2&&t.formatter2.toString(),this.styler2=t.styler2&&t.styler2.toString(),this.stylerHeader=t.stylerHeader&&t.stylerHeader.toString(),this.tableColumnHeight=t.tableColumnHeight,this.tableTextType=t.tableTextType,this.tableBarcodeMode=t.tableBarcodeMode,this.tableQRCodeLevel=t.tableQRCodeLevel},f=function(){function t(){this.id=d.a.createId()}return t.prototype.init=function(t,e,n,i){this.isHead=i,this.rowId=n,this.isEditing=!1;var o=/^[0-9]*$/;this.target=t,this.tableOptions=e;var r=this.target.attr("colspan");this.colspan=o.test(r)?parseInt(r):1;var a=this.target.attr("rowspan");this.rowspan=o.test(a)?parseInt(a):1,this.initEvent(),this.isHead&&this.initInnerEelement()},t.prototype.beginEdit=function(){if(!this.isEditing&&this.tableOptions.isEnableEdit&&this.tableOptions.onBeforEdit(this)){var t=this.getValue();this.editor=s.Instance.createEditor("text"),this.isEditing=!0,this.tableOptions.editingCell=this,this.target.html(""),this.editor.init(this),this.editor.setValue(t)}},t.prototype.endEdit=function(){this.isEditing=!1;var t=this.editor.getValue();this.editor.destroy(),this.target.html(t)},t.prototype.getTarget=function(){return this.target},t.prototype.getValue=function(){return this.target.html()},t.prototype.setValue=function(t){},t.prototype.initInnerEelement=function(){this.innerElement=new h,this.innerElement.init(this,this.tableOptions)},t.prototype.initEvent=function(){},t.prototype.isXYinCell=function(t,e){var n=new l.b({x:t,y:e,height:0,width:0});return this.isOverlap(n)},t.prototype.getTableRect=function(){return new l.b({x:this.target.offset().left,y:this.target.offset().top,height:this.target[0].offsetHeight,width:this.target[0].offsetWidth})},t.prototype.isOverlap=function(t){var e=this.getTableRect();return t.x+t.width>e.x&&e.x+e.width>t.x&&t.y+t.height>e.y&&e.y+e.height>t.y},t.prototype.isInRect=function(t){var e=t.rect,n=this.getTableRect();if(n.x>=e.x&&n.x+n.width<=e.x+e.width&&n.y>=e.y&&n.y+n.height<=e.y+e.height){var i=u.a.mergeRect(e,n);return JSON.stringify(e)==JSON.stringify(i)||(t.changed=!0,t.rect=i,!0)}return!1},t.prototype.isSelected=function(){return this.target.hasClass("selected")},t.prototype.select=function(){this.target.addClass("selected")},t.prototype.isHeader=function(){return!1},t.prototype.setAlign=function(t){this.align=t,t?this.target.css("text-align",t):this.target[0].style.textAlign=""},t.prototype.setVAlign=function(t){this.vAlign=t,t?this.target.css("vertical-align",t):this.target[0].style.verticalAlign=""},t.prototype.getEntity=function(){return new c(this)},t}();n.d(e,"a",(function(){return v}));var g,m=(g=function(t,e){return(g=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),v=function(t){function e(e){var n=this;return e=e||{},(n=t.call(this)||this).width=e.width?parseFloat(e.width.toString()):100,n.title=e.title,n.descTitle=e.descTitle,n.field=e.field,n.fixed=e.fixed,n.rowspan=e.rowspan?parseInt(e.rowspan):1,n.colspan=e.colspan?parseInt(e.colspan):1,n.align=e.align,n.halign=e.halign,n.vAlign=e.vAlign,n.formatter=e.formatter,n.styler=e.styler,n.renderFormatter=e.renderFormatter,n.formatter2=e.formatter2,n.styler2=e.styler2,n.stylerHeader=e.stylerHeader,n.checkbox=e.checkbox,n.checked=0!=e.checked,n.columnId=e.columnId||e.field,n.tableColumnHeight=e.tableColumnHeight,n.tableTextType=e.tableTextType,n.tableBarcodeMode=e.tableBarcodeMode,n.tableQRCodeLevel=e.tableQRCodeLevel,n.tableSummaryTitle=e.tableSummaryTitle,n.tableSummaryText=e.tableSummaryText,n.tableSummaryColspan=e.tableSummaryColspan,n.tableSummary=e.tableSummary,n.tableSummaryAlign=e.tableSummaryAlign,n.tableSummaryNumFormat=e.tableSummaryNumFormat,n.tableSummaryFormatter=e.tableSummaryFormatter,n.showCodeTitle=e.showCodeTitle,n.upperCase=e.upperCase,n}return m(e,t),e.prototype.css=function(t){},e}(f)},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(t){this.printLine=t.printLine,this.target=t.target,this.referenceElement=t.referenceElement}},function(t,e,n){n.d(e,"a",(function(){return r}));var i=n(19),o=n(0),r=function(){function t(){}return t.createTableHead=function(e,n){for(var i=t.reconsitutionTableColumnTree(e),o=p()("<thead></thead>"),r=p()("<colgroup></colgroup>"),a=t.getColumnsWidth(i,n),s=function(e){var n=p()("<tr></tr>");r=p()("<colgroup></colgroup>"),i[e].filter((function(t){return t.checked})).forEach((function(e){var i=p()("<td></td>");e.id&&i.attr("id",e.id),e.columnId&&i.attr("column-id",e.columnId),(e.align||e.halign)&&i.css("text-align",e.halign||e.align),e.vAlign&&i.css("vertical-align",e.vAlign),e.colspan>1&&i.attr("colspan",e.colspan),e.rowspan>1&&i.attr("rowspan",e.rowspan),i.html(e.title),a[e.id]?(e.hasWidth=!0,e.targetWidth=a[e.id],i.attr("haswidth","haswidth"),i.css("width",a[e.id]+"pt")):e.hasWidth=!1;var o=t.getHeaderStyler(e);if(o){var s=o(e);s&&Object.keys(s).forEach((function(t){i.css(t,s[t])}))}n.append(i),r.append(`<col column-id="${e.columnId}" width="${e.width}pt"></col>`)})),o.append(n)},l=0;l<i.totalLayer;l++)s(l);return t.syncTargetWidthToOption(e),[o,r]},t.createTableFooter=function(e,n,i,r,a,s,l){var u=p()("<tfoot></tfoot>"),d=this.getFooterFormatter(i,r),h=this.tableSummaryTitle;let c="last"==i.tableFooterRepeat?n:s,f=i.columns.length-1;var g=this.rowColumns||i.columns[f].columns;if("no"!=i.tableFooterRepeat&&g.some((function(t){return t.tableSummary}))){var m=p()("<tr></tr>");g.filter((function(t){return t.checked})).forEach((function(e){var r=c.filter((function(t){return t&&t[e.field]})).map((function(t){return new RegExp("^-?(0|[1-9]\\d*)(\\.\\d+)?").test(t[e.field])?Number(t[e.field]):0})),s=e.tableSummaryText,p=e.tableSummaryNumFormat||2,l=`text-align: ${e.tableSummaryAlign||"center"}`,u=null==e.tableSummaryColspan?1:e.tableSummaryColspan,d=e.upperCase;let{toUpperCase:f,numFormat:g}=o.a;var v=t.getColumnTableSummaryFormatter(e),y=v?v(e,r,n,i):"";if(y)m.append(y);else switch(e.tableSummary){case"count":var b=h(e,s||"\u8ba1\u6570:",a),T=f(d,c.filter((t=>t)).length||0);m.append(`<td style="${l}" colspan="${u}">${b}${T}</td>`);break;case"sum":w=f(d,g(w=parseFloat(Number(r.reduce((function(t,e){return t+e}),0))),p));b=h(e,s||"\u5408\u8ba1:",a);m.append(`<td style="${l}" colspan="${u}">${b}${w}</td>`);break;case"avg":var w=parseFloat(Number(r.reduce((function(t,e){return t+e}),0))),E=parseFloat(Number(w/(r.length||1)));E=f(d,g(E,p));b=h(e,s||"\u5e73\u5747\u503c:",a);m.append(`<td style="${l}" colspan="${u}">${b}${E}</td>`);break;case"min":var x=Math.min(...r)||0;x==1/0&&(x=0),x=f(d,g(x,p));b=h(e,s||"\u6700\u5c0f\u503c:",a);m.append(`<td style="${l}" colspan="${u}">${b}${x||0}</td>`);break;case"max":var P=Math.max(...r);P==-1/0&&(P=0),P=f(d,g(P,p));b=h(e,s||"\u6700\u5927\u503c:",a);m.append(`<td style="${l}" colspan="${u}">${b}${P||0}</td>`);break;case"text":m.append(`<td style="${l}" colspan="${u}">${s||""}</td>`);break;default:u>=1&&m.append(`<td style="${l}" colspan="${u}">${s||""}</td>`)}})),u.append(m)}return d&&u.append(d(i,n,a,s,l)),u},t.tableSummaryTitle=function(t,e,n){return null==t.tableSummaryTitle||1==t.tableSummaryTitle?`${e}`:n?"":`<span style="color:firebrick">${e}</span>`},t.createTableRow=function(e,n,i,r,a){var s=this,l=t.reconsitutionTableColumnTree(e),u=p()("<tbody></tbody>"),d=s.getGroupFieldsFormatter(r,a),h=0,c=d?r.groupFields=d(a,r,n):a.groupFields?a.groupFields:[];return n=Array.isArray(n)?n:[],c.length?o.a.groupBy(n,c,(function(t){var e={};return c.forEach((function(n){return e[n]=t[n]})),e})).forEach((function(e){var o=s.getGroupFormatter(r,a);if(o){let t=o(l.colspan,n,i,e,r);p()(t).is("tr")?u.append(t):p()(t).is("td")?u.append(`<tr>${t}</tr>`):u.append(`<tr><td>${t}</td></tr>`)}var d=s.getGroupFooterFormatter(r,a),c=e;if(c.rows.forEach((function(e,n){let o=r.groupSequenceContinue?h:n;var s=t.createRowTarget(l,e,r,a,o,c.rows,i);u.append(s),h+=1})),d){let t=d(l.colspan,n,i,e,r);p()(t).is("tr")?u.append(t):p()(t).is("td")?u.append(`<tr>${t}</tr>`):u.append(`<tr><td>${t}</td></tr>`)}})):n.forEach((function(e,o){var s=t.createRowTarget(l,e,r,a,o,n,i);u.append(s)})),u},t.createRowTarget=function(e,n,i,o,r,a,s){var l=p()("<tr></tr>"),u=e.rowColumns.filter((function(t){return t.checked}));l.data("rowData",n),e.rowColumns.filter((function(t){return t.checked})).forEach((function(e,o){if(e.checked){if(i.rowsColumnsMerge)try{var d=new Function("data","col","colIndex","rowIndex","tableData","printData",`data = data || {}; ${i.rowsColumnsMerge}`)(n,e,o,r,a,s)||[1,1],h=p()(`<td style = 'display:${d[0]&&d[1]?"":"none"}' rowspan = '${d[0]}' colspan = '${d[1]}'></td>`)}catch(t){console.log(t)}else h=p()("<td></td>");if(n&&Object.keys(n).length>0&&("first"==i.tableHeaderRepeat||"none"==i.tableHeaderRepeat)){if(e.field&&h.attr("field",e.field),e.align&&h.css("text-align",e.align),e.vAlign&&h.css("vertical-align",e.vAlign),i.rowsColumnsMerge&&d[1]>1){var c=0;u.forEach(((t,e)=>{e>=o&&e<o+d[1]&&(c+=t.width)}))}h.css("width",(c||e.width)+"pt")}else e.field&&h.attr("field",e.field),e.align&&h.css("text-align",e.align),e.vAlign&&h.css("vertical-align",e.vAlign);var f=t.getColumnFormatter(e),g=f?f(n[e.field],n,o,i):n[e.field],m=t.getColumnRenderFormatter(e);if("fucntion"==typeof m)h.html(m(n[e.field],n,o,i,r));else if("text"==e.tableTextType||null==e.tableTextType)h.html(g);else{if("barcode"==e.tableTextType){h.html('<svg width="100%" display="block" height="100%" class="hibarcode_imgcode" preserveAspectRatio="none slice"></svg ><div class="hibarcode_displayValue"></div>');try{if(g){const t=e.tableColumnHeight||30,n=t/26.26;w(h.find(".hibarcode_imgcode")[0],g,{format:e.tableBarcodeMode||"CODE128",width:1,textMargin:-1,lineColor:"#000000",margin:0,height:t,_width:37.29*n,displayValue:!1}),h.find(".hibarcode_imgcode").attr("height",t+"pt"),h.find(".hibarcode_imgcode").css("margin","5pt 0pt"),h.find(".hibarcode_imgcode").attr("width","calc(100% - 20pt)")}else h.html("");e.showCodeTitle&&h.find(".hibarcode_displayValue").html(g)}catch(e){console.log(e),h.html("\u6b64\u683c\u5f0f\u4e0d\u652f\u6301\u8be5\u6587\u672c")}}if("image"==e.tableTextType&&(h.html(""),g)){var v=p()('<div><img style = "max-width:100%;max-height:100%"/></div>');v.find("img").attr("src",g),v.find("img").attr("height",e.tableColumnHeight||"50pt"),h.html(v)}if("qrcode"==e.tableTextType){h.html("");try{var y=p()('<div style="margin:5pt 0pt" class="hiqrcode_imgcode"></div>');if(g){var b=parseInt(e.width||e.targetWidth||20),T=parseInt(e.tableColumnHeight||20);new E(y[0],{width:b>T?T:b,height:b>T?T:b,colorDark:"#000000",useSVG:!0,correctLevel:e.tableQRCodeLevel||0,bcid:e.qrcodeType||"qrcode"}).makeCode(g),y.find("svg").css("height",(b>T?T:b)+"pt"),h.html(y),e.showCodeTitle&&(h.append('<div class="hiqrcode_displayValue"></div>'),h.find(".hiqrcode_displayValue").html(g))}}catch(e){console.log(e),h.html("\u4e8c\u7ef4\u7801\u751f\u6210\u5931\u8d25")}}"sequence"===e.tableTextType&&h.html(r+1)}var x=t.getColumnStyler(e);if("function"==typeof x)(b=x(n[e.field],n,o,i))&&Object.keys(b).forEach((function(t){h.css(t,b[t])}));l.append(h)}}));var d=t.getRowStyler(i,o);if(d){var h=d(n,i);h&&Object.keys(h).forEach((function(t){l.css(t,h[t])}))}return l},t.createEmptyRowTarget=function(e,n){var i=t.reconsitutionTableColumnTree(e),o=p()("<tr></tr>");return i.rowColumns.filter((function(t){return t.checked})).forEach((function(t,e){var n=p()("<td></td>");t.field&&n.attr("field",t.field),t.align&&n.css("text-align",t.align),t.vAlign&&n.css("vertical-align",t.vAlign),o.append(n)})),n&&n.options.tableBodyRowHeight&&o.find("td:not([rowspan])").css("height",n.options.tableBodyRowHeight+"pt"),o},t.getColumnsWidth=function(e,n){var i={},o=t.allAutoWidth(e),r=t.allFixedWidth(e);return e.rowColumns.filter((function(t){return t.checked})).forEach((function(t){if(t.fixed)i[t.id]=t.width;else{var e=n-r,a=t.width/o*(e>0?e:0);i[t.id]=a}})),i},t.resizeTableCellWidth=function(e,n,i){var o=t.reconsitutionTableColumnTree(n),r=t.getColumnsWidth(o,i);e.find("thead tr td[haswidth]").map((function(t,e){var n=p()(e).attr("id"),i=r[n];p()(e).css("width",i+"pt")}))},t.allAutoWidth=function(t){var e=0,n={};return t.rowColumns.filter((function(t){return t.checked})).forEach((function(t){n[t.id]?n[t.id]=0:n[t.id]=t.width,e+=t.fixed?0:n[t.id]})),e},t.allFixedWidth=function(t){var e=0,n={};return t.rowColumns.filter((function(t){return t.checked})).forEach((function(t){n[t.id]?n[t.id]=0:n[t.id]=t.width,e+=t.fixed?n[t.id]:0})),e},t.reconsitutionTableColumnTree=function(e,n,o){var r=n||new i.a;r.colspan=0;for(var a=function(t){r.totalLayer=t+1,r[t]=e[t].columns,0==t&&e[t].columns.forEach((function(e){0==t&&(r.colspan+=e.colspan)}))},s=0;s<e.length;s++)a(s);return r.rowColumns=t.getOrderdColumns(r),r},t.syncTargetWidthToOption=function(t){t.forEach((function(t){t.columns.forEach((function(t){t.hasWidth&&(t.width=t.targetWidth)}))}))},t.getGroupFieldsFormatter=function(t,e){var n=void 0;if(e.groupFields&&e.groupFields.length){var i="string"==typeof e.groupFields?e.groupFields:JSON.stringify(e.groupFields);t.groupFieldsFormatter="function(type,options,data){ return "+i+" }"}if(e.groupFieldsFormatter&&(n=e.groupFieldsFormatter),t.groupFieldsFormatter)try{n=new Function("type","options","data",`data = data || {}; ${t.groupFieldsFormatter}`)}catch(t){console.log(t)}return n},t.getGroupFormatter=function(t,e){var n=void 0;if(e.groupFormatter&&(n=e.groupFormatter),t.groupFormatter)try{n=new Function("colTotal","tableData","printData","groupData","options",`${t.groupFormatter}`)}catch(t){console.log(t)}return n},t.getGroupFooterFormatter=function(t,e){var n=void 0;if(e.groupFooterFormatter&&(n=e.groupFooterFormatter),t.groupFooterFormatter)try{n=new Function("colTotal","tableData","printData","groupData","options",`${t.groupFooterFormatter}`)}catch(t){console.log(t)}return n},t.getFooterFormatter=function(t,e){var n=void 0;if(e.footerFormatter&&(n=e.footerFormatter),t.footerFormatter)try{n=new Function("options","rows","data","pageData","pageIndex",`data = data || {}; ${t.footerFormatter}`)}catch(t){console.log(t)}return n},t.getRowStyler=function(t,e){var n=void 0;if(e.rowStyler&&(n=e.rowStyler),t.rowStyler)try{n=new Function("value","options",`${t.rowStyler}`)}catch(t){console.log(t)}return n},t.getColumnTableSummaryFormatter=function(t){var e=void 0;if(t.tableSummaryFormatter&&(e=t.tableSummaryFormatter),t.tableSummaryFormatter)try{e=new Function("column","data","tableData","options",`data = data || {}; ${t.tableSummaryFormatter}`)}catch(t){console.log(t)}return e},t.getColumnStyler=function(t){var e=void 0;if(t.styler&&(e=t.styler),t.styler2)try{e=new Function("value","row","index","options",`row = row || {}; ${t.styler2}`)}catch(t){console.log(t)}return e},t.getHeaderStyler=function(t){var e=void 0;if(t.stylerHeader&&(e=t.stylerHeader),t.stylerHeader)try{e=new Function("options",t.stylerHeader)}catch(t){console.log(t)}return e},t.getColumnRenderFormatter=function(t){var e=void 0;if(t.renderFormatter&&(e=t.renderFormatter),t.renderFormatter)try{e=new Function("value","row","colIndex","options","rowIndex",`row = row || {}; ${t.renderFormatter}`)}catch(t){console.log(t)}return e&&console.log("##",t.renderFormatter),e},t.getColumnFormatter=function(t){var e=void 0;if(t.formatter&&(e=t.formatter),t.formatter2)try{e=new Function("value","row","index","options",`row = row || {}; ${t.formatter2}`)}catch(t){console.log(t)}return e},t.getOrderdColumns=function(t){let e={};for(let n=0;n<t.totalLayer;n++)e[n]=[],t[n].forEach(((t,i)=>{e[n].push(...new Array(t.colspan).fill({...t,colspan:1}))}));for(let n=0;n<t.totalLayer;n++)e[n].forEach(((t,i)=>{for(let o=1;o<t.rowspan;o++)e[n+o].splice(i,0,{...t,rowspan:1})}));let n=[];for(let i=0;i<t.totalLayer;i++)i>=t.totalLayer-1?e[i].forEach(((t,e)=>{t.field||(t.field=n[e])})):e[i].forEach(((t,e)=>{0==i?n.push(t.field||""):t.field&&(n[e]=t.field)}));return this.rowColumns=e[t.totalLayer-1],e[t.totalLayer-1]},t}()},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(){function t(t){this.top=t.top,this.left=t.left,this.height=t.height,this.width=t.width,this.bottomInLastPaper=t.bottomInLastPaper,this.beginPrintPaperIndex=t.beginPrintPaperIndex,this.printTopInPaper=t.printTopInPaper,this.endPrintPaperIndex=t.endPrintPaperIndex}return t.prototype.isPositionLeftOrRight=function(t){return this.top<=t&&this.top+this.height>t},t}()},function(t,e,n){var i=function(){function t(){this.name="lineHeight"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("line-height",e+"pt"),"line-height:"+e+"pt";t[0].style.lineHeight=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u4f53\u884c\u9ad8</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="6">6pt</option><option value="6.75">6.75pt</option><option value="7.5">7.5pt</option><option value="8.25">8.25pt</option><option value="9">9pt</option><option value="9.75">9.75pt</option><option value="10.5">10.5pt</option><option value="11.25">11.25pt</option><option value="12">12pt</option><option value="12.75">12.75pt</option><option value="13.5">13pt</option><option value="14.25">14.25pt</option><option value="15">15pt</option><option value="15.75">15.75pt</option><option value="16.5">16.5pt</option><option value="17.25">17.25pt</option><option value="18">18pt</option><option value="18.75">18.75pt</option><option value="19.5">19.5pt</option><option value="20.25">20.25pt</option><option value="21">21pt</option><option value="21.75">21.75pt</option><option value="22.5">22.5pt</option><option value="23.25">23.25pt</option><option value="24">24pt</option><option value="24.75">24.75pt</option><option value="25.5">25.5pt</option><option value="26.25">26.25pt</option><option value="27">27pt</option><option value="27.75">27.75pt</option><option value="28.5">28.5pt</option><option value="29.25">29.25pt</option><option value="30">30pt</option><option value="30.75">30.75pt</option><option value="31.5">31.5pt</option><option value="32.25">32.25pt</option><option value="33">33pt</option><option value="33.75">33.75pt</option><option value="34.5">34.5pt</option><option value="35.25">35.25pt</option><option value="36">36pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),o=function(){function t(){this.name="fontFamily"}return t.prototype.createTarget=function(t){var e=void 0;if(t&&(e=t.getFontList()),e){var n='<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u4f53</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option>';e.forEach((function(t,e){n+=`<option value="${t.value||""}">${t.title||""}</option>`})),n+="</select></div></div>",this.target=p()(n)}else this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u4f53</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="SimSun">\u5b8b\u4f53</option><option value="Microsoft YaHei">\u5fae\u8f6f\u96c5\u9ed1</option></select></div></div>');return this.target},t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("font-family",e),"font-family:"+e;t[0].style.fontFamily="inherit"}return null},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),r=function(){function t(){this.name="fontSize"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("font-size",e+"pt"),"font-size:"+e+"pt";t[0].style.fontSize=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u4f53\u5927\u5c0f</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="6">6pt</option><option value="6.75">6.75pt</option><option value="7.5">7.5pt</option><option value="8.25">8.25pt</option><option value="9">9pt</option><option value="9.75">9.75pt</option><option value="10.5">10.5pt</option><option value="11.25">11.25pt</option><option value="12">12pt</option><option value="12.75">12.75pt</option><option value="13.5">13.5pt</option><option value="14.25">14.25pt</option><option value="15">15pt</option><option value="15.75">15.75pt</option><option value="16.5">16.5pt</option><option value="17.25">17.25pt</option><option value="18">18pt</option><option value="18.75">18.75pt</option><option value="19.5">19.5pt</option><option value="20.25">20.25pt</option><option value="21">21pt</option><option value="21.75">21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),a=function(){function t(){this.name="fontWeight"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("font-weight",e),"font-weight:"+e;t[0].style.fontWeight=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u4f53\u7c97\u7ec6</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="lighter">\u66f4\u7ec6</option><option value="bold">\u7c97\u4f53</option><option value="bolder">\u7c97\u4f53+</option><option value="100">100</option><option value="200">200</option><option value="300">300</option><option value="400">400</option><option value="500">500</option><option value="600">600</option><option value="700">700</option><option value="800">800</option><option value="900">900</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),s=function(){function t(){this.name="letterSpacing"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("letter-spacing",e+"pt"),"letter-spacing:"+e+"pt";t[0].style.letterSpacing=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u95f4\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="0.75">0.75pt</option><option value="1.5">1.5pt</option><option value="2.25">2.25pt</option><option value="3">3pt</option><option value="3.75">3.75pt</option><option value="4.5">4.5pt</option><option value="5.25">5.25pt</option><option value="6">6pt</option><option value="6.75">6.75pt</option><option value="7.5">7.5pt</option><option value="8.25">8.25pt</option><option value="9">9pt</option><option value="9.75">9.75pt</option><option value="10.5">10.5pt</option><option value="11.25">11.25pt</option><option value="12">12pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),l=function(){function t(){this.name="textAlign"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("text-align",e),"justify"==e?(t.css("text-align-last","justify"),t.css("text-justify","distribute-all-lines")):(t[0].style.textAlignLast="",t[0].style.textJustify=""),"text-align:"+e;t[0].style.textAlign="",t[0].style.textAlignLast="",t[0].style.textJustify=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5de6\u53f3\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="left">\u5c45\u5de6</option><option value="center">\u5c45\u4e2d</option><option value="right">\u5c45\u53f3</option><option value="justify">\u4e24\u7aef\u5bf9\u9f50</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),u=function(){function t(){this.name="hideTitle"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6807\u9898\u663e\u793a\u9690\u85cf</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="false">\u663e\u793a</option><option value="true">\u9690\u85cf</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),d=function(){function t(){this.name="tableBorder"}return t.prototype.css=function(t,e){if(t.find("table").length){if("border"==e||null==e)return t.find("table").css("border","1px solid"),"border:1px solid";"noBorder"==e?t.find("table").css("border","0px solid"):t.find("table")[0].style.border=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u683c\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="border">\u6709\u8fb9\u6846</option><option value="noBorder">\u65e0\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),h=function(){function t(){this.name="tableHeaderBorder"}return t.prototype.css=function(t,e){if(t.find("thead tr").length){if("border"==e||null==e)return t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-all");"noBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-none"):"leftBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-left"):"rightBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-right"):"leftRightBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-lr"):"topBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-top"):"bottomBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-bottom"):"topBottomBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-tb"):t.find("thead tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="border">\u6709\u8fb9\u6846</option><option value="noBorder">\u65e0\u8fb9\u6846</option><option value="leftBorder">\u5de6\u8fb9\u6846</option><option value="rightBorder">\u53f3\u8fb9\u6846</option><option value="leftRightBorder">\u5de6\u53f3\u8fb9\u6846</option><option value="topBorder">\u4e0a\u8fb9\u6846</option><option value="bottomBorder">\u4e0b\u8fb9\u6846</option><option value="topBottomBorder">\u4e0a\u4e0b\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),c=function(){function t(){this.name="tableHeaderCellBorder"}return t.prototype.css=function(t,e){if(t.find("thead tr").length){if("border"==e||null==e)return t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-td-all");"noBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-td-none"):t.find("thead tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u5355\u5143\u683c\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="border" >\u6709\u8fb9\u6846</option><option value="noBorder" >\u65e0\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),f=function(){function t(){this.name="tableFooterBorder"}return t.prototype.css=function(t,e){if(t.find("tfoot tr").length){if("border"==e||null==e)return t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-all");"noBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-none"):"leftBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-left"):"rightBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-right"):"leftRightBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-lr"):"topBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-top"):"bottomBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-bottom"):"topBottomBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-tb"):t.find("tfoot tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5c3e\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="border" >\u6709\u8fb9\u6846</option><option value="noBorder" >\u65e0\u8fb9\u6846</option><option value="leftBorder" >\u5de6\u8fb9\u6846</option><option value="rightBorder" >\u53f3\u8fb9\u6846</option><option value="leftRightBorder" >\u5de6\u53f3\u8fb9\u6846</option><option value="topBorder" >\u4e0a\u8fb9\u6846</option><option value="bottomBorder" >\u4e0b\u8fb9\u6846</option><option value="topBottomBorder" >\u4e0a\u4e0b\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),g=function(){function t(){this.name="tableFooterCellBorder"}return t.prototype.css=function(t,e){if(t.find("tfoot tr").length){if("border"==e||null==e)return t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-td-all");"noBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-td-none"):t.find("tfoot tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5c3e\u5355\u5143\u683c\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="border" >\u6709\u8fb9\u6846</option><option value="noBorder" >\u65e0\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),v=function(){function t(){this.name="tableHeaderRowHeight"}return t.prototype.css=function(t,e){if(t.find("thead tr td").length){if(e)return t.find("thead tr td:not([rowspan])").css("height",e+"pt"),"height:"+e+"pt";t.find("thead tr td").map((function(t,e){e.style.height=""}))}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u884c\u9ad8</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option><option value="22.5" >22.5pt</option><option value="23.25" >23.25pt</option><option value="24" >24pt</option><option value="24.75" >24.75pt</option><option value="25.5" >25.5pt</option><option value="26.25" >26.25pt</option><option value="27" >27pt</option><option value="27.75" >27.75pt</option><option value="28.5" >28.5pt</option><option value="29.25" >29.25pt</option><option value="30" >30pt</option><option value="30.75" >30.75pt</option><option value="31.5" >31.5pt</option><option value="32.25" >32.25pt</option><option value="33" >33pt</option><option value="33.75" >33.75pt</option><option value="34.5" >34.5pt</option><option value="35.25" >35.25pt</option><option value="36" >36pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),y=function(){function t(){this.name="tableHeaderFontSize"}return t.prototype.css=function(t,e){if(t.find("thead").length){if(e)return t.find("thead").css("font-size",e+"pt"),"font-size:"+e+"pt";t.find("thead").map((function(t,e){e.style.fontSize=""}))}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u5b57\u4f53\u5927\u5c0f</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),b=function(){function t(){this.name="tableHeaderFontWeight"}return t.prototype.css=function(t,e){if(t.find("thead").length){if(e)return t.find("thead tr td").css("font-weight",e),"font-weight:"+e;t.find("thead tr td").map((function(t,e){e.style.fontWeight=""}))}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u5b57\u4f53\u7c97\u7ec6</div><div class="hiprint-option-item-field"><select class="auto-submit"> <option value="" >\u9ed8\u8ba4</option><option value="lighter" >\u66f4\u7ec6</option><option value="bold" >\u7c97\u4f53</option><option value="bolder" >\u7c97\u4f53+</option><option value="100" >100</option><option value="200" >200</option><option value="300" >300</option><option value="400" >400</option><option value="500" >500</option><option value="600" >600</option><option value="700" >700</option><option value="800" >800</option><option value="900" >900</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),T=function(){function t(){this.name="tableBodyCellBorder"}return t.prototype.css=function(t,e){if(t.find("tbody tr").length){if("border"==e||null==e)return t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-td-all");"noBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-td-none"):t.find("tbody tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u4f53\u5355\u5143\u683c\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="border" >\u6709\u8fb9\u6846</option><option value="noBorder" >\u65e0\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),w=function(){function t(){this.name="tableBodyRowHeight"}return t.prototype.css=function(t,e){if(t.find("tbody tr td").length){if(e)return t.find("tbody tr td").css("height",e+"pt"),"height:"+e+"pt";t.find("tbody tr td").map((function(t,e){e.style.height=""}))}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u4f53\u884c\u9ad8</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option><option value="22.5" >22.5pt</option><option value="23.25" >23.25pt</option><option value="24" >24pt</option><option value="24.75" >24.75pt</option><option value="25.5" >25.5pt</option><option value="26.25" >26.25pt</option><option value="27" >27pt</option><option value="27.75" >27.75pt</option><option value="28.5" >28.5pt</option><option value="29.25" >29.25pt</option><option value="30" >30pt</option><option value="30.75" >30.75pt</option><option value="31.5" >31.5pt</option><option value="32.25" >32.25pt</option><option value="33" >33pt</option><option value="33.75" >33.75pt</option><option value="34.5" >34.5pt</option><option value="35.25" >35.25pt</option><option value="36" >36pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),E=function(){function t(){this.name="tableHeaderBackground"}return t.prototype.css=function(t,e){if(t.find("thead").length){if(e)return t.find("thead").css("background",e),"background:"+e;t.find("thead").map((function(t,e){e.style.background=""}))}return null},t.prototype.createTarget=function(){this.target=I("\u8868\u5934\u80cc\u666f",'<div style="display:flex"><input type="color" style="width:20pt;padding:2pt 1pt;border-right: none;"/><input type="text" class="auto-submit"/></div>',"");var t=this.target.find("input");return t.on("change",(function(){t.val(this.value)})),this.target},t.prototype.getValue=function(){var t=this.target.find(".auto-submit").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),x=function(){function t(){this.name="borderWidth"}return t.prototype.createTarget=function(t){var e=["hline","vline","rect","oval"].includes(t.printElementType.type)?"\u7ebf\u5bbd":"\u8fb9\u6846\u5927\u5c0f";return this.target=p()(`<div class="hiprint-option-item"><div class="hiprint-option-item-label">${e}</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option></select></div></div>`),this.target},t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-width",e+"pt"),"border-width:"+e+"pt";t[0].style.borderWidth=""}return null},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),P=function(){function t(){this.name="barcodeMode"}return t.prototype.createTarget=function(){const t=m.BARCODE_TYPES;return this.target=I("\u6761\u5f62\u7801\u683c\u5f0f",'<select class="auto-submit"></select>',""),this.target.find("select").append(t.reduce(((t,e)=>t+=`<option value="${e.value}" >${e.label}</option>`),"")),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),C=function(){function t(){this.name="barTextMode"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6761\u7801\u6587\u672c\u6a21\u5f0f</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="text">\u5355\u72ec\u6587\u672c</option><option value="svg">svg\u6587\u672c</option></select></div></div>'),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),S=function(){function t(){this.name="barWidth"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6761\u7801\u5bbd\u5ea6</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option></select></div></div>'),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),O=function(){function t(){this.name="barAutoWidth"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6761\u7801\u81ea\u52a8\u589e\u5bbd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="true">\u81ea\u52a8</option><option value="false">\u4e0d\u81ea\u52a8</option></select></div></div>'),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),F=function(){function t(){this.name="barcodeType"}return t.prototype.createTarget=function(){const t=m.BARCODE_TYPES;return this.target=I("\u6761\u5f62\u7801\u683c\u5f0f",'<select class="auto-submit"></select>',""),this.target.find("select").append(t.reduce(((t,e)=>t+=`<option value="${e.value}" >${e.label}</option>`),"")),this.target},t.prototype.getValue=function(){return this.target.find("select").val().toLowerCase()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),R=function(){function t(){this.name="qrcodeType"}return t.prototype.createTarget=function(){var t=m.QRCODE_TYPES;this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e8c\u7ef4\u7801\u7c7b\u578b</div><div class="hiprint-option-item-field"><select class="auto-submit"></select></div></div>');var e=this.target.find("select.auto-submit");return t.forEach((t=>{e.append(`<option value="${t.value}">${t.label}</option>`)})),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),H=function(){function t(){this.name="qrCodeLevel"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e8c\u7ef4\u7801\u5bb9\u9519\u7387</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="1" >7% L</option><option value="0" >15% M</option><option value="3" >25% Q</option><option value="2" >30% H</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();return parseInt(t||0)},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),L=function(){function t(){this.name="color"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("color",e),"color:"+e;t[0].style.color=""}return null},t.prototype.createTarget=function(){this.target=I("\u5b57\u4f53\u989c\u8272",'<div style="display:flex"><input type="color" style="width:20pt;padding:2pt 1pt;border-right: none;"/><input type="text" class="auto-submit"/></div>',"");var t=this.target.find("input");return t.on("change",(function(){t.val(this.value)})),this.target},t.prototype.getValue=function(){var t=this.target.find(".auto-submit").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),k=function(){function t(){this.name="textDecoration"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6587\u672c\u4fee\u9970</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="underline" >\u4e0b\u5212\u7ebf</option><option value="overline" >\u4e0a\u5212\u7ebf</option><option value="line-through" >\u7a7f\u68ad\u7ebf</option></select></div></div>'),this.target},t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("text-decoration",e),"text-decoration:"+e;t[0].style.textDecoration=""}return null},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),M=function(){function t(){this.name="field"}return t.prototype.createTarget=function(t){var e=void 0;if(t&&(e=t.getFields()),e){this.isSelect=!0;var n='<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5b57\u6bb5\u540d</div><div class="hiprint-option-item-field"><select class="auto-submit"> <option value="" >\u8bf7\u9009\u62e9\u5b57\u6bb5</option>';e.forEach((function(t,e){n+=' <option value="'+(t.field||"")+'" >'+(t.text||"")+"</option>"})),n+=" </select></div></div>",this.target=p()(n)}else this.isSelect=!1,this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5b57\u6bb5\u540d</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u8bf7\u8f93\u5165\u5b57\u6bb5\u540d" class="auto-submit"></div></div>');return this.target},t.prototype.getValue=function(){return(this.isSelect?this.target.find("select").val():this.target.find("input").val())||void 0},t.prototype.setValue=function(t){this.isSelect?t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>"),this.target.find("select").val(t)):this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),_=function(){function t(){this.name="title"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u6807\u9898</div><div class="hiprint-option-item-field"><textarea style="height:50px;" placeholder="\u8bf7\u8f93\u5165\u6807\u9898" class="auto-submit"></textarea></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),B=function(){function t(){this.name="testData"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u6d4b\u8bd5\u6570\u636e</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u4ec5\u5b57\u6bb5\u540d\u79f0\u5b58\u5728\u65f6\u6709\u6548" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),N=function(){function t(){this.name="coordinate"}return t.prototype.createTarget=function(t,e){var n=this;return n.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u4f4d\u7f6e\u5750\u6807</div><div class="hiprint-option-item-field" style="display: flex;align-items: baseline;"><input type="number" style="width:48%" placeholder="X\u4f4d\u7f6e(\u5de6)" class="auto-submit" /><input type="number" style="width:48%" placeholder="Y\u4f4d\u7f6e(\u4e0a)" class="auto-submit" /></div></div>'),n.syncLock=e.coordinateSync||!1,n.createSyncLock(n.syncLock),n.target},t.prototype.createSyncLock=function(t){var e=this;return e.lockTarget=e.syncLock?p()('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u540c\u6b65">\ud83d\udd17</label>'):p()('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u4e0d\u540c\u6b65">\ud83d\udd13</label>'),e.lockTarget.click((function(){e.syncLock?e.lockTarget.text("\ud83d\udd13").attr("title","\u4e0d\u540c\u6b65"):e.lockTarget.text("\ud83d\udd17").attr("title","\u540c\u6b65"),e.syncLock=!e.syncLock})),e.target.find("input:first").after(e.lockTarget),e.target.find("input:first").change((function(){e.syncLock&&e.target.find("input:last").val(p()(this).val())})),e.target.find("input:last").change((function(){e.syncLock&&e.target.find("input:first").val(p()(this).val())})),e.lockTarget},t.prototype.css=function(t){if(t&&t.length&&this.target&&("block"==t.find(".resize-panel").css("display")||t[0].className.includes("table"))&&this.el==t){var e=this.getValue();return t.css("left",e.left+"pt").css("top",e.top+"pt")}return null},t.prototype.getValue=function(){var t={coordinateSync:this.syncLock,left:0,top:0};return t.left=parseFloat(this.target.find("input:first").val()||0),t.top=parseFloat(this.target.find("input:last").val()||0),t},t.prototype.setValue=function(t,e){this.el=e.designTarget||e,this.target.find("input:first").val(t.left),this.target.find("input:last").val(t.top)},t.prototype.destroy=function(){this.target.remove()},t}(),V=function(){function t(){this.name="widthHeight"}return t.prototype.createTarget=function(t,e){var n=this;return n.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5bbd\u9ad8\u5927\u5c0f</div><div class="hiprint-option-item-field" style="display: flex;align-items: baseline;"><input type="number" style="width:48%" placeholder="\u5bbd" class="auto-submit" /><input type="number" style="width:48%" placeholder="\u9ad8" class="auto-submit" /></div></div>'),n.syncLock=e.widthHeightSync||!1,n.createSyncLock(n.syncLock),n.target},t.prototype.createSyncLock=function(t){var e=this;return e.lockTarget=e.syncLock?p()('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u540c\u6b65">\ud83d\udd17</label>'):p()('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u4e0d\u540c\u6b65">\ud83d\udd13</label>'),e.lockTarget.click((function(){e.syncLock?e.lockTarget.text("\ud83d\udd13").attr("title","\u4e0d\u540c\u6b65"):e.lockTarget.text("\ud83d\udd17").attr("title","\u540c\u6b65"),e.syncLock=!e.syncLock})),e.target.find("input:first").after(e.lockTarget),e.target.find("input:first").change((function(){e.syncLock&&e.target.find("input:last").val(p()(this).val())})),e.target.find("input:last").change((function(){e.syncLock&&e.target.find("input:first").val(p()(this).val())})),e.lockTarget},t.prototype.css=function(t){if(t&&t.length&&this.target&&("block"==t.find(".resize-panel").css("display")||t[0].className.includes("table"))&&this.el==t){var e=this.getValue();return t.css("width",e.width+"pt").css("height",e.height+"pt")}return null},t.prototype.getValue=function(){var t={widthHeightSync:this.syncLock,width:0,height:0};return t.width=parseFloat(this.target.find("input:first").val()||0),t.height=parseFloat(this.target.find("input:last").val()||0),t},t.prototype.setValue=function(t,e){this.el=e.designTarget||e,this.target.find("input:first").val(t.width),this.target.find("input:last").val(t.height)},t.prototype.destroy=function(){this.target.remove()},t}(),A=function(){function t(){this.name="src"}return t.prototype.createTarget=function(t){this.el=t;var e=void 0,n=this;return this.target=I('\u56fe\u7247\u5730\u5740<div style="color:#888;font-size:12px">\u5efa\u8bae\u4e0a\u4f20\u5c0f\u4e8e8KB\u7684\u56fe\u7247</div>','<input type="text" placeholder="\u8bf7\u8f93\u5165\u56fe\u7247\u5730\u5740" class="auto-submit" style="width: calc(100% - 42pt); padding: 0; vertical-align: top;"><button class="hiprint-option-item-settingBtn" style="margin: 0 0 0 4pt; width: 38pt; padding: 0;" type="button">\u9009\u62e9</button>'),t&&(e=t.getOnImageChooseClick()),e&&this.target.find("button").click((function(){e&&e(n)})),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.refresh=function(t,e,n){var i=this;if(this.setValue(t),this.target.find("input").change(),this.el&&e){var o=new Image;o.src=t,o.complete?i.updateEl(o.width,o.height,e,n):o.onload=function(){i.updateEl(o.width,o.height,e,n)}}},t.prototype.updateEl=function(t,e,n,i){var o,r,a;n&&(n&&n.auto&&(t>=e?n.width=!0:n.height=!0),n.width?(o=e/t,r=this.el.options.width,a=Math.floor(r*o*10)/10,this.el.options.height=a,this.el.designTarget.css("height",a+"pt")):n.height?(o=t/e,a=this.el.options.height,r=Math.floor(a*o*10)/10,this.el.options.width=r,this.el.designTarget.css("width",r+"pt")):n.real&&(r=D.px.toPt(t),a=D.px.toPt(e),this.el.options.width=r,this.el.options.height=a,this.el.designTarget.css("width",r+"pt"),this.el.designTarget.css("height",a+"pt")),this.el.designTarget.children(".resize-panel").trigger(p().Event("click")));i&&i(this.el,t,e)},t.prototype.destroy=function(){this.target.remove()},t}(),z=function(){function t(){this.name="fit"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.find("img").css("object-fit",e),"object-fit:"+e;t.find("img")[0].style["object-fit"]=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u56fe\u7247\u7f29\u653e</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="contain" >\u7b49\u6bd4</option><option value="cover" >\u526a\u88c1</option><option value="fill" >\u586b\u5145</option><option value="none" >\u539f\u59cb\u5c3a\u5bf8</option> </select></div></div>'),this.target,this.target},t.prototype.getValue=function(){return this.target.find("select").val()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),j=function(){function t(){this.name="borderColor"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-color",e),"border-color:"+e;t[0].style.borderColor=""}return null},t.prototype.createTarget=function(t){var e=["hline","vline","rect","oval"].includes(t.printElementType.type)?"\u989c\u8272":"\u8fb9\u6846\u989c\u8272";this.target=I(e,'<div style="display:flex"><input type="color" style="width:20pt;padding:2pt 1pt;border-right: none;"/><input type="text" class="auto-submit"/></div>',"");var n=this.target.find("input");return n.on("change",(function(){n.val(this.value)})),this.target},t.prototype.getValue=function(){var t=this.target.find(".auto-submit").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),W=function(){function t(){this.name="watermarkOptions"}return t.prototype.createTarget=function(){this.target=I("\u6c34\u5370\u529f\u80fd","","group"),this.content=I("\u6c34\u5370\u5185\u5bb9:",'<input type="text" placeholder="\u6c34\u5370\u5185\u5bb9" class="auto-submit" />',"flex"),this.fillStyle=I("\u5b57\u4f53\u989c\u8272:",'<input type="text" placeholder="\u5b57\u4f53\u989c\u8272" class="auto-submit" />',"flex"),this.fontSize=I("\u5b57\u4f53\u5927\u5c0f:",'<input type="range" min="10" max="80" placeholder="\u5b57\u4f53\u5927\u5c0f" class="auto-submit">',"flex"),this.rotate=I("\u65cb\u8f6c\u89d2\u5ea6:",'<input type="range" min="0" max="180" placeholder="\u65cb\u8f6c\u89d2\u5ea6" class="auto-submit">',"flex"),this.width=I("\u6c34\u5e73\u5bc6\u5ea6:",'<input type="range" min="100" max="800" placeholder="\u6c34\u5e73\u5bc6\u5ea6" class="auto-submit">',"flex"),this.height=I("\u5782\u76f4\u5bc6\u5ea6:",'<input type="range" min="100" max="800" placeholder="\u5782\u76f4\u5bc6\u5ea6" class="auto-submit">',"flex"),this.timestamp=I("\u6c34\u5370\u65f6\u95f4:",'<input type="checkbox" style="height:18px;width:18px;" placeholder="\u6c34\u5370\u65f6\u95f4" class="auto-submit">',"flex");let t='<option value="" >\u9ed8\u8ba4(YYYY-MM-DD HH:mm)</option>';return["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm","YYYY-MM-DD HH","YYYY-MM-DD","YYYY-MMMM","YYYY-MM","YYYY"].forEach((function(e){t+='<option value="'+e+'">'+e+"</option>"})),this.format=I("\u65f6\u95f4\u683c\u5f0f:",'<select class="auto-submit"></select>',"flex"),this.format.find(".auto-submit").append(p()(t)),this.target.append(this.content),this.target.append(this.fillStyle),this.target.append(this.fontSize),this.target.append(this.rotate),this.target.append(this.width),this.target.append(this.height),this.target.append(this.timestamp),this.target.append(this.format),this.target},t.prototype.getValue=function(){let t={content:this.content.find("input").val(),fillStyle:this.fillStyle.find("input").val()||"rgba(184, 184, 184, 0.3)",fontSize:parseInt(this.fontSize.find("input").val()||"14")+"px",rotate:parseInt(this.rotate.find("input").val()||"25"),width:parseInt(this.width.find("input").val()||"200"),height:parseInt(this.height.find("input").val()||"200"),timestamp:this.timestamp.find("input").is(":checked"),format:""==this.format.find("select").val()?"YYYY-MM-DD HH:mm":this.format.find("select").val()};return Object.assign({},this.options,t)},t.prototype.setValue=function(t){this.options=t,this.content.find("input").val(t.content||""),this.fillStyle.find("input").val(t.fillStyle||"rgba(184, 184, 184, 0.3)");const e=parseInt(t.fontSize||"14");this.fontSize.find("input").val(e),this.rotate.find("input").val(t.rotate||25),this.width.find("input").val(t.width||200),this.height.find("input").val(t.height||200),this.timestamp.find("input").attr("checked",null!=t.timestamp&&t.timestamp),this.format.find("select").val(t.format||"YYYY-MM-DD HH:mm")},t.prototype.destroy=function(){this.target.remove()},t}(),Y=function(){function t(){this.name="paperNumberFormat"}return t.prototype.createTarget=function(){return this.target=I("\u9875\u7801\u683c\u5f0f",'<input type="text" placeholder="${page}-${total}" class="auto-submit" />'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),G=function(){function t(){this.name="paperNumberDisabled"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u663e\u793a\u9875\u7801</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u663e\u793a</option><option value="true" >\u9690\u85cf</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),$=function(){function t(){this.name="paperNumberContinue"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u9875\u7801\u7eed\u6392</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="true" >\u7eed\u6392</option><option value="reset" >\u91cd\u6392</option></select></div></div>'),this.target},t.prototype.getValue=function(){return"true"==this.target.find("select").val()},t.prototype.setValue=function(t){this.target.find("select").val((null==t||t?"true":"reset").toString())},t.prototype.destroy=function(){this.target.remove()},t}(),q=function(){function t(){this.name="longTextIndent"}return t.prototype.css=function(t,e){return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6bcf\u884c\u7f29\u8fdb</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option><option value="22.5" >22.5pt</option><option value="23.25" >23.25pt</option><option value="24" >24pt</option><option value="24.75" >24.75pt</option><option value="25.5" >25.5pt</option><option value="26.25" >26.25pt</option><option value="27" >27pt</option><option value="27.75" >27.75pt</option><option value="28.5" >28.5pt</option><option value="29.25" >29.25pt</option><option value="30" >30pt</option><option value="30.75" >30.75pt</option><option value="31.5" >31.5pt</option><option value="32.25" >32.25pt</option><option value="33" >33pt</option><option value="33.75" >33.75pt</option><option value="34.5" >34.5pt</option><option value="35.25" >35.25pt</option><option value="36" >36pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),X=function(){function t(){this.name="showInPage"}return t.prototype.css=function(t,e){if(t&&t.length){if(e&&"none"==e)return t.addClass("alwaysHide");t.removeClass("alwaysHide")}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u663e\u793a\u89c4\u5219</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="none" >\u59cb\u7ec8\u9690\u85cf</option><option value="first" >\u9996\u9875</option><option value="odd" >\u5947\u6570\u9875</option><option value="even" >\u5076\u6570\u9875</option><option value="last" >\u5c3e\u9875</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),U=function(){function t(){this.name="pageBreak"}return t.prototype.css=function(t,e){if(t&&t.length){if(e&&"none"==e)return t.addClass("alwaysHide");t.removeClass("alwaysHide")}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5f3a\u5236\u5206\u9875</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u662f</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),K=function(){function t(){this.name="paperList"}return t.prototype.createTarget=function(){this.target=I("\u7eb8\u5f20\u4fe1\u606f","","group"),this.paperType=I("\u7eb8\u5f20\u7c7b\u578b:",'<select placeholder="\u7eb8\u5f20\u7c7b\u578b" class="auto-submit" /></select>',"flex"),this.width=I("\u5bbd:",'<input placeholder="\u5bbd" class="auto-submit" />',"flex"),this.height=I("\u9ad8:",'<input placeholder="\u9ad8" class="auto-submit" />',"flex"),this.target.append(this.paperType),this.target.append(this.height),this.target.append(this.width),this.target.find(".auto-submit").append(Object.keys(D.paperList).reduce(((t,e)=>t+=`<option value="${e}" >${e}</option>`),'<option value="">\u81ea\u5b9a\u4e49</option>'));var t=this.paperType.find(".auto-submit"),e=this.height.find(".auto-submit"),n=this.width.find(".auto-submit");function i(){t.val("")}return t.on("change",(function(){if(p()(this).val()){var t=D.paperList[p()(this).val()];e.val(t.height),n.val(t.width)}})),n.on("change",i),e.on("change",i),this.target},t.prototype.getValue=function(){let t={paperType:this.paperType.find(".auto-submit").val()||"",height:this.height.find(".auto-submit").val()||"",width:this.width.find(".auto-submit").val()||""};return Object.assign({},this.options,t)},t.prototype.setValue=function(t){this.options=t;try{this.paperType.find(".auto-submit").val(t.paperType||""),this.height.find(".auto-submit").val(t.height||""),this.width.find(".auto-submit").val(t.width||"")}catch(t){}},t.prototype.destroy=function(){this.target.remove()},t}(),J=function(){function t(){this.name="panelPaperRule"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6253\u5370\u89c4\u5219</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="odd" >\u4fdd\u6301\u5947\u6570</option><option value="even" >\u4fdd\u6301\u5076\u6570</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Q=function(){function t(){this.name="panelPageRule"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5206\u9875\u89c4\u5219</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="none" >\u4e0d\u5206\u9875</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Z=function(){function t(){this.name="leftSpaceRemoved"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u79fb\u9664\u6bb5\u843d\u5de6\u4fa7\u7a7a\u767d</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u79fb\u9664</option><option value="false" >\u4e0d\u79fb\u9664</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("false"==this.target.find("select").val())return!1},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),tt=function(){function t(){this.name="firstPaperFooter"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u9996\u9875\u9875\u5c3e</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u9996\u9875\u9875\u5c3e" class="auto-submit"></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),et=function(){function t(){this.name="lastPaperFooter"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5c3e\u9875\u9875\u5c3e</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u5c3e\u9875\u9875\u5c3e" class="auto-submit"></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),nt=function(){function t(){this.name="evenPaperFooter"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5076\u6570\u9875\u9875\u5c3e</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u5076\u6570\u9875\u9875\u5c3e" class="auto-submit"></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),it=function(){function t(){this.name="oddPaperFooter"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5947\u6570\u9875\u9875\u5c3e</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u5947\u6570\u9875\u9875\u5c3e" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ot=function(){function t(){this.name="fixed"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4f4d\u7f6e\u56fa\u5b9a</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="false" >\u5426</option><option value="true" >\u662f</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),rt=function(){function t(){this.name="axis"}return t.prototype.createTarget=function(){return this.target=I("\u62d6\u52a8\u65b9\u5411",'<select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="h" >\u6a2a\u5411</option><option value="v" >\u7ad6\u5411</option></select>',"row"),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),at=function(){function t(){this.name="leftOffset"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5de6\u504f\u79fb</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u504f\u79fb\u91cfpt" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),st=function(){function t(){this.name="lHeight"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u6700\u4f4e\u9ad8\u5ea6</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u6587\u672c\u8fc7\u77ed\u6216\u4e3a\u7a7a\u65f6\u7684\u9ad8\u5ea6" class="auto-submit"></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),pt=function(){function t(){this.name="unShowInPage"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u9690\u85cf\u89c4\u5219</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="first" >\u9996\u9875</option><option value="last" >\u5c3e\u9875</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),lt=function(){function t(){this.name="tableBodyRowBorder"}return t.prototype.css=function(t,e){if(t.find("tbody tr").length){if("border"==e||null==e)return t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-all");"noBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-none"):"leftBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-left"):"rightBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-right"):"leftRightBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-lr"):"topBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-top"):"bottomBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-bottom"):"topBottomBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-tb"):t.find("tbody tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u4f53\u884c\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="border" >\u6709\u8fb9\u6846</option><option value="noBorder" >\u65e0\u8fb9\u6846</option><option value="leftBorder" >\u5de6\u8fb9\u6846</option><option value="rightBorder" >\u53f3\u8fb9\u6846</option><option value="leftRightBorder" >\u5de6\u53f3\u8fb9\u6846</option><option value="topBorder" >\u4e0a\u8fb9\u6846</option><option value="bottomBorder" >\u4e0b\u8fb9\u6846</option><option value="topBottomBorder" >\u4e0a\u4e0b\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ut=function(){function t(){this.name="transform"}return t.prototype.css=function(t,e){if(t&&t.length){var n=t.find(".hiprint-printElement-content").parent(".hiprint-printElement");if(n.length||(n=t),e)return n.css("transform","rotate("+e+"deg)"),n.css("-ms-transform","rotate("+e+"deg)"),n.css("-moz-transform","rotate("+e+"deg)"),n.css("-webkit-transform","rotate("+e+"deg)"),n.css("-o-transform","rotate("+e+"deg)"),"transform:rotate("+e+"deg)";n.length&&(n[0].style.transform="")}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u65cb\u8f6c\u89d2\u5ea6</div><div class="hiprint-option-item-field"><input type="number" class="auto-submit"/></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),dt=function(){function t(){this.name="zIndex"}return t.prototype.css=function(t,e){return t&&t.length&&e?t.css("z-index",e):null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5143\u7d20\u5c42\u7ea7</div><div class="hiprint-option-item-field"><input type="number" class="auto-submit"/></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseInt(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ht=function(){function t(){this.name="borderRadius"}return t.prototype.css=function(t,e){return t&&t.length&&e?t.css("border-raduis",e):null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8fb9\u6846\u5706\u89d2</div><div class="hiprint-option-item-field"><input type="text" class="auto-submit"/></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ct=function(){function t(){this.name="optionsGroup"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u8fb9\u6846\u8bbe\u7f6e</div></div>'),this.target},t.prototype.getValue=function(){},t.prototype.setValue=function(t){},t.prototype.destroy=function(){this.target.remove()},t}(),ft=function(){function t(){this.name="borderTop"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-top-style",e),"border-top:1px";t[0].style.borderTopStyle="",t[0].style.borderTopWidth=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e0a\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u5426</option><option value="solid" >\u5b9e\u7ebf</option><option value="dotted" >\u865a\u7ebf</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),gt=function(){function t(){this.name="borderLeft"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-left-style",e),"border-left:1px";t[0].style.borderLeftStyle="",t[0].style.borderLeftWidth=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5de6\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u5426</option><option value="solid" >\u5b9e\u7ebf</option><option value="dotted" >\u865a\u7ebf</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),mt=function(){function t(){this.name="borderRight"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-right-style",e),"border-right:1px";t[0].style.borderRightStyle="",t[0].style.borderRightWidth=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u53f3\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u5426</option><option value="solid" >\u5b9e\u7ebf</option><option value="dotted" >\u865a\u7ebf</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),vt=function(){function t(){this.name="borderBottom"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-bottom-style",e),"border-bottom-style:1px solid";t[0].style.borderBottomStyle="",t[0].style.borderBottomWidth=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e0b\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u5426</option><option value="solid" >\u5b9e\u7ebf</option><option value="dotted" >\u865a\u7ebf</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),yt=function(){function t(){this.name="contentPaddingLeft"}return t.prototype.css=function(t,e){var n=t.find(".hiprint-printElement-content");if(n&&n.length){if(e)return n.css("padding-left",e+"pt"),"padding-left";n[0].style.paddingLeft=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5de6\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),bt=function(){function t(){this.name="contentPaddingTop"}return t.prototype.css=function(t,e){var n=t.find(".hiprint-printElement-content");if(n&&n.length){if(e)return n.css("padding-top",e+"pt"),"padding-top";n[0].style.paddingTop=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e0a\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Tt=function(){function t(){this.name="contentPaddingRight"}return t.prototype.css=function(t,e){var n=t.find(".hiprint-printElement-content");if(n&&n.length){if(e)return n.css("padding-right",e+"pt"),"padding-right";n[0].style.paddingRight=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u53f3\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),wt=function(){function t(){this.name="contentPaddingBottom"}return t.prototype.css=function(t,e){var n=t.find(".hiprint-printElement-content");if(n&&n.length){if(e)return n.css("padding-bottom",e+"pt"),"padding-bottom";n[0].style.paddingBottom=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e0b\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Et=function(){function t(){this.name="borderStyle"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-style",e),"border-style:1px";t[0].style.borderStyle=""}return null},t.prototype.createTarget=function(t){var e=["hline","vline","rect","oval"].includes(t.printElementType.type)?"\u6837\u5f0f":"\u8fb9\u6846\u6837\u5f0f";return this.target=p()(`<div class="hiprint-option-item"><div class="hiprint-option-item-label">${e}</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="solid" >\u5b9e\u7ebf</option><option value="dashed" >\u957f\u865a\u7ebf</option><option value="dotted" >\u77ed\u865a\u7ebf</option></select></div></div>`),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),xt=function(){function t(){this.name="backgroundColor"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("background-color",e),"background-color:"+e;t[0].style.backgroundColor=""}return null},t.prototype.createTarget=function(){this.target=I("\u80cc\u666f\u989c\u8272",'<div style="display:flex"><input type="color" style="width:20pt;padding:2pt 1pt;border-right: none;"/><input type="text" class="auto-submit"/></div>',"");var t=this.target.find("input");return t.on("change",(function(){t.val(this.value)})),this.target},t.prototype.getValue=function(){var t=this.target.find(".auto-submit").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Pt=function(){function t(){this.name="barColor"}return t.prototype.css=function(t,e){return t&&t.length,null},t.prototype.createTarget=function(){this.target=I("\u6761\u7801\u989c\u8272",'<div style="display:flex"><input type="color" style="width:20pt;padding:2pt 1pt;border-right: none;"/><input type="text" class="auto-submit"/></div>',"");var t=this.target.find("input");return t.on("change",(function(){t.val(this.value)})),this.target},t.prototype.getValue=function(){var t=this.target.find(".auto-submit").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Ct=function(){function t(){this.name="orient"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u7eb8\u5f20\u65b9\u5411<div style=\'color:#888;font-size:12px\'>\u4ec5\u81ea\u5b9a\u4e49\u7eb8\u8d28\u6709\u6548</div></div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="1" >\u7eb5\u5411</option><option value="2" >\u6a2a\u5411</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),St=function(){function t(){this.name="textContentVerticalAlign"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e0a\u4e0b\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="middle" >\u5782\u76f4\u5c45\u4e2d</option><option value="bottom" >\u5e95\u90e8</option></select></div></div>'),this.target},t.prototype.css=function(t,e){return t&&t.length&&(t.removeClass("hiprint-text-content-middle"),t.removeClass("hiprint-text-content-bottom"),e)?("middle"===e&&t.addClass("hiprint-text-content-middle"),"bottom"===e&&t.addClass("hiprint-text-content-bottom"),""):null},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Ot=function(){function t(){this.name="textContentWrap"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6587\u672c\u6362\u884c</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="nowrap" >\u4e0d\u6362\u884c</option><option value="clip" >\u4e0d\u6362\u884c&\u9690\u85cf</option><option value="ellipsis" >\u4e0d\u6362\u884c&\u7701\u7565</option></select></div></div>'),this.target},t.prototype.css=function(t,e){return t&&t.length&&(t.removeClass("hiprint-text-content-wrap"),t.find(".hiprint-printElement-text-content").removeClass("hiprint-text-content-wrap-nowrap"),t.find(".hiprint-printElement-text-content").removeClass("hiprint-text-content-wrap-clip"),t.find(".hiprint-printElement-text-content").removeClass("hiprint-text-content-wrap-ellipsis"),e)?(t.addClass("hiprint-text-content-wrap"),t.find(".hiprint-printElement-text-content").addClass("hiprint-text-content-wrap-"+e),""):null},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),It=n(5),Ft=function(){function t(){this.name="columns"}return t.prototype.createTarget=function(){return p()('<div class="indicator"></div>').appendTo("body"),this.target=p()(' <div class="hiprint-option-item hiprint-option-item-row"><div><ul class="hiprint-option-table-selected-columns"> </ul></div></div>'),this.target},t.prototype.getValue=function(){return this.buildData()},t.prototype.setValue=function(t,e,n){var i=this,o=this;this.value=t,this.options=e,this.printElementType=n;var r=n.columns[0].filter((function(e){return 0==t[0].columns.filter((function(t){return e.columnId==t.columnId})).length})).map((function(t){var e=new It.a(t);return e.checked=!1,e}));this.allColumns=t[0].columns.concat(r),t&&1==t.length&&(this.target.find("ul").html(this.allColumns.map((function(t,e){return'<li class="hiprint-option-table-selected-item"> <div class="hi-pretty p-default"> '+(t.checked?'<input type="checkbox" checked column-id="'+(t.id||t.columnId)+'" />':'<input type="checkbox" column-id="'+(t.id||t.columnId)+'" />')+' <div class="state"><label></label> </div></div><span class="column-title">'+(t.title||t.descTitle||"")+"</span></li>"})).join("")),this.target.find("input").change((function(t){var e=t.target.checked,n=t.target.attributes["column-id"].nodeValue||"",o=i.allColumns.findIndex((function(t){return t.field==n||t.id==n}));o>=0&&(i.allColumns[o].checked=e),i.submit()})),this.printElementType.columnDisplayIndexEditable&&this.target.find("li").hidraggable({revert:!0,handle:".column-title",moveUnit:"pt",deltaX:0,deltaY:0}).hidroppable({onDragOver:function(t,e){p()(this).css("border-top-color","red")},onDragLeave:function(t,e){p()(this).css("border-top-color","")},onDrop:function(t,e){p()(e).insertBefore(this),p()(this).css("border-top-color",""),o.submit()}}))},t.prototype.buildData=function(){var t=this,e=[];return t.options.columns.length>1||(t.printElementType.makeColumnObj(t.allColumns),this.target.find("input").map((function(n,i){var o=p()(i).attr("column-id"),r=t.printElementType.getColumnByColumnId(o);if(r){var a=new It.a(r);a.checked=r.checked,e.push(a)}})),this.value[0].columns=e),this.value},t.prototype.destroy=function(){this.target.remove()},t}(),Rt=function(){function t(){this.name="textType"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6253\u5370\u7c7b\u578b</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="" >\u6587\u672c</option><option value="barcode" >\u6761\u5f62\u7801</option><option value="qrcode" >\u4e8c\u7ef4\u7801</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Dt=function(){function t(){this.name="tableTextType"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u6bb5\u7c7b\u578b</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4(\u6587\u672c)</option><option value="text" >\u6587\u672c</option><option value="sequence" >\u5e8f\u53f7</option><option value="barcode" >\u6761\u5f62\u7801</option><option value="qrcode" >\u4e8c\u7ef4\u7801</option><option value="image" >\u56fe\u7247</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Ht=function(){function t(){this.name="tableBarcodeMode"}return t.prototype.createTarget=function(){const t=m.BARCODE_TYPES;return this.target=I("\u6761\u5f62\u7801\u683c\u5f0f",'<select class="auto-submit"></select>',""),this.target.find("select").append(t.reduce(((t,e)=>t+=`<option value="${e.value}" >${e.label}</option>`),"")),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Lt=function(){function t(){this.name="tableQRCodeLevel"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e8c\u7ef4\u7801\u5bb9\u9519\u7387</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="1" >7% L</option><option value="0" >15% M</option><option value="3" >25% Q</option><option value="2" >30% H</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();return parseInt(t||0)},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),kt=function(){function t(){this.name="tableColumnHeight"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item "><div class="hiprint-option-item-label">\u5355\u5143\u683c\u9ad8\u5ea6</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u6761\u5f62\u7801\u3001\u4e8c\u7ef4\u7801\u4ee5\u53ca\u56fe\u7247\u6709\u6548" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Mt=function(){function t(){this.name="tableSummaryTitle"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u6807\u9898</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="true">\u663e\u793a</option><option value="false">\u9690\u85cf</option></select></div></div>'),this.target},t.prototype.getValue=function(){return!("false"==this.target.find("select").val())},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),_t=function(){function t(){this.name="tableSummaryText"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u6587\u672c</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u805a\u5408\u7c7b\u578b:" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Bt=function(){function t(){this.name="tableSummaryColspan"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u5408\u5e76\u5217\u6570</div><div class="hiprint-option-item-field"><input type="number" min="0" step="1" placeholder="\u5408\u5e76\u5217\u6570" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Nt=function(){function t(){this.name="tableSummaryAlign"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u5de6\u53f3\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="left">\u5c45\u5de6</option><option value="center" >\u5c45\u4e2d</option><option value="right" >\u5c45\u53f3</option><option value="justify" >\u4e24\u7aef\u5bf9\u9f50</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Vt=function(){function t(){this.name="tableSummaryNumFormat"}return t.prototype.createTarget=function(){var t=[{t:"\u6574\u6570",v:"0"}];[1,2,3,4,5,6].forEach((function(e){t.push({t:`\u4fdd\u7559${e}\u4f4d`,v:""+e})}));var e='<option value="" >\u9ed8\u8ba4</option>';return t.forEach((function(t){e+='<option value="'+(t.v||"")+'">'+(t.t||"")+"</option>"})),this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u5c0f\u6570</div><div class="hiprint-option-item-field"><select class="auto-submit"></select></div></div>'),this.target.find(".auto-submit").append(p()(e)),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),At=function(){function t(){this.name="showCodeTitle"}return t.prototype.createTarget=function(){return this.target=p()(' <div class="hiprint-option-item" title="\u6761\u5f62\u7801\u5e95\u90e8\u662f\u5426\u663e\u793a\u5185\u5bb9"><div class="hiprint-option-item-label">\u663e\u793a\u7801\u503c</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u663e\u793a</option><option value="false" >\u9690\u85cf</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),zt=function(){function t(){this.name="tableSummaryFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u5e95\u90e8\u805a\u5408\u683c\u5f0f\u5316\u51fd\u6570",'<code>function(column,data,tableData,options){</code><textarea placeholder=\'return "<td></td>"\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),jt=function(){function t(){this.name="upperCase"}return t.prototype.createTarget=function(){var t='<option value="">\u9ed8\u8ba4</option>';return[].forEach((e=>{t+=`<option value="${e.v}">${e.t}</option>`})),this.target=I("\u683c\u5f0f\u8f6c\u6362",'<select class="auto-submit" /></select>'),this.target.find(".auto-submit").append(p()(t)),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Wt=function(){function t(){this.name="tableSummary"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u7c7b\u578b</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u4e0d\u805a\u5408</option><option value="count">\u8ba1\u6570</option><option value="sum">\u5408\u8ba1</option><option value="avg">\u5e73\u5747\u503c</option><option value="min">\u6700\u5c0f\u503c</option><option value="max">\u6700\u5927\u503c</option><option value="text">\u4ec5\u6587\u672c</option></select></div></div>'),this.target},t.prototype.getValue=function(){return this.target.find("select").val()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Yt=function(){function t(){this.name="topOffset"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u9876\u90e8\u504f\u79fb</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u504f\u79fb\u91cfpt" class="auto-submit"></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Gt=function(){function t(){this.name="panelLayoutOptions"}return t.prototype.createTarget=function(){return this.target=I("\u9762\u677f\u6392\u5217","","group"),this.layoutType=I("\u6392\u5217\u65b9\u5f0f",' <select class="auto-submit"> <option value="column">\u7eb5\u5411</option> <option value="row">\u6a2a\u5411</option> </select>'),this.layoutRowGap=I("\u5782\u76f4\u95f4\u8ddd",'<input type="text" placeholder="\u5782\u76f4\u95f4\u8dddmm" class="auto-submit" />',""),this.layoutColumnGap=I("\u6c34\u5e73\u95f4\u8ddd",'<input type="text" placeholder="\u6c34\u5e73\u95f4\u8dddmm" class="auto-submit" />',""),this.target.append(this.layoutType),this.target.append(this.layoutRowGap),this.target.append(this.layoutColumnGap),this.target},t.prototype.getValue=function(){let t={layoutType:this.layoutType.find("select").val()||"column",layoutRowGap:parseInt(this.layoutRowGap.find("input").val()||0),layoutColumnGap:parseInt(this.layoutColumnGap.find("input").val()||0)};return Object.assign({},this.options,t)},t.prototype.setValue=function(t){this.options=t,this.layoutType.find("select").val(t.layoutType||"column"),this.layoutRowGap.find("input").val(t.layoutRowGap),this.layoutColumnGap.find("input").val(t.layoutColumnGap)},t.prototype.destroy=function(){this.target.remove()},t}(),$t=function(){function t(){this.name="gridColumns"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e00\u884c\u591a\u7ec4</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="2" >\u4e00\u884c\u4e8c\u5217</option><option value="3" >\u4e00\u884c\u4e09\u5217</option><option value="4" >\u4e00\u884c\u56db\u5217</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),qt=function(){function t(){this.name="gridColumnsGutter"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e00\u884c\u591a\u7ec4\u95f4\u9694</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.25" >7.25pt</option><option value="8.5" >8.5pt</option><option value="9" >9pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.find(".table-grid-row").css("margin-left","-"+e+"pt").css("margin-right","-"+e+"pt"),t.find(".tableGridColumnsGutterRow").css("padding-left",e+"pt").css("padding-right",e+"pt"),null;t.find(".table-grid-row").map((function(t,e){e.style.marginLeft="",e.style.marginRight=""})),t.find(".tableGridColumnsGutterRow").map((function(t,e){e.style.paddingLeft="",e.style.paddingRight=""}))}return null},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Xt=function(){function t(){this.name="tableHeaderRepeat"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u683c\u5934\u663e\u793a</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="page" >\u6bcf\u9875\u663e\u793a</option><option value="first" >\u9996\u9875\u663e\u793a</option><option value="none" >\u4e0d\u663e\u793a</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Ut=function(){function t(){this.name="paddingLeft"}return t.prototype.css=function(t,e){var n=t;if(n&&n.length){if(e)return n.css("padding-left",e+"pt"),"padding-left";n[0].style.paddingLeft=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5de6\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Kt=function(){function t(){this.name="paddingRight"}return t.prototype.css=function(t,e){var n=t;if(n&&n.length){if(e)return n.css("padding-right",e+"pt"),"padding-right";n[0].style.paddingRight=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u53f3\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Jt=function(){function t(){this.name="dataType"}return t.prototype.createTarget=function(){var t=this;return this.target=p()('<div class="hiprint-option-item-row"><div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6570\u636e\u7c7b\u578b</div><div class="hiprint-option-item-field"><select class="hiprint-option-item-datatype"><option value="" >\u9ed8\u8ba4</option><option value="datetime" >\u65e5\u671f\u65f6\u95f4</option><option value="boolean" >\u5e03\u5c14</option><option value="format">\u9ad8\u7ea7</option></select></div></div><div class="hiprint-option-item "><div class="hiprint-option-item-label ">\u683c\u5f0f</div><div class="hiprint-option-item-field"><select class="auto-submit hiprint-option-item-datatype-select-format"><option value="" >\u9ed8\u8ba4</option></select><textarea class="auto-submit hiprint-option-item-datatype-input-format"></textarea></div></div></div>'),p()(this.target.find(".hiprint-option-item-datatype")).change((function(){var e=p()(t.target.find(".hiprint-option-item-datatype")).val();t.loadFormatSelectByDataType(e),t.submit(t.getValue())})),this.target},t.prototype.getValue=function(){var t=this.target.find(".hiprint-option-item-datatype").val();return t?{dataType:t,format:this.target.find(".hiprint-option-item-datatype-format").val()||void 0}:{dataType:void 0,format:void 0}},t.prototype.setValue=function(t,e){this.target.find(".hiprint-option-item-datatype").val(e.dataType||""),this.loadFormatSelectByDataType(e.dataType),this.target.find(".hiprint-option-item-datatype-format").val(e.format||"")},t.prototype.destroy=function(){this.target.remove()},t.prototype.loadFormatSelectByDataType=function(t){var e="hiprint-option-item-datatype-format";"boolean"===t||"format"===t?(this.target.find("."+e).removeClass(e),this.target.find(".hiprint-option-item-datatype-input-format").addClass(e).val("").show().siblings().hide()):"datetime"===t?(this.target.find("."+e).removeClass(e),this.target.find(".hiprint-option-item-datatype-select-format").html('<option value="">\u9ed8\u8ba4</option> <option value="MM-dd">MM-dd</option><option value="yyyy-MM-dd">yyyy-MM-dd</option><option value="yyyy-MM-dd HH:mm">yyyy-MM-dd HH:mm</option><option value="yyyy-MM-dd HH:mm:ss">yyyy-MM-dd HH:mm:ss</option>').addClass(e).val("").show().siblings().hide()):this.target.find(".hiprint-option-item-datatype-select-format").html('<option value="" >\u9ed8\u8ba4</option>').show().siblings().hide()},t}(),Qt=function(){function t(){this.name="formatter"}return t.prototype.createTarget=function(){return this.target=I("\u683c\u5f0f\u5316\u51fd\u6570",'<code>function(title,value,options,data){</code><textarea placeholder="return value" class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),Zt=function(){function t(){this.name="styler"}return t.prototype.createTarget=function(){return this.target=I("\u6837\u5f0f\u51fd\u6570",'<code>function(title,value,target,data){</code><textarea placeholder="return {}" class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),te=function(){function t(){this.name="rowsColumnsMerge"}return t.prototype.createTarget=function(){return this.target=I("\u884c\u6837\u5f0f\u51fd\u6570",'<code>function(data, col, colIndex, rowIndex, tableData, printData){</code><textarea placeholder="return [1,1]" class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),ee=function(){function t(){this.name="rowsColumnsMergeClean"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u8de8\u9875\u5408\u5e76\u662f\u5426\u6e05\u9664</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u662f</option><option value="false" >\u5426</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),ne=function(){function t(){this.name="footerFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u8868\u683c\u811a\u51fd\u6570",'<code>function(options,rows,data,pageData,pageIndex){</code><textarea placeholder=\'return "<tr></tr>"\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),ie=function(){function t(){this.name="groupSequenceContinue"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5206\u7ec4\u5e8f\u53f7\u7eed\u7f16</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u662f</option><option value="false" >\u5426</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),oe=function(){function t(){this.name="groupFieldsFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u5206\u7ec4\u5b57\u6bb5\u51fd\u6570",'<code>function(type,options,data){</code><textarea placeholder="return []" class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),re=function(){function t(){this.name="groupFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u5206\u7ec4\u5934\u683c\u5f0f\u5316\u51fd\u6570",'<code>function(colTotal,tableData,printData,groupData,options){</code><textarea placeholder=\'return "<div>\u5206\u7ec4\u5934\u4fe1\u606f</div>"\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),ae=function(){function t(){this.name="groupFooterFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u5206\u7ec4\u811a\u683c\u5f0f\u5316\u51fd\u6570",'<code>function(colTotal,tableData,printData,groupData,options){</code><textarea placeholder=\'return "<div>\u5206\u7ec4\u811a\u4fe1\u606f</div>"\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),se=function(){function t(){this.name="gridColumnsFooterFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u591a\u7ec4\u8868\u683c\u811a\u51fd\u6570",'<code>function(options,rows,data,pageData){</code><textarea placeholder=\'return ""\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),pe=function(){function t(){this.name="rowStyler"}return t.prototype.createTarget=function(){return this.target=I("\u884c\u6837\u5f0f\u51fd\u6570",'<code>function(value,options){</code><textarea placeholder="return {}" class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),le=function(){function t(){this.name="align"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5355\u5143\u683c\u5de6\u53f3\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="left" >\u5c45\u5de6</option><option value="center" >\u5c45\u4e2d</option><option value="right" >\u5c45\u53f3</option><option value="justify" >\u4e24\u7aef\u5bf9\u9f50</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ue=function(){function t(){this.name="vAlign"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5355\u5143\u683c\u4e0a\u4e0b\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="top" >\u4e0a</option><option value="middle" >\u4e2d</option><option value="bottom" >\u4e0b</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),de=function(){function t(){this.name="halign"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u5355\u5143\u683c\u5de6\u53f3\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="left" >\u5c45\u5de6</option><option value="center" >\u5c45\u4e2d</option><option value="right" >\u5c45\u53f3</option><option value="justify" >\u4e24\u7aef\u5bf9\u9f50</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),he=function(){function t(){this.name="styler2"}return t.prototype.createTarget=function(){return this.target=I("\u5355\u5143\u683c\u6837\u5f0f\u51fd\u6570","<code>function(value,row,index,options){</code><textarea placeholder='return {}' class=\"auto-submit\"></textarea><code>}</code>"),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),ce=function(){function t(){this.name="stylerHeader"}return t.prototype.createTarget=function(){return this.target=I("\u8868\u683c\u5934\u6837\u5f0f\u51fd\u6570","<code>function(options){</code><textarea placeholder='return {}' class=\"auto-submit\"></textarea><code>}</code>"),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),fe=function(){function t(){this.name="formatter2"}return t.prototype.createTarget=function(){return this.target=I("\u5355\u5143\u683c\u683c\u5f0f\u5316\u51fd\u6570","<code>function(value,row,index,options){</code><textarea placeholder='return value' class=\"auto-submit\"></textarea><code>}</code>"),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),ge=function(){function t(){this.name="renderFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u5355\u5143\u683c\u6e32\u67d3\u51fd\u6570",'<code>function(value,row,colIndex,options,rowIndex){</code><textarea placeholder=\'return "<td></td>"\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),me=function(){function t(){this.name="autoCompletion"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u81ea\u52a8\u8865\u5168</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u662f</option><option value="false" >\u5426</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),ve=function(){function t(){this.name="maxRows"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6bcf\u9875\u6700\u5927\u884c\u6570</div><div class="hiprint-option-item-field"><input type="number" value="1" step="1" min="1" class="auto-submit"/></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseInt(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ye=function(){function t(){this.name="tableFooterRepeat"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u683c\u811a\u663e\u793a</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="no" >\u4e0d\u663e\u793a</option><option value="page" >\u6bcf\u9875\u663e\u793a</option><option value="last" >\u6700\u540e\u663e\u793a</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}();n.d(e,"a",(function(){return be}));var be=function(){function t(){}return t.init=function(){t.printElementOptionItems||(t.printElementOptionItems={},t._printElementOptionItems.forEach((function(e){t.printElementOptionItems[e.name]=e})))},t.registerItem=function(e){if(!e.name)throw new Error("styleItem must have name");t.init(),t.printElementOptionItems[e.name]=e},t.getItem=function(e){return t.init(),t.printElementOptionItems[e]},t._printElementOptionItems=[new o,new r,new a,new s,new i,new l,new u,new Rt,new d,new h,new c,new v,new y,new b,new T,new f,new g,new w,new E,new x,new P,new H,new L,new k,new M,new _,new B,new N,new V,new A,new z,new j,new Y,new G,new $,new W,new q,new X,new U,new K,new J,new Q,new Z,new tt,new et,new nt,new it,new ot,new rt,new Yt,new at,new st,new pt,new lt,new ut,new ht,new dt,new ct,new ft,new gt,new mt,new vt,new bt,new yt,new Tt,new wt,new Et,new xt,new Ct,new St,new Ot,new Ft,new $t,new Gt,new qt,new Xt,new Ut,new Kt,new Jt,new Qt,new Zt,new ne,new te,new ee,new ie,new oe,new re,new ae,new se,new pe,new le,new de,new ue,new he,new ce,new ge,new fe,new me,new ve,new ye,new kt,new Ht,new Lt,new Dt,new Mt,new _t,new Bt,new Wt,new Nt,new Vt,new zt,new At,new jt,new F,new R,new Pt,new C,new S,new O],t}()},function(t,e,n){n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return r}));var i=n(14),o=function(){function t(t,e){this.selectedCells=[],this.rows=t,this.tableTatget=e}return t.prototype.clear=function(){this.tableTatget.find("td").removeClass("selected")},t.prototype.setSingleSelect=function(t){this.startCell=t,this.selectedCells=[]},t.prototype.getSingleSelect=function(){if(this.selectedCells.length){if(1==this.selectedCells.length)return 1==this.selectedCells[0].length?this.selectedCells[0][0]:void 0;if(this.selectedCells.length>1)return}return this.startCell},t.prototype.singleSelectByXY=function(t,e){var n=this.getCellByXY(t,e);n&&(this.clear(),n&&(n.cell.select(),this.startCell=n,this.selectedCells=[]))},t.prototype.multipleSelectByXY=function(t,e){this.clear();var n=[];if(this.startCell){var o=this.getCellByXY(t,e);if(o){var r=i.a.mergeRect(this.startCell.cell.getTableRect(),o.cell.getTableRect());this.selectByRect(new a(r),n)}}this.selectedCells=n},t.prototype.selectByRect=function(t,e){this.rows.forEach((function(n,i){var o=[];n.columns.forEach((function(e){e.isInRect(t)&&(o.push(new s(i,e)),e.select())})),o.length&&e.push(o)})),t.changed&&(t.changed=!1,e.splice(0,e.length),this.selectByRect(t,e))},t.prototype.getSelectedCells=function(){return this.selectedCells},t.prototype.getCellByXY=function(t,e){var n;return this.rows.forEach((function(i,o){var r=(i.columns||[]).filter((function(t){return t.checked})).filter((function(n){return n.isXYinCell(t,e)}));r.length&&(n=new s(o,r[0]))})),n},t}(),r=function(t){this.x=t.x,this.y=t.y,this.height=t.height,this.width=t.width},a=function(t){this.rect=t},s=function(t,e){this.rowIndex=t,this.cell=e}},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(){function t(){}return t.createId=function(){return this.id+=1,this.id},t.id=1,t}()},function(t,e,n){n.d(e,"a",(function(){return s}));var i,o=n(5),r=n(13),a=(i=function(t,e){return(i=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e){var n=t.call(this)||this;return n.columns=[],e&&e.constructor===Array?(e||[]).forEach((function(t){n.columns.push(new o.a(t))})):e.columns&&(e.columns||[]).forEach((function(t){n.columns.push(new o.a(t))})),n}return a(e,t),e.prototype.getPrintElementOptionEntity=function(){var t=[],e=this.allColumns?this.allColumns.filter((function(t){return!t.checked})):[];return[...this.columns,...e].forEach((function(e){t.push(e.getEntity())})),t},e}(r.a)},function(t,e,n){n.d(e,"a",(function(){return r}));var i=n(11),o=n(5),r=function(){function t(){this.id=i.a.createId()}return t.prototype.init=function(t,e,n){this.isHead=n,this.target=e||p()("<tr></tr>"),this.tableOptions=t,this.allColumns=this.columns||[],this.initCells((this.columns||[]).filter((function(t){return t.checked})))},t.prototype.getTarget=function(){return this.target},t.prototype.initCells=function(t){var e=this;t?(this.columns=t,t.forEach((function(t,n){t.init(e.target.find("td:eq("+n+")"),e.tableOptions,e.id,e.isHead)}))):(this.columns=[],this.target.find("td").map((function(t,n){var i=new o.a;i.init(p()(n),e.tableOptions,e.id,e.isHead),e.columns.push(i)})))},t.prototype.removeCell=function(t){var e=this.columns.indexOf(t);this.columns[e].getTarget().remove(),this.columns.splice(e,1)},t.prototype.createTableCell=function(t,e){var n=new o.a;return n.init(p()("<td></td>"),this.tableOptions,this.id,this.isHead),t>1&&(n.getTarget().attr("rowspan",t),n.rowspan=t),e>1&&(n.getTarget().attr("colspan",e),n.colspan=e),n},t.prototype.insertToTargetCellLeft=function(t,e){var n=this.columns.indexOf(t);t.getTarget().before(e.getTarget()),this.columns.splice(n,0,e)},t.prototype.insertToTargetCellRight=function(t,e){var n=this.columns.indexOf(t);this.columns[n].getTarget().after(e.getTarget()),this.columns.splice(n+1,0,e)},t.prototype.insertCellToFirst=function(t){this.target.prepend(t.getTarget()),this.columns.splice(0,0,t)},t.prototype.insertCellToLast=function(t){this.columns.push(t),this.target.append(t.getTarget())},t.prototype.getPrintElementOptionEntity=function(){var t=[];return[...this.columns,...this.allColumns.filter((function(t){return!t.checked}))].forEach((function(e){t.push(e.getEntity())})),t},t}()},function(t,e,n){n.d(e,"a",(function(){return o}));var i=n(10),o=function(){function t(){}return t.mergeRect=function(t,e){var n=Math.min(t.x,e.x),o=Math.min(t.y,e.y);return new i.b({x:n,y:o,height:Math.max(t.y+t.height,e.y+e.height)-o,width:Math.max(t.x+t.width,e.x+e.width)-n})},t.Rect=function(t,e,n,i){return{minX:t<n?t:n,minY:e<i?e:i,maxX:t<n?n:t,maxY:e<i?i:e}},t}()},function(t,e,n){n.d(e,"a",(function(){return m}));var i,o=n(4),r=n(1),a=n(6),s=n(0),l=n(8),u=n(18),d=n(7),h=n(16),c=n(20),f=n(2),g=(i=function(t,e){return(i=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),m=function(t){function e(e,n){var i=t.call(this,e)||this;return i.gridColumnsFooterCss="hiprint-gridColumnsFooter",i.tableGridRowCss="table-grid-row",i.options=new u.a(n,i.printElementType),i.options.setDefault(new u.a(r.a.instance.table.default).getPrintElementOptionEntity()),i}return g(e,t),e.prototype.getColumns=function(){return this.options.columns},e.prototype.getColumnByColumnId=function(t){return this.options.getColumnByColumnId(t)},e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.designTarget.find(".hiprint-printElement-table-content"),e=this.getHtml(this.designPaper);t.html(""),t.append(e[0].target.find(".table-grid-row")),this.printElementType.editable&&this.setHitable(),this.setColumnsOptions(),this.css(this.designTarget,this.getData())}},e.prototype.css=function(e,n){if((this.getField()||!this.options.content)&&!this.printElementType.formatter)return t.prototype.css.call(this,e,n)},e.prototype.getDesignTarget=function(t){return this.designTarget=this.getHtml(t)[0].target,this.css(this.designTarget,this.getData()),this.designPaper=t,this.designTarget.find("td").hidroppable({accept:".rn-draggable-item",onDrop:function(t,e){},onDragEnter:function(t,e){p()(e).removeClass("rn-draggable-item")},onDragLeave:function(t,e){p()(e).addClass("rn-draggable-item")}}),this.designTarget},e.prototype.getConfigOptions=function(){return r.a.instance.table},e.prototype.createTarget=function(t,e,n){for(var i=p()('<div class="hiprint-printElement hiprint-printElement-table" style="position: absolute;"><div class="hiprint-printElement-table-handle"></div><div class="hiprint-printElement-table-content" style="height:100%;width:100%"></span></div>'),o=this.createGridColumnsStructure(n),r=0;r<o.gridColumns;r++)o.getByIndex(r).append(this.getTableHtml(e,n));return i.find(".hiprint-printElement-table-content").append(o.target),i},e.prototype.createGridColumnsStructure=function(t){for(var e=p()('<div class="hi-grid-row table-grid-row"></div>'),n=0;n<this.options.getGridColumns();n++){var i=p()('<div class="tableGridColumnsGutterRow hi-grid-col" style="width:'+100/this.options.getGridColumns()+'%;"></div>');e.append(i)}var o=this.getGridColumnsFooterFormatter();if(o){var r=p()('<div class="hiprint-gridColumnsFooter"></div>');r.append(o(this.options,this.getData(t),t,[])),e.append(r)}return new c.a(this.options.getGridColumns(),e)},e.prototype.createtempEmptyRowsTargetStructure=function(t){if(this.getField())return this.createTarget(this.printElementType.title,[]);var e=this.createTarget(this.printElementType.title,[]).clone();return e.find(".hiprint-printElement-tableTarget tbody tr").remove(),e},e.prototype.getTableHtml=function(t,e){var n,i;if(!this.getField()&&this.options.content)return(n=p()("<div></div>")).append(this.options.content),(i=n.find("table")).addClass("hiprint-printElement-tableTarget"),i;if(this.printElementType.formatter)return(n=p()("<div></div>")).append(this.printElementType.formatter(t)),(i=n.find("table")).addClass("hiprint-printElement-tableTarget"),i;var o=p()('<table class="hiprint-printElement-tableTarget" style="border-collapse: collapse;"></table>');let r=d.a.createTableHead(this.getColumns(),this.options.getWidth()/this.options.getGridColumns());return this.isNotDesign?o.append(r):o.append(r[0]),o.append(d.a.createTableRow(this.getColumns(),t,e,this.options,this.printElementType)),"no"==this.options.tableFooterRepeat||d.a.createTableFooter(this.printElementType.columns,t,this.options,this.printElementType,e,t).insertBefore(o.find("tbody")),o},e.prototype.getEmptyRowTarget=function(){return d.a.createEmptyRowTarget(this.getColumns(),this)},e.prototype.getHtml=function(t,e){this.createTempContainer(),this.isNotDesign=null!=e;var n=this.getPaperHtmlResult(t,e);return this.removeTempContainer(),n},e.prototype.getPaperHtmlResult=function(t,e){var n=[],i=this.getData(e),o=this.getTableHtml(i,e),r=this.createtempEmptyRowsTargetStructure(e);e?this.updateTargetWidth(r):this.updateTargetSize(r),this.css(r,i),this.css(o,i),this.getTempContainer().html(""),this.getTempContainer().append(r);var s=r.find("tfoot").outerHeight()||0;r.find("tfoot").remove();for(var u,d=this.getBeginPrintTopInPaperByReferenceElement(t),h=0,c=!1;!c;){var f=0,g=t.getPaperFooter(h);0==h&&d>g&&"none"!=t.panelPageRule&&(d=d-g+t.paperHeader,n.push(new a.a({target:void 0,printLine:void 0})),f=t.getContentHeight(h)-(d-t.paperHeader),h++,g=t.getPaperFooter(h));var m=n.length>0?n[n.length-1].target:void 0,v=this.getRowsInSpecificHeight(e,f>0?f:0==h?g-d:t.getContentHeight(h),r,o,h,m,s);if(c=v.isEnd,f<0){n[0].target=p()('<div style="position:absolute;background: red;color: white;padding: 0px 4px;">\u6ca1\u6709\u8db3\u591f\u7a7a\u95f4\u8fdb\u884c\u8868\u683c\u5206\u9875\uff0c\u8bf7\u8c03\u6574\u9875\u7709/\u9875\u811a\u7ebf</div>'),n[0].printLine=d,n[0].referenceElement=new l.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:d+this.options.lHeight,printTopInPaper:d}),n[0].target.css("top",d+"pt"),n[0].target.css("left",this.options.displayLeft());break}var y=void 0;v.target&&(v.target.css("left",this.options.displayLeft()),v.target[0].height=""),0==h||f>0?(v.target&&(u=d,v.target.css("top",d+"pt")),y=c&&null!=this.options.lHeight?d+(v.height>this.options.lHeight?v.height:this.options.lHeight):d+v.height):(v.target&&(u=t.paperHeader,v.target.css("top",t.paperHeader+"pt")),y=t.paperHeader+v.height),n.push(new a.a({target:v.target,printLine:y,referenceElement:new l.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:y,printTopInPaper:u})})),h++,e&&this.updatePanelHeight(y+this.options.getHeight(),t)}return n},e.prototype.getRowsInSpecificHeight=function(t,e,n,i,o,r,a){var l=this,u=i.find("tbody"),h=s.a.pt.toPx(e);n.find(".hiprint-printElement-tableTarget tbody").html(""),"last"!=this.options.tableFooterRepeat&&n.find(".hiprint-printElement-tableTarget tfoot").remove(),"first"==this.options.tableHeaderRepeat&&o>0?n.find(".hiprint-printElement-tableTarget thead").remove():"none"==this.options.tableHeaderRepeat&&(t?n.find(".hiprint-printElement-tableTarget thead").remove():(n.find(".hiprint-printElement-tableTarget thead").css("background","firebrick"),n.find(".hiprint-printElement-tableTarget thead tr").css("background","firebrick")));var c,f="none"==this.panel.panelPageRule;if(t&&f){var g=n.find(".hiprint-printElement-tableTarget thead").attr("style");c=n.find(".hiprint-printElement-tableTarget thead tr").clone(),g?c.attr("style",g):c.css({background:"#e8e8e8"}),n.find(".hiprint-printElement-tableTarget thead").remove()}var m=n.outerHeight();if(!f&&m>h)return{target:void 0,length:0,height:0,isEnd:!1};for(var v=this.options.getGridColumns(),y=[],b=0;b<v;b++)for(var T=n.find(".hiprint-printElement-tableTarget:eq("+b+")"),w=void 0,E=[];;){if(f){var x=u.find("tr").length;if(0==x)w={height:s.a.px.toPt(m),isEnd:!0},t&&this.options.autoCompletion&&(this.autoCompletion(h,T,a),m=n.outerHeight());else{var P=u.find("tr:lt(1)");0==E.length&&c&&T.find("tbody").append(c),T.find("tbody").append(P);var C=P.data("rowData");y.push(C),E.push(C),m=n.outerHeight(),0==x&&(u.prepend(P),y.pop(),E.pop(),w={height:s.a.px.toPt(m),isEnd:!1})}}else if(m<=h)if(0==u.find("tr").length)w={height:s.a.px.toPt(m),isEnd:!0},t&&this.options.autoCompletion&&(this.autoCompletion(h,T,a),m=T.outerHeight());else{P=u.find("tr:lt(1)");l.options.rowsColumnsMerge&&(o>0||b>0)&&0==E.length&&(P=l.fixMergeSpan(P,u)),T.find("tbody").append(P);C=P.data("rowData");y.push(C),E.push(C),m=T.outerHeight(),(("last"==this.options.tableFooterRepeat?m:m+=a)>h||this.options.maxRows&&E.length>+this.options.maxRows)&&(u.prepend(P),y.pop(),E.pop(),m=T.outerHeight(),w={height:s.a.px.toPt(m),isEnd:!1})}if(w){if("last"==this.options.tableFooterRepeat&&!w.isEnd)break;"no"!==this.options.tableFooterRepeat&&(f?T.find("tbody").append(d.a.createTableFooter(this.printElementType.columns,this.getData(t),this.options,this.printElementType,t,E,o).children()):d.a.createTableFooter(this.printElementType.columns,this.getData(t),this.options,this.printElementType,t,E,o).insertBefore(T.find("tbody")),l.css(T,t));break}}var S=n.find(".hiprint-printElement-tableTarget tbody tr").length,O=this.getGridColumnsFooterFormatter();O&&n.find(this.gridColumnsFooterCss).html(O(this.options,this.getData(t),t,y)),m=n.outerHeight();let I=u.find("tr:lt(1)");if(0==S&&I.length&&C==I.data("rowData")){T.find("tbody").append(I);let t=T.find("tbody tr").outerHeight();return u.prepend(I),{target:p()('<div style="position:absolute;background: red;color: white;padding: 0px 4px;">\u6ca1\u6709\u8db3\u591f\u7a7a\u95f4,\u663e\u793a\u4e0b\u65b9\u5185\u5bb9, \u53ef\u5206\u9875\u9ad8\u5ea6: '+h+"px < \u5f53\u524d\u9700\u8981\u9ad8\u5ea6: "+t+"px</div>").append(I.css("background","blue")),length:S,height:s.a.px.toPt(m),isEnd:!1}}return 0==u.find("tr").length?0==S&&r?{target:void 0,length:0,height:0,isEnd:!0}:{target:n.clone(),length:S,height:s.a.px.toPt(m),isEnd:!0}:{target:n.clone(),length:S,height:s.a.px.toPt(m),isEnd:!1}},e.prototype.fixMergeSpan=function(t,e){const n=new Map;return t.children().each(((e,i)=>{var o=p()(i).attr("field");n.set(o,{rowSpan:1,rowEnd:!1}),t.nextAll().each(((t,e)=>{p()(e).has(`td[field=${o}][rowspan=0]`).length&&!n.get(o).rowEnd?n.set(o,{rowSpan:++n.get(o).rowSpan,rowEnd:!1}):n.set(o,{...n.get(o),rowEnd:!0})})),p()(i).attr("rowspan")<1&&(p()(i).attr("rowspan",n.get(o).rowSpan),p()(i).css("display",""),this.options.rowsColumnsMergeClean&&p()(i).text(""))})),t},e.prototype.autoCompletion=function(t,e,n){for(var i,o=this.getEmptyRowTarget(),r=e.outerHeight()+n;t>r&&(i=o.clone(),e.find("tbody").append(i),r=e.outerHeight()+n,!(this.options.maxRows&&e.find("tbody").children().length>this.options.maxRows)););i&&i.remove()},e.prototype.getData=function(t){if(!t)try{let t=this.options.testData||"[{}]";return JSON.parse(t)}catch(n){return console.log("table testData parse error",n),[{}]}var e=this.getField(),n=e&&e.split(".").reduce(((e,n)=>e?e[n]:t?t[n]:""),!1)||"";return n?JSON.parse(JSON.stringify(n)):[]},e.prototype.onResize=function(e,n,i,o,r){t.prototype.updateSizeAndPositionOptions.call(this,r,o,i,n),d.a.resizeTableCellWidth(this.designTarget,this.getColumns(),this.options.getWidth())},e.prototype.getReizeableShowPoints=function(){return["s","e"]},e.prototype.design=function(t,e){var n=this;this.designTarget.hidraggable({handle:this.designTarget.find(".hiprint-printElement-table-handle"),axis:n.options.axis?n.options.axis:void 0,designTarget:n,onDrag:function(t,i,o){n.updateSizeAndPositionOptions(i,o),n.createLineOfPosition(e),f.a.instance.changed=!0},moveUnit:"pt",minMove:r.a.instance.movingDistance,onBeforeDrag:function(t){f.a.instance.draging=!0,n.createLineOfPosition(e)},getScale:function(){return n.designPaper.scale||1},onStopDrag:function(t){f.a.instance.changed&&s.a.event.trigger("hiprintTemplateDataChanged_"+n.templateId,"\u79fb\u52a8"),f.a.instance.draging=!1,f.a.instance.changed=!1,n.removeLineOfPosition()}}),this.printElementType.editable&&this.setHitable(),this.setColumnsOptions(),this.designTarget.hireizeable({showPoints:n.getReizeableShowPoints(),showSizeBox:r.a.instance.showSizeBox,noContainer:!0,onBeforeResize:function(){f.a.instance.draging=!0},getScale:function(){return n.designPaper.scale||1},onResize:function(t,i,o,r,a){n.onResize(t,i,o,r,a),n.hitable&&n.hitable.updateColumnGrips(),n.createLineOfPosition(e)},onStopResize:function(t){s.a.event.trigger("hiprintTemplateDataChanged_"+n.templateId,t?"\u65cb\u8f6c":"\u5927\u5c0f"),f.a.instance.draging=!1,n.removeLineOfPosition()}}),this.bingKeyboardMoveEvent(this.designTarget,e)},e.prototype.setHitable=function(){var t=this;this.hitable=new h.a({templateId:t.templateId,table:this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)"),rows:this.getColumns(),resizeRow:!1,resizeColumn:!0,fields:this.options.fields,trs:this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("tbody tr"),handle:this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead"),isEnableEdit:!this.printElementType.editable||this.printElementType.editable,columnDisplayEditable:null==this.printElementType.columnDisplayEditable||this.printElementType.columnDisplayEditable,columnDisplayIndexEditable:null==this.printElementType.columnDisplayIndexEditable||this.printElementType.columnDisplayIndexEditable,columnResizable:null==this.printElementType.columnResizable||this.printElementType.columnResizable,columnAlignEditable:null==this.printElementType.columnAlignEditable||this.printElementType.columnAlignEditable,isEnableEditText:null==this.printElementType.columnTitleEditable||this.printElementType.columnTitleEditable,isEnableEditField:null==this.printElementType.isEnableEditField||this.printElementType.isEnableEditField,isEnableContextMenu:null==this.printElementType.isEnableContextMenu||this.printElementType.isEnableContextMenu,isEnableInsertRow:null==this.printElementType.isEnableInsertRow||this.printElementType.isEnableInsertRow,isEnableDeleteRow:null==this.printElementType.isEnableDeleteRow||this.printElementType.isEnableDeleteRow,isEnableInsertColumn:null==this.printElementType.isEnableInsertColumn||this.printElementType.isEnableInsertColumn,isEnableDeleteColumn:null==this.printElementType.isEnableDeleteColumn||this.printElementType.isEnableDeleteColumn,isEnableMergeCell:null==this.printElementType.isEnableMergeCell||this.printElementType.isEnableMergeCell}),s.a.event.on("updateTable"+this.hitable.id,(function(){t.updateDesignViewFromOptions(),s.a.event.trigger("hiprintTemplateDataChanged_"+t.templateId,"\u8c03\u6574\u8868\u5934")}))},e.prototype.setColumnsOptions=function(){var t=this;this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead td").bind("click.hiprint",(function(e){var n=p()(e.target).attr("id")||p()(e.target).attr("column-id"),i=t.getColumnByColumnId(n);if(i){var o=t.getPrintElementOptionItemsByName("tableColumn");s.a.event.trigger(t.getPrintElementSelectEventKey(),{printElement:t,customOptionsInput:[{title:(i.title||`${i.id}(id)`)+"-\u5217\u5c5e\u6027",optionItems:o,options:i,callback:function(t){o.forEach((function(t){var e=t.getValue();if("title"==t.name&&e&&!e.trim().endsWith("#")&&!e.trim().startsWith("#")){var n=e?e.split("#"):"";return i.title=n[0],n.length>1&&(i.columnId=i.field=n[1]),i.columnId&&i.target.attr("column-id",i.columnId),void t.target.find("textarea").val(n[0])}i[t.name]=e}))}}]})}else s.a.event.trigger(t.getPrintElementSelectEventKey(),{printElement:t})}))},e.prototype.filterOptionItems=function(e){var n=t.prototype.filterOptionItems.call(this,e);return this.printElementType.editable&&1==this.options.columns.length?n:e.filter((function(t){return"columns"!=t.name}))},e.prototype.getFooterFormatter=function(){var t=void 0;if(this.printElementType.footerFormatter&&(t=this.printElementType.footerFormatter),this.options.footerFormatter)try{t=new Function("options","rows","data","pageData","pageIndex",`data = data || {}; ${this.options.footerFormatter}`)}catch(t){console.log(t)}return t},e.prototype.getGridColumnsFooterFormatter=function(){var t=void 0;if(this.printElementType.gridColumnsFooterFormatter&&(t=this.printElementType.gridColumnsFooterFormatter),this.options.gridColumnsFooterFormatter)try{gridColumnsFooterFormatter=new Function("options","rows","data","pageData",`data = data || {}; ${this.options.gridColumnsFooterFormatter}`)}catch(t){console.log(t)}return t},e}(o.a)},function(t,e,n){var i=function(t){this.table=t.table,this.templateId=t.templateId,this.fields=t.fields,this.isEnableEdit=t.isEnableEdit,this.trs=t.trs,this.resizeRow=t.resizeRow,this.resizeColumn=t.resizeColumn,this.isEnableEditField=t.isEnableEditField,this.isEnableContextMenu=t.isEnableContextMenu,this.isEnableEditField=t.isEnableEditField,this.isEnableInsertRow=t.isEnableInsertRow,this.isEnableDeleteRow=t.isEnableDeleteRow,this.isEnableInsertColumn=t.isEnableInsertColumn,this.isEnableDeleteColumn=t.isEnableDeleteColumn,this.isEnableMergeCell=t.isEnableMergeCell,this.columnResizable=t.columnResizable,this.columnAlignEditable=t.columnAlignEditable},o=function(){function t(t){this.options=new i(t)}return t.prototype.enableEidt=function(){this.options.isEnableEdit},t.prototype.disableEdit=function(){this.options.isEnableEdit},t.prototype.isEnableEdit=function(){return this.options.isEnableEdit},t}(),r=n(0),a=function(t){this.cell=t.cell,this.link=t.link,this.linkType=t.linkType,this.bottom=t.bottom,this.rightMost=t.rightMost,this.rowLevel=t.rowLevel,this.columnLevel=t.columnLevel,this.indexInTableGridRow=t.indexInTableGridRow,this.indexInTableGridColumn=t.indexInTableGridColumn},s=n(10),l=function(){function t(){}return t.getLeftTableCell=function(t,e){var n;return t.forEach((function(t,i){t.cell&&i<e&&(n=t.cell)})),n},t.getIndex=function(t,e){var n;return t.forEach((function(t,i){t.cell&&t.cell.id==e&&(n=i)})),n},t}(),u=n(13),d=n(11),h=function(t,e){this.target=t,this.grips=e},c=function(t){this.target=t},f=function(){this.rowColumns=[]},g=function(){function t(){}return t.getColumnsWidth=function(e,n){var i={},o=t.allAutoWidth(e);return e.rowColumns.forEach((function(t){var e=n-0,r=t.width/o*(e>0?e:0);i[t.id]=r})),i},t.resizeTableCellWeight=function(t){t.forEach((function(t){t.columns.forEach((function(t){t.hasWidth&&p()(t.getTarget()).css("width",t.width+"pt")}))}))},t.allAutoWidth=function(t){var e=0;return t.rowColumns.forEach((function(t){e+=t.width})),e},t.reconsitutionTableColumnTree=function(t,e,n){for(var i=e||new f,o=function(e){i.totalLayer=e+1,i[e]=t[e].columns,i.rowColumns=i.rowColumns.concat(i[e].filter((function(n){return n.rowspan==t.length-e})))},r=0;r<t.length;r++)o(r);return i},t}(),m=n(2),v=function(){function t(t){this.signature="HiTresizer",this.hitable=t,this.rows=t.rows,this.target=t.target}return t.prototype.init=function(){this.addResizeRowAndColumn(),this.hitable.optionsCoat.options.resizeColumn&&this.createColumnGrips(),this.hitable.optionsCoat.options.resizeRow&&this.createRowGrips()},t.prototype.resizeTableCellWidth=function(){g.resizeTableCellWeight(this.rows)},t.prototype.addResizeRowAndColumn=function(){},t.prototype.createColumnGrips=function(){var t=this,e=this,n=[],i=p()('<div class="columngrips"/>');i.width(this.target.width()),this.rows.forEach((function(o){(o.columns||[]).filter((function(t){return t.checked})).forEach((function(o,a){if(o.getTarget().attr("haswidth")){var s=p()('<div class="columngrip"><div class="gripResizer"></div></div>');i.append(s);var l=new c(s);n.length>0&&(n[n.length-1].nextGrip=l),n.push(l),t.syncGrips(o,l),p()(s).hidraggable({axis:"h",onDrag:function(t,e,n){},moveUnit:"pt",minMove:1,getScale:function(){return p()(".hiprint-printPaper")[0].style.transform&&parseFloat(p()(".hiprint-printPaper")[0].style.transform.slice(6,-1))||1},onBeforeDrag:function(t){if(m.a.instance.draging=!0,!l.nextGrip)return!1;e.dragingGrip=l,e.dragingGrip.left=parseFloat(e.dragingGrip.target.css("left").replace("px","")),l.target.addClass("columngripDraging")},onStopDrag:function(n){m.a.instance.draging=!1;var i=parseFloat(e.dragingGrip.target.css("left").replace("px","")),o=r.a.px.toPt(i-e.dragingGrip.left);l.cell.width+o<10?o=10-l.cell.width:l.nextGrip.cell.width-o<10&&(o=l.nextGrip.cell.width-10),l.cell.width=l.cell.width+o,l.nextGrip.cell.width=l.nextGrip.cell.width-o,t.resizeTableCellWidth(),l.target.removeClass("columngripDraging"),e.updateColumnGrips()}})}}))})),this.target.before(i),this.cgripContariner=new h(i,n)},t.prototype.updateColumnGrips=function(){this.cgripContariner&&(this.cgripContariner.target.remove(),this.createColumnGrips())},t.prototype.updateRowGrips=function(){this.rgripContariner&&(this.rgripContariner.target.remove(),this.createRowGrips())},t.prototype.createRowGrips=function(){var t=this,e=this,n=[],i=p()('<div class="rowgrips"/>');this.rows.forEach((function(o,a){var s=p()('<div class="rowgrip"><div class="gripResizer"></div></div>');i.append(s);var l=new c(s);n.push(l),a>0&&a<t.rows.length&&p()(s).hidraggable({axis:"v",onDrag:function(t,e,n){},moveUnit:"pt",minMove:1,onBeforeDrag:function(t){e.dragingGrip=l,e.dragingGrip.top=parseFloat(e.dragingGrip.target.css("top").replace("px","")),l.target.addClass("rowgripDraging")},onStopDrag:function(t){var n=parseFloat(e.dragingGrip.target.css("top").replace("px","")),i=r.a.px.toPt(n-e.dragingGrip.top+e.rows[a].columns[0].getTarget().height());e.rows[a].columns[0].getTarget().css("height",i+"pt"),e.syncRowGrips(),l.target.removeClass("rowgripDraging")}})})),this.target.before(i),this.rgripContariner=new h(i,n),this.syncRowGrips()},t.prototype.syncGrips=function(t,e){var n=t.getTarget(),i=p()(".hiprint-printPaper")[0].style.transform&&parseFloat(p()(".hiprint-printPaper")[0].style.transform.slice(6,-1))||1;e.cell=t,e.target.css({left:n.offset().left/i-this.target.offset().left/i+n.outerWidth(!1),height:30})},t.prototype.syncRowGrips=function(){var t=this;this.rgripContariner.target.height(this.target.height()),this.rows.forEach((function(e,n){var i=e.columns[0].getTarget();t.rgripContariner.grips[n].target.css({top:i.offset().top-t.target.offset().top+i.outerHeight(!1),width:30})}))},t.prototype.addResizerHeadRow=function(){this.target.find("thead").prepend()},t}(),y=function(){function t(){}return t.prototype.init=function(){},t.prototype.updateRowGrips=function(){},t.prototype.updateColumnGrips=function(){},t}();n.d(e,"a",(function(){return b}));var b=function(){function t(t){this.id=d.a.createId(),this.optionsCoat=new o(t),this.handle=t.handle,this.target=t.table,this.initRows(t.rows),this.init(t),this.tableCellSelector=new s.a(this.rows,this.target),this.resizer=this.optionsCoat.options.columnResizable?new v(this):new y,this.resizer.init()}return t.prototype.insertRow=function(t,e,n){var i=e||this.tableCellSelector.getSingleSelect(),o=i.cell,a=this.rows[i.rowIndex],s=i.rowIndex,p=this.getCellGrid(),l=new u.a;if(l.init(this.optionsCoat,void 0,a.isHead),n&&l.getTarget().addClass(n),"above"==t)p[s].forEach((function(t){var e=t.link?t.link:t.cell,n=e.width/e.colspan;if(0==t.columnLevel){var i=l.createTableCell();i.width=n,l.insertCellToLast(i)}else{if("column"==t.linkType){var o=t.link.getTarget();t.link.rowspan+=1,o.attr("rowspan",t.link.rowspan)}t.linkType}})),this.rows.splice(s,0,l),a.getTarget().before(l.getTarget()),r.a.event.trigger("newRow"+this.id,l);else{var d=s+o.rowspan-1;p[d].forEach((function(t){var e=t.link?t.link:t.cell,n=e.width/e.colspan;if(t.bottom){var i=l.createTableCell();i.width=n,l.insertCellToLast(i)}else{if(t.cell){var o=t.cell.getTarget();t.cell.rowspan+=1,o.attr("rowspan",t.cell.rowspan)}"column"==t.linkType&&(o=t.link.getTarget(),t.link.rowspan+=1,o.attr("rowspan",t.link.rowspan))}})),this.rows.splice(d+1,0,l),this.rows[d].getTarget().after(l.getTarget()),r.a.event.trigger("newRow"+this.id,l)}},t.prototype.insertColumn=function(t,e,n,i){var o=this,a=this.rows.concat(this.trRows),s=e||this.tableCellSelector.getSingleSelect(),p=s.cell,l=s.rowIndex,u=this.getCellGrid(a),d=u[l].filter((function(t){return t.cell&&t.cell.id==p.id||t.link&&t.link.id==p.id}));if("left"==t){var h=d[0].indexInTableGridRow;u.forEach((function(t,e){var s=t[h],p=t.filter((function(t,e){return e>=h&&t.cell}));if(0==s.rowLevel){var l=a[e],u=a[e].createTableCell();n&&u.getTarget().addClass(n),null!=i&&(u.width=i),p.length?l.insertToTargetCellLeft(p[0].cell,u):l.insertCellToLast(u),r.a.event.trigger("newCell"+o.id,u)}else if("row"==s.linkType){var d=s.link.getTarget();s.link.colspan+=1,d.attr("colspan",s.link.colspan)}}))}else{var c=d[d.length-1].indexInTableGridRow;u.forEach((function(t,e){var s=t[c],p=t.filter((function(t,e){return e<=c&&t.cell}));if(s.rightMost){var l=a[e],u=l.createTableCell();n&&u.getTarget().addClass(n),null!=i&&(u.width=i),p.length?l.insertToTargetCellRight(p[p.length-1].cell,u):l.insertCellToFirst(u),r.a.event.trigger("newCell"+o.id,u)}else{var d=s.link||s.cell;if("row"==s.linkType){var h=d.getTarget();d.colspan+=1,h.attr("colspan",d.colspan)}s.cell&&(h=d.getTarget(),d.colspan+=1,h.attr("colspan",d.colspan))}}))}},t.prototype.deleteRow=function(){var t=this,e=this.tableCellSelector.getSingleSelect(),n=(e.cell,this.rows[e.rowIndex],e.rowIndex),i=this.getCellGrid(),o=this.rows[n];i[n].forEach((function(e,r){if(e.cell)if(1==e.cell.rowspan)o.removeCell(e.cell);else{o.removeCell(e.cell);var a=i[n+1].filter((function(t,e){return t.cell&&e>r})),s=t.rows[n+1],p=s.createTableCell(e.cell.rowspan-1,e.cell.colspan);a.length?s.insertToTargetCellLeft(a[0].cell,p):s.insertCellToLast(p)}else if("column"==e.linkType){var l=e.link;l.rowspan-=1,l.getTarget().attr("rowspan",l.rowspan)}})),o.getTarget().remove(),this.rows.splice(n,1)},t.prototype.deleteColums=function(){var t=this.rows.concat(this.trRows),e=this.tableCellSelector.getSingleSelect(),n=e.cell,i=e.rowIndex,o=this.getCellGrid(t),r=o[i].filter((function(t){return t.cell&&t.cell.id==n.id||t.link&&t.link.id==n.id}))[0].indexInTableGridRow;o.forEach((function(e,n){var i=e[r];i.cell?1==i.cell.colspan?t[n].removeCell(i.cell):(i.cell.colspan-=1,i.cell.getTarget().attr("colspan",i.cell.colspan)):"row"==i.linkType&&(i.link.colspan-=1,i.link.getTarget().attr("colspan",i.link.colspan))}))},t.prototype.mergeCell=function(){var t=this,e=this.tableCellSelector.getSelectedCells();if(0!=e.length){var n=e[0][0].cell;e.forEach((function(i,o){i.forEach((function(i,r){0==o?0!=r&&(n.colspan+=i.cell.colspan,t.rows[i.rowIndex].removeCell(i.cell)):t.rows[i.rowIndex].removeCell(i.cell),0==r&&e[0][0].rowIndex+n.rowspan-1<i.rowIndex&&(n.rowspan+=i.cell.rowspan)}))})),n.getTarget().attr("colspan",n.colspan),n.getTarget().attr("rowspan",n.rowspan),this.tableCellSelector.setSingleSelect(e[0][0])}},t.prototype.splitCell=function(){var t=this.tableCellSelector.getSingleSelect(),e=this.getCellGrid(),n=l.getIndex(e[t.rowIndex],t.cell.id);if(t){for(var i=t.rowIndex;i<t.rowIndex+t.cell.rowspan;i++)for(var o=this.rows[i],r=i==t.rowIndex?t.cell:l.getLeftTableCell(e[i],n),a=0;a<t.cell.colspan;a++)i==t.rowIndex&&0==a||(r?o.insertToTargetCellRight(r,o.createTableCell()):o.insertCellToFirst(o.createTableCell()));t.cell.rowspan=1,t.cell.colspan=1,t.cell.getTarget().attr("colspan",t.cell.colspan),t.cell.getTarget().attr("rowspan",t.cell.rowspan)}},t.prototype.init=function(t){var e=this;p()(this.target).addClass("hitable"),this.optionsCoat.onBeforEdit=function(n){return(!e.optionsCoat.options.onBeforEdit||!1!==t.onBeforEdit(n))&&(e.optionsCoat.editingCell&&e.optionsCoat.editingCell.endEdit(),!0)},p()(this.target).mousedown((function(t){e.optionsCoat.isLeftMouseButtonDown=!0})),p()(this.target).mouseup((function(t){e.optionsCoat.isLeftMouseButtonDown=!1})),this.initContext(),this.target.on("mousemove",(function(t){1===t.buttons&&e.tableCellSelector.multipleSelectByXY(t.pageX,t.pageY)})).on("mousedown",(function(t){1===t.buttons&&e.tableCellSelector.singleSelectByXY(t.pageX,t.pageY)}))},t.prototype.initRows=function(t){var e=this;if(this.trRows=[],t){this.rows=t,t.forEach((function(t,n){t.init(e.optionsCoat,e.target.find("tr:eq("+n+")"),!0)}));var n=this.optionsCoat.options.trs;n&&this.initRowsByTrs(n).forEach((function(t){e.trRows.push(t)}))}else this.rows=this.initRowsByTrs(this.target.find("tr"))},t.prototype.initRowsByTrs=function(t){var e=this;return t.map((function(t,n){var i=new u.a;return i.init(e.optionsCoat,p()(n)),i})).get()},t.prototype.enableEidt=function(){this.optionsCoat.enableEidt()},t.prototype.disableEdit=function(){this.optionsCoat.disableEdit()},t.prototype.getCellGrid=function(t){var e=t||this.rows,n=this.getColumnStep(),i=new Array;return e.forEach((function(t,e){t.columns.forEach((function(t,o){for(var r=0;r<t.colspan;r++)for(var s=0,p=!1;s<n&&!p;){if(i[e]=i[e]||[],i[e][s]);else{i[e][s]=new a({cell:0==r?t:void 0,link:0!=r?t:void 0,linkType:r>0?"row":void 0,rightMost:r==t.colspan-1||void 0,bottom:0==t.rowspan-1,rowLevel:r,columnLevel:0,indexInTableGridRow:s,indexInTableGridColumn:e});for(var l=e+1,u=1;u<t.rowspan;u++)i[l]=i[l]||[],i[l][s]=new a({cell:void 0,link:t,linkType:r>0?"rowColumn":"column",rightMost:r==t.colspan-1||void 0,bottom:u==t.rowspan-1,rowLevel:r,columnLevel:u,indexInTableGridRow:s,indexInTableGridColumn:l}),l+=1;p=!0}s++}}))})),i},t.prototype.setAlign=function(t){var e=this.tableCellSelector.getSingleSelect();e&&e.cell.setAlign(t)},t.prototype.setVAlign=function(t){var e=this.tableCellSelector.getSingleSelect();e&&e.cell.setVAlign(t)},t.prototype.getColumnStep=function(t){var e=0;return this.rows.length&&this.rows[t||0].columns.forEach((function(t){e+=t.colspan})),e},t.prototype.initContext=function(){var t=this;if(!this.optionsCoat.options.isEnableContextMenu)return!1;p()(this.handle).hicontextMenu({menus:[{text:"\u5728\u4e0a\u65b9\u63d2\u5165\u884c",enabled:this.optionsCoat.options.isEnableInsertRow,disable:function(){return!t.tableCellSelector.getSingleSelect()},callback:function(){t.insertRow("above"),t.resizer.updateRowGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5728\u4e0b\u65b9\u63d2\u5165\u884c",borderBottom:!0,enabled:this.optionsCoat.options.isEnableInsertRow,disable:function(){return!t.tableCellSelector.getSingleSelect()},callback:function(){t.insertRow("below"),t.resizer.updateRowGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5411\u5de6\u65b9\u63d2\u5165\u5217",enabled:this.optionsCoat.options.isEnableInsertColumn,disable:function(){return!t.tableCellSelector.getSingleSelect()},callback:function(){t.insertColumn("left"),t.resizer.updateColumnGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5411\u53f3\u65b9\u63d2\u5165\u5217",enabled:this.optionsCoat.options.isEnableInsertColumn,disable:function(){return!t.tableCellSelector.getSingleSelect()},borderBottom:!0,callback:function(){t.insertColumn("right"),t.resizer.updateColumnGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5220\u9664\u884c",enabled:this.optionsCoat.options.isEnableDeleteRow,disable:function(){return!t.tableCellSelector.getSingleSelect()||t.rows.length<=1},callback:function(){t.deleteRow(),t.resizer.updateRowGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5220\u9664\u5217",borderBottom:!0,enabled:this.optionsCoat.options.isEnableDeleteColumn,disable:function(){return!t.tableCellSelector.getSingleSelect()||t.rows.length>0&&t.rows[0].columns.length<=1},callback:function(){t.deleteColums(),t.resizer.updateColumnGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5bf9\u9f50",borderBottom:!0,enabled:this.optionsCoat.options.columnAlignEditable,menus:[{text:"\u5de6",callback:function(){t.setAlign("left")}},{text:"\u5de6\u53f3\u5c45\u4e2d",callback:function(){t.setAlign("center")}},{text:"\u53f3",callback:function(){t.setAlign("right")}},{text:"\u9ed8\u8ba4",borderBottom:!0,callback:function(){t.setAlign("")}},{text:"\u4e0a",callback:function(){t.setVAlign("top")}},{text:"\u5782\u76f4\u5c45\u4e2d",callback:function(){t.setVAlign("middle")}},{text:"\u4e0b",callback:function(){t.setVAlign("bottom")}},{text:"\u9ed8\u8ba4",callback:function(){t.setVAlign("")}}]},{text:"\u5408\u5e76\u5355\u5143\u683c",enabled:this.optionsCoat.options.isEnableMergeCell,disable:function(){return t.tableCellSelector.getSingleSelect()},callback:function(){t.mergeCell(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u89e3\u5f00\u5355\u5143\u683c",enabled:this.optionsCoat.options.isEnableMergeCell,disable:function(){var e=t.tableCellSelector.getSingleSelect();return!e||1==e.cell.rowspan&&1==e.cell.colspan},callback:function(){t.splitCell(),r.a.event.trigger("updateTable"+t.id)}}].filter((function(t){return t.enabled}))})},t.prototype.getTableWidth=function(){return r.a.px.toPt(this.target.outerWidth(!1))},t.prototype.updateColumnGrips=function(){this.resizer.updateColumnGrips()},t.prototype.updateRowGrips=function(){this.resizer.updateRowGrips()},t}()},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(t,e,n){this.tid=t,this.options=e,this.printElementType=n}},function(t,e,n){var i=n(3),o=n(12),r=function(t){this.width=t.width,this.title=t.title,this.field=t.field,this.checked=t.checked,this.columnId=t.columnId,this.fixed=!1,this.rowspan=t.rowspan||1,this.colspan=t.colspan||1,this.align=t.align,this.halign=t.halign,this.vAlign=t.vAlign,this.renderFormatter=t.renderFormatter,this.formatter2=t.formatter2,this.styler2=t.styler2,this.stylerHeader=t.stylerHeader,this.tableColumnHeight=t.tableColumnHeight,this.tableTextType=t.tableTextType,this.tableBarcodeMode=t.tableBarcodeMode,this.tableQRCodeLevel=t.tableQRCodeLevel,this.tableSummaryTitle=t.tableSummaryTitle,this.tableSummaryText=t.tableSummaryText,this.tableSummaryColspan=t.tableSummaryColspan,this.tableSummary=t.tableSummary,this.tableSummaryAlign=t.tableSummaryAlign,this.tableSummaryNumFormat=t.tableSummaryNumFormat,this.tableSummaryFormatter=t.tableSummaryFormatter,this.showCodeTitle=t.showCodeTitle,this.upperCase=t.upperCase},a=n(5);n.d(e,"a",(function(){return u}));var s,l=(s=function(t,e){return(s=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e,n){var i=this;return e=e||{},(i=t.call(this,e)||this).lHeight=e.lHeight,i.autoCompletion=e.autoCompletion,i.tableFooterRepeat=e.tableFooterRepeat,n&&(i.columns=[],n.editable&&e.columns&&e.columns.length?e.columns.forEach((function(t){var e=[];t.forEach((function(t){var i=new r(t),o=n.getColumnByColumnId(i.columnId),s=o?p().extend(o,i):new a.a(i);e.push(s)})),i.columns.push(new o.a(e))})):n.columns.forEach((function(t){i.columns.push(new o.a(t))}))),i}return l(e,t),e.prototype.getColumnByColumnId=function(t){return this.makeColumnObj()[t]},e.prototype.makeColumnObj=function(){var t={};return this.columns&&this.columns.forEach((function(e){e.columns.forEach((function(e){(e.id||e.columnId)&&(t[e.id||e.columnId]=e)}))})),t},e.prototype.getGridColumns=function(){return this.gridColumns||1},e.prototype.getPrintElementOptionEntity=function(){var e=t.prototype.getPrintElementOptionEntity.call(this);return e.fields=this.fields,this.columns&&(e.columns=[],this.columns.forEach((function(t){var n=t.getPrintElementOptionEntity().map((function(t){return new r(t)}));e.columns.push(n)}))),e},e}(i.a)},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(){this.rowColumns=[]}},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(){function t(t,e){this.gridColumns=t,this.target=e}return t.prototype.getByIndex=function(t){return this.target.find(".hi-grid-col:eq("+t+")")},t}()},function(t,e,n){t.exports=n(33)},function(t,e){!function(t){function e(e){var n=t.data(e.data.target,"hidraggable"),i=n.options,o=n.proxy,r=e.data,a=r.startLeft+(e.pageX-r.startX)/(n.options.getScale()||1),s=r.startTop+(e.pageY-r.startY)/(n.options.getScale()||1);o&&(o.parent()[0]==document.body?(a=null!=i.deltaX&&null!=i.deltaX?e.pageX+i.deltaX:e.pageX-e.data.offsetWidth,s=null!=i.deltaY&&null!=i.deltaY?e.pageY+i.deltaY:e.pageY-e.data.offsetHeight):(null!=i.deltaX&&null!=i.deltaX&&(a+=e.data.offsetWidth+i.deltaX),null!=i.deltaY&&null!=i.deltaY&&(s+=e.data.offsetHeight+i.deltaY))),e.data.parent!=document.body&&(a+=t(e.data.parent).scrollLeft(),s+=t(e.data.parent).scrollTop()),"h"==i.axis?r.left=a:"v"==i.axis||e.shiftKey&&e.altKey?r.top=s:e.shiftKey?r.left=a:(r.left=a,r.top=s)}function n(e){var n=t.data(e.data.target,"hidraggable"),i=n.options,o=n.proxy;o||(o=t(e.data.target)),o.css({left:t.fn.dragLengthC(e.data.left,i),top:t.fn.dragLengthC(e.data.top,i)}),t("body").css("cursor",i.cursor)}function i(i){t.fn.hidraggable.isDragging=!0;var o=t.data(i.data.target,"hidraggable"),r=o.options,a=t(".hidroppable").filter((function(){return i.data.target!=this})).filter((function(){var e=t.data(this,"hidroppable").options.accept;return!e||t(e).filter((function(){return this==i.data.target})).length>0}));o.hidroppables=a;var s=o.proxy;return s||(r.proxy?(s="clone"==r.proxy?t(i.data.target).clone().insertAfter(i.data.target):r.proxy.call(i.data.target,i.data.target),o.proxy=s):s=t(i.data.target)),s.css("position","absolute"),e(i),n(i),r.onStartDrag.call(i.data.target,i),!1}function o(t,e,n,i,o,r){Math.abs(t[n]-e[i])<=F.adsorbLineMin?t.v.length?t.v.css("left",t[n]+"pt"):(t.v=p()("<div class='verLine id-"+t.id+"'></div>"),t.v.css("height",o+"pt"),t.v.css("left",t[n]+"pt"),r.append(t.v)):t.v&&t.v.remove()}function r(t){t&&t.v&&t.v.remove(),p()(".verLine").remove()}function a(t,e,n,i,o,r){Math.abs(t[n]-e[i])<=F.adsorbLineMin?t.h.length?t.h.css("top",t[n]+"pt"):(t.h=p()("<div class='horLine id-"+t.id+"'></div>"),t.h.css("width",o+"pt"),t.h.css("top",t[n]+"pt"),r.append(t.h)):t.h&&t.h.remove()}function s(t){t&&t.h&&t.h.remove(),p()(".horLine").remove()}function l(i){if(1===i.buttons){var l=t.data(i.data.target,"hidraggable");if(e(i),!i.ctrlKey&&!i.metaKey&&(i.data.target.className.startsWith("resize-panel")||"2"==i.data.target.style.zIndex||i.data.target.className.startsWith("hiprint-printElement"))){var u=i.data;if(0==t(".mouseRect").length&&l.options.designTarget&&l.options.designTarget.panel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&!t.printElementType.type.includes("table")})).length<=1){let t=D.px.toPt(u.left),e=D.px.toPt(u.top),n=l.options.designTarget.options;n.left=t,n.top=e,n.right=t+n.width,n.bottom=e+n.height,n.vCenter=t+n.width/2,n.hCenter=e+n.height/2,(()=>{let t=l.options.designTarget.panel.printElements.filter((t=>t.id!=l.options.designTarget.id)).map((t=>{let e,i,o,r,{left:a,top:s,width:l,height:u}=t.options,d=a+l,h=a+l/2,c=s+u/2,f=n.left+n.width/2,g=n.top+n.height/2,m=n.left+n.width;return i=Math.sqrt(Math.pow(a-n.left,2)+Math.pow(c-g,2)),o=Math.sqrt(Math.pow(h-f,2)+Math.pow(c-g,2)),r=Math.sqrt(Math.pow(d-m,2)+Math.pow(c-g,2)),e=Math.min(i,o,r),{...t.options,distance:e,h:p()(".horLine.id-"+t.id),v:p()(".verLine.id-"+t.id),bottom:s+u,right:a+l,vCenter:h,hCenter:c}})).sort(((t,e)=>t.distance-e.distance)).slice(0,1),e=l.options.designTarget.designPaper,i=e.target.find(".hiprint-printPaper-content"),u=e.width,d=e.height,h=F.showAdsorbLine,c=F.adsorbMin,f=F.adsorbLineMin;t.forEach(((e,p)=>{Math.abs(t[p].left-n.left)<=c?(n.left=t[p].left,r(t[p])):Math.abs(t[p].vCenter-n.left)<=c?(n.left=t[p].vCenter,r(t[p])):Math.abs(t[p].right-n.left)<=c&&(n.left=t[p].right,r(t[p])),Math.abs(t[p].left-n.vCenter)<=c?(n.left=t[p].left-n.width/2,r(t[p])):Math.abs(t[p].vCenter-n.vCenter)<=c?(n.left=t[p].vCenter-n.width/2,r(t[p])):Math.abs(t[p].right-n.vCenter)<=c&&(n.left=t[p].right-n.width/2,r(t[p])),Math.abs(t[p].left-n.right)<=c?(n.left=t[p].left-n.width,r(t[p])):Math.abs(t[p].vCenter-n.right)<=c?(n.left=t[p].vCenter-n.width,r(t[p])):Math.abs(t[p].right-n.right)<=c&&(n.left=t[p].right-n.width,r(t[p])),Math.abs(t[p].top-n.top)<=c?(n.top=t[p].top,s(t[p])):Math.abs(t[p].hCenter-n.top)<=c?(n.top=t[p].hCenter,s(t[p])):Math.abs(t[p].bottom-n.top)<=c&&(n.top=t[p].bottom,s(t[p])),Math.abs(t[p].top-n.hCenter)<=c?(n.top=t[p].top-n.height/2,s(t[p])):Math.abs(t[p].hCenter-n.hCenter)<=c?(n.top=t[p].hCenter-n.height/2,s(t[p])):Math.abs(t[p].bottom-n.hCenter)<=c&&(n.top=t[p].bottom-n.height/2,s(t[p])),Math.abs(t[p].top-n.bottom)<=c?(n.top=t[p].top-n.height,s(t[p])):Math.abs(t[p].hCenter-n.bottom)<=c?(n.top=t[p].hCenter-n.height,s(t[p])):Math.abs(t[p].bottom-n.bottom)<=c&&(n.top=t[p].bottom-n.height,s(t[p])),h&&(Math.abs(t[p].left-n.left)>c&&Math.abs(t[p].left-n.left)<=f?o(t[p],n,"left","left",d,i):Math.abs(t[p].vCenter-n.left)>c&&Math.abs(t[p].vCenter-n.left)<=f?o(t[p],n,"vCenter","left",d,i):Math.abs(t[p].right-n.left)>c&&Math.abs(t[p].right-n.left)<=f?o(t[p],n,"right","left",d,i):Math.abs(t[p].left-n.vCenter)>c&&Math.abs(t[p].left-n.vCenter)<=f?o(t[p],n,"left","vCenter",d,i):Math.abs(t[p].vCenter-n.vCenter)>c&&Math.abs(t[p].vCenter-n.vCenter)<=f?o(t[p],n,"vCenter","vCenter",d,i):Math.abs(t[p].right-n.vCenter)>c&&Math.abs(t[p].right-n.vCenter)<=f?o(t[p],n,"right","vCenter",d,i):Math.abs(t[p].left-n.right)>c&&Math.abs(t[p].left-n.right)<=f?o(t[p],n,"left","right",d,i):Math.abs(t[p].vCenter-n.right)>c&&Math.abs(t[p].vCenter-n.right)<=f?o(t[p],n,"vCenter","right",d,i):Math.abs(t[p].right-n.right)>c&&Math.abs(t[p].right-n.right)<=f?o(t[p],n,"right","right",d,i):Math.abs(t[p].top-n.top)>c&&Math.abs(t[p].top-n.top)<=f?a(t[p],n,"top","top",u,i):Math.abs(t[p].hCenter-n.top)>c&&Math.abs(t[p].hCenter-n.top)<=f?a(t[p],n,"hCenter","top",u,i):Math.abs(t[p].bottom-n.top)>c&&Math.abs(t[p].bottom-n.top)<=f?a(t[p],n,"bottom","top",u,i):Math.abs(t[p].top-n.hCenter)>c&&Math.abs(t[p].top-n.hCenter)<=f?a(t[p],n,"top","hCenter",u,i):Math.abs(t[p].hCenter-n.hCenter)>c&&Math.abs(t[p].hCenter-n.hCenter)<=f?a(t[p],n,"hCenter","hCenter",u,i):Math.abs(t[p].bottom-n.hCenter)>c&&Math.abs(t[p].bottom-n.hCenter)<=f?a(t[p],n,"bottom","hCenter",u,i):Math.abs(t[p].top-n.bottom)>c&&Math.abs(t[p].top-n.bottom)<=f?a(t[p],n,"top","bottom",u,i):Math.abs(t[p].hCenter-n.bottom)>c&&Math.abs(t[p].hCenter-n.bottom)<=f?a(t[p],n,"hCenter","bottom",u,i):Math.abs(t[p].bottom-n.bottom)>c&&Math.abs(t[p].bottom-n.bottom)<=f?a(t[p],n,"bottom","bottom",u,i):(r(t[p]),s(t[p])))}))})(),i.data.left=D.pt.toPx(n.left),i.data.top=D.pt.toPx(n.top)}var d=u.parent.className.endsWith("design")?u.parent:u.parent.offsetParent,h=d.clientWidth,c=d.clientHeight,f=u.target.clientWidth,g=u.target.clientHeight,m=0,v=0;if(l.options.designTarget&&l.options.designTarget.options.transform){var y=l.options.designTarget.options.getRectInfo();m=D.pt.toPx(y.diffW),v=D.pt.toPx(y.diffH)}u.left<0-m?u.left=0-m:u.left>=h-f+m&&(u.left=h-f+m),u.top<0-v?u.top=0-v:u.top>=c-g+v&&(u.top=c-g+v),i.data=u}0!=l.options.onDrag.call(i.data.target,i,t.fn.dragLengthCNum(i.data.left,l.options),t.fn.dragLengthCNum(i.data.top,l.options))&&n(i);var b=i.data.target;return l.hidroppables.each((function(){var e=t(this);if(!e.hidroppable("options").disabled){var n=e.offset();i.pageX>n.left&&i.pageX<n.left+e.outerWidth()&&i.pageY>n.top&&i.pageY<n.top+e.outerHeight()?(this.entered||(t(this).trigger("_dragenter",[b]),this.entered=!0),t(this).trigger("_dragover",[b])):this.entered&&(t(this).trigger("_dragleave",[b]),this.entered=!1)}})),!1}}function u(e){t.fn.hidraggable.isDragging=!1,r(),s();var n,i,o=t.data(e.data.target,"hidraggable"),a=o.proxy,p=o.options;function l(){a&&a.remove(),o.proxy=null}function u(){var n=!1;return o.hidroppables.each((function(){var i=t(this);if(!i.hidroppable("options").disabled){var o=i.offset(),r=this.style.transform&&parseFloat(this.style.transform.slice(6,-1))||1;return e.pageX>o.left&&e.pageX<o.left+i.outerWidth()*r&&e.pageY>o.top&&e.pageY<o.top+i.outerHeight()*r?(p.revert&&t(e.data.target).css({position:e.data.startPosition,left:e.data.startLeft,top:e.data.startTop}),t(this).trigger("_drop",[e.data.target]),l(),n=!0,this.entered=!1,!1):void 0}})),n||p.revert||l(),n}return p.revert?1==u()?t(e.data.target).css({position:e.data.startPosition,left:e.data.startLeft,top:e.data.startTop}):a?(a.parent()[0]==document.body?(n=e.data.startX-e.data.offsetWidth,i=e.data.startY-e.data.offsetHeight):(n=e.data.startLeft,i=e.data.startTop),a.animate({left:n,top:i},(function(){l()}))):t(e.data.target).animate({left:e.data.startLeft,top:e.data.startTop},(function(){t(e.data.target).css("position",e.data.startPosition)})):(t(e.data.target).css({position:"absolute",left:t.fn.dragLengthC(e.data.left,p),top:t.fn.dragLengthC(e.data.top,p)}),u()),p.onStopDrag.call(e.data.target,e),t(document).unbind(".hidraggable"),setTimeout((function(){t("body").css("cursor","")}),100),!1}t.fn.hidraggable=function(e,n){return"string"==typeof e?t.fn.hidraggable.methods[e](this,n):this.each((function(){var n,o=t.data(this,"hidraggable");o?(o.handle.unbind(".hidraggable"),n=t.extend(o.options,e)):n=t.extend({},t.fn.hidraggable.defaults,t.fn.hidraggable.parseOptions(this),e||{});var r=n.handle?"string"==typeof n.handle?t(n.handle,this):n.handle:t(this);function a(e){var n=t.data(e.data.target,"hidraggable"),i=n.handle,o=t(i).offset(),r=t(i)[0].style.transform&&parseInt(t(i)[0].style.transform.slice(7,-1)),a=n.options.getScale(),s=t(i).outerWidth(),p=t(i).outerHeight();if(r){var l=r*Math.PI/180,u=t(i).outerWidth(),d=t(i).outerHeight(),h=Math.sin(l),c=Math.cos(l);s=Math.abs(u*c)+Math.abs(d*h),p=Math.abs(u*h)+Math.abs(d*c)}a&&(s*=a,p*=a);var f=e.pageY-o.top,g=o.left+s-e.pageX,m=o.top+p-e.pageY,v=e.pageX-o.left;return Math.min(f,g,m,v)>n.options.edge}t.data(this,"hidraggable",{options:n,handle:r}),n.disabled?t(this).css("cursor",""):r.unbind(".hidraggable").bind("mousemove.hidraggable",{target:this},(function(e){if(!t.fn.hidraggable.isDragging){var n=t.data(e.data.target,"hidraggable").options;a(e)?t(this).css("cursor",n.cursor):t(this).css("cursor","")}})).bind("mouseleave.hidraggable",{target:this},(function(e){t(this).css("cursor","")})).bind("mousedown.hidraggable",{target:this},(function(e){if(0!=a(e)){t(this).css("cursor","");var n=t(e.data.target).position(),o=t(e.data.target).offset(),r={startPosition:t(e.data.target).css("position"),startLeft:n.left,startTop:n.top,left:n.left,top:n.top,startX:e.pageX,startY:e.pageY,offsetWidth:e.pageX-o.left,offsetHeight:e.pageY-o.top,target:e.data.target,parent:t(e.data.target).parent()[0]},s=t.data(e.data.target,"hidraggable");if(!1===s.options.draggable)return;if("r resizebtn"==e.target.className)return;var p=s.options.getScale();p&&(r.left/=p,r.top/=p,r.startLeft/=p,r.startTop/=p);var d=r.target.style.transform&&parseInt(r.target.style.transform.slice(7,-1));if(d){var h=d*Math.PI/180,c=t(e.data.target).outerWidth(),f=t(e.data.target).outerHeight(),g=Math.sin(h),m=Math.cos(h),v=(Math.abs(c*m)+Math.abs(f*g)-c)/2,y=(Math.abs(c*g)+Math.abs(f*m)-f)/2;r.left+=v,r.top+=y,r.startLeft+=v,r.startTop+=y}t.extend(e.data,r),0!=t.data(e.data.target,"hidraggable").options.onBeforeDrag.call(e.data.target,e)&&(t(document).bind("mousedown.hidraggable",e.data,i),t(document).bind("mousemove.hidraggable",e.data,l),t(document).bind("mouseup.hidraggable",e.data,u))}}))}))},t.fn.hidraggable.methods={options:function(e){return t.data(e[0],"hidraggable").options},update:function(e,n){n&&"object"==typeof n&&t.data(e[0],"hidraggable")&&Object.keys(n).forEach((function(i){t.data(e[0],"hidraggable").options[i]=n[i]}))},proxy:function(e){return t.data(e[0],"hidraggable").proxy},enable:function(e){return e.each((function(){t(this).hidraggable({disabled:!1})}))},disable:function(e){return e.each((function(){t(this).hidraggable({disabled:!0})}))}},t.fn.hidraggable.parseOptions=function(e){var n=t(e);return t.extend({},t.hiprintparser.parseOptions(e,["cursor","handle","axis",{revert:"boolean",deltaX:"number",deltaY:"number",edge:"number"}]),{disabled:!!n.attr("disabled")||void 0})},t.fn.hidraggable.defaults={proxy:null,revert:!1,cursor:"move",deltaX:null,deltaY:null,handle:null,disabled:!1,edge:0,axis:null,getScale:function(t){},onBeforeDrag:function(t){},onStartDrag:function(t){},onDrag:function(t){},onStopDrag:function(t){}},t.fn.hidraggable.isDragging=!1}(R)},function(t,e){!function(t){t.fn.hidroppable=function(e,n){return"string"==typeof e?t.fn.hidroppable.methods[e](this,n):(e=e||{},this.each((function(){var n,i=t.data(this,"hidroppable");i?t.extend(i.options,e):(t(n=this).addClass("hidroppable"),t(n).bind("_dragenter",(function(e,i){t.data(n,"hidroppable").options.onDragEnter.apply(n,[e,i])})),t(n).bind("_dragleave",(function(e,i){t.data(n,"hidroppable").options.onDragLeave.apply(n,[e,i])})),t(n).bind("_dragover",(function(e,i){t.data(n,"hidroppable").options.onDragOver.apply(n,[e,i])})),t(n).bind("_drop",(function(e,i){t.data(n,"hidroppable").options.onDrop.apply(n,[e,i])})),t.data(this,"hidroppable",{options:t.extend({},t.fn.hidroppable.defaults,t.fn.hidroppable.parseOptions(this),e)}))})))},t.fn.hidroppable.methods={options:function(e){return t.data(e[0],"hidroppable").options},enable:function(e){return e.each((function(){t(this).hidroppable({disabled:!1})}))},disable:function(e){return e.each((function(){t(this).hidroppable({disabled:!0})}))}},t.fn.hidroppable.parseOptions=function(e){var n=t(e);return t.extend({},t.hiprintparser.parseOptions(e,["accept"]),{disabled:!!n.attr("disabled")||void 0})},t.fn.hidroppable.defaults={accept:null,disabled:!1,onDragEnter:function(t,e){},onDragOver:function(t,e){},onDragLeave:function(t,e){},onDrop:function(t,e){}}}(R)},function(t,e){var n;(n=R).hiprintparser={parseOptions:function(t,e){var i=n(t),o={},r=n.trim(i.attr("data-options"));if(r&&("{"!=r.substring(0,1)&&(r="{"+r+"}"),o=new Function("return "+r)()),e){for(var a={},s=0;s<e.length;s++){var p=e[s];if("string"==typeof p)a[p]="width"==p||"height"==p||"left"==p||"top"==p?parseInt(t.style[p])||void 0:i.attr(p);else for(var l in p){var u=p[l];"boolean"==u?a[l]=i.attr(l)?"true"==i.attr(l):void 0:"number"==u&&(a[l]="0"==i.attr(l)?0:parseFloat(i.attr(l))||void 0)}}n.extend(o,a)}return o}},n.fn.dragLengthC=function(t,e){return"pt"==e.moveUnit?n.fn.dragLengthCNum(t,e)+"pt":n.fn.dragLengthCNum(t,e)},n.fn.dragLengthCNum=function(t,e){var n=3;if("pt"==e.moveUnit){var i=.75*t;return e.minMove&&(n=e.minMove),Math.round(i/n)*n}return Math.round(i/n)*n}},function(t,e){var n,i,o;n=R,i={maxPanelIndex:0},(o=function(t){this.options=n.data(t.target,"hireizeable").options,this.init(t.target)}).prototype={numHandlerText:function(t){return this.numHandler(t)+"pt"},numHandler:function(t){var e=1.5,n=.75*t;return this.options.minResize&&(e=this.options.minResize),Math.round(n/e)*e},init:function(t){this.initResizeBox(t)},initResizeBox:function(t){var e=this;n(t).each((function(){var o;i.maxPanelIndex+=1,e.options.noContainer?o=n(t):(o=n("<div panelIndex="+i.maxPanelIndex+' class="resize-panel"></div>')).hide(),e.appendHandler(o,n(this));var r=n('<div class="n resizebtn"></div>'),a={name:"s",target:n('<div class="s resizebtn"></div>')},s={name:"w",target:n('<div class="w resizebtn"></div>')},p={name:"e",target:n('<div class="e resizebtn"></div>')},l={name:"ne",target:n('<div class="ne resizebtn"></div>')},u={name:"nw",target:n('<div class="nw resizebtn"></div>')},d={name:"se",target:n('<div class="se resizebtn"></div>')},h={name:"sw",target:n('<div class="sw resizebtn"></div>')},c=(r={name:"r",target:n('<div class="r resizebtn"></div>')},n('<div class="size-box" style="position: absolute;left:-2px;"></div>')),f=n('<div class="del-btn">\xd7</div>'),g=function(){var t=[],i=e.options.showPoints;return n.each([r,a,s,p,l,u,d,h],(function(e,o){n.inArray(o.name,i)>-1&&t.push(o.target)})),t};e.refreshSizeBox(void 0,c,o),0!=e.options.draggable&&(o.append(f),o.on("mousedown",".del-btn",(()=>{var e=new KeyboardEvent("keydown",{bubbles:!0,keyCode:46});t.dispatchEvent(e)}))),e.appendHandler(g(),o),e.bindResizeEvent(o,n(this));var m=n(this);n(o).on("mousedown",".resizebtn",(function(){m.addClass("resizeing")})),n(".easyui-droppable").on("mouseup",(function(){m.removeClass("resizeing")})),e.addHandlerCss(g()),e.bindTrigger(n(this))})),e.bindHidePanel()},addHandlerCss:function(t){for(var e=0;e<t.length;e++){var n=t[e],i=n.parent();n.height();if(n.hasClass("w")||n.hasClass("e")){let t=i.height(),e=Math.max(Math.min(n.height(),.6*t),8);n.css({top:(t-e)/2,height:e})}if(n.hasClass("s")||n.hasClass("n")||n.hasClass("r")){let t=i.width(),e=Math.max(Math.min(n.width(),.6*t),8);n.css({left:(t-e)/2,width:e})}}},appendHandler:function(t,e){e.find(".resize-panel").remove();for(var n=0;n<t.length;n++)e.append(t[n])},refreshSizeBox:function(t,e,n){if(this.options.showSizeBox){var i,o;if(e&&n.append(e),t&&t.length)i=t[0].style,o=t.children("div[panelindex]").find(".size-box");else if(n&&n.parent()){if((t=n.parent()).hasClass("hiprint-printPaper-content"))return;(i=t[0].style).width||(i.width=D.px.toPt(t[0].offsetWidth)+"pt"),i.height||(i.height=D.px.toPt(t[0].offsetHeight)+"pt"),o=t.children("div[panelindex]").find(".size-box")}o&&(o.text(i.width+" x "+i.height),o.css("top",-(o.outerHeight()||20)))}},triggerResize:function(t,e){e.ctrlKey||e.metaKey||(t.siblings().children("div[panelindex]").removeClass("selected"),t.siblings().children("div[panelindex]").css({display:"none"})),t.children("div[panelindex]").addClass("selected"),t.children("div[panelindex]").css({display:"block"}),this.refreshSizeBox(t)},bindResizeEvent:function(t,e){var i=this,o=0,r=0,a=t.width(),s=t.height(),p=t.offset().left,l=t.offset().top,u=i.options.noContainer?n(e):t.parent(),d=!1;t.on("mousedown",".e",(function(e){o=e.pageX,a=t.width(),d=!0}));var h=!1;t.on("mousedown",".s",(function(e){r=e.pageY,s=t.height(),h=!0}));var c=!1;t.on("mousedown",".w",(function(e){o=e.pageX,a=t.width(),c=!0,p=u.offset().left}));var f=!1;t.on("mousedown",".n",(function(e){r=e.pageY,s=t.height(),f=!0,l=u.offset().top}));var g=!1;t.on("mousedown",".ne",(function(e){o=e.pageX,r=e.pageY,a=t.width(),s=t.height(),g=!0,l=u.offset().top}));var m=!1;t.on("mousedown",".nw",(function(e){o=e.pageX,r=e.pageY,a=t.width(),s=t.height(),l=u.offset().top,p=u.offset().left,m=!0}));var v=!1;t.on("mousedown",".se",(function(e){o=e.pageX,r=e.pageY,a=t.width(),s=t.height(),v=!0}));var y=!1;t.on("mousedown",".sw",(function(e){o=e.pageX,r=e.pageY,a=t.width(),s=t.height(),y=!0,p=u.offset().left}));var b=!1;t.on("mousedown",".r",(function(e){o=e.pageX,r=e.pageY,a=t.width(),s=t.height(),b=!0,p=a/2+u.offset().left,l=s/2+u.offset().top})),t.on("dblclick",".r",(function(t){u.css({transform:"rotate(0deg)"}),i.options.onResize(t,void 0,void 0,void 0,void 0,0)}));var T=!1;t.on("mousedown",(function(t){i.options.onBeforeResize(),o=t.pageX,r=t.pageY,l=u.offset().top,p=u.offset().left,T=!1})),n(i.options.stage).on("mousemove",(function(e){if(d){var n=(e.pageX-o)/i.options.getScale();t.css({width:"100%"}),u.css({width:i.numHandlerText(a+n)}),i.options.onResize(e,void 0,i.numHandler(a+n),void 0,void 0)}else if(h){var w=(e.pageY-r)/i.options.getScale();t.css({height:"100%"}),u.css({height:i.numHandlerText(s+w)}),i.options.onResize(e,i.numHandler(s+w),void 0,void 0,void 0)}else if(b){t.css({height:"100%"});var E=e.pageX,x=(e.pageY,360*(E-o)/100);o=e.pageX;var P=(u[0].style.transform&&parseInt(u[0].style.transform.slice(7,-1))||0)+x;Math.abs(P)>360&&(P%=360),u.css({transform:"rotate("+P+"deg)"}),i.options.onResize(e,void 0,void 0,void 0,void 0,P)}else if(c)n=(e.pageX-o)/i.options.getScale(),t.css({width:"100%"}),u.css({width:i.numHandlerText(a-n),left:i.numHandlerText(i.options.noDrag?void 0:i.numHandler(p+n))}),i.options.onResize(e,void 0,i.numHandler(a-n),void 0,i.options.noDrag?void 0:i.numHandler(p+n));else if(f)w=(e.pageY-r)/i.options.getScale(),t.css({height:"100%"}),u.css({height:i.numHandlerText(s-w),top:i.numHandlerText(i.options.noDrag?void 0:l+w)}),i.options.onResize(e,i.numHandler(s-w),void 0,i.options.noDrag?void 0:i.numHandler(l+w),void 0);else if(g)n=(e.pageX-o)/i.options.getScale(),w=(e.pageY-r)/i.options.getScale(),t.css({height:"100%",width:"100%"}),u.css({height:i.numHandlerText(s-w),top:i.numHandlerText(i.options.noDrag?void 0:l+w),width:i.numHandlerText(a+n)}),i.options.onResize(e,i.numHandler(s-w),i.numHandler(a+n),i.options.noDrag?void 0:i.numHandler(l+w),void 0);else if(m)n=(e.pageX-o)/i.options.getScale(),w=(e.pageY-r)/i.options.getScale(),t.css({height:"100%",width:"100%"}),u.css({height:i.numHandlerText(s-w),top:i.numHandlerText(i.options.noDrag?void 0:l+w),width:i.numHandlerText(a-n),left:i.numHandlerText(i.options.noDrag?void 0:p+n)}),i.options.onResize(e,i.numHandler(s-w),i.numHandler(a-n),i.options.noDrag?void 0:i.numHandler(l+w),i.options.noDrag?void 0:i.numHandler(p+n));else if(v)if(n=(e.pageX-o)/i.options.getScale(),w=(e.pageY-r)/i.options.getScale(),t.css({width:"100%",height:"100%"}),e.shiftKey)u.css({width:i.numHandlerText(a+n),height:i.numHandlerText(s+w)}),i.options.onResize(e,i.numHandler(s+w),i.numHandler(a+n),void 0,void 0);else{var C,S=a+n;C=S*(s/a),u.css({width:i.numHandlerText(S),height:i.numHandlerText(C)}),i.options.onResize(e,i.numHandler(C),i.numHandler(S),void 0,void 0)}else y?(n=(e.pageX-o)/i.options.getScale(),w=(e.pageY-r)/i.options.getScale(),t.css({width:"100%",height:"100%"}),u.css({width:i.numHandlerText(a-n),left:i.numHandlerText(i.options.noDrag?void 0:p+n),height:i.numHandlerText(s+w)}),i.options.onResize(e,i.numHandler(s+w),i.numHandler(a-n),i.numHandler(otundefinedop),i.options.noDrag?void 0:i.numHandler(p+n))):T&&(n=(e.pageX-o)/i.options.getScale(),w=(e.pageY-r)/i.options.getScale(),u.css({left:i.numHandlerText(i.options.noDrag?void 0:p+n),top:i.numHandlerText(i.options.noDrag?void 0:l+w)}),i.options.onResize(e,void 0,void 0,i.options.noDrag?void 0:i.numHandler(l+w),i.options.noDrag?void 0:i.numHandler(p+n)))})).on("mouseup",(function(t){(d||h||c||f||g||m||y||v||T||b)&&i.options.onStopResize(b),d=!1,h=!1,c=!1,f=!1,g=!1,m=!1,y=!1,v=!1,T=!1,b=!1}))},bindTrigger:function(t){var e=this;t.on("click",(function(i){i.stopPropagation(),e.triggerResize(t,i),n(".mouseRect").remove()}))},bindHidePanel:function(t){if(i.maxPanelIndex<2){var e=this.options.stage;n(e).bind("click",(function(t){t.target.className&&"string"==O(t.target.className)&&t.target.className.includes("design")&&(t.stopPropagation(),n("div[panelindex]").css({display:"none"}),n("div[panelindex]").removeClass("selected"))}))}}},n.fn.extend({hireizeable:function(t){return this.each((function(){var e,i=n.data(this,"hireizeable");e=i?n.extend({},i.options,t||{}):n.extend({},n.fn.hireizeable.defaults,t||{}),n.data(this,"hireizeable",{options:e}),new o({target:this,onResize:function(t,e,n,i,o){},onStopResize:function(t,e,n,i,o){}})}))}}),n.fn.hireizeable.defaults={stage:document,reizeUnit:"pt",minResize:1.5,showSizeBox:!0,showPoints:["s","e"],noContainer:!1,onBeforeResize:function(t,e,n,i,o){},onResize:function(t,e,n,i,o){},onStopResize:function(t,e,n,i,o){},noDrag:!1}},function(t,e){var n,i;n="connected",i="reconnecting",H={opened:!1,name:"webSockets",host:"http://localhost:17521",token:"",reconnectTimeout:6e4,reconnectWindowSetTimeout:null,reconnectDelay:2e3,supportsKeepAlive:function(){return!0},hasIo:function(t){try{return g.io}catch(t){}return!1},send:function(t){try{this.socket.emit("news",t)}catch(e){console.log("send data error:"+(t||"")+JSON.stringify(e))}},sendByFragments:function(t){try{const{fragmentSize:e=5e4,sendInterval:n=10,html:i,generateHTMLInterval:o,printByFragments:r,...a}=t,s=t.html.length,p=Math.ceil(s/e);Array.apply(void 0,{length:p}).forEach(((t,o)=>{const r=o*e,l=o+1===e?s:(o+1)*e;setTimeout((()=>{this.socket.emit("printByFragments",{...a,index:o,total:p,htmlFragment:i.slice(r,l)})}),n*o)}))}catch(e){console.log("send data fragment error:"+(t||"")+JSON.stringify(e))}},getPrinterList:function(){return this.printerList},refreshPrinterList:function(){try{this.socket.emit("refreshPrinterList")}catch(t){console.log("refreshPrinterList error:"+JSON.stringify(t))}},getPaperSizeInfo:function(t){try{console.warn("getPaperSizeInfo \u662f\u4e00\u4e2a\u6d4b\u8bd5\u529f\u80fd\uff0c\u4ec5win\u5ba2\u6237\u7aef\u652f\u6301\u8be5api\uff01"),this.socket.emit("getPaperSizeInfo",t)}catch(t){console.log("getPaperSizeInfo error:"+JSON.stringify(t))}},getClients:function(){try{this.socket.emit("getClients")}catch(t){console.log("getClients error:"+JSON.stringify(t))}},getClientInfo:function(){try{this.socket.emit("getClientInfo")}catch(t){console.log("getClientInfo error:"+JSON.stringify(t))}},getAddress:function(t,...e){try{this.socket.emit("address",t,...e)}catch(t){console.log("getAddress error:"+JSON.stringify(t))}},ippPrint:function(t){try{this.socket.emit("ippPrint",t)}catch(t){console.log("ippPrint error:"+JSON.stringify(t))}},ippRequest:function(t){try{this.socket.emit("ippRequest",t)}catch(t){console.log("ippRequest error:"+JSON.stringify(t))}},setHost:function(t,e,n){"function"==typeof e&&(n=e,e=void 0),this.host=t,this.token=e,this.stop(),this.start(n)},start:function(t){var e=this,i=this;window.WebSocket?this.socket||(this.socket=(0,g.io)(this.host,{transports:["websocket"],reconnectionAttempts:5,auth:{token:this.token}}),this.socket.on("connect",(function(o){i.opened=!0,console.log("Websocket opened."),e.socket.on("success",(function(t){D.event.trigger("printSuccess_"+t.templateId,t)})),e.socket.on("error",(function(t){D.event.trigger("printError_"+t.templateId,t)})),e.socket.on("clients",(function(t){i.clients=t,D.event.trigger("clients",t)})),e.socket.on("clientInfo",(function(t){i.clientInfo=t,D.event.trigger("clientInfo",t)})),e.socket.on("printerList",(function(t){i.printerList=t,D.event.trigger("printerList",t)})),e.socket.on("paperSizeInfo",(function(t){i.paperSize=Array.isArray(t)?t:[t],D.event.trigger("paperSizeInfo",i.paperSize)})),e.socket.on("address",(function(t,e,n){D.event.trigger("address_"+t,{addr:e,e:n})})),e.socket.on("ippPrinterConnected",(function(t){D.event.trigger("ippPrinterConnected",t)})),e.socket.on("ippPrinterCallback",(function(t,e){D.event.trigger("ippPrinterCallback",{err:t,res:e})})),e.socket.on("ippRequestCallback",(function(t,e){D.event.trigger("ippRequestCallback",{err:t,res:e})})),i.state=n,t&&t(!0,o)})),this.socket.on("connect_error",(function(t){console.error(t),D.event.trigger("connect_error",t)})),this.socket.on("disconnect",(function(){i.opened=!1,t&&t(!1)}))):console.log("WebSocket start fail"),t&&t(!1)},reconnect:function(){this.state!==n&&this.state!==i||(this.stop(),this.ensureReconnectingState()&&(console.log("Websocket reconnecting."),this.start()))},stop:function(){this.socket&&(console.log("Closing the Websocket."),this.socket.close(),this.socket=null,this.printerList=[])},ensureReconnectingState:function(){return this.state=i,this.state===i}}},function(t,e,n){var i=n(28);"string"==typeof i&&(i=[[t.i,i,""]]);n(30)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(29)(!1)).push([t.i,".hicontextmenu{position:absolute;display:inline-block;width:215px;padding:0;margin:0;font-family:inherit;font-size:inherit;list-style:none;background:#fff;border:1px solid #bebebe;border-radius:2px;font-size:13px;}.hicontextmenuroot .hicontextmenuitem{position:relative;box-sizing:content-box;padding:.2em 12px;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;}.hicontextmenuroot>.hicontextmenuitem:hover,.hicontextmenuroot .hicontextmenuitem>a:hover{background-color:#f3f3f3;}.hicontextmenuroot .hicontextmenuitem>a{text-decoration:none;color:#363636;line-height:22px;}.hicontextmenuroot .hicontextsubmenu>ul{display:none;position:absolute;}.hicontextmenuroot .hicontextsubmenu:hover>ul{display:block;left:100%;top:-1px;margin-left:0;}.hicontextmenuroot .borderBottom{border-bottom:1px solid #efe6e6;}.hicontextmenuroot .disable>a{color:#ccc;}.hicontextmenuroot>.disable:hover,.hicontextmenuroot .disable>a:hover{background-color:#fff;}",""])},function(t,e,n){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,i=t[1]||"",o=t[3];if(!o)return i;if(e&&"function"==typeof btoa){var r=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map((function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"}));return[i].concat(a).concat([r]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];null!=r&&(i[r]=!0)}for(o=0;o<t.length;o++){var a=t[o];null!=a[0]&&i[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){var i,o,r={},a=(i=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=i.apply(this,arguments)),o}),s=function(){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var i=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,e,n);if(window.HTMLIFrameElement&&S(i,window.HTMLIFrameElement))try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}}(),p=null,l=0,u=[],d=n(31);function h(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=r[i.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](i.parts[a]);for(;a<i.parts.length;a++)o.parts.push(y(i.parts[a],e))}else{var s=[];for(a=0;a<i.parts.length;a++)s.push(y(i.parts[a],e));r[i.id]={id:i.id,refs:1,parts:s}}}}function c(t,e){for(var n=[],i={},o=0;o<t.length;o++){var r=t[o],a=e.base?r[0]+e.base:r[0],s={css:r[1],media:r[2],sourceMap:r[3]};i[a]?i[a].parts.push(s):n.push(i[a]={id:a,parts:[s]})}return n}function f(t,e){var n=s(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=u[u.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),u.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=O(t.insertAt)||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=s(t.insertAt.before,n);n.insertBefore(e,o)}}function g(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=u.indexOf(t);e>=0&&u.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var i=n.nc;i&&(t.attrs.nonce=i)}return v(e,t.attrs),f(t,e),e}function v(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function y(t,e){var n,i,o,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var a=l++;n=p||(p=m(e)),i=w.bind(null,n,a,!1),o=w.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),f(t,e),e}(e),i=function(t,e,n){var i=n.css,o=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||r)&&(i=d(i)),o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([i],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),o=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),i=function(t,e){var n=e.css,i=e.media;if(i&&t.setAttribute("media",i),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){g(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=("undefined"==typeof document?"undefined":O(document)))throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==O(e.attrs)?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=c(t,e);return h(n,e),function(t){for(var i=[],o=0;o<n.length;o++){var a=n[o];(s=r[a.id]).refs--,i.push(s)}for(t&&h(c(t,e),e),o=0;o<i.length;o++){var s;if(0===(s=i[o]).refs){for(var p=0;p<s.parts.length;p++)s.parts[p]();delete r[s.id]}}}};var b,T=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function w(t,e,n,i){var o=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=T(e,o);else{var r=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,i=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,r=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(o=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(t,e){var n,i;window,document,n=R,(i=function(t,e){this.init(t,e)}).prototype={init:function(t,e){this.ele=t,this.defaults={menu:[{text:"text",menus:[{},{}],callback:function(){}}],target:function(t){},width:100,itemHeight:28,bgColor:"#fff",color:"#333",fontSize:14,hoverBgColor:"#f5f5f5"},this.opts=n.extend(!0,{},this.defaults,e),this.random=(new Date).getTime()+parseInt(1e3*Math.random()),this.eventBind()},renderMenu:function(t,e){var n=this,i=e;if(t&&t.length){var o=p()('<ul class="hicontextmenu" style="z-index: 9999;"></ul>');i||(i=o).addClass("hicontextmenuroot"),p().each(t,(function(t,e){var i=!!e.disable&&e.disable(),r=p()('<li class="hicontextmenuitem"><a href="javascript:void(0);"><span>'+(e.text||"")+"</span></a></li>");i&&r.addClass("disable"),e.borderBottom&&r.addClass("borderBottom"),e.menus&&(r.addClass("hicontextsubmenu"),n.renderMenu(e.menus,r)),e.callback&&r.click((function(t){p()(this).hasClass("disable")||(p()(".hicontextmenuroot").remove(),e.callback()),t.stopPropagation()})),o.append(r)})),e&&e.append(o)}e||p()("body").append(i).find(".hicontextmenuroot").hide()},setPosition:function(t){p()(".hicontextmenuroot").css({left:t.pageX+2,top:t.pageY+2}).show()},eventBind:function(){var t=this;this.ele.on("contextmenu",(function(e){p()(".hicontextmenuroot").remove(),e.preventDefault(),t.renderMenu(t.opts.menus),t.setPosition(e),t.opts.target&&"function"==typeof t.opts.target&&t.opts.target(n(this))})),n("body").on("click",(function(){n(".hicontextmenuroot").remove()}))}},n.fn.hicontextMenu=function(t){return new i(this,t),this}},function(t,e,n){n.r(e),n(22),n(23),n(24),n(25);var i=n(0);n(26),n(27),n(32);var o,r,a,s,l,u,d,h,g,m,v,y,T,x,C=function(){function t(){this.allElementTypes=[]}return Object.defineProperty(t,"instance",{get:function(){return t._instance||(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t.prototype.addPrintElementTypes=function(t,e){var n=this;this[t]?this[t]=this[t].concat(e):this[t]=e,e.forEach((function(t){n.allElementTypes=n.allElementTypes.concat(t.printElementTypes)}))},t.prototype.removePrintElementTypes=function(t){var e=this;delete e[t],e.allElementTypes=e.allElementTypes.filter((function(e){return!e.tid.startsWith(t)}))},t.prototype.getElementTypeGroups=function(t){return this[this.formatterModule(t)]||[]},t.prototype.getElementType=function(t){var e=this.allElementTypes.filter((function(e){return e.tid==t}));if(e.length>0)return e[0]},t.prototype.updateElementType=function(t,e){var n=this.getElementType(t);if(e){var i=e(n),o=this.allElementTypes.findIndex((function(e){return e.tid==t}));if(o>=0)return this.allElementTypes.splice(o,1,i),i}return n},t.prototype.formatterModule=function(t){return t||"_default"},t}(),I=n(1),R=n(2),k=function(){function t(){}return t.prototype.createPrintElementTypeHtml=function(t,e){var n=p()('<ul class="hiprint-printElement-type"></ul>');return e.forEach((function(t){var e=p()("<li></li>");e.append('<span class="title">'+t.name+"</span>");var i=p()("<ul></ul>");e.append(i),t.printElementTypes.forEach((function(t){i.append('<li><a class="ep-draggable-item" tid="'+t.tid+'"> '+t.getText()+" </a></li>")})),n.append(e)})),p()(t).append(n),n.find(".ep-draggable-item")},t}(),M=n(5),_=n(15),B=function(t){this.title=t.title,this.type=t.type},N=function(t){this.title=t.title,this.type=t.type,this.editable=t.editable,this.columnDisplayEditable=t.columnDisplayEditable,this.columnDisplayIndexEditable=t.columnDisplayIndexEditable,this.columnTitleEditable=t.columnTitleEditable,this.columnResizable=t.columnResizable,this.columnAlignEditable=t.columnAlignEditable,this.isEnableEditField=t.isEnableEditField,this.isEnableContextMenu=t.isEnableContextMenu,this.isEnableInsertRow=t.isEnableInsertRow,this.isEnableDeleteRow=t.isEnableDeleteRow,this.isEnableInsertColumn=t.isEnableInsertColumn,this.isEnableDeleteColumn=t.isEnableDeleteColumn,this.isEnableMergeCell=t.isEnableMergeCell},V=function(){function t(t){var e=this;this.text=t.text,this.field=t.field,this.fields=t.fields,this.title=t.title,this.tid=t.tid,this.data=t.data,this.styler=t.styler,this.formatter=t.formatter,this.type=t.type,this.options=t.options,this.editable=null==t.editable||t.editable,this.columnDisplayEditable=null==t.columnDisplayEditable||t.columnDisplayEditable,this.columnDisplayIndexEditable=null==t.columnDisplayIndexEditable||t.columnDisplayIndexEditable,this.columnTitleEditable=null==t.columnTitleEditable||t.columnTitleEditable,this.columnResizable=null==t.columnResizable||t.columnResizable,this.columnAlignEditable=null==t.columnAlignEditable||t.columnAlignEditable,this.columns=[],(t.columns||[]).forEach((function(t,n){e.columns.push(e.createTableColumnArray(t))})),this.rowStyler=t.rowStyler,this.striped=t.striped,this.groupFields=t.groupFields||[],this.groupFormatter=t.groupFormatter,this.groupFooterFormatter=t.groupFooterFormatter,this.footerFormatter=t.footerFormatter,this.rowsColumnsMerge=t.rowsColumnsMerge,this.rowsColumnsMergeClean=t.rowsColumnsMergeClean,this.groupSequenceContinue=t.groupSequenceContinue,this.gridColumnsFooterFormatter=t.gridColumnsFooterFormatter,this.isEnableEditField=null==t.isEnableEditField||t.isEnableEditField,this.isEnableContextMenu=null==t.isEnableContextMenu||t.isEnableContextMenu,this.isEnableInsertRow=null==t.isEnableInsertRow||t.isEnableInsertRow,this.isEnableDeleteRow=null==t.isEnableDeleteRow||t.isEnableDeleteRow,this.isEnableInsertColumn=null==t.isEnableInsertColumn||t.isEnableInsertColumn,this.isEnableDeleteColumn=null==t.isEnableDeleteColumn||t.isEnableDeleteColumn,this.isEnableMergeCell=null==t.isEnableMergeCell||t.isEnableMergeCell,this.columnObj=this.makeColumnObj()}return t.prototype.getText=function(){return this.text||this.title||""},t.prototype.createPrintElement=function(t){var e=this;return this.columns&&0==this.columns.length&&(t.columns||[]).forEach((function(t,n){e.columns.push(e.createTableColumnArray(t))})),new _.a(this,t)},t.prototype.getData=function(){return[{}]},t.prototype.createTableColumnArray=function(t){var e=[];return t.forEach((function(t,n){e.push(new M.a(t))})),e},t.prototype.getPrintElementTypeEntity=function(){return"table"==this.type?new N({title:this.title,type:this.type,editable:this.editable,columnDisplayEditable:this.columnDisplayEditable,columnDisplayIndexEditable:this.columnDisplayIndexEditable,columnResizable:this.columnResizable,columnAlignEditable:this.columnAlignEditable,columnTitleEditable:this.columnTitleEditable,isEnableEditField:this.isEnableEditField,isEnableContextMenu:this.isEnableContextMenu,isEnableInsertRow:this.isEnableInsertRow,isEnableDeleteRow:this.isEnableDeleteRow,isEnableInsertColumn:this.isEnableInsertColumn,isEnableDeleteColumn:this.isEnableDeleteColumn,isEnableMergeCell:this.isEnableMergeCell}):new B({title:this.title,type:this.type})},t.prototype.getFields=function(){return this.fields},t.prototype.getOptions=function(){return this.options||{}},t.prototype.getColumnByColumnId=function(t){return this.columnObj[t]},t.prototype.makeColumnObj=function(t){var e={};return t?t.forEach((function(t){(t.id||t.columnId)&&(e[t.id||t.columnId]=t)})):this.columns&&this.columns.forEach((function(t){t.forEach((function(t){(t.id||t.columnId)&&(e[t.id||t.columnId]=t)}))})),this.columnObj=e,e},t}(),A=n(4),z=n(3),j=(o=function(t,e){return(o=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),W=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.image.default).getPrintElementOptionEntity()),i}return j(e,t),e.prototype.getReizeableShowPoints=function(){return["s","e","se","r"]},e.prototype.getData=function(t){var e="",n=this.getField();e=t&&n?n.split(".").reduce(((e,n)=>e?e[n]:t[n]),!1)||"":this.options.src||this.printElementType.getData();var i=this.getFormatter();return i&&(e=i(e,this.options,this._currenttemplateData)),e||""},e.prototype.createTarget=function(t,e){var n=p()('<div class="hiprint-printElement hiprint-printElement-image" style="position: absolute;"><div class="hiprint-printElement-image-content" style="height:100%;width:100%"></div></div>');return this.updateTargetImage(n,t,e),n},e.prototype.initSizeByHtml=function(e){t.prototype.initSizeByHtml.call(this,e),this.css(e,this.getData())},e.prototype.getConfigOptions=function(){return I.a.instance.image},e.prototype.updateDesignViewFromOptions=function(){this.designTarget&&(this.css(this.designTarget,this.getData()),this.updateTargetImage(this.designTarget,this.getTitle(),this.getData()))},e.prototype.updateTargetImage=function(t,e,n){var i=t.find(".hiprint-printElement-image-content");i.find("img").length?i.find("img").attr("src",n):i.html('<img style="width:100%;height:100%;" src="'+n+'">'),n.length?i.find("img").css("cssText",`width:100%;height:100%;content:url("${n}")!important`):i.find("img").css("cssText","width:100%;height:100%;"),this.options.fit&&i.find("img").css("object-fit",this.options.fit),this.options.borderRadius&&i.find("img").css("border-radius",this.options.borderRadius)},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(A.a),Y=(x=function(t,e){return(x=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),G=function(t){function e(e){var n=this;return e=e||{},(n=t.call(this,e)||this).leftSpaceRemoved=e.leftSpaceRemoved,n}return Y(e,t),e.prototype.getHideTitle=function(){return null==this.hideTitle?this.defaultOptions.hideTitle:this.hideTitle},e}(z.a),$=n(8),q=function(){function t(t,e,n,o,r,a,s,l,u,d,h,c,f,g,m,v){this.panelPageRule=o,this.scale=r,this.watermarkOptions=n,this.defaultPaperNumberFormat="${page}-${total}",this.printLine=0,this.templateId=t,this.panelIdx=e,this.width=i.a.mm.toPt(a),this.height=i.a.mm.toPt(s),this.mmwidth=a,this.mmheight=s,this.paperHeader=l>=0?l:0,this.paperFooter=u,this.contentHeight=u-l,this.createTarget(),this.index=m,this.paperNumberLeft=d||parseInt((this.width-30).toString()),this.paperNumberTop=h||parseInt((this.height-22).toString()),this.paperNumberDisabled=c,this.paperNumberContinue=f,this.paperNumberFormat=g,this.referenceElement=v?p().extend({},v):new $.a({top:0,left:0,height:0,width:0,bottomInLastPaper:0,beginPrintPaperIndex:0,printTopInPaper:0,endPrintPaperIndex:0})}return t.prototype.subscribePaperBaseInfoChanged=function(t){this.onPaperBaseInfoChanged=t},t.prototype.triggerOnPaperBaseInfoChanged=function(t){this.onPaperBaseInfoChanged&&this.onPaperBaseInfoChanged({panelPageRule:this.panelPageRule,scale:this.scale,paperHeader:this.paperHeader,paperFooter:this.paperFooter,paperNumberLeft:this.paperNumberLeft,paperNumberTop:this.paperNumberTop,paperNumberDisabled:this.paperNumberDisabled,paperNumberContinue:this.paperNumberContinue,paperNumberFormat:this.paperNumberFormat}),i.a.event.trigger("hiprintTemplateDataChanged_"+this.templateId,t||"\u6a21\u677f\u8c03\u6574")},t.prototype.setFooter=function(t,e,n,i){this.firstPaperFooter=t,this.evenPaperFooter=e,this.oddPaperFooter=n,this.lastPaperFooter=i},t.prototype.setOffset=function(t,e){this.setLeftOffset(t),this.setTopOffset(e)},t.prototype.setLeftOffset=function(t){t?this.paperContentTarget.css("left",t+"pt"):this.paperContentTarget[0].style.left=""},t.prototype.setTopOffset=function(t){t?this.paperContentTarget.css("top",t+"pt"):this.paperContentTarget[0].style.top=""},t.prototype.createTarget=function(){this.target=p()('<div class="hiprint-printPaper"><div class="hiprint-printPaper-content"></div></div>'),this.paperContentTarget=this.target.find(".hiprint-printPaper-content"),this.target.css("width",this.mmwidth+"mm"),this.target.css("height",this.mmheight-I.a.instance.paperHeightTrim+"mm"),this.target.attr("original-height",this.mmheight),this.zoom(this.scale)},t.prototype.createHeaderLine=function(){var t=this;this.headerLinetarget=p()('<div class="hiprint-headerLine" style="position: absolute;width: 100%;border-top: 1px dashed #c9bebe;height: 7pt;"></div>'),this.headerLinetarget.css("top",(this.paperHeader||-1)+"pt"),0==this.paperHeader&&this.headerLinetarget.addClass("hideheaderLinetarget"),this.paperContentTarget.append(this.headerLinetarget),this.dragHeadLineOrFootLine(this.headerLinetarget,(function(e,n){n>=t.paperFooter&&(n=t.paperFooter-10),t.paperHeader=n>=0?n:0,t.triggerOnPaperBaseInfoChanged()}))},t.prototype.createFooterLine=function(){var t=this;this.footerLinetarget=p()('<div class="hiprint-footerLine" style="position: absolute;width: 100%;border-top: 1px dashed #c9bebe;height: 7pt;"></div>'),this.footerLinetarget.css("top",parseInt(this.paperFooter.toString())+"pt"),this.paperFooter==this.height&&(this.footerLinetarget.css("top",this.mmheight-I.a.instance.paperHeightTrim+"mm"),this.footerLinetarget.addClass("hidefooterLinetarget")),this.paperContentTarget.append(this.footerLinetarget),this.dragHeadLineOrFootLine(this.footerLinetarget,(function(e,n){n<=t.paperHeader&&(n=t.paperHeader+10),t.paperFooter=n,t.triggerOnPaperBaseInfoChanged()}))},t.prototype.createPaperNumber=function(t,e){var n=this,i=this.target.find(".hiprint-paperNumber");if(i.length)return i.html(t),i;var o=p()('<span class="hiprint-paperNumber" style="position: absolute">'+t+"</span>");return o.css("top",this.paperNumberTop+"pt"),o.css("left",this.paperNumberLeft+"pt"),this.paperContentTarget.append(o),e&&this.dragHeadLineOrFootLine(o,(function(t,e){n.paperNumberTop=e,n.paperNumberLeft=t,n.triggerOnPaperBaseInfoChanged()}),!0),o},t.prototype.getTarget=function(){return this.target},t.prototype.append=function(t){this.paperContentTarget.append(t)},t.prototype.updateReferenceElement=function(t){t&&(this.referenceElement=t)},t.prototype.updatePrintLine=function(t){t>=this.printLine&&(this.printLine=t)},t.prototype.design=function(t){var e=this;this.createHeaderLine(),this.createFooterLine(),this.target.addClass("design"),this.target.on("contextmenu",(()=>!1)),t&&t.grid&&this.target.addClass("grid"),this.paperNumberTarget=this.createPaperNumber(this.formatPaperNumber(1,1),!0),t&&t.ruler&&this.createRuler(),this.createWaterMark(!0,this.panelIdx,this.watermarkOptions),this.resetPaperNumber(this.paperNumberTarget),p()(this.paperNumberTarget).bind("dblclick.hiprint",(function(){null==e.paperNumberDisabled&&(e.paperNumberDisabled=!1),e.paperNumberDisabled=!e.paperNumberDisabled,e.resetPaperNumber(e.paperNumberTarget),e.triggerOnPaperBaseInfoChanged("\u521d\u59cb")})),p()(this.paperNumberTarget).bind("click.hiprint",(function(){i.a.event.trigger("BuildCustomOptionSettingEventKey_"+e.templateId,{options:{paperNumberFormat:e.paperNumberFormat,paperNumberDisabled:e.paperNumberDisabled,paperNumberContinue:e.paperNumberContinue},callback:function(t){e.paperNumberDisabled=!!t.paperNumberDisabled||void 0,e.paperNumberContinue=t.paperNumberContinue,e.paperNumberFormat=t.paperNumberFormat?t.paperNumberFormat:void 0,e.createPaperNumber(e.formatPaperNumber(1,1),!0),e.resetPaperNumber(e.paperNumberTarget),e.triggerOnPaperBaseInfoChanged()}})}))},t.prototype.resetPaperNumber=function(t){this.paperNumberDisabled?t.addClass("hiprint-paperNumber-disabled"):t.removeClass("hiprint-paperNumber-disabled")},t.prototype.updatePaperNumber=function(t,e,n){var i=this.createPaperNumber(this.formatPaperNumber(t,e));this.paperNumberDisabled?i.hide():n&&this.index%2==1&&(i[0].style.left="",i.css("right",this.paperNumberLeft+"pt"))},t.prototype.formatPaperNumber=function(t,e){return this.createWaterMark(!1,t,this.watermarkOptions),(this.paperNumberFormat?this.paperNumberFormat:this.defaultPaperNumberFormat).replace("${page}",t).replace("${total}",e)},t.prototype.dragHeadLineOrFootLine=function(t,e,n){var i=this;t.hidraggable({axis:n?void 0:"v",onDrag:function(t,n,i){e(n,i)},moveUnit:"pt",minMove:I.a.instance.movingDistance,onBeforeDrag:function(t){R.a.instance.draging=!0},getScale:function(){return i.scale||1},onStopDrag:function(t){i.headerLinetarget.css("top",i.paperHeader+"pt"),i.footerLinetarget.css("top",i.paperFooter+"pt"),R.a.instance.draging=!1,i.footerLinetarget.removeClass("hidefooterLinetarget"),i.headerLinetarget.removeClass("hideheaderLinetarget")}})},t.prototype.resize=function(t,e){var n=this.paperFooter/this.height;this.width=i.a.mm.toPt(t),this.height=i.a.mm.toPt(e),this.mmwidth=t,this.mmheight=e,this.target.css("width",t+"mm"),this.target.css("height",e-I.a.instance.paperHeightTrim+"mm"),this.target.attr("original-height",this.mmheight);var o=this.height*n;this.paperFooter=o||this.height,this.footerLinetarget.css("top",o+"pt"),this.contentHeight=this.paperFooter-this.paperHeader,this.paperNumberLeft=this.paperNumberLeft>this.width?parseInt((this.width-30).toString()):this.paperNumberLeft,this.paperNumberTop=this.paperNumberTop>this.height?this.paperNumberTop=parseInt((this.height-22).toString()):this.paperNumberTop,this.paperNumberTarget.css("top",this.paperNumberTop+"pt"),this.paperNumberTarget.css("left",this.paperNumberLeft+"pt"),this.triggerOnPaperBaseInfoChanged("\u8c03\u6574\u5927\u5c0f")},t.prototype.zoom=function(t){t&&(this.scale=t,this.target.css("transform","scale("+t+")"),t>1?this.target.css("transform-origin","-"+t+"% -"+t+"%"):this.target.css("transform-origin","0 0"),this.triggerOnPaperBaseInfoChanged("\u7f29\u653e"))},t.prototype.getPaperFooter=function(t){var e=this.index+t;return 0==e?this.firstPaperFooter?this.firstPaperFooter:this.oddPaperFooter?this.oddPaperFooter:this.paperFooter:e%2==0?this.oddPaperFooter?this.oddPaperFooter:this.paperFooter:e%2==1?this.evenPaperFooter?this.evenPaperFooter:this.paperFooter:void 0},t.prototype.getContentHeight=function(t){return this.getPaperFooter(t)-this.paperHeader},t.prototype.createRuler=function(){this.target.append('<div class="hiprint_rul_wrapper"><div class="h_img" ></div><div class="v_img" ></div></div>')},t.prototype.createWaterMark=function(t,e,n){var i=this,o=Object.assign({},n||{},{id:`${i.templateId}_${i.panelIdx}_${e||1}_${t?"design":i.index}`,watch:t,container:i.target[0]});o.container&&(o.content?(t&&f(Object.assign({},o,{id:`${i.templateId}_${i.panelIdx}_${e||1}_${i.index}`})),c(o)):f(o))},t.prototype.displayHeight=function(){return this.mmheight-I.a.instance.paperHeightTrim+"mm"},t.prototype.displayWidth=function(){return this.mmwidth+"mm"},t.prototype.getPanelTarget=function(){return this.target.parent(".hiprint-printPanel ")},t}(),X=n(6),U=(T=function(t,e){return(T=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}T(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),K=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new G(n),i.options.setDefault(new G(I.a.instance.longText.default).getPrintElementOptionEntity()),i}return U(e,t),e.prototype.getDesignTarget=function(e){var n=t.prototype.getDesignTarget.call(this,e);return n.find(".hiprint-printElement-longText-content").css("border","1px dashed var(--hiprint-border)"),n},e.prototype.getProxyTarget=function(t){t&&this.SetProxyTargetOption(t);var e=this.getData(),n=this.createTarget(this.printElementType.getText(!0),e);return this.updateTargetSize(n),this.css(n,e),n},e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData(),e=this.getHtml(this.designPaper)[0].target;this.designTarget.find(".hiprint-printElement-longText-content").html(e.find(".hiprint-printElement-longText-content").html()),this.css(this.designTarget,t)}},e.prototype.getConfigOptions=function(){return I.a.instance.longText},e.prototype.getTitle=function(){return this.options.title||this.printElementType.title},e.prototype.getData=function(t){var e=this.getField(),n=e&&e.split(".").reduce(((e,n)=>e?e[n]:t?t[n]:""),!1)||"";return t?n||"":this.options.testData||this.printElementType.getData()||""},e.prototype.updateTargetText=function(t,e,n){var i=t.find(".hiprint-printElement-longText-content"),o=this.getText(e,n);i.html(o)},e.prototype.createTarget=function(t,e){var n=p()('<div class="hiprint-printElement hiprint-printElement-longText" style="position: absolute;"><div class="hiprint-printElement-longText-content hiprint-printElement-content" style="height:100%;width:100%"></div></div>');return this.updateTargetText(n,t,e),n},e.prototype.getText=function(t,e){var n=this.getFormatter();return e&&(e=0!=this.options.leftSpaceRemoved?e.toString().replace(/^\s*/,""):e),(this.getField()?(this.options.getHideTitle()?"":t?t+"\uff1a":"")+(n?n(t,e,this.options,this._currenttemplateData):e):n?n(t,t,this.options,this._currenttemplateData):t||"")||""},e.prototype.getHtml=function(t,e){this.setCurrenttemplateData(e),this.createTempContainer();var n=this.getPaperHtmlResult(t,e);return this.removeTempContainer(),n},e.prototype.getHeightByData=function(t){this.createTempContainer();var e=this.getPaperHtmlResult(new q("","",void 0,1e3,1e3,0,25e3,0,0,!0,!0,void 0,0,void 0),{},t);return this.removeTempContainer(),e[0].referenceElement.bottomInLastPaper-e[0].referenceElement.printTopInPaper},e.prototype.getLongTextIndent=function(){return this.options.longTextIndent?'<span class="long-text-indent" style="margin-left:'+this.options.longTextIndent+'pt"></span>':'<span class="long-text-indent"></span>'},e.prototype.getPaperHtmlResult=function(t,e,n){var i=this,o=[],r=0,a=n||this.getData(e),s=this.getText(this.getTitle(),a),p=this.createTarget(this.getTitle(),this.options.testData||"");this.css(p,a),e?this.updateTargetWidth(p):this.updateTargetSize(p),this.getTempContainer().html(""),this.getTempContainer().append(p);var l=[this.getLongTextIndent()],u=s.split(new RegExp("\r|\n","g"));if(u.forEach((function(t,e){var n=0!=i.options.leftSpaceRemoved?(t||"").toString().replace(/^\s*/,""):t;l=l.concat(n.split("")),e<u.length-1&&l.push("<br/>"+i.getLongTextIndent())})),0==l.length&&(l=[""]),this.isHeaderOrFooter()||this.isFixed()||!e)return(f=this.getStringBySpecificHeight(l,25e3,p)).target.css("left",this.options.displayLeft()),f.target.css("top",this.options.displayTop()),f.target[0].height="",o.push(new X.a({target:f.target,printLine:this.options.displayTop()+f.height,referenceElement:new $.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:this.options.getTop()+f.height,printTopInPaper:this.options.getTop()})})),o;for(var d=this.getBeginPrintTopInPaperByReferenceElement(t);l.length>0;){var h=0,c=t.getPaperFooter(r);0==r&&d>c&&"none"!=t.panelPageRule&&(d=d-c+t.paperHeader,o.push(new X.a({target:void 0,printLine:void 0})),r++,h=t.getContentHeight(r)-(d-t.paperHeader),c=t.getPaperFooter(r));var f=this.getStringBySpecificHeight(l,h>0?h:0==r?c-d:t.getContentHeight(r),p);l.splice(0,f.length);var g=void 0,m=void 0;f.target.css("left",this.options.displayLeft()),f.target[0].height="",0==r||h>0?(m=d,f.target.css("top",m+"pt"),g=l.length>0?d+f.height:null!=this.options.lHeight?d+(f.height>this.options.lHeight?f.height:this.options.lHeight):d+f.height):(m=t.paperHeader,f.target.css("top",m+"pt"),g=m+f.height),o.push(new X.a({target:f.target,printLine:g,referenceElement:new $.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:g,printTopInPaper:m})})),r++,e&&this.updatePanelHeight(g+this.options.getHeight(),t)}return o},e.prototype.getStringBySpecificHeight=function(t,e,n){var o=i.a.pt.toPx(e),r=void 0;return(r="none"==this.panel.panelPageRule?this.IsPaginationIndex(t,t.length,-1,n):this.IsPaginationIndex(t,t.length-1,o,n)).IsPagination?r:this.BinarySearch(t,0,t.length-1,o,n)},e.prototype.BinarySearch=function(t,e,n,i,o){var r=Math.floor((e+n)/2);if(e>n)return o.find(".hiprint-printElement-longText-content").html(""),{IsPagination:!0,height:0,length:0,target:o.clone()};var a=this.IsPaginationIndex(t,r,i,o);return a.IsPagination?a:"l"==a.move?this.BinarySearch(t,e,r-1,i,o):this.BinarySearch(t,r+1,n,i,o)},e.prototype.IsPaginationIndex=function(t,e,n,o){if(-1==n){o.find(".hiprint-printElement-longText-content").html(t.slice(0,e).join(""));var r=o.height();return{IsPagination:!0,height:i.a.px.toPt(r),length:t.length,target:o.clone()}}o.find(".hiprint-printElement-longText-content").html(t.slice(0,e+2).join(""));var a=o.height();o.find(".hiprint-printElement-longText-content").html(t.slice(0,e+1).join(""));r=o.height();return e>=t.length-1&&r<n?{IsPagination:!0,height:i.a.px.toPt(r),length:t.length,target:o.clone()}:r<=n&&a>=n?{IsPagination:!0,height:r,length:e+1,target:o.clone()}:r>=n?{IsPagination:!1,move:"l"}:a<=n?{IsPagination:!1,move:"r"}:{IsPagination:!0,result:1}},e}(A.a),J=function(){function t(){}return t.replaceEnterAndNewline=function(t,e){return t.replace(new RegExp("\r|\n|/g","g"),e)},t.replaceTab=function(t,e){return t.replace(new RegExp("\t/g","g"),e)},t.replaceEnterAndNewlineAndTab=function(t,e){return t.replace(new RegExp("\r|\n|\t|/g","g"),e)},t}(),Q=(y=function(t,e){return(y=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Z=function(t){function e(e){var n=t.call(this,e)||this;return n.title&&(n.title=J.replaceEnterAndNewlineAndTab(n.title,"")),n}return Q(e,t),e.prototype.getHideTitle=function(){return null==this.hideTitle?this.defaultOptions.hideTitle:this.hideTitle},e.prototype.getTextType=function(){return(null==this.textType?this.defaultOptions.textType:this.textType)||"text"},e.prototype.getFontSize=function(){return(null==this.fontSize?this.defaultOptions.fontSize:this.fontSize)||9},e.prototype.getbarcodeMode=function(){return(null==this.barcodeMode?this.defaultOptions.barcodeMode:this.barcodeMode)||"CODE128"},e.prototype.getBarTextMode=function(){return(null==this.barTextMode?this.defaultOptions.barTextMode:this.barTextMode)||"text"},e.prototype.getBarWidth=function(){return(null==this.barWidth?this.defaultOptions.barWidth:this.barWidth)||1},e.prototype.getBarAutoWidth=function(){return(null==this.barAutoWidth?"true"===this.defaultOptions.barAutoWidth:"true"===this.barAutoWidth)??!0},e.prototype.getQRcodeLevel=function(){return(null==this.qrCodeLevel?this.defaultOptions.qrCodeLevel:this.qrCodeLevel)||0},e}(z.a),tt=(v=function(t,e){return(v=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),et=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new Z(n),i.options.setDefault(new Z(I.a.instance.text.default).getPrintElementOptionEntity()),i}return tt(e,t),e.prototype.getDesignTarget=function(e){return t.prototype.getDesignTarget.call(this,e)},e.prototype.getProxyTarget=function(t){t&&this.SetProxyTargetOption(t);var e=this.getData(),n=this.createTarget(this.printElementType.getText(!0),e);return this.updateTargetSize(n),this.css(n,e),n},e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t),this.updateTargetText(this.designTarget,this.getTitle(),t)}},e.prototype.getConfigOptions=function(){return I.a.instance.text},e.prototype.getTitle=function(){var t=this.options.title||this.printElementType.title||"";return t&&(t=J.replaceEnterAndNewlineAndTab(t,"")),t},e.prototype.getData=function(t){let e;const n=this.getField();if(e=t?n&&n.split(".").reduce(((e,n)=>e?e[n]:t[n]||""),"")||"":this.options.testData||this.printElementType.getData()||"",this.options.format){const{dataType:o,format:r}=this.options;if("datetime"===o)return i.a.dateFormat(e,r);if("boolean"===o){const[t,n]=r.split(":");if(t&&n)return!0===e||"true"===e?t:n}if("format"===o){return P({key:n,value:e,source:t,format:this.options.format})}}return e},e.prototype.updateTargetText=function(t,e,n,o,r){var a,s=this.getFormatter(),l=t.find(".hiprint-printElement-text-content");a=this.getField()?(this.options.getHideTitle()?"":e?e+"\uff1a":"")+D.toUpperCase(this.options.upperCase,s?s(e,n,this.options,this._currenttemplateData,t):n):n=D.toUpperCase(this.options.upperCase,s?s(e,e,this.options,this._currenttemplateData,t):e);var u=this.options.getTextType();if("text"==u)l.html(a);else{if("barcode"==u){l.css({display:"flex","flex-direction":"column"});var d="text"==this.options.getBarTextMode();l.html('<svg width="100%" display="block" height="100%" class="hibarcode_imgcode" preserveAspectRatio="none slice"></svg>'),d&&l.append('<div class="hibarcode_displayValue" style="white-space:nowrap">');try{n?(w(l.find(".hibarcode_imgcode")[0],n,{format:this.options.getbarcodeMode(),width:this.options.getBarWidth(),textMargin:-1,lineColor:this.options.color||"#000000",margin:0,height:parseInt(i.a.pt.toMm(this.options.getHeight()||10).toString()),_width:parseInt(i.a.pt.toMm(this.options.getWidth()||10).toString()),displayValue:!d&&!this.options.hideTitle,includetext:!d}),l.find(".hibarcode_imgcode").attr("height","100%"),l.find(".hibarcode_imgcode").attr("width","100%"),d&&(this.options.hideTitle||l.find(".hibarcode_displayValue").html(n))):l.html("")}catch(t){console.log(t),l.html("\u6b64\u683c\u5f0f\u4e0d\u652f\u6301\u8be5\u6587\u672c")}}if("qrcode"==u){l.html("");try{if(n){l.css({display:"flex","flex-direction":"column"});var h=this.options.width,c=this.options.height-(this.options.hideTitle?0:this.options.lineHeight??1.5*(this.options.fontSize??10.5)),f=p()('<div class="hiqrcode_imgcode"></div>').css({width:Math.min(h,c)+"pt",height:Math.min(h,c)+"pt",margin:"auto"});new E(f[0],{width:"100%",height:"100%",colorDark:this.options.color||"#000000",useSVG:!0,correctLevel:this.options.getQRcodeLevel(),bcid:this.options.qrcodeType||"qrcode"}).makeCode(n),l.html(f),!this.options.hideTitle&&l.append(`<div class="hiqrcode_displayValue" style="white-space:nowrap">${n}</div>`)}}catch(t){console.log(t),l.html("\u4e8c\u7ef4\u7801\u751f\u6210\u5931\u8d25")}}}},e.prototype.onResize=function(e,n,i,o,r){t.prototype.onResize.call(this,e,n,i,o,r),"barcode"!=this.options.getTextType()&&"qrcode"!=this.options.getTextType()||this.updateTargetText(this.designTarget,this.getTitle(),this.getData())},e.prototype.createTarget=function(t,e,n){var i=p()('<div tabindex="1" class="hiprint-printElement hiprint-printElement-text" style="position: absolute;"><div class="hiprint-printElement-text-content hiprint-printElement-content" style="height:100%;width:100%"></div></div>');return this.updateTargetText(i,t,e,n),i},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(A.a),nt=(m=function(t,e){return(m=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}m(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),it=function(t){function e(e){return t.call(this,e)||this}return nt(e,t),e}(z.a),ot=(g=function(t,e){return(g=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),rt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new it(n),i.options.setDefault(new it(I.a.instance.html.default).getPrintElementOptionEntity()),i}return ot(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t),this.updateTargetHtml()}},e.prototype.updateTargetHtml=function(){var t=this.getFormatter();if(t){var e=t(this.getData(),this.options,this._currenttemplateData);this.designTarget.find(".hiprint-printElement-html-content").html(e)}},e.prototype.getConfigOptions=function(){return I.a.instance.html},e.prototype.createTarget=function(t,e){var n=p()('<div class="hiprint-printElement hiprint-printElement-html" style="position: absolute;"><div class="hiprint-printElement-html-content" style="height:100%;width:100%"></div></div>'),i=this.getFormatter();if(i){var o=i(this.getData(),this.options,this._currenttemplateData);n.find(".hiprint-printElement-html-content").append(o)}else this.options.content&&n.find(".hiprint-printElement-html-content").append(this.options.content);return n},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(A.a),at=(h=function(t,e){return(h=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),st=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.vline.default).getPrintElementOptionEntity()),i}return at(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t)}},e.prototype.getConfigOptions=function(){return I.a.instance.vline},e.prototype.createTarget=function(t,e){return p()('<div class="hiprint-printElement hiprint-printElement-vline" style="border-left:1px solid;position: absolute;"></div>')},e.prototype.getReizeableShowPoints=function(){return["s","r"]},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(A.a),pt=(d=function(t,e){return(d=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),lt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.hline.default).getPrintElementOptionEntity()),i}return pt(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t)}},e.prototype.getConfigOptions=function(){return I.a.instance.hline},e.prototype.createTarget=function(t,e){return p()('<div class="hiprint-printElement hiprint-printElement-hline" style="border-top:1px solid;position: absolute;"></div>')},e.prototype.getReizeableShowPoints=function(){return["e","r"]},e}(A.a),ut=(u=function(t,e){return(u=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),dt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.rect.default).getPrintElementOptionEntity()),i}return ut(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t)}},e.prototype.getConfigOptions=function(){return I.a.instance.rect},e.prototype.createTarget=function(t,e){return p()('<div class="hiprint-printElement hiprint-printElement-rect" style="border:1px solid;position: absolute;"></div>')},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(A.a),ht=(l=function(t,e){return(l=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),ct=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.oval.default).getPrintElementOptionEntity()),i}return ht(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t)}},e.prototype.getConfigOptions=function(){return I.a.instance.oval},e.prototype.createTarget=function(t,e){return p()('<div class="hiprint-printElement hiprint-printElement-oval" style="border:1px solid;position: absolute;border-radius: 50%;"></div>')},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(A.a),ft=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.barcode.default).getPrintElementOptionEntity()),i}return ht(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t),this.initBarcode(this.designTarget,this.getTitle(),this.getData())}},e.prototype.getConfigOptions=function(){return I.a.instance.barcode},e.prototype.getBarAutoWidth=function(){return(null==this.options.barAutoWidth?"true"===this.options.defaultOptions.barAutoWidth:"true"===this.options.barAutoWidth)??!0},e.prototype.onResize=function(e,n,i,o,r){t.prototype.onResize.call(this,e,n,i,o,r),this.initBarcode(this.designTarget,this.getTitle(),this.getData())},e.prototype.getTitle=function(){return this.options.title||this.printElementType.title},e.prototype.getData=function(t){var e,n=this.getField();return e=t?n&&n.split(".").reduce(((e,n)=>e?e[n]:t?t[n]:""),!1)||"":this.options.testData||this.printElementType.getData()||"",e},e.prototype.initBarcode=function(t,e,n){var o=(t=t||this.designTarget).find(".hiprint-printElement-barcode-content");try{const t=i.a.pt.toMm(this.options.height-(this.options.hideTitle?0:this.options.lineHeight??1.5*(this.options.fontSize??10.5)));var r=b({bcid:this.options.barcodeType||"code128",text:n||this.options.testData||this.options.title,scale:this.options.barWidth||1,width:this.getBarAutoWidth()?"":parseInt(i.a.pt.toMm(this.options.getWidth())),height:parseInt(t),includetext:!this.options.hideTitle,barcolor:this.options.barColor||"#000"});(r=p()(r)).attr("preserveAspectRatio","none slice");let e=r[0].attributes.viewBox.value.split(" ")[2];e=Math.ceil(D.px.toPt(1.05*e)),this.getBarAutoWidth()&&e>this.options.width&&(o.parent().css("width",e+"pt"),r.css("height","100%"),this.options.width=e),o.html(r)}catch(t){console.error(t),o.html(p()("<div>\u6761\u5f62\u7801\u751f\u6210\u5931\u8d25</div>"))}},e.prototype.getReizeableShowPoints=function(){return["s","e","se","r"]},e.prototype.createTarget=function(t,e){var n=p()('<div class="hiprint-printElement hiprint-printElement-barcode" style="position: absolute;"><div class="hiprint-printElement-barcode-content" style="height:100%;width:100%;display:flex;flex-direction:column"></div></div>');return this.initBarcode(n,t,e),n},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(A.a),gt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.qrcode.default).getPrintElementOptionEntity()),i}return ht(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t),this.initQrcode(this.designTarget,this.getTitle(),this.getData())}},e.prototype.getConfigOptions=function(){return I.a.instance.qrcode},e.prototype.onResize=function(e,n,i,o,r){t.prototype.onResize.call(this,e,n,i,o,r),this.initQrcode(this.designTarget,this.getTitle(),this.getData())},e.prototype.getTitle=function(){return this.options.title||this.printElementType.title},e.prototype.getData=function(t){var e,n=this.getField();return e=t?n&&n.split(".").reduce(((e,n)=>e?e[n]:t?t[n]:""),!1)||"":this.options.testData||this.printElementType.getData()||"",e},e.prototype.initQrcode=function(t,e,n){var o=(t=t||this.designTarget).find(".hiprint-printElement-qrcode-content");try{const t=i.a.pt.toPx(this.options.getWidth()),a=i.a.pt.toPx(this.options.height-(this.options.hideTitle?0:this.options.lineHeight??1.5*(this.options.fontSize??10.5))),s=t>=a?Math.abs(parseInt((t-a)/2)):0,l=t>=a?0:Math.abs(parseInt((a-t)/2));var r=b({bcid:this.options.qrcodeType||"qrcode",text:n||this.options.testData||this.options.title,scale:1,paddingwidth:s,paddingheight:l,width:Math.min(parseInt(t/2.835),parseInt(a/2.835)),height:Math.min(parseInt(t/2.835),parseInt(a/2.835)),includetext:!1,eclevel:["M","L","H","Q"][this.options.qrCodeLevel??0],barcolor:this.options.barColor||"#000"});if(o.html(p()(r)),!this.options.hideTitle){const t=e?e+(n?":":""):"",i=this.options.textAlign||"center",r="justify"===i?"text-align-last: justify;text-justify: distribute-all-lines;":`text-align: ${i};`;o.append(p()(`<div class="hiprint-printElement-qrcode-content-title" style="${r}">${t}${n}</div>`))}}catch(t){console.error(t),o.html(p()("<div>\u4e8c\u7ef4\u7801\u751f\u6210\u5931\u8d25</div>"))}},e.prototype.getReizeableShowPoints=function(){return["s","e","se","r"]},e.prototype.createTarget=function(t,e){var n=p()('<div class="hiprint-printElement hiprint-printElement-qrcode" style="position: absolute;"><div class="hiprint-printElement-qrcode-content" style="height:100%;width:100%;display:flex;flex-direction:column"></div></div>');return this.initQrcode(n,t,e),n},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(A.a),mt=function(){function t(){}return t.createPrintElement=function(t,e){return"text"==t.type?new et(t,e):"image"==t.type?new W(t,e):"longText"==t.type?new K(t,e):"table"==t.type?new _.a(t,e):"html"==t.type?new rt(t,e):"vline"==t.type?new st(t,e):"hline"==t.type?new lt(t,e):"rect"==t.type?new dt(t,e):"oval"==t.type?new ct(t,e):"barcode"==t.type?new ft(t,e):"qrcode"==t.type?new gt(t,e):void 0},t}(),vt=function(){function t(t){this.field=t.field,this.fields=t.fields,this.title=t.title,this.text=t.text,this.tid=t.tid,this.data=t.data,this.styler=t.styler,this.formatter=t.formatter,this.type=t.type,this.onRendered=t.onRendered,this.options=t.options}return t.prototype.getText=function(t){return t?this.title||this.text||"":this.text||this.title||""},t.prototype.getData=function(){return this.data},t.prototype.createPrintElement=function(t){var e={};return p().extend(e,t||{}),mt.createPrintElement(this,e)},t.prototype.getPrintElementTypeEntity=function(){return new B({title:this.title,type:this.type})},t.prototype.getFields=function(){return this.fields},t.prototype.getOptions=function(){return this.options||{}},t}(),yt=(n(16),n(12)),bt=(s=function(t,e){return(s=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Tt=(function(t){function e(e){var n=t.call(this,e)||this;return(e=e||{}).columns?(n.columns=[],e.columns.forEach((function(t){n.columns.push(new yt.a(t))}))):n.columns=[new yt.a({columns:[new M.a({width:100}),new M.a({width:100})]})],n.lHeight=e.lHeight,n.autoCompletion=e.autoCompletion,n.tableFooterRepeat=e.tableFooterRepeat,n}bt(e,t),e.prototype.getPrintElementOptionEntity=function(){var e=t.prototype.getPrintElementOptionEntity.call(this);return e.fields=this.fields,e.columns=[],this.columns.forEach((function(t){e.columns.push(t.getPrintElementOptionEntity())})),e}}(z.a),a=function(t,e){return(a=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},r=function(t,e){return(r=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),wt=function(t){function e(e){return t.call(this,e)||this}return Tt(e,t),e.prototype.createPrintElement=function(t){var e={};return p().extend(e,t||{}),mt.createPrintElement(this,e)},e.prototype.getPrintElementTypeEntity=function(){return new B({title:this.title,type:this.type})},e}(vt),Et=function(){function t(){}return t.createPrintElementType=function(t){return t.type=t.type||"text","text"==t.type?new wt(t):"table"==t.type?new V(t):new vt(t)},t}(),xt=function(){function t(){}return t.getElementTypeGroups=function(e){var n=t.formatterModule(e);return C.instance[n]||[]},t.getElementType=function(t,e){if(t)return C.instance.getElementType(t);Et.createPrintElementType({type:e})},t.build=function(e,n){var i=t.formatterModule(n),o=(new k).createPrintElementTypeHtml(e,this.getElementTypeGroups(i));this.enableDrag(o)},t.buildByHtml=function(t){this.enableDrag(t)},t.enableDrag=function(e){e.hidraggable({revert:!0,proxy:function(t){var e=R.a.instance.getDragingPrintElement(),n=e.printElement.getProxyTarget(e.printElement.printElementType.getOptions());return n.appendTo("body"),n.css("z-index","9999"),n},moveUnit:"pt",minMove:4,onBeforeDrag:function(e){R.a.instance.draging=!0;var n=p()(e.data.target).attr("tid"),i=t.getElementType(n,p()(e.data.target).attr("ptype"));if(!i)throw new Error(`\u8bf7\u68c0\u67e5 hiprint.init \u7684 provider \u662f\u5426\u914d\u7f6e\u4e86 [${n}]`);var o=i.createPrintElement();if(!o&&"tableCustom"==i.type)throw new Error("\u5df2\u79fb\u9664'tableCustom',\u8bf7\u66ff\u6362\u4f7f\u7528'table'\u8be6\u60c5\u89c1\u66f4\u65b0\u8bb0\u5f55");return R.a.instance.setDragingPrintElement(o),!0},onDrag:function(t,e,n){R.a.instance.getDragingPrintElement().updatePosition(e,n)},onStopDrag:function(t){R.a.instance.draging=!1}})},t.formatterModule=function(t){return t||"_default"},t}(),Pt=function(t,e){var n=this;this.name=t,this.printElementTypes=[],e.forEach((function(t){n.printElementTypes.push(Et.createPrintElementType(t))}))},Ct=function(t){if(this.index=t.index,this.name=t.name,this.paperType=t.paperType,this.paperType){var e=R.a.instance[this.paperType];t.height?(this.height=t.height,this.width=t.width):(this.height=e.height,this.width=e.width)}else this.height=t.height,this.width=t.width;this.paperHeader=t.paperHeader||0,this.paperFooter=t.paperFooter||i.a.mm.toPt(this.height),this.printElements=t.printElements||[],this.paperNumberLeft=t.paperNumberLeft,this.paperNumberTop=t.paperNumberTop,this.paperNumberDisabled=t.paperNumberDisabled,this.paperNumberContinue=t.paperNumberContinue,this.paperNumberFormat=t.paperNumberFormat,this.paperList={paperType:t.paperType,height:t.height,width:t.width},this.panelPaperRule=t.panelPaperRule,this.panelPageRule=t.panelPageRule,this.rotate=t.rotate||void 0,this.firstPaperFooter=t.firstPaperFooter,this.evenPaperFooter=t.evenPaperFooter,this.oddPaperFooter=t.oddPaperFooter,this.lastPaperFooter=t.lastPaperFooter,this.topOffset=t.topOffset,this.fontFamily=t.fontFamily,this.leftOffset=t.leftOffset,this.orient=t.orient,this.scale=t.scale,this.watermarkOptions=t.watermarkOptions,this.panelLayoutOptions=t.panelLayoutOptions},St=function(){function t(t,e,n,i){this.bx=t,this.by=e,this.ex=t,this.ey=e,this.startX=this.minX=t,this.startY=this.minY=e,this.maxX=t,this.maxY=e,this.lastLeft=n,this.lastTop=i}return t.prototype.updateRect=function(t,e,n){var i=n.designPaper.scale||1;this.ex=t,this.ey=e,this.minX=this.startX/i<t/i?this.startX/i:t/i,this.minY=this.startY/i<e/i?this.startY/i:e/i,this.maxX=this.startX/i<t/i?t/i:this.startX/i,this.maxY=this.startY/i<e/i?e/i:this.startY/i},t.prototype.updatePositionByMultipleSelect=function(t,e){null!=t&&(this.lastLeft=this.lastLeft+t),null!=e&&(this.lastTop=this.lastTop+e),this.target.css({left:this.lastLeft+"pt",top:this.lastTop+"pt"})},t}(),Ot=function(){function t(t,e){this.templateId=e,this.index=t.index,this.name=t.name,this.width=t.width,this.height=t.height,this.paperType=t.paperType,this.paperList={paperType:t.paperType,height:t.height,width:t.width},this.paperHeader=t.paperHeader,this.paperFooter=t.paperFooter,this.initPrintElements(t.printElements),this.paperNumberLeft=t.paperNumberLeft,this.paperNumberTop=t.paperNumberTop,this.paperNumberDisabled=t.paperNumberDisabled,this.paperNumberContinue=null==t.paperNumberContinue||t.paperNumberContinue,this.paperNumberFormat=t.paperNumberFormat,this.panelPaperRule=t.panelPaperRule,this.panelPageRule=t.panelPageRule,this.firstPaperFooter=t.firstPaperFooter,this.evenPaperFooter=t.evenPaperFooter,this.oddPaperFooter=t.oddPaperFooter,this.lastPaperFooter=t.lastPaperFooter,this.topOffset=t.topOffset,this.leftOffset=t.leftOffset,this.fontFamily=t.fontFamily,this.orient=t.orient,this.target=this.createTarget(),this.rotate=t.rotate,this.scale=t.scale,this.watermarkOptions=t.watermarkOptions||{},this.panelLayoutOptions=t.panelLayoutOptions||{}}return t.prototype.design=function(t){var e=this;this.orderPrintElements(),this.designPaper=this.createNewPage(0),this.target.html(""),this.target.append(this.designPaper.getTarget()),this.droppablePaper(this.designPaper),this.designPaper.design(t),this.designPaper.subscribePaperBaseInfoChanged((function(t){e.paperHeader=t.paperHeader,e.paperFooter=t.paperFooter,e.paperNumberLeft=t.paperNumberLeft,e.paperNumberTop=t.paperNumberTop,e.paperNumberDisabled=t.paperNumberDisabled,e.paperNumberFormat=t.paperNumberFormat})),this.printElements.forEach((function(n){e.appendDesignPrintElement(e.designPaper,n),n.design(t,e.designPaper)})),this.target.bind("click.hiprint",(function(t){let n={paperList:e.paperList,panelPaperRule:e.panelPaperRule,panelPageRule:e.panelPageRule,firstPaperFooter:e.firstPaperFooter,evenPaperFooter:e.evenPaperFooter,oddPaperFooter:e.oddPaperFooter,lastPaperFooter:e.lastPaperFooter,leftOffset:e.leftOffset,topOffset:e.topOffset,panelLayoutOptions:e.panelLayoutOptions||{},fontFamily:e.fontFamily,orient:e.orient,paperNumberDisabled:e.paperNumberDisabled,paperNumberContinue:e.paperNumberContinue,paperNumberFormat:e.paperNumberFormat,watermarkOptions:e.watermarkOptions||{}};I.a.instance.paperNumberContinue||delete n.paperNumberContinue,i.a.event.trigger("BuildCustomOptionSettingEventKey_"+e.templateId,{options:n,callback:function(t){e.panelLayoutOptions=t.panelLayoutOptions||{},e.watermarkOptions=t.watermarkOptions||void 0,t.watermarkOptions&&e.designPaper.createWaterMark(!0,1,t.watermarkOptions),e.paperList=t.paperList,e.panelPaperRule=t.panelPaperRule,e.panelPageRule=t.panelPageRule,e.firstPaperFooter=t.firstPaperFooter,e.evenPaperFooter=t.evenPaperFooter,e.oddPaperFooter=t.oddPaperFooter,e.lastPaperFooter=t.lastPaperFooter,e.leftOffset=t.leftOffset,e.topOffset=t.topOffset,e.fontFamily=t.fontFamily,e.orient=t.orient,e.paperNumberDisabled=e.designPaper.paperNumberDisabled=!!t.paperNumberDisabled||void 0,e.paperNumberContinue=e.designPaper.paperNumberContinue=t.paperNumberContinue,e.paperNumberFormat=t.paperNumberFormat,e.designPaper.paperNumberFormat=t.paperNumberFormat,t.paperNumberFormat&&(e.designPaper.paperNumberTarget=e.designPaper.createPaperNumber(e.designPaper.formatPaperNumber(1,1),!0)),e.designPaper.setOffset(e.leftOffset,e.topOffset),e.css(e.target),e.designPaper.resetPaperNumber(e.designPaper.paperNumberTarget),t.paperList&&(e.width=t.paperList.width,e.height=t.paperList.height,e.paperType=t.paperList.paperType,e.resize(t.paperList.paperType,t.paperList.width,t.paperList.height,t.rotate)),e.designPaper.triggerOnPaperBaseInfoChanged()}})})),this.bindShortcutKeyEvent(),this.bingPasteEvent(),this.bindBatchMoveElement()},t.prototype.update=function(t){try{Date.now();var e=this;this.index=t.index,this.name=t.name,this.width=t.width,this.height=t.height,this.paperType=t.paperType,this.paperHeader=t.paperHeader,this.paperFooter=t.paperFooter,this.designPaper.width=i.a.mm.toPt(t.width),this.designPaper.height=i.a.mm.toPt(this.height),this.designPaper.paperType=this.paperType,this.designPaper.paperHeader=this.paperHeader,this.designPaper.paperFooter=this.paperFooter,this.designPaper.mmheight=t.height,this.designPaper.mmwidth=t.width,this.designPaper.headerLinetarget.css("top",(this.paperHeader||-1)+"pt"),0==this.paperHeader&&this.designPaper.headerLinetarget.addClass("hideheaderLinetarget"),this.designPaper.footerLinetarget.css("top",parseInt(this.paperFooter.toString())+"pt"),this.paperFooter==this.height&&this.designPaper.footerLinetarget.css("top",t.height-I.a.instance.paperHeightTrim+"mm"),this.watermarkOptions=t.watermarkOptions||{},this.designPaper.createWaterMark(!0,this.index,this.watermarkOptions),this.paperNumberLeft=t.paperNumberLeft,this.paperNumberTop=t.paperNumberTop,this.paperNumberDisabled=t.paperNumberDisabled,this.paperNumberContinue=t.paperNumberContinue,this.paperNumberFormat=t.paperNumberFormat,this.designPaper.paperNumberLeft=this.paperNumberLeft,this.designPaper.paperNumberTop=this.paperNumberTop,this.designPaper.paperNumberDisabled=this.paperNumberDisabled,this.designPaper.paperNumberContinue=this.paperNumberContinue,this.designPaper.paperNumberFormat=this.paperNumberFormat,this.designPaper.paperNumberTarget.css("top",this.paperNumberTop+"pt").css("left",this.paperNumberLeft+"pt"),this.designPaper.resetPaperNumber(this.designPaper.paperNumberTarget),this.fontFamily=t.fontFamily,this.orient=t.orient,this.rotate=t.rotate,this.scale=t.scale,this.designPaper.fontFamily=this.fontFamily,this.designPaper.orient=this.orient,this.designPaper.scale=e.designPaper.scale||this.scale,this.panelLayoutOptions=t.panelLayoutOptions,this.panelPaperRule=t.panelPaperRule,this.paperList={paperType:t.paperType,height:t.height,width:t.width},this.panelPageRule=t.panelPageRule,this.firstPaperFooter=t.firstPaperFooter,this.evenPaperFooter=t.evenPaperFooter,this.oddPaperFooter=t.oddPaperFooter,this.lastPaperFooter=t.lastPaperFooter,this.topOffset=t.topOffset,this.leftOffset=t.leftOffset,this.designPaper.setFooter(this.firstPaperFooter,this.evenPaperFooter,this.oddPaperFooter,this.lastPaperFooter),this.designPaper.setOffset(this.leftOffset,this.topOffset),this.target.css("width",t.width+"mm"),this.target.css("height",t.height-I.a.instance.paperHeightTrim+"mm"),this.target.attr("original-height",t.height),this.target.parent().css("width",t.width+"mm"),this.target.parent().css("height",t.height-I.a.instance.paperHeightTrim+"mm"),this.designPaper.target.css("width",t.width+"mm"),this.designPaper.target.css("height",t.height-I.a.instance.paperHeightTrim+"mm"),this.printElements.forEach((function(t){t.designTarget&&t.designTarget.length&&t.designTarget.remove()})),this.printElements=[],this.initPrintElements(t.printElements),this.printElements.forEach((function(n){e.appendDesignPrintElement(e.designPaper,n),n.design(t,e.designPaper)}))}catch(e){console.log(e)}},t.prototype.bindShortcutKeyEvent=function(){var t=this;p()(document).keydown((function(e){"INPUT"!=e.target.tagName&&(e.ctrlKey||e.metaKey)&&90==e.keyCode&&(e.shiftKey?i.a.event.trigger("hiprintTemplateDataShortcutKey_"+t.templateId,"redo"):i.a.event.trigger("hiprintTemplateDataShortcutKey_"+t.templateId,"undo"),e.preventDefault())}))},t.prototype.bingPasteEvent=function(){var t=this;t.designPaper.target.attr("tabindex","1"),t.designPaper.target.keydown((function(e){e.target?.className?.includes("editing")||"INPUT"!=e.target.tagName&&(e.ctrlKey||e.metaKey)&&86==e.keyCode&&(t.pasteJson(e),e.preventDefault())}))},t.prototype.pasteJson=function(t){var e=p()("#copyArea");if(e.length)try{var n=e.text(),o=JSON.parse(n);let s=null,l=null;var r=null,a=null;o.forEach(((e,n)=>{if(!e.printElementType&&!e.templateId)return;var o=this,u=e.options,d=o.getElementById(e.id);if(!d)return;var h=d.clone(e);if(!h)return;if(0===n){s={x:e.options.left,y:e.options.top};var c=t.currentTarget.className!=t.target.className;r=!c&&o.mouseOffsetX&&i.a.px.toPt(o.mouseOffsetX)||(u.left+=10),a=!c&&o.mouseOffsetY&&i.a.px.toPt(o.mouseOffsetY)||(u.top+=10),l={x:r,y:a}}else{const t={x:e.options.left,y:e.options.top},n={x:t.x-s.x,y:t.y-s.y};r=l.x+n.x,a=l.y+n.y}h.options.setLeft(r),h.options.setTop(a),h.setTemplateId(o.templateId),h.setPanel(o),o.appendDesignPrintElement(o.designPaper,h,!1);const f=R.a.instance.getPrintTemplateById(o.templateId);h.options.field&&f.qtDesigner&&(h.options.qid=f.qtDesignderFunction(h.options.field)),o.printElements.push(h),h.design(void 0,o.designPaper),i.a.event.trigger("hiprintTemplateDataChanged_"+o.templateId,"\u590d\u5236"),h.designTarget.children(".resize-panel").trigger(p().Event("click"))}))}catch(t){console.error("pasteJson error",t)}},t.prototype.css=function(t){this.fontFamily?t.css("fontFamily",this.fontFamily):t[0].style.fontFamily=""},t.prototype.getConfig=function(){return I.a.instance},t.prototype.getHtml=function(t,e,n,i,o){var r=this;this.orderPrintElements();let a=r.getConfig();var s,p=n||[],l=i||this,u=void 0;return i?(u=p[p.length-1],s=u.getPanelTarget(),u.updateReferenceElement(new $.a({top:this.paperHeader,left:0,height:0,width:0,bottomInLastPaper:u.referenceElement.bottomInLastPaper,beginPrintPaperIndex:p.length-1,printTopInPaper:u.referenceElement.bottomInLastPaper,endPrintPaperIndex:p.length-1}))):(s=l.createTarget(),u=l.createNewPage(p.length),p.push(u),s.append(u.getTarget())),this.printElements.filter((function(t){return!t.isFixed()&&!t.isHeaderOrFooter()})).forEach((function(e){var n=[],i=p[p.length-1];u=i.referenceElement.isPositionLeftOrRight(e.options.getTop())?p[i.referenceElement.beginPrintPaperIndex]:p[i.referenceElement.endPrintPaperIndex],(n=e.getHtml(u,t)).forEach((function(t,i){t.referenceElement&&(t.referenceElement.endPrintPaperIndex=t.referenceElement.beginPrintPaperIndex+n.length-1),i>0&&(u.index<p.length-1?u=p[u.index+1]:(u=l.createNewPage(p.length,u.referenceElement),p.push(u)),s.append(u.getTarget())),t.target&&("none"!=e.options.showInPage&&u.append(t.target),u.updatePrintLine(t.printLine),e.onRendered(u,t.target)),i==n.length-1&&t.referenceElement&&u.updateReferenceElement(t.referenceElement)}))})),o&&o.templates.forEach((function(t,e){var i=t.data||{},o=t.options||{};t.template.printPanels.forEach((function(t){t.getHtml(i,o,n,r)}))})),a.paperNumberContinue&&(r.paperNumberContinue?D._paperList=[...D._paperList||[],...p]:D._paperList=[...p]),i||(this.lastPaperFooter&&p[p.length-1].printLine>this.lastPaperFooter&&(u=l.createNewPage(p.length,u.referenceElement),p.push(u),s.append(u.getTarget())),this.panelPaperRule&&("odd"==this.panelPaperRule&&p.length%2==0&&(u=l.createNewPage(p.length,u.referenceElement),p.push(u),s.append(u.getTarget())),"even"==this.panelPaperRule&&p.length%2==1&&(u=l.createNewPage(p.length,u.referenceElement),p.push(u),s.append(u.getTarget()))),p.forEach((function(n){n.updatePaperNumber(n.index+1,p.length,e.paperNumberToggleInEven),r.fillPaperHeaderAndFooter(n,t,p.length),e&&(null!=e.leftOffset&&n.setLeftOffset(e.leftOffset),null!=e.topOffset&&n.setTopOffset(e.topOffset))})),s.prepend(this.getPrintStyle()),a.paperNumberContinue&&D._paperList.forEach((function(t,e){t.updatePaperNumber(e+1,D._paperList.length)}))),s},t.prototype.resize=function(t,e,n,i){this.width=e,this.height=n,this.paperType=t,this.rotate=i,this.designPaper.resize(e,n)},t.prototype.rotatePaper=function(){null==this.rotate&&(this.rotate=!1),this.rotate=!this.rotate,this.resize(this.paperType,this.height,this.width,this.rotate)},t.prototype.zoom=function(t,e){this.scale=e?t:void 0,this.designPaper.zoom(t)},t.prototype.getTarget=function(){return this.target},t.prototype.enable=function(){this.target.removeClass("hipanel-disable")},t.prototype.disable=function(){this.target.addClass("hipanel-disable")},t.prototype.getPanelEntity=function(t){var e=[];return this.printElements.forEach((function(n){e.push(n.getPrintElementEntity(t))})),new Ct({index:this.index,name:this.name||this.index+1,width:this.width,height:this.height,paperType:this.paperType,paperHeader:this.paperHeader,paperFooter:this.paperFooter,paperNumberDisabled:!!this.paperNumberDisabled||void 0,paperNumberContinue:null==this.paperNumberContinue||this.paperNumberContinue,paperNumberFormat:this.paperNumberFormat?this.paperNumberFormat:void 0,panelPaperRule:this.panelPaperRule?this.panelPaperRule:void 0,paperList:this.paperList?this.paperList:void 0,panelPageRule:this.panelPageRule?this.panelPageRule:void 0,paperNumberLeft:this.paperNumberLeft,paperNumberTop:this.paperNumberTop,printElements:e,rotate:this.rotate,firstPaperFooter:this.firstPaperFooter,evenPaperFooter:this.evenPaperFooter,oddPaperFooter:this.oddPaperFooter,lastPaperFooter:this.lastPaperFooter,topOffset:this.topOffset,fontFamily:this.fontFamily,orient:this.orient,scale:this.scale,watermarkOptions:this.watermarkOptions?this.watermarkOptions:void 0,leftOffset:this.leftOffset,panelLayoutOptions:this.panelLayoutOptions||{}})},t.prototype.createTarget=function(){var t=p()('<div class="hiprint-printPanel panel-index-'+this.index+'"></div>');return this.css(t),t},t.prototype.droppablePaper=function(t){var e=this;t.getTarget().hidroppable({accept:".ep-draggable-item",onDrop:function(n,o){const r=R.a.instance.getPrintTemplateById(e.templateId);var a=R.a.instance.getDragingPrintElement(),s=a.printElement,p=e.designPaper.scale||1,l=(a.left-i.a.px.toPt(e.target.children(".hiprint-printPaper").offset().left))/p,u=(a.top-i.a.px.toPt(e.target.children(".hiprint-printPaper").offset().top))/p;s.updateSizeAndPositionOptions(e.mathroundToporleft(l),e.mathroundToporleft(u)),s.setTemplateId(e.templateId),s.setPanel(e),e.appendDesignPrintElement(e.designPaper,s,!0),s.options.field&&r.qtDesigner&&(s.options.qid=r.qtDesignderFunction(s.options.field)),e.printElements.push(s),s.design(void 0,t),i.a.event.trigger("hiprintTemplateDataChanged_"+e.templateId,"\u65b0\u589e")}})},t.prototype.initPrintElements=function(t){var e=this;this.printElements=[],t&&t.forEach((function(n){var i;if(i=n.printElementType?Et.createPrintElementType(n.printElementType):C.instance.getElementType(n.tid)){var o=i.createPrintElement(n.options);o.setTemplateId(e.templateId),o.setPanel(e),e.printElements.push(o)}else console.log("miss "+JSON.stringify(t))}))},t.prototype.mathroundToporleft=function(t){var e=I.a.instance.movingDistance;return Math.round(t/e)*e},t.prototype.appendDesignPrintElement=function(t,e,n){e.setCurrenttemplateData(void 0);var i=e.getDesignTarget(t);i.addClass("design"),n&&e.initSizeByHtml(i),t.append(i)},t.prototype.createNewPage=function(t,e){var n=new q(this.templateId,this.index,this.watermarkOptions,this.panelPageRule,this.scale,this.width,this.height,this.paperHeader,this.paperFooter,this.paperNumberLeft,this.paperNumberTop,this.paperNumberDisabled,this.paperNumberContinue,this.paperNumberFormat,t,e);return n.setFooter(this.firstPaperFooter,this.evenPaperFooter,this.oddPaperFooter,this.lastPaperFooter),n.setOffset(this.leftOffset,this.topOffset),n},t.prototype.orderPrintElements=function(){this.printElements=i.a.orderBy(this.printElements,(function(t){return t.options.getLeft()})),this.printElements=i.a.orderBy(this.printElements,(function(t){return t.options.getTop()}))},t.prototype.fillPaperHeaderAndFooter=function(t,e,n){this.printElements.filter((function(t){return t.isFixed()||t.isHeaderOrFooter()})).forEach((function(i){if(i.isFixed(),i.showInPage(t.index,n)){var o=i.getHtml(t,e);o.length&&t.append(o[0].target)}}))},t.prototype.clear=function(){this.printElements.forEach((function(t){t.designTarget&&t.designTarget.length&&t.designTarget.remove()})),this.printElements=[],i.a.event.trigger("hiprintTemplateDataChanged_"+this.templateId,"\u6e05\u7a7a")},t.prototype.insertPrintElementToPanel=function(t){var e=this.getPrintElementTypeByEntity(t);if(e){var n=e.createPrintElement(t.options);n.setTemplateId(this.templateId),n.setPanel(this),this.printElements.push(n)}},t.prototype.addPrintText=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="text",this.insertPrintElementToPanel(t)},t.prototype.addPrintHtml=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="html",this.insertPrintElementToPanel(t)},t.prototype.addPrintTable=function(t){if(t.printElementType=t.printElementType||{},t.printElementType.type="table",t.options&&t.options.columns){var e=p().extend({},t.options.columns);t.printElementType.columns=e.columns,e.columns=void 0}this.insertPrintElementToPanel(t)},t.prototype.addPrintImage=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="image",this.insertPrintElementToPanel(t)},t.prototype.addPrintLongText=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="longText",this.insertPrintElementToPanel(t)},t.prototype.addPrintVline=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="vline",this.insertPrintElementToPanel(t)},t.prototype.addPrintHline=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="hline",this.insertPrintElementToPanel(t)},t.prototype.addPrintRect=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="rect",this.insertPrintElementToPanel(t)},t.prototype.addPrintOval=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="oval",this.insertPrintElementToPanel(t)},t.prototype.getPrintElementTypeByEntity=function(t){var e;return(e=t.tid?C.instance.getElementType(t.tid):Et.createPrintElementType(t.printElementType))||console.log("miss "+JSON.stringify(t)),e},t.prototype.getPrintStyle=function(){let t="";return this.panelLayoutOptions&&"row"===this.panelLayoutOptions.layoutType&&(t=`<style>.hiprint-printTemplate{margin: -${(Number(this.panelLayoutOptions.layoutRowGap)||0)/2}mm -${(Number(this.panelLayoutOptions.layoutColumnGap)||0)/2}mm;}.hiprint-printTemplate .hiprint-printPanel {display:inline-block;padding: ${(Number(this.panelLayoutOptions.layoutRowGap)||0)/2}mm ${(Number(this.panelLayoutOptions.layoutColumnGap)||0)/2}mm;}\n </style>`),t+" <style printStyle>@page{ border:0; padding:0cm; margin:0cm; "+this.getPrintSizeStyle()+"}</style>\n"},t.prototype.getPrintSizeStyle=function(){return this.paperType?"size:"+this.paperType+" "+(this.height>this.width?"portrait":"landscape")+";":"size: "+this.width+"mm "+this.height+"mm "+(this.orient?1==this.orient?"portrait":"landscape":"")+";"},t.prototype.deletePrintElement=function(t){var e=this;this.printElements.filter((function(n,i){n.id==t.id&&(t.delete(),e.printElements.splice(i,1))}))},t.prototype.getElementByTid=function(t){return this.printElements.filter((function(e){return e.printElementType.tid===t})).map((function(t,e){return t}))},t.prototype.getElementByName=function(t){return this.printElements.filter((function(e){return e.options.name===t})).map((function(t,e){return t}))},t.prototype.getElementById=function(t){return this.printElements.find((function(e){return e.id===t}))},t.prototype.getFieldsInPanel=function(){var t=[];return this.printElements.forEach((function(e){e.options&&e.options.field?t.push(e.options.field):e.printElementType.field&&t.push(e.printElementType.field)})),t},t.prototype.getTestData=function(){var t={};return this.printElements.forEach((function(e){"table"!=e.printElementType.type&&(e.options&&e.options.field?t[e.options.field]=e.options.testData:e.printElementType.field&&(t[e.printElementType.field]=e.printElementType.data||e.options.testData))})),t},t.prototype.bindBatchMoveElement=function(){var t=this;this.designPaper.getTarget().on("mousemove",(function(e){e.target.className&&"string"==O(e.target.className)&&e.target.className.includes("editing")||(e.currentTarget.className==t.designPaper.target[0].className?(t.mouseOffsetX=e.offsetX,t.mouseOffsetY=e.offsetY):t.mouseOffsetX=t.mouseOffsetY=void 0,R.a.instance.draging||1===e.buttons&&R.a.instance.rectDraging&&t.mouseRect&&(t.mouseRect.updateRect(e.pageX,e.pageY,t),t.updateRectPanel(t.mouseRect)))})).on("mousedown",(function(e){R.a.instance.rectDraging=!0,e.target.className&&"string"==O(e.target.className)&&e.target.className.includes("editing")||R.a.instance.draging||(t.mouseRect&&t.mouseRect.target&&t.mouseRect.target.remove(),1===e.buttons&&"string"==O(e.target.className)&&e.target.className.includes("hiprint-printPaper hidroppable design")&&(t.mouseRect=new St(e.pageX,e.pageY,R.a.instance.dragLengthCNum(e.pageX-t.designPaper.getTarget().offset().left,I.a.instance.movingDistance),R.a.instance.dragLengthCNum(e.pageY-t.designPaper.getTarget().offset().top,I.a.instance.movingDistance))))})).on("mouseup",(function(e){t.mouseRect&&t.updateRectPanel(t.mouseRect,!0),R.a.instance.rectDraging=!1}))},t.prototype.getElementInRect=function(t){var e=[];return this.printElements.filter((function(t){return!1!==t.options.draggable})).forEach((function(n){n.inRect(t)&&e.push(n)})),e},t.prototype.updateRectPanel=function(t,e){var n=this.designPaper.getTarget(),i=this.designPaper.scale||1;if(this.mouseRect.target||(this.mouseRect.target=p()('<div tabindex="1" class="mouseRect" ><span></span></div>'),n.find(".hiprint-printPaper-content").append(this.mouseRect.target)),t.ex>=t.bx&&t.ey>=t.by?this.mouseRect.target.css({height:t.maxY-t.minY+"px",width:t.maxX-t.minX+"px",left:t.lastLeft/i+"pt",top:t.lastTop/i+"pt",transform:"unset"}):t.ex<t.bx&&t.ey<t.by?this.mouseRect.target.css({height:t.maxY-t.minY+"px",width:t.maxX-t.minX+"px",left:t.lastLeft/i+"pt",top:t.lastTop/i+"pt",transform:"rotate(180deg)","transform-origin":"0 0"}):t.ex<t.bx&&t.ey>t.by?this.mouseRect.target.css({height:t.maxY-t.minY+"px",width:t.maxX-t.minX+"px",left:t.lastLeft/i+"pt",top:t.lastTop/i+"pt",transform:"rotateY(180deg)","transform-origin":"0 0"}):t.ex>t.bx&&t.ey<t.by&&this.mouseRect.target.css({height:t.maxY-t.minY+"px",width:t.maxX-t.minX+"px",left:t.lastLeft/i+"pt",top:t.lastTop/i+"pt",transform:"rotateX(180deg)","transform-origin":"0 0"}),t.target.focus(),e){const t=this.getElementInRect(this.mouseRect);n.find(".mouseRect").remove(),t?.length&&setTimeout((()=>{t.forEach(((t,e)=>{if("table"===t.printElementType?.type)return;let n=t.designTarget;n.children("div[panelindex]").addClass("selected"),n.children().last().css({display:"block"}),n.focus()}))}),0)}},t.prototype.bingKeyboardMoveEvent=function(t){var e=this;t.attr("tabindex","1"),t.keydown((function(t){e.mouseRect.mouseRectSelectedElement||(e.mouseRect.mouseRectSelectedElement=e.getElementInRect(e.mouseRect));var n=e.mouseRect.mouseRectSelectedElement||[];switch(t.keyCode){case 37:e.mouseRect.updatePositionByMultipleSelect(0-I.a.instance.movingDistance,0),n.forEach((function(t){t.updatePositionByMultipleSelect(0-I.a.instance.movingDistance,0)})),t.preventDefault();break;case 38:e.mouseRect.updatePositionByMultipleSelect(0,0-I.a.instance.movingDistance),n.forEach((function(t){t.updatePositionByMultipleSelect(0,0-I.a.instance.movingDistance)})),t.preventDefault();break;case 39:e.mouseRect.updatePositionByMultipleSelect(I.a.instance.movingDistance,0),n.forEach((function(t){t.updatePositionByMultipleSelect(I.a.instance.movingDistance,0)})),t.preventDefault();break;case 40:e.mouseRect.updatePositionByMultipleSelect(0,I.a.instance.movingDistance),n.forEach((function(t){t.updatePositionByMultipleSelect(0,I.a.instance.movingDistance)})),t.preventDefault()}[37,38,39,40].includes(t.keyCode)&&i.a.event.trigger("hiprintTemplateDataChanged_"+e.templateId,"\u6846\u9009\u79fb\u52a8")}))},t}(),It=function(t){if(t)if(t.panels){this.panels=[];for(var e=0;e<t.panels.length;e++)this.panels.push(new Ct(t.panels[e]))}else this.panels=[]},Ft=n(9),Rt=function(){function t(t,e){var n=this;this.printElementOptionSettingPanel={},this.printTemplate=t,this.settingContainer=p()(e),i.a.event.on(t.getPrintElementSelectEventKey(),(function(t){n.buildSetting(t)})),i.a.event.on(t.getBuildCustomOptionSettingEventKey(),(function(t){n.buildSettingByCustomOptions(t)})),i.a.event.on("clearSettingContainer",(function(){n.clearSettingContainer()}))}return t.prototype.init=function(){},t.prototype.clearSettingContainer=function(){this.clearLastPrintElement(),this.settingContainer.html("")},t.prototype.clearLastPrintElement=function(){this.lastPrintElement&&(this.lastPrintElement._editing&&this.lastPrintElement.updateByContent(!0),this.lastPrintElement._printElementOptionTabs&&this.lastPrintElement._printElementOptionTabs.forEach((function(t){t.list&&t.list.forEach((function(t){t.destroy()}))})),this.lastPrintElement._printElementOptionItems&&this.lastPrintElement._printElementOptionItems.forEach((function(t){t.destroy()}))),this.lastPrintElement=void 0},t.prototype.buildSetting=function(t){var e,n=this,i=this,o=t.printElement,r=t.customOptionsInput,a=o.getPrintElementOptionTabs();n.clearSettingContainer(),a.length?(e=p()('<div class="prop-tabs"><ul class="prop-tab-items"></ul></div>'),a.filter(((t,e)=>t.list.length>0||2==e&&r&&r.length)).forEach((function(t){var a=p()('<li class="prop-tab-item"><span class="tab-title">'+t.name+"</span></li>");e.find(".prop-tab-items").append(a);var s=p()('<div class="hiprint-option-items" data-title="'+t.name+'"></div>');t.list.forEach((function(t){t.submit=function(t){o.submitOption()};var e=t.createTarget(o,o.options,o.printElementType);n.printElementOptionSettingPanel[t.name]=e,s.append(e),["columns","dataType"].includes(t.name)?t.setValue(o.options[t.name],o.options,o.printElementType):["coordinate","widthHeight"].includes(t.name)?t.setValue(o.options,o):t.setValue(o.options[t.name]||o.printElementType[t.name]),e.find("textarea").bind("dblclick.textarea",(function(t){if(!p()(this).val()){var e=t.target.placeholder||"";p()(this).val(e)}}))})),0==t.list.length&&r&&r.length&&r.forEach((function(t){var e=t.callback;t.callback=function(t){e&&e(t)};var n=t.optionItems;t.title&&s.append('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label hiprint-option-title"> '+t.title+"</div></div>"),n.forEach((function(e){e.submit=function(e){t.callback(i.getValueByOptionItems(n))},s.append(e.createTarget(i.printTemplate,t.options,void 0)),e.setValue(t.options[e.name],t.options,void 0)})),s.find(".auto-submit").change((function(){t.callback(i.getValueByOptionItems(n))})),s.find(".auto-submit:input").bind("keydown.submitOption",(function(e){13===e.keyCode&&t.callback(i.getValueByOptionItems(n))})),s.find("textarea").bind("dblclick.textarea",(function(t){if(!p()(this).val()){var e=t.target.placeholder||"";p()(this).val(e)}}))})),e.append(s)}))):(e=p()('<div class="hiprint-option-items"></div>'),o.getPrintElementOptionItems().forEach((function(t){t.submit=function(t){o.submitOption()};var i=t.createTarget(o,o.options,o.printElementType);n.printElementOptionSettingPanel[t.name]=i,e.append(i),["columns","dataType"].includes(t.name)?t.setValue(o.options[t.name],o.options,o.printElementType):["coordinate","widthHeight"].includes(t.name)?t.setValue(o.options,o):t.setValue(o.options[t.name]||o.printElementType[t.name])})));var s=p()('<button class="hiprint-option-item-settingBtn hiprint-option-item-submitBtn"type="button">\u786e\u5b9a</button>'),l=p()('<button class="hiprint-option-item-settingBtn hiprint-option-item-deleteBtn"type="button">\u5220\u9664</button>');if(e.append(s),e.append(l),a.length){e.on("click",".prop-tab-item",(function(){var t=p()(this),i=t.index();n.settingContainer.data("last-index",i),t.addClass("active"),t.siblings().removeClass("active");var o=e.find(".hiprint-option-items:eq("+i+")");o.addClass("active"),o.siblings().removeClass("active")}));var u=+(n.settingContainer.data("last-index")||0);u>=a.length&&(u=0),e.find(".prop-tab-item:eq("+u+")").click()}s.bind("click.submitOption",(function(){o.submitOption()})),l.bind("click.deleteBtn",(function(){D.event.trigger("hiprintTemplateDataChanged_"+o.templateId,"\u5220\u9664"),i.printTemplate.deletePrintElement(o),n.clearSettingContainer()})),e.find(".auto-submit").change((function(t){o.submitOption()})),e.find(".auto-submit:input").bind("keydown.submitOption",(function(t){13==t.keyCode&&o.submitOption()})),this.settingContainer.append(e),a.length<1&&r&&r.forEach((function(t){var e=t.callback;t.callback=function(t){e&&(e(t),o.submitOption())},n.buildSettingByCustomOptions(t,n.settingContainer)})),this.lastPrintElement=o},t.prototype.buildSettingByCustomOptions=function(t,e){var n=this;this.clearLastPrintElement();var i=e||this.settingContainer;e||this.settingContainer.html("");var o=[],r=I.a.instance.panel.supportOptions.filter((function(t){return!t.hidden})).map((function(t){return t.name}));t.optionItems?o=t.optionItems:Object.keys(t.options).filter((function(t){return r.includes(t)})).forEach((function(t){var e=Ft.a.getItem(t);e&&o.push(e)}));var a=p()('<div class="hiprint-option-items"></div>');t.title&&a.append('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label hiprint-option-title"> '+t.title+"</div></div>"),o.forEach((function(e){e.submit=function(e){t.callback(n.getValueByOptionItems(o))},a.append(e.createTarget(n.printTemplate,t.options,void 0)),e.setValue(t.options[e.name],t.options,void 0)}));var s=p()('<button class="hiprint-option-item-settingBtn hiprint-option-item-submitBtn"type="button">\u786e\u5b9a</button>');a.append(s),s.bind("click.submitOption",(function(){t.callback(n.getValueByOptionItems(o))})),a.find(".auto-submit").change((function(e){t.callback(n.getValueByOptionItems(o))})),a.find(".auto-submit:input").bind("keydown.submitOption",(function(e){13==e.keyCode&&t.callback(n.getValueByOptionItems(o))})),i.append(a)},t.prototype.getValueByOptionItems=function(t){var e={};return t.forEach((function(t){e[t.name]=t.getValue()})),e},t}(),Dt=function(){function t(t,e){this.paginationContainer=t,this.jqPaginationContainer=p()(this.paginationContainer),this.template=e}return t.prototype.buildPagination=function(t){var e=this.template.getPaneltotal(),n=this;this.jqPaginationContainer.html("");for(var i=p()('<ul class="hiprint-pagination"></ul>'),o=function(){var t=r,e=n.template.printPanels[t].name||t+1,o=p()("<li><span>"+e+'</span><a href="javascript:void(0);">x</a></li>');o.find("span").click((function(){n.template.selectPanel(t),o.siblings().removeClass("selected"),p()(this).parent("li").addClass("selected")})),o.find("a").click((function(){n.template.deletePanel(t),n.buildPagination()})),i.append(o)},r=0;r<e;r++)o();var a=p()("<li><span>+</span></li>");i.append(a),this.jqPaginationContainer.append(i),a.click((function(){var t=function(t){n.template.addPrintPanel(t||void 0,!0),n.buildPagination(),p()(".hiprint-pagination li").removeClass("selected"),p()(".hiprint-pagination li:nth-last-child(2)").addClass("selected")};if(n.template.onPanelAddClick){var e={index:n.template.printPanels.length,paperType:"A4"};n.template.onPanelAddClick(e,t)}else t()}))},t.prototype.selectPanel=function(t){var e=t||this.template.editingPanel.index,n=p()(".hiprint-pagination li:nth("+e+")");n.length&&(n.siblings().removeClass("selected"),n.addClass("selected")),D.event.trigger("onSelectPanel",this.template.editingPanel,e,n)},t}(),Ht=function(){function t(t){var e=this;this.tempimageBase64={},this.id=R.a.instance.guid(),R.a.instance.setPrintTemplateById(this.id,this);var n=t||{};this.printPanels=[],this.dataMode=n.dataMode||1,this.history=null==n.history||n.history,this.willOutOfBounds=null==n.willOutOfBounds||n.willOutOfBounds,this.onDataChanged=n.onDataChanged,this.onUpdateError=n.onUpdateError,this.lastJson=n.template||{},this.historyList=[{id:R.a.instance.guid(),type:"\u521d\u59cb",json:this.lastJson}],this.historyPos=0,this.defaultPanelName=n.defaultPanelName,this.designOptions={},this.qtDesigner=null==n.qtDesigner||n.qtDesigner,this.qtDesignerMap={},this.qtDesignderFunction=function(t){this.qtDesignerMap={};const e=t.split("_")[0];for(const t of this.editingPanel.printElements){if(void 0===t.options.field)continue;const e=t.options.field.split("_")[0];void 0===this.qtDesignerMap[e]?this.qtDesignerMap[e]=1:this.qtDesignerMap[e]+=1}return 0===this.qtDesignerMap[e]||void 0===this.qtDesignerMap[e]?e:e+"_"+this.qtDesignerMap[e]};var i=new It(n.template||[]);n.template&&i.panels.forEach((function(t){e.printPanels.push(new Ot(t,e.id))})),n.fontList&&(this.fontList=n.fontList),n.fields&&(this.fields=n.fields),n.onImageChooseClick&&(this.onImageChooseClick=n.onImageChooseClick),n.onPanelAddClick&&(this.onPanelAddClick=n.onPanelAddClick),n.settingContainer&&new Rt(this,n.settingContainer),n.paginationContainer&&(this.printPaginationCreator=new Dt(n.paginationContainer,this),this.printPaginationCreator.buildPagination()),this.initAutoSave()}return t.prototype.design=function(t,e){var n=this;if(e||(e={}),0==this.printPanels.length){var i=this.createDefaultPanel();this.printPanels.push(i)}if(!t)throw new Error("options.container can not be empty");n.designOptions=e,this.createContainer(t),this.printPanels.forEach((function(t,i){n.container.append(t.getTarget()),i>0&&t.disable(),t.design(e)})),this.selectPanel(0)},t.prototype.getSimpleHtml=function(t,e){var n=this;e||(e={});var i=p()('<div class="hiprint-printTemplate"></div>');return t&&t.constructor===Array?t.forEach((function(o,r){o&&n.printPanels.forEach((function(n,a){i.append(n.getHtml(o,e)),r==t.length-1&&delete D._paperList}))})):this.printPanels.forEach((function(o,r){i.append(o.getHtml(t,e)),r==n.printPanels.length-1&&delete D._paperList})),e&&e.imgToBase64&&this.transformImg(i.find("img")),i},t.prototype.getSimpleHtmlAsync=function(t,e){return new Promise((n=>{var i=this;e||(e={});let o=p()('<div class="hiprint-printTemplate"></div>');const r=Array.isArray(t)?t:[t],a=[];r.forEach((function(t,n){t&&i.printPanels.forEach((function(n,i){a.push([n,t,e])}))})),function t(e,n){if(!e.length)return n();const[i,r,a]=e.shift();o.append(i.getHtml(r,a)),console.log("e.generateHTMLInterval",a.generateHTMLInterval),setTimeout((()=>t(e,n)),a.generateHTMLInterval??10)}(a,(function(){delete D._paperList,e&&e.imgToBase64&&i.transformImg(o.find("img")),n(o)}))}))},t.prototype.getHtml=function(t,e){return t||(t={}),this.getSimpleHtml(t,e)},t.prototype.getHtmlAsync=function(t,e){return t||(t={}),this.getSimpleHtmlAsync(t,e)},t.prototype.getJointHtml=function(t,e,n){var i=p()('<div class="hiprint-printTemplate"></div>'),o=[];return this.printPanels.forEach((function(r,a){i.append(r.getHtml(t,e,o,void 0,n))})),i},t.prototype.setPaper=function(t,e){if(/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(t))this.editingPanel.resize(void 0,parseFloat(t),parseFloat(e),!1);else{var n=R.a.instance[t];if(!n)throw new Error("not found pagetype:"+(t||""));this.editingPanel.resize(t,n.width,n.height,!1)}},t.prototype.rotatePaper=function(){this.editingPanel.rotatePaper()},t.prototype.zoom=function(t,e){this.editingPanel.zoom(t,e)},t.prototype.addPrintPanel=function(t,e){var n=t?new Ot(new Ct(t),this.id):this.createDefaultPanel();return t&&(t.index=this.printPanels.length),e&&(this.container.append(n.getTarget()),n.design(this.designOptions)),this.printPanels.push(n),e&&this.selectPanel(n.index),n},t.prototype.selectPanel=function(t){var e=this;t>e.printPanels.length-1&&(t=e.printPanels.length-1),this.printPanels.forEach((function(n,i){t==i?(n.enable(),e.editingPanel=n,e.printPaginationCreator&&e.printPaginationCreator.selectPanel(t)):n.disable()}))},t.prototype.deletePanel=function(t){this.printPanels[t].clear(),this.printPanels[t].getTarget().remove(),this.printPanels.splice(t,1)},t.prototype.getPaneltotal=function(){return this.printPanels.length},t.prototype.createDefaultPanel=function(){return new Ot(new Ct({index:this.printPanels.length,name:this.defaultPanelName,paperType:"A4"}),this.id)},t.prototype.createContainer=function(t){t?(this.container=p()(t),this.container.addClass("hiprint-printTemplate")):this.container=p()('<div class="hiprint-printTemplate"></div>')},t.prototype.getJsonTid=function(){var t=[];return this.printPanels.forEach((function(e){e.getPanelEntity().printElements.length&&t.push(e.getPanelEntity())})),new It({panels:t})},t.prototype.getJson=function(){var t=[];return this.printPanels.forEach((function(e){t.push(e.getPanelEntity(!0))})),new It({panels:t})},t.prototype.undo=function(t){i.a.event.trigger("hiprintTemplateDataShortcutKey_"+this.id,"undo")},t.prototype.redo=function(t){i.a.event.trigger("hiprintTemplateDataShortcutKey_"+this.id,"redo")},t.prototype.getPrintElementSelectEventKey=function(){return"PrintElementSelectEventKey_"+this.id},t.prototype.getBuildCustomOptionSettingEventKey=function(){return"BuildCustomOptionSettingEventKey_"+this.id},t.prototype.clear=function(){this.printPanels.forEach((function(t){if(t.clear(),t.index>0){var e=t.getTarget();e&&e.length&&e.remove()}})),this.printPanels=[this.printPanels[0]],this.printPaginationCreator&&this.printPaginationCreator.buildPagination()},t.prototype.getPaperType=function(t){return null==t&&(t=0),this.printPanels[0].paperType},t.prototype.getOrient=function(t){return null==t&&(t=0),this.printPanels[t].height>this.printPanels[t].width?1:2},t.prototype.getPrintStyle=function(t){return this.printPanels[t].getPrintStyle()},t.prototype.print=function(t,e,n){t||(t={}),this.getHtml(t,e).hiwprint(n)},t.prototype.print2=function(t,e){if(t||(t={}),e||(e={}),this.clientIsOpened()){var n=this,i=0,o={},r=p()('link[media=print][href*="print-lock"]'),a="";if(e.styleHandler&&(a+=e.styleHandler()),r.length<=0)throw new Error('\u8bf7\u5728 \u5165\u53e3\u6587\u4ef6(index.html) \u4e2d\u5f15\u5165 print-lock.css. \u6ce8\u610f: link[media="print"]');r.each((function(s,l){var u=new XMLHttpRequest;u.open("GET",p()(l).attr("href")),u.onreadystatechange=function(){if(4===u.readyState&&200===u.status&&(o[s+""]='<style rel="stylesheet" type="text/css">'+u.responseText+"</style>",++i==r.length)){for(var p="",l=0;l<r.length;l++)p+=o[l+""];a&&(p=a+p),n.sentToClient(p,t,e)}},u.send()}))}else alert("\u8fde\u63a5\u5ba2\u6237\u7aef\u5931\u8d25")},t.prototype.imageToBase64=function(t){var e=p()(t).attr("src");if(-1==e.indexOf("base64"))try{if(!this.tempimageBase64[e]){var n=document.createElement("canvas"),i=new Image;i.src=t.attr("src"),n.width=i.width,n.height=i.height,n.getContext("2d").drawImage(i,0,0),e&&(this.tempimageBase64[e]=n.toDataURL("image/png"))}t.attr("src",this.tempimageBase64[e])}catch(e){try{this.xhrLoadImage(t)}catch(t){console.log(t)}}},t.prototype.xhrLoadImage=function(t){},t.prototype.sentToClient=function(t,e,n){e||(e={});var i=p().extend({},n||{});if(i.imgToBase64=i.imgToBase64??!1,i.printByFragments)this.getHtmlAsync(e,i).then((e=>{var o=t+e[0].outerHTML;i.id=R.a.instance.guid(),i.html=o,i.templateId=this.id,H.sendByFragments(i,n)}));else{var o=t+this.getHtml(e,i)[0].outerHTML;i.id=R.a.instance.guid(),i.html=o,i.templateId=this.id,H.send(i)}},t.prototype.printByHtml=function(t){p()(t).hiwprint()},t.prototype.printByHtml2=function(t,e){if(e||(e={}),this.clientIsOpened()){var n=this,i=0,o={},r=p()('link[media=print][href*="print-lock"]');if(r.length<=0)throw new Error('\u8bf7\u5728 \u5165\u53e3\u6587\u4ef6(index.html) \u4e2d\u5f15\u5165 print-lock.css. \u6ce8\u610f: link[media="print"]');r.each((function(a,s){var l=new XMLHttpRequest;l.open("GET",p()(s).attr("href")),l.onreadystatechange=function(){if(4===l.readyState&&200===l.status&&(o[a+""]='<style rel="stylesheet" type="text/css">'+l.responseText+"</style>",++i==r.length)){for(var s="",u=0;u<r.length;u++)s+=o[u+""];var d=s+p()(t)[0].outerHTML,h=p().extend({},e||{});h.id=R.a.instance.guid(),h.html=d,h.templateId=n.id,H.send(h)}},l.send()}))}else alert("\u8fde\u63a5\u5ba2\u6237\u7aef\u5931\u8d25")},t.prototype.deletePrintElement=function(t){this.printPanels.forEach((function(e){e.deletePrintElement(t)}))},t.prototype.transformImg=function(t){var e=this;t.map((function(t,n){e.imageToBase64(p()(n))}))},t.prototype.toPdf=function(t,e,n){console.error("\u4e0d\u652f\u6301\u7684\u64cd\u4f5c")},t.prototype.createTempContainer=function(){this.removeTempContainer(),p()("body").prepend(p()('<div class="hiprint_temp_Container" style="overflow:hidden;height: 0px;box-sizing: border-box;"></div>'))},t.prototype.removeTempContainer=function(){p()(".hiprint_temp_Container").remove()},t.prototype.getTempContainer=function(){return p()(".hiprint_temp_Container")},t.prototype.svg2canvas=function(t){console.error("\u4e0d\u652f\u6301\u7684\u64cd\u4f5c")},t.prototype.parentWidthHeight=function(t){return t.style.width.endsWith("%")||t.style.height.endsWith("%")?"hiprint-printPaper-content"!=t.className?this.parentWidthHeight(t.parentNode):{width:10,height:10}:{width:i.a.pt.toPx(parseFloat(t.style.width)),height:i.a.pt.toPx(parseFloat(t.style.height))}},t.prototype.on=function(t,e){i.a.event.clear(t+"_"+this.id),i.a.event.on(t+"_"+this.id,e)},t.prototype.clientIsOpened=function(){return H.opened},t.prototype.getPrinterList=function(){return H.getPrinterList()||[]},t.prototype.getElementByTid=function(t,e){return null==e&&(e=0),this.printPanels[e].getElementByTid(t)},t.prototype.getElementByName=function(t,e){return null==e&&(e=0),this.printPanels[e].getElementByName(t)},t.prototype.getPanel=function(t){return null==t&&(t=0),this.printPanels[t]},t.prototype.loadAllImages=function(t,e,n){var i=this;null==n&&(n=0);for(var o=t[0].getElementsByTagName("img"),r=!0,a=0;a<o.length;a++){var s=o[a];s.src&&s.src!==window.location.href&&-1==s.src.indexOf("base64")&&(s&&void 0!==s.naturalWidth&&0!==s.naturalWidth&&s.complete||(r=!1))}n++,!r&&n<10?setTimeout((function(){i.loadAllImages(t,e,n)}),500):e()},t.prototype.setFontList=function(t){this.fontList=t},t.prototype.getFontList=function(){return this.fontList},t.prototype.setFields=function(t){this.fields=t},t.prototype.getFields=function(){return this.fields},t.prototype.setOnImageChooseClick=function(t){this.onImageChooseClick=t},t.prototype.getOnImageChooseClick=function(){return this.onImageChooseClick},t.prototype.getFieldsInPanel=function(){var t=[];return this.printPanels.forEach((function(e){t=t.concat(e.getFieldsInPanel())})),t},t.prototype.getTestData=function(){var t={};return this.printPanels.forEach((function(e){t=Object.assign(t,e.getTestData())})),t},t.prototype.update=function(t,e){var n=this;try{if(t&&"object"==O(t)&&t.panels.length>0){var i=n.printPanels.length-1;t.panels.forEach((function(t,e){if(e>i){n.printPanels.push(new Ot(t,n.id));var o=n.printPanels[e];n.container.append(o.getTarget()),e>0&&o.disable(),o.design(n.designOptions),n.printPaginationCreator&&n.printPaginationCreator.buildPagination()}var r=new Ct(t);n.editingPanel=n.printPanels[e],n.editingPanel.update(r)})),n.selectPanel(e||0)}}catch(t){console.log(t),n.onUpdateError&&n.onUpdateError(t)}},t.prototype.getSelectEls=function(){var t=this;return t.editingPanel.mouseRect&&t.editingPanel.mouseRect.target&&p()(".mouseRect").length?t.editingPanel.getElementInRect(t.editingPanel.mouseRect):t.editingPanel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&!t.printElementType.type.includes("table")}))},t.prototype.selectElementsByField=function(t){var e=p();this.editingPanel.printElements.forEach(((n,i)=>{if(t&&t.includes(n.options.field)){let t=n.designTarget;t.children("div[panelindex]").addClass("selected"),t.children().last().css({display:"block"}),t=t[0],e.data(t,"hidraggable").options.onBeforeSelectAllDrag.call(t,{})}}))},t.prototype.selectAllElements=function(){var t=p();this.editingPanel.printElements.forEach(((e,n)=>{let i=e.designTarget;i.children("div[panelindex]").addClass("selected"),i.children().last().css({display:"block"}),i=i[0],t.data(i,"hidraggable").options.onBeforeSelectAllDrag.call(i,{})}))},t.prototype.updateOption=function(t,e){var n=this.getSelectEls();n&&n.length&&(n.forEach((function(n){"draggable"===t&&n.designTarget.hidraggable("update",{draggable:e}),n.updateOption(t,e,!0)})),i.a.event.trigger("hiprintTemplateDataChanged_"+this.id,"\u6279\u91cf\u4fee\u6539"))},t.prototype.setElsAlign=function(t){var e=this.getSelectEls();if(e.length){var n=Math.min.apply(null,e.map((function(t){return t.options.left}))),i=Math.max.apply(null,e.map((function(t){return t.options.left+t.options.width}))),o=Math.min.apply(null,e.map((function(t){return t.options.top}))),r=Math.max.apply(null,e.map((function(t){return t.options.top+t.options.height})));switch(t){case"left":e.forEach((function(t){t.updateSizeAndPositionOptions(n),t.designTarget.css("left",t.options.displayLeft())}));break;case"vertical":var a=n+(i-n)/2;e.forEach((function(t){t.updateSizeAndPositionOptions(a-t.options.width/2),t.designTarget.css("left",t.options.displayLeft())}));break;case"right":e.forEach((function(t){t.updateSizeAndPositionOptions(i-t.options.width),t.designTarget.css("left",t.options.displayLeft())}));break;case"top":e.forEach((function(t){t.updateSizeAndPositionOptions(void 0,o),t.designTarget.css("top",t.options.displayTop())}));break;case"horizontal":var s=o+(r-o)/2;e.forEach((function(t){t.updateSizeAndPositionOptions(void 0,s-t.options.height/2),t.designTarget.css("top",t.options.displayTop())}));break;case"bottom":e.forEach((function(t){t.updateSizeAndPositionOptions(void 0,r-t.options.height),t.designTarget.css("top",t.options.displayTop())}));break;case"distributeHor":var p=[].reduce.call(e,(function(t,e){return t+e.options.width}),0),l=(i-n-p)/(e.length-1);e.sort((function(t,e){return t.options.left-e.options.left})),e.forEach((function(t,n){[0,e.length-1].includes(n)||(t.updateSizeAndPositionOptions(e[n-1].options.left+e[n-1].options.width+l),t.designTarget.css("left",t.options.displayLeft()))}));break;case"distributeVer":var u=[].reduce.call(e,(function(t,e){return t+e.options.height}),0),d=(r-o-u)/(e.length-1);e.sort((function(t,e){return t.options.top-e.options.top})),e.forEach((function(t,n){[0,e.length-1].includes(n)||(t.updateSizeAndPositionOptions(void 0,e[n-1].options.top+e[n-1].options.height+d),t.designTarget.css("top",t.options.displayTop()))}))}}},t.prototype.setElsSpace=function(t,e){var n=this.getSelectEls();n.length&&(e?(n.sort((function(t,e){return t.options.left-e.options.left})),n.forEach((function(e,i){i>0&&(e.updateSizeAndPositionOptions(n[i-1].options.left+n[i-1].options.width+t),e.designTarget.css("left",e.options.displayLeft()))}))):(n.sort((function(t,e){return t.options.top-e.options.top})),n.forEach((function(e,i){i>0&&(e.updateSizeAndPositionOptions(void 0,n[i-1].options.top+n[i-1].options.height+t),e.designTarget.css("top",e.options.displayTop()))}))))},t.prototype.initAutoSave=function(){var t=this;i.a.event.on("hiprintTemplateDataShortcutKey_"+this.id,(function(e){if(t.history)switch(e){case"undo":if(t.historyPos>0){t.historyPos-=1;var n=t.historyList[t.historyPos];t.update(n.json)}break;case"redo":if(t.historyPos<t.historyList.length-1){t.historyPos+=1;n=t.historyList[t.historyPos];t.update(n.json)}}})),i.a.event.on("hiprintTemplateDataChanged_"+this.id,(function(e){if(t.history){var n=1==t.dataMode?t.getJson():t.getJsonTid();t.lastJson=n,t.historyPos<t.historyList.length-1&&(t.historyList=t.historyList.slice(0,t.historyPos+1)),t.historyList.push({id:R.a.instance.guid(),type:e,json:n}),t.historyList.length>50?t.historyList=t.historyList.slice(0,1).concat(t.historyList.slice(1,50)):t.historyPos+=1,t.onDataChanged&&t.onDataChanged(e,n)}}))},t}();function Lt(t){this.getHtml(t).hiwprint()}function kt(t,e,n){p().extend({},t||{}),t.imgToBase64=t.imgToBase64??!1;var i=new Ht({});i.on("printSuccess",e),i.on("printError",n),i.printByHtml2(this.getHtml(t),t.options)}function Mt(t){var e=void 0;return t&&t.templates.forEach((function(n,i){var o=p().extend({},n.options||{});t.imgToBase64&&(o.imgToBase64=o.imgToBase64??!1),e?e.append(n.template.getHtml(n.data,o).html()):e=n.template.getHtml(n.data,o)})),e}function _t(t){I.a.instance.init(t),I.a.instance.providers&&I.a.instance.providers.forEach((function(t){t.addElementTypes(C.instance)})),!window.autoConnect||I.a.instance.host==H.host&&I.a.instance.token==H.token||(H.stop(),I.a.instance.host&&(H.host=I.a.instance.host),I.a.instance.token&&(H.token=I.a.instance.token),H.start())}function Bt(t){null==L._config&&(L._config=JSON.stringify(F));const e=JSON.parse(L._config);t?t&&Object.keys(t).forEach((function(n){if("optionItems"==n&&t.optionItems&&t.optionItems.length)I.a.instance.registerItems(t.optionItems);else if(t[n].tabs&&t[n].tabs.length)t[n].tabs.forEach((function(t,i){if(t.replace)p().extend(I.a.instance[n].tabs[i],t);else{var o=t.options||[],r=e[n].tabs[i].options;o&&o.forEach((function(t){var e=r.findIndex((function(e){return e.name==t.name}));e>-1?r[e].hidden=t.hidden:t.after?(e=r.findIndex((function(e){return e.name==t.after})),e>-1&&r.splice(e+1,0,t)):r.push(t)})),p().extend(I.a.instance[n].tabs[i],{name:t.name,options:r})}})),delete t[n].tabs;else if(t[n].supportOptions&&t[n].supportOptions.length){var i=t[n].supportOptions,o=e[n].supportOptions;i.forEach((function(t){var e=o.findIndex((function(e){return e.name==t.name}));e>-1?o[e].hidden=t.hidden:t.after?(e=o.findIndex((function(e){return e.name==t.after})),e>-1&&o.splice(e+1,0,t)):o.push(t)})),p().extend(I.a.instance[n].supportOptions,o),delete t[n].supportOptions}else{var r={};r[n]=t[n],t[n].tabs&&0==t[n].tabs.length&&(r[n].supportOptions=e[n].supportOptions),p().extend(I.a.instance,r)}})):p().extend(I.a.instance,JSON.parse(L._config))}function Nt(t,e){return C.instance.updateElementType(t,e)}function Vt(t){I.a.instance.clear("printerList"),I.a.instance.on("printerList",t),H.refreshPrinterList()}function At(t){I.a.instance.clear("clients"),I.a.instance.on("clients",t),H.getClients()}function zt(t){I.a.instance.clear("clientInfo"),I.a.instance.on("getClientInfo",t),H.getClientInfo()}function jt(t,e,...n){I.a.instance.clear("address_"+t),I.a.instance.on("address_"+t,e),H.getAddress(t,...n)}function Wt(t,e,n){I.a.instance.clear("ippPrinterCallback"),I.a.instance.on("ippPrinterCallback",e),I.a.instance.clear("ippPrinterConnected"),I.a.instance.on("ippPrinterConnected",n),H.ippPrint(t)}function Yt(t,e){I.a.instance.clear("ippRequestCallback"),I.a.instance.on("ippRequestCallback",e),H.ippRequest(t)}n.d(e,"init",(function(){return _t})),n.d(e,"setConfig",(function(){return Bt})),n.d(e,"updateElementType",(function(){return Nt})),n.d(e,"hiwebSocket",(function(){return H})),n.d(e,"refreshPrinterList",(function(){return Vt})),n.d(e,"getClients",(function(){return At})),n.d(e,"getClientInfo",(function(){return zt})),n.d(e,"getAddress",(function(){return jt})),n.d(e,"ippPrint",(function(){return Wt})),n.d(e,"ippRequest",(function(){return Yt})),n.d(e,"PrintElementTypeManager",(function(){return xt})),n.d(e,"PrintElementTypeGroup",(function(){return Pt})),n.d(e,"PrintTemplate",(function(){return Ht})),n.d(e,"print",(function(){return Lt})),n.d(e,"print2",(function(){return kt})),n.d(e,"getHtml",(function(){return Mt})),p()(document).ready((function(){H.hasIo()&&window.autoConnect&&H.start()}))}]),k=function(t){return function(e){return{addElementTypes:function(e){e.removePrintElementTypes("defaultModule"),e.addPrintElementTypes("defaultModule",[new t.PrintElementTypeGroup("\u5e38\u89c4",[{tid:"defaultModule.text",title:"\u6587\u672c",type:"text"},{tid:"defaultModule.image",data:"data:image/gif;base64,R0lGODdhAQABAIABAAAAAOjo6CwAAAAAAQABAAACAkwBADs=",title:"\u56fe\u7247",type:"image",options:{width:60,height:60}},{tid:"defaultModule.longText",title:"\u957f\u6587",type:"longText"},{tid:"defaultModule.table",title:"\u8868\u683c",type:"table",columns:[[{title:"",field:"",width:100},{title:"",field:"",width:100}]]},{tid:"defaultModule.barcode",title:"\u6761\u5f62\u7801",type:"barcode"},{tid:"defaultModule.qrcode",title:"\u4e8c\u7ef4\u7801",type:"qrcode"}]),new t.PrintElementTypeGroup("\u8f85\u52a9",[{tid:"defaultModule.hline",title:"\u6a2a\u7ebf",type:"hline"},{tid:"defaultModule.vline",title:"\u7ad6\u7ebf",type:"vline"},{tid:"defaultModule.rect",title:"\u77e9\u5f62",type:"rect"},{tid:"defaultModule.oval",title:"\u692d\u5706",type:"oval"}])])}}}}(L);!function(t){function e(){return-1!==navigator.userAgent.indexOf("MSIE")||!!document.documentMode}function n(t,e,i){void 0===i&&(i=0);for(var o=t.getElementsByTagName("img"),r=!0,a=0;a<o.length;a++){var s=o[a];s.src&&s.src!==window.location.href&&-1==s.src.indexOf("base64")&&(s&&void 0!==s.naturalWidth&&0!==s.naturalWidth&&s.complete||s.complete||(r=!1))}i++,!r&&i<10?setTimeout((function(){n(t,e,i)}),500):e()}t.fn.hiwprint=function(i){var o=!1,r=document.getElementById("hiwprint_iframe");r&&r.parentNode.removeChild(r);var a=t.extend({},t.fn.hiwprint.defaults,i),s=this,p=t('<iframe id="hiwprint_iframe" style="visibility: hidden; height: 0; width: 0; position: absolute;"></iframe>'),l="";a.importCss&&(a.styleHandler&&(l+=a.styleHandler()),t("link[media=print]").length>0&&t("link[media=print]").each((function(){t(this).attr("href").indexOf("print-lock.css")>=0&&(l+='<link rel="stylesheet" type="text/css" media="print" href="'+t(this).attr("href")+'">',l+='<link rel="stylesheet" type="text/css" href="'+t(this).attr("href")+'">')}))),p[0].srcdoc='<!DOCTYPE html><html><head><title></title><meta charset="UTF-8">'+l+"</head><body></body></html>",p[0].onload=function(){if(!o){o=!0;var t=p[0].contentWindow||p[0].contentDocument;t.document&&(t=t.document),p.attr("srcdoc")||t.write('<!DOCTYPE html><html><head><title></title><meta charset="UTF-8">'+l+"</head><body></body></html>"),a.printContainer?t.body.innerHTML=s[0].outerHTML:t.body.innerHTML=s.html(),n(t,(function(){!function(t,n){try{if(t.focus(),!e()&&window.StyleMedia||e())try{t.contentWindow.document.execCommand("print",!1,null)}catch(e){t.contentWindow.print()}else t.contentWindow.print();n.callback&&n.callback()}catch(t){console.log(t)}}(p[0],a)}))}},p.appendTo("body")},t.fn.hiwprint.defaults={importCss:!0,printContainer:!0,callback:null,styleHandler:null}}(p());const{rE:M}={rE:"0.0.10"};function B(t,e=!1){try{if(!Array.isArray(t))throw new Error("\u53c2\u6570 res \u5fc5\u987b\u662f\u4e00\u4e2a\u6570\u7ec4");L.init();const n=t.filter((t=>t?.template&&"string"==typeof t.template&&t.data)).map((t=>{try{return{template:new L.PrintTemplate({template:JSON.parse(t.template)}),data:t.data}}catch(t){return console.error("\u89e3\u6790\u6a21\u677f\u5931\u8d25\uff0c\u8df3\u8fc7\u6b64\u4efb\u52a1:",t),null}})).filter(Boolean);if(0===n.length)return void console.warn("\u6ca1\u6709\u6709\u6548\u7684\u6253\u5370\u4efb\u52a1");e?L.print2({templates:n}):L.print({templates:n})}catch(t){throw console.error("\u6253\u5370\u5931\u8d25:",t),new Error(`\u6253\u5370\u5931\u8d25: ${t.message}`)}}function N(t,e=!0,n=!1){try{if(!(t&&t.template&&t.data))throw new Error("hiprintPrint \u53c2\u6570\u65e0\u6548");{L.init();const i=JSON.parse(t.template),o=new L.PrintTemplate({template:i});if(!e)return o.getHtml(t.data);n?o.print2(t.data):o.print(t.data)}}catch(t){throw console.error("\u6253\u5370\u5931\u8d25:",t),new Error(`\u6253\u5370\u5931\u8d25: ${t.message}`)}}L.version=M;var V=L;return a}()}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("bwip-js"),require("jquery"),require("socket.io-client")):"function"==typeof define&&define.amd?define("hiprint",["bwip-js","jquery","socket.io-client"],e):"object"==typeof exports?exports.hiprint=e(require("bwip-js"),require("jquery"),require("socket.io-client")):t.hiprint=e(t.bwipjs,t.jQuery,t.io)}(self,(function(t,e,n){return function(){"use strict";var i={34:function(t,e,n){var i=n(4901);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},81:function(t,e,n){var i=n(9565),o=n(9306),r=n(8551),a=n(6823),s=n(851),p=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(o(n))return r(i(n,t));throw new p(a(t)+" is not iterable")}},116:function(t,e,n){var i=n(6518),o=n(9565),r=n(2652),a=n(9306),s=n(8551),p=n(1767),l=n(9539),u=n(4549)("find",TypeError);i({target:"Iterator",proto:!0,real:!0,forced:u},{find:function(t){s(this);try{a(t)}catch(t){l(this,"throw",t)}if(u)return o(u,this,t);var e=p(this),n=0;return r(e,(function(e,i){if(t(e,n++))return i(e)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},283:function(t,e,n){var i=n(9504),o=n(9039),r=n(4901),a=n(9297),s=n(3724),p=n(350).CONFIGURABLE,l=n(3706),u=n(1181),d=u.enforce,h=u.get,c=String,f=Object.defineProperty,g=i("".slice),m=i("".replace),v=i([].join),y=s&&!o((function(){return 8!==f((function(){}),"length",{value:8}).length})),b=String(String).split("String"),T=t.exports=function(t,e,n){"Symbol("===g(c(e),0,7)&&(e="["+m(c(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||p&&t.name!==e)&&(s?f(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&a(n,"arity")&&t.length!==n.arity&&f(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=d(t);return a(i,"source")||(i.source=v(b,"string"==typeof e?e:"")),t};Function.prototype.toString=T((function(){return r(this)&&h(this).source||l(this)}),"toString")},350:function(t,e,n){var i=n(3724),o=n(9297),r=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,s=o(r,"name"),p=s&&"something"===function(){}.name,l=s&&(!i||i&&a(r,"name").configurable);t.exports={EXISTS:s,PROPER:p,CONFIGURABLE:l}},397:function(t,e,n){var i=n(7751);t.exports=i("document","documentElement")},421:function(t){t.exports={}},616:function(t,e,n){var i=n(9039);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},655:function(t,e,n){var i=n(6955),o=String;t.exports=function(t){if("Symbol"===i(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},679:function(t,e,n){var i=n(1625),o=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw new o("Incorrect invocation")}},741:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?n:e)(i)}},757:function(t,e,n){var i=n(7751),o=n(4901),r=n(1625),a=n(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return o(e)&&r(e.prototype,s(t))}},851:function(t,e,n){var i=n(6955),o=n(5966),r=n(4117),a=n(6269),s=n(8227)("iterator");t.exports=function(t){if(!r(t))return o(t,s)||o(t,"@@iterator")||a[i(t)]}},869:function(e){e.exports=t},1072:function(t,e,n){var i=n(1828),o=n(8727);t.exports=Object.keys||function(t){return i(t,o)}},1181:function(t,e,n){var i,o,r,a=n(8622),s=n(4576),p=n(34),l=n(6699),u=n(9297),d=n(7629),h=n(6119),c=n(421),f="Object already initialized",g=s.TypeError,m=s.WeakMap;if(a||d.state){var v=d.state||(d.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,i=function(t,e){if(v.has(t))throw new g(f);return e.facade=t,v.set(t,e),e},o=function(t){return v.get(t)||{}},r=function(t){return v.has(t)}}else{var y=h("state");c[y]=!0,i=function(t,e){if(u(t,y))throw new g(f);return e.facade=t,l(t,y,e),e},o=function(t){return u(t,y)?t[y]:{}},r=function(t){return u(t,y)}}t.exports={set:i,get:o,has:r,enforce:function(t){return r(t)?o(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!p(e)||(n=o(e)).type!==t)throw new g("Incompatible receiver, "+t+" required");return n}}}},1291:function(t,e,n){var i=n(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},1625:function(t,e,n){var i=n(9504);t.exports=i({}.isPrototypeOf)},1701:function(t,e,n){var i=n(6518),o=n(9565),r=n(9306),a=n(8551),s=n(1767),p=n(9462),l=n(6319),u=n(9539),d=n(4549),h=n(6395),c=!h&&d("map",TypeError),f=p((function(){var t=this.iterator,e=a(o(this.next,t));if(!(this.done=!!e.done))return l(t,this.mapper,[e.value,this.counter++],!0)}));i({target:"Iterator",proto:!0,real:!0,forced:h||c},{map:function(t){a(this);try{r(t)}catch(t){u(this,"throw",t)}return c?o(c,this,t):new f(s(this),{mapper:t})}})},1767:function(t){t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},1828:function(t,e,n){var i=n(9504),o=n(9297),r=n(5397),a=n(9617).indexOf,s=n(421),p=i([].push);t.exports=function(t,e){var n,i=r(t),l=0,u=[];for(n in i)!o(s,n)&&o(i,n)&&p(u,n);for(;e.length>l;)o(i,n=e[l++])&&(~a(u,n)||p(u,n));return u}},1914:function(t){t.exports=e},2106:function(t,e,n){var i=n(283),o=n(4913);t.exports=function(t,e,n){return n.get&&i(n.get,e,{getter:!0}),n.set&&i(n.set,e,{setter:!0}),o.f(t,e,n)}},2140:function(t,e,n){var i={};i[n(8227)("toStringTag")]="z",t.exports="[object z]"===String(i)},2195:function(t,e,n){var i=n(9504),o=i({}.toString),r=i("".slice);t.exports=function(t){return r(o(t),8,-1)}},2211:function(t,e,n){var i=n(9039);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},2360:function(t,e,n){var i,o=n(8551),r=n(6801),a=n(8727),s=n(421),p=n(397),l=n(4055),u=n(6119),d="prototype",h="script",c=u("IE_PROTO"),f=function(){},g=function(t){return"<"+h+">"+t+"</"+h+">"},m=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;v="undefined"!=typeof document?document.domain&&i?m(i):(e=l("iframe"),n="java"+h+":",e.style.display="none",p.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):m(i);for(var o=a.length;o--;)delete v[d][a[o]];return v()};s[c]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(f[d]=o(t),n=new f,f[d]=null,n[c]=t):n=v(),void 0===e?n:r.f(n,e)}},2489:function(t,e,n){var i=n(6518),o=n(9565),r=n(9306),a=n(8551),s=n(1767),p=n(9462),l=n(6319),u=n(6395),d=n(9539),h=n(4549),c=!u&&h("filter",TypeError),f=p((function(){for(var t,e,n=this.iterator,i=this.predicate,r=this.next;;){if(t=a(o(r,n)),this.done=!!t.done)return;if(e=t.value,l(n,i,[e,this.counter++],!0))return e}}));i({target:"Iterator",proto:!0,real:!0,forced:u||c},{filter:function(t){a(this);try{r(t)}catch(t){d(this,"throw",t)}return c?o(c,this,t):new f(s(this),{predicate:t})}})},2529:function(t){t.exports=function(t,e){return{value:t,done:e}}},2603:function(t,e,n){var i=n(655);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},2652:function(t,e,n){var i=n(6080),o=n(9565),r=n(8551),a=n(6823),s=n(4209),p=n(6198),l=n(1625),u=n(81),d=n(851),h=n(9539),c=TypeError,f=function(t,e){this.stopped=t,this.result=e},g=f.prototype;t.exports=function(t,e,n){var m,v,y,b,T,w,E,x=n&&n.that,C=!(!n||!n.AS_ENTRIES),P=!(!n||!n.IS_RECORD),S=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),I=i(e,x),F=function(t){return m&&h(m,"normal",t),new f(!0,t)},R=function(t){return C?(r(t),O?I(t[0],t[1],F):I(t[0],t[1])):O?I(t,F):I(t)};if(P)m=t.iterator;else if(S)m=t;else{if(!(v=d(t)))throw new c(a(t)+" is not iterable");if(s(v)){for(y=0,b=p(t);b>y;y++)if((T=R(t[y]))&&l(g,T))return T;return new f(!1)}m=u(t,v)}for(w=P?t.next:m.next;!(E=o(w,m)).done;){try{T=R(E.value)}catch(t){h(m,"throw",t)}if("object"==typeof T&&T&&l(g,T))return T}return new f(!1)}},2777:function(t,e,n){var i=n(9565),o=n(34),r=n(757),a=n(5966),s=n(4270),p=n(8227),l=TypeError,u=p("toPrimitive");t.exports=function(t,e){if(!o(t)||r(t))return t;var n,p=a(t,u);if(p){if(void 0===e&&(e="default"),n=i(p,t,e),!o(n)||r(n))return n;throw new l("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},2787:function(t,e,n){var i=n(9297),o=n(4901),r=n(8981),a=n(6119),s=n(2211),p=a("IE_PROTO"),l=Object,u=l.prototype;t.exports=s?l.getPrototypeOf:function(t){var e=r(t);if(i(e,p))return e[p];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof l?u:null}},2796:function(t,e,n){var i=n(9039),o=n(4901),r=/#|\.prototype\./,a=function(t,e){var n=p[s(t)];return n===u||n!==l&&(o(e)?i(e):!!e)},s=a.normalize=function(t){return String(t).replace(r,".").toLowerCase()},p=a.data={},l=a.NATIVE="N",u=a.POLYFILL="P";t.exports=a},2812:function(t){var e=TypeError;t.exports=function(t,n){if(t<n)throw new e("Not enough arguments");return t}},2839:function(t,e,n){var i=n(4576).navigator,o=i&&i.userAgent;t.exports=o?String(o):""},2967:function(t,e,n){var i=n(6706),o=n(34),r=n(7750),a=n(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=i(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),a(i),o(n)?(e?t(n,i):n.__proto__=i,n):n}}():void 0)},3167:function(t,e,n){var i=n(4901),o=n(34),r=n(2967);t.exports=function(t,e,n){var a,s;return r&&i(a=e.constructor)&&a!==n&&o(s=a.prototype)&&s!==n.prototype&&r(t,s),t}},3392:function(t,e,n){var i=n(9504),o=0,r=Math.random(),a=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+r,36)}},3506:function(t,e,n){var i=n(3925),o=String,r=TypeError;t.exports=function(t){if(i(t))return t;throw new r("Can't set "+o(t)+" as a prototype")}},3579:function(t,e,n){var i=n(6518),o=n(9565),r=n(2652),a=n(9306),s=n(8551),p=n(1767),l=n(9539),u=n(4549)("some",TypeError);i({target:"Iterator",proto:!0,real:!0,forced:u},{some:function(t){s(this);try{a(t)}catch(t){l(this,"throw",t)}if(u)return o(u,this,t);var e=p(this),n=0;return r(e,(function(e,i){if(t(e,n++))return i()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},3706:function(t,e,n){var i=n(9504),o=n(4901),r=n(7629),a=i(Function.toString);o(r.inspectSource)||(r.inspectSource=function(t){return a(t)}),t.exports=r.inspectSource},3717:function(t,e){e.f=Object.getOwnPropertySymbols},3724:function(t,e,n){var i=n(9039);t.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3925:function(t,e,n){var i=n(34);t.exports=function(t){return i(t)||null===t}},4055:function(t,e,n){var i=n(4576),o=n(34),r=i.document,a=o(r)&&o(r.createElement);t.exports=function(t){return a?r.createElement(t):{}}},4114:function(t,e,n){var i=n(6518),o=n(8981),r=n(6198),a=n(4527),s=n(6837);i({target:"Array",proto:!0,arity:1,forced:n(9039)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=o(this),n=r(e),i=arguments.length;s(n+i);for(var p=0;p<i;p++)e[n]=arguments[p],n++;return a(e,n),n}})},4117:function(t){t.exports=function(t){return null==t}},4209:function(t,e,n){var i=n(8227),o=n(6269),r=i("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[r]===t)}},4270:function(t,e,n){var i=n(9565),o=n(4901),r=n(34),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&o(n=t.toString)&&!r(s=i(n,t)))return s;if(o(n=t.valueOf)&&!r(s=i(n,t)))return s;if("string"!==e&&o(n=t.toString)&&!r(s=i(n,t)))return s;throw new a("Can't convert object to primitive value")}},4376:function(t,e,n){var i=n(2195);t.exports=Array.isArray||function(t){return"Array"===i(t)}},4495:function(t,e,n){var i=n(9519),o=n(9039),r=n(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},4527:function(t,e,n){var i=n(3724),o=n(4376),r=TypeError,a=Object.getOwnPropertyDescriptor,s=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!a(t,"length").writable)throw new r("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4549:function(t,e,n){var i=n(4576);t.exports=function(t,e){var n=i.Iterator,o=n&&n.prototype,r=o&&o[t],a=!1;if(r)try{r.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(t){t instanceof e||(a=!1)}if(!a)return r}},4576:function(t,e,n){var i=function(t){return t&&t.Math===Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||i("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4603:function(t,e,n){var i=n(6840),o=n(9504),r=n(655),a=n(2812),s=URLSearchParams,p=s.prototype,l=o(p.append),u=o(p.delete),d=o(p.forEach),h=o([].push),c=new s("a=1&a=2&b=3");c.delete("a",1),c.delete("b",void 0),c+""!="a=2"&&i(p,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return u(this,t);var i=[];d(this,(function(t,e){h(i,{key:e,value:t})})),a(e,1);for(var o,s=r(t),p=r(n),c=0,f=0,g=!1,m=i.length;c<m;)o=i[c++],g||o.key===s?(g=!0,u(this,o.key)):f++;for(;f<m;)(o=i[f++]).key===s&&o.value===p||l(this,o.key,o.value)}),{enumerable:!0,unsafe:!0})},4659:function(t,e,n){var i=n(3724),o=n(4913),r=n(6980);t.exports=function(t,e,n){i?o.f(t,e,r(0,n)):t[e]=n}},4901:function(t){var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:function(t,e,n){var i=n(3724),o=n(5917),r=n(8686),a=n(8551),s=n(6969),p=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",c="writable";e.f=i?r?function(t,e,n){if(a(t),e=s(e),a(n),"function"==typeof t&&"prototype"===e&&"value"in n&&c in n&&!n[c]){var i=u(t,e);i&&i[c]&&(t[e]=n.value,n={configurable:h in n?n[h]:i[h],enumerable:d in n?n[d]:i[d],writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(a(t),e=s(e),a(n),o)try{return l(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new p("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},4979:function(t,e,n){var i=n(6518),o=n(4576),r=n(7751),a=n(6980),s=n(4913).f,p=n(9297),l=n(679),u=n(3167),d=n(2603),h=n(5002),c=n(6193),f=n(3724),g=n(6395),m="DOMException",v=r("Error"),y=r(m),b=function(){l(this,T);var t=arguments.length,e=d(t<1?void 0:arguments[0]),n=d(t<2?void 0:arguments[1],"Error"),i=new y(e,n),o=new v(e);return o.name=m,s(i,"stack",a(1,c(o.stack,1))),u(i,this,b),i},T=b.prototype=y.prototype,w="stack"in new v(m),E="stack"in new y(1,2),x=y&&f&&Object.getOwnPropertyDescriptor(o,m),C=!(!x||x.writable&&x.configurable),P=w&&!C&&!E;i({global:!0,constructor:!0,forced:g||P},{DOMException:P?b:y});var S=r(m),O=S.prototype;if(O.constructor!==S)for(var I in g||s(O,"constructor",a(1,S)),h)if(p(h,I)){var F=h[I],R=F.s;p(S,R)||s(S,R,a(6,F.c))}},5002:function(t){t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},5031:function(t,e,n){var i=n(7751),o=n(9504),r=n(8480),a=n(3717),s=n(8551),p=o([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(s(t)),n=a.f;return n?p(e,n(t)):e}},5397:function(t,e,n){var i=n(7055),o=n(7750);t.exports=function(t){return i(o(t))}},5610:function(t,e,n){var i=n(1291),o=Math.max,r=Math.min;t.exports=function(t,e){var n=i(t);return n<0?o(n+e,0):r(n,e)}},5745:function(t,e,n){var i=n(7629);t.exports=function(t,e){return i[t]||(i[t]=e||{})}},5917:function(t,e,n){var i=n(3724),o=n(9039),r=n(4055);t.exports=!i&&!o((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},5966:function(t,e,n){var i=n(9306),o=n(4117);t.exports=function(t,e){var n=t[e];return o(n)?void 0:i(n)}},6080:function(t,e,n){var i=n(7476),o=n(9306),r=n(616),a=i(i.bind);t.exports=function(t,e){return o(t),void 0===e?t:r?a(t,e):function(){return t.apply(e,arguments)}}},6119:function(t,e,n){var i=n(5745),o=n(3392),r=i("keys");t.exports=function(t){return r[t]||(r[t]=o(t))}},6193:function(t,e,n){var i=n(9504),o=Error,r=i("".replace),a=String(new o("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,p=s.test(a);t.exports=function(t,e){if(p&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=r(t,s,"");return t}},6198:function(t,e,n){var i=n(8014);t.exports=function(t){return i(t.length)}},6269:function(t){t.exports={}},6279:function(t,e,n){var i=n(6840);t.exports=function(t,e,n){for(var o in e)i(t,o,e[o],n);return t}},6319:function(t,e,n){var i=n(8551),o=n(9539);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},6395:function(t){t.exports=!1},6518:function(t,e,n){var i=n(4576),o=n(7347).f,r=n(6699),a=n(6840),s=n(9433),p=n(7740),l=n(2796);t.exports=function(t,e){var n,u,d,h,c,f=t.target,g=t.global,m=t.stat;if(n=g?i:m?i[f]||s(f,{}):i[f]&&i[f].prototype)for(u in e){if(h=e[u],d=t.dontCallGetSet?(c=o(n,u))&&c.value:n[u],!l(g?u:f+(m?".":"#")+u,t.forced)&&void 0!==d){if(typeof h==typeof d)continue;p(h,d)}(t.sham||d&&d.sham)&&r(h,"sham",!0),a(n,u,h,t)}}},6699:function(t,e,n){var i=n(3724),o=n(4913),r=n(6980);t.exports=i?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},6706:function(t,e,n){var i=n(9504),o=n(9306);t.exports=function(t,e,n){try{return i(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},6801:function(t,e,n){var i=n(3724),o=n(8686),r=n(4913),a=n(8551),s=n(5397),p=n(1072);e.f=i&&!o?Object.defineProperties:function(t,e){a(t);for(var n,i=s(e),o=p(e),l=o.length,u=0;l>u;)r.f(t,n=o[u++],i[n]);return t}},6823:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6837:function(t){var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6840:function(t,e,n){var i=n(4901),o=n(4913),r=n(283),a=n(9433);t.exports=function(t,e,n,s){s||(s={});var p=s.enumerable,l=void 0!==s.name?s.name:e;if(i(n)&&r(n,l,s),s.global)p?t[e]=n:a(e,n);else{try{s.unsafe?t[e]&&(p=!0):delete t[e]}catch(t){}p?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6955:function(t,e,n){var i=n(2140),o=n(4901),r=n(2195),a=n(8227)("toStringTag"),s=Object,p="Arguments"===r(function(){return arguments}());t.exports=i?r:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?n:p?r(e):"Object"===(i=r(e))&&o(e.callee)?"Arguments":i}},6969:function(t,e,n){var i=n(2777),o=n(757);t.exports=function(t){var e=i(t,"string");return o(e)?e:e+""}},6980:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:function(t,e,n){var i=n(4495);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:function(t,e,n){var i=n(9504),o=n(9039),r=n(2195),a=Object,s=i("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===r(t)?s(t,""):a(t)}:a},7347:function(t,e,n){var i=n(3724),o=n(9565),r=n(8773),a=n(6980),s=n(5397),p=n(6969),l=n(9297),u=n(5917),d=Object.getOwnPropertyDescriptor;e.f=i?d:function(t,e){if(t=s(t),e=p(e),u)try{return d(t,e)}catch(t){}if(l(t,e))return a(!o(r.f,t,e),t[e])}},7476:function(t,e,n){var i=n(2195),o=n(9504);t.exports=function(t){if("Function"===i(t))return o(t)}},7566:function(t,e,n){var i=n(6840),o=n(9504),r=n(655),a=n(2812),s=URLSearchParams,p=s.prototype,l=o(p.getAll),u=o(p.has),d=new s("a=1");!d.has("a",2)&&d.has("a",void 0)||i(p,"has",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return u(this,t);var i=l(this,t);a(e,1);for(var o=r(n),s=0;s<i.length;)if(i[s++]===o)return!0;return!1}),{enumerable:!0,unsafe:!0})},7588:function(t,e,n){var i=n(6518),o=n(9565),r=n(2652),a=n(9306),s=n(8551),p=n(1767),l=n(9539),u=n(4549)("forEach",TypeError);i({target:"Iterator",proto:!0,real:!0,forced:u},{forEach:function(t){s(this);try{a(t)}catch(t){l(this,"throw",t)}if(u)return o(u,this,t);var e=p(this),n=0;r(e,(function(e){t(e,n++)}),{IS_RECORD:!0})}})},7629:function(t,e,n){var i=n(6395),o=n(4576),r=n(9433),a="__core-js_shared__",s=t.exports=o[a]||r(a,{});(s.versions||(s.versions=[])).push({version:"3.42.0",mode:i?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7657:function(t,e,n){var i,o,r,a=n(9039),s=n(4901),p=n(34),l=n(2360),u=n(2787),d=n(6840),h=n(8227),c=n(6395),f=h("iterator"),g=!1;[].keys&&("next"in(r=[].keys())?(o=u(u(r)))!==Object.prototype&&(i=o):g=!0),!p(i)||a((function(){var t={};return i[f].call(t)!==t}))?i={}:c&&(i=l(i)),s(i[f])||d(i,f,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:g}},7740:function(t,e,n){var i=n(9297),o=n(5031),r=n(7347),a=n(4913);t.exports=function(t,e,n){for(var s=o(e),p=a.f,l=r.f,u=0;u<s.length;u++){var d=s[u];i(t,d)||n&&i(n,d)||p(t,d,l(e,d))}}},7750:function(t,e,n){var i=n(4117),o=TypeError;t.exports=function(t){if(i(t))throw new o("Can't call method on "+t);return t}},7751:function(t,e,n){var i=n(4576),o=n(4901);t.exports=function(t,e){return arguments.length<2?(n=i[t],o(n)?n:void 0):i[t]&&i[t][e];var n}},8014:function(t,e,n){var i=n(1291),o=Math.min;t.exports=function(t){var e=i(t);return e>0?o(e,9007199254740991):0}},8111:function(t,e,n){var i=n(6518),o=n(4576),r=n(679),a=n(8551),s=n(4901),p=n(2787),l=n(2106),u=n(4659),d=n(9039),h=n(9297),c=n(8227),f=n(7657).IteratorPrototype,g=n(3724),m=n(6395),v="constructor",y="Iterator",b=c("toStringTag"),T=TypeError,w=o[y],E=m||!s(w)||w.prototype!==f||!d((function(){w({})})),x=function(){if(r(this,f),p(this)===f)throw new T("Abstract class Iterator not directly constructable")},C=function(t,e){g?l(f,t,{configurable:!0,get:function(){return e},set:function(e){if(a(this),this===f)throw new T("You can't redefine this property");h(this,t)?this[t]=e:u(this,t,e)}}):f[t]=e};h(f,b)||C(b,y),!E&&h(f,v)&&f[v]!==Object||C(v,x),x.prototype=f,i({global:!0,constructor:!0,forced:E},{Iterator:x})},8227:function(t,e,n){var i=n(4576),o=n(5745),r=n(9297),a=n(3392),s=n(4495),p=n(7040),l=i.Symbol,u=o("wks"),d=p?l.for||l:l&&l.withoutSetter||a;t.exports=function(t){return r(u,t)||(u[t]=s&&r(l,t)?l[t]:d("Symbol."+t)),u[t]}},8237:function(t,e,n){var i=n(6518),o=n(2652),r=n(9306),a=n(8551),s=n(1767),p=n(9539),l=n(4549),u=n(8745),d=n(9039),h=TypeError,c=d((function(){[].keys().reduce((function(){}),void 0)})),f=!c&&l("reduce",h);i({target:"Iterator",proto:!0,real:!0,forced:c||f},{reduce:function(t){a(this);try{r(t)}catch(t){p(this,"throw",t)}var e=arguments.length<2,n=e?void 0:arguments[1];if(f)return u(f,this,e?[t]:[t,n]);var i=s(this),l=0;if(o(i,(function(i){e?(e=!1,n=i):n=t(n,i,l),l++}),{IS_RECORD:!0}),e)throw new h("Reduce of empty iterator with no initial value");return n}})},8480:function(t,e,n){var i=n(1828),o=n(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},8551:function(t,e,n){var i=n(34),o=String,r=TypeError;t.exports=function(t){if(i(t))return t;throw new r(o(t)+" is not an object")}},8622:function(t,e,n){var i=n(4576),o=n(4901),r=i.WeakMap;t.exports=o(r)&&/native code/.test(String(r))},8686:function(t,e,n){var i=n(3724),o=n(9039);t.exports=i&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8721:function(t,e,n){var i=n(3724),o=n(9504),r=n(2106),a=URLSearchParams.prototype,s=o(a.forEach);i&&!("size"in a)&&r(a,"size",{get:function(){var t=0;return s(this,(function(){t++})),t},configurable:!0,enumerable:!0})},8727:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:function(t,e,n){var i=n(616),o=Function.prototype,r=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?a.bind(r):function(){return a.apply(r,arguments)})},8773:function(t,e){var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!n.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},8981:function(t,e,n){var i=n(7750),o=Object;t.exports=function(t){return o(i(t))}},9039:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9297:function(t,e,n){var i=n(9504),o=n(8981),r=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return r(o(t),e)}},9306:function(t,e,n){var i=n(4901),o=n(6823),r=TypeError;t.exports=function(t){if(i(t))return t;throw new r(o(t)+" is not a function")}},9433:function(t,e,n){var i=n(4576),o=Object.defineProperty;t.exports=function(t,e){try{o(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},9462:function(t,e,n){var i=n(9565),o=n(2360),r=n(6699),a=n(6279),s=n(8227),p=n(1181),l=n(5966),u=n(7657).IteratorPrototype,d=n(2529),h=n(9539),c=s("toStringTag"),f="IteratorHelper",g="WrapForValidIterator",m=p.set,v=function(t){var e=p.getterFor(t?g:f);return a(o(u),{next:function(){var n=e(this);if(t)return n.nextHandler();if(n.done)return d(void 0,!0);try{var i=n.nextHandler();return n.returnHandlerResult?i:d(i,n.done)}catch(t){throw n.done=!0,t}},return:function(){var n=e(this),o=n.iterator;if(n.done=!0,t){var r=l(o,"return");return r?i(r,o):d(void 0,!0)}if(n.inner)try{h(n.inner.iterator,"normal")}catch(t){return h(o,"throw",t)}return o&&h(o,"normal"),d(void 0,!0)}})},y=v(!0),b=v(!1);r(b,c,"Iterator Helper"),t.exports=function(t,e,n){var i=function(i,o){o?(o.iterator=i.iterator,o.next=i.next):o=i,o.type=e?g:f,o.returnHandlerResult=!!n,o.nextHandler=t,o.counter=0,o.done=!1,m(this,o)};return i.prototype=e?y:b,i}},9504:function(t,e,n){var i=n(616),o=Function.prototype,r=o.call,a=i&&o.bind.bind(r,r);t.exports=i?a:function(t){return function(){return r.apply(t,arguments)}}},9519:function(t,e,n){var i,o,r=n(4576),a=n(2839),s=r.process,p=r.Deno,l=s&&s.versions||p&&p.version,u=l&&l.v8;u&&(o=(i=u.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=+i[1]),t.exports=o},9539:function(t,e,n){var i=n(9565),o=n(8551),r=n(5966);t.exports=function(t,e,n){var a,s;o(t);try{if(!(a=r(t,"return"))){if("throw"===e)throw n;return n}a=i(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw n;if(s)throw a;return o(a),n}},9565:function(t,e,n){var i=n(616),o=Function.prototype.call;t.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},9617:function(t,e,n){var i=n(5397),o=n(5610),r=n(6198),a=function(t){return function(e,n,a){var s=i(e),p=r(s);if(0===p)return!t&&-1;var l,u=o(a,p);if(t&&n!=n){for(;p>u;)if((l=s[u++])!=l)return!0}else for(;p>u;u++)if((t||u in s)&&s[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9985:function(t){t.exports=n}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={exports:{}};return i[t].call(n.exports,n,n.exports,r),n.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};r.r(a),r.d(a,{default:function(){return A},defaultElementTypeProvider:function(){return k},hinnn:function(){return D},hiprint:function(){return L},hiprintPrint:function(){return N},hiprintPrintMulti:function(){return B}});r(8111),r(2489),r(1701),r(4114),r(116),r(7588),r(8237),r(3579),r(4979),r(4603),r(7566),r(8721);var s=r(1914),p=r.n(s);const l={id:"watermark",watch:!1,content:"",container:".hiprint-printPaper",width:200,height:200,textAlign:"center",textBaseline:"middle",fontSize:"14px",fontFamily:"Microsoft Yahei",fillStyle:"rgba(184, 184, 184, 0.3)",rotate:25,timestamp:!1,format:"YYYY-MM-DD HH:mm",zIndex:0};let u={};function d(t){const{id:e,watch:n,content:i,container:o,width:r,height:a,textAlign:s,textBaseline:p,fontSize:l,fontFamily:h,fillStyle:c,rotate:f,timestamp:g,format:m,zIndex:v}=t;u[e]={wmMo:null,wmTimer:null};const y=document.createElement("canvas");y.setAttribute("width",`${r}px`),y.setAttribute("height",`${a}px`);let b="string"==typeof o?document.querySelector(o):o;const T=y.getContext("2d");T.textAlign=s,T.textBaseline=p,T.font=`${l} ${h}`,T.fillStyle=c,T.translate(r/2,a/2),T.rotate(-Math.PI/180*f),T.fillText(`${i}`,0,0),g&&T.fillText(`${function(t,e="YYYY-MM-DD"){if(!t)return null;"number"==typeof t&&(t=new Date(t));const n=t.getFullYear(),i=t.getMonth(),o=t.getDate(),r=t.getHours(),a=r%12==0?12:r%12,s=t.getMinutes(),p=t.getSeconds(),l=t=>`0${t}`.slice(-2),u={YYYY:n,MM:l(i+1),MMMM:`${i+1}\u6708`,M:i+1,DD:l(o),D:o,HH:l(r),H:r,hh:l(a),h:a,mm:l(s),m:s,ss:l(p),s:p};return e.replace(/Y+|M+|D+|H+|h+|m+|s+|S+|Q/g,(t=>String(u[t])))}(new Date,m)}`,0,parseInt(l)+5);let w=b.querySelector(".__vm__"+e);const E=w||document.createElement("div"),x=`position:absolute;user-select:none;top:0;left:0;${b.getAttribute("style")};z-index:${v};pointer-events:none !important;background-repeat:repeat;background-image:url('${y.toDataURL()}');-webkit-print-color-adjust: exact;`;if(E.setAttribute("style",x),E.classList.add("__vm__"+e),w||b.insertBefore(E,b.firstChild),n){const n=window.MutationObserver||window.WebKitMutationObserver;n&&(u[e].wmMo=new n((n=>{let i=n.some((t=>t.target.className==b.className&&"attributes"==t.type));w=b.querySelector(".__vm__"+e),(w&&w.getAttribute("style")!==x||!w||i)&&(u[e].wmMo.disconnect(),u[e].wmMo=null,delete u[e].wmMo,d(t))})),u[e].wmMo.observe(b,{attributes:!0,subtree:!0,childList:!0}))}if(m){let t=864e5;m.includes("s")?t=1e3:m.includes("m")?t=6e4:(m.includes("h")||m.includes("H"))&&(t=36e5),u[e].wmTimer=window.setTimeout((()=>{E.style.bottom="0"}),t)}}const h=function(t){const{id:e,watch:n,container:i}=t;if(n){let t="string"==typeof i?document.querySelector(i):i;u[e]&&(u[e].wmMo&&u[e].wmMo.disconnect(),u[e].wmMo=null,u[e].wmTimer&&window.clearTimeout(u[e].wmTimer),u[e].wmTimer=null,delete u[e]);const n=t.querySelector(".__vm__"+e);n&&n.parentNode.removeChild(n)}};var c=function(t){let e=Object.assign({},l,t);h(e),d(e)},f=h,g=r(9985);var m={PAGE_TYPES:{A1:{width:841,height:594},A2:{width:420,height:594},A3:{width:420,height:297},A4:{width:210,height:297},A5:{width:210,height:148},A6:{width:105,height:148},A7:{width:105,height:74},A8:{width:52,height:74},B1:{width:1e3,height:707},B2:{width:500,height:707},B3:{width:500,height:353},B4:{width:250,height:353},B5:{width:250,height:176},B6:{width:125,height:176},B7:{width:125,height:88},B8:{width:62,height:88}},BARCODE_TYPES:[{label:"\u9ed8\u8ba4(code128)",value:""},{value:"code128",label:"CODE128"},{value:"code39",label:"CODE39"},{value:"ean13",label:"EAN-13"},{value:"ean8",label:"EAN-8"},{value:"itf14",label:"ITF-14"}],QRCODE_TYPES:[{label:"\u9ed8\u8ba4(qrcode)",value:""},{label:"QR Code",value:"qrcode"},{label:"Data Matrix",value:"datamatrix"},{label:"\u6c49\u4fe1\u7801",value:"hanxin"},{label:"GS1 QR Code",value:"gs1qrcode"},{label:"GS1 Data Matrix",value:"gs1datamatrix"}]},v=r(869),y=r.n(v);function b(t){return y().toSVG(t)}function T(t,e){return e}function w(t,e,n={}){n.format=String(n.format||"code128").toUpperCase();const i=b({bcid:String(n.format).toLowerCase(),text:e,scale:+n.width,width:n._width,height:n.height,padding:0,barcolor:n.lineColor,includetext:n.includetext}),o=t.parentNode,r=t.getAttributeNames().reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{});t.outerHTML=i;const a=o.querySelector("svg");Object.entries(r).forEach((([t,e])=>{a.setAttribute(t,e)}))}class E{constructor(t,e){"string"==typeof e&&(e={text:e}),this.el=t,this.opts=Object.assign({text:"",width:256,height:256,colorDark:"#000000",colorLight:"#ffffff"},e)}makeCode(t){if(!t)return;const e=this.el,n=this.opts,i=b({bcid:n.bcid||"qrcode",text:t,scale:1,color:n.colorDark,backgroundcolor:n.colorLight,ecclevel:["M","L","H","Q"][n.correctLevel]??"M"});return e&&(e.innerHTML=i),i}clear(){this.el&&(this.el.innerHTML="")}}function x(t,e,n){if("object"!=typeof t)return n;let i=t;for(const t of function(t){return Array.isArray(t)?t:t.replace(/\[/g,".").replace(/\]/g,"").split(".")}(e)){if(null==i)return n;i=i[t]}return i}function C(t){const{key:e,value:n,source:i}=t;let o=t.format;if(!e||!o)return n;try{"string"==typeof o&&(o=JSON.parse(o))}catch(t){console.error(`Parse error for key "${e}":`,t.message)}if(!Array.isArray(o))return n;return o.map((t=>{switch(t.type){case"string":return t.value||"";case"field":const e=x(i,t.field);return null!=e?String(e):"";case"sequence":return function(t=5){return String(Math.random()).replace(".","").padStart(t,"0").slice(-t)}(t.value);default:return""}})).join("")}function P(t){const e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=async n=>{const i=n.target.files[0];if(i){e.value="",i.size>12288&&console.warn(`\u56fe\u7247\u5927\u5c0f\u4e3a${(i.size/1024).toFixed(2)}KB\uff0c\u5efa\u8bae8KB\u4ee5\u4e0b\u8bf7\u81ea\u884c\u538b\u7f29\u5c3a\u5bf8`);try{let e=await function(t){return new Promise(((e,n)=>{const i=new FileReader;i.onload=()=>e(i.result),i.onerror=()=>n(i.error),i.readAsDataURL(t)}))}(i);t.refresh(e)}catch(t){console.error("\u56fe\u7247\u89e3\u6790\u5931\u8d25")}}},e.click()}function S(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function I(t,e,n="row"){var i="";"row"===n?i=" hiprint-option-item-row":"group"===n?i=" hiprint-option-item-group":"flex"===n&&(i=" hiprint-option-item-flex");var o=e?"hiprint-option-item-field":"";return p()(`<div class="hiprint-option-item${i}"><div class="hiprint-option-item-label">${t}</div><div class="${o}">${e}</div></div>`)}var F={movingDistance:1.5,paperHeightTrim:1,showPosition:!0,positionLineMode:!1,positionUnit:!0,showSizeBox:!0,adsorbMin:3,showAdsorbLine:!0,adsorbLineMin:6,paperNumberContinue:!1,panel:{supportOptions:[{name:"paperList",hidden:!1},{name:"panelPaperRule",hidden:!1},{name:"panelPageRule",hidden:!1},{name:"firstPaperFooter",hidden:!1},{name:"evenPaperFooter",hidden:!1},{name:"oddPaperFooter",hidden:!1},{name:"lastPaperFooter",hidden:!1},{name:"leftOffset",hidden:!1},{name:"topOffset",hidden:!1},{name:"fontFamily",hidden:!1},{name:"orient",hidden:!1},{name:"paperNumberDisabled",hidden:!1},{name:"paperNumberContinue",hidden:!1},{name:"paperNumberFormat",hidden:!1},{name:"watermarkOptions",hidden:!1},{name:"panelLayoutOptions",hidden:!1}],default:{}},text:{tabs:[{name:"\u57fa\u7840",options:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"dataType",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"textDecoration",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"textContentWrap",hidden:!1},{name:"lineHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u8fb9\u6846",options:[{name:"optionsGroup",hidden:!1},{name:"borderLeft",hidden:!1},{name:"borderTop",hidden:!1},{name:"borderRight",hidden:!1},{name:"borderBottom",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderColor",hidden:!1},{name:"contentPaddingLeft",hidden:!1},{name:"contentPaddingTop",hidden:!1},{name:"contentPaddingRight",hidden:!1},{name:"contentPaddingBottom",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"textType",hidden:!1},{name:"barcodeMode",hidden:!1},{name:"barTextMode",hidden:!1},{name:"barWidth",hidden:!1},{name:"barAutoWidth",hidden:!1},{name:"qrcodeType",hidden:!1},{name:"qrCodeLevel",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"upperCase",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}]}],supportOptions:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"dataType",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"textDecoration",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"textContentWrap",hidden:!1},{name:"lineHeight",hidden:!1},{name:"textType",hidden:!1},{name:"barcodeMode",hidden:!1},{name:"barTextMode",hidden:!1},{name:"barWidth",hidden:!1},{name:"barAutoWidth",hidden:!1},{name:"qrCodeLevel",hidden:!1},{name:"hideTitle",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"optionsGroup",hidden:!1},{name:"borderLeft",hidden:!1},{name:"borderTop",hidden:!1},{name:"borderRight",hidden:!1},{name:"borderBottom",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderColor",hidden:!1},{name:"contentPaddingLeft",hidden:!1},{name:"contentPaddingTop",hidden:!1},{name:"contentPaddingRight",hidden:!1},{name:"contentPaddingBottom",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{width:120,height:9.75}},image:{tabs:[{name:"\u57fa\u7840",options:[{name:"field",hidden:!1},{name:"src",hidden:!1},{name:"fit",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"borderRadius",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}]}],supportOptions:[{name:"field",hidden:!1},{name:"src",hidden:!1},{name:"fit",hidden:!1},{name:"borderRadius",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{}},longText:{tabs:[{name:"\u57fa\u7840",options:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"textAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"color",hidden:!1},{name:"longTextIndent",hidden:!1},{name:"leftSpaceRemoved",hidden:!1},{name:"lHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}]}],supportOptions:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"textAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"color",hidden:!1},{name:"hideTitle",hidden:!1},{name:"longTextIndent",hidden:!1},{name:"leftSpaceRemoved",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"lHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"optionsGroup",hidden:!1},{name:"borderLeft",hidden:!1},{name:"borderTop",hidden:!1},{name:"borderRight",hidden:!1},{name:"borderBottom",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderColor",hidden:!1},{name:"contentPaddingLeft",hidden:!1},{name:"contentPaddingTop",hidden:!1},{name:"contentPaddingRight",hidden:!1},{name:"contentPaddingBottom",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{height:42,width:550}},table:{tabs:[{name:"\u57fa\u7840",options:[{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"tableHeaderRepeat",hidden:!1},{name:"tableFooterRepeat",hidden:!1},{name:"autoCompletion",hidden:!1},{name:"maxRows",hidden:!1},{name:"columns",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"lineHeight",hidden:!1},{name:"textAlign",hidden:!1},{name:"gridColumns",hidden:!1},{name:"gridColumnsGutter",hidden:!1},{name:"tableBorder",hidden:!1},{name:"tableHeaderBorder",hidden:!1},{name:"tableHeaderCellBorder",hidden:!1},{name:"tableHeaderRowHeight",hidden:!1},{name:"tableHeaderBackground",hidden:!1},{name:"tableHeaderFontSize",hidden:!1},{name:"tableHeaderFontWeight",hidden:!1},{name:"tableBodyRowHeight",hidden:!1},{name:"tableBodyRowBorder",hidden:!1},{name:"tableBodyCellBorder",hidden:!1},{name:"tableFooterBorder",hidden:!1},{name:"tableFooterCellBorder",hidden:!1},{name:"lHeight",hidden:!1}]},{name:"\u5217",options:[]},{name:"\u9ad8\u7ea7",options:[{name:"axis",hidden:!1},{name:"styler",hidden:!1},{name:"rowStyler",hidden:!1},{name:"footerFormatter",hidden:!1},{name:"rowsColumnsMerge",hidden:!1},{name:"rowsColumnsMergeClean",hidden:!1},{name:"groupSequenceContinue",hidden:!1},{name:"groupFieldsFormatter",hidden:!1},{name:"groupFormatter",hidden:!1},{name:"groupFooterFormatter",hidden:!1},{name:"gridColumnsFooterFormatter",hidden:!1}]}],supportOptions:[{name:"field",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"lineHeight",hidden:!1},{name:"textAlign",hidden:!1},{name:"gridColumns",hidden:!1},{name:"gridColumnsGutter",hidden:!1},{name:"tableHeaderRepeat",hidden:!1},{name:"tableBorder",hidden:!1},{name:"tableHeaderBorder",hidden:!1},{name:"tableHeaderCellBorder",hidden:!1},{name:"tableHeaderRowHeight",hidden:!1},{name:"tableHeaderBackground",hidden:!1},{name:"tableHeaderFontSize",hidden:!1},{name:"tableHeaderFontWeight",hidden:!1},{name:"tableBodyRowHeight",hidden:!1},{name:"tableBodyRowBorder",hidden:!1},{name:"tableBodyCellBorder",hidden:!1},{name:"tableFooterBorder",hidden:!1},{name:"tableFooterCellBorder",hidden:!1},{name:"axis",hidden:!1},{name:"lHeight",hidden:!1},{name:"autoCompletion",hidden:!1},{name:"maxRows",hidden:!1},{name:"columns",hidden:!1},{name:"styler",hidden:!1},{name:"rowStyler",hidden:!1},{name:"tableFooterRepeat",hidden:!1},{name:"footerFormatter",hidden:!1},{name:"rowsColumnsMerge",hidden:!1},{name:"rowsColumnsMergeClean",hidden:!1},{name:"groupSequenceContinue",hidden:!1},{name:"groupFieldsFormatter",hidden:!1},{name:"groupFormatter",hidden:!1},{name:"groupFooterFormatter",hidden:!1},{name:"gridColumnsFooterFormatter",hidden:!1}],default:{width:550}},hline:{tabs:[{name:"\u57fa\u7840",options:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1}]}],supportOptions:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}],default:{borderWidth:.75,height:9,width:90}},vline:{tabs:[{name:"\u57fa\u7840",options:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1}]}],supportOptions:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}],default:{borderWidth:void 0,height:90,width:9}},rect:{tabs:[{name:"\u57fa\u7840",options:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1}]}],supportOptions:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}],default:{borderWidth:void 0,height:90,width:90}},oval:{tabs:[{name:"\u57fa\u7840",options:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1}]}],supportOptions:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderStyle",hidden:!1},{name:"borderColor",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}],default:{borderWidth:void 0,height:90,width:90}},html:{tabs:[{name:"\u57fa\u7840",options:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1}]}],supportOptions:[{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"zIndex",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1}],default:{height:90,width:90}},tableColumn:{supportOptions:[{name:"title",hidden:!1},{name:"align",hidden:!1},{name:"halign",hidden:!1},{name:"vAlign",hidden:!1},{name:"tableTextType",hidden:!1},{name:"tableBarcodeMode",hidden:!1},{name:"tableQRCodeLevel",hidden:!1},{name:"tableColumnHeight",hidden:!1},{name:"showCodeTitle",hidden:!1},{name:"paddingLeft",hidden:!1},{name:"paddingRight",hidden:!1},{name:"tableSummaryTitle",hidden:!1},{name:"tableSummaryText",hidden:!1},{name:"tableSummaryColspan",hidden:!1},{name:"tableSummary",hidden:!1},{name:"tableSummaryAlign",hidden:!1},{name:"tableSummaryNumFormat",hidden:!1},{name:"tableSummaryFormatter",hidden:!1},{name:"upperCase",hidden:!1},{name:"renderFormatter",hidden:!1},{name:"formatter2",hidden:!1},{name:"styler2",hidden:!1},{name:"stylerHeader",hidden:!1}],default:{height:90,width:90}},barcode:{tabs:[{name:"\u57fa\u7840",options:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"barcodeType",hidden:!1},{name:"barWidth",hidden:!1},{name:"barAutoWidth",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"barColor",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}]}],supportOptions:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"barcodeType",hidden:!1},{name:"barWidth",hidden:!1},{name:"barAutoWidth",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"barColor",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{width:160,height:40,title:"\u6761\u5f62\u7801",barcodeType:"code128",testData:"barcode"}},qrcode:{tabs:[{name:"\u57fa\u7840",options:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"qrcodeType",hidden:!1},{name:"qrCodeLevel",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1}]},{name:"\u6837\u5f0f",options:[{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"barColor",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1}]},{name:"\u9ad8\u7ea7",options:[{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}]}],supportOptions:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"qrcodeType",hidden:!1},{name:"qrCodeLevel",hidden:!1},{name:"coordinate",hidden:!1},{name:"widthHeight",hidden:!1},{name:"hideTitle",hidden:!1},{name:"fixed",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"barColor",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"transform",hidden:!1},{name:"zIndex",hidden:!1},{name:"pageBreak",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{width:80,height:80,title:"\u4e8c\u7ef4\u7801",qrcodeType:"qrcode",testData:"qrcode"}}};window.autoConnect=!1,p().fn||(p().fn=p().prototype);var R=p(),D={paperList:m.PAGE_TYPES},H={},L=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==O(t)&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=21)}([function(t,e,n){var i;n.d(e,"a",(function(){return D})),D.event=(i={},{on:function(t,e){i[t]||(i[t]=[]),i[t].push(e)},id:0,off:function(t,e){var n=i[t];if(n){for(var o=-1,r=0;r<n.length;r++)if(n[r]===e){o=r;break}o<0||i[t].splice(o,1)}},trigger:function(t){var e=i[t];if(e&&e.length)for(var n=Array.prototype.slice.call(arguments,1),o=0;o<e.length;o++)e[o].apply(this,n)},clear:function(t){i[t]=[]},getId:function(){return this.id+=1,this.id},getNameWithId:function(t){return t+"-"+this.getId()}}),D.form={serialize:function(t){var e=p()(t).serializeArray(),n={};return p().each(e,(function(){n[this.name]?"[object Array]"==Object.prototype.toString.call(n[this.name])?n[this.name].push(this.value):n[this.name]=[n[this.name],this.value]:n[this.name]=this.value})),n}},D.pt={toPx:function(t){return t*(this.getDpi()/72)},toMm:function(t){return D.px.toMm(D.pt.toPx(t))},dpi:0,getDpi:function(){if(!this.dpi){var t=document.createElement("DIV");t.style.cssText="width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden",document.body.appendChild(t),this.dpi=t.offsetHeight}return this.dpi}},D.px={toPt:function(t){return t*(72/this.getDpi())},toMm:function(t){return Math.round(t/this.getDpi()*25.4*100)/100},dpi:0,getDpi:function(){if(!this.dpi){var t=document.createElement("DIV");t.style.cssText="width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden",document.body.appendChild(t),this.dpi=t.offsetHeight}return this.dpi}},D.mm={toPt:function(t){return 72/25.4*t},toPx:function(t){return D.pt.toPx(D.mm.toPt(t))}},D.throttle=function(t,e,n){var i,o,r,a=null,s=0;n||(n={});var p=function(){s=!1===n.leading?0:_.now(),a=null,r=t.apply(i,o),a||(i=o=null)};return function(){var l=_.now();s||!1!==n.leading||(s=l);var u=e-(l-s);return i=this,o=arguments,u<=0||u>e?(a&&(clearTimeout(a),a=null),s=l,r=t.apply(i,o),a||(i=o=null)):a||!1===n.trailing||(a=setTimeout(p,u)),r}},D.debounce=function(t,e,n){var i,o,r,a,s,p=function p(){var l=_.now()-a;l<e&&l>=0?i=setTimeout(p,e-l):(i=null,n||(s=t.apply(r,o),i||(r=o=null)))};return function(){r=this,o=arguments,a=_.now();var l=n&&!i;return i||(i=setTimeout(p,e)),l&&(s=t.apply(r,o),r=o=null),s}},D.toUtf8=function(t){var e,n,i,o;for(e="",i=t.length,n=0;n<i;n++)(o=t.charCodeAt(n))>=1&&o<=127?e+=t.charAt(n):o>2047?(e+=String.fromCharCode(224|o>>12&15),e+=String.fromCharCode(128|o>>6&63),e+=String.fromCharCode(128|63&o)):(e+=String.fromCharCode(192|o>>6&31),e+=String.fromCharCode(128|63&o));return e},D.groupBy=function(t,e,n){var i={};return t.forEach((function(t){var o=JSON.stringify(n(t));i[o]||(i[o]={rows:[]},e.forEach((function(e){i[o][e]=t[e]}))),i[o].rows.push(t)})),Object.keys(i).map((function(t){return i[t]}))},D.orderBy=function(t,e){if(t.length<=1)return t;var n=Math.floor(t.length/2),i=t.splice(n,1)[0],o=[],r=[],a=!0,s=!1,p=void 0;try{for(var l,u=t[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var d=l.value;e(d)<e(i)?o.push(d):r.push(d)}}catch(t){s=!0,p=t}finally{try{a||null==u.return||u.return()}finally{if(s)throw p}}return this.orderBy(o,e).concat([i],this.orderBy(r,e))},D.dateFormat=function(t,e){if(t)try{var n=t instanceof Date?t:new Date(t),i={"y+":n.getFullYear(),"M+":n.getMonth()+1,"d+":n.getDate(),"H+":n.getHours(),"m+":n.getMinutes(),"s+":n.getSeconds(),"q+":Math.floor((n.getMonth()+3)/3),S:n.getMilliseconds()};for(var o in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(n.getFullYear()+"").substr(4-RegExp.$1.length))),i)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?i[o]:("00"+i[o]).substr((""+i[o]).length)));return e}catch(t){return console.log(t),""}return""},D.numFormat=function(t,e){if(null!=t)try{var n="string"==typeof t?parseFloat(t):t,i=parseInt(e);return i>0?n.toFixed(i):parseInt(n.toString())}catch(t){return console.log(t),""}return""},D.toUpperCase=T},function(t,e,n){n.d(e,"a",(function(){return o}));var i=n(9),o=function(){function t(){}return t.prototype.init=function(t){t&&p().extend(this,t)},t.prototype.on=function(t,e){D.event.on(t,e)},t.prototype.clear=function(t){D.event.clear(t)},t.prototype.registerItems=function(t){t.forEach((function(t){i.a.registerItem(new t)}))},Object.defineProperty(t,"instance",{get:function(){return t._instance||(t._instance=new t,F&&p().extend(t._instance,F),t._instance.optionItems&&t._instance.optionItems.forEach((function(t){i.a.registerItem(new t)}))),t._instance},enumerable:!0,configurable:!0}),t}()},function(t,e,n){var i=function(){function t(t){this.printElement=t}return t.prototype.updatePosition=function(t,e){this.left=t,this.top=e},t}();n.d(e,"a",(function(){return o}));var o=function(){function t(){if(this.printTemplateContainer={},Object.keys(D.paperList).forEach((t=>this[t]=D.paperList[t])),this.dragLengthCNum=function(t,e){var n=.75*t;return Math.round(n/e)*e},!this.A4)throw new Error("\u7eb8\u5f20\u7c7b\u578b\u4e22\u5931")}return Object.defineProperty(t,"instance",{get:function(){return this._instance||(this._instance=new t),this._instance},enumerable:!0,configurable:!0}),t.prototype.getDragingPrintElement=function(){return t.instance.dragingPrintElement},t.prototype.setDragingPrintElement=function(e){t.instance.dragingPrintElement=new i(e)},t.prototype.guid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},t.prototype.imageToBase64=function(t){if(-1==p()(t).attr("src").indexOf("base64"))try{var e=document.createElement("canvas"),n=new Image;n.src=t.attr("src"),e.width=n.width,e.height=n.height,e.getContext("2d").drawImage(n,0,0),t.attr("src",e.toDataURL("image/png"))}catch(e){try{this.xhrLoadImage(t)}catch(t){console.log(t)}}},t.prototype.xhrLoadImage=function(t){},t.prototype.transformImg=function(t){var e=this;t.map((function(t,n){e.imageToBase64(p()(n))}))},t.prototype.getPrintTemplateById=function(e){return t.instance.printTemplateContainer[e]},t.prototype.setPrintTemplateById=function(e,n){return t.instance.printTemplateContainer[e]=n},t}()},function(t,e,n){var i=function(){};n.d(e,"a",(function(){return o}));var o=function(){function t(t){t=t||{},this.left=t.left,this.top=t.top,this.topInDesign=this.top,this.height=t.height,this.width=t.width,this.transform=t.transform,this.init(t)}return t.prototype.setDefault=function(t){this.defaultOptions=t,this.initSize(),Object.keys(this.defaultOptions).forEach((t=>{this[t]=this[t]||this.defaultOptions[t]}))},t.prototype.initSize=function(){this.width||this.setWidth(this.defaultOptions.width),this.height||this.setHeight(this.defaultOptions.height)},t.prototype.initSizeByHtml=function(t,e){this.width||this.setWidth(t),this.height||this.setHeight(e)},t.prototype.getRectInfo=function(){var t={w:0,h:0,diffW:0,diffH:0};if(this.transform){var e=this.transform*Math.PI/180,n=this.width,i=this.height,o=Math.sin(e),r=Math.cos(e),a=Math.abs(n*r)+Math.abs(i*o),s=Math.abs(n*o)+Math.abs(i*r),p=(n-a)/2,l=(i-s)/2;t.w=a,t.h=s,t.diffW=p,t.diffH=l}return t},t.prototype.getLeft=function(){return this.left-0},t.prototype.posLeft=function(){var t=this.left;return this.transform&&(t+=this.getRectInfo().diffW),Math.floor(10*t)/10},t.prototype.setRotate=function(t){null!=t&&(this.transform=t)},t.prototype.displayLeft=function(t){return this.transform&&t?this.left+this.getRectInfo().diffW+"pt":this.left+"pt"},t.prototype.setLeft=function(t){null!=t&&(this.left=t)},t.prototype.getTop=function(){return this.top-0},t.prototype.posTop=function(){var t=this.top;return this.transform&&(t+=this.getRectInfo().diffH),Math.floor(10*t)/10},t.prototype.getTopInDesign=function(){return this.topInDesign},t.prototype.displayTop=function(t){return this.transform&&t?this.top+this.getRectInfo().diffH+"pt":this.top+"pt"},t.prototype.setTop=function(t){null!=t&&(this.top=t)},t.prototype.copyDesignTopFromTop=function(){this.topInDesign=this.top},t.prototype.getHeight=function(){if(this.transform){var t=this.getRectInfo();return t.h+t.diffH}return this.height-0},t.prototype.displayHeight=function(){return this.height+"pt"},t.prototype.setHeight=function(t){null!=t&&(this.height=t)},t.prototype.getWidth=function(){if(this.transform){var t=this.getRectInfo();return t.w+t.diffW}return this.width-0},t.prototype.displayWidth=function(){return this.width+"pt"},t.prototype.setWidth=function(t){null!=t&&(this.width=t)},t.prototype.getValueFromOptionsOrDefault=function(t){return null==this[t]?this.defaultOptions[t]:this[t]},t.prototype.getPrintElementOptionEntity=function(){var t=new i,e=this;return Object.keys(this).filter((function(t){return"topInDesign"!=t})).forEach((function(n){if("number"!=typeof e[n]&&"string"!=typeof e[n]&&!["fields"].includes(n)&&O(e[n])!=O(!0)||(t[n]=e[n]),"style"==n){t.style={};var i=e[n];i&&Object.keys(i).forEach((function(e){"number"!=typeof i[e]&&"string"!=typeof i[e]||(t.style[e]=i[e])}))}})),t},t.prototype.init=function(t){var e=this;t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))},t}()},function(t,e,n){n.d(e,"a",(function(){return u}));var i=n(17),o=n(1),r=n(9),a=n(6),s=(n(0),n(8)),l=n(2),u=function(){function t(t){this.printElementType=t,this.id=l.a.instance.guid()}return t.prototype.getConfigOptionsByName=function(t){return o.a.instance[t]},t.prototype.getProxyTarget=function(t){t&&this.SetProxyTargetOption(t);var e=this.getData(),n=this.createTarget(this.getTitle(),e);return this.updateTargetSize(n),this.css(n,e),n},t.prototype.SetProxyTargetOption=function(t){this.options.getPrintElementOptionEntity(),p().extend(this.options,t),this.copyFromType()},t.prototype.showInPage=function(t,e){var n=this.options.showInPage,i=this.options.unShowInPage;if(n){if("first"==n)return 0==t;if(t==e-1&&"last"==i)return!1;if("odd"==n)return(0!=t||"first"!=i)&&t%2==0;if("even"==n)return t%2==1;if("last"==n)return t==e-1}return!(0==t&&"first"==i||t==e-1&&"last"==i)},t.prototype.setTemplateId=function(t){this.templateId=t},t.prototype.setPanel=function(t){this.panel=t},t.prototype.getField=function(){return this.options.field||this.printElementType.field},t.prototype.getTitle=function(){return this.printElementType.title},t.prototype.updateSizeAndPositionOptions=function(t,e,n,i){const o=l.a.instance.getPrintTemplateById(this.templateId);if(void 0!==this.panel&&!o.willOutOfBounds){const n=D.mm.toPt(this.panel.width),i=D.mm.toPt(this.panel.height);if(t<0)return;if(e<0)return;if(t+this.options.width>n)return;if(e+this.options.height>i)return}this.options.setLeft(t),this.options.setTop(e),this.options.copyDesignTopFromTop(),this.options.setWidth(n),this.options.setHeight(i)},t.prototype.initSizeByHtml=function(t){if(t&&t.length){this.createTempContainer();var e=t.clone();this.getTempContainer().append(e),this.options.initSizeByHtml(parseInt(D.px.toPt(e.width()).toString()),parseInt(D.px.toPt(e.height()).toString())),this.removeTempContainer()}},t.prototype.updateTargetSize=function(t){t.css("width",this.options.displayWidth()),t.css("height",this.options.displayHeight())},t.prototype.updateTargetWidth=function(t){t.css("width",this.options.displayWidth())},t.prototype.getDesignTarget=function(t){var e=this,n=0;return this.designTarget=this.getHtml(t)[0].target,this.designPaper=t,this.designTarget.click((function(t){t.timeStamp-n>500&&D.event.trigger(e.getPrintElementSelectEventKey(),{printElement:e}),n=t.timeStamp})),this.designTarget.dblclick((function(t){var n=e.designTarget.find(".hiprint-printElement-content");if(n){var i=e.designTarget.find(".resize-panel");"text"!=e.printElementType.type||e.options.textType&&"text"!=e.options.textType||(e._editing=!0,e.designTarget.hidraggable("update",{draggable:!1}),n.css("cursor","text"),n.addClass("editing"),e.designTarget.addClass("editing"),n.click((function(t){e._editing&&t.stopPropagation()})),n.attr("contenteditable",!0),i&&i.css("display","none"),e.selectEnd(n))}})),this.designTarget},t.prototype.selectEnd=function(t){if(t.focus(),void 0!==window.getSelection&&void 0!==document.createRange){(n=document.createRange()).selectNodeContents(t[0]),n.collapse(!1);var e=window.getSelection();e.removeAllRanges(),e.addRange(n)}else if(void 0!==document.body.createTextRange){var n;(n=document.body.createTextRange()).moveToElementText(t[0]),n.collapse(!1),n.select()}},t.prototype.updateByContent=function(t){var e=this,n=e.designTarget.find(".hiprint-printElement-content");if(e._editing){n&&n.css("cursor","")&&n.removeClass("editing")&&n.removeAttr("contenteditable"),e.designTarget.removeClass("editing");var i=n.text(),o=e.options.title;i.startsWith(o)&&e.options.field?i.length>o.length?e.options.testData=i.split("\uff1a")[1]:(e.options.title=i,e.options.testData=""):e.options.title=i,e.options.title=e.options.title.split("\uff1a")[0],t||D.event.trigger(e.getPrintElementSelectEventKey(),{printElement:e}),e.updateDesignViewFromOptions(),D.event.trigger("hiprintTemplateDataChanged_"+e.templateId,"\u7f16\u8f91\u4fee\u6539"),e._editing=!1;var r=null==e.options.draggable||1==e.options.draggable;e.designTarget.hidraggable("update",{draggable:r})}},t.prototype.getPrintElementSelectEventKey=function(){return"PrintElementSelectEventKey_"+this.templateId},t.prototype.design=function(t,e){var n=this;this.designTarget.hidraggable({draggable:n.options.draggable,axis:n.options.axis?n.options.axis:void 0,designTarget:n,onDrag:function(t,i,o){var r=n.panel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&t.designTarget.children().last().hasClass("selected")&&!t.printElementType.type.includes("table")})),a=r.length>1,s=!n.designTarget.children().last().hasClass("selected");if(a){var p=i-n.options.left,u=o-n.options.top;r.forEach((function(t){t.updateSizeAndPositionOptions(p+t.options.getLeft(),u+t.options.getTop()),t.designTarget.css("left",t.options.displayLeft()),t.designTarget.css("top",t.options.displayTop()),t.createLineOfPosition(e)})),s&&(n.updateSizeAndPositionOptions(i,o),n.createLineOfPosition(e))}else n.updateSizeAndPositionOptions(i,o),n.createLineOfPosition(e);l.a.instance.changed=!0},moveUnit:"pt",minMove:o.a.instance.movingDistance,onBeforeDrag:function(t){l.a.instance.draging=!0,n.designTarget.focus(),n.createLineOfPosition(e)},onBeforeSelectAllDrag:function(){l.a.instance.draging=!0,n.designTarget.focus()},getScale:function(){return n.designPaper.scale||1},onStopDrag:function(t){l.a.instance.changed&&D.event.trigger("hiprintTemplateDataChanged_"+n.templateId,"\u79fb\u52a8"),l.a.instance.draging=!1,l.a.instance.changed=!1;var e=n.panel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&!t.printElementType.type.includes("table")}));e.length>1?e.forEach((function(t){t.removeLineOfPosition()})):n.removeLineOfPosition()}}),this.setResizePanel(),this.bingCopyEvent(this.designTarget),this.bingKeyboardMoveEvent(this.designTarget,e)},t.prototype.getPrintElementEntity=function(t){return t?new i.a(void 0,this.options.getPrintElementOptionEntity(),this.printElementType.getPrintElementTypeEntity()):new i.a(this.printElementType.tid,this.options.getPrintElementOptionEntity())},t.prototype.submitOption=function(){var t=this.panel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&t.designTarget.children().last().hasClass("selected")&&!t.printElementType.type.includes("table")}));t=t.filter((t=>t.printElementType.type==this.printElementType.type));var e=this,n=this.getConfigOptions();n&&n.tabs&&n.tabs.length?this.getPrintElementOptionTabs().forEach((function(n){"\u6837\u5f0f"===n.name&&t.length?n.list.forEach((function(e){t.forEach((t=>{var n=e.getValue(),i="textType"==e.name&&t.options[e.name]!==n,o="axis"==e.name&&t.options[e.name]!==n;n&&"object"==O(n)?Object.keys(n).forEach((function(e){t.options[e]=n[e]})):t.options[e.name]=n,i&&t.setResizePanel(),o&&t.designTarget.hidraggable("update",{axis:n})}))})):n.list.forEach((function(t){var n=t.getValue(),i="textType"==t.name&&e.options[t.name]!==n,o="axis"==t.name&&e.options[t.name]!==n;n&&"object"==O(n)?Object.keys(n).forEach((function(t){e.options[t]=n[t]})):e.options[t.name]=n,i&&e.setResizePanel(),o&&e.designTarget.hidraggable("update",{axis:n})}))})):this.getPrintElementOptionItems().forEach((function(t){var n=t.getValue(),i="textType"==t.name&&e.options[t.name]!==n,o="axis"==t.name&&e.options[t.name]!==n;n&&"object"==O(n)?Object.keys(n).forEach((function(t){e.options[t]=n[t]})):e.options[t.name]=n,i&&e.setResizePanel(),o&&e.designTarget.hidraggable("update",{axis:n})})),this.updateDesignViewFromOptions(),D.event.trigger("hiprintTemplateDataChanged_"+this.templateId,"\u5143\u7d20\u4fee\u6539")},t.prototype.updateOption=function(t,e,n){try{var i=this.getConfigOptions(),o=["draggable"];i&&i.tabs&&i.tabs.length?i.tabs.forEach((function(t){t.options.forEach((function(t){o.push(t.name)}))})):o=i.supportOptions.map((function(t){return t.name})),o&&o.includes(t)&&(this.options[t]=e,this.updateDesignViewFromOptions(),n||D.event.trigger("hiprintTemplateDataChanged_"+this.templateId,"\u53c2\u6570\u4fee\u6539")),this.getPrintElementOptionTabs().forEach((n=>{n.list.forEach((n=>{n.name===t&&n.target&&(n.target.find("select")?.val(e.toString()),n.target.find("input")?.val(e.toString()))}))}))}catch(i){console.log("updateOption error",i)}},t.prototype.getReizeableShowPoints=function(){return["barcode","qrcode"].includes(this.options.textType)?["se","s","e","r"]:["s","e","r"]},t.prototype.setResizePanel=function(){var t=this,e=this.designPaper;this.designTarget.hireizeable({showPoints:t.getReizeableShowPoints(),draggable:t.options.draggable,showSizeBox:o.a.instance.showSizeBox,getScale:function(){return t.designPaper.scale||1},onBeforeResize:function(){l.a.instance.draging=!0},onResize:function(n,i,o,r,a,s){null!=s?t.onRotate(n,s):t.onResize(n,i,o,r,a),t.createLineOfPosition(e)},onStopResize:function(e){D.event.trigger("hiprintTemplateDataChanged_"+t.templateId,e?"\u65cb\u8f6c":"\u5927\u5c0f"),l.a.instance.draging=!1,t.removeLineOfPosition()}})},t.prototype.onRotate=function(t,e){this.options.setRotate(e)},t.prototype.onResize=function(t,e,n,i,o){this.updateSizeAndPositionOptions(o,i,n,e)},t.prototype.getOrderIndex=function(){return this.options.getTop()},t.prototype.getHtml=function(t,e,n){var i=0;this.setCurrenttemplateData(e);var o=[],r=this.getBeginPrintTopInPaperByReferenceElement(t),p=t.getPaperFooter(i);this.isHeaderOrFooter()||this.isFixed()||r>p&&"none"!=t.panelPageRule&&(o.push(new a.a({target:void 0,printLine:void 0})),r=r-p+t.paperHeader,i++,p=t.getPaperFooter(i));var l=this.getData(e),u=this.createTarget(this.getTitle(),l,n);return this.updateTargetSize(u),this.css(u,l),u.css("position","absolute"),u.css("left",this.options.displayLeft()),u.css("top",r+"pt"),o.push(new a.a({target:u,printLine:r+this.options.getHeight(),referenceElement:new s.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:r+this.options.getHeight(),printTopInPaper:r})})),e&&this.options.pageBreak&&(o[0].target.css("top",t.paperHeader+"pt"),o[0].referenceElement.top=this.options.getTop()-this.options.getHeight()-t.paperHeader,o[0].printLine=t.paperHeader,o[0].referenceElement.bottomInLastPaper=0,o[0].referenceElement.printTopInPaper=t.paperHeader,o.unshift(new a.a({target:u,printLine:t.height,referenceElement:new s.a({top:0,left:0,height:0,width:0,beginPrintPaperIndex:t.index,bottomInLastPaper:t.height,printTopInPaper:t.paperHeader})}))),o},t.prototype.getHtml2=function(t,e,n){var i=0;this.setCurrenttemplateData(e);var o=[],r=this.getBeginPrintTopInPaperByReferenceElement(t),p=t.getPaperFooter(i);this.isHeaderOrFooter()||this.isFixed()||("none"!=t.panelPageRule&&r>p&&(o.push(new a.a({target:void 0,printLine:void 0})),r=r-p+t.paperHeader,i++,p=t.getPaperFooter(i)),r<=p&&e&&r+this.options.getHeight()>p&&"none"!=t.panelPageRule&&(o.push(new a.a({target:void 0,printLine:void 0})),r=t.paperHeader,i++,p=t.getPaperFooter(i)));var l=this.getData(e),u=this.createTarget(this.getTitle(),l);return"none"==t.panelPageRule&&r+this.options.getHeight()>p&&this.updatePanelHeight(r+this.options.getHeight(),t),this.updateTargetSize(u),this.css(u,l),u.css("position","absolute"),u.css("left",this.options.displayLeft()),u.css("top",r+"pt"),o.push(new a.a({target:u,printLine:r+this.options.getHeight(),referenceElement:new s.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:r+this.options.getHeight(),printTopInPaper:r})})),e&&this.options.pageBreak&&(o[0].target.css("top",t.paperHeader+"pt"),o[0].referenceElement.top=this.options.getTop()-this.options.getHeight()-t.paperHeader,o[0].printLine=t.paperHeader,o[0].referenceElement.bottomInLastPaper=0,o[0].referenceElement.printTopInPaper=t.paperHeader,o.unshift(new a.a({target:u,printLine:t.height,referenceElement:new s.a({top:0,left:0,height:0,width:0,beginPrintPaperIndex:t.index,bottomInLastPaper:t.height,printTopInPaper:t.paperHeader})}))),o},t.prototype.updatePanelHeight=function(t,e){if("none"==this.panel.panelPageRule){var n=D.pt.toMm(t);e.paperFooter=t,e.target.css("height",n+"mm"),e.target.attr("original-height",n)}},t.prototype.getBeginPrintTopInPaperByReferenceElement=function(t){var e=this.options.getTop();return this.isHeaderOrFooter()||this.isFixed()?e:t.referenceElement.isPositionLeftOrRight(e)?t.referenceElement.printTopInPaper+(e-t.referenceElement.top):t.referenceElement.bottomInLastPaper+(e-(t.referenceElement.top+t.referenceElement.height))},t.prototype.css=function(t,e){var n,i=this,o=[],a=this.getConfigOptions();a&&(a.tabs&&a.tabs.length?(n=[],a.tabs.forEach((function(t){n=n.concat(t.options)}))):n=a.supportOptions,n&&n.forEach((function(e){var n=r.a.getItem(e.name);if(n&&n.css){var a=n.css(t,i.options.getValueFromOptionsOrDefault(e.name));a&&o.push(a)}})));this.stylerCss(t,e)},t.prototype.stylerCss=function(t,e){var n=this.getStyler();if(n){var i=n(e,this.options,t,this._currenttemplateData);i&&"object"==typeof i&&Object.keys(i).forEach((function(e){t.css(e,i[e])}))}},t.prototype.getData=function(t){var e=this.getField();return t?e&&e.split(".").reduce(((e,n)=>e?e[n]:t?t[n]:""),!1)||"":this.printElementType.getData()},t.prototype.copyFromType=function(){var t=this.options,e=this.printElementType,n=this.getConfigOptions(),i=[];return n&&n.tabs&&n.tabs.length?n.tabs.forEach((function(t){t.options.forEach((function(t){i.push(t.name)}))})):i=n.supportOptions.map((function(t){return t.name})),Object.keys(e).forEach((function(n){e[n]&&"columns"!=n&&i.indexOf(n)>-1&&(t[n]="function"==O(e[n])?e[n].toString():e[n])})),t},t.prototype.getPrintElementOptionTabs=function(){if(this._printElementOptionTabs)return this._printElementOptionTabs;var t=[],e=this.getConfigOptions();if(e){var n=e.tabs;n&&n.forEach((function(e,n){t.push({name:e.name,list:[]}),e.options.filter((function(t){return!t.hidden})).forEach((function(e){var i=r.a.getItem(e.name);t[n].list.push(i)}))}))}return this._printElementOptionTabs=t,this._printElementOptionItems=void 0,this._printElementOptionTabs},t.prototype.getPrintElementOptionItems=function(){if(this._printElementOptionItems)return this._printElementOptionItems;var t,e=[],n=this.getConfigOptions();n&&(n.tabs&&n.tabs.length?(t=[],n.tabs.forEach((function(t){t=t.concat(t.options)}))):t=n.supportOptions,t&&t.filter((function(t){return!t.hidden})).forEach((function(t){var n=r.a.getItem(t.name);e.push(n)})));return this._printElementOptionItems=this.filterOptionItems(e.concat()),this._printElementOptionTabs=void 0,this._printElementOptionItems},t.prototype.getPrintElementOptionItemsByName=function(t){var e,n=[],i=this.getConfigOptionsByName(t);i&&(i.tabs&&i.tabs.length?(e=[],i.tabs.forEach((function(t){e=e.concat(t.options)}))):e=i.supportOptions,e&&e.filter((function(t){return!t.hidden})).forEach((function(t){var e=r.a.getItem(t.name);n.push(e)})));return n.concat()},t.prototype.filterOptionItems=function(t){return this.printElementType.field?t.filter((function(t){return"field"!=t.name})):t},t.prototype.createTempContainer=function(){this.removeTempContainer(),p()("body").append(p()('<div class="hiprint_temp_Container hiprint-printPaper" style="overflow:hidden;height: 0px;box-sizing: border-box;"></div>'))},t.prototype.removeTempContainer=function(){p()(".hiprint_temp_Container").remove()},t.prototype.getTempContainer=function(){return p()(".hiprint_temp_Container")},t.prototype.isHeaderOrFooter=function(){return this.options.getTopInDesign()<this.panel.paperHeader||this.options.getTopInDesign()>=this.panel.paperFooter},t.prototype.delete=function(){this.designTarget&&this.designTarget.remove()},t.prototype.setCurrenttemplateData=function(t){this._currenttemplateData=t},t.prototype.isFixed=function(){return this.options.fixed},t.prototype.onRendered=function(t,e){this.printElementType&&this.printElementType.onRendered&&this.printElementType.onRendered(e,this.options,t.getTarget())},t.prototype.createLineOfPosition=function(t){var e=p()(".toplineOfPosition.id"+this.id),n=p()(".topPosition.id"+this.id),i=p()(".leftlineOfPosition.id"+this.id),r=p()(".leftPosition.id"+this.id),a=p()(".rightlineOfPosition.id"+this.id),s=p()(".bottomlineOfPosition.id"+this.id),l=o.a.instance;e.length?e.css("top",this.options.displayTop(!0)):((e=p()('<div class="toplineOfPosition id'+this.id+'" style="position: absolute; width: 100%;"></div>')).css("top",this.options.displayTop(!0)),e.css("width",t.displayWidth()),this.designTarget.parents(".hiprint-printPaper-content").append(e));l.showPosition&&(n.length?(n.toggleClass("topPosition-lineMode",l.positionLineMode),n.text(this.options.posTop()+(l.positionUnit?"pt":"")),n.css("top",this.options.posTop()-n.height()+"pt"),l.positionLineMode?n.css("left",this.options.posLeft()-n.width()/2+"pt"):n.css("left",this.options.posLeft()+2+"pt"),this.designTarget.find(".size-box")&&this.designTarget.find(".size-box").toggleClass("hide",!0)):((n=p()('<div class="topPosition id'+this.id+'" style="position: absolute;"></div>')).toggleClass("topPosition-lineMode",l.positionLineMode),n.text(this.options.posTop()+(l.positionUnit?"pt":"")),l.positionLineMode?n.css("left",this.options.posLeft()-n.width()/2+"pt"):n.css("left",this.options.posLeft()+2+"pt"),this.designTarget.find(".size-box")&&this.designTarget.find(".size-box").toggleClass("hide",!0),this.designTarget.parents(".hiprint-printPaper-content").append(n),n.css("top",this.options.posTop()-n.height()+"pt")));if(i.length)i.css("left",this.options.displayLeft(!0));else{var u=p()('<div class="leftlineOfPosition id'+this.id+'" style="position: absolute;height: 100%;"></div>');u.css("left",this.options.displayLeft(!0)),u.css("height",t.displayHeight()),this.designTarget.parents(".hiprint-printPaper-content").append(u)}l.showPosition&&(r.length?(r.text(this.options.posLeft()+(l.positionUnit?"pt":"")),r.toggleClass("leftPosition-lineMode",l.positionLineMode),r.css("left",this.options.posLeft()-r.width()+"pt"),l.positionLineMode?r.css("top",this.options.posTop()-r.height()/3+"pt"):r.css("top",this.options.posTop()+2+"pt")):((r=p()('<div class="leftPosition id'+this.id+'" style="position: absolute;"></div>')).text(this.options.posLeft()+(l.positionUnit?"pt":"")),r.toggleClass("leftPosition-lineMode",l.positionLineMode),l.positionLineMode?r.css("top",this.options.posTop()-r.height()/3+"pt"):r.css("top",this.options.posTop()+2+"pt"),this.designTarget.parents(".hiprint-printPaper-content").append(r),r.css("left",this.options.posLeft()-r.width()+"pt")));if(a.length)a.css("left",this.options.getLeft()+this.options.getWidth()+"pt");else{var d=p()('<div class="rightlineOfPosition id'+this.id+'" style="position: absolute;height: 100%;"></div>');d.css("left",this.options.getLeft()+this.options.getWidth()+"pt"),d.css("height",t.displayHeight()),this.designTarget.parents(".hiprint-printPaper-content").append(d)}if(s.length)s.css("top",this.options.getTop()+this.options.getHeight()+"pt");else{var h=p()('<div class="bottomlineOfPosition id'+this.id+'" style="position: absolute;width: 100%;"></div>');h.css("top",this.options.getTop()+this.options.getHeight()+"pt"),h.css("width",t.displayWidth()),this.designTarget.parents(".hiprint-printPaper-content").append(h)}},t.prototype.removeLineOfPosition=function(){p()(".toplineOfPosition.id"+this.id).remove(),p()(".topPosition.id"+this.id).remove(),this.designTarget.find(".size-box")&&this.designTarget.find(".size-box").toggleClass("hide",!1),p()(".leftlineOfPosition.id"+this.id).remove(),p()(".leftPosition.id"+this.id).remove(),p()(".rightlineOfPosition.id"+this.id).remove(),p()(".bottomlineOfPosition.id"+this.id).remove()},t.prototype.getFontList=function(){var t=this.options.fontList;return t||l.a.instance.getPrintTemplateById(this.templateId).getFontList()},t.prototype.getFields=function(){return"table"==this.printElementType.type?this.options.tableFields:this.options.fields||l.a.instance.getPrintTemplateById(this.templateId).getFields()},t.prototype.getOnImageChooseClick=function(){var t=this.options.onImageChooseClick;return t||(t=l.a.instance.getPrintTemplateById(this.templateId).getOnImageChooseClick())||P},t.prototype.bingCopyEvent=function(t){var e=this;t.keydown((function(t){e._editing?t.altKey||13!=t.keyCode||e.updateByContent():(t.ctrlKey||t.metaKey)&&67==t.keyCode&&(e.copyJson(),t.preventDefault())}))},t.prototype.copyJson=function(){try{var t=p()("#copyArea");t.length||(t=p()('<textarea id="copyArea" style="position: absolute; left: 0px; top: 0px;opacity: 0"></textarea>')),p()("body").append(t);let i=this.panel.printElements.filter((t=>"block"==t.designTarget.children().last().css("display")&&!t.printElementType.type.includes("table")));if(i=i.map((t=>({options:t.options,printElementType:t.printElementType,id:t.id,templateId:t.templateId}))),!i.length)return!1;var e=JSON.stringify(i);t.text(e),t.css("visibility","visible"),t.setSelectionRange?t.setSelectionRange(0,t.value.length):t.select();var n=!1;n=document.execCommand("copy"),t.css("visibility","hidden"),this.designTarget.focus(),console.log("copyJson success")}catch(t){n=!1,console.log("copyJson error",t)}return n},t.prototype.clone=function(t){var e=this;let n=e.printElementType.createPrintElement();return Object.keys(e.options).forEach((function(t){n.options[t]=e.options[t]})),n},t.prototype.getFormatter=function(){var t=void 0;if(this.printElementType.formatter&&(t=this.printElementType.formatter),this.options.formatter)try{t=new Function("title","value","options","data","target",`data = data || {}; ${this.options.formatter}`)}catch(t){console.log(`formatter: ${this.getTitle()} : `,t)}return t},t.prototype.getStyler=function(){var t=void 0;if(this.printElementType.styler&&(t=this.printElementType.styler),this.options.styler)try{t=new Function("title","value","target","data",`data = data || {}; ${this.options.styler}`)}catch(t){console.log(`styler: ${this.getTitle()} : `,t)}return t},t.prototype.bingKeyboardMoveEvent=function(t,e){var n=this,i=void 0,r=void 0;t.attr("tabindex","1"),t.keydown((function(e){if("INPUT"!=e.target.tagName&&(!n._editing||e.altKey)){var a=n.panel.printElements.filter((function(t){return t.designTarget.children().last().hasClass("selected")&&!t.printElementType.type.includes("table")})),s=a.length>1,p=o.a.instance.movingDistance;switch(e.keyCode){case 8:case 46:var u=l.a.instance.getPrintTemplateById(n.templateId);u.deletePrintElement(n),D.event.trigger("hiprintTemplateDataChanged_"+n.templateId,"\u5220\u9664"),D.event.trigger("clearSettingContainer"),a.forEach((t=>{u.deletePrintElement(t),D.event.trigger("hiprintTemplateDataChanged_"+t.templateId,"\u5220\u9664")})),D.event.trigger("clearSettingContainer");break;case 37:i=n.options.getLeft(),s?a.forEach((function(t){t.updatePositionByMultipleSelect(0-p,0)})):(n.updateSizeAndPositionOptions(i-p),t.css("left",n.options.displayLeft())),e.preventDefault();break;case 38:r=n.options.getTop(),s?a.forEach((function(t){t.updatePositionByMultipleSelect(0,0-p)})):(n.updateSizeAndPositionOptions(void 0,r-p),t.css("top",n.options.displayTop())),e.preventDefault();break;case 39:i=n.options.getLeft(),s?a.forEach((function(t){t.updatePositionByMultipleSelect(p,0)})):(n.updateSizeAndPositionOptions(i+p),t.css("left",n.options.displayLeft())),e.preventDefault();break;case 40:r=n.options.getTop(),s?a.forEach((function(t){t.updatePositionByMultipleSelect(0,p)})):(n.updateSizeAndPositionOptions(void 0,r+p),t.css("top",n.options.displayTop())),e.preventDefault()}[37,38,39,40].includes(e.keyCode)&&D.event.trigger("hiprintTemplateDataChanged_"+n.templateId,"\u952e\u76d8\u79fb\u52a8")}}))},t.prototype.inRect=function(t){var e=this.designPaper.scale||1,n=this.designTarget[0].offsetLeft,i=this.designTarget[0].offsetTop,o=this.designTarget[0].offsetHeight,r=n+this.designTarget[0].offsetWidth,a=i+o,s=p()(t.target[0]).position().left/e,l=p()(t.target[0]).position().top/e,u=t.target[0].offsetHeight,d=t.target[0].offsetWidth;return s<r&&s+d>n&&i<l+u&&a>l},t.prototype.multipleSelect=function(t){t?this.designTarget.addClass("multipleSelect"):this.designTarget.removeClass("multipleSelect")},t.prototype.updatePositionByMultipleSelect=function(t,e){!1!==this.options.draggable&&(this.updateSizeAndPositionOptions(t+this.options.getLeft(),e+this.options.getTop()),this.designTarget.css("left",this.options.displayLeft()),this.designTarget.css("top",this.options.displayTop()))},t}()},function(t,e,n){var i=function(){function t(){}return t.prototype.init=function(t){this.target=p()('<input type="text" class="hitable-editor-text" value="" />'),t.getTarget().append(this.target),this.target.focus()},t.prototype.getValue=function(){return this.target.val()},t.prototype.setValue=function(t){this.target.val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),o=function(){function t(){this.text=new i}return Object.defineProperty(t,"Instance",{get:function(){return t._instance||(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t}(),r=function(){function t(){}return t.prototype.init=function(t,e){var n='<select class="auto-submit" style="width:100%"> <option value="" disabled>\u8bf7\u9009\u62e9\u5b57\u6bb5</option>';t.forEach((function(t,i){t.field==e.field?n+=' <option value="'+(t.field||"")+'" selected >'+(t.text||"")+"</option>":n+=' <option value="'+(t.field||"")+'" >'+(t.text||"")+"</option>"})),n+=" </select>",this.target=p()(n),e.getTarget().append(this.target),this.target.focus()},t.prototype.getValue=function(){var t=this.target.val();return this.target.find('option[value="'+t+'"]').text()+"#"+t},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),a=function(){function t(){this.select=new r}return Object.defineProperty(t,"Instance",{get:function(){return t._instance||(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t}(),s=function(){function t(){}return Object.defineProperty(t,"Instance",{get:function(){return o._instance||(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t.prototype.createEditor=function(t){return p().extend({},o.Instance[t])},t.prototype.createSelect=function(t){return p().extend({},a.Instance[t])},t}(),l=n(10),u=n(14),d=n(11),h=function(){function t(){}return t.prototype.init=function(t,e){var n=this;this.tableOptions=e,this.title=t.title,this.field=t.field,t.getTarget().unbind("dblclick.hitable").bind("dblclick.hitable",(function(){t.isEditing=!0,n.beginEdit(t)}))},t.prototype.getDisplayHtml=function(){return this.title},t.prototype.beginEdit=function(t){var e=this;e.tableOptions.options.fields&&e.tableOptions.options.fields.length?(this.editor=s.Instance.createSelect("select"),t.getTarget().html(""),this.editor.init(e.tableOptions.options.fields,t),this.editor.setValue(this.field||""),p()(this.editor.target).keydown((function(n){13==n.keyCode&&e.endEdit(t)})),p()(this.editor.target).change((function(n){e.endEdit(t)})),p()(this.editor.target).blur((function(n){e.endEdit(t)}))):(this.editor=s.Instance.createEditor("text"),t.getTarget().html(""),this.editor.init(t),(this.title||this.field)&&(this.tableOptions.options.isEnableEditField?this.editor.setValue((this.title||"")+"#"+(this.field||"")):this.editor.setValue(this.title||"")),p()(this.editor.target).keydown((function(n){13==n.keyCode&&e.endEdit(t)})),p()(this.editor.target).blur((function(n){e.endEdit(t)})),this.tableOptions.editingCell&&this.tableOptions.editingCell.id!=t.id&&this.tableOptions.editingCell.innerElement.endEdit(this.tableOptions.editingCell),this.tableOptions.editingCell=t)},t.prototype.endEdit=function(t){t.isEditing=0;var e=this.editor.getValue();if(e)if(this.tableOptions.options.isEnableEditField||this.tableOptions.options.fields){var n=e.split("#");t.title=this.title=n[0],n.length>0&&(t.columnId=t.field=this.field=n[1]),t.id&&t.target.attr("id",t.id),t.columnId&&t.target.attr("column-id",t.columnId),D.event.trigger("hiprintTemplateDataChanged_"+this.tableOptions.options.templateId,"\u8c03\u6574\u8868\u683c\u5217\u5b57\u6bb5")}else t.title=this.title=e;else this.tableOptions.options.isEnableEditField?(t.title=this.title="",t.field=this.field=""):t.title=this.title="";this.editor.destroy(),t.getTarget().html(this.title)},t}(),c=function(t){this.title=t.title,this.field=t.field,this.width=t.width,this.align=t.align,this.halign=t.halign,this.vAlign=t.vAlign,this.colspan=t.colspan,this.rowspan=t.rowspan,this.checked=t.checked,this.columnId=t.columnId,this.tableSummaryTitle=t.tableSummaryTitle,this.tableSummaryText=t.tableSummaryText,this.tableSummaryColspan=t.tableSummaryColspan,this.tableSummary=t.tableSummary,this.tableSummaryAlign=t.tableSummaryAlign,this.tableSummaryNumFormat=t.tableSummaryNumFormat,this.tableSummaryFormatter=t.tableSummaryFormatter,this.showCodeTitle=t.showCodeTitle,this.upperCase=t.upperCase,this.renderFormatter=t.renderFormatter&&t.renderFormatter.toString(),this.formatter2=t.formatter2&&t.formatter2.toString(),this.styler2=t.styler2&&t.styler2.toString(),this.stylerHeader=t.stylerHeader&&t.stylerHeader.toString(),this.tableColumnHeight=t.tableColumnHeight,this.tableTextType=t.tableTextType,this.tableBarcodeMode=t.tableBarcodeMode,this.tableQRCodeLevel=t.tableQRCodeLevel},f=function(){function t(){this.id=d.a.createId()}return t.prototype.init=function(t,e,n,i){this.isHead=i,this.rowId=n,this.isEditing=!1;var o=/^[0-9]*$/;this.target=t,this.tableOptions=e;var r=this.target.attr("colspan");this.colspan=o.test(r)?parseInt(r):1;var a=this.target.attr("rowspan");this.rowspan=o.test(a)?parseInt(a):1,this.initEvent(),this.isHead&&this.initInnerEelement()},t.prototype.beginEdit=function(){if(!this.isEditing&&this.tableOptions.isEnableEdit&&this.tableOptions.onBeforEdit(this)){var t=this.getValue();this.editor=s.Instance.createEditor("text"),this.isEditing=!0,this.tableOptions.editingCell=this,this.target.html(""),this.editor.init(this),this.editor.setValue(t)}},t.prototype.endEdit=function(){this.isEditing=!1;var t=this.editor.getValue();this.editor.destroy(),this.target.html(t)},t.prototype.getTarget=function(){return this.target},t.prototype.getValue=function(){return this.target.html()},t.prototype.setValue=function(t){},t.prototype.initInnerEelement=function(){this.innerElement=new h,this.innerElement.init(this,this.tableOptions)},t.prototype.initEvent=function(){},t.prototype.isXYinCell=function(t,e){var n=new l.b({x:t,y:e,height:0,width:0});return this.isOverlap(n)},t.prototype.getTableRect=function(){return new l.b({x:this.target.offset().left,y:this.target.offset().top,height:this.target[0].offsetHeight,width:this.target[0].offsetWidth})},t.prototype.isOverlap=function(t){var e=this.getTableRect();return t.x+t.width>e.x&&e.x+e.width>t.x&&t.y+t.height>e.y&&e.y+e.height>t.y},t.prototype.isInRect=function(t){var e=t.rect,n=this.getTableRect();if(n.x>=e.x&&n.x+n.width<=e.x+e.width&&n.y>=e.y&&n.y+n.height<=e.y+e.height){var i=u.a.mergeRect(e,n);return JSON.stringify(e)==JSON.stringify(i)||(t.changed=!0,t.rect=i,!0)}return!1},t.prototype.isSelected=function(){return this.target.hasClass("selected")},t.prototype.select=function(){this.target.addClass("selected")},t.prototype.isHeader=function(){return!1},t.prototype.setAlign=function(t){this.align=t,t?this.target.css("text-align",t):this.target[0].style.textAlign=""},t.prototype.setVAlign=function(t){this.vAlign=t,t?this.target.css("vertical-align",t):this.target[0].style.verticalAlign=""},t.prototype.getEntity=function(){return new c(this)},t}();n.d(e,"a",(function(){return v}));var g,m=(g=function(t,e){return(g=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),v=function(t){function e(e){var n=this;return e=e||{},(n=t.call(this)||this).width=e.width?parseFloat(e.width.toString()):100,n.title=e.title,n.descTitle=e.descTitle,n.field=e.field,n.fixed=e.fixed,n.rowspan=e.rowspan?parseInt(e.rowspan):1,n.colspan=e.colspan?parseInt(e.colspan):1,n.align=e.align,n.halign=e.halign,n.vAlign=e.vAlign,n.formatter=e.formatter,n.styler=e.styler,n.renderFormatter=e.renderFormatter,n.formatter2=e.formatter2,n.styler2=e.styler2,n.stylerHeader=e.stylerHeader,n.checkbox=e.checkbox,n.checked=0!=e.checked,n.columnId=e.columnId||e.field,n.tableColumnHeight=e.tableColumnHeight,n.tableTextType=e.tableTextType,n.tableBarcodeMode=e.tableBarcodeMode,n.tableQRCodeLevel=e.tableQRCodeLevel,n.tableSummaryTitle=e.tableSummaryTitle,n.tableSummaryText=e.tableSummaryText,n.tableSummaryColspan=e.tableSummaryColspan,n.tableSummary=e.tableSummary,n.tableSummaryAlign=e.tableSummaryAlign,n.tableSummaryNumFormat=e.tableSummaryNumFormat,n.tableSummaryFormatter=e.tableSummaryFormatter,n.showCodeTitle=e.showCodeTitle,n.upperCase=e.upperCase,n}return m(e,t),e.prototype.css=function(t){},e}(f)},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(t){this.printLine=t.printLine,this.target=t.target,this.referenceElement=t.referenceElement}},function(t,e,n){n.d(e,"a",(function(){return r}));var i=n(19),o=n(0),r=function(){function t(){}return t.createTableHead=function(e,n){for(var i=t.reconsitutionTableColumnTree(e),o=p()("<thead></thead>"),r=p()("<colgroup></colgroup>"),a=t.getColumnsWidth(i,n),s=function(e){var n=p()("<tr></tr>");r=p()("<colgroup></colgroup>"),i[e].filter((function(t){return t.checked})).forEach((function(e){var i=p()("<td></td>");e.id&&i.attr("id",e.id),e.columnId&&i.attr("column-id",e.columnId),(e.align||e.halign)&&i.css("text-align",e.halign||e.align),e.vAlign&&i.css("vertical-align",e.vAlign),e.colspan>1&&i.attr("colspan",e.colspan),e.rowspan>1&&i.attr("rowspan",e.rowspan),i.html(e.title),a[e.id]?(e.hasWidth=!0,e.targetWidth=a[e.id],i.attr("haswidth","haswidth"),i.css("width",a[e.id]+"pt")):e.hasWidth=!1;var o=t.getHeaderStyler(e);if(o){var s=o(e);s&&Object.keys(s).forEach((function(t){i.css(t,s[t])}))}n.append(i),r.append(`<col column-id="${e.columnId}" width="${e.width}pt"></col>`)})),o.append(n)},l=0;l<i.totalLayer;l++)s(l);return t.syncTargetWidthToOption(e),[o,r]},t.createTableFooter=function(e,n,i,r,a,s,l){var u=p()("<tfoot></tfoot>"),d=this.getFooterFormatter(i,r),h=this.tableSummaryTitle;let c="last"==i.tableFooterRepeat?n:s,f=i.columns.length-1;var g=this.rowColumns||i.columns[f].columns;if("no"!=i.tableFooterRepeat&&g.some((function(t){return t.tableSummary}))){var m=p()("<tr></tr>");g.filter((function(t){return t.checked})).forEach((function(e){var r=c.filter((function(t){return t&&t[e.field]})).map((function(t){return new RegExp("^-?(0|[1-9]\\d*)(\\.\\d+)?").test(t[e.field])?Number(t[e.field]):0})),s=e.tableSummaryText,p=e.tableSummaryNumFormat||2,l=`text-align: ${e.tableSummaryAlign||"center"}`,u=null==e.tableSummaryColspan?1:e.tableSummaryColspan,d=e.upperCase;let{toUpperCase:f,numFormat:g}=o.a;var v=t.getColumnTableSummaryFormatter(e),y=v?v(e,r,n,i):"";if(y)m.append(y);else switch(e.tableSummary){case"count":var b=h(e,s||"\u8ba1\u6570:",a),T=f(d,c.filter((t=>t)).length||0);m.append(`<td style="${l}" colspan="${u}">${b}${T}</td>`);break;case"sum":w=f(d,g(w=parseFloat(Number(r.reduce((function(t,e){return t+e}),0))),p));b=h(e,s||"\u5408\u8ba1:",a);m.append(`<td style="${l}" colspan="${u}">${b}${w}</td>`);break;case"avg":var w=parseFloat(Number(r.reduce((function(t,e){return t+e}),0))),E=parseFloat(Number(w/(r.length||1)));E=f(d,g(E,p));b=h(e,s||"\u5e73\u5747\u503c:",a);m.append(`<td style="${l}" colspan="${u}">${b}${E}</td>`);break;case"min":var x=Math.min(...r)||0;x==1/0&&(x=0),x=f(d,g(x,p));b=h(e,s||"\u6700\u5c0f\u503c:",a);m.append(`<td style="${l}" colspan="${u}">${b}${x||0}</td>`);break;case"max":var C=Math.max(...r);C==-1/0&&(C=0),C=f(d,g(C,p));b=h(e,s||"\u6700\u5927\u503c:",a);m.append(`<td style="${l}" colspan="${u}">${b}${C||0}</td>`);break;case"text":m.append(`<td style="${l}" colspan="${u}">${s||""}</td>`);break;default:u>=1&&m.append(`<td style="${l}" colspan="${u}">${s||""}</td>`)}})),u.append(m)}return d&&u.append(d(i,n,a,s,l)),u},t.tableSummaryTitle=function(t,e,n){return null==t.tableSummaryTitle||1==t.tableSummaryTitle?`${e}`:n?"":`<span style="color:firebrick">${e}</span>`},t.createTableRow=function(e,n,i,r,a){var s=this,l=t.reconsitutionTableColumnTree(e),u=p()("<tbody></tbody>"),d=s.getGroupFieldsFormatter(r,a),h=0,c=d?r.groupFields=d(a,r,n):a.groupFields?a.groupFields:[];return n=Array.isArray(n)?n:[],c.length?o.a.groupBy(n,c,(function(t){var e={};return c.forEach((function(n){return e[n]=t[n]})),e})).forEach((function(e){var o=s.getGroupFormatter(r,a);if(o){let t=o(l.colspan,n,i,e,r);p()(t).is("tr")?u.append(t):p()(t).is("td")?u.append(`<tr>${t}</tr>`):u.append(`<tr><td>${t}</td></tr>`)}var d=s.getGroupFooterFormatter(r,a),c=e;if(c.rows.forEach((function(e,n){let o=r.groupSequenceContinue?h:n;var s=t.createRowTarget(l,e,r,a,o,c.rows,i);u.append(s),h+=1})),d){let t=d(l.colspan,n,i,e,r);p()(t).is("tr")?u.append(t):p()(t).is("td")?u.append(`<tr>${t}</tr>`):u.append(`<tr><td>${t}</td></tr>`)}})):n.forEach((function(e,o){var s=t.createRowTarget(l,e,r,a,o,n,i);u.append(s)})),u},t.createRowTarget=function(e,n,i,o,r,a,s){var l=p()("<tr></tr>"),u=e.rowColumns.filter((function(t){return t.checked}));l.data("rowData",n),e.rowColumns.filter((function(t){return t.checked})).forEach((function(e,o){if(e.checked){if(i.rowsColumnsMerge)try{var d=new Function("data","col","colIndex","rowIndex","tableData","printData",`data = data || {}; ${i.rowsColumnsMerge}`)(n,e,o,r,a,s)||[1,1],h=p()(`<td style = 'display:${d[0]&&d[1]?"":"none"}' rowspan = '${d[0]}' colspan = '${d[1]}'></td>`)}catch(t){console.log(t)}else h=p()("<td></td>");if(n&&Object.keys(n).length>0&&("first"==i.tableHeaderRepeat||"none"==i.tableHeaderRepeat)){if(e.field&&h.attr("field",e.field),e.align&&h.css("text-align",e.align),e.vAlign&&h.css("vertical-align",e.vAlign),i.rowsColumnsMerge&&d[1]>1){var c=0;u.forEach(((t,e)=>{e>=o&&e<o+d[1]&&(c+=t.width)}))}h.css("width",(c||e.width)+"pt")}else e.field&&h.attr("field",e.field),e.align&&h.css("text-align",e.align),e.vAlign&&h.css("vertical-align",e.vAlign);var f=t.getColumnFormatter(e),g=f?f(n[e.field],n,o,i):n[e.field],m=t.getColumnRenderFormatter(e);if("fucntion"==typeof m)h.html(m(n[e.field],n,o,i,r));else if("text"==e.tableTextType||null==e.tableTextType)h.html(g);else{if("barcode"==e.tableTextType){h.html('<svg width="100%" display="block" height="100%" class="hibarcode_imgcode" preserveAspectRatio="none slice"></svg ><div class="hibarcode_displayValue"></div>');try{if(g){const t=e.tableColumnHeight||30,n=t/26.26;w(h.find(".hibarcode_imgcode")[0],g,{format:e.tableBarcodeMode||"CODE128",width:1,textMargin:-1,lineColor:"#000000",margin:0,height:t,_width:37.29*n,displayValue:!1}),h.find(".hibarcode_imgcode").attr("height",t+"pt"),h.find(".hibarcode_imgcode").css("margin","5pt 0pt"),h.find(".hibarcode_imgcode").attr("width","calc(100% - 20pt)")}else h.html("");e.showCodeTitle&&h.find(".hibarcode_displayValue").html(g)}catch(e){console.log(e),h.html("\u6b64\u683c\u5f0f\u4e0d\u652f\u6301\u8be5\u6587\u672c")}}if("image"==e.tableTextType&&(h.html(""),g)){var v=p()('<div><img style = "max-width:100%;max-height:100%"/></div>');v.find("img").attr("src",g),v.find("img").attr("height",e.tableColumnHeight||"50pt"),h.html(v)}if("qrcode"==e.tableTextType){h.html("");try{var y=p()('<div style="margin:5pt 0pt" class="hiqrcode_imgcode"></div>');if(g){var b=parseInt(e.width||e.targetWidth||20),T=parseInt(e.tableColumnHeight||20);new E(y[0],{width:b>T?T:b,height:b>T?T:b,colorDark:"#000000",useSVG:!0,correctLevel:e.tableQRCodeLevel||0,bcid:e.qrcodeType||"qrcode"}).makeCode(g),y.find("svg").css("height",(b>T?T:b)+"pt"),h.html(y),e.showCodeTitle&&(h.append('<div class="hiqrcode_displayValue"></div>'),h.find(".hiqrcode_displayValue").html(g))}}catch(e){console.log(e),h.html("\u4e8c\u7ef4\u7801\u751f\u6210\u5931\u8d25")}}"sequence"===e.tableTextType&&h.html(r+1)}var x=t.getColumnStyler(e);if("function"==typeof x)(b=x(n[e.field],n,o,i))&&Object.keys(b).forEach((function(t){h.css(t,b[t])}));l.append(h)}}));var d=t.getRowStyler(i,o);if(d){var h=d(n,i);h&&Object.keys(h).forEach((function(t){l.css(t,h[t])}))}return l},t.createEmptyRowTarget=function(e,n){var i=t.reconsitutionTableColumnTree(e),o=p()("<tr></tr>");return i.rowColumns.filter((function(t){return t.checked})).forEach((function(t,e){var n=p()("<td></td>");t.field&&n.attr("field",t.field),t.align&&n.css("text-align",t.align),t.vAlign&&n.css("vertical-align",t.vAlign),o.append(n)})),n&&n.options.tableBodyRowHeight&&o.find("td:not([rowspan])").css("height",n.options.tableBodyRowHeight+"pt"),o},t.getColumnsWidth=function(e,n){var i={},o=t.allAutoWidth(e),r=t.allFixedWidth(e);return e.rowColumns.filter((function(t){return t.checked})).forEach((function(t){if(t.fixed)i[t.id]=t.width;else{var e=n-r,a=t.width/o*(e>0?e:0);i[t.id]=a}})),i},t.resizeTableCellWidth=function(e,n,i){var o=t.reconsitutionTableColumnTree(n),r=t.getColumnsWidth(o,i);e.find("thead tr td[haswidth]").map((function(t,e){var n=p()(e).attr("id"),i=r[n];p()(e).css("width",i+"pt")}))},t.allAutoWidth=function(t){var e=0,n={};return t.rowColumns.filter((function(t){return t.checked})).forEach((function(t){n[t.id]?n[t.id]=0:n[t.id]=t.width,e+=t.fixed?0:n[t.id]})),e},t.allFixedWidth=function(t){var e=0,n={};return t.rowColumns.filter((function(t){return t.checked})).forEach((function(t){n[t.id]?n[t.id]=0:n[t.id]=t.width,e+=t.fixed?n[t.id]:0})),e},t.reconsitutionTableColumnTree=function(e,n,o){var r=n||new i.a;r.colspan=0;for(var a=function(t){r.totalLayer=t+1,r[t]=e[t].columns,0==t&&e[t].columns.forEach((function(e){0==t&&(r.colspan+=e.colspan)}))},s=0;s<e.length;s++)a(s);return r.rowColumns=t.getOrderdColumns(r),r},t.syncTargetWidthToOption=function(t){t.forEach((function(t){t.columns.forEach((function(t){t.hasWidth&&(t.width=t.targetWidth)}))}))},t.getGroupFieldsFormatter=function(t,e){var n=void 0;if(e.groupFields&&e.groupFields.length){var i="string"==typeof e.groupFields?e.groupFields:JSON.stringify(e.groupFields);t.groupFieldsFormatter="function(type,options,data){ return "+i+" }"}if(e.groupFieldsFormatter&&(n=e.groupFieldsFormatter),t.groupFieldsFormatter)try{n=new Function("type","options","data",`data = data || {}; ${t.groupFieldsFormatter}`)}catch(t){console.log(t)}return n},t.getGroupFormatter=function(t,e){var n=void 0;if(e.groupFormatter&&(n=e.groupFormatter),t.groupFormatter)try{n=new Function("colTotal","tableData","printData","groupData","options",`${t.groupFormatter}`)}catch(t){console.log(t)}return n},t.getGroupFooterFormatter=function(t,e){var n=void 0;if(e.groupFooterFormatter&&(n=e.groupFooterFormatter),t.groupFooterFormatter)try{n=new Function("colTotal","tableData","printData","groupData","options",`${t.groupFooterFormatter}`)}catch(t){console.log(t)}return n},t.getFooterFormatter=function(t,e){var n=void 0;if(e.footerFormatter&&(n=e.footerFormatter),t.footerFormatter)try{n=new Function("options","rows","data","pageData","pageIndex",`data = data || {}; ${t.footerFormatter}`)}catch(t){console.log(t)}return n},t.getRowStyler=function(t,e){var n=void 0;if(e.rowStyler&&(n=e.rowStyler),t.rowStyler)try{n=new Function("value","options",`${t.rowStyler}`)}catch(t){console.log(t)}return n},t.getColumnTableSummaryFormatter=function(t){var e=void 0;if(t.tableSummaryFormatter&&(e=t.tableSummaryFormatter),t.tableSummaryFormatter)try{e=new Function("column","data","tableData","options",`data = data || {}; ${t.tableSummaryFormatter}`)}catch(t){console.log(t)}return e},t.getColumnStyler=function(t){var e=void 0;if(t.styler&&(e=t.styler),t.styler2)try{e=new Function("value","row","index","options",`row = row || {}; ${t.styler2}`)}catch(t){console.log(t)}return e},t.getHeaderStyler=function(t){var e=void 0;if(t.stylerHeader&&(e=t.stylerHeader),t.stylerHeader)try{e=new Function("options",t.stylerHeader)}catch(t){console.log(t)}return e},t.getColumnRenderFormatter=function(t){var e=void 0;if(t.renderFormatter&&(e=t.renderFormatter),t.renderFormatter)try{e=new Function("value","row","colIndex","options","rowIndex",`row = row || {}; ${t.renderFormatter}`)}catch(t){console.log(t)}return e&&console.log("##",t.renderFormatter),e},t.getColumnFormatter=function(t){var e=void 0;if(t.formatter&&(e=t.formatter),t.formatter2)try{e=new Function("value","row","index","options",`row = row || {}; ${t.formatter2}`)}catch(t){console.log(t)}return e},t.getOrderdColumns=function(t){let e={};for(let n=0;n<t.totalLayer;n++)e[n]=[],t[n].forEach(((t,i)=>{e[n].push(...new Array(t.colspan).fill({...t,colspan:1}))}));for(let n=0;n<t.totalLayer;n++)e[n].forEach(((t,i)=>{for(let o=1;o<t.rowspan;o++)e[n+o].splice(i,0,{...t,rowspan:1})}));let n=[];for(let i=0;i<t.totalLayer;i++)i>=t.totalLayer-1?e[i].forEach(((t,e)=>{t.field||(t.field=n[e])})):e[i].forEach(((t,e)=>{0==i?n.push(t.field||""):t.field&&(n[e]=t.field)}));return this.rowColumns=e[t.totalLayer-1],e[t.totalLayer-1]},t}()},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(){function t(t){this.top=t.top,this.left=t.left,this.height=t.height,this.width=t.width,this.bottomInLastPaper=t.bottomInLastPaper,this.beginPrintPaperIndex=t.beginPrintPaperIndex,this.printTopInPaper=t.printTopInPaper,this.endPrintPaperIndex=t.endPrintPaperIndex}return t.prototype.isPositionLeftOrRight=function(t){return this.top<=t&&this.top+this.height>t},t}()},function(t,e,n){var i=function(){function t(){this.name="lineHeight"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("line-height",e+"pt"),"line-height:"+e+"pt";t[0].style.lineHeight=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u4f53\u884c\u9ad8</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="6">6pt</option><option value="6.75">6.75pt</option><option value="7.5">7.5pt</option><option value="8.25">8.25pt</option><option value="9">9pt</option><option value="9.75">9.75pt</option><option value="10.5">10.5pt</option><option value="11.25">11.25pt</option><option value="12">12pt</option><option value="12.75">12.75pt</option><option value="13.5">13pt</option><option value="14.25">14.25pt</option><option value="15">15pt</option><option value="15.75">15.75pt</option><option value="16.5">16.5pt</option><option value="17.25">17.25pt</option><option value="18">18pt</option><option value="18.75">18.75pt</option><option value="19.5">19.5pt</option><option value="20.25">20.25pt</option><option value="21">21pt</option><option value="21.75">21.75pt</option><option value="22.5">22.5pt</option><option value="23.25">23.25pt</option><option value="24">24pt</option><option value="24.75">24.75pt</option><option value="25.5">25.5pt</option><option value="26.25">26.25pt</option><option value="27">27pt</option><option value="27.75">27.75pt</option><option value="28.5">28.5pt</option><option value="29.25">29.25pt</option><option value="30">30pt</option><option value="30.75">30.75pt</option><option value="31.5">31.5pt</option><option value="32.25">32.25pt</option><option value="33">33pt</option><option value="33.75">33.75pt</option><option value="34.5">34.5pt</option><option value="35.25">35.25pt</option><option value="36">36pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),o=function(){function t(){this.name="fontFamily"}return t.prototype.createTarget=function(t){var e=void 0;if(t&&(e=t.getFontList()),e){var n='<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u4f53</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option>';e.forEach((function(t,e){n+=`<option value="${t.value||""}">${t.title||""}</option>`})),n+="</select></div></div>",this.target=p()(n)}else this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u4f53</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="SimSun">\u5b8b\u4f53</option><option value="Microsoft YaHei">\u5fae\u8f6f\u96c5\u9ed1</option></select></div></div>');return this.target},t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("font-family",e),"font-family:"+e;t[0].style.fontFamily="inherit"}return null},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),r=function(){function t(){this.name="fontSize"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("font-size",e+"pt"),"font-size:"+e+"pt";t[0].style.fontSize=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u4f53\u5927\u5c0f</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="6">6pt</option><option value="6.75">6.75pt</option><option value="7.5">7.5pt</option><option value="8.25">8.25pt</option><option value="9">9pt</option><option value="9.75">9.75pt</option><option value="10.5">10.5pt</option><option value="11.25">11.25pt</option><option value="12">12pt</option><option value="12.75">12.75pt</option><option value="13.5">13.5pt</option><option value="14.25">14.25pt</option><option value="15">15pt</option><option value="15.75">15.75pt</option><option value="16.5">16.5pt</option><option value="17.25">17.25pt</option><option value="18">18pt</option><option value="18.75">18.75pt</option><option value="19.5">19.5pt</option><option value="20.25">20.25pt</option><option value="21">21pt</option><option value="21.75">21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),a=function(){function t(){this.name="fontWeight"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("font-weight",e),"font-weight:"+e;t[0].style.fontWeight=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u4f53\u7c97\u7ec6</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="lighter">\u66f4\u7ec6</option><option value="bold">\u7c97\u4f53</option><option value="bolder">\u7c97\u4f53+</option><option value="100">100</option><option value="200">200</option><option value="300">300</option><option value="400">400</option><option value="500">500</option><option value="600">600</option><option value="700">700</option><option value="800">800</option><option value="900">900</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),s=function(){function t(){this.name="letterSpacing"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("letter-spacing",e+"pt"),"letter-spacing:"+e+"pt";t[0].style.letterSpacing=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u95f4\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="0.75">0.75pt</option><option value="1.5">1.5pt</option><option value="2.25">2.25pt</option><option value="3">3pt</option><option value="3.75">3.75pt</option><option value="4.5">4.5pt</option><option value="5.25">5.25pt</option><option value="6">6pt</option><option value="6.75">6.75pt</option><option value="7.5">7.5pt</option><option value="8.25">8.25pt</option><option value="9">9pt</option><option value="9.75">9.75pt</option><option value="10.5">10.5pt</option><option value="11.25">11.25pt</option><option value="12">12pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),l=function(){function t(){this.name="textAlign"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("text-align",e),"justify"==e?(t.css("text-align-last","justify"),t.css("text-justify","distribute-all-lines")):(t[0].style.textAlignLast="",t[0].style.textJustify=""),"text-align:"+e;t[0].style.textAlign="",t[0].style.textAlignLast="",t[0].style.textJustify=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5de6\u53f3\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="left">\u5c45\u5de6</option><option value="center">\u5c45\u4e2d</option><option value="right">\u5c45\u53f3</option><option value="justify">\u4e24\u7aef\u5bf9\u9f50</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),u=function(){function t(){this.name="hideTitle"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6807\u9898\u663e\u793a\u9690\u85cf</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="false">\u663e\u793a</option><option value="true">\u9690\u85cf</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),d=function(){function t(){this.name="tableBorder"}return t.prototype.css=function(t,e){if(t.find("table").length){if("border"==e||null==e)return t.find("table").css("border","1px solid"),"border:1px solid";"noBorder"==e?t.find("table").css("border","0px solid"):t.find("table")[0].style.border=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u683c\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="border">\u6709\u8fb9\u6846</option><option value="noBorder">\u65e0\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),h=function(){function t(){this.name="tableHeaderBorder"}return t.prototype.css=function(t,e){if(t.find("thead tr").length){if("border"==e||null==e)return t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-all");"noBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-none"):"leftBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-left"):"rightBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-right"):"leftRightBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-lr"):"topBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-top"):"bottomBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-bottom"):"topBottomBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-tb"):t.find("thead tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="border">\u6709\u8fb9\u6846</option><option value="noBorder">\u65e0\u8fb9\u6846</option><option value="leftBorder">\u5de6\u8fb9\u6846</option><option value="rightBorder">\u53f3\u8fb9\u6846</option><option value="leftRightBorder">\u5de6\u53f3\u8fb9\u6846</option><option value="topBorder">\u4e0a\u8fb9\u6846</option><option value="bottomBorder">\u4e0b\u8fb9\u6846</option><option value="topBottomBorder">\u4e0a\u4e0b\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),c=function(){function t(){this.name="tableHeaderCellBorder"}return t.prototype.css=function(t,e){if(t.find("thead tr").length){if("border"==e||null==e)return t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-td-all");"noBorder"==e?t.find("thead tr").addClass("hiprint-printElement-tableTarget-border-td-none"):t.find("thead tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u5355\u5143\u683c\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="border" >\u6709\u8fb9\u6846</option><option value="noBorder" >\u65e0\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),f=function(){function t(){this.name="tableFooterBorder"}return t.prototype.css=function(t,e){if(t.find("tfoot tr").length){if("border"==e||null==e)return t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-all");"noBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-none"):"leftBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-left"):"rightBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-right"):"leftRightBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-lr"):"topBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-top"):"bottomBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-bottom"):"topBottomBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-tb"):t.find("tfoot tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5c3e\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="border" >\u6709\u8fb9\u6846</option><option value="noBorder" >\u65e0\u8fb9\u6846</option><option value="leftBorder" >\u5de6\u8fb9\u6846</option><option value="rightBorder" >\u53f3\u8fb9\u6846</option><option value="leftRightBorder" >\u5de6\u53f3\u8fb9\u6846</option><option value="topBorder" >\u4e0a\u8fb9\u6846</option><option value="bottomBorder" >\u4e0b\u8fb9\u6846</option><option value="topBottomBorder" >\u4e0a\u4e0b\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),g=function(){function t(){this.name="tableFooterCellBorder"}return t.prototype.css=function(t,e){if(t.find("tfoot tr").length){if("border"==e||null==e)return t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-td-all");"noBorder"==e?t.find("tfoot tr").addClass("hiprint-printElement-tableTarget-border-td-none"):t.find("tfoot tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5c3e\u5355\u5143\u683c\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="border" >\u6709\u8fb9\u6846</option><option value="noBorder" >\u65e0\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),v=function(){function t(){this.name="tableHeaderRowHeight"}return t.prototype.css=function(t,e){if(t.find("thead tr td").length){if(e)return t.find("thead tr td:not([rowspan])").css("height",e+"pt"),"height:"+e+"pt";t.find("thead tr td").map((function(t,e){e.style.height=""}))}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u884c\u9ad8</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option><option value="22.5" >22.5pt</option><option value="23.25" >23.25pt</option><option value="24" >24pt</option><option value="24.75" >24.75pt</option><option value="25.5" >25.5pt</option><option value="26.25" >26.25pt</option><option value="27" >27pt</option><option value="27.75" >27.75pt</option><option value="28.5" >28.5pt</option><option value="29.25" >29.25pt</option><option value="30" >30pt</option><option value="30.75" >30.75pt</option><option value="31.5" >31.5pt</option><option value="32.25" >32.25pt</option><option value="33" >33pt</option><option value="33.75" >33.75pt</option><option value="34.5" >34.5pt</option><option value="35.25" >35.25pt</option><option value="36" >36pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),y=function(){function t(){this.name="tableHeaderFontSize"}return t.prototype.css=function(t,e){if(t.find("thead").length){if(e)return t.find("thead").css("font-size",e+"pt"),"font-size:"+e+"pt";t.find("thead").map((function(t,e){e.style.fontSize=""}))}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u5b57\u4f53\u5927\u5c0f</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),b=function(){function t(){this.name="tableHeaderFontWeight"}return t.prototype.css=function(t,e){if(t.find("thead").length){if(e)return t.find("thead tr td").css("font-weight",e),"font-weight:"+e;t.find("thead tr td").map((function(t,e){e.style.fontWeight=""}))}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u5b57\u4f53\u7c97\u7ec6</div><div class="hiprint-option-item-field"><select class="auto-submit"> <option value="" >\u9ed8\u8ba4</option><option value="lighter" >\u66f4\u7ec6</option><option value="bold" >\u7c97\u4f53</option><option value="bolder" >\u7c97\u4f53+</option><option value="100" >100</option><option value="200" >200</option><option value="300" >300</option><option value="400" >400</option><option value="500" >500</option><option value="600" >600</option><option value="700" >700</option><option value="800" >800</option><option value="900" >900</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),T=function(){function t(){this.name="tableBodyCellBorder"}return t.prototype.css=function(t,e){if(t.find("tbody tr").length){if("border"==e||null==e)return t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-td-all");"noBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-td-none"):t.find("tbody tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u4f53\u5355\u5143\u683c\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="border" >\u6709\u8fb9\u6846</option><option value="noBorder" >\u65e0\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),w=function(){function t(){this.name="tableBodyRowHeight"}return t.prototype.css=function(t,e){if(t.find("tbody tr td").length){if(e)return t.find("tbody tr td").css("height",e+"pt"),"height:"+e+"pt";t.find("tbody tr td").map((function(t,e){e.style.height=""}))}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u4f53\u884c\u9ad8</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option><option value="22.5" >22.5pt</option><option value="23.25" >23.25pt</option><option value="24" >24pt</option><option value="24.75" >24.75pt</option><option value="25.5" >25.5pt</option><option value="26.25" >26.25pt</option><option value="27" >27pt</option><option value="27.75" >27.75pt</option><option value="28.5" >28.5pt</option><option value="29.25" >29.25pt</option><option value="30" >30pt</option><option value="30.75" >30.75pt</option><option value="31.5" >31.5pt</option><option value="32.25" >32.25pt</option><option value="33" >33pt</option><option value="33.75" >33.75pt</option><option value="34.5" >34.5pt</option><option value="35.25" >35.25pt</option><option value="36" >36pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),E=function(){function t(){this.name="tableHeaderBackground"}return t.prototype.css=function(t,e){if(t.find("thead").length){if(e)return t.find("thead").css("background",e),"background:"+e;t.find("thead").map((function(t,e){e.style.background=""}))}return null},t.prototype.createTarget=function(){this.target=I("\u8868\u5934\u80cc\u666f",'<div style="display:flex"><input type="color" style="width:20pt;padding:2pt 1pt;border-right: none;"/><input type="text" class="auto-submit"/></div>',"");var t=this.target.find("input");return t.on("change",(function(){t.val(this.value)})),this.target},t.prototype.getValue=function(){var t=this.target.find(".auto-submit").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),x=function(){function t(){this.name="borderWidth"}return t.prototype.createTarget=function(t){var e=["hline","vline","rect","oval"].includes(t.printElementType.type)?"\u7ebf\u5bbd":"\u8fb9\u6846\u5927\u5c0f";return this.target=p()(`<div class="hiprint-option-item"><div class="hiprint-option-item-label">${e}</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option></select></div></div>`),this.target},t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-width",e+"pt"),"border-width:"+e+"pt";t[0].style.borderWidth=""}return null},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),C=function(){function t(){this.name="barcodeMode"}return t.prototype.createTarget=function(){const t=m.BARCODE_TYPES;return this.target=I("\u6761\u5f62\u7801\u683c\u5f0f",'<select class="auto-submit"></select>',""),this.target.find("select").append(t.reduce(((t,e)=>t+=`<option value="${e.value}" >${e.label}</option>`),"")),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),P=function(){function t(){this.name="barTextMode"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6761\u7801\u6587\u672c\u6a21\u5f0f</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="text">\u5355\u72ec\u6587\u672c</option><option value="svg">svg\u6587\u672c</option></select></div></div>'),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),S=function(){function t(){this.name="barWidth"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6761\u7801\u5bbd\u5ea6</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option></select></div></div>'),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),O=function(){function t(){this.name="barAutoWidth"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6761\u7801\u81ea\u52a8\u589e\u5bbd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="true">\u81ea\u52a8</option><option value="false">\u4e0d\u81ea\u52a8</option></select></div></div>'),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),F=function(){function t(){this.name="barcodeType"}return t.prototype.createTarget=function(){const t=m.BARCODE_TYPES;return this.target=I("\u6761\u5f62\u7801\u683c\u5f0f",'<select class="auto-submit"></select>',""),this.target.find("select").append(t.reduce(((t,e)=>t+=`<option value="${e.value}" >${e.label}</option>`),"")),this.target},t.prototype.getValue=function(){return this.target.find("select").val().toLowerCase()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),R=function(){function t(){this.name="qrcodeType"}return t.prototype.createTarget=function(){var t=m.QRCODE_TYPES;this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e8c\u7ef4\u7801\u7c7b\u578b</div><div class="hiprint-option-item-field"><select class="auto-submit"></select></div></div>');var e=this.target.find("select.auto-submit");return t.forEach((t=>{e.append(`<option value="${t.value}">${t.label}</option>`)})),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),H=function(){function t(){this.name="qrCodeLevel"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e8c\u7ef4\u7801\u5bb9\u9519\u7387</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="1" >7% L</option><option value="0" >15% M</option><option value="3" >25% Q</option><option value="2" >30% H</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();return parseInt(t||0)},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),L=function(){function t(){this.name="color"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("color",e),"color:"+e;t[0].style.color=""}return null},t.prototype.createTarget=function(){this.target=I("\u5b57\u4f53\u989c\u8272",'<div style="display:flex"><input type="color" style="width:20pt;padding:2pt 1pt;border-right: none;"/><input type="text" class="auto-submit"/></div>',"");var t=this.target.find("input");return t.on("change",(function(){t.val(this.value)})),this.target},t.prototype.getValue=function(){var t=this.target.find(".auto-submit").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),k=function(){function t(){this.name="textDecoration"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6587\u672c\u4fee\u9970</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="underline" >\u4e0b\u5212\u7ebf</option><option value="overline" >\u4e0a\u5212\u7ebf</option><option value="line-through" >\u7a7f\u68ad\u7ebf</option></select></div></div>'),this.target},t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("text-decoration",e),"text-decoration:"+e;t[0].style.textDecoration=""}return null},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),M=function(){function t(){this.name="field"}return t.prototype.createTarget=function(t){var e=void 0;if(t&&(e=t.getFields()),e){this.isSelect=!0;var n='<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5b57\u6bb5\u540d</div><div class="hiprint-option-item-field"><select class="auto-submit"> <option value="" >\u8bf7\u9009\u62e9\u5b57\u6bb5</option>';e.forEach((function(t,e){n+=' <option value="'+(t.field||"")+'" >'+(t.text||"")+"</option>"})),n+=" </select></div></div>",this.target=p()(n)}else this.isSelect=!1,this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5b57\u6bb5\u540d</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u8bf7\u8f93\u5165\u5b57\u6bb5\u540d" class="auto-submit"></div></div>');return this.target},t.prototype.getValue=function(){return(this.isSelect?this.target.find("select").val():this.target.find("input").val())||void 0},t.prototype.setValue=function(t){this.isSelect?t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>"),this.target.find("select").val(t)):this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),_=function(){function t(){this.name="title"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u6807\u9898</div><div class="hiprint-option-item-field"><textarea style="height:50px;" placeholder="\u8bf7\u8f93\u5165\u6807\u9898" class="auto-submit"></textarea></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),B=function(){function t(){this.name="testData"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u6d4b\u8bd5\u6570\u636e</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u4ec5\u5b57\u6bb5\u540d\u79f0\u5b58\u5728\u65f6\u6709\u6548" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),N=function(){function t(){this.name="coordinate"}return t.prototype.createTarget=function(t,e){var n=this;return n.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u4f4d\u7f6e\u5750\u6807</div><div class="hiprint-option-item-field" style="display: flex;align-items: baseline;"><input type="number" style="width:48%" placeholder="X\u4f4d\u7f6e(\u5de6)" class="auto-submit" /><input type="number" style="width:48%" placeholder="Y\u4f4d\u7f6e(\u4e0a)" class="auto-submit" /></div></div>'),n.syncLock=e.coordinateSync||!1,n.createSyncLock(n.syncLock),n.target},t.prototype.createSyncLock=function(t){var e=this;return e.lockTarget=e.syncLock?p()('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u540c\u6b65">\ud83d\udd17</label>'):p()('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u4e0d\u540c\u6b65">\ud83d\udd13</label>'),e.lockTarget.click((function(){e.syncLock?e.lockTarget.text("\ud83d\udd13").attr("title","\u4e0d\u540c\u6b65"):e.lockTarget.text("\ud83d\udd17").attr("title","\u540c\u6b65"),e.syncLock=!e.syncLock})),e.target.find("input:first").after(e.lockTarget),e.target.find("input:first").change((function(){e.syncLock&&e.target.find("input:last").val(p()(this).val())})),e.target.find("input:last").change((function(){e.syncLock&&e.target.find("input:first").val(p()(this).val())})),e.lockTarget},t.prototype.css=function(t){if(t&&t.length&&this.target&&("block"==t.find(".resize-panel").css("display")||t[0].className.includes("table"))&&this.el==t){var e=this.getValue();return t.css("left",e.left+"pt").css("top",e.top+"pt")}return null},t.prototype.getValue=function(){var t={coordinateSync:this.syncLock,left:0,top:0};return t.left=parseFloat(this.target.find("input:first").val()||0),t.top=parseFloat(this.target.find("input:last").val()||0),t},t.prototype.setValue=function(t,e){this.el=e.designTarget||e,this.target.find("input:first").val(t.left),this.target.find("input:last").val(t.top)},t.prototype.destroy=function(){this.target.remove()},t}(),A=function(){function t(){this.name="widthHeight"}return t.prototype.createTarget=function(t,e){var n=this;return n.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5bbd\u9ad8\u5927\u5c0f</div><div class="hiprint-option-item-field" style="display: flex;align-items: baseline;"><input type="number" style="width:48%" placeholder="\u5bbd" class="auto-submit" /><input type="number" style="width:48%" placeholder="\u9ad8" class="auto-submit" /></div></div>'),n.syncLock=e.widthHeightSync||!1,n.createSyncLock(n.syncLock),n.target},t.prototype.createSyncLock=function(t){var e=this;return e.lockTarget=e.syncLock?p()('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u540c\u6b65">\ud83d\udd17</label>'):p()('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u4e0d\u540c\u6b65">\ud83d\udd13</label>'),e.lockTarget.click((function(){e.syncLock?e.lockTarget.text("\ud83d\udd13").attr("title","\u4e0d\u540c\u6b65"):e.lockTarget.text("\ud83d\udd17").attr("title","\u540c\u6b65"),e.syncLock=!e.syncLock})),e.target.find("input:first").after(e.lockTarget),e.target.find("input:first").change((function(){e.syncLock&&e.target.find("input:last").val(p()(this).val())})),e.target.find("input:last").change((function(){e.syncLock&&e.target.find("input:first").val(p()(this).val())})),e.lockTarget},t.prototype.css=function(t){if(t&&t.length&&this.target&&("block"==t.find(".resize-panel").css("display")||t[0].className.includes("table"))&&this.el==t){var e=this.getValue();return t.css("width",e.width+"pt").css("height",e.height+"pt")}return null},t.prototype.getValue=function(){var t={widthHeightSync:this.syncLock,width:0,height:0};return t.width=parseFloat(this.target.find("input:first").val()||0),t.height=parseFloat(this.target.find("input:last").val()||0),t},t.prototype.setValue=function(t,e){this.el=e.designTarget||e,this.target.find("input:first").val(t.width),this.target.find("input:last").val(t.height)},t.prototype.destroy=function(){this.target.remove()},t}(),V=function(){function t(){this.name="src"}return t.prototype.createTarget=function(t){this.el=t;var e=void 0,n=this;return this.target=I('\u56fe\u7247\u5730\u5740<div style="color:#888;font-size:12px">\u5efa\u8bae\u4e0a\u4f20\u5c0f\u4e8e8KB\u7684\u56fe\u7247</div>','<input type="text" placeholder="\u8bf7\u8f93\u5165\u56fe\u7247\u5730\u5740" class="auto-submit" style="width: calc(100% - 42pt); padding: 0; vertical-align: top;"><button class="hiprint-option-item-settingBtn" style="margin: 0 0 0 4pt; width: 38pt; padding: 0;" type="button">\u9009\u62e9</button>'),t&&(e=t.getOnImageChooseClick()),e&&this.target.find("button").click((function(){e&&e(n)})),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.refresh=function(t,e,n){var i=this;if(this.setValue(t),this.target.find("input").change(),this.el&&e){var o=new Image;o.src=t,o.complete?i.updateEl(o.width,o.height,e,n):o.onload=function(){i.updateEl(o.width,o.height,e,n)}}},t.prototype.updateEl=function(t,e,n,i){var o,r,a;n&&(n&&n.auto&&(t>=e?n.width=!0:n.height=!0),n.width?(o=e/t,r=this.el.options.width,a=Math.floor(r*o*10)/10,this.el.options.height=a,this.el.designTarget.css("height",a+"pt")):n.height?(o=t/e,a=this.el.options.height,r=Math.floor(a*o*10)/10,this.el.options.width=r,this.el.designTarget.css("width",r+"pt")):n.real&&(r=D.px.toPt(t),a=D.px.toPt(e),this.el.options.width=r,this.el.options.height=a,this.el.designTarget.css("width",r+"pt"),this.el.designTarget.css("height",a+"pt")),this.el.designTarget.children(".resize-panel").trigger(p().Event("click")));i&&i(this.el,t,e)},t.prototype.destroy=function(){this.target.remove()},t}(),z=function(){function t(){this.name="fit"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.find("img").css("object-fit",e),"object-fit:"+e;t.find("img")[0].style["object-fit"]=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u56fe\u7247\u7f29\u653e</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="contain" >\u7b49\u6bd4</option><option value="cover" >\u526a\u88c1</option><option value="fill" >\u586b\u5145</option><option value="none" >\u539f\u59cb\u5c3a\u5bf8</option> </select></div></div>'),this.target,this.target},t.prototype.getValue=function(){return this.target.find("select").val()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),j=function(){function t(){this.name="borderColor"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-color",e),"border-color:"+e;t[0].style.borderColor=""}return null},t.prototype.createTarget=function(t){var e=["hline","vline","rect","oval"].includes(t.printElementType.type)?"\u989c\u8272":"\u8fb9\u6846\u989c\u8272";this.target=I(e,'<div style="display:flex"><input type="color" style="width:20pt;padding:2pt 1pt;border-right: none;"/><input type="text" class="auto-submit"/></div>',"");var n=this.target.find("input");return n.on("change",(function(){n.val(this.value)})),this.target},t.prototype.getValue=function(){var t=this.target.find(".auto-submit").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),W=function(){function t(){this.name="watermarkOptions"}return t.prototype.createTarget=function(){this.target=I("\u6c34\u5370\u529f\u80fd","","group"),this.content=I("\u6c34\u5370\u5185\u5bb9:",'<input type="text" placeholder="\u6c34\u5370\u5185\u5bb9" class="auto-submit" />',"flex"),this.fillStyle=I("\u5b57\u4f53\u989c\u8272:",'<input type="text" placeholder="\u5b57\u4f53\u989c\u8272" class="auto-submit" />',"flex"),this.fontSize=I("\u5b57\u4f53\u5927\u5c0f:",'<input type="range" min="10" max="80" placeholder="\u5b57\u4f53\u5927\u5c0f" class="auto-submit">',"flex"),this.rotate=I("\u65cb\u8f6c\u89d2\u5ea6:",'<input type="range" min="0" max="180" placeholder="\u65cb\u8f6c\u89d2\u5ea6" class="auto-submit">',"flex"),this.width=I("\u6c34\u5e73\u5bc6\u5ea6:",'<input type="range" min="100" max="800" placeholder="\u6c34\u5e73\u5bc6\u5ea6" class="auto-submit">',"flex"),this.height=I("\u5782\u76f4\u5bc6\u5ea6:",'<input type="range" min="100" max="800" placeholder="\u5782\u76f4\u5bc6\u5ea6" class="auto-submit">',"flex"),this.timestamp=I("\u6c34\u5370\u65f6\u95f4:",'<input type="checkbox" style="height:18px;width:18px;" placeholder="\u6c34\u5370\u65f6\u95f4" class="auto-submit">',"flex");let t='<option value="" >\u9ed8\u8ba4(YYYY-MM-DD HH:mm)</option>';return["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm","YYYY-MM-DD HH","YYYY-MM-DD","YYYY-MMMM","YYYY-MM","YYYY"].forEach((function(e){t+='<option value="'+e+'">'+e+"</option>"})),this.format=I("\u65f6\u95f4\u683c\u5f0f:",'<select class="auto-submit"></select>',"flex"),this.format.find(".auto-submit").append(p()(t)),this.target.append(this.content),this.target.append(this.fillStyle),this.target.append(this.fontSize),this.target.append(this.rotate),this.target.append(this.width),this.target.append(this.height),this.target.append(this.timestamp),this.target.append(this.format),this.target},t.prototype.getValue=function(){let t={content:this.content.find("input").val(),fillStyle:this.fillStyle.find("input").val()||"rgba(184, 184, 184, 0.3)",fontSize:parseInt(this.fontSize.find("input").val()||"14")+"px",rotate:parseInt(this.rotate.find("input").val()||"25"),width:parseInt(this.width.find("input").val()||"200"),height:parseInt(this.height.find("input").val()||"200"),timestamp:this.timestamp.find("input").is(":checked"),format:""==this.format.find("select").val()?"YYYY-MM-DD HH:mm":this.format.find("select").val()};return Object.assign({},this.options,t)},t.prototype.setValue=function(t){this.options=t,this.content.find("input").val(t.content||""),this.fillStyle.find("input").val(t.fillStyle||"rgba(184, 184, 184, 0.3)");const e=parseInt(t.fontSize||"14");this.fontSize.find("input").val(e),this.rotate.find("input").val(t.rotate||25),this.width.find("input").val(t.width||200),this.height.find("input").val(t.height||200),this.timestamp.find("input").attr("checked",null!=t.timestamp&&t.timestamp),this.format.find("select").val(t.format||"YYYY-MM-DD HH:mm")},t.prototype.destroy=function(){this.target.remove()},t}(),Y=function(){function t(){this.name="paperNumberFormat"}return t.prototype.createTarget=function(){return this.target=I("\u9875\u7801\u683c\u5f0f",'<input type="text" placeholder="${page}-${total}" class="auto-submit" />'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),G=function(){function t(){this.name="paperNumberDisabled"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u663e\u793a\u9875\u7801</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u663e\u793a</option><option value="true" >\u9690\u85cf</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),$=function(){function t(){this.name="paperNumberContinue"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u9875\u7801\u7eed\u6392</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="true" >\u7eed\u6392</option><option value="reset" >\u91cd\u6392</option></select></div></div>'),this.target},t.prototype.getValue=function(){return"true"==this.target.find("select").val()},t.prototype.setValue=function(t){this.target.find("select").val((null==t||t?"true":"reset").toString())},t.prototype.destroy=function(){this.target.remove()},t}(),q=function(){function t(){this.name="longTextIndent"}return t.prototype.css=function(t,e){return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6bcf\u884c\u7f29\u8fdb</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option><option value="22.5" >22.5pt</option><option value="23.25" >23.25pt</option><option value="24" >24pt</option><option value="24.75" >24.75pt</option><option value="25.5" >25.5pt</option><option value="26.25" >26.25pt</option><option value="27" >27pt</option><option value="27.75" >27.75pt</option><option value="28.5" >28.5pt</option><option value="29.25" >29.25pt</option><option value="30" >30pt</option><option value="30.75" >30.75pt</option><option value="31.5" >31.5pt</option><option value="32.25" >32.25pt</option><option value="33" >33pt</option><option value="33.75" >33.75pt</option><option value="34.5" >34.5pt</option><option value="35.25" >35.25pt</option><option value="36" >36pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),X=function(){function t(){this.name="showInPage"}return t.prototype.css=function(t,e){if(t&&t.length){if(e&&"none"==e)return t.addClass("alwaysHide");t.removeClass("alwaysHide")}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u663e\u793a\u89c4\u5219</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="none" >\u59cb\u7ec8\u9690\u85cf</option><option value="first" >\u9996\u9875</option><option value="odd" >\u5947\u6570\u9875</option><option value="even" >\u5076\u6570\u9875</option><option value="last" >\u5c3e\u9875</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),U=function(){function t(){this.name="pageBreak"}return t.prototype.css=function(t,e){if(t&&t.length){if(e&&"none"==e)return t.addClass("alwaysHide");t.removeClass("alwaysHide")}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5f3a\u5236\u5206\u9875</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u662f</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),K=function(){function t(){this.name="paperList"}return t.prototype.createTarget=function(){this.target=I("\u7eb8\u5f20\u4fe1\u606f","","group"),this.paperType=I("\u7eb8\u5f20\u7c7b\u578b:",'<select placeholder="\u7eb8\u5f20\u7c7b\u578b" class="auto-submit" /></select>',"flex"),this.width=I("\u5bbd<small>(mm)</small>:",'<input placeholder="\u5bbd" class="auto-submit" />',"flex"),this.height=I("\u9ad8<small>(mm)</small>:",'<input placeholder="\u9ad8" class="auto-submit" />',"flex"),this.target.append(this.paperType),this.target.append(this.height),this.target.append(this.width),this.target.find(".auto-submit").append(Object.keys(D.paperList).reduce(((t,e)=>t+=`<option value="${e}" >${e}</option>`),'<option value="">\u81ea\u5b9a\u4e49</option>'));var t=this.paperType.find(".auto-submit"),e=this.height.find(".auto-submit"),n=this.width.find(".auto-submit");function i(){t.val("")}return t.on("change",(function(){if(p()(this).val()){var t=D.paperList[p()(this).val()];e.val(t.height),n.val(t.width)}})),n.on("change",i),e.on("change",i),this.target},t.prototype.getValue=function(){let t={paperType:this.paperType.find(".auto-submit").val()||"",height:this.height.find(".auto-submit").val()||"",width:this.width.find(".auto-submit").val()||""};return Object.assign({},this.options,t)},t.prototype.setValue=function(t){this.options=t;try{this.paperType.find(".auto-submit").val(t.paperType||""),this.height.find(".auto-submit").val(t.height||""),this.width.find(".auto-submit").val(t.width||"")}catch(t){}},t.prototype.destroy=function(){this.target.remove()},t}(),J=function(){function t(){this.name="panelPaperRule"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6253\u5370\u89c4\u5219</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="odd" >\u4fdd\u6301\u5947\u6570</option><option value="even" >\u4fdd\u6301\u5076\u6570</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Q=function(){function t(){this.name="panelPageRule"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5206\u9875\u89c4\u5219</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="none" >\u4e0d\u5206\u9875</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Z=function(){function t(){this.name="leftSpaceRemoved"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u79fb\u9664\u6bb5\u843d\u5de6\u4fa7\u7a7a\u767d</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u79fb\u9664</option><option value="false" >\u4e0d\u79fb\u9664</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("false"==this.target.find("select").val())return!1},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),tt=function(){function t(){this.name="firstPaperFooter"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u9996\u9875\u9875\u5c3e</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u9996\u9875\u9875\u5c3e" class="auto-submit"></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),et=function(){function t(){this.name="lastPaperFooter"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5c3e\u9875\u9875\u5c3e</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u5c3e\u9875\u9875\u5c3e" class="auto-submit"></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),nt=function(){function t(){this.name="evenPaperFooter"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5076\u6570\u9875\u9875\u5c3e</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u5076\u6570\u9875\u9875\u5c3e" class="auto-submit"></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),it=function(){function t(){this.name="oddPaperFooter"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5947\u6570\u9875\u9875\u5c3e</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u5947\u6570\u9875\u9875\u5c3e" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ot=function(){function t(){this.name="fixed"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4f4d\u7f6e\u56fa\u5b9a</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="false" >\u5426</option><option value="true" >\u662f</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),rt=function(){function t(){this.name="axis"}return t.prototype.createTarget=function(){return this.target=I("\u62d6\u52a8\u65b9\u5411",'<select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="h" >\u6a2a\u5411</option><option value="v" >\u7ad6\u5411</option></select>',"row"),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),at=function(){function t(){this.name="leftOffset"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5de6\u504f\u79fb</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u504f\u79fb\u91cfpt" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),st=function(){function t(){this.name="lHeight"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u6700\u4f4e\u9ad8\u5ea6</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u6587\u672c\u8fc7\u77ed\u6216\u4e3a\u7a7a\u65f6\u7684\u9ad8\u5ea6" class="auto-submit"></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),pt=function(){function t(){this.name="unShowInPage"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u9690\u85cf\u89c4\u5219</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="first" >\u9996\u9875</option><option value="last" >\u5c3e\u9875</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),lt=function(){function t(){this.name="tableBodyRowBorder"}return t.prototype.css=function(t,e){if(t.find("tbody tr").length){if("border"==e||null==e)return t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-all");"noBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-none"):"leftBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-left"):"rightBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-right"):"leftRightBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-lr"):"topBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-top"):"bottomBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-bottom"):"topBottomBorder"==e?t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-tb"):t.find("tbody tr").removeClass()}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u4f53\u884c\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="border" >\u6709\u8fb9\u6846</option><option value="noBorder" >\u65e0\u8fb9\u6846</option><option value="leftBorder" >\u5de6\u8fb9\u6846</option><option value="rightBorder" >\u53f3\u8fb9\u6846</option><option value="leftRightBorder" >\u5de6\u53f3\u8fb9\u6846</option><option value="topBorder" >\u4e0a\u8fb9\u6846</option><option value="bottomBorder" >\u4e0b\u8fb9\u6846</option><option value="topBottomBorder" >\u4e0a\u4e0b\u8fb9\u6846</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ut=function(){function t(){this.name="transform"}return t.prototype.css=function(t,e){if(t&&t.length){var n=t.find(".hiprint-printElement-content").parent(".hiprint-printElement");if(n.length||(n=t),e)return n.css("transform","rotate("+e+"deg)"),n.css("-ms-transform","rotate("+e+"deg)"),n.css("-moz-transform","rotate("+e+"deg)"),n.css("-webkit-transform","rotate("+e+"deg)"),n.css("-o-transform","rotate("+e+"deg)"),"transform:rotate("+e+"deg)";n.length&&(n[0].style.transform="")}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u65cb\u8f6c\u89d2\u5ea6</div><div class="hiprint-option-item-field"><input type="number" class="auto-submit"/></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),dt=function(){function t(){this.name="zIndex"}return t.prototype.css=function(t,e){return t&&t.length&&e?t.css("z-index",e):null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5143\u7d20\u5c42\u7ea7</div><div class="hiprint-option-item-field"><input type="number" class="auto-submit"/></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseInt(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ht=function(){function t(){this.name="borderRadius"}return t.prototype.css=function(t,e){return t&&t.length&&e?t.css("border-raduis",e):null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8fb9\u6846\u5706\u89d2</div><div class="hiprint-option-item-field"><input type="text" class="auto-submit"/></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ct=function(){function t(){this.name="optionsGroup"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u8fb9\u6846\u8bbe\u7f6e</div></div>'),this.target},t.prototype.getValue=function(){},t.prototype.setValue=function(t){},t.prototype.destroy=function(){this.target.remove()},t}(),ft=function(){function t(){this.name="borderTop"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-top-style",e),"border-top:1px";t[0].style.borderTopStyle="",t[0].style.borderTopWidth=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e0a\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u5426</option><option value="solid" >\u5b9e\u7ebf</option><option value="dotted" >\u865a\u7ebf</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),gt=function(){function t(){this.name="borderLeft"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-left-style",e),"border-left:1px";t[0].style.borderLeftStyle="",t[0].style.borderLeftWidth=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5de6\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u5426</option><option value="solid" >\u5b9e\u7ebf</option><option value="dotted" >\u865a\u7ebf</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),mt=function(){function t(){this.name="borderRight"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-right-style",e),"border-right:1px";t[0].style.borderRightStyle="",t[0].style.borderRightWidth=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u53f3\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u5426</option><option value="solid" >\u5b9e\u7ebf</option><option value="dotted" >\u865a\u7ebf</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),vt=function(){function t(){this.name="borderBottom"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-bottom-style",e),"border-bottom-style:1px solid";t[0].style.borderBottomStyle="",t[0].style.borderBottomWidth=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e0b\u8fb9\u6846</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u5426</option><option value="solid" >\u5b9e\u7ebf</option><option value="dotted" >\u865a\u7ebf</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),yt=function(){function t(){this.name="contentPaddingLeft"}return t.prototype.css=function(t,e){var n=t.find(".hiprint-printElement-content");if(n&&n.length){if(e)return n.css("padding-left",e+"pt"),"padding-left";n[0].style.paddingLeft=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5de6\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),bt=function(){function t(){this.name="contentPaddingTop"}return t.prototype.css=function(t,e){var n=t.find(".hiprint-printElement-content");if(n&&n.length){if(e)return n.css("padding-top",e+"pt"),"padding-top";n[0].style.paddingTop=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e0a\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Tt=function(){function t(){this.name="contentPaddingRight"}return t.prototype.css=function(t,e){var n=t.find(".hiprint-printElement-content");if(n&&n.length){if(e)return n.css("padding-right",e+"pt"),"padding-right";n[0].style.paddingRight=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u53f3\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),wt=function(){function t(){this.name="contentPaddingBottom"}return t.prototype.css=function(t,e){var n=t.find(".hiprint-printElement-content");if(n&&n.length){if(e)return n.css("padding-bottom",e+"pt"),"padding-bottom";n[0].style.paddingBottom=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e0b\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Et=function(){function t(){this.name="borderStyle"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("border-style",e),"border-style:1px";t[0].style.borderStyle=""}return null},t.prototype.createTarget=function(t){var e=["hline","vline","rect","oval"].includes(t.printElementType.type)?"\u6837\u5f0f":"\u8fb9\u6846\u6837\u5f0f";return this.target=p()(`<div class="hiprint-option-item"><div class="hiprint-option-item-label">${e}</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="solid" >\u5b9e\u7ebf</option><option value="dashed" >\u957f\u865a\u7ebf</option><option value="dotted" >\u77ed\u865a\u7ebf</option></select></div></div>`),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),xt=function(){function t(){this.name="backgroundColor"}return t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.css("background-color",e),"background-color:"+e;t[0].style.backgroundColor=""}return null},t.prototype.createTarget=function(){this.target=I("\u80cc\u666f\u989c\u8272",'<div style="display:flex"><input type="color" style="width:20pt;padding:2pt 1pt;border-right: none;"/><input type="text" class="auto-submit"/></div>',"");var t=this.target.find("input");return t.on("change",(function(){t.val(this.value)})),this.target},t.prototype.getValue=function(){var t=this.target.find(".auto-submit").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Ct=function(){function t(){this.name="barColor"}return t.prototype.css=function(t,e){return t&&t.length,null},t.prototype.createTarget=function(){this.target=I("\u6761\u7801\u989c\u8272",'<div style="display:flex"><input type="color" style="width:20pt;padding:2pt 1pt;border-right: none;"/><input type="text" class="auto-submit"/></div>',"");var t=this.target.find("input");return t.on("change",(function(){t.val(this.value)})),this.target},t.prototype.getValue=function(){var t=this.target.find(".auto-submit").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Pt=function(){function t(){this.name="orient"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u7eb8\u5f20\u65b9\u5411<div style=\'color:#888;font-size:12px\'>\u4ec5\u81ea\u5b9a\u4e49\u7eb8\u8d28\u6709\u6548</div></div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="1" >\u7eb5\u5411</option><option value="2" >\u6a2a\u5411</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),St=function(){function t(){this.name="textContentVerticalAlign"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e0a\u4e0b\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="middle" >\u5782\u76f4\u5c45\u4e2d</option><option value="bottom" >\u5e95\u90e8</option></select></div></div>'),this.target},t.prototype.css=function(t,e){return t&&t.length&&(t.removeClass("hiprint-text-content-middle"),t.removeClass("hiprint-text-content-bottom"),e)?("middle"===e&&t.addClass("hiprint-text-content-middle"),"bottom"===e&&t.addClass("hiprint-text-content-bottom"),""):null},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Ot=function(){function t(){this.name="textContentWrap"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6587\u672c\u6362\u884c</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="nowrap" >\u4e0d\u6362\u884c</option><option value="clip" >\u4e0d\u6362\u884c&\u9690\u85cf</option><option value="ellipsis" >\u4e0d\u6362\u884c&\u7701\u7565</option></select></div></div>'),this.target},t.prototype.css=function(t,e){return t&&t.length&&(t.removeClass("hiprint-text-content-wrap"),t.find(".hiprint-printElement-text-content").removeClass("hiprint-text-content-wrap-nowrap"),t.find(".hiprint-printElement-text-content").removeClass("hiprint-text-content-wrap-clip"),t.find(".hiprint-printElement-text-content").removeClass("hiprint-text-content-wrap-ellipsis"),e)?(t.addClass("hiprint-text-content-wrap"),t.find(".hiprint-printElement-text-content").addClass("hiprint-text-content-wrap-"+e),""):null},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),It=n(5),Ft=function(){function t(){this.name="columns"}return t.prototype.createTarget=function(){return p()('<div class="indicator"></div>').appendTo("body"),this.target=p()(' <div class="hiprint-option-item hiprint-option-item-row"><div><ul class="hiprint-option-table-selected-columns"> </ul></div></div>'),this.target},t.prototype.getValue=function(){return this.buildData()},t.prototype.setValue=function(t,e,n){var i=this,o=this;this.value=t,this.options=e,this.printElementType=n;var r=n.columns[0].filter((function(e){return 0==t[0].columns.filter((function(t){return e.columnId==t.columnId})).length})).map((function(t){var e=new It.a(t);return e.checked=!1,e}));this.allColumns=t[0].columns.concat(r),t&&1==t.length&&(this.target.find("ul").html(this.allColumns.map((function(t,e){return'<li class="hiprint-option-table-selected-item"> <div class="hi-pretty p-default"> '+(t.checked?'<input type="checkbox" checked column-id="'+(t.id||t.columnId)+'" />':'<input type="checkbox" column-id="'+(t.id||t.columnId)+'" />')+' <div class="state"><label></label> </div></div><span class="column-title">'+(t.title||t.descTitle||"")+"</span></li>"})).join("")),this.target.find("input").change((function(t){var e=t.target.checked,n=t.target.attributes["column-id"].nodeValue||"",o=i.allColumns.findIndex((function(t){return t.field==n||t.id==n}));o>=0&&(i.allColumns[o].checked=e),i.submit()})),this.printElementType.columnDisplayIndexEditable&&this.target.find("li").hidraggable({revert:!0,handle:".column-title",moveUnit:"pt",deltaX:0,deltaY:0}).hidroppable({onDragOver:function(t,e){p()(this).css("border-top-color","red")},onDragLeave:function(t,e){p()(this).css("border-top-color","")},onDrop:function(t,e){p()(e).insertBefore(this),p()(this).css("border-top-color",""),o.submit()}}))},t.prototype.buildData=function(){var t=this,e=[];return t.options.columns.length>1||(t.printElementType.makeColumnObj(t.allColumns),this.target.find("input").map((function(n,i){var o=p()(i).attr("column-id"),r=t.printElementType.getColumnByColumnId(o);if(r){var a=new It.a(r);a.checked=r.checked,e.push(a)}})),this.value[0].columns=e),this.value},t.prototype.destroy=function(){this.target.remove()},t}(),Rt=function(){function t(){this.name="textType"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6253\u5370\u7c7b\u578b</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="" >\u6587\u672c</option><option value="barcode" >\u6761\u5f62\u7801</option><option value="qrcode" >\u4e8c\u7ef4\u7801</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Dt=function(){function t(){this.name="tableTextType"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5b57\u6bb5\u7c7b\u578b</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4(\u6587\u672c)</option><option value="text" >\u6587\u672c</option><option value="sequence" >\u5e8f\u53f7</option><option value="barcode" >\u6761\u5f62\u7801</option><option value="qrcode" >\u4e8c\u7ef4\u7801</option><option value="image" >\u56fe\u7247</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Ht=function(){function t(){this.name="tableBarcodeMode"}return t.prototype.createTarget=function(){const t=m.BARCODE_TYPES;return this.target=I("\u6761\u5f62\u7801\u683c\u5f0f",'<select class="auto-submit"></select>',""),this.target.find("select").append(t.reduce(((t,e)=>t+=`<option value="${e.value}" >${e.label}</option>`),"")),this.target},t.prototype.getValue=function(){return this.target.find("select").val()||void 0},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Lt=function(){function t(){this.name="tableQRCodeLevel"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e8c\u7ef4\u7801\u5bb9\u9519\u7387</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="1" >7% L</option><option value="0" >15% M</option><option value="3" >25% Q</option><option value="2" >30% H</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();return parseInt(t||0)},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),kt=function(){function t(){this.name="tableColumnHeight"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item "><div class="hiprint-option-item-label">\u5355\u5143\u683c\u9ad8\u5ea6</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u6761\u5f62\u7801\u3001\u4e8c\u7ef4\u7801\u4ee5\u53ca\u56fe\u7247\u6709\u6548" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Mt=function(){function t(){this.name="tableSummaryTitle"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u6807\u9898</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="true">\u663e\u793a</option><option value="false">\u9690\u85cf</option></select></div></div>'),this.target},t.prototype.getValue=function(){return!("false"==this.target.find("select").val())},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),_t=function(){function t(){this.name="tableSummaryText"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u6587\u672c</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u805a\u5408\u7c7b\u578b:" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Bt=function(){function t(){this.name="tableSummaryColspan"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u5408\u5e76\u5217\u6570</div><div class="hiprint-option-item-field"><input type="number" min="0" step="1" placeholder="\u5408\u5e76\u5217\u6570" class="auto-submit" ></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Nt=function(){function t(){this.name="tableSummaryAlign"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u5de6\u53f3\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="left">\u5c45\u5de6</option><option value="center" >\u5c45\u4e2d</option><option value="right" >\u5c45\u53f3</option><option value="justify" >\u4e24\u7aef\u5bf9\u9f50</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),At=function(){function t(){this.name="tableSummaryNumFormat"}return t.prototype.createTarget=function(){var t=[{t:"\u6574\u6570",v:"0"}];[1,2,3,4,5,6].forEach((function(e){t.push({t:`\u4fdd\u7559${e}\u4f4d`,v:""+e})}));var e='<option value="" >\u9ed8\u8ba4</option>';return t.forEach((function(t){e+='<option value="'+(t.v||"")+'">'+(t.t||"")+"</option>"})),this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u5c0f\u6570</div><div class="hiprint-option-item-field"><select class="auto-submit"></select></div></div>'),this.target.find(".auto-submit").append(p()(e)),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Vt=function(){function t(){this.name="showCodeTitle"}return t.prototype.createTarget=function(){return this.target=p()(' <div class="hiprint-option-item" title="\u6761\u5f62\u7801\u5e95\u90e8\u662f\u5426\u663e\u793a\u5185\u5bb9"><div class="hiprint-option-item-label">\u663e\u793a\u7801\u503c</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u663e\u793a</option><option value="false" >\u9690\u85cf</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),zt=function(){function t(){this.name="tableSummaryFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u5e95\u90e8\u805a\u5408\u683c\u5f0f\u5316\u51fd\u6570",'<code>function(column,data,tableData,options){</code><textarea placeholder=\'return "<td></td>"\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),jt=function(){function t(){this.name="upperCase"}return t.prototype.createTarget=function(){var t='<option value="">\u9ed8\u8ba4</option>';return[].forEach((e=>{t+=`<option value="${e.v}">${e.t}</option>`})),this.target=I("\u683c\u5f0f\u8f6c\u6362",'<select class="auto-submit" /></select>'),this.target.find(".auto-submit").append(p()(t)),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Wt=function(){function t(){this.name="tableSummary"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5e95\u90e8\u805a\u5408\u7c7b\u578b</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u4e0d\u805a\u5408</option><option value="count">\u8ba1\u6570</option><option value="sum">\u5408\u8ba1</option><option value="avg">\u5e73\u5747\u503c</option><option value="min">\u6700\u5c0f\u503c</option><option value="max">\u6700\u5927\u503c</option><option value="text">\u4ec5\u6587\u672c</option></select></div></div>'),this.target},t.prototype.getValue=function(){return this.target.find("select").val()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Yt=function(){function t(){this.name="topOffset"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u9876\u90e8\u504f\u79fb</div><div class="hiprint-option-item-field"><input type="text" placeholder="\u504f\u79fb\u91cfpt" class="auto-submit"></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Gt=function(){function t(){this.name="panelLayoutOptions"}return t.prototype.createTarget=function(){return this.target=I("\u9762\u677f\u6392\u5217","","group"),this.layoutType=I("\u6392\u5217\u65b9\u5f0f",' <select class="auto-submit"> <option value="column">\u7eb5\u5411</option> <option value="row">\u6a2a\u5411</option> </select>'),this.layoutRowGap=I("\u5782\u76f4\u95f4\u8ddd",'<input type="text" placeholder="\u5782\u76f4\u95f4\u8dddmm" class="auto-submit" />',""),this.layoutColumnGap=I("\u6c34\u5e73\u95f4\u8ddd",'<input type="text" placeholder="\u6c34\u5e73\u95f4\u8dddmm" class="auto-submit" />',""),this.target.append(this.layoutType),this.target.append(this.layoutRowGap),this.target.append(this.layoutColumnGap),this.target},t.prototype.getValue=function(){let t={layoutType:this.layoutType.find("select").val()||"column",layoutRowGap:parseInt(this.layoutRowGap.find("input").val()||0),layoutColumnGap:parseInt(this.layoutColumnGap.find("input").val()||0)};return Object.assign({},this.options,t)},t.prototype.setValue=function(t){this.options=t,this.layoutType.find("select").val(t.layoutType||"column"),this.layoutRowGap.find("input").val(t.layoutRowGap),this.layoutColumnGap.find("input").val(t.layoutColumnGap)},t.prototype.destroy=function(){this.target.remove()},t}(),$t=function(){function t(){this.name="gridColumns"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e00\u884c\u591a\u7ec4</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="2" >\u4e00\u884c\u4e8c\u5217</option><option value="3" >\u4e00\u884c\u4e09\u5217</option><option value="4" >\u4e00\u884c\u56db\u5217</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),qt=function(){function t(){this.name="gridColumnsGutter"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u4e00\u884c\u591a\u7ec4\u95f4\u9694</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.25" >7.25pt</option><option value="8.5" >8.5pt</option><option value="9" >9pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.css=function(t,e){if(t&&t.length){if(e)return t.find(".table-grid-row").css("margin-left","-"+e+"pt").css("margin-right","-"+e+"pt"),t.find(".tableGridColumnsGutterRow").css("padding-left",e+"pt").css("padding-right",e+"pt"),null;t.find(".table-grid-row").map((function(t,e){e.style.marginLeft="",e.style.marginRight=""})),t.find(".tableGridColumnsGutterRow").map((function(t,e){e.style.paddingLeft="",e.style.paddingRight=""}))}return null},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Xt=function(){function t(){this.name="tableHeaderRepeat"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u683c\u5934\u663e\u793a</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="page" >\u6bcf\u9875\u663e\u793a</option><option value="first" >\u9996\u9875\u663e\u793a</option><option value="none" >\u4e0d\u663e\u793a</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Ut=function(){function t(){this.name="paddingLeft"}return t.prototype.css=function(t,e){var n=t;if(n&&n.length){if(e)return n.css("padding-left",e+"pt"),"padding-left";n[0].style.paddingLeft=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5de6\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Kt=function(){function t(){this.name="paddingRight"}return t.prototype.css=function(t,e){var n=t;if(n&&n.length){if(e)return n.css("padding-right",e+"pt"),"padding-right";n[0].style.paddingRight=""}return null},t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u53f3\u5185\u8fb9\u8ddd</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="0.75" >0.75pt</option><option value="1.5" >1.5pt</option><option value="2.25" >2.25pt</option><option value="3" >3pt</option><option value="3.75" >3.75pt</option><option value="4.5" >4.5pt</option><option value="5.25" >5.25pt</option><option value="6" >6pt</option><option value="6.75" >6.75pt</option><option value="7.5" >7.5pt</option><option value="8.25" >8.25pt</option><option value="9" >9pt</option><option value="9.75" >9.75pt</option><option value="10.5" >10.5pt</option><option value="11.25" >11.25pt</option><option value="12" >12pt</option><option value="12.75" >12.75pt</option><option value="13.5" >13.5pt</option><option value="14.25" >14.25pt</option><option value="15" >15pt</option><option value="15.75" >15.75pt</option><option value="16.5" >16.5pt</option><option value="17.25" >17.25pt</option><option value="18" >18pt</option><option value="18.75" >18.75pt</option><option value="19.5" >19.5pt</option><option value="20.25" >20.25pt</option><option value="21" >21pt</option><option value="21.75" >21.75pt</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return parseFloat(t.toString())},t.prototype.setValue=function(t){t&&(this.target.find('option[value="'+t+'"]').length||this.target.find("select").prepend('<option value="'+t+'" >'+t+"</option>")),this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),Jt=function(){function t(){this.name="dataType"}return t.prototype.createTarget=function(){var t=this;return this.target=p()('<div class="hiprint-option-item-row"><div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6570\u636e\u7c7b\u578b</div><div class="hiprint-option-item-field"><select class="hiprint-option-item-datatype"><option value="" >\u9ed8\u8ba4</option><option value="datetime" >\u65e5\u671f\u65f6\u95f4</option><option value="boolean" >\u5e03\u5c14</option><option value="format">\u9ad8\u7ea7</option></select></div></div><div class="hiprint-option-item "><div class="hiprint-option-item-label ">\u683c\u5f0f</div><div class="hiprint-option-item-field"><select class="auto-submit hiprint-option-item-datatype-select-format"><option value="" >\u9ed8\u8ba4</option></select><textarea class="auto-submit hiprint-option-item-datatype-input-format"></textarea></div></div></div>'),p()(this.target.find(".hiprint-option-item-datatype")).change((function(){var e=p()(t.target.find(".hiprint-option-item-datatype")).val();t.loadFormatSelectByDataType(e),t.submit(t.getValue())})),this.target},t.prototype.getValue=function(){var t=this.target.find(".hiprint-option-item-datatype").val();return t?{dataType:t,format:this.target.find(".hiprint-option-item-datatype-format").val()||void 0}:{dataType:void 0,format:void 0}},t.prototype.setValue=function(t,e){this.target.find(".hiprint-option-item-datatype").val(e.dataType||""),this.loadFormatSelectByDataType(e.dataType),this.target.find(".hiprint-option-item-datatype-format").val(e.format||"")},t.prototype.destroy=function(){this.target.remove()},t.prototype.loadFormatSelectByDataType=function(t){var e="hiprint-option-item-datatype-format";"boolean"===t||"format"===t?(this.target.find("."+e).removeClass(e),this.target.find(".hiprint-option-item-datatype-input-format").addClass(e).val("").show().siblings().hide()):"datetime"===t?(this.target.find("."+e).removeClass(e),this.target.find(".hiprint-option-item-datatype-select-format").html('<option value="">\u9ed8\u8ba4</option> <option value="MM-dd">MM-dd</option><option value="yyyy-MM-dd">yyyy-MM-dd</option><option value="yyyy-MM-dd HH:mm">yyyy-MM-dd HH:mm</option><option value="yyyy-MM-dd HH:mm:ss">yyyy-MM-dd HH:mm:ss</option>').addClass(e).val("").show().siblings().hide()):this.target.find(".hiprint-option-item-datatype-select-format").html('<option value="" >\u9ed8\u8ba4</option>').show().siblings().hide()},t}(),Qt=function(){function t(){this.name="formatter"}return t.prototype.createTarget=function(){return this.target=I("\u683c\u5f0f\u5316\u51fd\u6570",'<code>function(title,value,options,data){</code><textarea placeholder="return value" class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),Zt=function(){function t(){this.name="styler"}return t.prototype.createTarget=function(){return this.target=I("\u6837\u5f0f\u51fd\u6570",'<code>function(title,value,target,data){</code><textarea placeholder="return {}" class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),te=function(){function t(){this.name="rowsColumnsMerge"}return t.prototype.createTarget=function(){return this.target=I("\u884c\u6837\u5f0f\u51fd\u6570",'<code>function(data, col, colIndex, rowIndex, tableData, printData){</code><textarea placeholder="return [1,1]" class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),ee=function(){function t(){this.name="rowsColumnsMergeClean"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u8de8\u9875\u5408\u5e76\u662f\u5426\u6e05\u9664</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u662f</option><option value="false" >\u5426</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),ne=function(){function t(){this.name="footerFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u8868\u683c\u811a\u51fd\u6570",'<code>function(options,rows,data,pageData,pageIndex){</code><textarea placeholder=\'return "<tr></tr>"\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),ie=function(){function t(){this.name="groupSequenceContinue"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u5206\u7ec4\u5e8f\u53f7\u7eed\u7f16</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u662f</option><option value="false" >\u5426</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),oe=function(){function t(){this.name="groupFieldsFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u5206\u7ec4\u5b57\u6bb5\u51fd\u6570",'<code>function(type,options,data){</code><textarea placeholder="return []" class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),re=function(){function t(){this.name="groupFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u5206\u7ec4\u5934\u683c\u5f0f\u5316\u51fd\u6570",'<code>function(colTotal,tableData,printData,groupData,options){</code><textarea placeholder=\'return "<div>\u5206\u7ec4\u5934\u4fe1\u606f</div>"\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),ae=function(){function t(){this.name="groupFooterFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u5206\u7ec4\u811a\u683c\u5f0f\u5316\u51fd\u6570",'<code>function(colTotal,tableData,printData,groupData,options){</code><textarea placeholder=\'return "<div>\u5206\u7ec4\u811a\u4fe1\u606f</div>"\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),se=function(){function t(){this.name="gridColumnsFooterFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u591a\u7ec4\u8868\u683c\u811a\u51fd\u6570",'<code>function(options,rows,data,pageData){</code><textarea placeholder=\'return ""\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),pe=function(){function t(){this.name="rowStyler"}return t.prototype.createTarget=function(){return this.target=I("\u884c\u6837\u5f0f\u51fd\u6570",'<code>function(value,options){</code><textarea placeholder="return {}" class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),le=function(){function t(){this.name="align"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5355\u5143\u683c\u5de6\u53f3\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="left" >\u5c45\u5de6</option><option value="center" >\u5c45\u4e2d</option><option value="right" >\u5c45\u53f3</option><option value="justify" >\u4e24\u7aef\u5bf9\u9f50</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ue=function(){function t(){this.name="vAlign"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u5355\u5143\u683c\u4e0a\u4e0b\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="top" >\u4e0a</option><option value="middle" >\u4e2d</option><option value="bottom" >\u4e0b</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),de=function(){function t(){this.name="halign"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u5934\u5355\u5143\u683c\u5de6\u53f3\u5bf9\u9f50</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="">\u9ed8\u8ba4</option><option value="left" >\u5c45\u5de6</option><option value="center" >\u5c45\u4e2d</option><option value="right" >\u5c45\u53f3</option><option value="justify" >\u4e24\u7aef\u5bf9\u9f50</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),he=function(){function t(){this.name="styler2"}return t.prototype.createTarget=function(){return this.target=I("\u5355\u5143\u683c\u6837\u5f0f\u51fd\u6570","<code>function(value,row,index,options){</code><textarea placeholder='return {}' class=\"auto-submit\"></textarea><code>}</code>"),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),ce=function(){function t(){this.name="stylerHeader"}return t.prototype.createTarget=function(){return this.target=I("\u8868\u683c\u5934\u6837\u5f0f\u51fd\u6570","<code>function(options){</code><textarea placeholder='return {}' class=\"auto-submit\"></textarea><code>}</code>"),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),fe=function(){function t(){this.name="formatter2"}return t.prototype.createTarget=function(){return this.target=I("\u5355\u5143\u683c\u683c\u5f0f\u5316\u51fd\u6570","<code>function(value,row,index,options){</code><textarea placeholder='return value' class=\"auto-submit\"></textarea><code>}</code>"),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),ge=function(){function t(){this.name="renderFormatter"}return t.prototype.createTarget=function(){return this.target=I("\u5355\u5143\u683c\u6e32\u67d3\u51fd\u6570",'<code>function(value,row,colIndex,options,rowIndex){</code><textarea placeholder=\'return "<td></td>"\' class="auto-submit"></textarea><code>}</code>'),this.target},t.prototype.getValue=function(){var t=this.target.find("textarea").val();if(t)return t},t.prototype.setValue=function(t){this.target.find("textarea").val(t?t.toString():null)},t.prototype.destroy=function(){this.target.remove()},t}(),me=function(){function t(){this.name="autoCompletion"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u81ea\u52a8\u8865\u5168</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="true" >\u662f</option><option value="false" >\u5426</option></select></div></div>'),this.target},t.prototype.getValue=function(){if("true"==this.target.find("select").val())return!0},t.prototype.setValue=function(t){this.target.find("select").val((null==t?"":t).toString())},t.prototype.destroy=function(){this.target.remove()},t}(),ve=function(){function t(){this.name="maxRows"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u6bcf\u9875\u6700\u5927\u884c\u6570</div><div class="hiprint-option-item-field"><input type="number" value="1" step="1" min="1" class="auto-submit"/></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("input").val();if(t)return parseInt(t.toString())},t.prototype.setValue=function(t){this.target.find("input").val(t)},t.prototype.destroy=function(){this.target.remove()},t}(),ye=function(){function t(){this.name="tableFooterRepeat"}return t.prototype.createTarget=function(){return this.target=p()('<div class="hiprint-option-item"><div class="hiprint-option-item-label">\u8868\u683c\u811a\u663e\u793a</div><div class="hiprint-option-item-field"><select class="auto-submit"><option value="" >\u9ed8\u8ba4</option><option value="no" >\u4e0d\u663e\u793a</option><option value="page" >\u6bcf\u9875\u663e\u793a</option><option value="last" >\u6700\u540e\u663e\u793a</option></select></div></div>'),this.target},t.prototype.getValue=function(){var t=this.target.find("select").val();if(t)return t.toString()},t.prototype.setValue=function(t){this.target.find("select").val(t)},t.prototype.destroy=function(){this.target.remove()},t}();n.d(e,"a",(function(){return be}));var be=function(){function t(){}return t.init=function(){t.printElementOptionItems||(t.printElementOptionItems={},t._printElementOptionItems.forEach((function(e){t.printElementOptionItems[e.name]=e})))},t.registerItem=function(e){if(!e.name)throw new Error("styleItem must have name");t.init(),t.printElementOptionItems[e.name]=e},t.getItem=function(e){return t.init(),t.printElementOptionItems[e]},t._printElementOptionItems=[new o,new r,new a,new s,new i,new l,new u,new Rt,new d,new h,new c,new v,new y,new b,new T,new f,new g,new w,new E,new x,new C,new H,new L,new k,new M,new _,new B,new N,new A,new V,new z,new j,new Y,new G,new $,new W,new q,new X,new U,new K,new J,new Q,new Z,new tt,new et,new nt,new it,new ot,new rt,new Yt,new at,new st,new pt,new lt,new ut,new ht,new dt,new ct,new ft,new gt,new mt,new vt,new bt,new yt,new Tt,new wt,new Et,new xt,new Pt,new St,new Ot,new Ft,new $t,new Gt,new qt,new Xt,new Ut,new Kt,new Jt,new Qt,new Zt,new ne,new te,new ee,new ie,new oe,new re,new ae,new se,new pe,new le,new de,new ue,new he,new ce,new ge,new fe,new me,new ve,new ye,new kt,new Ht,new Lt,new Dt,new Mt,new _t,new Bt,new Wt,new Nt,new At,new zt,new Vt,new jt,new F,new R,new Ct,new P,new S,new O],t}()},function(t,e,n){n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return r}));var i=n(14),o=function(){function t(t,e){this.selectedCells=[],this.rows=t,this.tableTatget=e}return t.prototype.clear=function(){this.tableTatget.find("td").removeClass("selected")},t.prototype.setSingleSelect=function(t){this.startCell=t,this.selectedCells=[]},t.prototype.getSingleSelect=function(){if(this.selectedCells.length){if(1==this.selectedCells.length)return 1==this.selectedCells[0].length?this.selectedCells[0][0]:void 0;if(this.selectedCells.length>1)return}return this.startCell},t.prototype.singleSelectByXY=function(t,e){var n=this.getCellByXY(t,e);n&&(this.clear(),n&&(n.cell.select(),this.startCell=n,this.selectedCells=[]))},t.prototype.multipleSelectByXY=function(t,e){this.clear();var n=[];if(this.startCell){var o=this.getCellByXY(t,e);if(o){var r=i.a.mergeRect(this.startCell.cell.getTableRect(),o.cell.getTableRect());this.selectByRect(new a(r),n)}}this.selectedCells=n},t.prototype.selectByRect=function(t,e){this.rows.forEach((function(n,i){var o=[];n.columns.forEach((function(e){e.isInRect(t)&&(o.push(new s(i,e)),e.select())})),o.length&&e.push(o)})),t.changed&&(t.changed=!1,e.splice(0,e.length),this.selectByRect(t,e))},t.prototype.getSelectedCells=function(){return this.selectedCells},t.prototype.getCellByXY=function(t,e){var n;return this.rows.forEach((function(i,o){var r=(i.columns||[]).filter((function(t){return t.checked})).filter((function(n){return n.isXYinCell(t,e)}));r.length&&(n=new s(o,r[0]))})),n},t}(),r=function(t){this.x=t.x,this.y=t.y,this.height=t.height,this.width=t.width},a=function(t){this.rect=t},s=function(t,e){this.rowIndex=t,this.cell=e}},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(){function t(){}return t.createId=function(){return this.id+=1,this.id},t.id=1,t}()},function(t,e,n){n.d(e,"a",(function(){return s}));var i,o=n(5),r=n(13),a=(i=function(t,e){return(i=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e){var n=t.call(this)||this;return n.columns=[],e&&e.constructor===Array?(e||[]).forEach((function(t){n.columns.push(new o.a(t))})):e.columns&&(e.columns||[]).forEach((function(t){n.columns.push(new o.a(t))})),n}return a(e,t),e.prototype.getPrintElementOptionEntity=function(){var t=[],e=this.allColumns?this.allColumns.filter((function(t){return!t.checked})):[];return[...this.columns,...e].forEach((function(e){t.push(e.getEntity())})),t},e}(r.a)},function(t,e,n){n.d(e,"a",(function(){return r}));var i=n(11),o=n(5),r=function(){function t(){this.id=i.a.createId()}return t.prototype.init=function(t,e,n){this.isHead=n,this.target=e||p()("<tr></tr>"),this.tableOptions=t,this.allColumns=this.columns||[],this.initCells((this.columns||[]).filter((function(t){return t.checked})))},t.prototype.getTarget=function(){return this.target},t.prototype.initCells=function(t){var e=this;t?(this.columns=t,t.forEach((function(t,n){t.init(e.target.find("td:eq("+n+")"),e.tableOptions,e.id,e.isHead)}))):(this.columns=[],this.target.find("td").map((function(t,n){var i=new o.a;i.init(p()(n),e.tableOptions,e.id,e.isHead),e.columns.push(i)})))},t.prototype.removeCell=function(t){var e=this.columns.indexOf(t);this.columns[e].getTarget().remove(),this.columns.splice(e,1)},t.prototype.createTableCell=function(t,e){var n=new o.a;return n.init(p()("<td></td>"),this.tableOptions,this.id,this.isHead),t>1&&(n.getTarget().attr("rowspan",t),n.rowspan=t),e>1&&(n.getTarget().attr("colspan",e),n.colspan=e),n},t.prototype.insertToTargetCellLeft=function(t,e){var n=this.columns.indexOf(t);t.getTarget().before(e.getTarget()),this.columns.splice(n,0,e)},t.prototype.insertToTargetCellRight=function(t,e){var n=this.columns.indexOf(t);this.columns[n].getTarget().after(e.getTarget()),this.columns.splice(n+1,0,e)},t.prototype.insertCellToFirst=function(t){this.target.prepend(t.getTarget()),this.columns.splice(0,0,t)},t.prototype.insertCellToLast=function(t){this.columns.push(t),this.target.append(t.getTarget())},t.prototype.getPrintElementOptionEntity=function(){var t=[];return[...this.columns,...this.allColumns.filter((function(t){return!t.checked}))].forEach((function(e){t.push(e.getEntity())})),t},t}()},function(t,e,n){n.d(e,"a",(function(){return o}));var i=n(10),o=function(){function t(){}return t.mergeRect=function(t,e){var n=Math.min(t.x,e.x),o=Math.min(t.y,e.y);return new i.b({x:n,y:o,height:Math.max(t.y+t.height,e.y+e.height)-o,width:Math.max(t.x+t.width,e.x+e.width)-n})},t.Rect=function(t,e,n,i){return{minX:t<n?t:n,minY:e<i?e:i,maxX:t<n?n:t,maxY:e<i?i:e}},t}()},function(t,e,n){n.d(e,"a",(function(){return m}));var i,o=n(4),r=n(1),a=n(6),s=n(0),l=n(8),u=n(18),d=n(7),h=n(16),c=n(20),f=n(2),g=(i=function(t,e){return(i=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),m=function(t){function e(e,n){var i=t.call(this,e)||this;return i.gridColumnsFooterCss="hiprint-gridColumnsFooter",i.tableGridRowCss="table-grid-row",i.options=new u.a(n,i.printElementType),i.options.setDefault(new u.a(r.a.instance.table.default).getPrintElementOptionEntity()),i}return g(e,t),e.prototype.getColumns=function(){return this.options.columns},e.prototype.getColumnByColumnId=function(t){return this.options.getColumnByColumnId(t)},e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.designTarget.find(".hiprint-printElement-table-content"),e=this.getHtml(this.designPaper);t.html(""),t.append(e[0].target.find(".table-grid-row")),this.printElementType.editable&&this.setHitable(),this.setColumnsOptions(),this.css(this.designTarget,this.getData())}},e.prototype.css=function(e,n){if((this.getField()||!this.options.content)&&!this.printElementType.formatter)return t.prototype.css.call(this,e,n)},e.prototype.getDesignTarget=function(t){return this.designTarget=this.getHtml(t)[0].target,this.css(this.designTarget,this.getData()),this.designPaper=t,this.designTarget.find("td").hidroppable({accept:".rn-draggable-item",onDrop:function(t,e){},onDragEnter:function(t,e){p()(e).removeClass("rn-draggable-item")},onDragLeave:function(t,e){p()(e).addClass("rn-draggable-item")}}),this.designTarget},e.prototype.getConfigOptions=function(){return r.a.instance.table},e.prototype.createTarget=function(t,e,n){for(var i=p()('<div class="hiprint-printElement hiprint-printElement-table" style="position: absolute;"><div class="hiprint-printElement-table-handle"></div><div class="hiprint-printElement-table-content" style="height:100%;width:100%"></span></div>'),o=this.createGridColumnsStructure(n),r=0;r<o.gridColumns;r++)o.getByIndex(r).append(this.getTableHtml(e,n));return i.find(".hiprint-printElement-table-content").append(o.target),i},e.prototype.createGridColumnsStructure=function(t){for(var e=p()('<div class="hi-grid-row table-grid-row"></div>'),n=0;n<this.options.getGridColumns();n++){var i=p()('<div class="tableGridColumnsGutterRow hi-grid-col" style="width:'+100/this.options.getGridColumns()+'%;"></div>');e.append(i)}var o=this.getGridColumnsFooterFormatter();if(o){var r=p()('<div class="hiprint-gridColumnsFooter"></div>');r.append(o(this.options,this.getData(t),t,[])),e.append(r)}return new c.a(this.options.getGridColumns(),e)},e.prototype.createtempEmptyRowsTargetStructure=function(t){if(this.getField())return this.createTarget(this.printElementType.title,[]);var e=this.createTarget(this.printElementType.title,[]).clone();return e.find(".hiprint-printElement-tableTarget tbody tr").remove(),e},e.prototype.getTableHtml=function(t,e){var n,i;if(!this.getField()&&this.options.content)return(n=p()("<div></div>")).append(this.options.content),(i=n.find("table")).addClass("hiprint-printElement-tableTarget"),i;if(this.printElementType.formatter)return(n=p()("<div></div>")).append(this.printElementType.formatter(t)),(i=n.find("table")).addClass("hiprint-printElement-tableTarget"),i;var o=p()('<table class="hiprint-printElement-tableTarget" style="border-collapse: collapse;"></table>');let r=d.a.createTableHead(this.getColumns(),this.options.getWidth()/this.options.getGridColumns());return this.isNotDesign?o.append(r):o.append(r[0]),o.append(d.a.createTableRow(this.getColumns(),t,e,this.options,this.printElementType)),"no"==this.options.tableFooterRepeat||d.a.createTableFooter(this.printElementType.columns,t,this.options,this.printElementType,e,t).insertBefore(o.find("tbody")),o},e.prototype.getEmptyRowTarget=function(){return d.a.createEmptyRowTarget(this.getColumns(),this)},e.prototype.getHtml=function(t,e){this.createTempContainer(),this.isNotDesign=null!=e;var n=this.getPaperHtmlResult(t,e);return this.removeTempContainer(),n},e.prototype.getPaperHtmlResult=function(t,e){var n=[],i=this.getData(e),o=this.getTableHtml(i,e),r=this.createtempEmptyRowsTargetStructure(e);e?this.updateTargetWidth(r):this.updateTargetSize(r),this.css(r,i),this.css(o,i),this.getTempContainer().html(""),this.getTempContainer().append(r);var s=r.find("tfoot").outerHeight()||0;r.find("tfoot").remove();for(var u,d=this.getBeginPrintTopInPaperByReferenceElement(t),h=0,c=!1;!c;){var f=0,g=t.getPaperFooter(h);0==h&&d>g&&"none"!=t.panelPageRule&&(d=d-g+t.paperHeader,n.push(new a.a({target:void 0,printLine:void 0})),f=t.getContentHeight(h)-(d-t.paperHeader),h++,g=t.getPaperFooter(h));var m=n.length>0?n[n.length-1].target:void 0,v=this.getRowsInSpecificHeight(e,f>0?f:0==h?g-d:t.getContentHeight(h),r,o,h,m,s);if(c=v.isEnd,f<0){n[0].target=p()('<div style="position:absolute;background: red;color: white;padding: 0px 4px;">\u6ca1\u6709\u8db3\u591f\u7a7a\u95f4\u8fdb\u884c\u8868\u683c\u5206\u9875\uff0c\u8bf7\u8c03\u6574\u9875\u7709/\u9875\u811a\u7ebf</div>'),n[0].printLine=d,n[0].referenceElement=new l.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:d+this.options.lHeight,printTopInPaper:d}),n[0].target.css("top",d+"pt"),n[0].target.css("left",this.options.displayLeft());break}var y=void 0;v.target&&(v.target.css("left",this.options.displayLeft()),v.target[0].height=""),0==h||f>0?(v.target&&(u=d,v.target.css("top",d+"pt")),y=c&&null!=this.options.lHeight?d+(v.height>this.options.lHeight?v.height:this.options.lHeight):d+v.height):(v.target&&(u=t.paperHeader,v.target.css("top",t.paperHeader+"pt")),y=t.paperHeader+v.height),n.push(new a.a({target:v.target,printLine:y,referenceElement:new l.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:y,printTopInPaper:u})})),h++,e&&this.updatePanelHeight(y+this.options.getHeight(),t)}return n},e.prototype.getRowsInSpecificHeight=function(t,e,n,i,o,r,a){var l=this,u=i.find("tbody"),h=s.a.pt.toPx(e);n.find(".hiprint-printElement-tableTarget tbody").html(""),"last"!=this.options.tableFooterRepeat&&n.find(".hiprint-printElement-tableTarget tfoot").remove(),"first"==this.options.tableHeaderRepeat&&o>0?n.find(".hiprint-printElement-tableTarget thead").remove():"none"==this.options.tableHeaderRepeat&&(t?n.find(".hiprint-printElement-tableTarget thead").remove():(n.find(".hiprint-printElement-tableTarget thead").css("background","firebrick"),n.find(".hiprint-printElement-tableTarget thead tr").css("background","firebrick")));var c,f="none"==this.panel.panelPageRule;if(t&&f){var g=n.find(".hiprint-printElement-tableTarget thead").attr("style");c=n.find(".hiprint-printElement-tableTarget thead tr").clone(),g?c.attr("style",g):c.css({background:"#e8e8e8"}),n.find(".hiprint-printElement-tableTarget thead").remove()}var m=n.outerHeight();if(!f&&m>h)return{target:void 0,length:0,height:0,isEnd:!1};for(var v=this.options.getGridColumns(),y=[],b=0;b<v;b++)for(var T=n.find(".hiprint-printElement-tableTarget:eq("+b+")"),w=void 0,E=[];;){if(f){var x=u.find("tr").length;if(0==x)w={height:s.a.px.toPt(m),isEnd:!0},t&&this.options.autoCompletion&&(this.autoCompletion(h,T,a),m=n.outerHeight());else{var C=u.find("tr:lt(1)");0==E.length&&c&&T.find("tbody").append(c),T.find("tbody").append(C);var P=C.data("rowData");y.push(P),E.push(P),m=n.outerHeight(),0==x&&(u.prepend(C),y.pop(),E.pop(),w={height:s.a.px.toPt(m),isEnd:!1})}}else if(m<=h)if(0==u.find("tr").length)w={height:s.a.px.toPt(m),isEnd:!0},t&&this.options.autoCompletion&&(this.autoCompletion(h,T,a),m=T.outerHeight());else{C=u.find("tr:lt(1)");l.options.rowsColumnsMerge&&(o>0||b>0)&&0==E.length&&(C=l.fixMergeSpan(C,u)),T.find("tbody").append(C);P=C.data("rowData");y.push(P),E.push(P),m=T.outerHeight(),(("last"==this.options.tableFooterRepeat?m:m+=a)>h||this.options.maxRows&&E.length>+this.options.maxRows)&&(u.prepend(C),y.pop(),E.pop(),m=T.outerHeight(),w={height:s.a.px.toPt(m),isEnd:!1})}if(w){if("last"==this.options.tableFooterRepeat&&!w.isEnd)break;"no"!==this.options.tableFooterRepeat&&(f?T.find("tbody").append(d.a.createTableFooter(this.printElementType.columns,this.getData(t),this.options,this.printElementType,t,E,o).children()):d.a.createTableFooter(this.printElementType.columns,this.getData(t),this.options,this.printElementType,t,E,o).insertBefore(T.find("tbody")),l.css(T,t));break}}var S=n.find(".hiprint-printElement-tableTarget tbody tr").length,O=this.getGridColumnsFooterFormatter();O&&n.find(this.gridColumnsFooterCss).html(O(this.options,this.getData(t),t,y)),m=n.outerHeight();let I=u.find("tr:lt(1)");if(0==S&&I.length&&P==I.data("rowData")){T.find("tbody").append(I);let t=T.find("tbody tr").outerHeight();return u.prepend(I),{target:p()('<div style="position:absolute;background: red;color: white;padding: 0px 4px;">\u6ca1\u6709\u8db3\u591f\u7a7a\u95f4,\u663e\u793a\u4e0b\u65b9\u5185\u5bb9, \u53ef\u5206\u9875\u9ad8\u5ea6: '+h+"px < \u5f53\u524d\u9700\u8981\u9ad8\u5ea6: "+t+"px</div>").append(I.css("background","blue")),length:S,height:s.a.px.toPt(m),isEnd:!1}}return 0==u.find("tr").length?0==S&&r?{target:void 0,length:0,height:0,isEnd:!0}:{target:n.clone(),length:S,height:s.a.px.toPt(m),isEnd:!0}:{target:n.clone(),length:S,height:s.a.px.toPt(m),isEnd:!1}},e.prototype.fixMergeSpan=function(t,e){const n=new Map;return t.children().each(((e,i)=>{var o=p()(i).attr("field");n.set(o,{rowSpan:1,rowEnd:!1}),t.nextAll().each(((t,e)=>{p()(e).has(`td[field=${o}][rowspan=0]`).length&&!n.get(o).rowEnd?n.set(o,{rowSpan:++n.get(o).rowSpan,rowEnd:!1}):n.set(o,{...n.get(o),rowEnd:!0})})),p()(i).attr("rowspan")<1&&(p()(i).attr("rowspan",n.get(o).rowSpan),p()(i).css("display",""),this.options.rowsColumnsMergeClean&&p()(i).text(""))})),t},e.prototype.autoCompletion=function(t,e,n){for(var i,o=this.getEmptyRowTarget(),r=e.outerHeight()+n;t>r&&(i=o.clone(),e.find("tbody").append(i),r=e.outerHeight()+n,!(this.options.maxRows&&e.find("tbody").children().length>this.options.maxRows)););i&&i.remove()},e.prototype.getData=function(t){if(!t)try{let t=this.options.testData||"[{}]";return JSON.parse(t)}catch(n){return console.log("table testData parse error",n),[{}]}var e=this.getField(),n=e&&e.split(".").reduce(((e,n)=>e?e[n]:t?t[n]:""),!1)||"";return n?JSON.parse(JSON.stringify(n)):[]},e.prototype.onResize=function(e,n,i,o,r){t.prototype.updateSizeAndPositionOptions.call(this,r,o,i,n),d.a.resizeTableCellWidth(this.designTarget,this.getColumns(),this.options.getWidth())},e.prototype.getReizeableShowPoints=function(){return["s","e"]},e.prototype.design=function(t,e){var n=this;this.designTarget.hidraggable({handle:this.designTarget.find(".hiprint-printElement-table-handle"),axis:n.options.axis?n.options.axis:void 0,designTarget:n,onDrag:function(t,i,o){n.updateSizeAndPositionOptions(i,o),n.createLineOfPosition(e),f.a.instance.changed=!0},moveUnit:"pt",minMove:r.a.instance.movingDistance,onBeforeDrag:function(t){f.a.instance.draging=!0,n.createLineOfPosition(e)},getScale:function(){return n.designPaper.scale||1},onStopDrag:function(t){f.a.instance.changed&&s.a.event.trigger("hiprintTemplateDataChanged_"+n.templateId,"\u79fb\u52a8"),f.a.instance.draging=!1,f.a.instance.changed=!1,n.removeLineOfPosition()}}),this.printElementType.editable&&this.setHitable(),this.setColumnsOptions(),this.designTarget.hireizeable({showPoints:n.getReizeableShowPoints(),showSizeBox:r.a.instance.showSizeBox,noContainer:!0,onBeforeResize:function(){f.a.instance.draging=!0},getScale:function(){return n.designPaper.scale||1},onResize:function(t,i,o,r,a){n.onResize(t,i,o,r,a),n.hitable&&n.hitable.updateColumnGrips(),n.createLineOfPosition(e)},onStopResize:function(t){s.a.event.trigger("hiprintTemplateDataChanged_"+n.templateId,t?"\u65cb\u8f6c":"\u5927\u5c0f"),f.a.instance.draging=!1,n.removeLineOfPosition()}}),this.bingKeyboardMoveEvent(this.designTarget,e)},e.prototype.setHitable=function(){var t=this;this.hitable=new h.a({templateId:t.templateId,table:this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)"),rows:this.getColumns(),resizeRow:!1,resizeColumn:!0,fields:this.options.fields,trs:this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("tbody tr"),handle:this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead"),isEnableEdit:!this.printElementType.editable||this.printElementType.editable,columnDisplayEditable:null==this.printElementType.columnDisplayEditable||this.printElementType.columnDisplayEditable,columnDisplayIndexEditable:null==this.printElementType.columnDisplayIndexEditable||this.printElementType.columnDisplayIndexEditable,columnResizable:null==this.printElementType.columnResizable||this.printElementType.columnResizable,columnAlignEditable:null==this.printElementType.columnAlignEditable||this.printElementType.columnAlignEditable,isEnableEditText:null==this.printElementType.columnTitleEditable||this.printElementType.columnTitleEditable,isEnableEditField:null==this.printElementType.isEnableEditField||this.printElementType.isEnableEditField,isEnableContextMenu:null==this.printElementType.isEnableContextMenu||this.printElementType.isEnableContextMenu,isEnableInsertRow:null==this.printElementType.isEnableInsertRow||this.printElementType.isEnableInsertRow,isEnableDeleteRow:null==this.printElementType.isEnableDeleteRow||this.printElementType.isEnableDeleteRow,isEnableInsertColumn:null==this.printElementType.isEnableInsertColumn||this.printElementType.isEnableInsertColumn,isEnableDeleteColumn:null==this.printElementType.isEnableDeleteColumn||this.printElementType.isEnableDeleteColumn,isEnableMergeCell:null==this.printElementType.isEnableMergeCell||this.printElementType.isEnableMergeCell}),s.a.event.on("updateTable"+this.hitable.id,(function(){t.updateDesignViewFromOptions(),s.a.event.trigger("hiprintTemplateDataChanged_"+t.templateId,"\u8c03\u6574\u8868\u5934")}))},e.prototype.setColumnsOptions=function(){var t=this;this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead td").bind("click.hiprint",(function(e){var n=p()(e.target).attr("id")||p()(e.target).attr("column-id"),i=t.getColumnByColumnId(n);if(i){var o=t.getPrintElementOptionItemsByName("tableColumn");s.a.event.trigger(t.getPrintElementSelectEventKey(),{printElement:t,customOptionsInput:[{title:(i.title||`${i.id}(id)`)+"-\u5217\u5c5e\u6027",optionItems:o,options:i,callback:function(t){o.forEach((function(t){var e=t.getValue();if("title"==t.name&&e&&!e.trim().endsWith("#")&&!e.trim().startsWith("#")){var n=e?e.split("#"):"";return i.title=n[0],n.length>1&&(i.columnId=i.field=n[1]),i.columnId&&i.target.attr("column-id",i.columnId),void t.target.find("textarea").val(n[0])}i[t.name]=e}))}}]})}else s.a.event.trigger(t.getPrintElementSelectEventKey(),{printElement:t})}))},e.prototype.filterOptionItems=function(e){var n=t.prototype.filterOptionItems.call(this,e);return this.printElementType.editable&&1==this.options.columns.length?n:e.filter((function(t){return"columns"!=t.name}))},e.prototype.getFooterFormatter=function(){var t=void 0;if(this.printElementType.footerFormatter&&(t=this.printElementType.footerFormatter),this.options.footerFormatter)try{t=new Function("options","rows","data","pageData","pageIndex",`data = data || {}; ${this.options.footerFormatter}`)}catch(t){console.log(t)}return t},e.prototype.getGridColumnsFooterFormatter=function(){var t=void 0;if(this.printElementType.gridColumnsFooterFormatter&&(t=this.printElementType.gridColumnsFooterFormatter),this.options.gridColumnsFooterFormatter)try{gridColumnsFooterFormatter=new Function("options","rows","data","pageData",`data = data || {}; ${this.options.gridColumnsFooterFormatter}`)}catch(t){console.log(t)}return t},e}(o.a)},function(t,e,n){var i=function(t){this.table=t.table,this.templateId=t.templateId,this.fields=t.fields,this.isEnableEdit=t.isEnableEdit,this.trs=t.trs,this.resizeRow=t.resizeRow,this.resizeColumn=t.resizeColumn,this.isEnableEditField=t.isEnableEditField,this.isEnableContextMenu=t.isEnableContextMenu,this.isEnableEditField=t.isEnableEditField,this.isEnableInsertRow=t.isEnableInsertRow,this.isEnableDeleteRow=t.isEnableDeleteRow,this.isEnableInsertColumn=t.isEnableInsertColumn,this.isEnableDeleteColumn=t.isEnableDeleteColumn,this.isEnableMergeCell=t.isEnableMergeCell,this.columnResizable=t.columnResizable,this.columnAlignEditable=t.columnAlignEditable},o=function(){function t(t){this.options=new i(t)}return t.prototype.enableEidt=function(){this.options.isEnableEdit},t.prototype.disableEdit=function(){this.options.isEnableEdit},t.prototype.isEnableEdit=function(){return this.options.isEnableEdit},t}(),r=n(0),a=function(t){this.cell=t.cell,this.link=t.link,this.linkType=t.linkType,this.bottom=t.bottom,this.rightMost=t.rightMost,this.rowLevel=t.rowLevel,this.columnLevel=t.columnLevel,this.indexInTableGridRow=t.indexInTableGridRow,this.indexInTableGridColumn=t.indexInTableGridColumn},s=n(10),l=function(){function t(){}return t.getLeftTableCell=function(t,e){var n;return t.forEach((function(t,i){t.cell&&i<e&&(n=t.cell)})),n},t.getIndex=function(t,e){var n;return t.forEach((function(t,i){t.cell&&t.cell.id==e&&(n=i)})),n},t}(),u=n(13),d=n(11),h=function(t,e){this.target=t,this.grips=e},c=function(t){this.target=t},f=function(){this.rowColumns=[]},g=function(){function t(){}return t.getColumnsWidth=function(e,n){var i={},o=t.allAutoWidth(e);return e.rowColumns.forEach((function(t){var e=n-0,r=t.width/o*(e>0?e:0);i[t.id]=r})),i},t.resizeTableCellWeight=function(t){t.forEach((function(t){t.columns.forEach((function(t){t.hasWidth&&p()(t.getTarget()).css("width",t.width+"pt")}))}))},t.allAutoWidth=function(t){var e=0;return t.rowColumns.forEach((function(t){e+=t.width})),e},t.reconsitutionTableColumnTree=function(t,e,n){for(var i=e||new f,o=function(e){i.totalLayer=e+1,i[e]=t[e].columns,i.rowColumns=i.rowColumns.concat(i[e].filter((function(n){return n.rowspan==t.length-e})))},r=0;r<t.length;r++)o(r);return i},t}(),m=n(2),v=function(){function t(t){this.signature="HiTresizer",this.hitable=t,this.rows=t.rows,this.target=t.target}return t.prototype.init=function(){this.addResizeRowAndColumn(),this.hitable.optionsCoat.options.resizeColumn&&this.createColumnGrips(),this.hitable.optionsCoat.options.resizeRow&&this.createRowGrips()},t.prototype.resizeTableCellWidth=function(){g.resizeTableCellWeight(this.rows)},t.prototype.addResizeRowAndColumn=function(){},t.prototype.createColumnGrips=function(){var t=this,e=this,n=[],i=p()('<div class="columngrips"/>');i.width(this.target.width()),this.rows.forEach((function(o){(o.columns||[]).filter((function(t){return t.checked})).forEach((function(o,a){if(o.getTarget().attr("haswidth")){var s=p()('<div class="columngrip"><div class="gripResizer"></div></div>');i.append(s);var l=new c(s);n.length>0&&(n[n.length-1].nextGrip=l),n.push(l),t.syncGrips(o,l),p()(s).hidraggable({axis:"h",onDrag:function(t,e,n){},moveUnit:"pt",minMove:1,getScale:function(){return p()(".hiprint-printPaper")[0].style.transform&&parseFloat(p()(".hiprint-printPaper")[0].style.transform.slice(6,-1))||1},onBeforeDrag:function(t){if(m.a.instance.draging=!0,!l.nextGrip)return!1;e.dragingGrip=l,e.dragingGrip.left=parseFloat(e.dragingGrip.target.css("left").replace("px","")),l.target.addClass("columngripDraging")},onStopDrag:function(n){m.a.instance.draging=!1;var i=parseFloat(e.dragingGrip.target.css("left").replace("px","")),o=r.a.px.toPt(i-e.dragingGrip.left);l.cell.width+o<10?o=10-l.cell.width:l.nextGrip.cell.width-o<10&&(o=l.nextGrip.cell.width-10),l.cell.width=l.cell.width+o,l.nextGrip.cell.width=l.nextGrip.cell.width-o,t.resizeTableCellWidth(),l.target.removeClass("columngripDraging"),e.updateColumnGrips()}})}}))})),this.target.before(i),this.cgripContariner=new h(i,n)},t.prototype.updateColumnGrips=function(){this.cgripContariner&&(this.cgripContariner.target.remove(),this.createColumnGrips())},t.prototype.updateRowGrips=function(){this.rgripContariner&&(this.rgripContariner.target.remove(),this.createRowGrips())},t.prototype.createRowGrips=function(){var t=this,e=this,n=[],i=p()('<div class="rowgrips"/>');this.rows.forEach((function(o,a){var s=p()('<div class="rowgrip"><div class="gripResizer"></div></div>');i.append(s);var l=new c(s);n.push(l),a>0&&a<t.rows.length&&p()(s).hidraggable({axis:"v",onDrag:function(t,e,n){},moveUnit:"pt",minMove:1,onBeforeDrag:function(t){e.dragingGrip=l,e.dragingGrip.top=parseFloat(e.dragingGrip.target.css("top").replace("px","")),l.target.addClass("rowgripDraging")},onStopDrag:function(t){var n=parseFloat(e.dragingGrip.target.css("top").replace("px","")),i=r.a.px.toPt(n-e.dragingGrip.top+e.rows[a].columns[0].getTarget().height());e.rows[a].columns[0].getTarget().css("height",i+"pt"),e.syncRowGrips(),l.target.removeClass("rowgripDraging")}})})),this.target.before(i),this.rgripContariner=new h(i,n),this.syncRowGrips()},t.prototype.syncGrips=function(t,e){var n=t.getTarget(),i=p()(".hiprint-printPaper")[0].style.transform&&parseFloat(p()(".hiprint-printPaper")[0].style.transform.slice(6,-1))||1;e.cell=t,e.target.css({left:n.offset().left/i-this.target.offset().left/i+n.outerWidth(!1),height:30})},t.prototype.syncRowGrips=function(){var t=this;this.rgripContariner.target.height(this.target.height()),this.rows.forEach((function(e,n){var i=e.columns[0].getTarget();t.rgripContariner.grips[n].target.css({top:i.offset().top-t.target.offset().top+i.outerHeight(!1),width:30})}))},t.prototype.addResizerHeadRow=function(){this.target.find("thead").prepend()},t}(),y=function(){function t(){}return t.prototype.init=function(){},t.prototype.updateRowGrips=function(){},t.prototype.updateColumnGrips=function(){},t}();n.d(e,"a",(function(){return b}));var b=function(){function t(t){this.id=d.a.createId(),this.optionsCoat=new o(t),this.handle=t.handle,this.target=t.table,this.initRows(t.rows),this.init(t),this.tableCellSelector=new s.a(this.rows,this.target),this.resizer=this.optionsCoat.options.columnResizable?new v(this):new y,this.resizer.init()}return t.prototype.insertRow=function(t,e,n){var i=e||this.tableCellSelector.getSingleSelect(),o=i.cell,a=this.rows[i.rowIndex],s=i.rowIndex,p=this.getCellGrid(),l=new u.a;if(l.init(this.optionsCoat,void 0,a.isHead),n&&l.getTarget().addClass(n),"above"==t)p[s].forEach((function(t){var e=t.link?t.link:t.cell,n=e.width/e.colspan;if(0==t.columnLevel){var i=l.createTableCell();i.width=n,l.insertCellToLast(i)}else{if("column"==t.linkType){var o=t.link.getTarget();t.link.rowspan+=1,o.attr("rowspan",t.link.rowspan)}t.linkType}})),this.rows.splice(s,0,l),a.getTarget().before(l.getTarget()),r.a.event.trigger("newRow"+this.id,l);else{var d=s+o.rowspan-1;p[d].forEach((function(t){var e=t.link?t.link:t.cell,n=e.width/e.colspan;if(t.bottom){var i=l.createTableCell();i.width=n,l.insertCellToLast(i)}else{if(t.cell){var o=t.cell.getTarget();t.cell.rowspan+=1,o.attr("rowspan",t.cell.rowspan)}"column"==t.linkType&&(o=t.link.getTarget(),t.link.rowspan+=1,o.attr("rowspan",t.link.rowspan))}})),this.rows.splice(d+1,0,l),this.rows[d].getTarget().after(l.getTarget()),r.a.event.trigger("newRow"+this.id,l)}},t.prototype.insertColumn=function(t,e,n,i){var o=this,a=this.rows.concat(this.trRows),s=e||this.tableCellSelector.getSingleSelect(),p=s.cell,l=s.rowIndex,u=this.getCellGrid(a),d=u[l].filter((function(t){return t.cell&&t.cell.id==p.id||t.link&&t.link.id==p.id}));if("left"==t){var h=d[0].indexInTableGridRow;u.forEach((function(t,e){var s=t[h],p=t.filter((function(t,e){return e>=h&&t.cell}));if(0==s.rowLevel){var l=a[e],u=a[e].createTableCell();n&&u.getTarget().addClass(n),null!=i&&(u.width=i),p.length?l.insertToTargetCellLeft(p[0].cell,u):l.insertCellToLast(u),r.a.event.trigger("newCell"+o.id,u)}else if("row"==s.linkType){var d=s.link.getTarget();s.link.colspan+=1,d.attr("colspan",s.link.colspan)}}))}else{var c=d[d.length-1].indexInTableGridRow;u.forEach((function(t,e){var s=t[c],p=t.filter((function(t,e){return e<=c&&t.cell}));if(s.rightMost){var l=a[e],u=l.createTableCell();n&&u.getTarget().addClass(n),null!=i&&(u.width=i),p.length?l.insertToTargetCellRight(p[p.length-1].cell,u):l.insertCellToFirst(u),r.a.event.trigger("newCell"+o.id,u)}else{var d=s.link||s.cell;if("row"==s.linkType){var h=d.getTarget();d.colspan+=1,h.attr("colspan",d.colspan)}s.cell&&(h=d.getTarget(),d.colspan+=1,h.attr("colspan",d.colspan))}}))}},t.prototype.deleteRow=function(){var t=this,e=this.tableCellSelector.getSingleSelect(),n=(e.cell,this.rows[e.rowIndex],e.rowIndex),i=this.getCellGrid(),o=this.rows[n];i[n].forEach((function(e,r){if(e.cell)if(1==e.cell.rowspan)o.removeCell(e.cell);else{o.removeCell(e.cell);var a=i[n+1].filter((function(t,e){return t.cell&&e>r})),s=t.rows[n+1],p=s.createTableCell(e.cell.rowspan-1,e.cell.colspan);a.length?s.insertToTargetCellLeft(a[0].cell,p):s.insertCellToLast(p)}else if("column"==e.linkType){var l=e.link;l.rowspan-=1,l.getTarget().attr("rowspan",l.rowspan)}})),o.getTarget().remove(),this.rows.splice(n,1)},t.prototype.deleteColums=function(){var t=this.rows.concat(this.trRows),e=this.tableCellSelector.getSingleSelect(),n=e.cell,i=e.rowIndex,o=this.getCellGrid(t),r=o[i].filter((function(t){return t.cell&&t.cell.id==n.id||t.link&&t.link.id==n.id}))[0].indexInTableGridRow;o.forEach((function(e,n){var i=e[r];i.cell?1==i.cell.colspan?t[n].removeCell(i.cell):(i.cell.colspan-=1,i.cell.getTarget().attr("colspan",i.cell.colspan)):"row"==i.linkType&&(i.link.colspan-=1,i.link.getTarget().attr("colspan",i.link.colspan))}))},t.prototype.mergeCell=function(){var t=this,e=this.tableCellSelector.getSelectedCells();if(0!=e.length){var n=e[0][0].cell;e.forEach((function(i,o){i.forEach((function(i,r){0==o?0!=r&&(n.colspan+=i.cell.colspan,t.rows[i.rowIndex].removeCell(i.cell)):t.rows[i.rowIndex].removeCell(i.cell),0==r&&e[0][0].rowIndex+n.rowspan-1<i.rowIndex&&(n.rowspan+=i.cell.rowspan)}))})),n.getTarget().attr("colspan",n.colspan),n.getTarget().attr("rowspan",n.rowspan),this.tableCellSelector.setSingleSelect(e[0][0])}},t.prototype.splitCell=function(){var t=this.tableCellSelector.getSingleSelect(),e=this.getCellGrid(),n=l.getIndex(e[t.rowIndex],t.cell.id);if(t){for(var i=t.rowIndex;i<t.rowIndex+t.cell.rowspan;i++)for(var o=this.rows[i],r=i==t.rowIndex?t.cell:l.getLeftTableCell(e[i],n),a=0;a<t.cell.colspan;a++)i==t.rowIndex&&0==a||(r?o.insertToTargetCellRight(r,o.createTableCell()):o.insertCellToFirst(o.createTableCell()));t.cell.rowspan=1,t.cell.colspan=1,t.cell.getTarget().attr("colspan",t.cell.colspan),t.cell.getTarget().attr("rowspan",t.cell.rowspan)}},t.prototype.init=function(t){var e=this;p()(this.target).addClass("hitable"),this.optionsCoat.onBeforEdit=function(n){return(!e.optionsCoat.options.onBeforEdit||!1!==t.onBeforEdit(n))&&(e.optionsCoat.editingCell&&e.optionsCoat.editingCell.endEdit(),!0)},p()(this.target).mousedown((function(t){e.optionsCoat.isLeftMouseButtonDown=!0})),p()(this.target).mouseup((function(t){e.optionsCoat.isLeftMouseButtonDown=!1})),this.initContext(),this.target.on("mousemove",(function(t){1===t.buttons&&e.tableCellSelector.multipleSelectByXY(t.pageX,t.pageY)})).on("mousedown",(function(t){1===t.buttons&&e.tableCellSelector.singleSelectByXY(t.pageX,t.pageY)}))},t.prototype.initRows=function(t){var e=this;if(this.trRows=[],t){this.rows=t,t.forEach((function(t,n){t.init(e.optionsCoat,e.target.find("tr:eq("+n+")"),!0)}));var n=this.optionsCoat.options.trs;n&&this.initRowsByTrs(n).forEach((function(t){e.trRows.push(t)}))}else this.rows=this.initRowsByTrs(this.target.find("tr"))},t.prototype.initRowsByTrs=function(t){var e=this;return t.map((function(t,n){var i=new u.a;return i.init(e.optionsCoat,p()(n)),i})).get()},t.prototype.enableEidt=function(){this.optionsCoat.enableEidt()},t.prototype.disableEdit=function(){this.optionsCoat.disableEdit()},t.prototype.getCellGrid=function(t){var e=t||this.rows,n=this.getColumnStep(),i=new Array;return e.forEach((function(t,e){t.columns.forEach((function(t,o){for(var r=0;r<t.colspan;r++)for(var s=0,p=!1;s<n&&!p;){if(i[e]=i[e]||[],i[e][s]);else{i[e][s]=new a({cell:0==r?t:void 0,link:0!=r?t:void 0,linkType:r>0?"row":void 0,rightMost:r==t.colspan-1||void 0,bottom:0==t.rowspan-1,rowLevel:r,columnLevel:0,indexInTableGridRow:s,indexInTableGridColumn:e});for(var l=e+1,u=1;u<t.rowspan;u++)i[l]=i[l]||[],i[l][s]=new a({cell:void 0,link:t,linkType:r>0?"rowColumn":"column",rightMost:r==t.colspan-1||void 0,bottom:u==t.rowspan-1,rowLevel:r,columnLevel:u,indexInTableGridRow:s,indexInTableGridColumn:l}),l+=1;p=!0}s++}}))})),i},t.prototype.setAlign=function(t){var e=this.tableCellSelector.getSingleSelect();e&&e.cell.setAlign(t)},t.prototype.setVAlign=function(t){var e=this.tableCellSelector.getSingleSelect();e&&e.cell.setVAlign(t)},t.prototype.getColumnStep=function(t){var e=0;return this.rows.length&&this.rows[t||0].columns.forEach((function(t){e+=t.colspan})),e},t.prototype.initContext=function(){var t=this;if(!this.optionsCoat.options.isEnableContextMenu)return!1;p()(this.handle).hicontextMenu({menus:[{text:"\u5728\u4e0a\u65b9\u63d2\u5165\u884c",enabled:this.optionsCoat.options.isEnableInsertRow,disable:function(){return!t.tableCellSelector.getSingleSelect()},callback:function(){t.insertRow("above"),t.resizer.updateRowGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5728\u4e0b\u65b9\u63d2\u5165\u884c",borderBottom:!0,enabled:this.optionsCoat.options.isEnableInsertRow,disable:function(){return!t.tableCellSelector.getSingleSelect()},callback:function(){t.insertRow("below"),t.resizer.updateRowGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5411\u5de6\u65b9\u63d2\u5165\u5217",enabled:this.optionsCoat.options.isEnableInsertColumn,disable:function(){return!t.tableCellSelector.getSingleSelect()},callback:function(){t.insertColumn("left"),t.resizer.updateColumnGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5411\u53f3\u65b9\u63d2\u5165\u5217",enabled:this.optionsCoat.options.isEnableInsertColumn,disable:function(){return!t.tableCellSelector.getSingleSelect()},borderBottom:!0,callback:function(){t.insertColumn("right"),t.resizer.updateColumnGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5220\u9664\u884c",enabled:this.optionsCoat.options.isEnableDeleteRow,disable:function(){return!t.tableCellSelector.getSingleSelect()||t.rows.length<=1},callback:function(){t.deleteRow(),t.resizer.updateRowGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5220\u9664\u5217",borderBottom:!0,enabled:this.optionsCoat.options.isEnableDeleteColumn,disable:function(){return!t.tableCellSelector.getSingleSelect()||t.rows.length>0&&t.rows[0].columns.length<=1},callback:function(){t.deleteColums(),t.resizer.updateColumnGrips(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u5bf9\u9f50",borderBottom:!0,enabled:this.optionsCoat.options.columnAlignEditable,menus:[{text:"\u5de6",callback:function(){t.setAlign("left")}},{text:"\u5de6\u53f3\u5c45\u4e2d",callback:function(){t.setAlign("center")}},{text:"\u53f3",callback:function(){t.setAlign("right")}},{text:"\u9ed8\u8ba4",borderBottom:!0,callback:function(){t.setAlign("")}},{text:"\u4e0a",callback:function(){t.setVAlign("top")}},{text:"\u5782\u76f4\u5c45\u4e2d",callback:function(){t.setVAlign("middle")}},{text:"\u4e0b",callback:function(){t.setVAlign("bottom")}},{text:"\u9ed8\u8ba4",callback:function(){t.setVAlign("")}}]},{text:"\u5408\u5e76\u5355\u5143\u683c",enabled:this.optionsCoat.options.isEnableMergeCell,disable:function(){return t.tableCellSelector.getSingleSelect()},callback:function(){t.mergeCell(),r.a.event.trigger("updateTable"+t.id)}},{text:"\u89e3\u5f00\u5355\u5143\u683c",enabled:this.optionsCoat.options.isEnableMergeCell,disable:function(){var e=t.tableCellSelector.getSingleSelect();return!e||1==e.cell.rowspan&&1==e.cell.colspan},callback:function(){t.splitCell(),r.a.event.trigger("updateTable"+t.id)}}].filter((function(t){return t.enabled}))})},t.prototype.getTableWidth=function(){return r.a.px.toPt(this.target.outerWidth(!1))},t.prototype.updateColumnGrips=function(){this.resizer.updateColumnGrips()},t.prototype.updateRowGrips=function(){this.resizer.updateRowGrips()},t}()},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(t,e,n){this.tid=t,this.options=e,this.printElementType=n}},function(t,e,n){var i=n(3),o=n(12),r=function(t){this.width=t.width,this.title=t.title,this.field=t.field,this.checked=t.checked,this.columnId=t.columnId,this.fixed=!1,this.rowspan=t.rowspan||1,this.colspan=t.colspan||1,this.align=t.align,this.halign=t.halign,this.vAlign=t.vAlign,this.renderFormatter=t.renderFormatter,this.formatter2=t.formatter2,this.styler2=t.styler2,this.stylerHeader=t.stylerHeader,this.tableColumnHeight=t.tableColumnHeight,this.tableTextType=t.tableTextType,this.tableBarcodeMode=t.tableBarcodeMode,this.tableQRCodeLevel=t.tableQRCodeLevel,this.tableSummaryTitle=t.tableSummaryTitle,this.tableSummaryText=t.tableSummaryText,this.tableSummaryColspan=t.tableSummaryColspan,this.tableSummary=t.tableSummary,this.tableSummaryAlign=t.tableSummaryAlign,this.tableSummaryNumFormat=t.tableSummaryNumFormat,this.tableSummaryFormatter=t.tableSummaryFormatter,this.showCodeTitle=t.showCodeTitle,this.upperCase=t.upperCase},a=n(5);n.d(e,"a",(function(){return u}));var s,l=(s=function(t,e){return(s=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e,n){var i=this;return e=e||{},(i=t.call(this,e)||this).lHeight=e.lHeight,i.autoCompletion=e.autoCompletion,i.tableFooterRepeat=e.tableFooterRepeat,n&&(i.columns=[],n.editable&&e.columns&&e.columns.length?e.columns.forEach((function(t){var e=[];t.forEach((function(t){var i=new r(t),o=n.getColumnByColumnId(i.columnId),s=o?p().extend(o,i):new a.a(i);e.push(s)})),i.columns.push(new o.a(e))})):n.columns.forEach((function(t){i.columns.push(new o.a(t))}))),i}return l(e,t),e.prototype.getColumnByColumnId=function(t){return this.makeColumnObj()[t]},e.prototype.makeColumnObj=function(){var t={};return this.columns&&this.columns.forEach((function(e){e.columns.forEach((function(e){(e.id||e.columnId)&&(t[e.id||e.columnId]=e)}))})),t},e.prototype.getGridColumns=function(){return this.gridColumns||1},e.prototype.getPrintElementOptionEntity=function(){var e=t.prototype.getPrintElementOptionEntity.call(this);return e.fields=this.fields,this.columns&&(e.columns=[],this.columns.forEach((function(t){var n=t.getPrintElementOptionEntity().map((function(t){return new r(t)}));e.columns.push(n)}))),e},e}(i.a)},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(){this.rowColumns=[]}},function(t,e,n){n.d(e,"a",(function(){return i}));var i=function(){function t(t,e){this.gridColumns=t,this.target=e}return t.prototype.getByIndex=function(t){return this.target.find(".hi-grid-col:eq("+t+")")},t}()},function(t,e,n){t.exports=n(33)},function(t,e){!function(t){function e(e){var n=t.data(e.data.target,"hidraggable"),i=n.options,o=n.proxy,r=e.data,a=r.startLeft+(e.pageX-r.startX)/(n.options.getScale()||1),s=r.startTop+(e.pageY-r.startY)/(n.options.getScale()||1);o&&(o.parent()[0]==document.body?(a=null!=i.deltaX&&null!=i.deltaX?e.pageX+i.deltaX:e.pageX-e.data.offsetWidth,s=null!=i.deltaY&&null!=i.deltaY?e.pageY+i.deltaY:e.pageY-e.data.offsetHeight):(null!=i.deltaX&&null!=i.deltaX&&(a+=e.data.offsetWidth+i.deltaX),null!=i.deltaY&&null!=i.deltaY&&(s+=e.data.offsetHeight+i.deltaY))),e.data.parent!=document.body&&(a+=t(e.data.parent).scrollLeft(),s+=t(e.data.parent).scrollTop()),"h"==i.axis?r.left=a:"v"==i.axis||e.shiftKey&&e.altKey?r.top=s:e.shiftKey?r.left=a:(r.left=a,r.top=s)}function n(e){var n=t.data(e.data.target,"hidraggable"),i=n.options,o=n.proxy;o||(o=t(e.data.target)),o.css({left:t.fn.dragLengthC(e.data.left,i),top:t.fn.dragLengthC(e.data.top,i)}),t("body").css("cursor",i.cursor)}function i(i){t.fn.hidraggable.isDragging=!0;var o=t.data(i.data.target,"hidraggable"),r=o.options,a=t(".hidroppable").filter((function(){return i.data.target!=this})).filter((function(){var e=t.data(this,"hidroppable").options.accept;return!e||t(e).filter((function(){return this==i.data.target})).length>0}));o.hidroppables=a;var s=o.proxy;return s||(r.proxy?(s="clone"==r.proxy?t(i.data.target).clone().insertAfter(i.data.target):r.proxy.call(i.data.target,i.data.target),o.proxy=s):s=t(i.data.target)),s.css("position","absolute"),e(i),n(i),r.onStartDrag.call(i.data.target,i),!1}function o(t,e,n,i,o,r){Math.abs(t[n]-e[i])<=F.adsorbLineMin?t.v.length?t.v.css("left",t[n]+"pt"):(t.v=p()("<div class='verLine id-"+t.id+"'></div>"),t.v.css("height",o+"pt"),t.v.css("left",t[n]+"pt"),r.append(t.v)):t.v&&t.v.remove()}function r(t){t&&t.v&&t.v.remove(),p()(".verLine").remove()}function a(t,e,n,i,o,r){Math.abs(t[n]-e[i])<=F.adsorbLineMin?t.h.length?t.h.css("top",t[n]+"pt"):(t.h=p()("<div class='horLine id-"+t.id+"'></div>"),t.h.css("width",o+"pt"),t.h.css("top",t[n]+"pt"),r.append(t.h)):t.h&&t.h.remove()}function s(t){t&&t.h&&t.h.remove(),p()(".horLine").remove()}function l(i){if(1===i.buttons){var l=t.data(i.data.target,"hidraggable");if(e(i),!i.ctrlKey&&!i.metaKey&&(i.data.target.className.startsWith("resize-panel")||"2"==i.data.target.style.zIndex||i.data.target.className.startsWith("hiprint-printElement"))){var u=i.data;if(0==t(".mouseRect").length&&l.options.designTarget&&l.options.designTarget.panel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&!t.printElementType.type.includes("table")})).length<=1){let t=D.px.toPt(u.left),e=D.px.toPt(u.top),n=l.options.designTarget.options;n.left=t,n.top=e,n.right=t+n.width,n.bottom=e+n.height,n.vCenter=t+n.width/2,n.hCenter=e+n.height/2,(()=>{let t=l.options.designTarget.panel.printElements.filter((t=>t.id!=l.options.designTarget.id)).map((t=>{let e,i,o,r,{left:a,top:s,width:l,height:u}=t.options,d=a+l,h=a+l/2,c=s+u/2,f=n.left+n.width/2,g=n.top+n.height/2,m=n.left+n.width;return i=Math.sqrt(Math.pow(a-n.left,2)+Math.pow(c-g,2)),o=Math.sqrt(Math.pow(h-f,2)+Math.pow(c-g,2)),r=Math.sqrt(Math.pow(d-m,2)+Math.pow(c-g,2)),e=Math.min(i,o,r),{...t.options,distance:e,h:p()(".horLine.id-"+t.id),v:p()(".verLine.id-"+t.id),bottom:s+u,right:a+l,vCenter:h,hCenter:c}})).sort(((t,e)=>t.distance-e.distance)).slice(0,1),e=l.options.designTarget.designPaper,i=e.target.find(".hiprint-printPaper-content"),u=e.width,d=e.height,h=F.showAdsorbLine,c=F.adsorbMin,f=F.adsorbLineMin;t.forEach(((e,p)=>{Math.abs(t[p].left-n.left)<=c?(n.left=t[p].left,r(t[p])):Math.abs(t[p].vCenter-n.left)<=c?(n.left=t[p].vCenter,r(t[p])):Math.abs(t[p].right-n.left)<=c&&(n.left=t[p].right,r(t[p])),Math.abs(t[p].left-n.vCenter)<=c?(n.left=t[p].left-n.width/2,r(t[p])):Math.abs(t[p].vCenter-n.vCenter)<=c?(n.left=t[p].vCenter-n.width/2,r(t[p])):Math.abs(t[p].right-n.vCenter)<=c&&(n.left=t[p].right-n.width/2,r(t[p])),Math.abs(t[p].left-n.right)<=c?(n.left=t[p].left-n.width,r(t[p])):Math.abs(t[p].vCenter-n.right)<=c?(n.left=t[p].vCenter-n.width,r(t[p])):Math.abs(t[p].right-n.right)<=c&&(n.left=t[p].right-n.width,r(t[p])),Math.abs(t[p].top-n.top)<=c?(n.top=t[p].top,s(t[p])):Math.abs(t[p].hCenter-n.top)<=c?(n.top=t[p].hCenter,s(t[p])):Math.abs(t[p].bottom-n.top)<=c&&(n.top=t[p].bottom,s(t[p])),Math.abs(t[p].top-n.hCenter)<=c?(n.top=t[p].top-n.height/2,s(t[p])):Math.abs(t[p].hCenter-n.hCenter)<=c?(n.top=t[p].hCenter-n.height/2,s(t[p])):Math.abs(t[p].bottom-n.hCenter)<=c&&(n.top=t[p].bottom-n.height/2,s(t[p])),Math.abs(t[p].top-n.bottom)<=c?(n.top=t[p].top-n.height,s(t[p])):Math.abs(t[p].hCenter-n.bottom)<=c?(n.top=t[p].hCenter-n.height,s(t[p])):Math.abs(t[p].bottom-n.bottom)<=c&&(n.top=t[p].bottom-n.height,s(t[p])),h&&(Math.abs(t[p].left-n.left)>c&&Math.abs(t[p].left-n.left)<=f?o(t[p],n,"left","left",d,i):Math.abs(t[p].vCenter-n.left)>c&&Math.abs(t[p].vCenter-n.left)<=f?o(t[p],n,"vCenter","left",d,i):Math.abs(t[p].right-n.left)>c&&Math.abs(t[p].right-n.left)<=f?o(t[p],n,"right","left",d,i):Math.abs(t[p].left-n.vCenter)>c&&Math.abs(t[p].left-n.vCenter)<=f?o(t[p],n,"left","vCenter",d,i):Math.abs(t[p].vCenter-n.vCenter)>c&&Math.abs(t[p].vCenter-n.vCenter)<=f?o(t[p],n,"vCenter","vCenter",d,i):Math.abs(t[p].right-n.vCenter)>c&&Math.abs(t[p].right-n.vCenter)<=f?o(t[p],n,"right","vCenter",d,i):Math.abs(t[p].left-n.right)>c&&Math.abs(t[p].left-n.right)<=f?o(t[p],n,"left","right",d,i):Math.abs(t[p].vCenter-n.right)>c&&Math.abs(t[p].vCenter-n.right)<=f?o(t[p],n,"vCenter","right",d,i):Math.abs(t[p].right-n.right)>c&&Math.abs(t[p].right-n.right)<=f?o(t[p],n,"right","right",d,i):Math.abs(t[p].top-n.top)>c&&Math.abs(t[p].top-n.top)<=f?a(t[p],n,"top","top",u,i):Math.abs(t[p].hCenter-n.top)>c&&Math.abs(t[p].hCenter-n.top)<=f?a(t[p],n,"hCenter","top",u,i):Math.abs(t[p].bottom-n.top)>c&&Math.abs(t[p].bottom-n.top)<=f?a(t[p],n,"bottom","top",u,i):Math.abs(t[p].top-n.hCenter)>c&&Math.abs(t[p].top-n.hCenter)<=f?a(t[p],n,"top","hCenter",u,i):Math.abs(t[p].hCenter-n.hCenter)>c&&Math.abs(t[p].hCenter-n.hCenter)<=f?a(t[p],n,"hCenter","hCenter",u,i):Math.abs(t[p].bottom-n.hCenter)>c&&Math.abs(t[p].bottom-n.hCenter)<=f?a(t[p],n,"bottom","hCenter",u,i):Math.abs(t[p].top-n.bottom)>c&&Math.abs(t[p].top-n.bottom)<=f?a(t[p],n,"top","bottom",u,i):Math.abs(t[p].hCenter-n.bottom)>c&&Math.abs(t[p].hCenter-n.bottom)<=f?a(t[p],n,"hCenter","bottom",u,i):Math.abs(t[p].bottom-n.bottom)>c&&Math.abs(t[p].bottom-n.bottom)<=f?a(t[p],n,"bottom","bottom",u,i):(r(t[p]),s(t[p])))}))})(),i.data.left=D.pt.toPx(n.left),i.data.top=D.pt.toPx(n.top)}var d=u.parent.className.endsWith("design")?u.parent:u.parent.offsetParent,h=d.clientWidth,c=d.clientHeight,f=u.target.clientWidth,g=u.target.clientHeight,m=0,v=0;if(l.options.designTarget&&l.options.designTarget.options.transform){var y=l.options.designTarget.options.getRectInfo();m=D.pt.toPx(y.diffW),v=D.pt.toPx(y.diffH)}u.left<0-m?u.left=0-m:u.left>=h-f+m&&(u.left=h-f+m),u.top<0-v?u.top=0-v:u.top>=c-g+v&&(u.top=c-g+v),i.data=u}0!=l.options.onDrag.call(i.data.target,i,t.fn.dragLengthCNum(i.data.left,l.options),t.fn.dragLengthCNum(i.data.top,l.options))&&n(i);var b=i.data.target;return l.hidroppables.each((function(){var e=t(this);if(!e.hidroppable("options").disabled){var n=e.offset();i.pageX>n.left&&i.pageX<n.left+e.outerWidth()&&i.pageY>n.top&&i.pageY<n.top+e.outerHeight()?(this.entered||(t(this).trigger("_dragenter",[b]),this.entered=!0),t(this).trigger("_dragover",[b])):this.entered&&(t(this).trigger("_dragleave",[b]),this.entered=!1)}})),!1}}function u(e){t.fn.hidraggable.isDragging=!1,r(),s();var n,i,o=t.data(e.data.target,"hidraggable"),a=o.proxy,p=o.options;function l(){a&&a.remove(),o.proxy=null}function u(){var n=!1;return o.hidroppables.each((function(){var i=t(this);if(!i.hidroppable("options").disabled){var o=i.offset(),r=this.style.transform&&parseFloat(this.style.transform.slice(6,-1))||1;return e.pageX>o.left&&e.pageX<o.left+i.outerWidth()*r&&e.pageY>o.top&&e.pageY<o.top+i.outerHeight()*r?(p.revert&&t(e.data.target).css({position:e.data.startPosition,left:e.data.startLeft,top:e.data.startTop}),t(this).trigger("_drop",[e.data.target]),l(),n=!0,this.entered=!1,!1):void 0}})),n||p.revert||l(),n}return p.revert?1==u()?t(e.data.target).css({position:e.data.startPosition,left:e.data.startLeft,top:e.data.startTop}):a?(a.parent()[0]==document.body?(n=e.data.startX-e.data.offsetWidth,i=e.data.startY-e.data.offsetHeight):(n=e.data.startLeft,i=e.data.startTop),a.animate({left:n,top:i},(function(){l()}))):t(e.data.target).animate({left:e.data.startLeft,top:e.data.startTop},(function(){t(e.data.target).css("position",e.data.startPosition)})):(t(e.data.target).css({position:"absolute",left:t.fn.dragLengthC(e.data.left,p),top:t.fn.dragLengthC(e.data.top,p)}),u()),p.onStopDrag.call(e.data.target,e),t(document).unbind(".hidraggable"),setTimeout((function(){t("body").css("cursor","")}),100),!1}t.fn.hidraggable=function(e,n){return"string"==typeof e?t.fn.hidraggable.methods[e](this,n):this.each((function(){var n,o=t.data(this,"hidraggable");o?(o.handle.unbind(".hidraggable"),n=t.extend(o.options,e)):n=t.extend({},t.fn.hidraggable.defaults,t.fn.hidraggable.parseOptions(this),e||{});var r=n.handle?"string"==typeof n.handle?t(n.handle,this):n.handle:t(this);function a(e){var n=t.data(e.data.target,"hidraggable"),i=n.handle,o=t(i).offset(),r=t(i)[0].style.transform&&parseInt(t(i)[0].style.transform.slice(7,-1)),a=n.options.getScale(),s=t(i).outerWidth(),p=t(i).outerHeight();if(r){var l=r*Math.PI/180,u=t(i).outerWidth(),d=t(i).outerHeight(),h=Math.sin(l),c=Math.cos(l);s=Math.abs(u*c)+Math.abs(d*h),p=Math.abs(u*h)+Math.abs(d*c)}a&&(s*=a,p*=a);var f=e.pageY-o.top,g=o.left+s-e.pageX,m=o.top+p-e.pageY,v=e.pageX-o.left;return Math.min(f,g,m,v)>n.options.edge}t.data(this,"hidraggable",{options:n,handle:r}),n.disabled?t(this).css("cursor",""):r.unbind(".hidraggable").bind("mousemove.hidraggable",{target:this},(function(e){if(!t.fn.hidraggable.isDragging){var n=t.data(e.data.target,"hidraggable").options;a(e)?t(this).css("cursor",n.cursor):t(this).css("cursor","")}})).bind("mouseleave.hidraggable",{target:this},(function(e){t(this).css("cursor","")})).bind("mousedown.hidraggable",{target:this},(function(e){if(0!=a(e)){t(this).css("cursor","");var n=t(e.data.target).position(),o=t(e.data.target).offset(),r={startPosition:t(e.data.target).css("position"),startLeft:n.left,startTop:n.top,left:n.left,top:n.top,startX:e.pageX,startY:e.pageY,offsetWidth:e.pageX-o.left,offsetHeight:e.pageY-o.top,target:e.data.target,parent:t(e.data.target).parent()[0]},s=t.data(e.data.target,"hidraggable");if(!1===s.options.draggable)return;if("r resizebtn"==e.target.className)return;var p=s.options.getScale();p&&(r.left/=p,r.top/=p,r.startLeft/=p,r.startTop/=p);var d=r.target.style.transform&&parseInt(r.target.style.transform.slice(7,-1));if(d){var h=d*Math.PI/180,c=t(e.data.target).outerWidth(),f=t(e.data.target).outerHeight(),g=Math.sin(h),m=Math.cos(h),v=(Math.abs(c*m)+Math.abs(f*g)-c)/2,y=(Math.abs(c*g)+Math.abs(f*m)-f)/2;r.left+=v,r.top+=y,r.startLeft+=v,r.startTop+=y}t.extend(e.data,r),0!=t.data(e.data.target,"hidraggable").options.onBeforeDrag.call(e.data.target,e)&&(t(document).bind("mousedown.hidraggable",e.data,i),t(document).bind("mousemove.hidraggable",e.data,l),t(document).bind("mouseup.hidraggable",e.data,u))}}))}))},t.fn.hidraggable.methods={options:function(e){return t.data(e[0],"hidraggable").options},update:function(e,n){n&&"object"==typeof n&&t.data(e[0],"hidraggable")&&Object.keys(n).forEach((function(i){t.data(e[0],"hidraggable").options[i]=n[i]}))},proxy:function(e){return t.data(e[0],"hidraggable").proxy},enable:function(e){return e.each((function(){t(this).hidraggable({disabled:!1})}))},disable:function(e){return e.each((function(){t(this).hidraggable({disabled:!0})}))}},t.fn.hidraggable.parseOptions=function(e){var n=t(e);return t.extend({},t.hiprintparser.parseOptions(e,["cursor","handle","axis",{revert:"boolean",deltaX:"number",deltaY:"number",edge:"number"}]),{disabled:!!n.attr("disabled")||void 0})},t.fn.hidraggable.defaults={proxy:null,revert:!1,cursor:"move",deltaX:null,deltaY:null,handle:null,disabled:!1,edge:0,axis:null,getScale:function(t){},onBeforeDrag:function(t){},onStartDrag:function(t){},onDrag:function(t){},onStopDrag:function(t){}},t.fn.hidraggable.isDragging=!1}(R)},function(t,e){!function(t){t.fn.hidroppable=function(e,n){return"string"==typeof e?t.fn.hidroppable.methods[e](this,n):(e=e||{},this.each((function(){var n,i=t.data(this,"hidroppable");i?t.extend(i.options,e):(t(n=this).addClass("hidroppable"),t(n).bind("_dragenter",(function(e,i){t.data(n,"hidroppable").options.onDragEnter.apply(n,[e,i])})),t(n).bind("_dragleave",(function(e,i){t.data(n,"hidroppable").options.onDragLeave.apply(n,[e,i])})),t(n).bind("_dragover",(function(e,i){t.data(n,"hidroppable").options.onDragOver.apply(n,[e,i])})),t(n).bind("_drop",(function(e,i){t.data(n,"hidroppable").options.onDrop.apply(n,[e,i])})),t.data(this,"hidroppable",{options:t.extend({},t.fn.hidroppable.defaults,t.fn.hidroppable.parseOptions(this),e)}))})))},t.fn.hidroppable.methods={options:function(e){return t.data(e[0],"hidroppable").options},enable:function(e){return e.each((function(){t(this).hidroppable({disabled:!1})}))},disable:function(e){return e.each((function(){t(this).hidroppable({disabled:!0})}))}},t.fn.hidroppable.parseOptions=function(e){var n=t(e);return t.extend({},t.hiprintparser.parseOptions(e,["accept"]),{disabled:!!n.attr("disabled")||void 0})},t.fn.hidroppable.defaults={accept:null,disabled:!1,onDragEnter:function(t,e){},onDragOver:function(t,e){},onDragLeave:function(t,e){},onDrop:function(t,e){}}}(R)},function(t,e){var n;(n=R).hiprintparser={parseOptions:function(t,e){var i=n(t),o={},r=n.trim(i.attr("data-options"));if(r&&("{"!=r.substring(0,1)&&(r="{"+r+"}"),o=new Function("return "+r)()),e){for(var a={},s=0;s<e.length;s++){var p=e[s];if("string"==typeof p)a[p]="width"==p||"height"==p||"left"==p||"top"==p?parseInt(t.style[p])||void 0:i.attr(p);else for(var l in p){var u=p[l];"boolean"==u?a[l]=i.attr(l)?"true"==i.attr(l):void 0:"number"==u&&(a[l]="0"==i.attr(l)?0:parseFloat(i.attr(l))||void 0)}}n.extend(o,a)}return o}},n.fn.dragLengthC=function(t,e){return"pt"==e.moveUnit?n.fn.dragLengthCNum(t,e)+"pt":n.fn.dragLengthCNum(t,e)},n.fn.dragLengthCNum=function(t,e){var n=3;if("pt"==e.moveUnit){var i=.75*t;return e.minMove&&(n=e.minMove),Math.round(i/n)*n}return Math.round(i/n)*n}},function(t,e){var n,i,o;n=R,i={maxPanelIndex:0},(o=function(t){this.options=n.data(t.target,"hireizeable").options,this.init(t.target)}).prototype={numHandlerText:function(t){return this.numHandler(t)+"pt"},numHandler:function(t){var e=1.5,n=.75*t;return this.options.minResize&&(e=this.options.minResize),Math.round(n/e)*e},init:function(t){this.initResizeBox(t)},initResizeBox:function(t){var e=this;n(t).each((function(){var o;i.maxPanelIndex+=1,e.options.noContainer?o=n(t):(o=n("<div panelIndex="+i.maxPanelIndex+' class="resize-panel"></div>')).hide(),e.appendHandler(o,n(this));var r=n('<div class="n resizebtn"></div>'),a={name:"s",target:n('<div class="s resizebtn"></div>')},s={name:"w",target:n('<div class="w resizebtn"></div>')},p={name:"e",target:n('<div class="e resizebtn"></div>')},l={name:"ne",target:n('<div class="ne resizebtn"></div>')},u={name:"nw",target:n('<div class="nw resizebtn"></div>')},d={name:"se",target:n('<div class="se resizebtn"></div>')},h={name:"sw",target:n('<div class="sw resizebtn"></div>')},c=(r={name:"r",target:n('<div class="r resizebtn"></div>')},n('<div class="size-box" style="position: absolute;left:-2px;"></div>')),f=n('<div class="del-btn">\xd7</div>'),g=function(){var t=[],i=e.options.showPoints;return n.each([r,a,s,p,l,u,d,h],(function(e,o){n.inArray(o.name,i)>-1&&t.push(o.target)})),t};e.refreshSizeBox(void 0,c,o),0!=e.options.draggable&&(o.append(f),o.on("mousedown",".del-btn",(()=>{var e=new KeyboardEvent("keydown",{bubbles:!0,keyCode:46});t.dispatchEvent(e)}))),e.appendHandler(g(),o),e.bindResizeEvent(o,n(this));var m=n(this);n(o).on("mousedown",".resizebtn",(function(){m.addClass("resizeing")})),n(".easyui-droppable").on("mouseup",(function(){m.removeClass("resizeing")})),e.addHandlerCss(g()),e.bindTrigger(n(this))})),e.bindHidePanel()},addHandlerCss:function(t){for(var e=0;e<t.length;e++){var n=t[e],i=n.parent();n.height();if(n.hasClass("w")||n.hasClass("e")){let t=i.height(),e=Math.max(Math.min(n.height(),.6*t),8);n.css({top:(t-e)/2,height:e})}if(n.hasClass("s")||n.hasClass("n")||n.hasClass("r")){let t=i.width(),e=Math.max(Math.min(n.width(),.6*t),8);n.css({left:(t-e)/2,width:e})}}},appendHandler:function(t,e){e.find(".resize-panel").remove();for(var n=0;n<t.length;n++)e.append(t[n])},refreshSizeBox:function(t,e,n){if(this.options.showSizeBox){var i,o;if(e&&n.append(e),t&&t.length)i=t[0].style,o=t.children("div[panelindex]").find(".size-box");else if(n&&n.parent()){if((t=n.parent()).hasClass("hiprint-printPaper-content"))return;(i=t[0].style).width||(i.width=D.px.toPt(t[0].offsetWidth)+"pt"),i.height||(i.height=D.px.toPt(t[0].offsetHeight)+"pt"),o=t.children("div[panelindex]").find(".size-box")}o&&(o.text(i.width+" x "+i.height),o.css("top",-(o.outerHeight()||20)))}},triggerResize:function(t,e){e.ctrlKey||e.metaKey||(t.siblings().children("div[panelindex]").removeClass("selected"),t.siblings().children("div[panelindex]").css({display:"none"})),t.children("div[panelindex]").addClass("selected"),t.children("div[panelindex]").css({display:"block"}),this.refreshSizeBox(t)},bindResizeEvent:function(t,e){var i=this,o=0,r=0,a=t.width(),s=t.height(),p=t.offset().left,l=t.offset().top,u=i.options.noContainer?n(e):t.parent(),d=!1;t.on("mousedown",".e",(function(e){o=e.pageX,a=t.width(),d=!0}));var h=!1;t.on("mousedown",".s",(function(e){r=e.pageY,s=t.height(),h=!0}));var c=!1;t.on("mousedown",".w",(function(e){o=e.pageX,a=t.width(),c=!0,p=u.offset().left}));var f=!1;t.on("mousedown",".n",(function(e){r=e.pageY,s=t.height(),f=!0,l=u.offset().top}));var g=!1;t.on("mousedown",".ne",(function(e){o=e.pageX,r=e.pageY,a=t.width(),s=t.height(),g=!0,l=u.offset().top}));var m=!1;t.on("mousedown",".nw",(function(e){o=e.pageX,r=e.pageY,a=t.width(),s=t.height(),l=u.offset().top,p=u.offset().left,m=!0}));var v=!1;t.on("mousedown",".se",(function(e){o=e.pageX,r=e.pageY,a=t.width(),s=t.height(),v=!0}));var y=!1;t.on("mousedown",".sw",(function(e){o=e.pageX,r=e.pageY,a=t.width(),s=t.height(),y=!0,p=u.offset().left}));var b=!1;t.on("mousedown",".r",(function(e){o=e.pageX,r=e.pageY,a=t.width(),s=t.height(),b=!0,p=a/2+u.offset().left,l=s/2+u.offset().top})),t.on("dblclick",".r",(function(t){u.css({transform:"rotate(0deg)"}),i.options.onResize(t,void 0,void 0,void 0,void 0,0)}));var T=!1;t.on("mousedown",(function(t){i.options.onBeforeResize(),o=t.pageX,r=t.pageY,l=u.offset().top,p=u.offset().left,T=!1})),n(i.options.stage).on("mousemove",(function(e){if(d){var n=(e.pageX-o)/i.options.getScale();t.css({width:"100%"}),u.css({width:i.numHandlerText(a+n)}),i.options.onResize(e,void 0,i.numHandler(a+n),void 0,void 0)}else if(h){var w=(e.pageY-r)/i.options.getScale();t.css({height:"100%"}),u.css({height:i.numHandlerText(s+w)}),i.options.onResize(e,i.numHandler(s+w),void 0,void 0,void 0)}else if(b){t.css({height:"100%"});var E=e.pageX,x=(e.pageY,360*(E-o)/100);o=e.pageX;var C=(u[0].style.transform&&parseInt(u[0].style.transform.slice(7,-1))||0)+x;Math.abs(C)>360&&(C%=360),u.css({transform:"rotate("+C+"deg)"}),i.options.onResize(e,void 0,void 0,void 0,void 0,C)}else if(c)n=(e.pageX-o)/i.options.getScale(),t.css({width:"100%"}),u.css({width:i.numHandlerText(a-n),left:i.numHandlerText(i.options.noDrag?void 0:i.numHandler(p+n))}),i.options.onResize(e,void 0,i.numHandler(a-n),void 0,i.options.noDrag?void 0:i.numHandler(p+n));else if(f)w=(e.pageY-r)/i.options.getScale(),t.css({height:"100%"}),u.css({height:i.numHandlerText(s-w),top:i.numHandlerText(i.options.noDrag?void 0:l+w)}),i.options.onResize(e,i.numHandler(s-w),void 0,i.options.noDrag?void 0:i.numHandler(l+w),void 0);else if(g)n=(e.pageX-o)/i.options.getScale(),w=(e.pageY-r)/i.options.getScale(),t.css({height:"100%",width:"100%"}),u.css({height:i.numHandlerText(s-w),top:i.numHandlerText(i.options.noDrag?void 0:l+w),width:i.numHandlerText(a+n)}),i.options.onResize(e,i.numHandler(s-w),i.numHandler(a+n),i.options.noDrag?void 0:i.numHandler(l+w),void 0);else if(m)n=(e.pageX-o)/i.options.getScale(),w=(e.pageY-r)/i.options.getScale(),t.css({height:"100%",width:"100%"}),u.css({height:i.numHandlerText(s-w),top:i.numHandlerText(i.options.noDrag?void 0:l+w),width:i.numHandlerText(a-n),left:i.numHandlerText(i.options.noDrag?void 0:p+n)}),i.options.onResize(e,i.numHandler(s-w),i.numHandler(a-n),i.options.noDrag?void 0:i.numHandler(l+w),i.options.noDrag?void 0:i.numHandler(p+n));else if(v)if(n=(e.pageX-o)/i.options.getScale(),w=(e.pageY-r)/i.options.getScale(),t.css({width:"100%",height:"100%"}),e.shiftKey)u.css({width:i.numHandlerText(a+n),height:i.numHandlerText(s+w)}),i.options.onResize(e,i.numHandler(s+w),i.numHandler(a+n),void 0,void 0);else{var P,S=a+n;P=S*(s/a),u.css({width:i.numHandlerText(S),height:i.numHandlerText(P)}),i.options.onResize(e,i.numHandler(P),i.numHandler(S),void 0,void 0)}else y?(n=(e.pageX-o)/i.options.getScale(),w=(e.pageY-r)/i.options.getScale(),t.css({width:"100%",height:"100%"}),u.css({width:i.numHandlerText(a-n),left:i.numHandlerText(i.options.noDrag?void 0:p+n),height:i.numHandlerText(s+w)}),i.options.onResize(e,i.numHandler(s+w),i.numHandler(a-n),i.numHandler(otundefinedop),i.options.noDrag?void 0:i.numHandler(p+n))):T&&(n=(e.pageX-o)/i.options.getScale(),w=(e.pageY-r)/i.options.getScale(),u.css({left:i.numHandlerText(i.options.noDrag?void 0:p+n),top:i.numHandlerText(i.options.noDrag?void 0:l+w)}),i.options.onResize(e,void 0,void 0,i.options.noDrag?void 0:i.numHandler(l+w),i.options.noDrag?void 0:i.numHandler(p+n)))})).on("mouseup",(function(t){(d||h||c||f||g||m||y||v||T||b)&&i.options.onStopResize(b),d=!1,h=!1,c=!1,f=!1,g=!1,m=!1,y=!1,v=!1,T=!1,b=!1}))},bindTrigger:function(t){var e=this;t.on("click",(function(i){i.stopPropagation(),e.triggerResize(t,i),n(".mouseRect").remove()}))},bindHidePanel:function(t){if(i.maxPanelIndex<2){var e=this.options.stage;n(e).bind("click",(function(t){t.target.className&&"string"==O(t.target.className)&&t.target.className.includes("design")&&(t.stopPropagation(),n("div[panelindex]").css({display:"none"}),n("div[panelindex]").removeClass("selected"))}))}}},n.fn.extend({hireizeable:function(t){return this.each((function(){var e,i=n.data(this,"hireizeable");e=i?n.extend({},i.options,t||{}):n.extend({},n.fn.hireizeable.defaults,t||{}),n.data(this,"hireizeable",{options:e}),new o({target:this,onResize:function(t,e,n,i,o){},onStopResize:function(t,e,n,i,o){}})}))}}),n.fn.hireizeable.defaults={stage:document,reizeUnit:"pt",minResize:1.5,showSizeBox:!0,showPoints:["s","e"],noContainer:!1,onBeforeResize:function(t,e,n,i,o){},onResize:function(t,e,n,i,o){},onStopResize:function(t,e,n,i,o){},noDrag:!1}},function(t,e){var n,i;n="connected",i="reconnecting",H={opened:!1,name:"webSockets",host:"http://localhost:17521",token:"",reconnectTimeout:6e4,reconnectWindowSetTimeout:null,reconnectDelay:2e3,supportsKeepAlive:function(){return!0},hasIo:function(t){try{return g.io}catch(t){}return!1},send:function(t){try{this.socket.emit("news",t)}catch(e){console.log("send data error:"+(t||"")+JSON.stringify(e))}},sendByFragments:function(t){try{const{fragmentSize:e=5e4,sendInterval:n=10,html:i,generateHTMLInterval:o,printByFragments:r,...a}=t,s=t.html.length,p=Math.ceil(s/e);Array.apply(void 0,{length:p}).forEach(((t,o)=>{const r=o*e,l=o+1===e?s:(o+1)*e;setTimeout((()=>{this.socket.emit("printByFragments",{...a,index:o,total:p,htmlFragment:i.slice(r,l)})}),n*o)}))}catch(e){console.log("send data fragment error:"+(t||"")+JSON.stringify(e))}},getPrinterList:function(){return this.printerList},refreshPrinterList:function(){try{this.socket.emit("refreshPrinterList")}catch(t){console.log("refreshPrinterList error:"+JSON.stringify(t))}},getPaperSizeInfo:function(t){try{console.warn("getPaperSizeInfo \u662f\u4e00\u4e2a\u6d4b\u8bd5\u529f\u80fd\uff0c\u4ec5win\u5ba2\u6237\u7aef\u652f\u6301\u8be5api\uff01"),this.socket.emit("getPaperSizeInfo",t)}catch(t){console.log("getPaperSizeInfo error:"+JSON.stringify(t))}},getClients:function(){try{this.socket.emit("getClients")}catch(t){console.log("getClients error:"+JSON.stringify(t))}},getClientInfo:function(){try{this.socket.emit("getClientInfo")}catch(t){console.log("getClientInfo error:"+JSON.stringify(t))}},getAddress:function(t,...e){try{this.socket.emit("address",t,...e)}catch(t){console.log("getAddress error:"+JSON.stringify(t))}},ippPrint:function(t){try{this.socket.emit("ippPrint",t)}catch(t){console.log("ippPrint error:"+JSON.stringify(t))}},ippRequest:function(t){try{this.socket.emit("ippRequest",t)}catch(t){console.log("ippRequest error:"+JSON.stringify(t))}},setHost:function(t,e,n){"function"==typeof e&&(n=e,e=void 0),this.host=t,this.token=e,this.stop(),this.start(n)},start:function(t){var e=this,i=this;window.WebSocket?this.socket||(this.socket=(0,g.io)(this.host,{transports:["websocket"],reconnectionAttempts:5,auth:{token:this.token}}),this.socket.on("connect",(function(o){i.opened=!0,console.log("Websocket opened."),e.socket.on("success",(function(t){D.event.trigger("printSuccess_"+t.templateId,t)})),e.socket.on("error",(function(t){D.event.trigger("printError_"+t.templateId,t)})),e.socket.on("clients",(function(t){i.clients=t,D.event.trigger("clients",t)})),e.socket.on("clientInfo",(function(t){i.clientInfo=t,D.event.trigger("clientInfo",t)})),e.socket.on("printerList",(function(t){i.printerList=t,D.event.trigger("printerList",t)})),e.socket.on("paperSizeInfo",(function(t){i.paperSize=Array.isArray(t)?t:[t],D.event.trigger("paperSizeInfo",i.paperSize)})),e.socket.on("address",(function(t,e,n){D.event.trigger("address_"+t,{addr:e,e:n})})),e.socket.on("ippPrinterConnected",(function(t){D.event.trigger("ippPrinterConnected",t)})),e.socket.on("ippPrinterCallback",(function(t,e){D.event.trigger("ippPrinterCallback",{err:t,res:e})})),e.socket.on("ippRequestCallback",(function(t,e){D.event.trigger("ippRequestCallback",{err:t,res:e})})),i.state=n,t&&t(!0,o)})),this.socket.on("connect_error",(function(t){console.error(t),D.event.trigger("connect_error",t)})),this.socket.on("disconnect",(function(){i.opened=!1,t&&t(!1)}))):console.log("WebSocket start fail"),t&&t(!1)},reconnect:function(){this.state!==n&&this.state!==i||(this.stop(),this.ensureReconnectingState()&&(console.log("Websocket reconnecting."),this.start()))},stop:function(){this.socket&&(console.log("Closing the Websocket."),this.socket.close(),this.socket=null,this.printerList=[])},ensureReconnectingState:function(){return this.state=i,this.state===i}}},function(t,e,n){var i=n(28);"string"==typeof i&&(i=[[t.i,i,""]]);n(30)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(29)(!1)).push([t.i,".hicontextmenu{position:absolute;display:inline-block;width:215px;padding:0;margin:0;font-family:inherit;font-size:inherit;list-style:none;background:#fff;border:1px solid #bebebe;border-radius:2px;font-size:13px;}.hicontextmenuroot .hicontextmenuitem{position:relative;box-sizing:content-box;padding:.2em 12px;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;}.hicontextmenuroot>.hicontextmenuitem:hover,.hicontextmenuroot .hicontextmenuitem>a:hover{background-color:#f3f3f3;}.hicontextmenuroot .hicontextmenuitem>a{text-decoration:none;color:#363636;line-height:22px;}.hicontextmenuroot .hicontextsubmenu>ul{display:none;position:absolute;}.hicontextmenuroot .hicontextsubmenu:hover>ul{display:block;left:100%;top:-1px;margin-left:0;}.hicontextmenuroot .borderBottom{border-bottom:1px solid #efe6e6;}.hicontextmenuroot .disable>a{color:#ccc;}.hicontextmenuroot>.disable:hover,.hicontextmenuroot .disable>a:hover{background-color:#fff;}",""])},function(t,e,n){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,i=t[1]||"",o=t[3];if(!o)return i;if(e&&"function"==typeof btoa){var r=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map((function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"}));return[i].concat(a).concat([r]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];null!=r&&(i[r]=!0)}for(o=0;o<t.length;o++){var a=t[o];null!=a[0]&&i[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){var i,o,r={},a=(i=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=i.apply(this,arguments)),o}),s=function(){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var i=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,e,n);if(window.HTMLIFrameElement&&S(i,window.HTMLIFrameElement))try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}}(),p=null,l=0,u=[],d=n(31);function h(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=r[i.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](i.parts[a]);for(;a<i.parts.length;a++)o.parts.push(y(i.parts[a],e))}else{var s=[];for(a=0;a<i.parts.length;a++)s.push(y(i.parts[a],e));r[i.id]={id:i.id,refs:1,parts:s}}}}function c(t,e){for(var n=[],i={},o=0;o<t.length;o++){var r=t[o],a=e.base?r[0]+e.base:r[0],s={css:r[1],media:r[2],sourceMap:r[3]};i[a]?i[a].parts.push(s):n.push(i[a]={id:a,parts:[s]})}return n}function f(t,e){var n=s(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=u[u.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),u.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=O(t.insertAt)||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=s(t.insertAt.before,n);n.insertBefore(e,o)}}function g(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=u.indexOf(t);e>=0&&u.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var i=n.nc;i&&(t.attrs.nonce=i)}return v(e,t.attrs),f(t,e),e}function v(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function y(t,e){var n,i,o,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var a=l++;n=p||(p=m(e)),i=w.bind(null,n,a,!1),o=w.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),f(t,e),e}(e),i=function(t,e,n){var i=n.css,o=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||r)&&(i=d(i)),o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([i],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),o=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),i=function(t,e){var n=e.css,i=e.media;if(i&&t.setAttribute("media",i),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){g(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=("undefined"==typeof document?"undefined":O(document)))throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==O(e.attrs)?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=c(t,e);return h(n,e),function(t){for(var i=[],o=0;o<n.length;o++){var a=n[o];(s=r[a.id]).refs--,i.push(s)}for(t&&h(c(t,e),e),o=0;o<i.length;o++){var s;if(0===(s=i[o]).refs){for(var p=0;p<s.parts.length;p++)s.parts[p]();delete r[s.id]}}}};var b,T=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function w(t,e,n,i){var o=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=T(e,o);else{var r=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,i=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,r=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(o=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(t,e){var n,i;window,document,n=R,(i=function(t,e){this.init(t,e)}).prototype={init:function(t,e){this.ele=t,this.defaults={menu:[{text:"text",menus:[{},{}],callback:function(){}}],target:function(t){},width:100,itemHeight:28,bgColor:"#fff",color:"#333",fontSize:14,hoverBgColor:"#f5f5f5"},this.opts=n.extend(!0,{},this.defaults,e),this.random=(new Date).getTime()+parseInt(1e3*Math.random()),this.eventBind()},renderMenu:function(t,e){var n=this,i=e;if(t&&t.length){var o=p()('<ul class="hicontextmenu" style="z-index: 9999;"></ul>');i||(i=o).addClass("hicontextmenuroot"),p().each(t,(function(t,e){var i=!!e.disable&&e.disable(),r=p()('<li class="hicontextmenuitem"><a href="javascript:void(0);"><span>'+(e.text||"")+"</span></a></li>");i&&r.addClass("disable"),e.borderBottom&&r.addClass("borderBottom"),e.menus&&(r.addClass("hicontextsubmenu"),n.renderMenu(e.menus,r)),e.callback&&r.click((function(t){p()(this).hasClass("disable")||(p()(".hicontextmenuroot").remove(),e.callback()),t.stopPropagation()})),o.append(r)})),e&&e.append(o)}e||p()("body").append(i).find(".hicontextmenuroot").hide()},setPosition:function(t){p()(".hicontextmenuroot").css({left:t.pageX+2,top:t.pageY+2}).show()},eventBind:function(){var t=this;this.ele.on("contextmenu",(function(e){p()(".hicontextmenuroot").remove(),e.preventDefault(),t.renderMenu(t.opts.menus),t.setPosition(e),t.opts.target&&"function"==typeof t.opts.target&&t.opts.target(n(this))})),n("body").on("click",(function(){n(".hicontextmenuroot").remove()}))}},n.fn.hicontextMenu=function(t){return new i(this,t),this}},function(t,e,n){n.r(e),n(22),n(23),n(24),n(25);var i=n(0);n(26),n(27),n(32);var o,r,a,s,l,u,d,h,g,m,v,y,T,x,P=function(){function t(){this.allElementTypes=[]}return Object.defineProperty(t,"instance",{get:function(){return t._instance||(t._instance=new t),t._instance},enumerable:!0,configurable:!0}),t.prototype.addPrintElementTypes=function(t,e){var n=this;this[t]?this[t]=this[t].concat(e):this[t]=e,e.forEach((function(t){n.allElementTypes=n.allElementTypes.concat(t.printElementTypes)}))},t.prototype.removePrintElementTypes=function(t){var e=this;delete e[t],e.allElementTypes=e.allElementTypes.filter((function(e){return!e.tid.startsWith(t)}))},t.prototype.getElementTypeGroups=function(t){return this[this.formatterModule(t)]||[]},t.prototype.getElementType=function(t){var e=this.allElementTypes.filter((function(e){return e.tid==t}));if(e.length>0)return e[0]},t.prototype.updateElementType=function(t,e){var n=this.getElementType(t);if(e){var i=e(n),o=this.allElementTypes.findIndex((function(e){return e.tid==t}));if(o>=0)return this.allElementTypes.splice(o,1,i),i}return n},t.prototype.formatterModule=function(t){return t||"_default"},t}(),I=n(1),R=n(2),k=function(){function t(){}return t.prototype.createPrintElementTypeHtml=function(t,e){var n=p()('<ul class="hiprint-printElement-type"></ul>');return e.forEach((function(t){var e=p()("<li></li>");e.append('<span class="title">'+t.name+"</span>");var i=p()("<ul></ul>");e.append(i),t.printElementTypes.forEach((function(t){i.append('<li><a class="ep-draggable-item" tid="'+t.tid+'"> '+t.getText()+" </a></li>")})),n.append(e)})),p()(t).append(n),n.find(".ep-draggable-item")},t}(),M=n(5),_=n(15),B=function(t){this.title=t.title,this.type=t.type},N=function(t){this.title=t.title,this.type=t.type,this.editable=t.editable,this.columnDisplayEditable=t.columnDisplayEditable,this.columnDisplayIndexEditable=t.columnDisplayIndexEditable,this.columnTitleEditable=t.columnTitleEditable,this.columnResizable=t.columnResizable,this.columnAlignEditable=t.columnAlignEditable,this.isEnableEditField=t.isEnableEditField,this.isEnableContextMenu=t.isEnableContextMenu,this.isEnableInsertRow=t.isEnableInsertRow,this.isEnableDeleteRow=t.isEnableDeleteRow,this.isEnableInsertColumn=t.isEnableInsertColumn,this.isEnableDeleteColumn=t.isEnableDeleteColumn,this.isEnableMergeCell=t.isEnableMergeCell},A=function(){function t(t){var e=this;this.text=t.text,this.field=t.field,this.fields=t.fields,this.title=t.title,this.tid=t.tid,this.data=t.data,this.styler=t.styler,this.formatter=t.formatter,this.type=t.type,this.options=t.options,this.editable=null==t.editable||t.editable,this.columnDisplayEditable=null==t.columnDisplayEditable||t.columnDisplayEditable,this.columnDisplayIndexEditable=null==t.columnDisplayIndexEditable||t.columnDisplayIndexEditable,this.columnTitleEditable=null==t.columnTitleEditable||t.columnTitleEditable,this.columnResizable=null==t.columnResizable||t.columnResizable,this.columnAlignEditable=null==t.columnAlignEditable||t.columnAlignEditable,this.columns=[],(t.columns||[]).forEach((function(t,n){e.columns.push(e.createTableColumnArray(t))})),this.rowStyler=t.rowStyler,this.striped=t.striped,this.groupFields=t.groupFields||[],this.groupFormatter=t.groupFormatter,this.groupFooterFormatter=t.groupFooterFormatter,this.footerFormatter=t.footerFormatter,this.rowsColumnsMerge=t.rowsColumnsMerge,this.rowsColumnsMergeClean=t.rowsColumnsMergeClean,this.groupSequenceContinue=t.groupSequenceContinue,this.gridColumnsFooterFormatter=t.gridColumnsFooterFormatter,this.isEnableEditField=null==t.isEnableEditField||t.isEnableEditField,this.isEnableContextMenu=null==t.isEnableContextMenu||t.isEnableContextMenu,this.isEnableInsertRow=null==t.isEnableInsertRow||t.isEnableInsertRow,this.isEnableDeleteRow=null==t.isEnableDeleteRow||t.isEnableDeleteRow,this.isEnableInsertColumn=null==t.isEnableInsertColumn||t.isEnableInsertColumn,this.isEnableDeleteColumn=null==t.isEnableDeleteColumn||t.isEnableDeleteColumn,this.isEnableMergeCell=null==t.isEnableMergeCell||t.isEnableMergeCell,this.columnObj=this.makeColumnObj()}return t.prototype.getText=function(){return this.text||this.title||""},t.prototype.createPrintElement=function(t){var e=this;return this.columns&&0==this.columns.length&&(t.columns||[]).forEach((function(t,n){e.columns.push(e.createTableColumnArray(t))})),new _.a(this,t)},t.prototype.getData=function(){return[{}]},t.prototype.createTableColumnArray=function(t){var e=[];return t.forEach((function(t,n){e.push(new M.a(t))})),e},t.prototype.getPrintElementTypeEntity=function(){return"table"==this.type?new N({title:this.title,type:this.type,editable:this.editable,columnDisplayEditable:this.columnDisplayEditable,columnDisplayIndexEditable:this.columnDisplayIndexEditable,columnResizable:this.columnResizable,columnAlignEditable:this.columnAlignEditable,columnTitleEditable:this.columnTitleEditable,isEnableEditField:this.isEnableEditField,isEnableContextMenu:this.isEnableContextMenu,isEnableInsertRow:this.isEnableInsertRow,isEnableDeleteRow:this.isEnableDeleteRow,isEnableInsertColumn:this.isEnableInsertColumn,isEnableDeleteColumn:this.isEnableDeleteColumn,isEnableMergeCell:this.isEnableMergeCell}):new B({title:this.title,type:this.type})},t.prototype.getFields=function(){return this.fields},t.prototype.getOptions=function(){return this.options||{}},t.prototype.getColumnByColumnId=function(t){return this.columnObj[t]},t.prototype.makeColumnObj=function(t){var e={};return t?t.forEach((function(t){(t.id||t.columnId)&&(e[t.id||t.columnId]=t)})):this.columns&&this.columns.forEach((function(t){t.forEach((function(t){(t.id||t.columnId)&&(e[t.id||t.columnId]=t)}))})),this.columnObj=e,e},t}(),V=n(4),z=n(3),j=(o=function(t,e){return(o=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),W=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.image.default).getPrintElementOptionEntity()),i}return j(e,t),e.prototype.getReizeableShowPoints=function(){return["s","e","se","r"]},e.prototype.getData=function(t){var e="",n=this.getField();e=t&&n?n.split(".").reduce(((e,n)=>e?e[n]:t[n]),!1)||"":this.options.src||this.printElementType.getData();var i=this.getFormatter();return i&&(e=i(e,this.options,this._currenttemplateData)),e||""},e.prototype.createTarget=function(t,e){var n=p()('<div class="hiprint-printElement hiprint-printElement-image" style="position: absolute;"><div class="hiprint-printElement-image-content" style="height:100%;width:100%"></div></div>');return this.updateTargetImage(n,t,e),n},e.prototype.initSizeByHtml=function(e){t.prototype.initSizeByHtml.call(this,e),this.css(e,this.getData())},e.prototype.getConfigOptions=function(){return I.a.instance.image},e.prototype.updateDesignViewFromOptions=function(){this.designTarget&&(this.css(this.designTarget,this.getData()),this.updateTargetImage(this.designTarget,this.getTitle(),this.getData()))},e.prototype.updateTargetImage=function(t,e,n){var i=t.find(".hiprint-printElement-image-content");i.find("img").length?i.find("img").attr("src",n):i.html('<img style="width:100%;height:100%;" src="'+n+'">'),n.length?i.find("img").css("cssText",`width:100%;height:100%;content:url("${n}")!important`):i.find("img").css("cssText","width:100%;height:100%;"),this.options.fit&&i.find("img").css("object-fit",this.options.fit),this.options.borderRadius&&i.find("img").css("border-radius",this.options.borderRadius)},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(V.a),Y=(x=function(t,e){return(x=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),G=function(t){function e(e){var n=this;return e=e||{},(n=t.call(this,e)||this).leftSpaceRemoved=e.leftSpaceRemoved,n}return Y(e,t),e.prototype.getHideTitle=function(){return null==this.hideTitle?this.defaultOptions.hideTitle:this.hideTitle},e}(z.a),$=n(8),q=function(){function t(t,e,n,o,r,a,s,l,u,d,h,c,f,g,m,v){this.panelPageRule=o,this.scale=r,this.watermarkOptions=n,this.defaultPaperNumberFormat="${page}-${total}",this.printLine=0,this.templateId=t,this.panelIdx=e,this.width=i.a.mm.toPt(a),this.height=i.a.mm.toPt(s),this.mmwidth=a,this.mmheight=s,this.paperHeader=l>=0?l:0,this.paperFooter=u,this.contentHeight=u-l,this.createTarget(),this.index=m,this.paperNumberLeft=d||parseInt((this.width-30).toString()),this.paperNumberTop=h||parseInt((this.height-22).toString()),this.paperNumberDisabled=c,this.paperNumberContinue=f,this.paperNumberFormat=g,this.referenceElement=v?p().extend({},v):new $.a({top:0,left:0,height:0,width:0,bottomInLastPaper:0,beginPrintPaperIndex:0,printTopInPaper:0,endPrintPaperIndex:0})}return t.prototype.subscribePaperBaseInfoChanged=function(t){this.onPaperBaseInfoChanged=t},t.prototype.triggerOnPaperBaseInfoChanged=function(t){this.onPaperBaseInfoChanged&&this.onPaperBaseInfoChanged({panelPageRule:this.panelPageRule,scale:this.scale,paperHeader:this.paperHeader,paperFooter:this.paperFooter,paperNumberLeft:this.paperNumberLeft,paperNumberTop:this.paperNumberTop,paperNumberDisabled:this.paperNumberDisabled,paperNumberContinue:this.paperNumberContinue,paperNumberFormat:this.paperNumberFormat}),i.a.event.trigger("hiprintTemplateDataChanged_"+this.templateId,t||"\u6a21\u677f\u8c03\u6574")},t.prototype.setFooter=function(t,e,n,i){this.firstPaperFooter=t,this.evenPaperFooter=e,this.oddPaperFooter=n,this.lastPaperFooter=i},t.prototype.setOffset=function(t,e){this.setLeftOffset(t),this.setTopOffset(e)},t.prototype.setLeftOffset=function(t){t?this.paperContentTarget.css("left",t+"pt"):this.paperContentTarget[0].style.left=""},t.prototype.setTopOffset=function(t){t?this.paperContentTarget.css("top",t+"pt"):this.paperContentTarget[0].style.top=""},t.prototype.createTarget=function(){this.target=p()('<div class="hiprint-printPaper"><div class="hiprint-printPaper-content"></div></div>'),this.paperContentTarget=this.target.find(".hiprint-printPaper-content"),this.target.css("width",this.mmwidth+"mm"),this.target.css("height",this.mmheight-I.a.instance.paperHeightTrim+"mm"),this.target.attr("original-height",this.mmheight),this.zoom(this.scale)},t.prototype.createHeaderLine=function(){var t=this;this.headerLinetarget=p()('<div class="hiprint-headerLine" style="position: absolute;width: 100%;border-top: 1px dashed #c9bebe;height: 7pt;"></div>'),this.headerLinetarget.css("top",(this.paperHeader||-1)+"pt"),0==this.paperHeader&&this.headerLinetarget.addClass("hideheaderLinetarget"),this.paperContentTarget.append(this.headerLinetarget),this.dragHeadLineOrFootLine(this.headerLinetarget,(function(e,n){n>=t.paperFooter&&(n=t.paperFooter-10),t.paperHeader=n>=0?n:0,t.triggerOnPaperBaseInfoChanged()}))},t.prototype.createFooterLine=function(){var t=this;this.footerLinetarget=p()('<div class="hiprint-footerLine" style="position: absolute;width: 100%;border-top: 1px dashed #c9bebe;height: 7pt;"></div>'),this.footerLinetarget.css("top",parseInt(this.paperFooter.toString())+"pt"),this.paperFooter==this.height&&(this.footerLinetarget.css("top",this.mmheight-I.a.instance.paperHeightTrim+"mm"),this.footerLinetarget.addClass("hidefooterLinetarget")),this.paperContentTarget.append(this.footerLinetarget),this.dragHeadLineOrFootLine(this.footerLinetarget,(function(e,n){n<=t.paperHeader&&(n=t.paperHeader+10),t.paperFooter=n,t.triggerOnPaperBaseInfoChanged()}))},t.prototype.createPaperNumber=function(t,e){var n=this,i=this.target.find(".hiprint-paperNumber");if(i.length)return i.html(t),i;var o=p()('<span class="hiprint-paperNumber" style="position: absolute">'+t+"</span>");return o.css("top",this.paperNumberTop+"pt"),o.css("left",this.paperNumberLeft+"pt"),this.paperContentTarget.append(o),e&&this.dragHeadLineOrFootLine(o,(function(t,e){n.paperNumberTop=e,n.paperNumberLeft=t,n.triggerOnPaperBaseInfoChanged()}),!0),o},t.prototype.getTarget=function(){return this.target},t.prototype.append=function(t){this.paperContentTarget.append(t)},t.prototype.updateReferenceElement=function(t){t&&(this.referenceElement=t)},t.prototype.updatePrintLine=function(t){t>=this.printLine&&(this.printLine=t)},t.prototype.design=function(t){var e=this;this.createHeaderLine(),this.createFooterLine(),this.target.addClass("design"),this.target.on("contextmenu",(()=>!1)),t&&t.grid&&this.target.addClass("grid"),this.paperNumberTarget=this.createPaperNumber(this.formatPaperNumber(1,1),!0),t&&t.ruler&&this.createRuler(),this.createWaterMark(!0,this.panelIdx,this.watermarkOptions),this.resetPaperNumber(this.paperNumberTarget),p()(this.paperNumberTarget).bind("dblclick.hiprint",(function(){null==e.paperNumberDisabled&&(e.paperNumberDisabled=!1),e.paperNumberDisabled=!e.paperNumberDisabled,e.resetPaperNumber(e.paperNumberTarget),e.triggerOnPaperBaseInfoChanged("\u521d\u59cb")})),p()(this.paperNumberTarget).bind("click.hiprint",(function(){i.a.event.trigger("BuildCustomOptionSettingEventKey_"+e.templateId,{options:{paperNumberFormat:e.paperNumberFormat,paperNumberDisabled:e.paperNumberDisabled,paperNumberContinue:e.paperNumberContinue},callback:function(t){e.paperNumberDisabled=!!t.paperNumberDisabled||void 0,e.paperNumberContinue=t.paperNumberContinue,e.paperNumberFormat=t.paperNumberFormat?t.paperNumberFormat:void 0,e.createPaperNumber(e.formatPaperNumber(1,1),!0),e.resetPaperNumber(e.paperNumberTarget),e.triggerOnPaperBaseInfoChanged()}})}))},t.prototype.resetPaperNumber=function(t){this.paperNumberDisabled?t.addClass("hiprint-paperNumber-disabled"):t.removeClass("hiprint-paperNumber-disabled")},t.prototype.updatePaperNumber=function(t,e,n){var i=this.createPaperNumber(this.formatPaperNumber(t,e));this.paperNumberDisabled?i.hide():n&&this.index%2==1&&(i[0].style.left="",i.css("right",this.paperNumberLeft+"pt"))},t.prototype.formatPaperNumber=function(t,e){return this.createWaterMark(!1,t,this.watermarkOptions),(this.paperNumberFormat?this.paperNumberFormat:this.defaultPaperNumberFormat).replace("${page}",t).replace("${total}",e)},t.prototype.dragHeadLineOrFootLine=function(t,e,n){var i=this;t.hidraggable({axis:n?void 0:"v",onDrag:function(t,n,i){e(n,i)},moveUnit:"pt",minMove:I.a.instance.movingDistance,onBeforeDrag:function(t){R.a.instance.draging=!0},getScale:function(){return i.scale||1},onStopDrag:function(t){i.headerLinetarget.css("top",i.paperHeader+"pt"),i.footerLinetarget.css("top",i.paperFooter+"pt"),R.a.instance.draging=!1,i.footerLinetarget.removeClass("hidefooterLinetarget"),i.headerLinetarget.removeClass("hideheaderLinetarget")}})},t.prototype.resize=function(t,e){var n=this.paperFooter/this.height;this.width=i.a.mm.toPt(t),this.height=i.a.mm.toPt(e),this.mmwidth=t,this.mmheight=e,this.target.css("width",t+"mm"),this.target.css("height",e-I.a.instance.paperHeightTrim+"mm"),this.target.attr("original-height",this.mmheight);var o=this.height*n;this.paperFooter=o||this.height,this.footerLinetarget.css("top",o+"pt"),this.contentHeight=this.paperFooter-this.paperHeader,this.paperNumberLeft=this.paperNumberLeft>this.width?parseInt((this.width-30).toString()):this.paperNumberLeft,this.paperNumberTop=this.paperNumberTop>this.height?this.paperNumberTop=parseInt((this.height-22).toString()):this.paperNumberTop,this.paperNumberTarget.css("top",this.paperNumberTop+"pt"),this.paperNumberTarget.css("left",this.paperNumberLeft+"pt"),this.triggerOnPaperBaseInfoChanged("\u8c03\u6574\u5927\u5c0f")},t.prototype.zoom=function(t){t&&(this.scale=t,this.target.css("transform","scale("+t+")"),t>1?this.target.css("transform-origin","-"+t+"% -"+t+"%"):this.target.css("transform-origin","0 0"),this.triggerOnPaperBaseInfoChanged("\u7f29\u653e"))},t.prototype.getPaperFooter=function(t){var e=this.index+t;return 0==e?this.firstPaperFooter?this.firstPaperFooter:this.oddPaperFooter?this.oddPaperFooter:this.paperFooter:e%2==0?this.oddPaperFooter?this.oddPaperFooter:this.paperFooter:e%2==1?this.evenPaperFooter?this.evenPaperFooter:this.paperFooter:void 0},t.prototype.getContentHeight=function(t){return this.getPaperFooter(t)-this.paperHeader},t.prototype.createRuler=function(){this.target.append('<div class="hiprint_rul_wrapper"><div class="h_img" ></div><div class="v_img" ></div></div>')},t.prototype.createWaterMark=function(t,e,n){var i=this,o=Object.assign({},n||{},{id:`${i.templateId}_${i.panelIdx}_${e||1}_${t?"design":i.index}`,watch:t,container:i.target[0]});o.container&&(o.content?(t&&f(Object.assign({},o,{id:`${i.templateId}_${i.panelIdx}_${e||1}_${i.index}`})),c(o)):f(o))},t.prototype.displayHeight=function(){return this.mmheight-I.a.instance.paperHeightTrim+"mm"},t.prototype.displayWidth=function(){return this.mmwidth+"mm"},t.prototype.getPanelTarget=function(){return this.target.parent(".hiprint-printPanel ")},t}(),X=n(6),U=(T=function(t,e){return(T=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}T(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),K=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new G(n),i.options.setDefault(new G(I.a.instance.longText.default).getPrintElementOptionEntity()),i}return U(e,t),e.prototype.getDesignTarget=function(e){var n=t.prototype.getDesignTarget.call(this,e);return n.find(".hiprint-printElement-longText-content").css("border","1px dashed var(--hiprint-border)"),n},e.prototype.getProxyTarget=function(t){t&&this.SetProxyTargetOption(t);var e=this.getData(),n=this.createTarget(this.printElementType.getText(!0),e);return this.updateTargetSize(n),this.css(n,e),n},e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData(),e=this.getHtml(this.designPaper)[0].target;this.designTarget.find(".hiprint-printElement-longText-content").html(e.find(".hiprint-printElement-longText-content").html()),this.css(this.designTarget,t)}},e.prototype.getConfigOptions=function(){return I.a.instance.longText},e.prototype.getTitle=function(){return this.options.title||this.printElementType.title},e.prototype.getData=function(t){var e=this.getField(),n=e&&e.split(".").reduce(((e,n)=>e?e[n]:t?t[n]:""),!1)||"";return t?n||"":this.options.testData||this.printElementType.getData()||""},e.prototype.updateTargetText=function(t,e,n){var i=t.find(".hiprint-printElement-longText-content"),o=this.getText(e,n);i.html(o)},e.prototype.createTarget=function(t,e){var n=p()('<div class="hiprint-printElement hiprint-printElement-longText" style="position: absolute;"><div class="hiprint-printElement-longText-content hiprint-printElement-content" style="height:100%;width:100%"></div></div>');return this.updateTargetText(n,t,e),n},e.prototype.getText=function(t,e){var n=this.getFormatter();return e&&(e=0!=this.options.leftSpaceRemoved?e.toString().replace(/^\s*/,""):e),(this.getField()?(this.options.getHideTitle()?"":t?t+"\uff1a":"")+(n?n(t,e,this.options,this._currenttemplateData):e):n?n(t,t,this.options,this._currenttemplateData):t||"")||""},e.prototype.getHtml=function(t,e){this.setCurrenttemplateData(e),this.createTempContainer();var n=this.getPaperHtmlResult(t,e);return this.removeTempContainer(),n},e.prototype.getHeightByData=function(t){this.createTempContainer();var e=this.getPaperHtmlResult(new q("","",void 0,1e3,1e3,0,25e3,0,0,!0,!0,void 0,0,void 0),{},t);return this.removeTempContainer(),e[0].referenceElement.bottomInLastPaper-e[0].referenceElement.printTopInPaper},e.prototype.getLongTextIndent=function(){return this.options.longTextIndent?'<span class="long-text-indent" style="margin-left:'+this.options.longTextIndent+'pt"></span>':'<span class="long-text-indent"></span>'},e.prototype.getPaperHtmlResult=function(t,e,n){var i=this,o=[],r=0,a=n||this.getData(e),s=this.getText(this.getTitle(),a),p=this.createTarget(this.getTitle(),this.options.testData||"");this.css(p,a),e?this.updateTargetWidth(p):this.updateTargetSize(p),this.getTempContainer().html(""),this.getTempContainer().append(p);var l=[this.getLongTextIndent()],u=s.split(new RegExp("\r|\n","g"));if(u.forEach((function(t,e){var n=0!=i.options.leftSpaceRemoved?(t||"").toString().replace(/^\s*/,""):t;l=l.concat(n.split("")),e<u.length-1&&l.push("<br/>"+i.getLongTextIndent())})),0==l.length&&(l=[""]),this.isHeaderOrFooter()||this.isFixed()||!e)return(f=this.getStringBySpecificHeight(l,25e3,p)).target.css("left",this.options.displayLeft()),f.target.css("top",this.options.displayTop()),f.target[0].height="",o.push(new X.a({target:f.target,printLine:this.options.displayTop()+f.height,referenceElement:new $.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:this.options.getTop()+f.height,printTopInPaper:this.options.getTop()})})),o;for(var d=this.getBeginPrintTopInPaperByReferenceElement(t);l.length>0;){var h=0,c=t.getPaperFooter(r);0==r&&d>c&&"none"!=t.panelPageRule&&(d=d-c+t.paperHeader,o.push(new X.a({target:void 0,printLine:void 0})),r++,h=t.getContentHeight(r)-(d-t.paperHeader),c=t.getPaperFooter(r));var f=this.getStringBySpecificHeight(l,h>0?h:0==r?c-d:t.getContentHeight(r),p);l.splice(0,f.length);var g=void 0,m=void 0;f.target.css("left",this.options.displayLeft()),f.target[0].height="",0==r||h>0?(m=d,f.target.css("top",m+"pt"),g=l.length>0?d+f.height:null!=this.options.lHeight?d+(f.height>this.options.lHeight?f.height:this.options.lHeight):d+f.height):(m=t.paperHeader,f.target.css("top",m+"pt"),g=m+f.height),o.push(new X.a({target:f.target,printLine:g,referenceElement:new $.a({top:this.options.getTop(),left:this.options.getLeft(),height:this.options.getHeight(),width:this.options.getWidth(),beginPrintPaperIndex:t.index,bottomInLastPaper:g,printTopInPaper:m})})),r++,e&&this.updatePanelHeight(g+this.options.getHeight(),t)}return o},e.prototype.getStringBySpecificHeight=function(t,e,n){var o=i.a.pt.toPx(e),r=void 0;return(r="none"==this.panel.panelPageRule?this.IsPaginationIndex(t,t.length,-1,n):this.IsPaginationIndex(t,t.length-1,o,n)).IsPagination?r:this.BinarySearch(t,0,t.length-1,o,n)},e.prototype.BinarySearch=function(t,e,n,i,o){var r=Math.floor((e+n)/2);if(e>n)return o.find(".hiprint-printElement-longText-content").html(""),{IsPagination:!0,height:0,length:0,target:o.clone()};var a=this.IsPaginationIndex(t,r,i,o);return a.IsPagination?a:"l"==a.move?this.BinarySearch(t,e,r-1,i,o):this.BinarySearch(t,r+1,n,i,o)},e.prototype.IsPaginationIndex=function(t,e,n,o){if(-1==n){o.find(".hiprint-printElement-longText-content").html(t.slice(0,e).join(""));var r=o.height();return{IsPagination:!0,height:i.a.px.toPt(r),length:t.length,target:o.clone()}}o.find(".hiprint-printElement-longText-content").html(t.slice(0,e+2).join(""));var a=o.height();o.find(".hiprint-printElement-longText-content").html(t.slice(0,e+1).join(""));r=o.height();return e>=t.length-1&&r<n?{IsPagination:!0,height:i.a.px.toPt(r),length:t.length,target:o.clone()}:r<=n&&a>=n?{IsPagination:!0,height:r,length:e+1,target:o.clone()}:r>=n?{IsPagination:!1,move:"l"}:a<=n?{IsPagination:!1,move:"r"}:{IsPagination:!0,result:1}},e}(V.a),J=function(){function t(){}return t.replaceEnterAndNewline=function(t,e){return t.replace(new RegExp("\r|\n|/g","g"),e)},t.replaceTab=function(t,e){return t.replace(new RegExp("\t/g","g"),e)},t.replaceEnterAndNewlineAndTab=function(t,e){return t.replace(new RegExp("\r|\n|\t|/g","g"),e)},t}(),Q=(y=function(t,e){return(y=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Z=function(t){function e(e){var n=t.call(this,e)||this;return n.title&&(n.title=J.replaceEnterAndNewlineAndTab(n.title,"")),n}return Q(e,t),e.prototype.getHideTitle=function(){return null==this.hideTitle?this.defaultOptions.hideTitle:this.hideTitle},e.prototype.getTextType=function(){return(null==this.textType?this.defaultOptions.textType:this.textType)||"text"},e.prototype.getFontSize=function(){return(null==this.fontSize?this.defaultOptions.fontSize:this.fontSize)||9},e.prototype.getbarcodeMode=function(){return(null==this.barcodeMode?this.defaultOptions.barcodeMode:this.barcodeMode)||"CODE128"},e.prototype.getBarTextMode=function(){return(null==this.barTextMode?this.defaultOptions.barTextMode:this.barTextMode)||"text"},e.prototype.getBarWidth=function(){return(null==this.barWidth?this.defaultOptions.barWidth:this.barWidth)||1},e.prototype.getBarAutoWidth=function(){return(null==this.barAutoWidth?"true"===this.defaultOptions.barAutoWidth:"true"===this.barAutoWidth)??!0},e.prototype.getQRcodeLevel=function(){return(null==this.qrCodeLevel?this.defaultOptions.qrCodeLevel:this.qrCodeLevel)||0},e}(z.a),tt=(v=function(t,e){return(v=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),et=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new Z(n),i.options.setDefault(new Z(I.a.instance.text.default).getPrintElementOptionEntity()),i}return tt(e,t),e.prototype.getDesignTarget=function(e){return t.prototype.getDesignTarget.call(this,e)},e.prototype.getProxyTarget=function(t){t&&this.SetProxyTargetOption(t);var e=this.getData(),n=this.createTarget(this.printElementType.getText(!0),e);return this.updateTargetSize(n),this.css(n,e),n},e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t),this.updateTargetText(this.designTarget,this.getTitle(),t)}},e.prototype.getConfigOptions=function(){return I.a.instance.text},e.prototype.getTitle=function(){var t=this.options.title||this.printElementType.title||"";return t&&(t=J.replaceEnterAndNewlineAndTab(t,"")),t},e.prototype.getData=function(t){let e;const n=this.getField();if(e=t?n&&n.split(".").reduce(((e,n)=>e?e[n]:t[n]||""),"")||"":this.options.testData||this.printElementType.getData()||"",this.options.format){const{dataType:o,format:r}=this.options;if("datetime"===o)return i.a.dateFormat(e,r);if("boolean"===o){const[t,n]=r.split(":");if(t&&n)return!0===e||"true"===e?t:n}if("format"===o){return C({key:n,value:e,source:t,format:this.options.format})}}return e},e.prototype.updateTargetText=function(t,e,n,o,r){var a,s=this.getFormatter(),l=t.find(".hiprint-printElement-text-content");a=this.getField()?(this.options.getHideTitle()?"":e?e+"\uff1a":"")+D.toUpperCase(this.options.upperCase,s?s(e,n,this.options,this._currenttemplateData,t):n):n=D.toUpperCase(this.options.upperCase,s?s(e,e,this.options,this._currenttemplateData,t):e);var u=this.options.getTextType();if("text"==u)l.html(a);else{if("barcode"==u){l.css({display:"flex","flex-direction":"column"});var d="text"==this.options.getBarTextMode();l.html('<svg width="100%" display="block" height="100%" class="hibarcode_imgcode" preserveAspectRatio="none slice"></svg>'),d&&l.append('<div class="hibarcode_displayValue" style="white-space:nowrap">');try{n?(w(l.find(".hibarcode_imgcode")[0],n,{format:this.options.getbarcodeMode(),width:this.options.getBarWidth(),textMargin:-1,lineColor:this.options.color||"#000000",margin:0,height:parseInt(i.a.pt.toMm(this.options.getHeight()||10).toString()),_width:parseInt(i.a.pt.toMm(this.options.getWidth()||10).toString()),displayValue:!d&&!this.options.hideTitle,includetext:!d}),l.find(".hibarcode_imgcode").attr("height","100%"),l.find(".hibarcode_imgcode").attr("width","100%"),d&&(this.options.hideTitle||l.find(".hibarcode_displayValue").html(n))):l.html("")}catch(t){console.log(t),l.html("\u6b64\u683c\u5f0f\u4e0d\u652f\u6301\u8be5\u6587\u672c")}}if("qrcode"==u){l.html("");try{if(n){l.css({display:"flex","flex-direction":"column"});var h=this.options.width,c=this.options.height-(this.options.hideTitle?0:this.options.lineHeight??1.5*(this.options.fontSize??10.5)),f=p()('<div class="hiqrcode_imgcode"></div>').css({width:Math.min(h,c)+"pt",height:Math.min(h,c)+"pt",margin:"auto"});new E(f[0],{width:"100%",height:"100%",colorDark:this.options.color||"#000000",useSVG:!0,correctLevel:this.options.getQRcodeLevel(),bcid:this.options.qrcodeType||"qrcode"}).makeCode(n),l.html(f),!this.options.hideTitle&&l.append(`<div class="hiqrcode_displayValue" style="white-space:nowrap">${n}</div>`)}}catch(t){console.log(t),l.html("\u4e8c\u7ef4\u7801\u751f\u6210\u5931\u8d25")}}}},e.prototype.onResize=function(e,n,i,o,r){t.prototype.onResize.call(this,e,n,i,o,r),"barcode"!=this.options.getTextType()&&"qrcode"!=this.options.getTextType()||this.updateTargetText(this.designTarget,this.getTitle(),this.getData())},e.prototype.createTarget=function(t,e,n){var i=p()('<div tabindex="1" class="hiprint-printElement hiprint-printElement-text" style="position: absolute;"><div class="hiprint-printElement-text-content hiprint-printElement-content" style="height:100%;width:100%"></div></div>');return this.updateTargetText(i,t,e,n),i},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(V.a),nt=(m=function(t,e){return(m=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}m(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),it=function(t){function e(e){return t.call(this,e)||this}return nt(e,t),e}(z.a),ot=(g=function(t,e){return(g=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),rt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new it(n),i.options.setDefault(new it(I.a.instance.html.default).getPrintElementOptionEntity()),i}return ot(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t),this.updateTargetHtml()}},e.prototype.updateTargetHtml=function(){var t=this.getFormatter();if(t){var e=t(this.getData(),this.options,this._currenttemplateData);this.designTarget.find(".hiprint-printElement-html-content").html(e)}},e.prototype.getConfigOptions=function(){return I.a.instance.html},e.prototype.createTarget=function(t,e){var n=p()('<div class="hiprint-printElement hiprint-printElement-html" style="position: absolute;"><div class="hiprint-printElement-html-content" style="height:100%;width:100%"></div></div>'),i=this.getFormatter();if(i){var o=i(this.getData(),this.options,this._currenttemplateData);n.find(".hiprint-printElement-html-content").append(o)}else this.options.content&&n.find(".hiprint-printElement-html-content").append(this.options.content);return n},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(V.a),at=(h=function(t,e){return(h=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),st=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.vline.default).getPrintElementOptionEntity()),i}return at(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t)}},e.prototype.getConfigOptions=function(){return I.a.instance.vline},e.prototype.createTarget=function(t,e){return p()('<div class="hiprint-printElement hiprint-printElement-vline" style="border-left:1px solid;position: absolute;"></div>')},e.prototype.getReizeableShowPoints=function(){return["s","r"]},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(V.a),pt=(d=function(t,e){return(d=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),lt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.hline.default).getPrintElementOptionEntity()),i}return pt(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t)}},e.prototype.getConfigOptions=function(){return I.a.instance.hline},e.prototype.createTarget=function(t,e){return p()('<div class="hiprint-printElement hiprint-printElement-hline" style="border-top:1px solid;position: absolute;"></div>')},e.prototype.getReizeableShowPoints=function(){return["e","r"]},e}(V.a),ut=(u=function(t,e){return(u=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),dt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.rect.default).getPrintElementOptionEntity()),i}return ut(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t)}},e.prototype.getConfigOptions=function(){return I.a.instance.rect},e.prototype.createTarget=function(t,e){return p()('<div class="hiprint-printElement hiprint-printElement-rect" style="border:1px solid;position: absolute;"></div>')},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(V.a),ht=(l=function(t,e){return(l=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),ct=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.oval.default).getPrintElementOptionEntity()),i}return ht(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t)}},e.prototype.getConfigOptions=function(){return I.a.instance.oval},e.prototype.createTarget=function(t,e){return p()('<div class="hiprint-printElement hiprint-printElement-oval" style="border:1px solid;position: absolute;border-radius: 50%;"></div>')},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(V.a),ft=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.barcode.default).getPrintElementOptionEntity()),i}return ht(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t),this.initBarcode(this.designTarget,this.getTitle(),this.getData())}},e.prototype.getConfigOptions=function(){return I.a.instance.barcode},e.prototype.getBarAutoWidth=function(){return(null==this.options.barAutoWidth?"true"===this.options.defaultOptions.barAutoWidth:"true"===this.options.barAutoWidth)??!0},e.prototype.onResize=function(e,n,i,o,r){t.prototype.onResize.call(this,e,n,i,o,r),this.initBarcode(this.designTarget,this.getTitle(),this.getData())},e.prototype.getTitle=function(){return this.options.title||this.printElementType.title},e.prototype.getData=function(t){var e,n=this.getField();return e=t?n&&n.split(".").reduce(((e,n)=>e?e[n]:t?t[n]:""),!1)||"":this.options.testData||this.printElementType.getData()||"",e},e.prototype.initBarcode=function(t,e,n){var o=(t=t||this.designTarget).find(".hiprint-printElement-barcode-content");try{const t=i.a.pt.toMm(this.options.height-(this.options.hideTitle?0:this.options.lineHeight??1.5*(this.options.fontSize??10.5)));var r=b({bcid:this.options.barcodeType||"code128",text:n||this.options.testData||this.options.title,scale:this.options.barWidth||1,width:this.getBarAutoWidth()?"":parseInt(i.a.pt.toMm(this.options.getWidth())),height:parseInt(t),includetext:!this.options.hideTitle,barcolor:this.options.barColor||"#000"});(r=p()(r)).attr("preserveAspectRatio","none slice");let e=r[0].attributes.viewBox.value.split(" ")[2];e=Math.ceil(D.px.toPt(1.05*e)),this.getBarAutoWidth()&&e>this.options.width&&(o.parent().css("width",e+"pt"),r.css("height","100%"),this.options.width=e),o.html(r)}catch(t){console.error(t),o.html(p()("<div>\u6761\u5f62\u7801\u751f\u6210\u5931\u8d25</div>"))}},e.prototype.getReizeableShowPoints=function(){return["s","e","se","r"]},e.prototype.createTarget=function(t,e){var n=p()('<div class="hiprint-printElement hiprint-printElement-barcode" style="position: absolute;"><div class="hiprint-printElement-barcode-content" style="height:100%;width:100%;display:flex;flex-direction:column"></div></div>');return this.initBarcode(n,t,e),n},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(V.a),gt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.options=new z.a(n),i.options.setDefault(new z.a(I.a.instance.qrcode.default).getPrintElementOptionEntity()),i}return ht(e,t),e.prototype.updateDesignViewFromOptions=function(){if(this.designTarget){var t=this.getData();this.css(this.designTarget,t),this.initQrcode(this.designTarget,this.getTitle(),this.getData())}},e.prototype.getConfigOptions=function(){return I.a.instance.qrcode},e.prototype.onResize=function(e,n,i,o,r){t.prototype.onResize.call(this,e,n,i,o,r),this.initQrcode(this.designTarget,this.getTitle(),this.getData())},e.prototype.getTitle=function(){return this.options.title||this.printElementType.title},e.prototype.getData=function(t){var e,n=this.getField();return e=t?n&&n.split(".").reduce(((e,n)=>e?e[n]:t?t[n]:""),!1)||"":this.options.testData||this.printElementType.getData()||"",e},e.prototype.initQrcode=function(t,e,n){var o=(t=t||this.designTarget).find(".hiprint-printElement-qrcode-content");try{const t=i.a.pt.toPx(this.options.getWidth()),a=i.a.pt.toPx(this.options.height-(this.options.hideTitle?0:this.options.lineHeight??1.5*(this.options.fontSize??10.5))),s=t>=a?Math.abs(parseInt((t-a)/2)):0,l=t>=a?0:Math.abs(parseInt((a-t)/2));var r=b({bcid:this.options.qrcodeType||"qrcode",text:n||this.options.testData||this.options.title,scale:1,paddingwidth:s,paddingheight:l,width:Math.min(parseInt(t/2.835),parseInt(a/2.835)),height:Math.min(parseInt(t/2.835),parseInt(a/2.835)),includetext:!1,eclevel:["M","L","H","Q"][this.options.qrCodeLevel??0],barcolor:this.options.barColor||"#000"});if(o.html(p()(r)),!this.options.hideTitle){const t=e?e+(n?":":""):"",i=this.options.textAlign||"center",r="justify"===i?"text-align-last: justify;text-justify: distribute-all-lines;":`text-align: ${i};`;o.append(p()(`<div class="hiprint-printElement-qrcode-content-title" style="${r}">${t}${n}</div>`))}}catch(t){console.error(t),o.html(p()("<div>\u4e8c\u7ef4\u7801\u751f\u6210\u5931\u8d25</div>"))}},e.prototype.getReizeableShowPoints=function(){return["s","e","se","r"]},e.prototype.createTarget=function(t,e){var n=p()('<div class="hiprint-printElement hiprint-printElement-qrcode" style="position: absolute;"><div class="hiprint-printElement-qrcode-content" style="height:100%;width:100%;display:flex;flex-direction:column"></div></div>');return this.initQrcode(n,t,e),n},e.prototype.getHtml=function(t,e,n){return this.getHtml2(t,e,n)},e}(V.a),mt=function(){function t(){}return t.createPrintElement=function(t,e){return"text"==t.type?new et(t,e):"image"==t.type?new W(t,e):"longText"==t.type?new K(t,e):"table"==t.type?new _.a(t,e):"html"==t.type?new rt(t,e):"vline"==t.type?new st(t,e):"hline"==t.type?new lt(t,e):"rect"==t.type?new dt(t,e):"oval"==t.type?new ct(t,e):"barcode"==t.type?new ft(t,e):"qrcode"==t.type?new gt(t,e):void 0},t}(),vt=function(){function t(t){this.field=t.field,this.fields=t.fields,this.title=t.title,this.text=t.text,this.tid=t.tid,this.data=t.data,this.styler=t.styler,this.formatter=t.formatter,this.type=t.type,this.onRendered=t.onRendered,this.options=t.options}return t.prototype.getText=function(t){return t?this.title||this.text||"":this.text||this.title||""},t.prototype.getData=function(){return this.data},t.prototype.createPrintElement=function(t){var e={};return p().extend(e,t||{}),mt.createPrintElement(this,e)},t.prototype.getPrintElementTypeEntity=function(){return new B({title:this.title,type:this.type})},t.prototype.getFields=function(){return this.fields},t.prototype.getOptions=function(){return this.options||{}},t}(),yt=(n(16),n(12)),bt=(s=function(t,e){return(s=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Tt=(function(t){function e(e){var n=t.call(this,e)||this;return(e=e||{}).columns?(n.columns=[],e.columns.forEach((function(t){n.columns.push(new yt.a(t))}))):n.columns=[new yt.a({columns:[new M.a({width:100}),new M.a({width:100})]})],n.lHeight=e.lHeight,n.autoCompletion=e.autoCompletion,n.tableFooterRepeat=e.tableFooterRepeat,n}bt(e,t),e.prototype.getPrintElementOptionEntity=function(){var e=t.prototype.getPrintElementOptionEntity.call(this);return e.fields=this.fields,e.columns=[],this.columns.forEach((function(t){e.columns.push(t.getPrintElementOptionEntity())})),e}}(z.a),a=function(t,e){return(a=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},r=function(t,e){return(r=Object.setPrototypeOf||S({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),wt=function(t){function e(e){return t.call(this,e)||this}return Tt(e,t),e.prototype.createPrintElement=function(t){var e={};return p().extend(e,t||{}),mt.createPrintElement(this,e)},e.prototype.getPrintElementTypeEntity=function(){return new B({title:this.title,type:this.type})},e}(vt),Et=function(){function t(){}return t.createPrintElementType=function(t){return t.type=t.type||"text","text"==t.type?new wt(t):"table"==t.type?new A(t):new vt(t)},t}(),xt=function(){function t(){}return t.getElementTypeGroups=function(e){var n=t.formatterModule(e);return P.instance[n]||[]},t.getElementType=function(t,e){if(t)return P.instance.getElementType(t);Et.createPrintElementType({type:e})},t.build=function(e,n){var i=t.formatterModule(n),o=(new k).createPrintElementTypeHtml(e,this.getElementTypeGroups(i));this.enableDrag(o)},t.buildByHtml=function(t){this.enableDrag(t)},t.enableDrag=function(e){e.hidraggable({revert:!0,proxy:function(t){var e=R.a.instance.getDragingPrintElement(),n=e.printElement.getProxyTarget(e.printElement.printElementType.getOptions());return n.appendTo("body"),n.css("z-index","9999"),n},moveUnit:"pt",minMove:4,onBeforeDrag:function(e){R.a.instance.draging=!0;var n=p()(e.data.target).attr("tid"),i=t.getElementType(n,p()(e.data.target).attr("ptype"));if(!i)throw new Error(`\u8bf7\u68c0\u67e5 hiprint.init \u7684 provider \u662f\u5426\u914d\u7f6e\u4e86 [${n}]`);var o=i.createPrintElement();if(!o&&"tableCustom"==i.type)throw new Error("\u5df2\u79fb\u9664'tableCustom',\u8bf7\u66ff\u6362\u4f7f\u7528'table'\u8be6\u60c5\u89c1\u66f4\u65b0\u8bb0\u5f55");return R.a.instance.setDragingPrintElement(o),!0},onDrag:function(t,e,n){R.a.instance.getDragingPrintElement().updatePosition(e,n)},onStopDrag:function(t){R.a.instance.draging=!1}})},t.formatterModule=function(t){return t||"_default"},t}(),Ct=function(t,e){var n=this;this.name=t,this.printElementTypes=[],e.forEach((function(t){n.printElementTypes.push(Et.createPrintElementType(t))}))},Pt=function(t){if(this.index=t.index,this.name=t.name,this.paperType=t.paperType,this.paperType){var e=R.a.instance[this.paperType];t.height?(this.height=t.height,this.width=t.width):(this.height=e.height,this.width=e.width)}else this.height=t.height,this.width=t.width;this.paperHeader=t.paperHeader||0,this.paperFooter=t.paperFooter||i.a.mm.toPt(this.height),this.printElements=t.printElements||[],this.paperNumberLeft=t.paperNumberLeft,this.paperNumberTop=t.paperNumberTop,this.paperNumberDisabled=t.paperNumberDisabled,this.paperNumberContinue=t.paperNumberContinue,this.paperNumberFormat=t.paperNumberFormat,this.paperList={paperType:t.paperType,height:t.height,width:t.width},this.panelPaperRule=t.panelPaperRule,this.panelPageRule=t.panelPageRule,this.rotate=t.rotate||void 0,this.firstPaperFooter=t.firstPaperFooter,this.evenPaperFooter=t.evenPaperFooter,this.oddPaperFooter=t.oddPaperFooter,this.lastPaperFooter=t.lastPaperFooter,this.topOffset=t.topOffset,this.fontFamily=t.fontFamily,this.leftOffset=t.leftOffset,this.orient=t.orient,this.scale=t.scale,this.watermarkOptions=t.watermarkOptions,this.panelLayoutOptions=t.panelLayoutOptions},St=function(){function t(t,e,n,i){this.bx=t,this.by=e,this.ex=t,this.ey=e,this.startX=this.minX=t,this.startY=this.minY=e,this.maxX=t,this.maxY=e,this.lastLeft=n,this.lastTop=i}return t.prototype.updateRect=function(t,e,n){var i=n.designPaper.scale||1;this.ex=t,this.ey=e,this.minX=this.startX/i<t/i?this.startX/i:t/i,this.minY=this.startY/i<e/i?this.startY/i:e/i,this.maxX=this.startX/i<t/i?t/i:this.startX/i,this.maxY=this.startY/i<e/i?e/i:this.startY/i},t.prototype.updatePositionByMultipleSelect=function(t,e){null!=t&&(this.lastLeft=this.lastLeft+t),null!=e&&(this.lastTop=this.lastTop+e),this.target.css({left:this.lastLeft+"pt",top:this.lastTop+"pt"})},t}(),Ot=function(){function t(t,e){this.templateId=e,this.index=t.index,this.name=t.name,this.width=t.width,this.height=t.height,this.paperType=t.paperType,this.paperList={paperType:t.paperType,height:t.height,width:t.width},this.paperHeader=t.paperHeader,this.paperFooter=t.paperFooter,this.initPrintElements(t.printElements),this.paperNumberLeft=t.paperNumberLeft,this.paperNumberTop=t.paperNumberTop,this.paperNumberDisabled=t.paperNumberDisabled,this.paperNumberContinue=null==t.paperNumberContinue||t.paperNumberContinue,this.paperNumberFormat=t.paperNumberFormat,this.panelPaperRule=t.panelPaperRule,this.panelPageRule=t.panelPageRule,this.firstPaperFooter=t.firstPaperFooter,this.evenPaperFooter=t.evenPaperFooter,this.oddPaperFooter=t.oddPaperFooter,this.lastPaperFooter=t.lastPaperFooter,this.topOffset=t.topOffset,this.leftOffset=t.leftOffset,this.fontFamily=t.fontFamily,this.orient=t.orient,this.target=this.createTarget(),this.rotate=t.rotate,this.scale=t.scale,this.watermarkOptions=t.watermarkOptions||{},this.panelLayoutOptions=t.panelLayoutOptions||{}}return t.prototype.design=function(t){var e=this;this.orderPrintElements(),this.designPaper=this.createNewPage(0),this.target.html(""),this.target.append(this.designPaper.getTarget()),this.droppablePaper(this.designPaper),this.designPaper.design(t),this.designPaper.subscribePaperBaseInfoChanged((function(t){e.paperHeader=t.paperHeader,e.paperFooter=t.paperFooter,e.paperNumberLeft=t.paperNumberLeft,e.paperNumberTop=t.paperNumberTop,e.paperNumberDisabled=t.paperNumberDisabled,e.paperNumberFormat=t.paperNumberFormat})),this.printElements.forEach((function(n){e.appendDesignPrintElement(e.designPaper,n),n.design(t,e.designPaper)})),this.target.bind("click.hiprint",(function(t){let n={paperList:e.paperList,panelPaperRule:e.panelPaperRule,panelPageRule:e.panelPageRule,firstPaperFooter:e.firstPaperFooter,evenPaperFooter:e.evenPaperFooter,oddPaperFooter:e.oddPaperFooter,lastPaperFooter:e.lastPaperFooter,leftOffset:e.leftOffset,topOffset:e.topOffset,panelLayoutOptions:e.panelLayoutOptions||{},fontFamily:e.fontFamily,orient:e.orient,paperNumberDisabled:e.paperNumberDisabled,paperNumberContinue:e.paperNumberContinue,paperNumberFormat:e.paperNumberFormat,watermarkOptions:e.watermarkOptions||{}};I.a.instance.paperNumberContinue||delete n.paperNumberContinue,i.a.event.trigger("BuildCustomOptionSettingEventKey_"+e.templateId,{options:n,callback:function(t){e.panelLayoutOptions=t.panelLayoutOptions||{},e.watermarkOptions=t.watermarkOptions||void 0,t.watermarkOptions&&e.designPaper.createWaterMark(!0,1,t.watermarkOptions),e.paperList=t.paperList,e.panelPaperRule=t.panelPaperRule,e.panelPageRule=t.panelPageRule,e.firstPaperFooter=t.firstPaperFooter,e.evenPaperFooter=t.evenPaperFooter,e.oddPaperFooter=t.oddPaperFooter,e.lastPaperFooter=t.lastPaperFooter,e.leftOffset=t.leftOffset,e.topOffset=t.topOffset,e.fontFamily=t.fontFamily,e.orient=t.orient,e.paperNumberDisabled=e.designPaper.paperNumberDisabled=!!t.paperNumberDisabled||void 0,e.paperNumberContinue=e.designPaper.paperNumberContinue=t.paperNumberContinue,e.paperNumberFormat=t.paperNumberFormat,e.designPaper.paperNumberFormat=t.paperNumberFormat,t.paperNumberFormat&&(e.designPaper.paperNumberTarget=e.designPaper.createPaperNumber(e.designPaper.formatPaperNumber(1,1),!0)),e.designPaper.setOffset(e.leftOffset,e.topOffset),e.css(e.target),e.designPaper.resetPaperNumber(e.designPaper.paperNumberTarget),t.paperList&&(e.width=t.paperList.width,e.height=t.paperList.height,e.paperType=t.paperList.paperType,e.resize(t.paperList.paperType,t.paperList.width,t.paperList.height,t.rotate)),e.designPaper.triggerOnPaperBaseInfoChanged()}})})),this.bindShortcutKeyEvent(),this.bingPasteEvent(),this.bindBatchMoveElement()},t.prototype.update=function(t){try{Date.now();var e=this;this.index=t.index,this.name=t.name,this.width=t.width,this.height=t.height,this.paperType=t.paperType,this.paperHeader=t.paperHeader,this.paperFooter=t.paperFooter,this.designPaper.width=i.a.mm.toPt(t.width),this.designPaper.height=i.a.mm.toPt(this.height),this.designPaper.paperType=this.paperType,this.designPaper.paperHeader=this.paperHeader,this.designPaper.paperFooter=this.paperFooter,this.designPaper.mmheight=t.height,this.designPaper.mmwidth=t.width,this.designPaper.headerLinetarget.css("top",(this.paperHeader||-1)+"pt"),0==this.paperHeader&&this.designPaper.headerLinetarget.addClass("hideheaderLinetarget"),this.designPaper.footerLinetarget.css("top",parseInt(this.paperFooter.toString())+"pt"),this.paperFooter==this.height&&this.designPaper.footerLinetarget.css("top",t.height-I.a.instance.paperHeightTrim+"mm"),this.watermarkOptions=t.watermarkOptions||{},this.designPaper.createWaterMark(!0,this.index,this.watermarkOptions),this.paperNumberLeft=t.paperNumberLeft,this.paperNumberTop=t.paperNumberTop,this.paperNumberDisabled=t.paperNumberDisabled,this.paperNumberContinue=t.paperNumberContinue,this.paperNumberFormat=t.paperNumberFormat,this.designPaper.paperNumberLeft=this.paperNumberLeft,this.designPaper.paperNumberTop=this.paperNumberTop,this.designPaper.paperNumberDisabled=this.paperNumberDisabled,this.designPaper.paperNumberContinue=this.paperNumberContinue,this.designPaper.paperNumberFormat=this.paperNumberFormat,this.designPaper.paperNumberTarget.css("top",this.paperNumberTop+"pt").css("left",this.paperNumberLeft+"pt"),this.designPaper.resetPaperNumber(this.designPaper.paperNumberTarget),this.fontFamily=t.fontFamily,this.orient=t.orient,this.rotate=t.rotate,this.scale=t.scale,this.designPaper.fontFamily=this.fontFamily,this.designPaper.orient=this.orient,this.designPaper.scale=e.designPaper.scale||this.scale,this.panelLayoutOptions=t.panelLayoutOptions,this.panelPaperRule=t.panelPaperRule,this.paperList={paperType:t.paperType,height:t.height,width:t.width},this.panelPageRule=t.panelPageRule,this.firstPaperFooter=t.firstPaperFooter,this.evenPaperFooter=t.evenPaperFooter,this.oddPaperFooter=t.oddPaperFooter,this.lastPaperFooter=t.lastPaperFooter,this.topOffset=t.topOffset,this.leftOffset=t.leftOffset,this.designPaper.setFooter(this.firstPaperFooter,this.evenPaperFooter,this.oddPaperFooter,this.lastPaperFooter),this.designPaper.setOffset(this.leftOffset,this.topOffset),this.target.css("width",t.width+"mm"),this.target.css("height",t.height-I.a.instance.paperHeightTrim+"mm"),this.target.attr("original-height",t.height),this.target.parent().css("width",t.width+"mm"),this.target.parent().css("height",t.height-I.a.instance.paperHeightTrim+"mm"),this.designPaper.target.css("width",t.width+"mm"),this.designPaper.target.css("height",t.height-I.a.instance.paperHeightTrim+"mm"),this.printElements.forEach((function(t){t.designTarget&&t.designTarget.length&&t.designTarget.remove()})),this.printElements=[],this.initPrintElements(t.printElements),this.printElements.forEach((function(n){e.appendDesignPrintElement(e.designPaper,n),n.design(t,e.designPaper)}))}catch(e){console.log(e)}},t.prototype.bindShortcutKeyEvent=function(){var t=this;p()(document).keydown((function(e){"INPUT"!=e.target.tagName&&(e.ctrlKey||e.metaKey)&&90==e.keyCode&&(e.shiftKey?i.a.event.trigger("hiprintTemplateDataShortcutKey_"+t.templateId,"redo"):i.a.event.trigger("hiprintTemplateDataShortcutKey_"+t.templateId,"undo"),e.preventDefault())}))},t.prototype.bingPasteEvent=function(){var t=this;t.designPaper.target.attr("tabindex","1"),t.designPaper.target.keydown((function(e){e.target?.className?.includes("editing")||"INPUT"!=e.target.tagName&&(e.ctrlKey||e.metaKey)&&86==e.keyCode&&(t.pasteJson(e),e.preventDefault())}))},t.prototype.pasteJson=function(t){var e=p()("#copyArea");if(e.length)try{var n=e.text(),o=JSON.parse(n);let s=null,l=null;var r=null,a=null;o.forEach(((e,n)=>{if(!e.printElementType&&!e.templateId)return;var o=this,u=e.options,d=o.getElementById(e.id);if(!d)return;var h=d.clone(e);if(!h)return;if(0===n){s={x:e.options.left,y:e.options.top};var c=t.currentTarget.className!=t.target.className;r=!c&&o.mouseOffsetX&&i.a.px.toPt(o.mouseOffsetX)||(u.left+=10),a=!c&&o.mouseOffsetY&&i.a.px.toPt(o.mouseOffsetY)||(u.top+=10),l={x:r,y:a}}else{const t={x:e.options.left,y:e.options.top},n={x:t.x-s.x,y:t.y-s.y};r=l.x+n.x,a=l.y+n.y}h.options.setLeft(r),h.options.setTop(a),h.setTemplateId(o.templateId),h.setPanel(o),o.appendDesignPrintElement(o.designPaper,h,!1);const f=R.a.instance.getPrintTemplateById(o.templateId);h.options.field&&f.qtDesigner&&(h.options.qid=f.qtDesignderFunction(h.options.field)),o.printElements.push(h),h.design(void 0,o.designPaper),i.a.event.trigger("hiprintTemplateDataChanged_"+o.templateId,"\u590d\u5236"),h.designTarget.children(".resize-panel").trigger(p().Event("click"))}))}catch(t){console.error("pasteJson error",t)}},t.prototype.css=function(t){this.fontFamily?t.css("fontFamily",this.fontFamily):t[0].style.fontFamily=""},t.prototype.getConfig=function(){return I.a.instance},t.prototype.getHtml=function(t,e,n,i,o){var r=this;this.orderPrintElements();let a=r.getConfig();var s,p=n||[],l=i||this,u=void 0;return i?(u=p[p.length-1],s=u.getPanelTarget(),u.updateReferenceElement(new $.a({top:this.paperHeader,left:0,height:0,width:0,bottomInLastPaper:u.referenceElement.bottomInLastPaper,beginPrintPaperIndex:p.length-1,printTopInPaper:u.referenceElement.bottomInLastPaper,endPrintPaperIndex:p.length-1}))):(s=l.createTarget(),u=l.createNewPage(p.length),p.push(u),s.append(u.getTarget())),this.printElements.filter((function(t){return!t.isFixed()&&!t.isHeaderOrFooter()})).forEach((function(e){var n=[],i=p[p.length-1];u=i.referenceElement.isPositionLeftOrRight(e.options.getTop())?p[i.referenceElement.beginPrintPaperIndex]:p[i.referenceElement.endPrintPaperIndex],(n=e.getHtml(u,t)).forEach((function(t,i){t.referenceElement&&(t.referenceElement.endPrintPaperIndex=t.referenceElement.beginPrintPaperIndex+n.length-1),i>0&&(u.index<p.length-1?u=p[u.index+1]:(u=l.createNewPage(p.length,u.referenceElement),p.push(u)),s.append(u.getTarget())),t.target&&("none"!=e.options.showInPage&&u.append(t.target),u.updatePrintLine(t.printLine),e.onRendered(u,t.target)),i==n.length-1&&t.referenceElement&&u.updateReferenceElement(t.referenceElement)}))})),o&&o.templates.forEach((function(t,e){var i=t.data||{},o=t.options||{};t.template.printPanels.forEach((function(t){t.getHtml(i,o,n,r)}))})),a.paperNumberContinue&&(r.paperNumberContinue?D._paperList=[...D._paperList||[],...p]:D._paperList=[...p]),i||(this.lastPaperFooter&&p[p.length-1].printLine>this.lastPaperFooter&&(u=l.createNewPage(p.length,u.referenceElement),p.push(u),s.append(u.getTarget())),this.panelPaperRule&&("odd"==this.panelPaperRule&&p.length%2==0&&(u=l.createNewPage(p.length,u.referenceElement),p.push(u),s.append(u.getTarget())),"even"==this.panelPaperRule&&p.length%2==1&&(u=l.createNewPage(p.length,u.referenceElement),p.push(u),s.append(u.getTarget()))),p.forEach((function(n){n.updatePaperNumber(n.index+1,p.length,e.paperNumberToggleInEven),r.fillPaperHeaderAndFooter(n,t,p.length),e&&(null!=e.leftOffset&&n.setLeftOffset(e.leftOffset),null!=e.topOffset&&n.setTopOffset(e.topOffset))})),s.prepend(this.getPrintStyle()),a.paperNumberContinue&&D._paperList.forEach((function(t,e){t.updatePaperNumber(e+1,D._paperList.length)}))),s},t.prototype.resize=function(t,e,n,i){this.width=e,this.height=n,this.paperType=t,this.rotate=i,this.designPaper.resize(e,n)},t.prototype.rotatePaper=function(){null==this.rotate&&(this.rotate=!1),this.rotate=!this.rotate,this.resize(this.paperType,this.height,this.width,this.rotate)},t.prototype.zoom=function(t,e){this.scale=e?t:void 0,this.designPaper.zoom(t)},t.prototype.getTarget=function(){return this.target},t.prototype.enable=function(){this.target.removeClass("hipanel-disable")},t.prototype.disable=function(){this.target.addClass("hipanel-disable")},t.prototype.getPanelEntity=function(t){var e=[];return this.printElements.forEach((function(n){e.push(n.getPrintElementEntity(t))})),new Pt({index:this.index,name:this.name||this.index+1,width:this.width,height:this.height,paperType:this.paperType,paperHeader:this.paperHeader,paperFooter:this.paperFooter,paperNumberDisabled:!!this.paperNumberDisabled||void 0,paperNumberContinue:null==this.paperNumberContinue||this.paperNumberContinue,paperNumberFormat:this.paperNumberFormat?this.paperNumberFormat:void 0,panelPaperRule:this.panelPaperRule?this.panelPaperRule:void 0,paperList:this.paperList?this.paperList:void 0,panelPageRule:this.panelPageRule?this.panelPageRule:void 0,paperNumberLeft:this.paperNumberLeft,paperNumberTop:this.paperNumberTop,printElements:e,rotate:this.rotate,firstPaperFooter:this.firstPaperFooter,evenPaperFooter:this.evenPaperFooter,oddPaperFooter:this.oddPaperFooter,lastPaperFooter:this.lastPaperFooter,topOffset:this.topOffset,fontFamily:this.fontFamily,orient:this.orient,scale:this.scale,watermarkOptions:this.watermarkOptions?this.watermarkOptions:void 0,leftOffset:this.leftOffset,panelLayoutOptions:this.panelLayoutOptions||{}})},t.prototype.createTarget=function(){var t=p()('<div class="hiprint-printPanel panel-index-'+this.index+'"></div>');return this.css(t),t},t.prototype.droppablePaper=function(t){var e=this;t.getTarget().hidroppable({accept:".ep-draggable-item",onDrop:function(n,o){const r=R.a.instance.getPrintTemplateById(e.templateId);var a=R.a.instance.getDragingPrintElement(),s=a.printElement,p=e.designPaper.scale||1,l=(a.left-i.a.px.toPt(e.target.children(".hiprint-printPaper").offset().left))/p,u=(a.top-i.a.px.toPt(e.target.children(".hiprint-printPaper").offset().top))/p;s.updateSizeAndPositionOptions(e.mathroundToporleft(l),e.mathroundToporleft(u)),s.setTemplateId(e.templateId),s.setPanel(e),e.appendDesignPrintElement(e.designPaper,s,!0),s.options.field&&r.qtDesigner&&(s.options.qid=r.qtDesignderFunction(s.options.field)),e.printElements.push(s),s.design(void 0,t),i.a.event.trigger("hiprintTemplateDataChanged_"+e.templateId,"\u65b0\u589e")}})},t.prototype.initPrintElements=function(t){var e=this;this.printElements=[],t&&t.forEach((function(n){var i;if(i=n.printElementType?Et.createPrintElementType(n.printElementType):P.instance.getElementType(n.tid)){var o=i.createPrintElement(n.options);o.setTemplateId(e.templateId),o.setPanel(e),e.printElements.push(o)}else console.log("miss "+JSON.stringify(t))}))},t.prototype.mathroundToporleft=function(t){var e=I.a.instance.movingDistance;return Math.round(t/e)*e},t.prototype.appendDesignPrintElement=function(t,e,n){e.setCurrenttemplateData(void 0);var i=e.getDesignTarget(t);i.addClass("design"),n&&e.initSizeByHtml(i),t.append(i)},t.prototype.createNewPage=function(t,e){var n=new q(this.templateId,this.index,this.watermarkOptions,this.panelPageRule,this.scale,this.width,this.height,this.paperHeader,this.paperFooter,this.paperNumberLeft,this.paperNumberTop,this.paperNumberDisabled,this.paperNumberContinue,this.paperNumberFormat,t,e);return n.setFooter(this.firstPaperFooter,this.evenPaperFooter,this.oddPaperFooter,this.lastPaperFooter),n.setOffset(this.leftOffset,this.topOffset),n},t.prototype.orderPrintElements=function(){this.printElements=i.a.orderBy(this.printElements,(function(t){return t.options.getLeft()})),this.printElements=i.a.orderBy(this.printElements,(function(t){return t.options.getTop()}))},t.prototype.fillPaperHeaderAndFooter=function(t,e,n){this.printElements.filter((function(t){return t.isFixed()||t.isHeaderOrFooter()})).forEach((function(i){if(i.isFixed(),i.showInPage(t.index,n)){var o=i.getHtml(t,e);o.length&&t.append(o[0].target)}}))},t.prototype.clear=function(){this.printElements.forEach((function(t){t.designTarget&&t.designTarget.length&&t.designTarget.remove()})),this.printElements=[],i.a.event.trigger("hiprintTemplateDataChanged_"+this.templateId,"\u6e05\u7a7a")},t.prototype.insertPrintElementToPanel=function(t){var e=this.getPrintElementTypeByEntity(t);if(e){var n=e.createPrintElement(t.options);n.setTemplateId(this.templateId),n.setPanel(this),this.printElements.push(n)}},t.prototype.addPrintText=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="text",this.insertPrintElementToPanel(t)},t.prototype.addPrintHtml=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="html",this.insertPrintElementToPanel(t)},t.prototype.addPrintTable=function(t){if(t.printElementType=t.printElementType||{},t.printElementType.type="table",t.options&&t.options.columns){var e=p().extend({},t.options.columns);t.printElementType.columns=e.columns,e.columns=void 0}this.insertPrintElementToPanel(t)},t.prototype.addPrintImage=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="image",this.insertPrintElementToPanel(t)},t.prototype.addPrintLongText=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="longText",this.insertPrintElementToPanel(t)},t.prototype.addPrintVline=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="vline",this.insertPrintElementToPanel(t)},t.prototype.addPrintHline=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="hline",this.insertPrintElementToPanel(t)},t.prototype.addPrintRect=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="rect",this.insertPrintElementToPanel(t)},t.prototype.addPrintOval=function(t){t.printElementType=t.printElementType||{},t.printElementType.type="oval",this.insertPrintElementToPanel(t)},t.prototype.getPrintElementTypeByEntity=function(t){var e;return(e=t.tid?P.instance.getElementType(t.tid):Et.createPrintElementType(t.printElementType))||console.log("miss "+JSON.stringify(t)),e},t.prototype.getPrintStyle=function(){let t="";return this.panelLayoutOptions&&"row"===this.panelLayoutOptions.layoutType&&(t=`<style>.hiprint-printTemplate{margin: -${(Number(this.panelLayoutOptions.layoutRowGap)||0)/2}mm -${(Number(this.panelLayoutOptions.layoutColumnGap)||0)/2}mm;}.hiprint-printTemplate .hiprint-printPanel {display:inline-block;padding: ${(Number(this.panelLayoutOptions.layoutRowGap)||0)/2}mm ${(Number(this.panelLayoutOptions.layoutColumnGap)||0)/2}mm;}\n </style>`),t+" <style printStyle>@page{ border:0; padding:0cm; margin:0cm; "+this.getPrintSizeStyle()+"}</style>\n"},t.prototype.getPrintSizeStyle=function(){return this.paperType?"size:"+this.paperType+" "+(this.height>this.width?"portrait":"landscape")+";":"size: "+this.width+"mm "+this.height+"mm "+(this.orient?1==this.orient?"portrait":"landscape":"")+";"},t.prototype.deletePrintElement=function(t){var e=this;this.printElements.filter((function(n,i){n.id==t.id&&(t.delete(),e.printElements.splice(i,1))}))},t.prototype.getElementByTid=function(t){return this.printElements.filter((function(e){return e.printElementType.tid===t})).map((function(t,e){return t}))},t.prototype.getElementByName=function(t){return this.printElements.filter((function(e){return e.options.name===t})).map((function(t,e){return t}))},t.prototype.getElementById=function(t){return this.printElements.find((function(e){return e.id===t}))},t.prototype.getFieldsInPanel=function(){var t=[];return this.printElements.forEach((function(e){e.options&&e.options.field?t.push(e.options.field):e.printElementType.field&&t.push(e.printElementType.field)})),t},t.prototype.getTestData=function(){var t={};return this.printElements.forEach((function(e){"table"!=e.printElementType.type&&(e.options&&e.options.field?t[e.options.field]=e.options.testData:e.printElementType.field&&(t[e.printElementType.field]=e.printElementType.data||e.options.testData))})),t},t.prototype.bindBatchMoveElement=function(){var t=this;this.designPaper.getTarget().on("mousemove",(function(e){e.target.className&&"string"==O(e.target.className)&&e.target.className.includes("editing")||(e.currentTarget.className==t.designPaper.target[0].className?(t.mouseOffsetX=e.offsetX,t.mouseOffsetY=e.offsetY):t.mouseOffsetX=t.mouseOffsetY=void 0,R.a.instance.draging||1===e.buttons&&R.a.instance.rectDraging&&t.mouseRect&&(t.mouseRect.updateRect(e.pageX,e.pageY,t),t.updateRectPanel(t.mouseRect)))})).on("mousedown",(function(e){R.a.instance.rectDraging=!0,e.target.className&&"string"==O(e.target.className)&&e.target.className.includes("editing")||R.a.instance.draging||(t.mouseRect&&t.mouseRect.target&&t.mouseRect.target.remove(),1===e.buttons&&"string"==O(e.target.className)&&e.target.className.includes("hiprint-printPaper hidroppable design")&&(t.mouseRect=new St(e.pageX,e.pageY,R.a.instance.dragLengthCNum(e.pageX-t.designPaper.getTarget().offset().left,I.a.instance.movingDistance),R.a.instance.dragLengthCNum(e.pageY-t.designPaper.getTarget().offset().top,I.a.instance.movingDistance))))})).on("mouseup",(function(e){t.mouseRect&&t.updateRectPanel(t.mouseRect,!0),R.a.instance.rectDraging=!1}))},t.prototype.getElementInRect=function(t){var e=[];return this.printElements.filter((function(t){return!1!==t.options.draggable})).forEach((function(n){n.inRect(t)&&e.push(n)})),e},t.prototype.updateRectPanel=function(t,e){var n=this.designPaper.getTarget(),i=this.designPaper.scale||1;if(this.mouseRect.target||(this.mouseRect.target=p()('<div tabindex="1" class="mouseRect" ><span></span></div>'),n.find(".hiprint-printPaper-content").append(this.mouseRect.target)),t.ex>=t.bx&&t.ey>=t.by?this.mouseRect.target.css({height:t.maxY-t.minY+"px",width:t.maxX-t.minX+"px",left:t.lastLeft/i+"pt",top:t.lastTop/i+"pt",transform:"unset"}):t.ex<t.bx&&t.ey<t.by?this.mouseRect.target.css({height:t.maxY-t.minY+"px",width:t.maxX-t.minX+"px",left:t.lastLeft/i+"pt",top:t.lastTop/i+"pt",transform:"rotate(180deg)","transform-origin":"0 0"}):t.ex<t.bx&&t.ey>t.by?this.mouseRect.target.css({height:t.maxY-t.minY+"px",width:t.maxX-t.minX+"px",left:t.lastLeft/i+"pt",top:t.lastTop/i+"pt",transform:"rotateY(180deg)","transform-origin":"0 0"}):t.ex>t.bx&&t.ey<t.by&&this.mouseRect.target.css({height:t.maxY-t.minY+"px",width:t.maxX-t.minX+"px",left:t.lastLeft/i+"pt",top:t.lastTop/i+"pt",transform:"rotateX(180deg)","transform-origin":"0 0"}),t.target.focus(),e){const t=this.getElementInRect(this.mouseRect);n.find(".mouseRect").remove(),t?.length&&setTimeout((()=>{t.forEach(((t,e)=>{if("table"===t.printElementType?.type)return;let n=t.designTarget;n.children("div[panelindex]").addClass("selected"),n.children().last().css({display:"block"}),n.focus()}))}),0)}},t.prototype.bingKeyboardMoveEvent=function(t){var e=this;t.attr("tabindex","1"),t.keydown((function(t){e.mouseRect.mouseRectSelectedElement||(e.mouseRect.mouseRectSelectedElement=e.getElementInRect(e.mouseRect));var n=e.mouseRect.mouseRectSelectedElement||[];switch(t.keyCode){case 37:e.mouseRect.updatePositionByMultipleSelect(0-I.a.instance.movingDistance,0),n.forEach((function(t){t.updatePositionByMultipleSelect(0-I.a.instance.movingDistance,0)})),t.preventDefault();break;case 38:e.mouseRect.updatePositionByMultipleSelect(0,0-I.a.instance.movingDistance),n.forEach((function(t){t.updatePositionByMultipleSelect(0,0-I.a.instance.movingDistance)})),t.preventDefault();break;case 39:e.mouseRect.updatePositionByMultipleSelect(I.a.instance.movingDistance,0),n.forEach((function(t){t.updatePositionByMultipleSelect(I.a.instance.movingDistance,0)})),t.preventDefault();break;case 40:e.mouseRect.updatePositionByMultipleSelect(0,I.a.instance.movingDistance),n.forEach((function(t){t.updatePositionByMultipleSelect(0,I.a.instance.movingDistance)})),t.preventDefault()}[37,38,39,40].includes(t.keyCode)&&i.a.event.trigger("hiprintTemplateDataChanged_"+e.templateId,"\u6846\u9009\u79fb\u52a8")}))},t}(),It=function(t){if(t)if(t.panels){this.panels=[];for(var e=0;e<t.panels.length;e++)this.panels.push(new Pt(t.panels[e]))}else this.panels=[]},Ft=n(9),Rt=function(){function t(t,e){var n=this;this.printElementOptionSettingPanel={},this.printTemplate=t,this.settingContainer=p()(e),i.a.event.on(t.getPrintElementSelectEventKey(),(function(t){n.buildSetting(t)})),i.a.event.on(t.getBuildCustomOptionSettingEventKey(),(function(t){n.buildSettingByCustomOptions(t)})),i.a.event.on("clearSettingContainer",(function(){n.clearSettingContainer()}))}return t.prototype.init=function(){},t.prototype.clearSettingContainer=function(){this.clearLastPrintElement(),this.settingContainer.html("")},t.prototype.clearLastPrintElement=function(){this.lastPrintElement&&(this.lastPrintElement._editing&&this.lastPrintElement.updateByContent(!0),this.lastPrintElement._printElementOptionTabs&&this.lastPrintElement._printElementOptionTabs.forEach((function(t){t.list&&t.list.forEach((function(t){t.destroy()}))})),this.lastPrintElement._printElementOptionItems&&this.lastPrintElement._printElementOptionItems.forEach((function(t){t.destroy()}))),this.lastPrintElement=void 0},t.prototype.buildSetting=function(t){var e,n=this,i=this,o=t.printElement,r=t.customOptionsInput,a=o.getPrintElementOptionTabs();n.clearSettingContainer(),a.length?(e=p()('<div class="prop-tabs"><ul class="prop-tab-items"></ul></div>'),a.filter(((t,e)=>t.list.length>0||2==e&&r&&r.length)).forEach((function(t){var a=p()('<li class="prop-tab-item"><span class="tab-title">'+t.name+"</span></li>");e.find(".prop-tab-items").append(a);var s=p()('<div class="hiprint-option-items" data-title="'+t.name+'"></div>');t.list.forEach((function(t){t.submit=function(t){o.submitOption()};var e=t.createTarget(o,o.options,o.printElementType);n.printElementOptionSettingPanel[t.name]=e,s.append(e),["columns","dataType"].includes(t.name)?t.setValue(o.options[t.name],o.options,o.printElementType):["coordinate","widthHeight"].includes(t.name)?t.setValue(o.options,o):t.setValue(o.options[t.name]||o.printElementType[t.name]),e.find("textarea").bind("dblclick.textarea",(function(t){if(!p()(this).val()){var e=t.target.placeholder||"";p()(this).val(e)}}))})),0==t.list.length&&r&&r.length&&r.forEach((function(t){var e=t.callback;t.callback=function(t){e&&e(t)};var n=t.optionItems;t.title&&s.append('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label hiprint-option-title"> '+t.title+"</div></div>"),n.forEach((function(e){e.submit=function(e){t.callback(i.getValueByOptionItems(n))},s.append(e.createTarget(i.printTemplate,t.options,void 0)),e.setValue(t.options[e.name],t.options,void 0)})),s.find(".auto-submit").change((function(){t.callback(i.getValueByOptionItems(n))})),s.find(".auto-submit:input").bind("keydown.submitOption",(function(e){13===e.keyCode&&t.callback(i.getValueByOptionItems(n))})),s.find("textarea").bind("dblclick.textarea",(function(t){if(!p()(this).val()){var e=t.target.placeholder||"";p()(this).val(e)}}))})),e.append(s)}))):(e=p()('<div class="hiprint-option-items"></div>'),o.getPrintElementOptionItems().forEach((function(t){t.submit=function(t){o.submitOption()};var i=t.createTarget(o,o.options,o.printElementType);n.printElementOptionSettingPanel[t.name]=i,e.append(i),["columns","dataType"].includes(t.name)?t.setValue(o.options[t.name],o.options,o.printElementType):["coordinate","widthHeight"].includes(t.name)?t.setValue(o.options,o):t.setValue(o.options[t.name]||o.printElementType[t.name])})));var s=p()('<button class="hiprint-option-item-settingBtn hiprint-option-item-submitBtn"type="button">\u786e\u5b9a</button>'),l=p()('<button class="hiprint-option-item-settingBtn hiprint-option-item-deleteBtn"type="button">\u5220\u9664</button>');if(e.append(s),e.append(l),a.length){e.on("click",".prop-tab-item",(function(){var t=p()(this),i=t.index();n.settingContainer.data("last-index",i),t.addClass("active"),t.siblings().removeClass("active");var o=e.find(".hiprint-option-items:eq("+i+")");o.addClass("active"),o.siblings().removeClass("active")}));var u=+(n.settingContainer.data("last-index")||0);u>=a.length&&(u=0),e.find(".prop-tab-item:eq("+u+")").click()}s.bind("click.submitOption",(function(){o.submitOption()})),l.bind("click.deleteBtn",(function(){D.event.trigger("hiprintTemplateDataChanged_"+o.templateId,"\u5220\u9664"),i.printTemplate.deletePrintElement(o),n.clearSettingContainer()})),e.find(".auto-submit").change((function(t){o.submitOption()})),e.find(".auto-submit:input").bind("keydown.submitOption",(function(t){13==t.keyCode&&o.submitOption()})),this.settingContainer.append(e),a.length<1&&r&&r.forEach((function(t){var e=t.callback;t.callback=function(t){e&&(e(t),o.submitOption())},n.buildSettingByCustomOptions(t,n.settingContainer)})),this.lastPrintElement=o},t.prototype.buildSettingByCustomOptions=function(t,e){var n=this;this.clearLastPrintElement();var i=e||this.settingContainer;e||this.settingContainer.html("");var o=[],r=I.a.instance.panel.supportOptions.filter((function(t){return!t.hidden})).map((function(t){return t.name}));t.optionItems?o=t.optionItems:Object.keys(t.options).filter((function(t){return r.includes(t)})).forEach((function(t){var e=Ft.a.getItem(t);e&&o.push(e)}));var a=p()('<div class="hiprint-option-items"></div>');t.title&&a.append('<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label hiprint-option-title"> '+t.title+"</div></div>"),o.forEach((function(e){e.submit=function(e){t.callback(n.getValueByOptionItems(o))},a.append(e.createTarget(n.printTemplate,t.options,void 0)),e.setValue(t.options[e.name],t.options,void 0)}));var s=p()('<button class="hiprint-option-item-settingBtn hiprint-option-item-submitBtn"type="button">\u786e\u5b9a</button>');a.append(s),s.bind("click.submitOption",(function(){t.callback(n.getValueByOptionItems(o))})),a.find(".auto-submit").change((function(e){t.callback(n.getValueByOptionItems(o))})),a.find(".auto-submit:input").bind("keydown.submitOption",(function(e){13==e.keyCode&&t.callback(n.getValueByOptionItems(o))})),i.append(a)},t.prototype.getValueByOptionItems=function(t){var e={};return t.forEach((function(t){e[t.name]=t.getValue()})),e},t}(),Dt=function(){function t(t,e){this.paginationContainer=t,this.jqPaginationContainer=p()(this.paginationContainer),this.template=e}return t.prototype.buildPagination=function(t){var e=this.template.getPaneltotal(),n=this;this.jqPaginationContainer.html("");for(var i=p()('<ul class="hiprint-pagination"></ul>'),o=function(){var t=r,e=n.template.printPanels[t].name||t+1,o=p()("<li><span>"+e+'</span><a href="javascript:void(0);">x</a></li>');o.find("span").click((function(){n.template.selectPanel(t),o.siblings().removeClass("selected"),p()(this).parent("li").addClass("selected")})),o.find("a").click((function(){n.template.deletePanel(t),n.buildPagination()})),i.append(o)},r=0;r<e;r++)o();var a=p()("<li><span>+</span></li>");i.append(a),this.jqPaginationContainer.append(i),a.click((function(){var t=function(t){n.template.addPrintPanel(t||void 0,!0),n.buildPagination(),p()(".hiprint-pagination li").removeClass("selected"),p()(".hiprint-pagination li:nth-last-child(2)").addClass("selected")};if(n.template.onPanelAddClick){var e={index:n.template.printPanels.length,paperType:"A4"};n.template.onPanelAddClick(e,t)}else t()}))},t.prototype.selectPanel=function(t){var e=t||this.template.editingPanel.index,n=p()(".hiprint-pagination li:nth("+e+")");n.length&&(n.siblings().removeClass("selected"),n.addClass("selected")),D.event.trigger("onSelectPanel",this.template.editingPanel,e,n)},t}(),Ht=function(){function t(t){var e=this;this.tempimageBase64={},this.id=R.a.instance.guid(),R.a.instance.setPrintTemplateById(this.id,this);var n=t||{};this.printPanels=[],this.dataMode=n.dataMode||1,this.history=null==n.history||n.history,this.willOutOfBounds=null==n.willOutOfBounds||n.willOutOfBounds,this.onDataChanged=n.onDataChanged,this.onUpdateError=n.onUpdateError,this.lastJson=n.template||{},this.historyList=[{id:R.a.instance.guid(),type:"\u521d\u59cb",json:this.lastJson}],this.historyPos=0,this.defaultPanelName=n.defaultPanelName,this.designOptions={},this.qtDesigner=null==n.qtDesigner||n.qtDesigner,this.qtDesignerMap={},this.qtDesignderFunction=function(t){this.qtDesignerMap={};const e=t.split("_")[0];for(const t of this.editingPanel.printElements){if(void 0===t.options.field)continue;const e=t.options.field.split("_")[0];void 0===this.qtDesignerMap[e]?this.qtDesignerMap[e]=1:this.qtDesignerMap[e]+=1}return 0===this.qtDesignerMap[e]||void 0===this.qtDesignerMap[e]?e:e+"_"+this.qtDesignerMap[e]};var i=new It(n.template||[]);n.template&&i.panels.forEach((function(t){e.printPanels.push(new Ot(t,e.id))})),n.fontList&&(this.fontList=n.fontList),n.fields&&(this.fields=n.fields),n.onImageChooseClick&&(this.onImageChooseClick=n.onImageChooseClick),n.onPanelAddClick&&(this.onPanelAddClick=n.onPanelAddClick),n.settingContainer&&new Rt(this,n.settingContainer),n.paginationContainer&&(this.printPaginationCreator=new Dt(n.paginationContainer,this),this.printPaginationCreator.buildPagination()),this.initAutoSave()}return t.prototype.design=function(t,e){var n=this;if(e||(e={}),0==this.printPanels.length){var i=this.createDefaultPanel();this.printPanels.push(i)}if(!t)throw new Error("options.container can not be empty");n.designOptions=e,this.createContainer(t),this.printPanels.forEach((function(t,i){n.container.append(t.getTarget()),i>0&&t.disable(),t.design(e)})),this.selectPanel(0)},t.prototype.getSimpleHtml=function(t,e){var n=this;e||(e={});var i=p()('<div class="hiprint-printTemplate"></div>');return t&&t.constructor===Array?t.forEach((function(o,r){o&&n.printPanels.forEach((function(n,a){i.append(n.getHtml(o,e)),r==t.length-1&&delete D._paperList}))})):this.printPanels.forEach((function(o,r){i.append(o.getHtml(t,e)),r==n.printPanels.length-1&&delete D._paperList})),e&&e.imgToBase64&&this.transformImg(i.find("img")),i},t.prototype.getSimpleHtmlAsync=function(t,e){return new Promise((n=>{var i=this;e||(e={});let o=p()('<div class="hiprint-printTemplate"></div>');const r=Array.isArray(t)?t:[t],a=[];r.forEach((function(t,n){t&&i.printPanels.forEach((function(n,i){a.push([n,t,e])}))})),function t(e,n){if(!e.length)return n();const[i,r,a]=e.shift();o.append(i.getHtml(r,a)),console.log("e.generateHTMLInterval",a.generateHTMLInterval),setTimeout((()=>t(e,n)),a.generateHTMLInterval??10)}(a,(function(){delete D._paperList,e&&e.imgToBase64&&i.transformImg(o.find("img")),n(o)}))}))},t.prototype.getHtml=function(t,e){return t||(t={}),this.getSimpleHtml(t,e)},t.prototype.getHtmlAsync=function(t,e){return t||(t={}),this.getSimpleHtmlAsync(t,e)},t.prototype.getJointHtml=function(t,e,n){var i=p()('<div class="hiprint-printTemplate"></div>'),o=[];return this.printPanels.forEach((function(r,a){i.append(r.getHtml(t,e,o,void 0,n))})),i},t.prototype.setPaper=function(t,e){if(/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(t))this.editingPanel.resize(void 0,parseFloat(t),parseFloat(e),!1);else{var n=R.a.instance[t];if(!n)throw new Error("not found pagetype:"+(t||""));this.editingPanel.resize(t,n.width,n.height,!1)}},t.prototype.rotatePaper=function(){this.editingPanel.rotatePaper()},t.prototype.zoom=function(t,e){this.editingPanel.zoom(t,e)},t.prototype.addPrintPanel=function(t,e){var n=t?new Ot(new Pt(t),this.id):this.createDefaultPanel();return t&&(t.index=this.printPanels.length),e&&(this.container.append(n.getTarget()),n.design(this.designOptions)),this.printPanels.push(n),e&&this.selectPanel(n.index),n},t.prototype.selectPanel=function(t){var e=this;t>e.printPanels.length-1&&(t=e.printPanels.length-1),this.printPanels.forEach((function(n,i){t==i?(n.enable(),e.editingPanel=n,e.printPaginationCreator&&e.printPaginationCreator.selectPanel(t)):n.disable()}))},t.prototype.deletePanel=function(t){this.printPanels[t].clear(),this.printPanels[t].getTarget().remove(),this.printPanels.splice(t,1)},t.prototype.getPaneltotal=function(){return this.printPanels.length},t.prototype.createDefaultPanel=function(){return new Ot(new Pt({index:this.printPanels.length,name:this.defaultPanelName,paperType:"A4"}),this.id)},t.prototype.createContainer=function(t){t?(this.container=p()(t),this.container.addClass("hiprint-printTemplate")):this.container=p()('<div class="hiprint-printTemplate"></div>')},t.prototype.getJsonTid=function(){var t=[];return this.printPanels.forEach((function(e){e.getPanelEntity().printElements.length&&t.push(e.getPanelEntity())})),new It({panels:t})},t.prototype.getJson=function(){var t=[];return this.printPanels.forEach((function(e){t.push(e.getPanelEntity(!0))})),new It({panels:t})},t.prototype.undo=function(t){i.a.event.trigger("hiprintTemplateDataShortcutKey_"+this.id,"undo")},t.prototype.redo=function(t){i.a.event.trigger("hiprintTemplateDataShortcutKey_"+this.id,"redo")},t.prototype.getPrintElementSelectEventKey=function(){return"PrintElementSelectEventKey_"+this.id},t.prototype.getBuildCustomOptionSettingEventKey=function(){return"BuildCustomOptionSettingEventKey_"+this.id},t.prototype.clear=function(){this.printPanels.forEach((function(t){if(t.clear(),t.index>0){var e=t.getTarget();e&&e.length&&e.remove()}})),this.printPanels=[this.printPanels[0]],this.printPaginationCreator&&this.printPaginationCreator.buildPagination()},t.prototype.getPaperType=function(t){return null==t&&(t=0),this.printPanels[0].paperType},t.prototype.getOrient=function(t){return null==t&&(t=0),this.printPanels[t].height>this.printPanels[t].width?1:2},t.prototype.getPrintStyle=function(t){return this.printPanels[t].getPrintStyle()},t.prototype.print=function(t,e,n){t||(t={}),this.getHtml(t,e).hiwprint(n)},t.prototype.print2=function(t,e){if(t||(t={}),e||(e={}),this.clientIsOpened()){var n=this,i=0,o={},r=p()('link[media=print][href*="print-lock"]'),a="";if(e.styleHandler&&(a+=e.styleHandler()),r.length<=0)throw new Error('\u8bf7\u5728 \u5165\u53e3\u6587\u4ef6(index.html) \u4e2d\u5f15\u5165 print-lock.css. \u6ce8\u610f: link[media="print"]');r.each((function(s,l){var u=new XMLHttpRequest;u.open("GET",p()(l).attr("href")),u.onreadystatechange=function(){if(4===u.readyState&&200===u.status&&(o[s+""]='<style rel="stylesheet" type="text/css">'+u.responseText+"</style>",++i==r.length)){for(var p="",l=0;l<r.length;l++)p+=o[l+""];a&&(p=a+p),n.sentToClient(p,t,e)}},u.send()}))}else alert("\u8fde\u63a5\u5ba2\u6237\u7aef\u5931\u8d25")},t.prototype.imageToBase64=function(t){var e=p()(t).attr("src");if(-1==e.indexOf("base64"))try{if(!this.tempimageBase64[e]){var n=document.createElement("canvas"),i=new Image;i.src=t.attr("src"),n.width=i.width,n.height=i.height,n.getContext("2d").drawImage(i,0,0),e&&(this.tempimageBase64[e]=n.toDataURL("image/png"))}t.attr("src",this.tempimageBase64[e])}catch(e){try{this.xhrLoadImage(t)}catch(t){console.log(t)}}},t.prototype.xhrLoadImage=function(t){},t.prototype.sentToClient=function(t,e,n){e||(e={});var i=p().extend({},n||{});if(i.imgToBase64=i.imgToBase64??!1,i.printByFragments)this.getHtmlAsync(e,i).then((e=>{var o=t+e[0].outerHTML;i.id=R.a.instance.guid(),i.html=o,i.templateId=this.id,H.sendByFragments(i,n)}));else{var o=t+this.getHtml(e,i)[0].outerHTML;i.id=R.a.instance.guid(),i.html=o,i.templateId=this.id,H.send(i)}},t.prototype.printByHtml=function(t){p()(t).hiwprint()},t.prototype.printByHtml2=function(t,e){if(e||(e={}),this.clientIsOpened()){var n=this,i=0,o={},r=p()('link[media=print][href*="print-lock"]');if(r.length<=0)throw new Error('\u8bf7\u5728 \u5165\u53e3\u6587\u4ef6(index.html) \u4e2d\u5f15\u5165 print-lock.css. \u6ce8\u610f: link[media="print"]');r.each((function(a,s){var l=new XMLHttpRequest;l.open("GET",p()(s).attr("href")),l.onreadystatechange=function(){if(4===l.readyState&&200===l.status&&(o[a+""]='<style rel="stylesheet" type="text/css">'+l.responseText+"</style>",++i==r.length)){for(var s="",u=0;u<r.length;u++)s+=o[u+""];var d=s+p()(t)[0].outerHTML,h=p().extend({},e||{});h.id=R.a.instance.guid(),h.html=d,h.templateId=n.id,H.send(h)}},l.send()}))}else alert("\u8fde\u63a5\u5ba2\u6237\u7aef\u5931\u8d25")},t.prototype.deletePrintElement=function(t){this.printPanels.forEach((function(e){e.deletePrintElement(t)}))},t.prototype.transformImg=function(t){var e=this;t.map((function(t,n){e.imageToBase64(p()(n))}))},t.prototype.toPdf=function(t,e,n){console.error("\u4e0d\u652f\u6301\u7684\u64cd\u4f5c")},t.prototype.createTempContainer=function(){this.removeTempContainer(),p()("body").prepend(p()('<div class="hiprint_temp_Container" style="overflow:hidden;height: 0px;box-sizing: border-box;"></div>'))},t.prototype.removeTempContainer=function(){p()(".hiprint_temp_Container").remove()},t.prototype.getTempContainer=function(){return p()(".hiprint_temp_Container")},t.prototype.parentWidthHeight=function(t){return t.style.width.endsWith("%")||t.style.height.endsWith("%")?"hiprint-printPaper-content"!=t.className?this.parentWidthHeight(t.parentNode):{width:10,height:10}:{width:i.a.pt.toPx(parseFloat(t.style.width)),height:i.a.pt.toPx(parseFloat(t.style.height))}},t.prototype.on=function(t,e){i.a.event.clear(t+"_"+this.id),i.a.event.on(t+"_"+this.id,e)},t.prototype.clientIsOpened=function(){return H.opened},t.prototype.getPrinterList=function(){return H.getPrinterList()||[]},t.prototype.getElementByTid=function(t,e){return null==e&&(e=0),this.printPanels[e].getElementByTid(t)},t.prototype.getElementByName=function(t,e){return null==e&&(e=0),this.printPanels[e].getElementByName(t)},t.prototype.getPanel=function(t){return null==t&&(t=0),this.printPanels[t]},t.prototype.loadAllImages=function(t,e,n){var i=this;null==n&&(n=0);for(var o=t[0].getElementsByTagName("img"),r=!0,a=0;a<o.length;a++){var s=o[a];s.src&&s.src!==window.location.href&&-1==s.src.indexOf("base64")&&(s&&void 0!==s.naturalWidth&&0!==s.naturalWidth&&s.complete||(r=!1))}n++,!r&&n<10?setTimeout((function(){i.loadAllImages(t,e,n)}),500):e()},t.prototype.setFontList=function(t){this.fontList=t},t.prototype.getFontList=function(){return this.fontList},t.prototype.setFields=function(t){this.fields=t},t.prototype.getFields=function(){return this.fields},t.prototype.setOnImageChooseClick=function(t){this.onImageChooseClick=t},t.prototype.getOnImageChooseClick=function(){return this.onImageChooseClick},t.prototype.getFieldsInPanel=function(){var t=[];return this.printPanels.forEach((function(e){t=t.concat(e.getFieldsInPanel())})),t},t.prototype.getTestData=function(){var t={};return this.printPanels.forEach((function(e){t=Object.assign(t,e.getTestData())})),t},t.prototype.update=function(t,e){var n=this;try{if(t&&"object"==O(t)&&t.panels.length>0){var i=n.printPanels.length-1;t.panels.forEach((function(t,e){if(e>i){n.printPanels.push(new Ot(t,n.id));var o=n.printPanels[e];n.container.append(o.getTarget()),e>0&&o.disable(),o.design(n.designOptions),n.printPaginationCreator&&n.printPaginationCreator.buildPagination()}var r=new Pt(t);n.editingPanel=n.printPanels[e],n.editingPanel.update(r)})),n.selectPanel(e||0)}}catch(t){console.log(t),n.onUpdateError&&n.onUpdateError(t)}},t.prototype.getSelectEls=function(){var t=this;return t.editingPanel.mouseRect&&t.editingPanel.mouseRect.target&&p()(".mouseRect").length?t.editingPanel.getElementInRect(t.editingPanel.mouseRect):t.editingPanel.printElements.filter((function(t){return"block"==t.designTarget.children().last().css("display")&&!t.printElementType.type.includes("table")}))},t.prototype.selectElementDesignTarget=function(t){var e=p();let n=t.designTarget;n.children("div[panelindex]").addClass("selected").removeClass("hovered"),n.children().last().css({display:"block"}),n=n[0],e.data(n,"hidraggable").options.onBeforeSelectAllDrag.call(n,{})},t.prototype.selectElementsByField=function(t){Array.isArray(t)||(t=[t]);var e=this;p();e.editingPanel.printElements.forEach(((n,i)=>{t&&t.includes(n.options.field)&&e.selectElementDesignTarget(n)}))},t.prototype.selectAllElements=function(){var t=this;p();t.editingPanel.printElements.forEach(((e,n)=>{t.selectElementDesignTarget(e)}))},t.prototype.selectElementsId=function(t){Array.isArray(t)||(t=[t]);var e=this;p();e.editingPanel.printElements.forEach(((n,i)=>{n.designTarget;t&&t.includes(n.id)&&e.selectElementDesignTarget(n)}))},t.prototype.hoverElementsId=function(t,e){this.editingPanel.printElements.forEach((n=>{if(n.id===t){const t=n.designTarget.children("div[panelindex]");e?t.removeClass("hovered"):t.hasClass("selected")||t.addClass("hovered")}}))},t.prototype.updateOption=function(t,e){var n=this.getSelectEls();n&&n.length&&(n.forEach((function(n){"draggable"===t&&n.designTarget.hidraggable("update",{draggable:e}),n.updateOption(t,e,!0)})),i.a.event.trigger("hiprintTemplateDataChanged_"+this.id,"\u6279\u91cf\u4fee\u6539"))},t.prototype.setElsAlign=function(t){var e=this.getSelectEls();if(e.length){var n=Math.min.apply(null,e.map((function(t){return t.options.left}))),i=Math.max.apply(null,e.map((function(t){return t.options.left+t.options.width}))),o=Math.min.apply(null,e.map((function(t){return t.options.top}))),r=Math.max.apply(null,e.map((function(t){return t.options.top+t.options.height})));switch(t){case"left":e.forEach((function(t){t.updateSizeAndPositionOptions(n),t.designTarget.css("left",t.options.displayLeft())}));break;case"vertical":var a=n+(i-n)/2;e.forEach((function(t){t.updateSizeAndPositionOptions(a-t.options.width/2),t.designTarget.css("left",t.options.displayLeft())}));break;case"right":e.forEach((function(t){t.updateSizeAndPositionOptions(i-t.options.width),t.designTarget.css("left",t.options.displayLeft())}));break;case"top":e.forEach((function(t){t.updateSizeAndPositionOptions(void 0,o),t.designTarget.css("top",t.options.displayTop())}));break;case"horizontal":var s=o+(r-o)/2;e.forEach((function(t){t.updateSizeAndPositionOptions(void 0,s-t.options.height/2),t.designTarget.css("top",t.options.displayTop())}));break;case"bottom":e.forEach((function(t){t.updateSizeAndPositionOptions(void 0,r-t.options.height),t.designTarget.css("top",t.options.displayTop())}));break;case"distributeHor":var p=[].reduce.call(e,(function(t,e){return t+e.options.width}),0),l=(i-n-p)/(e.length-1);e.sort((function(t,e){return t.options.left-e.options.left})),e.forEach((function(t,n){[0,e.length-1].includes(n)||(t.updateSizeAndPositionOptions(e[n-1].options.left+e[n-1].options.width+l),t.designTarget.css("left",t.options.displayLeft()))}));break;case"distributeVer":var u=[].reduce.call(e,(function(t,e){return t+e.options.height}),0),d=(r-o-u)/(e.length-1);e.sort((function(t,e){return t.options.top-e.options.top})),e.forEach((function(t,n){[0,e.length-1].includes(n)||(t.updateSizeAndPositionOptions(void 0,e[n-1].options.top+e[n-1].options.height+d),t.designTarget.css("top",t.options.displayTop()))}))}}},t.prototype.setElsSpace=function(t,e){var n=this.getSelectEls();n.length&&(e?(n.sort((function(t,e){return t.options.left-e.options.left})),n.forEach((function(e,i){i>0&&(e.updateSizeAndPositionOptions(n[i-1].options.left+n[i-1].options.width+t),e.designTarget.css("left",e.options.displayLeft()))}))):(n.sort((function(t,e){return t.options.top-e.options.top})),n.forEach((function(e,i){i>0&&(e.updateSizeAndPositionOptions(void 0,n[i-1].options.top+n[i-1].options.height+t),e.designTarget.css("top",e.options.displayTop()))}))))},t.prototype.initAutoSave=function(){var t=this;i.a.event.on("hiprintTemplateDataShortcutKey_"+this.id,(function(e){if(t.history)switch(e){case"undo":if(t.historyPos>0){t.historyPos-=1;var n=t.historyList[t.historyPos];t.update(n.json)}break;case"redo":if(t.historyPos<t.historyList.length-1){t.historyPos+=1;n=t.historyList[t.historyPos];t.update(n.json)}}})),i.a.event.on("hiprintTemplateDataChanged_"+this.id,(function(e){if(t.history){var n=1==t.dataMode?t.getJson():t.getJsonTid();t.lastJson=n;var i=t.historyList.length-1;t.historyPos<i&&(t.historyList=t.historyList.slice(0,t.historyPos+1));const o=t.getSelectEls().map((t=>t.id)).join(",")||R.a.instance.guid(),r=t.historyList[i];r&&r.id===o&&r.type===e?t.historyList[i]={id:o,type:e,json:n}:(t.historyList.push({id:o,type:e,json:n}),t.historyList.length>50?t.historyList=t.historyList.slice(0,1).concat(t.historyList.slice(1,50)):t.historyPos+=1),t.onDataChanged&&t.onDataChanged(e,n)}}))},t}();function Lt(t){this.getHtml(t).hiwprint()}function kt(t,e,n){p().extend({},t||{}),t.imgToBase64=t.imgToBase64??!1;var i=new Ht({});i.on("printSuccess",e),i.on("printError",n),i.printByHtml2(this.getHtml(t),t.options)}function Mt(t){var e=void 0;return t&&t.templates.forEach((function(n,i){var o=p().extend({},n.options||{});t.imgToBase64&&(o.imgToBase64=o.imgToBase64??!1),e?e.append(n.template.getHtml(n.data,o).html()):e=n.template.getHtml(n.data,o)})),e}function _t(t){I.a.instance.init(t),I.a.instance.providers&&I.a.instance.providers.forEach((function(t){t.addElementTypes(P.instance)})),!window.autoConnect||I.a.instance.host==H.host&&I.a.instance.token==H.token||(H.stop(),I.a.instance.host&&(H.host=I.a.instance.host),I.a.instance.token&&(H.token=I.a.instance.token),H.start())}function Bt(t){null==L._config&&(L._config=JSON.stringify(F));const e=JSON.parse(L._config);t?t&&Object.keys(t).forEach((function(n){if("optionItems"==n&&t.optionItems&&t.optionItems.length)I.a.instance.registerItems(t.optionItems);else if(t[n].tabs&&t[n].tabs.length)t[n].tabs.forEach((function(t,i){if(t.replace)p().extend(I.a.instance[n].tabs[i],t);else{var o=t.options||[],r=e[n].tabs[i].options;o&&o.forEach((function(t){var e=r.findIndex((function(e){return e.name==t.name}));e>-1?r[e].hidden=t.hidden:t.after?(e=r.findIndex((function(e){return e.name==t.after})),e>-1&&r.splice(e+1,0,t)):r.push(t)})),p().extend(I.a.instance[n].tabs[i],{name:t.name,options:r})}})),delete t[n].tabs;else if(t[n].supportOptions&&t[n].supportOptions.length){var i=t[n].supportOptions,o=e[n].supportOptions;i.forEach((function(t){var e=o.findIndex((function(e){return e.name==t.name}));e>-1?o[e].hidden=t.hidden:t.after?(e=o.findIndex((function(e){return e.name==t.after})),e>-1&&o.splice(e+1,0,t)):o.push(t)})),p().extend(I.a.instance[n].supportOptions,o),delete t[n].supportOptions}else{var r={};r[n]=t[n],t[n].tabs&&0==t[n].tabs.length&&(r[n].supportOptions=e[n].supportOptions),p().extend(I.a.instance,r)}})):p().extend(I.a.instance,JSON.parse(L._config))}function Nt(t,e){return P.instance.updateElementType(t,e)}function At(t){I.a.instance.clear("printerList"),I.a.instance.on("printerList",t),H.refreshPrinterList()}function Vt(t){I.a.instance.clear("clients"),I.a.instance.on("clients",t),H.getClients()}function zt(t){I.a.instance.clear("clientInfo"),I.a.instance.on("getClientInfo",t),H.getClientInfo()}function jt(t,e,...n){I.a.instance.clear("address_"+t),I.a.instance.on("address_"+t,e),H.getAddress(t,...n)}function Wt(t,e,n){I.a.instance.clear("ippPrinterCallback"),I.a.instance.on("ippPrinterCallback",e),I.a.instance.clear("ippPrinterConnected"),I.a.instance.on("ippPrinterConnected",n),H.ippPrint(t)}function Yt(t,e){I.a.instance.clear("ippRequestCallback"),I.a.instance.on("ippRequestCallback",e),H.ippRequest(t)}n.d(e,"init",(function(){return _t})),n.d(e,"setConfig",(function(){return Bt})),n.d(e,"updateElementType",(function(){return Nt})),n.d(e,"hiwebSocket",(function(){return H})),n.d(e,"refreshPrinterList",(function(){return At})),n.d(e,"getClients",(function(){return Vt})),n.d(e,"getClientInfo",(function(){return zt})),n.d(e,"getAddress",(function(){return jt})),n.d(e,"ippPrint",(function(){return Wt})),n.d(e,"ippRequest",(function(){return Yt})),n.d(e,"PrintElementTypeManager",(function(){return xt})),n.d(e,"PrintElementTypeGroup",(function(){return Ct})),n.d(e,"PrintTemplate",(function(){return Ht})),n.d(e,"print",(function(){return Lt})),n.d(e,"print2",(function(){return kt})),n.d(e,"getHtml",(function(){return Mt})),p()(document).ready((function(){H.hasIo()&&window.autoConnect&&H.start()}))}]),k=function(t){return function(e){return{addElementTypes:function(e){e.removePrintElementTypes("defaultModule"),e.addPrintElementTypes("defaultModule",[new t.PrintElementTypeGroup("\u5e38\u89c4",[{tid:"defaultModule.text",title:"\u6587\u672c",type:"text"},{tid:"defaultModule.image",data:"data:image/gif;base64,R0lGODdhAQABAIABAAAAAOjo6CwAAAAAAQABAAACAkwBADs=",title:"\u56fe\u7247",type:"image",options:{width:60,height:60}},{tid:"defaultModule.longText",title:"\u957f\u6587",type:"longText"},{tid:"defaultModule.table",title:"\u8868\u683c",type:"table",columns:[[{title:"",field:"",width:100},{title:"",field:"",width:100}]]},{tid:"defaultModule.barcode",title:"\u6761\u5f62\u7801",type:"barcode"},{tid:"defaultModule.qrcode",title:"\u4e8c\u7ef4\u7801",type:"qrcode"}]),new t.PrintElementTypeGroup("\u8f85\u52a9",[{tid:"defaultModule.hline",title:"\u6a2a\u7ebf",type:"hline"},{tid:"defaultModule.vline",title:"\u7ad6\u7ebf",type:"vline"},{tid:"defaultModule.rect",title:"\u77e9\u5f62",type:"rect"},{tid:"defaultModule.oval",title:"\u692d\u5706",type:"oval"}])])}}}}(L);!function(t){function e(){return-1!==navigator.userAgent.indexOf("MSIE")||!!document.documentMode}function n(t,e,i){void 0===i&&(i=0);for(var o=t.getElementsByTagName("img"),r=!0,a=0;a<o.length;a++){var s=o[a];s.src&&s.src!==window.location.href&&-1==s.src.indexOf("base64")&&(s&&void 0!==s.naturalWidth&&0!==s.naturalWidth&&s.complete||s.complete||(r=!1))}i++,!r&&i<10?setTimeout((function(){n(t,e,i)}),500):e()}t.fn.hiwprint=function(i){var o=!1,r=document.getElementById("hiwprint_iframe");r&&r.parentNode.removeChild(r);var a=t.extend({},t.fn.hiwprint.defaults,i),s=this,p=t('<iframe id="hiwprint_iframe" style="visibility: hidden; height: 0; width: 0; position: absolute;"></iframe>'),l="";a.importCss&&(a.styleHandler&&(l+=a.styleHandler()),t("link[media=print]").length>0&&t("link[media=print]").each((function(){t(this).attr("href").indexOf("print-lock.css")>=0&&(l+='<link rel="stylesheet" type="text/css" media="print" href="'+t(this).attr("href")+'">',l+='<link rel="stylesheet" type="text/css" href="'+t(this).attr("href")+'">')}))),p[0].srcdoc='<!DOCTYPE html><html><head><title></title><meta charset="UTF-8">'+l+"</head><body></body></html>",p[0].onload=function(){if(!o){o=!0;var t=p[0].contentWindow||p[0].contentDocument;t.document&&(t=t.document),p.attr("srcdoc")||t.write('<!DOCTYPE html><html><head><title></title><meta charset="UTF-8">'+l+"</head><body></body></html>"),a.printContainer?t.body.innerHTML=s[0].outerHTML:t.body.innerHTML=s.html(),n(t,(function(){!function(t,n){try{if(t.focus(),!e()&&window.StyleMedia||e())try{t.contentWindow.document.execCommand("print",!1,null)}catch(e){t.contentWindow.print()}else t.contentWindow.print();n.callback&&n.callback()}catch(t){console.log(t)}}(p[0],a)}))}},p.appendTo("body")},t.fn.hiwprint.defaults={importCss:!0,printContainer:!0,callback:null,styleHandler:null}}(p());const{rE:M}={rE:"0.1.0"};function B(t,e=!1){try{if(!Array.isArray(t))throw new Error("\u53c2\u6570 res \u5fc5\u987b\u662f\u4e00\u4e2a\u6570\u7ec4");L.init();const n=t.filter((t=>t?.template&&"string"==typeof t.template&&t.data)).map((t=>{try{return{template:new L.PrintTemplate({template:JSON.parse(t.template)}),data:t.data}}catch(t){return console.error("\u89e3\u6790\u6a21\u677f\u5931\u8d25\uff0c\u8df3\u8fc7\u6b64\u4efb\u52a1:",t),null}})).filter(Boolean);if(0===n.length)return void console.warn("\u6ca1\u6709\u6709\u6548\u7684\u6253\u5370\u4efb\u52a1");e?L.print2({templates:n}):L.print({templates:n})}catch(t){throw console.error("\u6253\u5370\u5931\u8d25:",t),new Error(`\u6253\u5370\u5931\u8d25: ${t.message}`)}}function N(t,e=!0,n=!1){try{if(!(t&&t.template&&t.data))throw new Error("hiprintPrint \u53c2\u6570\u65e0\u6548");{L.init();const i=JSON.parse(t.template),o=new L.PrintTemplate({template:i});if(!e)return o.getHtml(t.data);n?o.print2(t.data):o.print(t.data)}}catch(t){throw console.error("\u6253\u5370\u5931\u8d25:",t),new Error(`\u6253\u5370\u5931\u8d25: ${t.message}`)}}L.version=M;var A=L;return a}()}));
2
2
  //# sourceMappingURL=index.js.map