/*! For license information please see formula-board.js.LICENSE.txt */ (()=>{var t={575:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},913:t=>{function e(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}t.exports=function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t},t.exports.default=t.exports,t.exports.__esModule=!0},713:t=>{t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0},318:t=>{t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},809:(t,e,r)=>{"use strict";var i=r(318);e.Z=void 0;var n=i(r(575)),a=i(r(282)),o=r(231),s=function t(e){switch((0,n.default)(this,t),e||(e=window.parent===window?"webview":"iframe"),e){case"iframe":return new a.default({messager:o.iframeMessager});case"webview":return new a.default({messager:o.webviewMessager})}};e.Z=function(t){return new s(t)}},929:()=>{},547:(t,e,r)=>{"use strict";var i=r(318);Object.defineProperty(e,"__esModule",{value:!0}),e.iframeMessager=void 0;var n=i(r(575)),a=i(r(913)),o=new(function(){function t(){(0,n.default)(this,t)}return(0,a.default)(t,[{key:"getCheckServiceType",value:function(){return"common.requestFunctions"}},{key:"onReceiveMessage",value:function(t){window.addEventListener("message",(function(e){e.data.headers&&t(e.data)}))}},{key:"sendAction",value:function(t){var e=t.type,r=t.headers,i=t.data;return window.parent!==window&&window.parent.postMessage({type:e,headers:r,data:i},"*"),!0}}]),t}());e.iframeMessager=o},231:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(547);Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}));var n=r(867);Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}}))}));var a=r(929);Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))}))},867:(t,e,r)=>{"use strict";var i=r(318);Object.defineProperty(e,"__esModule",{value:!0}),e.webviewMessager=void 0;var n=i(r(575)),a=i(r(913)),o=i(r(713)),s="eclassExtends",c=new(function(){function t(){(0,n.default)(this,t),(0,o.default)(this,"send",void 0),(0,o.default)(this,"onready",void 0),this.onCreate()}return(0,a.default)(t,[{key:"onCreate",value:function(){var t=this;window[s]||(window[s]={}),window[s].sendAction&&Object.defineProperty(window[s],"sendAction",{get:function(){return t.send},set:function(e){t.send=e,t.onready&&t.onready()}})}},{key:"getCheckServiceType",value:function(){return"common.requestFunctions"}},{key:"onReceiveMessage",value:function(t){window[s].callback||(window[s].callback=function(e){var r=JSON.parse(e);t(r)})}},{key:"sendAction",value:function(t){var e=JSON.stringify(t);return!!window[s].sendAction&&(window[s].sendAction(e),!0)}}]),t}());e.webviewMessager=c},282:(t,e,r)=>{"use strict";var i=r(318);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(r(575)),a=i(r(913)),o=i(r(713)),s=i(r(877)),c=r(486),u=i(r(554));function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){(0,o.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f=function(){function t(e){(0,n.default)(this,t),(0,o.default)(this,"messager",void 0),(0,o.default)(this,"listeners",new Map),(0,o.default)(this,"retryQueue",[]),(0,o.default)(this,"namespace",void 0),(0,o.default)(this,"logger",void 0);var r=e.messager,i=e.log,a=e.namespace;this.namespace=a,this.logger=new u.default(i,this.namespace),this.initMessager(r)}return(0,a.default)(t,[{key:"initMessager",value:function(t){var e=this;this.messager=t,this.messager.onReceiveMessage(this.handleReceiveMessage.bind(this)),this.messager.onready=function(){e.startRetryRequest()}}},{key:"startRetryRequest",value:function(){var t=this,e=this.retryQueue.slice();this.retryQueue=[],e.forEach((function(e){t.send(e)}))}},{key:"handleReceiveMessage",value:function(t){var e=this,r=t.type,i=t.headers;this.logger.logMessage("receive message",t);var n=this.listeners[r];if(n){var a=i.reqId,o=h(h({},t),{},{end:function(t){(0,c.merge)(t,{headers:{reqId:a},type:r}),e.send(t)}});this._handleOnceListeners(n,o),this._handleNormalListeners(n,o)}}},{key:"_handleOnceListeners",value:function(t,e){var r=e.headers,i=e.data,n=r.reqId;(0,c.remove)(t,(function(t){var e=t.reqId&&t.reqId===n||!t.reqId;return t.once&&e})).forEach((function(t){t.callback&&t.callback(i,e)}))}},{key:"_handleNormalListeners",value:function(t,e){var r=e.headers,i=e.data,n=r.reqId;t.forEach((function(t){t.reqId?t.reqId===n&&t.callback&&t.callback(i,e):t.callback&&t.callback(i,e)}))}},{key:"send",value:function(t,e){var r={type:"",headers:{reqId:(0,s.default)(),mMode:"push"},data:{}};if("string"==typeof t?(0,c.merge)(r,{type:t,data:{body:e}}):(0,c.merge)(r,t),r.type){if(this.messager.sendAction(r)){var i=globalThis.onWebServiceExecOperation;i&&i(this,"sendAction",r),this.logger.logMessage("send message",r)}else this.retryQueue.push(r),this.logger.logMessage("receiver is not ready, request will wait and resend",r);return r}console.error("[webService]message type for sending is not supplied")}},{key:"request",value:function(t,e){var r=this;return new Promise((function(i,n){var a;(a="string"==typeof t?{type:t,data:{body:e}}:t).headers=h(h({},a.headers),{},{mMode:"request"});var o=r.send(a);r.on(a.type,{callback:function(t){i(t)},reqId:o.headers.reqId,once:!0})}))}},{key:"on",value:function(t,e){var r,i=this;this.listeners[t]||(this.listeners[t]=[]),r="function"==typeof e?{callback:e,reqId:"",once:!1}:e,this.listeners[t].push(r);var n=globalThis.onWebServiceExecOperation;return n&&n(this,"addListener",{type:t,messageListener:r}),function(){i.off(t,r)}}},{key:"off",value:function(t,e){if(e){var r;if("function"==typeof e)(0,c.remove)(this.listeners[t],(function(t){return t.callback===e})),r={callback:e};else{var i=e.callback,n=e.reqId;(0,c.remove)(this.listeners[t],(function(t){return t.callback===i||t.reqId&&t.reqId===n})),r=e}0===this.listeners[t].length&&delete this.listeners[t];var a=globalThis.onWebServiceExecOperation;a&&a(this,"removeListener",{type:t,messageListener:r})}else delete this.listeners[t]}},{key:"removeAllListeners",value:function(){this.listeners=new Map;var t=globalThis.onWebServiceExecOperation;t&&t(this,"removeAllListener")}}]),t}();e.default=f},554:(t,e,r)=>{"use strict";var i=r(318);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(r(575)),a=i(r(913)),o=i(r(713)),s=function(){function t(e,r){(0,n.default)(this,t),(0,o.default)(this,"option",!1),(0,o.default)(this,"namespace",""),this.option=e,this.namespace=r}return(0,a.default)(t,[{key:"logMessage",value:function(t,e){if(this.option){var r="[WebService][".concat(this.namespace,"] ").concat(t);(!0===this.option||-1===this.option.ignore.indexOf(e.type))&&console.info(r,e)}}},{key:"info",value:function(){var t;this.option&&(t=console).info.apply(t,arguments)}}]),t}();e.default=s},787:()=>{function t(e){return t="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},t(e)}!function(){var e={r:function(t){if(e[t].inited)return e[t].value;if("function"!=typeof e[t].value)return e[t].inited=!0,e[t].value;var r={exports:{}},i=e[t].value(null,r.exports,r);if(e[t].inited=!0,e[t].value=i,void 0!==i)return i;for(var n in r.exports)if(r.exports.hasOwnProperty(n))return e[t].inited=!0,e[t].value=r.exports,r.exports}};e[0]={value:function(){var e={};function r(t){this.formula=t}function i(t,r,a,o,s){var c,u,l=null,h=null,f=[],p=r.operand||[],d=null;if(a.operand=[],-1===r.name.indexOf("text")){for(var g=0,m=p.length;g<m;g++)""!==(l=p[g])?l?"string"==typeof l?("brackets"===r.name&&g<2||"function"===r.name&&0===g?p[g]=l:p[g]=n("text",l),a.operand.push(p[g])):(a.operand.push({}),p[g]=i(t.operand[g],l,a.operand[a.operand.length-1],o,s)):(p[g]=n("empty"),a.operand.push(p[g])):(f.push(g),s.hasOwnProperty("startOffset")||(s.startOffset=g),s.endOffset=g,r.attr&&r.attr.id&&(s.groupId=r.attr.id));for(2===f.length&&(s.endOffset-=1);g=f.length;)g=f[g-1],p.splice(g,1),f.length--,t.operand.splice(g,1)}if(u=r.name,!(d=e[u]||kf[u.replace(/^[a-z]/i,(function(t){return t.toUpperCase()})).replace(/-([a-z])/gi,(function(t,e){return e.toUpperCase()}))+"Expression"]))throw new Error("operator type error: not found "+r.operator);for(var v in(c=function(){}).prototype=d.prototype,h=new c,d.apply(h,p),a.func=h,r.callFn)r.callFn.hasOwnProperty(v)&&h[v]&&h[v].apply(h,r.callFn[v]);return r.attr&&(r.attr.id&&(o[r.attr.id]={objGroup:h,strGroup:t}),r.attr["data-root"]&&(o.root={objGroup:h,strGroup:t}),h.setAttr(r.attr)),h}function n(t,e){switch(t){case"empty":return new kf.EmptyExpression;case"text":return new kf.TextExpression(e)}}function a(t){var e={};if("[object Array]"==={}.toString.call(t)){e=[];for(var r=0,i=t.length;r<i;r++)e[r]=o(t[r])}else for(var n in t)t.hasOwnProperty(n)&&(e[n]=o(t[n]));return e}function o(e){return e?"object"!==t(e)?e:a(e):e}return r.prototype.generateBy=function(t){var e=t.tree,r={},n={},o={};if("string"==typeof e)throw new Error("Unhandled error");return this.formula.appendExpression(i(e,a(e),r,o,n)),{select:n,parsedTree:e,tree:r,mapping:o}},r.prototype.regenerateBy=function(t){return this.formula.clearExpressions(),this.generateBy(t)},r}},e[1]={value:function(t){return{toRPNExpression:e.r(2),generateTree:e.r(3)}}},e[2]={value:function(r){var i=e.r(4);return function e(r){var n=[],a=null;for(r=function(e){for(var r=[],i=null;void 0!==(i=e.pop());)if(!i||"object"!==t(i)||!1!==i.sign&&"function"!==i.name)r.push(i);else{var n=i.handler(i,[],r.reverse());r.unshift(n),r.reverse()}return r.reverse()}(r);a=r.shift();)"combination"===a.name&&1===a.operand.length&&"brackets"===a.operand[0].name&&(a=a.operand[0]),i.isArray(a)?n.push(e(a)):n.push(a);return n}}},e[3]={value:function(r){var i=e.r(13),n=e.r(4);return function e(r){for(var a=null,o=[],s=0,c=r.length;s<c;s++)n.isArray(r[s])&&(r[s]=e(r[s]));for(;a=r.shift();)"object"===t(a)&&a.handler?o.push(a.handler(a,o,r)):o.push(a);return i(o)}}},e[4]={value:function(t){var r=e.r(7),i=e.r(6),n=e.r(15),a={getLatexType:function(t){return t=t.replace(/^\\/,""),r[t]?"operator":i[t]?"function":"text"},isArray:function(t){return t&&"[object Array]"===Object.prototype.toString.call(t)},getDefine:function(t){return a.extend({},r[t.replace("\\","")])},getFuncDefine:function(t){return{name:"function",params:t.replace(/^\\/,""),handler:n}},getBracketsDefine:function(t,e){return a.extend({params:[t,e]},r.brackets)},extend:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}};return a}},e[5]={value:function(){var t=!0;return{".":t,"{":t,"}":t,"[":t,"]":t,"(":t,")":t,"|":t}}},e[6]={value:function(){return{sin:1,cos:1,arccos:1,cosh:1,det:1,inf:1,limsup:1,Pr:1,tan:1,arcsin:1,cot:1,dim:1,ker:1,ln:1,sec:1,tanh:1,arctan:1,coth:1,exp:1,lg:1,log:1,arg:1,csc:1,gcd:1,lim:1,max:1,sinh:1,deg:1,hom:1,liminf:1,min:1,sup:1}}},e[7]={value:function(t){var r=e.r(22),i=e.r(11);return{"^":{name:"superscript",type:i.OP,handler:r},_:{name:"subscript",type:i.OP,handler:r},frac:{name:"fraction",type:i.FN,sign:!1,handler:e.r(14)},sqrt:{name:"radical",type:i.FN,sign:!1,handler:e.r(23)},sum:{name:"summation",type:i.FN,traversal:"rtl",handler:e.r(24)},int:{name:"integration",type:i.FN,traversal:"rtl",handler:e.r(16)},brackets:{name:"brackets",type:i.FN,handler:e.r(12)},mathcal:{name:"mathcal",type:i.FN,sign:!1,handler:e.r(19)},mathfrak:{name:"mathfrak",type:i.FN,sign:!1,handler:e.r(20)},mathbb:{name:"mathbb",type:i.FN,sign:!1,handler:e.r(18)},mathrm:{name:"mathrm",type:i.FN,sign:!1,handler:e.r(21)}}}},e[8]={value:function(t){return{int:e.r(26),quot:e.r(27)}}},e[9]={value:function(t){return{combination:e.r(29),fraction:e.r(30),function:e.r(31),integration:e.r(32),subscript:e.r(39),superscript:e.r(41),script:e.r(37),radical:e.r(38),summation:e.r(40),brackets:e.r(28),mathcal:e.r(34),mathfrak:e.r(35),mathbb:e.r(33),mathrm:e.r(36)}}},e[10]={value:function(){return{"#":1,$:1,"%":1,_:1,"&":1,"{":1,"}":1,"^":1,"~":1}}},e[11]={value:function(){return{OP:1,FN:2}}},e[12]={value:function(t){var r=e.r(5);return function(t,e,i){for(var n=0,a=t.params.length;n<a;n++)if(!(t.params[n]in r))throw new Error("Brackets: invalid params");return t.operand=t.params,t.params[2]=i.shift(),delete t.handler,delete t.params,t}}},e[13]={value:function(){return function(){return{name:"combination",operand:arguments[0]||[]}}}},e[14]={value:function(){return function(t,e,r){var i=r.shift(),n=r.shift();if(void 0===i||void 0===n)throw new Error("Frac: Syntax Error");return t.operand=[i,n],delete t.handler,t}}},e[15]={value:function(t){var r=e.r(17);return function(t,e,i){var n=r.exec(i);return t.operand=[t.params,n.expr,n.superscript,n.subscript],delete t.params,delete t.handler,t}}},e[16]={value:function(t){var r=e.r(17),i=e.r(11).FN;return function(t,e,n){var a=n.shift(),o=r.exec(n);return o.expr&&o.expr.type===i&&o.expr.handler&&(o.expr=o.expr.handler(o.expr,e,n)),t.operand=[o.expr,o.superscript,o.subscript],t.callFn={setType:[0|a]},delete t.handler,t}}},e[17]={value:function(){return{exec:function(e){var r=function(e){var r,i=t(e),n={superscript:null,subscript:null};if(!i)return n;if(r=t(e),n[i.type]=i.value||null,r){if(r.type===i.type)throw new Error("Script: syntax error!");n[r.type]=r.value||null}return n}(e),i=e.shift();if(i&&i.name&&-1!==i.name.indexOf("script"))throw new Error("Script: syntax error!");return r.expr=i||null,r}};function t(t){var e=t.shift();return e?"subscript"===e.name||"superscript"===e.name?{type:e.name,value:t.shift()}:(t.unshift(e),null):null}}},e[18]={value:function(){return function(e,r,i){var n=i.shift();return"object"===t(n)&&"combination"===n.name&&(n=n.operand.join("")),e.name="text",e.attr={_reverse:"mathbb"},e.callFn={setFamily:["KF AMS BB"]},e.operand=[n],delete e.handler,e}}},e[19]={value:function(){return function(e,r,i){var n=i.shift();return"object"===t(n)&&"combination"===n.name&&(n=n.operand.join("")),e.name="text",e.attr={_reverse:"mathcal"},e.callFn={setFamily:["KF AMS CAL"]},e.operand=[n],delete e.handler,e}}},e[20]={value:function(){return function(e,r,i){var n=i.shift();return"object"===t(n)&&"combination"===n.name&&(n=n.operand.join("")),e.name="text",e.attr={_reverse:"mathfrak"},e.callFn={setFamily:["KF AMS FRAK"]},e.operand=[n],delete e.handler,e}}},e[21]={value:function(){return function(e,r,i){var n=i.shift();return"object"===t(n)&&"combination"===n.name&&(n=n.operand.join("")),e.name="text",e.attr={_reverse:"mathrm"},e.callFn={setFamily:["KF AMS ROMAN"]},e.operand=[n],delete e.handler,e}}},e[22]={value:function(){return function(t,e,r){var i=e.pop(),n=r.shift()||null;if(!n)throw new Error("Missing script");if((i=i||"").name===t.name||"script"===i.name)throw new Error("script error");return"subscript"===i.name?(i.name="script",i.operand[2]=i.operand[1],i.operand[1]=n,i):"superscript"===i.name?(i.name="script",i.operand[2]=n,i):(t.operand=[i,n],delete t.handler,t)}}},e[23]={value:function(t){var r=e.r(13);return function(t,e,i){var n=i.shift(),a=null,o=null;if("["===n){for(n=[];(a=i.shift())&&"]"!==a;)n.push(a);n=0===n.length?null:r(n),o=i.shift()}else o=n,n=null;return t.operand=[o,n],delete t.handler,t}}},e[24]={value:function(t){var r=e.r(17);return function(t,e,i){var n=r.exec(i);return t.operand=[n.expr,n.superscript,n.subscript],delete t.handler,t}}},e[25]={value:function(t){var r=e.r(43).Parser,i=e.r(1),n=e.r(8),a=e.r(42),o=e.r(7),s=e.r(9),c=e.r(10),u=e.r(4),l=new RegExp("|","g"),h=new RegExp("","g"),f=new RegExp("","g");function p(t){if(0===(e=t).indexOf("\\")&&c[e.substring(1)])return t.substring(1);var e,r;switch(u.getLatexType(t)){case"operator":return u.getDefine(t);case"function":return u.getFuncDefine(t);default:return 0===(r=t).indexOf("\\")?r+"\\":r}}r.register("latex",r.implement({parse:function(t){var e=this.split(this.format(t));return e=this.parseToGroup(e),e=this.parseToStruct(e),this.generateTree(e)},serialization:function(t,e){return a(t,e)},expand:function(t){var e=t.parse,r=null,i=t.pre,a=t.reverse;for(var c in e)e.hasOwnProperty(c)&&(r=c.replace(/\\/g,""),o[r]=e[c]);for(var c in a)a.hasOwnProperty(c)&&(s[c.replace(/\\/g,"")]=a[c]);if(i)for(var c in i)i.hasOwnProperty(c)&&(n[c.replace(/\\/g,"")]=i[c])},format:function(t){for(var e in t=(t=t.replace(/\\\s+/,"").replace(/\s*([^a-z0-9\s])\s*/gi,(function(t,e){return e}))).replace(l,"").replace(/\\{/gi,"").replace(/\\}/gi,""),n)n.hasOwnProperty(e)&&(t=n[e](t));return t},split:function(t){var e=[],r=/(?:\\[^a-z]\s*)|(?:\\[a-z]+\s*)|(?:[{}]\s*)|(?:[^\\{}]\s*)/gi,i=/^\s+|\s+$/g,n=null;for(t=t.replace(i,"");n=r.exec(t);)(n=n[0].replace(i,""))&&e.push(n);return e},generateTree:function(t){for(var e=[],r=null;r=t.shift();)u.isArray(r)?e.push(this.generateTree(r)):e.push(r);return e=i.toRPNExpression(e),i.generateTree(e)},parseToGroup:function(t){for(var e=[],r=[e],i=0,n=0,a=0,o=t.length;a<o;a++)switch(t[a]){case"{":i++,r.push(e),e.push([]),e=e[e.length-1];break;case"}":i--,e=r.pop();break;case"\\left":n++,r.push(e),e.push([[]]),(e=e[e.length-1][0]).type="brackets",a++,e.leftBrackets=t[a].replace(h,"{").replace(f,"}");break;case"\\right":n--,a++,e.rightBrackets=t[a].replace(h,"{").replace(f,"}"),e=r.pop();break;default:e.push(t[a].replace(h,"\\{").replace(f,"\\}"))}if(0!==i)throw new Error("Group Error!");if(0!==n)throw new Error("Brackets Error!");return r[0]},parseToStruct:function(t){for(var e=[],r=0,i=t.length;r<i;r++)u.isArray(t[r])?"brackets"===t[r].type?(e.push(u.getBracketsDefine(t[r].leftBrackets,t[r].rightBrackets)),e.push(this.parseToStruct(t[r]))):e.push(this.parseToStruct(t[r])):e.push(p(t[r]));return e}}))}},e[26]={value:function(){return function(t){return t.replace(/\\(i+)nt(\b|[^a-zA-Z])/g,(function(t,e,r){return"\\int "+e.length+r}))}}},e[27]={value:function(){return function(t){return t.replace(/``/g,"“")}}},e[28]={value:function(){return function(t){return"{"!==t[0]&&"}"!==t[0]||(t[0]="\\"+t[0]),"{"!==t[1]&&"}"!==t[1]||(t[1]="\\"+t[1]),["\\left",t[0],t[2],"\\right",t[1]].join(" ")}}},e[29]={value:function(){return function(t){return this.attr["data-root"]||this.attr["data-placeholder"]?t.join(""):"{"+t.join("")+"}"}}},e[30]={value:function(){return function(t){return"\\frac "+t[0]+" "+t[1]}}},e[31]={value:function(){return function(t){var e=["\\"+t[0]];return t[2]&&e.push("^"+t[2]),t[3]&&e.push("_"+t[3]),t[1]&&e.push(" "+t[1]),e.join("")}}},e[32]={value:function(){return function(t){var e=["\\int "];if(this.callFn&&this.callFn.setType){e=["\\"];for(var r=0,i=this.callFn.setType;r<i;r++)e.push("i");e.push("nt ")}return t[1]&&e.push("^"+t[1]),t[2]&&e.push("_"+t[2]),t[0]&&e.push(" "+t[0]),e.join("")}}},e[33]={value:function(){return function(t){return"\\mathbb{"+t[0]+"}"}}},e[34]={value:function(){return function(t){return"\\mathcal{"+t[0]+"}"}}},e[35]={value:function(){return function(t){return"\\mathfrak{"+t[0]+"}"}}},e[36]={value:function(){return function(t){return"\\mathrm{"+t[0]+"}"}}},e[37]={value:function(){return function(t){return t[0]+"^"+t[1]+"_"+t[2]}}},e[38]={value:function(){return function(t){var e=["\\sqrt"];return t[1]&&e.push("["+t[1]+"]"),e.push(" "+t[0]),e.join("")}}},e[39]={value:function(){return function(t){return t[0]+"_"+t[1]}}},e[40]={value:function(){return function(t){var e=["\\sum "];return t[1]&&e.push("^"+t[1]),t[2]&&e.push("_"+t[2]),t[0]&&e.push(" "+t[0]),e.join("")}}},e[41]={value:function(){return function(t){return t[0]+"^"+t[1]}}},e[42]={value:function(r){var i=e.r(9),n=e.r(10),a=/(\\(?:[\w]+)|(?:[^a-z]))\\/gi;return function(t,e){return o(t,e)};function o(e,r){var s,c,u=[];if("object"!==t(e))return n[e]?"\\"+e+" ":e.replace(a,(function(t,e){return e+" "}));"combination"===e.name&&1===e.operand.length&&"combination"===e.operand[0].name&&(e=e.operand[0]);for(var l=0,h=(s=e.operand).length;l<h;l++)s[l]?u.push(o(s[l])):u.push(s[l]);return c=e.attr&&e.attr._reverse?e.attr._reverse:e.name,i[c].call(e,u,r)}}},e[43]={value:function(e,r,i){var n={},a={},o=function(t,e){for(var r=null,i=0,n=(e=[].slice.call(arguments,1)).length;i<n;i++)for(var a in r=e[i])r.hasOwnProperty(a)&&(t[a]=r[a])},s=function(e,r,i){if("string"==typeof r)e[r]=i;else{if("object"!==t(r))throw new Error("invalid option");for(i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}},c={use:function(t){if(!a[t])throw new Error("unknown parser type");return this.proxy(a[t])},config:function(t,e){return s(n,t,e),this},register:function(t,e){return a[t.toLowerCase()]=e,this},implement:function(t){var e=function(){},r=t.constructor||function(){},i=function(){l.call(this),r.call(this)};for(var n in e.prototype=l.prototype,i.prototype=new e,delete t.constructor,t)"constructor"!==n&&t.hasOwnProperty(n)&&(i.prototype[n]=t[n]);return i},proxy:function(t){return new u(t)}};function u(t){this.impl=new t,this.conf={}}function l(){this.conf={}}o(u.prototype,{config:function(t,e){s(this.conf,t,e)},set:function(t,e){this.impl.set(t,e)},parse:function(t){var e={config:{},tree:this.impl.parse(t)};return o(e.config,n,this.conf),e},serialization:function(t,e){return this.impl.serialization(t,e)},expand:function(t){this.impl.expand(t)}}),o(l.prototype,{set:function(t,e){o(this.conf,t,e)},parse:function(){throw new Error("Abstract function")}}),i.exports={Parser:c,ParserInterface:l}}},e[44]={value:function(t){var r=e.r(43).Parser;e.r(25),window.kf.Parser=r,window.kf.Assembly=e.r(0)}};var r={"kf.start":44};!function(t){try{"kf.start",e.r([r["kf.start"]])}catch(t){}}()}()},622:()=>{function t(e){return t="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},t(e)}!function(){var e={r:function(t){if(e[t].inited)return e[t].value;if("function"!=typeof e[t].value)return e[t].inited=!0,e[t].value;var r={exports:{}},i=e[t].value(null,r.exports,r);if(e[t].inited=!0,e[t].value=i,void 0!==i)return i;for(var n in r.exports)if(r.exports.hasOwnProperty(n))return e[t].inited=!0,e[t].value=r.exports,r.exports}};e[0]={value:function(t){function e(t){this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var i in r)t==i&&(t=r[i]);for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],a=0;a<n.length;a++){var o=n[a].re,s=n[a].process,c=o.exec(t);c&&(channels=s(c),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r},this.getHelpXML=function(){for(var t=new Array,i=0;i<n.length;i++)for(var a=n[i].example,o=0;o<a.length;o++)t[t.length]=a[o];for(var s in r)t[t.length]=s;var c=document.createElement("ul");for(c.setAttribute("id","rgbcolor-examples"),i=0;i<t.length;i++)try{var u=document.createElement("li"),l=new e(t[i]),h=document.createElement("div");h.style.cssText="margin: 3px; border: 1px solid black; background:"+l.toHex()+"; color:"+l.toHex(),h.appendChild(document.createTextNode("test"));var f=document.createTextNode(" "+t[i]+" -> "+l.toRGB()+" -> "+l.toHex());u.appendChild(h),u.appendChild(f),c.appendChild(u)}catch(t){}return c}}var r=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],n=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function a(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}return function(){function t(){var t={FRAMERATE:30,MAX_VIRTUAL_PIXELS:3e4,init:function(e){var r=0;t.UniqueId=function(){return"canvg"+ ++r},t.Definitions={},t.Styles={},t.Animations=[],t.Images=[],t.ctx=e,t.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(t,e){this.viewPorts.push({width:t,height:e})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(t){return null!=t&&"number"==typeof t?t:"x"==t?this.width():"y"==t?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}}};return t.init(),t.ImagesLoaded=function(){for(var e=0;e<t.Images.length;e++)if(!t.Images[e].loaded)return!1;return!0},t.trim=function(t){return t.replace(/^\s+|\s+$/g,"")},t.compressSpaces=function(t){return t.replace(/[\s\r\t\n]+/gm," ")},t.ajax=function(t){var e;return(e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"))?(e.open("GET",t,!1),e.send(null),e.responseText):null},t.parseXml=function(t){if(window.DOMParser)return(new DOMParser).parseFromString(t,"text/xml");t=t.replace(/<!DOCTYPE svg[^>]*>/,"");var e=new ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e},t.Property=function(t,e){this.name=t,this.value=e},t.Property.prototype.getValue=function(){return this.value},t.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},t.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var t=parseFloat(this.value);return(this.value+"").match(/%$/)&&(t/=100),t},t.Property.prototype.valueOrDefault=function(t){return this.hasValue()?this.value:t},t.Property.prototype.numValueOrDefault=function(t){return this.hasValue()?this.numValue():t},t.Property.prototype.addOpacity=function(r){var i=this.value;if(null!=r&&""!=r&&"string"==typeof this.value){var n=new e(this.value);n.ok&&(i="rgba("+n.r+", "+n.g+", "+n.b+", "+r+")")}return new t.Property(this.name,i)},t.Property.prototype.getDefinition=function(){var e=this.value.match(/#([^\)'"]+)/);return e&&(e=e[1]),e||(e=this.value),t.Definitions[e]},t.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},t.Property.prototype.getFillStyleDefinition=function(e,r){var i=this.getDefinition();if(null!=i&&i.createGradient)return i.createGradient(t.ctx,e,r);if(null!=i&&i.createPattern){if(i.getHrefAttribute().hasValue()){var n=i.attribute("patternTransform");i=i.getHrefAttribute().getDefinition(),n.hasValue()&&(i.attribute("patternTransform",!0).value=n.value)}return i.createPattern(t.ctx,e)}return null},t.Property.prototype.getDPI=function(t){return 96},t.Property.prototype.getEM=function(e){var r=12,i=new t.Property("fontSize",t.Font.Parse(t.ctx.font).fontSize);return i.hasValue()&&(r=i.toPixels(e)),r},t.Property.prototype.getUnits=function(){return(this.value+"").replace(/[0-9\.\-]/g,"")},t.Property.prototype.toPixels=function(e,r){if(!this.hasValue())return 0;var i=this.value+"";if(i.match(/em$/))return this.numValue()*this.getEM(e);if(i.match(/ex$/))return this.numValue()*this.getEM(e)/2;if(i.match(/px$/))return this.numValue();if(i.match(/pt$/))return this.numValue()*this.getDPI(e)*(1/72);if(i.match(/pc$/))return 15*this.numValue();if(i.match(/cm$/))return this.numValue()*this.getDPI(e)/2.54;if(i.match(/mm$/))return this.numValue()*this.getDPI(e)/25.4;if(i.match(/in$/))return this.numValue()*this.getDPI(e);if(i.match(/%$/))return this.numValue()*t.ViewPort.ComputeSize(e);var n=this.numValue();return r&&n<1?n*t.ViewPort.ComputeSize(e):n},t.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/s$/)?1e3*this.numValue():(t.match(/ms$/),this.numValue())},t.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/deg$/)?this.numValue()*(Math.PI/180):t.match(/grad$/)?this.numValue()*(Math.PI/200):t.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)},t.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(e,r,i,n,a,o){var s=null!=o?this.Parse(o):this.CreateFont("","","","","",t.ctx.font);return{fontFamily:a||s.fontFamily,fontSize:n||s.fontSize,fontStyle:e||s.fontStyle,fontWeight:i||s.fontWeight,fontVariant:r||s.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var e=this;this.Parse=function(r){for(var i={},n=t.trim(t.compressSpaces(r||"")).split(" "),a={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},o="",s=0;s<n.length;s++)a.fontStyle||-1==e.Styles.indexOf(n[s])?a.fontVariant||-1==e.Variants.indexOf(n[s])?a.fontWeight||-1==e.Weights.indexOf(n[s])?a.fontSize?"inherit"!=n[s]&&(o+=n[s]):("inherit"!=n[s]&&(i.fontSize=n[s].split("/")[0]),a.fontStyle=a.fontVariant=a.fontWeight=a.fontSize=!0):("inherit"!=n[s]&&(i.fontWeight=n[s]),a.fontStyle=a.fontVariant=a.fontWeight=!0):("inherit"!=n[s]&&(i.fontVariant=n[s]),a.fontStyle=a.fontVariant=!0):("inherit"!=n[s]&&(i.fontStyle=n[s]),a.fontStyle=!0);return""!=o&&(i.fontFamily=o),i}},t.ToNumberArray=function(e){for(var r=t.trim(t.compressSpaces((e||"").replace(/,/g," "))).split(" "),i=0;i<r.length;i++)r[i]=parseFloat(r[i]);return r},t.Point=function(t,e){this.x=t,this.y=e},t.Point.prototype.angleTo=function(t){return Math.atan2(t.y-this.y,t.x-this.x)},t.Point.prototype.applyTransform=function(t){var e=this.x*t[0]+this.y*t[2]+t[4],r=this.x*t[1]+this.y*t[3]+t[5];this.x=e,this.y=r},t.CreatePoint=function(e){var r=t.ToNumberArray(e);return new t.Point(r[0],r[1])},t.CreatePath=function(e){for(var r=t.ToNumberArray(e),i=[],n=0;n<r.length;n+=2)i.push(new t.Point(r[n],r[n+1]));return i},t.BoundingBox=function(t,e,r,n){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(t,e){null!=t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))},this.addX=function(t){this.addPoint(t,null)},this.addY=function(t){this.addPoint(null,t)},this.addBoundingBox=function(t){this.addPoint(t.x1,t.y1),this.addPoint(t.x2,t.y2)},this.addQuadraticCurve=function(t,e,r,i,n,a){var o=t+2/3*(r-t),s=e+2/3*(i-e),c=o+1/3*(n-t),u=s+1/3*(a-e);this.addBezierCurve(t,e,o,c,s,u,n,a)},this.addBezierCurve=function(t,e,r,n,a,o,s,c){var u=[t,e],l=[r,n],h=[a,o],f=[s,c];for(this.addPoint(u[0],u[1]),this.addPoint(f[0],f[1]),i=0;i<=1;i++){var p=function(t){return Math.pow(1-t,3)*u[i]+3*Math.pow(1-t,2)*t*l[i]+3*(1-t)*Math.pow(t,2)*h[i]+Math.pow(t,3)*f[i]},d=6*u[i]-12*l[i]+6*h[i],g=-3*u[i]+9*l[i]-9*h[i]+3*f[i],m=3*l[i]-3*u[i];if(0!=g){var v=Math.pow(d,2)-4*m*g;if(!(v<0)){var y=(-d+Math.sqrt(v))/(2*g);0<y&&y<1&&(0==i&&this.addX(p(y)),1==i&&this.addY(p(y)));var b=(-d-Math.sqrt(v))/(2*g);0<b&&b<1&&(0==i&&this.addX(p(b)),1==i&&this.addY(p(b)))}}else{if(0==d)continue;var x=-m/d;0<x&&x<1&&(0==i&&this.addX(p(x)),1==i&&this.addY(p(x)))}}},this.isPointInBox=function(t,e){return this.x1<=t&&t<=this.x2&&this.y1<=e&&e<=this.y2},this.addPoint(t,e),this.addPoint(r,n)},t.Transform=function(e){var r=this;this.Type={},this.Type.translate=function(e){this.p=t.CreatePoint(e),this.apply=function(t){t.translate(this.p.x||0,this.p.y||0)},this.unapply=function(t){t.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(t){t.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(e){var r=t.ToNumberArray(e);this.angle=new t.Property("angle",r[0]),this.cx=r[1]||0,this.cy=r[2]||0,this.apply=function(t){t.translate(this.cx,this.cy),t.rotate(this.angle.toRadians()),t.translate(-this.cx,-this.cy)},this.unapply=function(t){t.translate(this.cx,this.cy),t.rotate(-1*this.angle.toRadians()),t.translate(-this.cx,-this.cy)},this.applyToPoint=function(t){var e=this.angle.toRadians();t.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),t.applyTransform([Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]),t.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(e){this.p=t.CreatePoint(e),this.apply=function(t){t.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(t){t.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(t){t.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(e){this.m=t.ToNumberArray(e),this.apply=function(t){t.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.applyToPoint=function(t){t.applyTransform(this.m)}},this.Type.SkewBase=function(e){this.base=r.Type.matrix,this.base(e),this.angle=new t.Property("angle",e)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(t){this.base=r.Type.SkewBase,this.base(t),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(t){this.base=r.Type.SkewBase,this.base(t),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(t){for(var e=0;e<this.transforms.length;e++)this.transforms[e].apply(t)},this.unapply=function(t){for(var e=this.transforms.length-1;e>=0;e--)this.transforms[e].unapply(t)},this.applyToPoint=function(t){for(var e=0;e<this.transforms.length;e++)this.transforms[e].applyToPoint(t)};for(var i=t.trim(t.compressSpaces(e)).replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/),n=0;n<i.length;n++){var a=t.trim(i[n].split("(")[0]),o=i[n].split("(")[1].replace(")",""),s=new this.Type[a](o);s.type=a,this.transforms.push(s)}},t.AspectRatio=function(e,r,i,n,a,o,s,c,u,l){var h=(r=(r=t.compressSpaces(r)).replace(/^defer\s/,"")).split(" ")[0]||"xMidYMid",f=r.split(" ")[1]||"meet",p=i/n,d=a/o,g=Math.min(p,d),m=Math.max(p,d);"meet"==f&&(n*=g,o*=g),"slice"==f&&(n*=m,o*=m),u=new t.Property("refX",u),l=new t.Property("refY",l),u.hasValue()&&l.hasValue()?e.translate(-g*u.toPixels("x"),-g*l.toPixels("y")):(h.match(/^xMid/)&&("meet"==f&&g==d||"slice"==f&&m==d)&&e.translate(i/2-n/2,0),h.match(/YMid$/)&&("meet"==f&&g==p||"slice"==f&&m==p)&&e.translate(0,a/2-o/2),h.match(/^xMax/)&&("meet"==f&&g==d||"slice"==f&&m==d)&&e.translate(i-n,0),h.match(/YMax$/)&&("meet"==f&&g==p||"slice"==f&&m==p)&&e.translate(0,a-o)),"none"==h?e.scale(p,d):"meet"==f?e.scale(g,g):"slice"==f&&e.scale(m,m),e.translate(null==s?0:-s,null==c?0:-c)},t.Element={},t.EmptyProperty=new t.Property("EMPTY",""),t.Element.ElementBase=function(e){if(this.attributes={},this.styles={},this.children=[],this.attribute=function(e,r){var i=this.attributes[e];return null!=i?i:(1==r&&(i=new t.Property(e,""),this.attributes[e]=i),i||t.EmptyProperty)},this.getHrefAttribute=function(){for(var e in this.attributes)if(e.match(/:href$/))return this.attributes[e];return t.EmptyProperty},this.style=function(e,r){var i=this.styles[e];if(null!=i)return i;var n=this.attribute(e);if(null!=n&&n.hasValue())return this.styles[e]=n,n;var a=this.parent;if(null!=a){var o=a.style(e);if(null!=o&&o.hasValue())return o}return 1==r&&(i=new t.Property(e,""),this.styles[e]=i),i||t.EmptyProperty},this.render=function(t){if("none"!=this.style("display").value&&"hidden"!=this.attribute("visibility").value){if(t.save(),this.attribute("mask").hasValue()){var e=this.attribute("mask").getDefinition();null!=e&&e.apply(t,this)}else if(this.style("filter").hasValue()){var r=this.style("filter").getDefinition();null!=r&&r.apply(t,this)}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}},this.setContext=function(t){},this.clearContext=function(t){},this.renderChildren=function(t){for(var e=0;e<this.children.length;e++)this.children[e].render(t)},this.addChild=function(e,r){var i=e;r&&(i=t.CreateElement(e)),i.parent=this,this.children.push(i)},null!=e&&1==e.nodeType){for(var r=0;r<e.childNodes.length;r++){var i=e.childNodes[r];if(1==i.nodeType&&this.addChild(i,!0),this.captureTextNodes&&3==i.nodeType){var n=i.nodeValue||i.text||"";""!=t.trim(t.compressSpaces(n))&&this.addChild(new t.Element.tspan(i),!1)}}for(r=0;r<e.attributes.length;r++){var a=e.attributes[r];this.attributes[a.nodeName]=new t.Property(a.nodeName,a.nodeValue)}if(null!=(u=t.Styles[e.nodeName]))for(var o in u)this.styles[o]=u[o];if(this.attribute("class").hasValue())for(var s=t.compressSpaces(this.attribute("class").value).split(" "),c=0;c<s.length;c++){if(null!=(u=t.Styles["."+s[c]]))for(var o in u)this.styles[o]=u[o];if(null!=(u=t.Styles[e.nodeName+"."+s[c]]))for(var o in u)this.styles[o]=u[o]}if(this.attribute("id").hasValue()&&null!=(u=t.Styles["#"+this.attribute("id").value]))for(var o in u)this.styles[o]=u[o];if(this.attribute("style").hasValue()){var u=this.attribute("style").value.split(";");for(r=0;r<u.length;r++)if(""!=t.trim(u[r])){var l=u[r].split(":"),h=(o=t.trim(l[0]),t.trim(l[1]));this.styles[o]=new t.Property(o,h)}}this.attribute("id").hasValue()&&null==t.Definitions[this.attribute("id").value]&&(t.Definitions[this.attribute("id").value]=this)}},t.Element.RenderedElementBase=function(e){this.base=t.Element.ElementBase,this.base(e),this.setContext=function(e){var r;if(this.style("fill").isUrlDefinition())null!=(r=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity")))&&(e.fillStyle=r);else if(this.style("fill").hasValue()){var i;"currentColor"==(i=this.style("fill")).value&&(i.value=this.style("color").value),e.fillStyle="none"==i.value?"rgba(0,0,0,0)":i.value}if(this.style("fill-opacity").hasValue()&&(i=(i=new t.Property("fill",e.fillStyle)).addOpacity(this.style("fill-opacity").value),e.fillStyle=i.value),this.style("stroke").isUrlDefinition())null!=(r=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity")))&&(e.strokeStyle=r);else if(this.style("stroke").hasValue()){var n;"currentColor"==(n=this.style("stroke")).value&&(n.value=this.style("color").value),e.strokeStyle="none"==n.value?"rgba(0,0,0,0)":n.value}if(this.style("stroke-opacity").hasValue()&&(n=(n=new t.Property("stroke",e.strokeStyle)).addOpacity(this.style("stroke-opacity").value),e.strokeStyle=n.value),this.style("stroke-width").hasValue()){var a=this.style("stroke-width").toPixels();e.lineWidth=0==a?.001:a}if(this.style("stroke-linecap").hasValue()&&(e.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(e.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(e.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()){var o=t.ToNumberArray(this.style("stroke-dasharray").value);void 0!==e.setLineDash?e.setLineDash(o):void 0!==e.webkitLineDash?e.webkitLineDash=o:void 0!==e.mozDash&&(e.mozDash=o);var s=this.style("stroke-dashoffset").numValueOrDefault(1);void 0!==e.lineDashOffset?e.lineDashOffset=s:void 0!==e.webkitLineDashOffset?e.webkitLineDashOffset=s:void 0!==e.mozDashOffset&&(e.mozDashOffset=s)}if(void 0!==e.font&&(e.font=t.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.attribute("transform").hasValue()&&new t.Transform(this.attribute("transform").value).apply(e),this.style("clip-path").hasValue()){var c=this.style("clip-path").getDefinition();null!=c&&c.apply(e)}this.style("opacity").hasValue()&&(e.globalAlpha=this.style("opacity").numValue())}},t.Element.RenderedElementBase.prototype=new t.Element.ElementBase,t.Element.PathElementBase=function(e){this.base=t.Element.RenderedElementBase,this.base(e),this.path=function(e){return null!=e&&e.beginPath(),new t.BoundingBox},this.renderChildren=function(e){this.path(e),t.Mouse.checkPath(this,e),""!=e.fillStyle&&(this.attribute("fill-rule").hasValue()?e.fill(this.attribute("fill-rule").value):e.fill()),""!=e.strokeStyle&&e.stroke();var r=this.getMarkers();if(null!=r){if(this.style("marker-start").isUrlDefinition()&&(i=this.style("marker-start").getDefinition()).render(e,r[0][0],r[0][1]),this.style("marker-mid").isUrlDefinition())for(var i=this.style("marker-mid").getDefinition(),n=1;n<r.length-1;n++)i.render(e,r[n][0],r[n][1]);this.style("marker-end").isUrlDefinition()&&(i=this.style("marker-end").getDefinition()).render(e,r[r.length-1][0],r[r.length-1][1])}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},t.Element.PathElementBase.prototype=new t.Element.RenderedElementBase,t.Element.svg=function(e){this.base=t.Element.RenderedElementBase,this.base(e),this.baseClearContext=this.clearContext,this.clearContext=function(e){this.baseClearContext(e),t.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.baseSetContext(e),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),e.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var r=t.ViewPort.width(),i=t.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),void 0===this.root){r=this.attribute("width").toPixels("x"),i=this.attribute("height").toPixels("y");var n=0,a=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(n=-this.attribute("refX").toPixels("x"),a=-this.attribute("refY").toPixels("y")),e.beginPath(),e.moveTo(n,a),e.lineTo(r,a),e.lineTo(r,i),e.lineTo(n,i),e.closePath(),e.clip()}if(t.ViewPort.SetCurrent(r,i),this.attribute("viewBox").hasValue()){var o=t.ToNumberArray(this.attribute("viewBox").value),s=o[0],c=o[1];r=o[2],i=o[3],t.AspectRatio(e,this.attribute("preserveAspectRatio").value,t.ViewPort.width(),r,t.ViewPort.height(),i,s,c,this.attribute("refX").value,this.attribute("refY").value),t.ViewPort.RemoveCurrent(),t.ViewPort.SetCurrent(o[2],o[3])}}},t.Element.svg.prototype=new t.Element.RenderedElementBase,t.Element.rect=function(e){this.base=t.Element.PathElementBase,this.base(e),this.path=function(e){var r=this.attribute("x").toPixels("x"),i=this.attribute("y").toPixels("y"),n=this.attribute("width").toPixels("x"),a=this.attribute("height").toPixels("y"),o=this.attribute("rx").toPixels("x"),s=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(s=o),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(o=s),o=Math.min(o,n/2),s=Math.min(s,a/2),null!=e&&(e.beginPath(),e.moveTo(r+o,i),e.lineTo(r+n-o,i),e.quadraticCurveTo(r+n,i,r+n,i+s),e.lineTo(r+n,i+a-s),e.quadraticCurveTo(r+n,i+a,r+n-o,i+a),e.lineTo(r+o,i+a),e.quadraticCurveTo(r,i+a,r,i+a-s),e.lineTo(r,i+s),e.quadraticCurveTo(r,i,r+o,i),e.closePath()),new t.BoundingBox(r,i,r+n,i+a)}},t.Element.rect.prototype=new t.Element.PathElementBase,t.Element.circle=function(e){this.base=t.Element.PathElementBase,this.base(e),this.path=function(e){var r=this.attribute("cx").toPixels("x"),i=this.attribute("cy").toPixels("y"),n=this.attribute("r").toPixels();return null!=e&&(e.beginPath(),e.arc(r,i,n,0,2*Math.PI,!0),e.closePath()),new t.BoundingBox(r-n,i-n,r+n,i+n)}},t.Element.circle.prototype=new t.Element.PathElementBase,t.Element.ellipse=function(e){this.base=t.Element.PathElementBase,this.base(e),this.path=function(e){var r=(Math.sqrt(2)-1)/3*4,i=this.attribute("rx").toPixels("x"),n=this.attribute("ry").toPixels("y"),a=this.attribute("cx").toPixels("x"),o=this.attribute("cy").toPixels("y");return null!=e&&(e.beginPath(),e.moveTo(a,o-n),e.bezierCurveTo(a+r*i,o-n,a+i,o-r*n,a+i,o),e.bezierCurveTo(a+i,o+r*n,a+r*i,o+n,a,o+n),e.bezierCurveTo(a-r*i,o+n,a-i,o+r*n,a-i,o),e.bezierCurveTo(a-i,o-r*n,a-r*i,o-n,a,o-n),e.closePath()),new t.BoundingBox(a-i,o-n,a+i,o+n)}},t.Element.ellipse.prototype=new t.Element.PathElementBase,t.Element.line=function(e){this.base=t.Element.PathElementBase,this.base(e),this.getPoints=function(){return[new t.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new t.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(e){var r=this.getPoints();return null!=e&&(e.beginPath(),e.moveTo(r[0].x,r[0].y),e.lineTo(r[1].x,r[1].y)),new t.BoundingBox(r[0].x,r[0].y,r[1].x,r[1].y)},this.getMarkers=function(){var t=this.getPoints(),e=t[0].angleTo(t[1]);return[[t[0],e],[t[1],e]]}},t.Element.line.prototype=new t.Element.PathElementBase,t.Element.polyline=function(e){this.base=t.Element.PathElementBase,this.base(e),this.points=t.CreatePath(this.attribute("points").value),this.path=function(e){var r=new t.BoundingBox(this.points[0].x,this.points[0].y);null!=e&&(e.beginPath(),e.moveTo(this.points[0].x,this.points[0].y));for(var i=1;i<this.points.length;i++)r.addPoint(this.points[i].x,this.points[i].y),null!=e&&e.lineTo(this.points[i].x,this.points[i].y);return r},this.getMarkers=function(){for(var t=[],e=0;e<this.points.length-1;e++)t.push([this.points[e],this.points[e].angleTo(this.points[e+1])]);return t.push([this.points[this.points.length-1],t[t.length-1][1]]),t}},t.Element.polyline.prototype=new t.Element.PathElementBase,t.Element.polygon=function(e){this.base=t.Element.polyline,this.base(e),this.basePath=this.path,this.path=function(t){var e=this.basePath(t);return null!=t&&(t.lineTo(this.points[0].x,this.points[0].y),t.closePath()),e}},t.Element.polygon.prototype=new t.Element.polyline,t.Element.path=function(e){this.base=t.Element.PathElementBase,this.base(e);var r=this.attribute("d").value;r=(r=(r=(r=(r=(r=(r=(r=r.replace(/,/gm," ")).replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2")).replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2")).replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2")).replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2")).replace(/([0-9])([+\-])/gm,"$1 $2")).replace(/(\.[0-9]*)(\.)/gm,"$1 $2")).replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 "),r=t.compressSpaces(r),r=t.trim(r),this.PathParser=new function(e){this.tokens=e.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new t.Point(0,0),this.control=new t.Point(0,0),this.current=new t.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var e=new t.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(e)},this.getAsControlPoint=function(){var t=this.getPoint();return this.control=t,t},this.getAsCurrentPoint=function(){var t=this.getPoint();return this.current=t,t},this.getReflectedControlPoint=function(){return"c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase()?this.current:new t.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)},this.makeAbsolute=function(t){return this.isRelativeCommand()&&(t.x+=this.current.x,t.y+=this.current.y),t},this.addMarker=function(t,e,r){null!=r&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(r)),this.addMarkerAngle(t,null==e?null:e.angleTo(t))},this.addMarkerAngle=function(t,e){this.points.push(t),this.angles.push(e)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var t=0;t<this.angles.length;t++)if(null==this.angles[t])for(var e=t+1;e<this.angles.length;e++)if(null!=this.angles[e]){this.angles[t]=this.angles[e];break}return this.angles}}(r),this.path=function(e){var r=this.PathParser;r.reset();var i=new t.BoundingBox;for(null!=e&&e.beginPath();!r.isEnd();)switch(r.nextCommand(),r.command){case"M":case"m":var n=r.getAsCurrentPoint();for(r.addMarker(n),i.addPoint(n.x,n.y),null!=e&&e.moveTo(n.x,n.y),r.start=r.current;!r.isCommandOrEnd();)n=r.getAsCurrentPoint(),r.addMarker(n,r.start),i.addPoint(n.x,n.y),null!=e&&e.lineTo(n.x,n.y);break;case"L":case"l":for(;!r.isCommandOrEnd();){var a=r.current;n=r.getAsCurrentPoint(),r.addMarker(n,a),i.addPoint(n.x,n.y),null!=e&&e.lineTo(n.x,n.y)}break;case"H":case"h":for(;!r.isCommandOrEnd();){var o=new t.Point((r.isRelativeCommand()?r.current.x:0)+r.getScalar(),r.current.y);r.addMarker(o,r.current),r.current=o,i.addPoint(r.current.x,r.current.y),null!=e&&e.lineTo(r.current.x,r.current.y)}break;case"V":case"v":for(;!r.isCommandOrEnd();)o=new t.Point(r.current.x,(r.isRelativeCommand()?r.current.y:0)+r.getScalar()),r.addMarker(o,r.current),r.current=o,i.addPoint(r.current.x,r.current.y),null!=e&&e.lineTo(r.current.x,r.current.y);break;case"C":case"c":for(;!r.isCommandOrEnd();){var s=r.current,c=r.getPoint(),u=r.getAsControlPoint(),l=r.getAsCurrentPoint();r.addMarker(l,u,c),i.addBezierCurve(s.x,s.y,c.x,c.y,u.x,u.y,l.x,l.y),null!=e&&e.bezierCurveTo(c.x,c.y,u.x,u.y,l.x,l.y)}break;case"S":case"s":for(;!r.isCommandOrEnd();)s=r.current,c=r.getReflectedControlPoint(),u=r.getAsControlPoint(),l=r.getAsCurrentPoint(),r.addMarker(l,u,c),i.addBezierCurve(s.x,s.y,c.x,c.y,u.x,u.y,l.x,l.y),null!=e&&e.bezierCurveTo(c.x,c.y,u.x,u.y,l.x,l.y);break;case"Q":case"q":for(;!r.isCommandOrEnd();)s=r.current,u=r.getAsControlPoint(),l=r.getAsCurrentPoint(),r.addMarker(l,u,u),i.addQuadraticCurve(s.x,s.y,u.x,u.y,l.x,l.y),null!=e&&e.quadraticCurveTo(u.x,u.y,l.x,l.y);break;case"T":case"t":for(;!r.isCommandOrEnd();)s=r.current,u=r.getReflectedControlPoint(),r.control=u,l=r.getAsCurrentPoint(),r.addMarker(l,u,u),i.addQuadraticCurve(s.x,s.y,u.x,u.y,l.x,l.y),null!=e&&e.quadraticCurveTo(u.x,u.y,l.x,l.y);break;case"A":case"a":for(;!r.isCommandOrEnd();){s=r.current;var h=r.getScalar(),f=r.getScalar(),p=r.getScalar()*(Math.PI/180),d=r.getScalar(),g=r.getScalar(),m=(l=r.getAsCurrentPoint(),new t.Point(Math.cos(p)*(s.x-l.x)/2+Math.sin(p)*(s.y-l.y)/2,-Math.sin(p)*(s.x-l.x)/2+Math.cos(p)*(s.y-l.y)/2)),v=Math.pow(m.x,2)/Math.pow(h,2)+Math.pow(m.y,2)/Math.pow(f,2);v>1&&(h*=Math.sqrt(v),f*=Math.sqrt(v));var y=(d==g?-1:1)*Math.sqrt((Math.pow(h,2)*Math.pow(f,2)-Math.pow(h,2)*Math.pow(m.y,2)-Math.pow(f,2)*Math.pow(m.x,2))/(Math.pow(h,2)*Math.pow(m.y,2)+Math.pow(f,2)*Math.pow(m.x,2)));isNaN(y)&&(y=0);var b=new t.Point(y*h*m.y/f,y*-f*m.x/h),x=new t.Point((s.x+l.x)/2+Math.cos(p)*b.x-Math.sin(p)*b.y,(s.y+l.y)/2+Math.sin(p)*b.x+Math.cos(p)*b.y),A=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))},w=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(A(t)*A(e))},k=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(w(t,e))},C=k([1,0],[(m.x-b.x)/h,(m.y-b.y)/f]),E=[(m.x-b.x)/h,(m.y-b.y)/f],S=[(-m.x-b.x)/h,(-m.y-b.y)/f],_=k(E,S);w(E,S)<=-1&&(_=Math.PI),w(E,S)>=1&&(_=0);var B=1-g?1:-1,O=C+B*(_/2),P=new t.Point(x.x+h*Math.cos(O),x.y+f*Math.sin(O));if(r.addMarkerAngle(P,O-B*Math.PI/2),r.addMarkerAngle(l,O-B*Math.PI),i.addPoint(l.x,l.y),null!=e){w=h>f?h:f;var T=h>f?1:h/f,M=h>f?f/h:1;e.translate(x.x,x.y),e.rotate(p),e.scale(T,M),e.arc(0,0,w,C,C+_,1-g),e.scale(1/T,1/M),e.rotate(-p),e.translate(-x.x,-x.y)}}break;case"Z":case"z":null!=e&&e.closePath(),r.current=r.start}return i},this.getMarkers=function(){for(var t=this.PathParser.getMarkerPoints(),e=this.PathParser.getMarkerAngles(),r=[],i=0;i<t.length;i++)r.push([t[i],e[i]]);return r}},t.Element.path.prototype=new t.Element.PathElementBase,t.Element.pattern=function(e){this.base=t.Element.ElementBase,this.base(e),this.createPattern=function(e,r){var i=this.attribute("width").toPixels("x",!0),n=this.attribute("height").toPixels("y",!0),a=new t.Element.svg;a.attributes.viewBox=new t.Property("viewBox",this.attribute("viewBox").value),a.attributes.width=new t.Property("width",i+"px"),a.attributes.height=new t.Property("height",n+"px"),a.attributes.transform=new t.Property("transform",this.attribute("patternTransform").value),a.children=this.children;var o=document.createElement("canvas");o.width=i,o.height=n;var s=o.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&s.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var c=-1;c<=1;c++)for(var u=-1;u<=1;u++)s.save(),s.translate(c*o.width,u*o.height),a.render(s),s.restore();return e.createPattern(o,"repeat")}},t.Element.pattern.prototype=new t.Element.ElementBase,t.Element.marker=function(e){this.base=t.Element.ElementBase,this.base(e),this.baseRender=this.render,this.render=function(e,r,i){e.translate(r.x,r.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&e.rotate(i),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&e.scale(e.lineWidth,e.lineWidth),e.save();var n=new t.Element.svg;n.attributes.viewBox=new t.Property("viewBox",this.attribute("viewBox").value),n.attributes.refX=new t.Property("refX",this.attribute("refX").value),n.attributes.refY=new t.Property("refY",this.attribute("refY").value),n.attributes.width=new t.Property("width",this.attribute("markerWidth").value),n.attributes.height=new t.Property("height",this.attribute("markerHeight").value),n.attributes.fill=new t.Property("fill",this.attribute("fill").valueOrDefault("black")),n.attributes.stroke=new t.Property("stroke",this.attribute("stroke").valueOrDefault("none")),n.children=this.children,n.render(e),e.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&e.scale(1/e.lineWidth,1/e.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&e.rotate(-i),e.translate(-r.x,-r.y)}},t.Element.marker.prototype=new t.Element.ElementBase,t.Element.defs=function(e){this.base=t.Element.ElementBase,this.base(e),this.render=function(t){}},t.Element.defs.prototype=new t.Element.ElementBase,t.Element.GradientBase=function(e){this.base=t.Element.ElementBase,this.base(e),this.gradientUnits=this.attribute("gradientUnits").valueOrDefault("objectBoundingBox"),this.stops=[];for(var r=0;r<this.children.length;r++){var i=this.children[r];"stop"==i.type&&this.stops.push(i)}this.getGradient=function(){},this.createGradient=function(e,r,i){var n=this;this.getHrefAttribute().hasValue()&&(n=this.getHrefAttribute().getDefinition());var a=function(e){return i.hasValue()?new t.Property("color",e).addOpacity(i.value).value:e},o=this.getGradient(e,r);if(null==o)return a(n.stops[n.stops.length-1].color);for(var s=0;s<n.stops.length;s++)o.addColorStop(n.stops[s].offset,a(n.stops[s].color));if(this.attribute("gradientTransform").hasValue()){var c=t.ViewPort.viewPorts[0],u=new t.Element.rect;u.attributes.x=new t.Property("x",-t.MAX_VIRTUAL_PIXELS/3),u.attributes.y=new t.Property("y",-t.MAX_VIRTUAL_PIXELS/3),u.attributes.width=new t.Property("width",t.MAX_VIRTUAL_PIXELS),u.attributes.height=new t.Property("height",t.MAX_VIRTUAL_PIXELS);var l=new t.Element.g;l.attributes.transform=new t.Property("transform",this.attribute("gradientTransform").value),l.children=[u];var h=new t.Element.svg;h.attributes.x=new t.Property("x",0),h.attributes.y=new t.Property("y",0),h.attributes.width=new t.Property("width",c.width),h.attributes.height=new t.Property("height",c.height),h.children=[l];var f=document.createElement("canvas");f.width=c.width,f.height=c.height;var p=f.getContext("2d");return p.fillStyle=o,h.render(p),p.createPattern(f,"no-repeat")}return o}},t.Element.GradientBase.prototype=new t.Element.ElementBase,t.Element.linearGradient=function(e){this.base=t.Element.GradientBase,this.base(e),this.getGradient=function(t,e){var r=e.getBoundingBox();this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var i="objectBoundingBox"==this.gradientUnits?r.x()+r.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),n="objectBoundingBox"==this.gradientUnits?r.y()+r.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),a="objectBoundingBox"==this.gradientUnits?r.x()+r.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),o="objectBoundingBox"==this.gradientUnits?r.y()+r.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return i==a&&n==o?null:t.createLinearGradient(i,n,a,o)}},t.Element.linearGradient.prototype=new t.Element.GradientBase,t.Element.radialGradient=function(e){this.base=t.Element.GradientBase,this.base(e),this.getGradient=function(t,e){var r=e.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var i="objectBoundingBox"==this.gradientUnits?r.x()+r.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),n="objectBoundingBox"==this.gradientUnits?r.y()+r.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),a=i,o=n;this.attribute("fx").hasValue()&&(a="objectBoundingBox"==this.gradientUnits?r.x()+r.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(o="objectBoundingBox"==this.gradientUnits?r.y()+r.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var s="objectBoundingBox"==this.gradientUnits?(r.width()+r.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return t.createRadialGradient(a,o,0,i,n,s)}},t.Element.radialGradient.prototype=new t.Element.GradientBase,t.Element.stop=function(e){this.base=t.Element.ElementBase,this.base(e),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var r=this.style("stop-color");this.style("stop-opacity").hasValue()&&(r=r.addOpacity(this.style("stop-opacity").value)),this.color=r.value},t.Element.stop.prototype=new t.Element.ElementBase,t.Element.AnimateBase=function(e){this.base=t.Element.ElementBase,this.base(e),t.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var t=this.attribute("attributeType").value,e=this.attribute("attributeName").value;return"CSS"==t?this.parent.style(e,!0):this.parent.attribute(e,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(t){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"!=this.attribute("repeatCount").value&&"indefinite"!=this.attribute("repeatDur").value)return"remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed&&(this.removed=!0,this.getProperty().value=this.initialValue,!0);this.duration=0}this.duration=this.duration+t;var e=!1;if(this.begin<this.duration){var r=this.calcValue();this.attribute("type").hasValue()&&(r=this.attribute("type").value+"("+r+")"),this.getProperty().value=r,e=!0}return e},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var e={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var r=e.progress*(this.values.value.length-1),i=Math.floor(r),n=Math.ceil(r);e.from=new t.Property("from",parseFloat(this.values.value[i])),e.to=new t.Property("to",parseFloat(this.values.value[n])),e.progress=(r-i)/(n-i)}else e.from=this.from,e.to=this.to;return e}},t.Element.AnimateBase.prototype=new t.Element.ElementBase,t.Element.animate=function(e){this.base=t.Element.AnimateBase,this.base(e),this.calcValue=function(){var t=this.progress();return t.from.numValue()+(t.to.numValue()-t.from.numValue())*t.progress+this.initialUnits}},t.Element.animate.prototype=new t.Element.AnimateBase,t.Element.animateColor=function(r){this.base=t.Element.AnimateBase,this.base(r),this.calcValue=function(){var t=this.progress(),r=new e(t.from.value),i=new e(t.to.value);if(r.ok&&i.ok){var n=r.r+(i.r-r.r)*t.progress,a=r.g+(i.g-r.g)*t.progress,o=r.b+(i.b-r.b)*t.progress;return"rgb("+parseInt(n,10)+","+parseInt(a,10)+","+parseInt(o,10)+")"}return this.attribute("from").value}},t.Element.animateColor.prototype=new t.Element.AnimateBase,t.Element.animateTransform=function(e){this.base=t.Element.AnimateBase,this.base(e),this.calcValue=function(){for(var e=this.progress(),r=t.ToNumberArray(e.from.value),i=t.ToNumberArray(e.to.value),n="",a=0;a<r.length;a++)n+=r[a]+(i[a]-r[a])*e.progress+" ";return n}},t.Element.animateTransform.prototype=new t.Element.animate,t.Element.font=function(e){this.base=t.Element.ElementBase,this.base(e),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var r=0;r<this.children.length;r++){var i=this.children[r];"font-face"==i.type?(this.fontFace=i,i.style("font-family").hasValue()&&(t.Definitions[i.style("font-family").value]=this)):"missing-glyph"==i.type?this.missingGlyph=i:"glyph"==i.type&&(""!=i.arabicForm?(this.isRTL=!0,this.isArabic=!0,void 0===this.glyphs[i.unicode]&&(this.glyphs[i.unicode]=[]),this.glyphs[i.unicode][i.arabicForm]=i):this.glyphs[i.unicode]=i)}},t.Element.font.prototype=new t.Element.ElementBase,t.Element.fontface=function(e){this.base=t.Element.ElementBase,this.base(e),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},t.Element.fontface.prototype=new t.Element.ElementBase,t.Element.missingglyph=function(e){this.base=t.Element.path,this.base(e),this.horizAdvX=0},t.Element.missingglyph.prototype=new t.Element.path,t.Element.glyph=function(e){this.base=t.Element.path,this.base(e),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},t.Element.glyph.prototype=new t.Element.path,t.Element.text=function(e){this.captureTextNodes=!0,this.base=t.Element.RenderedElementBase,this.base(e),this.baseSetContext=this.setContext,this.setContext=function(t){this.baseSetContext(t),this.style("dominant-baseline").hasValue()&&(t.textBaseline=this.style("dominant-baseline").value),this.style("alignment-baseline").hasValue()&&(t.textBaseline=this.style("alignment-baseline").value)},this.getBoundingBox=function(){return new t.BoundingBox(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"),0,0)},this.renderChildren=function(t){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.x+=this.getAnchorDelta(t,this,0);for(var e=0;e<this.children.length;e++)this.renderChild(t,this,e)},this.getAnchorDelta=function(t,e,r){var i=this.style("text-anchor").valueOrDefault("start");if("start"!=i){for(var n=0,a=r;a<e.children.length;a++){var o=e.children[a];if(a>r&&o.attribute("x").hasValue())break;n+=o.measureTextRecursive(t)}return-1*("end"==i?n:n/2)}return 0},this.renderChild=function(t,e,r){var i=e.children[r];for(i.attribute("x").hasValue()?i.x=i.attribute("x").toPixels("x")+this.getAnchorDelta(t,e,r):(this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),i.attribute("dx").hasValue()&&(this.x+=i.attribute("dx").toPixels("x")),i.x=this.x),this.x=i.x+i.measureText(t),i.attribute("y").hasValue()?i.y=i.attribute("y").toPixels("y"):(this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),i.attribute("dy").hasValue()&&(this.y+=i.attribute("dy").toPixels("y")),i.y=this.y),this.y=i.y,i.render(t),r=0;r<i.children.length;r++)this.renderChild(t,i,r)}},t.Element.text.prototype=new t.Element.RenderedElementBase,t.Element.TextElementBase=function(e){this.base=t.Element.RenderedElementBase,this.base(e),this.getGlyph=function(t,e,r){var i=e[r],n=null;if(t.isArabic){var a="isolated";(0==r||" "==e[r-1])&&r<e.length-2&&" "!=e[r+1]&&(a="terminal"),r>0&&" "!=e[r-1]&&r<e.length-2&&" "!=e[r+1]&&(a="medial"),r>0&&" "!=e[r-1]&&(r==e.length-1||" "==e[r+1])&&(a="initial"),void 0!==t.glyphs[i]&&null==(n=t.glyphs[i][a])&&"glyph"==t.glyphs[i].type&&(n=t.glyphs[i])}else n=t.glyphs[i];return null==n&&(n=t.missingGlyph),n},this.renderChildren=function(e){var r=this.parent.style("font-family").getDefinition();if(null==r)""!=e.fillStyle&&e.fillText(t.compressSpaces(this.getText()),this.x,this.y),""!=e.strokeStyle&&e.strokeText(t.compressSpaces(this.getText()),this.x,this.y);else{var i=this.parent.style("font-size").numValueOrDefault(t.Font.Parse(t.ctx.font).fontSize),n=this.parent.style("font-style").valueOrDefault(t.Font.Parse(t.ctx.font).fontStyle),a=this.getText();r.isRTL&&(a=a.split("").reverse().join(""));for(var o=t.ToNumberArray(this.parent.attribute("dx").value),s=0;s<a.length;s++){var c=this.getGlyph(r,a,s),u=i/r.fontFace.unitsPerEm;e.translate(this.x,this.y),e.scale(u,-u);var l=e.lineWidth;e.lineWidth=e.lineWidth*r.fontFace.unitsPerEm/i,"italic"==n&&e.transform(1,0,.4,1,0,0),c.render(e),"italic"==n&&e.transform(1,0,-.4,1,0,0),e.lineWidth=l,e.scale(1/u,-1/u),e.translate(-this.x,-this.y),this.x+=i*(c.horizAdvX||r.horizAdvX)/r.fontFace.unitsPerEm,void 0===o[s]||isNaN(o[s])||(this.x+=o[s])}}},this.getText=function(){},this.measureTextRecursive=function(t){for(var e=this.measureText(t),r=0;r<this.children.length;r++)e+=this.children[r].measureTextRecursive(t);return e},this.measureText=function(e){var r=this.parent.style("font-family").getDefinition();if(null!=r){var i=this.parent.style("font-size").numValueOrDefault(t.Font.Parse(t.ctx.font).fontSize),n=0,a=this.getText();r.isRTL&&(a=a.split("").reverse().join(""));for(var o=t.ToNumberArray(this.parent.attribute("dx").value),s=0;s<a.length;s++)n+=(this.getGlyph(r,a,s).horizAdvX||r.horizAdvX)*i/r.fontFace.unitsPerEm,void 0===o[s]||isNaN(o[s])||(n+=o[s]);return n}var c=t.compressSpaces(this.getText());if(!e.measureText)return 10*c.length;e.save(),this.setContext(e);var u=e.measureText(c).width;return e.restore(),u}},t.Element.TextElementBase.prototype=new t.Element.RenderedElementBase,t.Element.tspan=function(e){this.captureTextNodes=!0,this.base=t.Element.TextElementBase,this.base(e),this.text=e.nodeValue||e.text||"",this.getText=function(){return this.text}},t.Element.tspan.prototype=new t.Element.TextElementBase,t.Element.tref=function(e){this.base=t.Element.TextElementBase,this.base(e),this.getText=function(){var t=this.getHrefAttribute().getDefinition();if(null!=t)return t.children[0].getText()}},t.Element.tref.prototype=new t.Element.TextElementBase,t.Element.a=function(e){this.base=t.Element.TextElementBase,this.base(e),this.hasText=!0;for(var r=0;r<e.childNodes.length;r++)3!=e.childNodes[r].nodeType&&(this.hasText=!1);this.text=this.hasText?e.childNodes[0].nodeValue:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(e){if(this.hasText){this.baseRenderChildren(e);var r=new t.Property("fontSize",t.Font.Parse(t.ctx.font).fontSize);t.Mouse.checkBoundingBox(this,new t.BoundingBox(this.x,this.y-r.toPixels("y"),this.x+this.measureText(e),this.y))}else{var i=new t.Element.g;i.children=this.children,i.parent=this,i.render(e)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){t.ctx.canvas.style.cursor="pointer"}},t.Element.a.prototype=new t.Element.TextElementBase,t.Element.image=function(e){this.base=t.Element.RenderedElementBase,this.base(e);var r=this.getHrefAttribute().value,i=r.match(/\.svg$/);if(t.Images.push(this),this.loaded=!1,i)this.img=t.ajax(r),this.loaded=!0;else{this.img=document.createElement("img");var n=this;this.img.onload=function(){n.loaded=!0},this.img.onerror=function(){"undefined"!=typeof console&&(console.log('ERROR: image "'+r+'" not found'),n.loaded=!0)},this.img.src=r}this.renderChildren=function(e){var r=this.attribute("x").toPixels("x"),n=this.attribute("y").toPixels("y"),a=this.attribute("width").toPixels("x"),o=this.attribute("height").toPixels("y");0!=a&&0!=o&&(e.save(),i?e.drawSvg(this.img,r,n,a,o):(e.translate(r,n),t.AspectRatio(e,this.attribute("preserveAspectRatio").value,a,this.img.width,o,this.img.height,0,0),e.drawImage(this.img,0,0)),e.restore())},this.getBoundingBox=function(){var e=this.attribute("x").toPixels("x"),r=this.attribute("y").toPixels("y"),i=this.attribute("width").toPixels("x"),n=this.attribute("height").toPixels("y");return new t.BoundingBox(e,r,e+i,r+n)}},t.Element.image.prototype=new t.Element.RenderedElementBase,t.Element.g=function(e){this.base=t.Element.RenderedElementBase,this.base(e),this.getBoundingBox=function(){for(var e=new t.BoundingBox,r=0;r<this.children.length;r++)e.addBoundingBox(this.children[r].getBoundingBox());return e}},t.Element.g.prototype=new t.Element.RenderedElementBase,t.Element.symbol=function(e){this.base=t.Element.RenderedElementBase,this.base(e),this.baseSetContext=this.setContext,this.setContext=function(e){if(this.baseSetContext(e),this.attribute("viewBox").hasValue()){var r=t.ToNumberArray(this.attribute("viewBox").value),i=r[0],n=r[1];width=r[2],height=r[3],t.AspectRatio(e,this.attribute("preserveAspectRatio").value,this.attribute("width").toPixels("x"),width,this.attribute("height").toPixels("y"),height,i,n),t.ViewPort.SetCurrent(r[2],r[3])}}},t.Element.symbol.prototype=new t.Element.RenderedElementBase,t.Element.style=function(e){this.base=t.Element.ElementBase,this.base(e);for(var r="",i=0;i<e.childNodes.length;i++)r+=e.childNodes[i].nodeValue;r=r.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"");var n=(r=t.compressSpaces(r)).split("}");for(i=0;i<n.length;i++)if(""!=t.trim(n[i]))for(var a=n[i].split("{"),o=a[0].split(","),s=a[1].split(";"),c=0;c<o.length;c++){var u=t.trim(o[c]);if(""!=u){for(var l={},h=0;h<s.length;h++){var f=s[h].indexOf(":"),p=s[h].substr(0,f),d=s[h].substr(f+1,s[h].length-f);null!=p&&null!=d&&(l[t.trim(p)]=new t.Property(t.trim(p),t.trim(d)))}if(t.Styles[u]=l,"@font-face"==u)for(var g=l["font-family"].value.replace(/"/g,""),m=l.src.value.split(","),v=0;v<m.length;v++)if(m[v].indexOf('format("svg")')>0)for(var y=m[v].indexOf("url"),b=m[v].indexOf(")",y),x=m[v].substr(y+5,b-y-6),A=t.parseXml(t.ajax(x)).getElementsByTagName("font"),w=0;w<A.length;w++){var k=t.CreateElement(A[w]);t.Definitions[g]=k}}}},t.Element.style.prototype=new t.Element.ElementBase,t.Element.use=function(e){this.base=t.Element.RenderedElementBase,this.base(e),this.baseSetContext=this.setContext,this.setContext=function(t){this.baseSetContext(t),this.attribute("x").hasValue()&&t.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&t.translate(0,this.attribute("y").toPixels("y"))},this.getDefinition=function(){var t=this.getHrefAttribute().getDefinition();return this.attribute("width").hasValue()&&(t.attribute("width",!0).value=this.attribute("width").value),this.attribute("height").hasValue()&&(t.attribute("height",!0).value=this.attribute("height").value),t},this.path=function(t){var e=this.getDefinition();null!=e&&e.path(t)},this.getBoundingBox=function(){var t=this.getDefinition();if(null!=t)return t.getBoundingBox()},this.renderChildren=function(t){var e=this.getDefinition();if(null!=e){var r=e.parent;e.parent=null,e.render(t),e.parent=r}}},t.Element.use.prototype=new t.Element.RenderedElementBase,t.Element.mask=function(e){this.base=t.Element.ElementBase,this.base(e),this.apply=function(e,r){var i=this.attribute("x").toPixels("x"),n=this.attribute("y").toPixels("y"),a=this.attribute("width").toPixels("x"),o=this.attribute("height").toPixels("y");if(0==a&&0==o){for(var s=new t.BoundingBox,c=0;c<this.children.length;c++)s.addBoundingBox(this.children[c].getBoundingBox());i=Math.floor(s.x1),n=Math.floor(s.y1),a=Math.floor(s.width()),o=Math.floor(s.height())}var u=r.attribute("mask").value;r.attribute("mask").value="";var l=document.createElement("canvas");l.width=i+a,l.height=n+o;var h=l.getContext("2d");this.renderChildren(h);var f=document.createElement("canvas");f.width=i+a,f.height=n+o;var p=f.getContext("2d");r.render(p),p.globalCompositeOperation="destination-in",p.fillStyle=h.createPattern(l,"no-repeat"),p.fillRect(0,0,i+a,n+o),e.fillStyle=p.createPattern(f,"no-repeat"),e.fillRect(0,0,i+a,n+o),r.attribute("mask").value=u},this.render=function(t){}},t.Element.mask.prototype=new t.Element.ElementBase,t.Element.clipPath=function(e){this.base=t.Element.ElementBase,this.base(e),this.apply=function(e){for(var r=0;r<this.children.length;r++){var i=this.children[r];if(void 0!==i.path){var n=null;i.attribute("transform").hasValue()&&(n=new t.Transform(i.attribute("transform").value)).apply(e),i.path(e),e.clip(),n&&n.unapply(e)}}},this.render=function(t){}},t.Element.clipPath.prototype=new t.Element.ElementBase,t.Element.filter=function(e){this.base=t.Element.ElementBase,this.base(e),this.apply=function(t,e){var r=e.getBoundingBox(),i=Math.floor(r.x1),n=Math.floor(r.y1),a=Math.floor(r.width()),o=Math.floor(r.height()),s=e.style("filter").value;e.style("filter").value="";for(var c=0,u=0,l=0;l<this.children.length;l++){var h=this.children[l].extraFilterDistance||0;c=Math.max(c,h),u=Math.max(u,h)}var f=document.createElement("canvas");f.width=a+2*c,f.height=o+2*u;var p=f.getContext("2d");for(p.translate(-i+c,-n+u),e.render(p),l=0;l<this.children.length;l++)this.children[l].apply(p,0,0,a+2*c,o+2*u);t.drawImage(f,0,0,a+2*c,o+2*u,i-c,n-u,a+2*c,o+2*u),e.style("filter",!0).value=s},this.render=function(t){}},t.Element.filter.prototype=new t.Element.ElementBase,t.Element.feMorphology=function(e){this.base=t.Element.ElementBase,this.base(e),this.apply=function(t,e,r,i,n){}},t.Element.feMorphology.prototype=new t.Element.ElementBase,t.Element.feColorMatrix=function(e){function r(t,e,r,i,n,a){return t[r*i*4+4*e+a]}function i(t,e,r,i,n,a,o){t[r*i*4+4*e+a]=o}this.base=t.Element.ElementBase,this.base(e),this.apply=function(t,e,n,a,o){var s=t.getImageData(0,0,a,o);for(n=0;n<o;n++)for(e=0;e<a;e++){var c=(r(s.data,e,n,a,0,0)+r(s.data,e,n,a,0,1)+r(s.data,e,n,a,0,2))/3;i(s.data,e,n,a,0,0,c),i(s.data,e,n,a,0,1,c),i(s.data,e,n,a,0,2,c)}t.clearRect(0,0,a,o),t.putImageData(s,0,0)}},t.Element.feColorMatrix.prototype=new t.Element.ElementBase,t.Element.feGaussianBlur=function(e){this.base=t.Element.ElementBase,this.base(e),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(e,i,o,s,c){e.canvas.id=t.UniqueId(),e.canvas.style.display="none",document.body.appendChild(e.canvas),function(t,e,i,o,s,c){if(!(isNaN(c)||c<1)){c|=0;var u,l=document.getElementById(t).getContext("2d");try{try{u=l.getImageData(e,i,o,s)}catch(t){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),u=l.getImageData(e,i,o,s)}catch(t){throw alert("Cannot access local image"),new Error("unable to access local image data: "+t)}}}catch(t){throw alert("Cannot access image"),new Error("unable to access image data: "+t)}var h,f,p,d,g,m,v,y,b,x,A,w,k,C,E,S,_,B,O,P,T,M,I,R,N=u.data,q=c+c+1,D=o-1,U=s-1,L=c+1,V=L*(L+1)/2,z=new a,F=z;for(p=1;p<q;p++)if(F=F.next=new a,p==L)var j=F;F.next=z;var W=null,G=null;v=m=0;var H=r[c],K=n[c];for(f=0;f<s;f++){for(S=_=B=O=y=b=x=A=0,w=L*(P=N[m]),k=L*(T=N[m+1]),C=L*(M=N[m+2]),E=L*(I=N[m+3]),y+=V*P,b+=V*T,x+=V*M,A+=V*I,F=z,p=0;p<L;p++)F.r=P,F.g=T,F.b=M,F.a=I,F=F.next;for(p=1;p<L;p++)d=m+((D<p?D:p)<<2),y+=(F.r=P=N[d])*(R=L-p),b+=(F.g=T=N[d+1])*R,x+=(F.b=M=N[d+2])*R,A+=(F.a=I=N[d+3])*R,S+=P,_+=T,B+=M,O+=I,F=F.next;for(W=z,G=j,h=0;h<o;h++)N[m+3]=I=A*H>>K,0!=I?(I=255/I,N[m]=(y*H>>K)*I,N[m+1]=(b*H>>K)*I,N[m+2]=(x*H>>K)*I):N[m]=N[m+1]=N[m+2]=0,y-=w,b-=k,x-=C,A-=E,w-=W.r,k-=W.g,C-=W.b,E-=W.a,d=v+((d=h+c+1)<D?d:D)<<2,y+=S+=W.r=N[d],b+=_+=W.g=N[d+1],x+=B+=W.b=N[d+2],A+=O+=W.a=N[d+3],W=W.next,w+=P=G.r,k+=T=G.g,C+=M=G.b,E+=I=G.a,S-=P,_-=T,B-=M,O-=I,G=G.next,m+=4;v+=o}for(h=0;h<o;h++){for(_=B=O=S=b=x=A=y=0,w=L*(P=N[m=h<<2]),k=L*(T=N[m+1]),C=L*(M=N[m+2]),E=L*(I=N[m+3]),y+=V*P,b+=V*T,x+=V*M,A+=V*I,F=z,p=0;p<L;p++)F.r=P,F.g=T,F.b=M,F.a=I,F=F.next;for(g=o,p=1;p<=c;p++)m=g+h<<2,y+=(F.r=P=N[m])*(R=L-p),b+=(F.g=T=N[m+1])*R,x+=(F.b=M=N[m+2])*R,A+=(F.a=I=N[m+3])*R,S+=P,_+=T,B+=M,O+=I,F=F.next,p<U&&(g+=o);for(m=h,W=z,G=j,f=0;f<s;f++)N[3+(d=m<<2)]=I=A*H>>K,I>0?(I=255/I,N[d]=(y*H>>K)*I,N[d+1]=(b*H>>K)*I,N[d+2]=(x*H>>K)*I):N[d]=N[d+1]=N[d+2]=0,y-=w,b-=k,x-=C,A-=E,w-=W.r,k-=W.g,C-=W.b,E-=W.a,d=h+((d=f+L)<U?d:U)*o<<2,y+=S+=W.r=N[d],b+=_+=W.g=N[d+1],x+=B+=W.b=N[d+2],A+=O+=W.a=N[d+3],W=W.next,w+=P=G.r,k+=T=G.g,C+=M=G.b,E+=I=G.a,S-=P,_-=T,B-=M,O-=I,G=G.next,m+=o}l.putImageData(u,e,i)}}(e.canvas.id,i,o,s,c,this.blurRadius),document.body.removeChild(e.canvas)}},t.Element.feGaussianBlur.prototype=new t.Element.ElementBase,t.Element.title=function(t){},t.Element.title.prototype=new t.Element.ElementBase,t.Element.desc=function(t){},t.Element.desc.prototype=new t.Element.ElementBase,t.Element.MISSING=function(t){"undefined"!=typeof console&&console.log("ERROR: Element '"+t.nodeName+"' not yet implemented.")},t.Element.MISSING.prototype=new t.Element.ElementBase,t.CreateElement=function(e){var r=e.nodeName.replace(/^[^:]+:/,"");r=r.replace(/\-/g,"");var i=null;return(i=void 0!==t.Element[r]?new t.Element[r](e):new t.Element.MISSING(e)).type=e.nodeName,i},t.load=function(e,r){t.loadXml(e,t.ajax(r))},t.loadXml=function(e,r){t.loadXmlDoc(e,t.parseXml(r))},t.loadXmlDoc=function(e,r){t.init(e);var i=function(t){for(var r=e.canvas;r;)t.x-=r.offsetLeft,t.y-=r.offsetTop,r=r.offsetParent;return window.scrollX&&(t.x+=window.scrollX),window.scrollY&&(t.y+=window.scrollY),t};1!=t.opts.ignoreMouse&&(e.canvas.onclick=function(e){var r=i(new t.Point(null!=e?e.clientX:event.clientX,null!=e?e.clientY:event.clientY));t.Mouse.onclick(r.x,r.y)},e.canvas.onmousemove=function(e){var r=i(new t.Point(null!=e?e.clientX:event.clientX,null!=e?e.clientY:event.clientY));t.Mouse.onmousemove(r.x,r.y)});var n=t.CreateElement(r.documentElement);n.root=!0;var a=!0,o=function(){t.ViewPort.Clear(),e.canvas.parentNode&&t.ViewPort.SetCurrent(e.canvas.parentNode.clientWidth,e.canvas.parentNode.clientHeight),1!=t.opts.ignoreDimensions&&(n.style("width").hasValue()&&(e.canvas.width=n.style("width").toPixels("x"),e.canvas.style.width=e.canvas.width+"px"),n.style("height").hasValue()&&(e.canvas.height=n.style("height").toPixels("y"),e.canvas.style.height=e.canvas.height+"px"));var i=e.canvas.clientWidth||e.canvas.width,o=e.canvas.clientHeight||e.canvas.height;if(1==t.opts.ignoreDimensions&&n.style("width").hasValue()&&n.style("height").hasValue()&&(i=n.style("width").toPixels("x"),o=n.style("height").toPixels("y")),t.ViewPort.SetCurrent(i,o),null!=t.opts.offsetX&&(n.attribute("x",!0).value=t.opts.offsetX),null!=t.opts.offsetY&&(n.attribute("y",!0).value=t.opts.offsetY),null!=t.opts.scaleWidth&&null!=t.opts.scaleHeight){var s=1,c=1,u=t.ToNumberArray(n.attribute("viewBox").value);n.attribute("width").hasValue()?s=n.attribute("width").toPixels("x")/t.opts.scaleWidth:isNaN(u[2])||(s=u[2]/t.opts.scaleWidth),n.attribute("height").hasValue()?c=n.attribute("height").toPixels("y")/t.opts.scaleHeight:isNaN(u[3])||(c=u[3]/t.opts.scaleHeight),n.attribute("width",!0).value=t.opts.scaleWidth,n.attribute("height",!0).value=t.opts.scaleHeight,n.attribute("viewBox",!0).value="0 0 "+i*s+" "+o*c,n.attribute("preserveAspectRatio",!0).value="none"}1!=t.opts.ignoreClear&&e.clearRect(0,0,i,o),n.render(e),a&&(a=!1,"function"==typeof t.opts.renderCallback&&t.opts.renderCallback(r))},s=!0;t.ImagesLoaded()&&(s=!1,o()),t.intervalID=setInterval((function(){var e=!1;if(s&&t.ImagesLoaded()&&(s=!1,e=!0),1!=t.opts.ignoreMouse&&(e|=t.Mouse.hasEvents()),1!=t.opts.ignoreAnimation)for(var r=0;r<t.Animations.length;r++)e|=t.Animations[r].update(1e3/t.FRAMERATE);"function"==typeof t.opts.forceRedraw&&1==t.opts.forceRedraw()&&(e=!0),e&&(o(),t.Mouse.runEvents())}),1e3/t.FRAMERATE)},t.stop=function(){t.intervalID&&clearInterval(t.intervalID)},t.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(t,e){this.events.push({type:"onclick",x:t,y:e,run:function(t){t.onclick&&t.onclick()}})},this.onmousemove=function(t,e){this.events.push({type:"onmousemove",x:t,y:e,run:function(t){t.onmousemove&&t.onmousemove()}})},this.eventElements=[],this.checkPath=function(t,e){for(var r=0;r<this.events.length;r++){var i=this.events[r];e.isPointInPath&&e.isPointInPath(i.x,i.y)&&(this.eventElements[r]=t)}},this.checkBoundingBox=function(t,e){for(var r=0;r<this.events.length;r++){var i=this.events[r];e.isPointInBox(i.x,i.y)&&(this.eventElements[r]=t)}},this.runEvents=function(){t.ctx.canvas.style.cursor="";for(var e=0;e<this.events.length;e++)for(var r=this.events[e],i=this.eventElements[e];i;)r.run(i),i=i.parent;this.events=[],this.eventElements=[]}},t}this.canvg=function(e,r,i){if(null!=e||null!=r||null!=i){i=i||{},"string"==typeof e&&(e=document.getElementById(e)),null!=e.svg&&e.svg.stop();var n=t();1==e.childNodes.length&&"OBJECT"==e.childNodes[0].nodeName||(e.svg=n),n.opts=i;var a=e.getContext("2d");void 0!==r.documentElement?n.loadXmlDoc(a,r):"<"==r.substr(0,1)?n.loadXml(a,r):n.load(a,r)}else for(var o=document.getElementsByTagName("svg"),s=0;s<o.length;s++){var c=o[s],u=document.createElement("canvas");u.width=c.clientWidth,u.height=c.clientHeight,c.parentNode.insertBefore(u,c),c.parentNode.removeChild(c);var l=document.createElement("div");l.appendChild(c),canvg(u,l.innerHTML)}}}(),"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(t,e,r,i,n){canvg(this.canvas,t,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:e,offsetY:r,scaleWidth:i,scaleHeight:n})}),canvg}},e[1]={value:function(t){var r=e.r(34),i=e.r(0);return r.createClass("Output",{constructor:function(t){this.formula=t},toJPG:function(t){n(this.formula,"image/jpeg",t)},toPNG:function(t){n(this.formula,"image/png",t)}});function n(t,e,r){var i,n,o,s=t.container.getRenderBox();return function(t,e,r,i){var n=arguments;a.apply(null,n)}(t.node.ownerDocument,{width:s.width,height:s.height,content:(i=t.node,n=i.ownerDocument.createElement("div"),o=['<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="',i.getAttribute("width"),'" height="',i.getAttribute("height"),'">'],n.appendChild(i.cloneNode(!0)),n.innerHTML.replace(/<svg[^>]+?>/i,o.join("")).replace(/ /g,""))},e,r)}function a(t,e,r,n){var a=function(t,e,r,i){var n=t.createElement("canvas"),a=n.getContext("2d");return n.width=e,n.height=r,"image/png"!==i&&(a.fillStyle="white",a.fillRect(0,0,n.width,n.height)),n}(t,e.width,e.height,r);a.style.cssText="position: absolute; top: 0; left: 100000px; z-index: -1;",window.setTimeout((function(){t.body.appendChild(a),i(a,e.content),t.body.removeChild(a),n(a.toDataURL(r))}),0)}}},e[2]={value:function(){return["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","ȷ","ı","α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","ς","σ","τ","υ","φ","χ","ψ","ω","ϑ","ϕ","ϖ","Ϟ","Ϝ","ϵ","ϱ","Ϲ","ℜ","ℵ","ℑ","℧","ℶ","ℷ","ℸ","ð","ℏ","⅁","ℎ","∂","℘","⅌","Ⅎ","∁","ℓ","Ⓢ","(",")","Γ","Δ","Ε","Ζ","Η","Θ","Ι","Κ","Λ","Μ","Ν","Ξ","Ο","Π","Ρ","Σ","Τ","Υ","Φ","Χ","Ψ","Ω","Α","Β","#","!","$","%","&","∠","′","‵","★","◆","■","▲","▼","⊤","⊥","♣","♠","♢","♡","∃","∄","♭","♮","♯","∀","∞","∡","∇","¬","∢","√","△","▽","∅","ø","◇","◀","▸","[","]","{","}","〈","〉","ϰ",",",".","/",":",";","?","\\","⋮","⋯","⋰","…","@",""","'","|","^","`","“","_","*","+","-","∐","⊼","⊻","◯","⊡","⊟","⊞","⊠","•","∩","∪","⋒","⋓","⋐","⋑","·","▪","◦","⊛","⊚","⊖","⊙","⊝","⊕","⊗","⊘","±","∓","⋏","⋎","†","‡","⋄","÷","⋇","∔","⌭","⋗","⋖","⋉","⋊","⋋","⋌","⊓","⊔","⊑","⊒","⊏","⊐","⋆","×","⊳","⊲","⊵","⊴","⊎","∨","∧","≀","<","=",">","≈","≇","≍","≒","≓","≊","∽","≁","≂","≃","⋍","≏","≎","≗","≅","⋞","⋟","≐","≑","≖","⪖","⪕","≡","≥","≤","≦","≧","⩾","⩽","≫","≪","≨","≩","⋘","⋙","⪇","⪈","⪉","⪊","⋧","⋦","⪆","⪅","⋛","⋚","⪋","⪌","≷","≶","≳","≲","⌮","⌯","≯","≱","≰","≮","⌱","⌰","⌲","⌳","≬","⊀","⊁","⋠","⋡","≺","≻","≼","≽","≾","≿","⊂","⊃","⊈","⊉","⊆","⊇","⊊","⊋","⪷","⪸","⪯","⪰","⪹","⪺","⪵","⪶","⋨","⋩","∼","≜","↶","↷","↺","↻","↾","↿","⇂","⇃","⇄","⇆","⇈","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇚","⇛","⇝","↫","↬","↭","↮","←","↑","→","↓","↔","↕","↖","↗","↘","↙","↞","↠","↢","↣","↰","↱","⊢","⊣","⊨","⊩","⊪","⊭","⊯","⊸","⊺","⋔","⋪","⋫","⋬","⋭","⌈","⌉","⌊","⌋","⫋","⫌","⫅","⫆","∈","∋","∝","∤","∦","∴","∵","∍","⋈","⌢","⌣","∣","∥","⏐","⏑","⏒","⏓","⫇","⫈","⊮","⊬","⫉","⏔","⏕","⏖","⏗","⇇","⇉","↼","↽","⇀","⇁","↚","↛","⟵","⟶","⟷","⟹","⟸","⟺","≢","≠","∉"]}},e[3]={value:function(){return{defaultFont:"KF AMS MAIN"}}},e[4]={value:function(t){var r=e.r(34),i=document.createElement("div");return{create:function(t){return function(t){var e=new r.Text;return"innerHTML"in e.node?e.node.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"):-1!=t.indexOf(" ")&&(t=function(t){return i.innerHTML='<svg><text gg="asfdas">'+t.replace(/\s/gi," ")+"</text></svg>",i.firstChild.firstChild.textContent}(t)),e.setContent(t),e}(t)}}}},e[5]={value:function(t){var r=e.r(34),i=e.r(47).font,n=e.r(25),a=e.r(4);return r.createClass("Text",{base:e.r(46),constructor:function(t,e){this.callBase(),this.fontFamily=e,this.fontSize=50,this.content=t||"",this.box.remove(),this.translationContent=this.translation(this.content),this.contentShape=new r.Group,this.contentNode=this.createContent(),this.contentShape.addShape(this.contentNode),this.addShape(this.contentShape)},createContent:function(){var t=a.create(this.translationContent);return t.setAttr({"font-family":this.fontFamily,"font-size":50,x:0,y:i.offset}),t},setFamily:function(t){this.fontFamily=t,this.contentNode.setAttr("font-family",t)},setFontSize:function(t){this.fontSize=t,this.contentNode.setAttr("font-size",t+"px"),this.contentNode.setAttr("y",t/50*i.offset)},getBaseHeight:function(){for(var t=this.contentShape.getItems(),e=null,r=0,i=0;e=t[r];)i=Math.max(i,e.getHeight()),r++;return i},translation:function(t){var e=this.fontFamily;return t.replace(/``/g,"“").replace(/\\([a-zA-Z,]+)\\/g,(function(t,r){return","===r?" ":n.getCharacterValue(r,e)||""}))}})}},e[6]={value:function(){return{UNKNOWN:-1,EXP:0,COMPOUND_EXP:1,OP:2}}},e[7]={value:function(){return{SIDE:"side",FOLLOW:"follow"}}},e[8]={value:function(t){return e.r(34).createClass("SubscriptExpression",{base:e.r(17),constructor:function(t,e){this.callBase(t,null,e),this.setFlag("Subscript")}})}},e[9]={value:function(t){return e.r(34).createClass("SuperscriptExpression",{base:e.r(17),constructor:function(t,e){this.callBase(t,e,null),this.setFlag("Superscript")}})}},e[10]={value:function(t){return e.r(34).createClass("BinaryExpression",{base:e.r(19),constructor:function(t,e){this.callBase(),this.setFirstOperand(t),this.setLastOperand(e)},setFirstOperand:function(t){return this.setOperand(t,0)},getFirstOperand:function(){return this.getOperand(0)},setLastOperand:function(t){return this.setOperand(t,1)},getLastOperand:function(){return this.getOperand(1)}})}},e[11]={value:function(t){var r=e.r(34),i=e.r(35);return r.createClass("BracketsExpression",{base:e.r(19),constructor:function(t,e,r){this.callBase(),this.setFlag("Brackets"),2===arguments.length&&(r=e,e=t),this.leftSymbol=t,this.rightSymbol=e,this.setOperator(new i),this.setOperand(r,0)},getLeftSymbol:function(){return this.leftSymbol},getRightSymbol:function(){return this.rightSymbol}})}},e[12]={value:function(t){var r=e.r(34),i=e.r(47).font,n=e.r(36);return r.createClass("CombinationExpression",{base:e.r(19),constructor:function(){this.callBase(),this.setFlag("Combination"),this.setOperator(new n),r.Utils.each(arguments,(function(t,e){this.setOperand(t,e)}),this)},getRenderBox:function(t){var e=this.callBase(t);return 0===this.getOperands().length&&(e.height=i.spaceHeight),e},getBaseline:function(t){var e=0,i=this.getOperands();return 0===i.length?this.callBase(t):(r.Utils.each(i,(function(r){e=Math.max(r.getBaseline(t),e)})),e)},getMeanline:function(t){var e=1e7,i=this.getOperands();return 0===i.length?this.callBase(t):(r.Utils.each(i,(function(r){e=Math.min(r.getMeanline(t),e)})),e)}})}},e[13]={value:function(t){var r=e.r(34),i=e.r(38);return r.createClass("FractionExpression",{base:e.r(10),constructor:function(t,e){this.callBase(t,e),this.setFlag("Fraction"),this.setOperator(new i)},getBaseline:function(t){var e=this.getOperand(1),r=e.getRenderBox(t);return r.y+e.getBaselineProportion()*r.height},getMeanline:function(t){var e=this.getOperand(0),r=e.getRenderBox(t);return e.getMeanlineProportion()*r.height}})}},e[14]={value:function(t){var r=e.r(34),i=e.r(47).func,n=e.r(39);return r.createClass("FunctionExpression",{base:e.r(19),constructor:function(t,e,r,i){this.callBase(),this.setFlag("Func"),this.funcName=t,this.setOperator(new n(t)),this.setExpr(e),this.setSuperscript(r),this.setSubscript(i)},isSideScript:function(){return!i["ud-script"][this.funcName]},setExpr:function(t){return this.setOperand(t,0)},setSuperscript:function(t){return this.setOperand(t,1)},setSubscript:function(t){return this.setOperand(t,2)}})}},e[15]={value:function(t){var r=e.r(34),i=e.r(40);return r.createClass("IntegrationExpression",{base:e.r(19),constructor:function(t,e,r){this.callBase(),this.setFlag("Integration"),this.setOperator(new i),this.setIntegrand(t),this.setSuperscript(e),this.setSubscript(r)},setType:function(t){return this.getOperator().setType(t),this},resetType:function(){return this.getOperator().resetType(),this},setIntegrand:function(t){this.setOperand(t,0)},setSuperscript:function(t){this.setOperand(t,1)},setSubscript:function(t){this.setOperand(t,2)}})}},e[16]={value:function(t){var r=e.r(34),i=e.r(42);return r.createClass("RadicalExpression",{base:e.r(10),constructor:function(t,e){this.callBase(t,e),this.setFlag("Radicand"),this.setOperator(new i)},setRadicand:function(t){return this.setFirstOperand(t)},getRadicand:function(){return this.getFirstOperand()},setExponent:function(t){return this.setLastOperand(t)},getExponent:function(){return this.getLastOperand()}})}},e[17]={value:function(t){var r=e.r(34),i=e.r(43);return r.createClass("ScriptExpression",{base:e.r(19),constructor:function(t,e,r){this.callBase(),this.setFlag("Script"),this.setOperator(new i),this.setOpd(t),this.setSuperscript(e),this.setSubscript(r)},setOpd:function(t){this.setOperand(t,0)},setSuperscript:function(t){this.setOperand(t,1)},setSubscript:function(t){this.setOperand(t,2)}})}},e[18]={value:function(t){var r=e.r(34),i=e.r(44);return r.createClass("SummationExpression",{base:e.r(19),constructor:function(t,e,r){this.callBase(),this.setFlag("Summation"),this.setOperator(new i),this.setExpr(t),this.setSuperscript(e),this.setSubscript(r)},setExpr:function(t){this.setOperand(t,0)},setSuperscript:function(t){this.setOperand(t,1)},setSubscript:function(t){this.setOperand(t,2)}})}},e[19]={value:function(t){var r=e.r(34),i=e.r(6),n=e.r(21);return r.createClass("CompoundExpression",{base:e.r(21),constructor:function(){this.callBase(),this.type=i.COMPOUND_EXP,this.operands=[],this.operator=null,this.operatorBox=new r.Group,this.operatorBox.setAttr("data-type","kf-editor-exp-op-box"),this.operandBox=new r.Group,this.operandBox.setAttr("data-type","kf-editor-exp-operand-box"),this.setChildren(0,this.operatorBox),this.setChildren(1,this.operandBox)},setOperator:function(t){return void 0===t||(this.operator&&this.operator.remove(),this.operatorBox.addShape(t),this.operator=t,this.operator.setParentExpression(this),t.expression=this),this},getOperator:function(){return this.operator},setOperand:function(t,e,r){return!1===r?(this.operands[e]=t,this):(t=n.wrap(t),this.operands[e]&&this.operands[e].remove(),this.operands[e]=t,this.operandBox.addShape(t),this)},getOperand:function(t){return this.operands[t]},getOperands:function(){return this.operands},addedCall:function(){return this.operator.applyOperand.apply(this.operator,this.operands),this}})}},e[20]={value:function(t){var r=e.r(34),i=e.r(47).font,n=e.r(21),a=r.createClass("EmptyExpression",{base:n,constructor:function(){this.callBase(),this.setFlag("Empty")},getRenderBox:function(){return{width:0,height:i.spaceHeight,x:0,y:0}}});return a.isEmpty=function(t){return t instanceof a},n.registerWrap("empty",(function(t){if(null==t)return new a})),a}},e[21]={value:function(t){var r=e.r(34),i=e.r(6),n=e.r(47).font,a=[],o={},s=r.createClass("Expression",{base:e.r(46),constructor:function(){this.callBase(),this.type=i.EXP,this._offset={top:0,bottom:0},this.children=[],this.box.fill("transparent").setAttr("data-type","kf-editor-exp-box"),this.box.setAttr("data-type","kf-editor-exp-bg-box"),this.expContent=new r.Group,this.expContent.setAttr("data-type","kf-editor-exp-content-box"),this.addShape(this.expContent)},getChildren:function(){return this.children},getChild:function(t){return this.children[t]||null},getTopOffset:function(){return this._offset.top},getBottomOffset:function(){return this._offset.bottom},getOffset:function(){return this._offset},setTopOffset:function(t){this._offset.top=t},setBottomOffset:function(t){this._offset.bottom=t},setOffset:function(t,e){this._offset.top=t,this._offset.bottom=e},setFlag:function(t){this.setAttr("data-flag",t||"Expression")},setChildren:function(t,e){this.children[t]&&this.children[t].remove(),this.children[t]=e,this.expContent.addShape(e)},getBaselineProportion:function(){return n.baselinePosition},getMeanlineProportion:function(){return n.meanlinePosition},getBaseline:function(t){return this.getRenderBox(t).height*n.baselinePosition-3},getMeanline:function(t){return this.getRenderBox(t).height*n.meanlinePosition-1},getAscenderline:function(){return this.getFixRenderBox().height*n.ascenderPosition},getDescenderline:function(){return this.getFixRenderBox().height*n.descenderPosition},translateElement:function(t,e){this.expContent.translate(t,e)},expand:function(t,e){var r=this.getFixRenderBox();this.setBoxSize(r.width+t,r.height+e)},getBaseWidth:function(){return this.getWidth()},getBaseHeight:function(){return this.getHeight()},updateBoxSize:function(){var t=this.expContent.getFixRenderBox();this.setBoxSize(t.width,t.height)},getBox:function(){return this.box}});return r.Utils.extend(s,{registerWrap:function(t,e){o[t]=a.length,a.push(e)},revokeWrap:function(t){var e=null;return t in o&&(e=a[o[t]],a[o[t]]=null,delete o[t]),e},wrap:function(t){var e;return r.Utils.each(a,(function(r){if(r)return!(e=r(t))&&void 0})),e}}),s}},e[22]={value:function(r){var i=e.r(5),n=e.r(34),a=e.r(3),o=e.r(21),s=n.createClass("TextExpression",{base:e.r(21),constructor:function(t,e){this.callBase(),this.fontFamily=e||a.defaultFont,this.setFlag("Text"),this.content=t+"",this.textContent=new i(this.content,this.fontFamily),this.setChildren(0,this.textContent),this.setChildren(1,new n.Rect(0,0,0,0).fill("transparent"))},setFamily:function(t){this.textContent.setFamily(t)},setFontSize:function(t){this.textContent.setFontSize(t)},addedCall:function(){var t=this.textContent.getFixRenderBox();return this.getChild(1).setSize(t.width,t.height),this.updateBoxSize(),this}});return o.registerWrap("text",(function(e){var r=t(e);return"number"!==r&&"string"!==r||(e=new s(e)),e})),s}},e[23]={value:function(){return['<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">','<text id="abcd" font-family="KF AMS MAIN" font-size="50" x="0" y="0">x</text>',"</svg>"]}},e[24]={value:function(t){var r=e.r(34),i=e.r(25),n=e.r(33),a=e.r(47).font,o=e.r(2),s=[];return r.createClass("FontInstaller",{constructor:function(t,e){this.callBase(),this.resource=e||"../src/resource/",this.doc=t},mount:function(t){var c=i.getFontList(),u=0,l=this;r.Utils.each(c,(function(i){u++,i.meta.src=l.resource+i.meta.src,l.createFontStyle(i),function(t,e,r){n.get(e.meta.src,(function(i,n){"success"===n&&function(t,e){var r=document.createElement("div"),i=e.meta.fontFamily;r.style.cssText="position: absolute; top: -10000px; left: -100000px;",r.style.fontFamily=i,r.innerHTML=o.join(""),t.body.appendChild(r),s.push(r)}(t,e),r()}))}(l.doc,i,(function(){0==--u&&function(t,i){window.setTimeout((function(){!function(t){var r=t.createElement("div");r.style.cssText="position: absolute; top: 0; left: -100000px;",r.innerHTML=e.r(23).join(""),t.body.appendChild(r);var i=r.getElementsByTagName("text")[0].getBBox();a.spaceHeight=i.height,a.topSpace=-i.y-a.baseline,a.bottomSpace=a.spaceHeight-a.topSpace-a.baseHeight,a.offset=a.baseline+a.topSpace,a.baselinePosition=(a.topSpace+a.baseline)/a.spaceHeight,a.meanlinePosition=(a.topSpace+a.meanline)/a.spaceHeight,a.ascenderPosition=a.topSpace/a.spaceHeight,a.descenderPosition=(a.topSpace+a.baseHeight)/a.spaceHeight,t.body.removeChild(r)}(t),r.Utils.each(s,(function(t){t.parentNode.removeChild(t)})),s=[],i()}),100)}(l.doc,t)}))}))},createFontStyle:function(t){var e=this.doc.createElement("style");e.setAttribute("type","text/css"),e.innerHTML='@font-face{\nfont-family: "${fontFamily}";\nsrc: url("${src}");\n}'.replace("${fontFamily}",t.meta.fontFamily).replace("${src}",t.meta.src),this.doc.head.appendChild(e)}})}},e[25]={value:function(t){var r={},i=e.r(34),n=e.r(47).font.list;return i.Utils.each(n,(function(t){r[t.meta.fontFamily]=t})),{getFontList:function(){return r},getCharacterValue:function(t,e){return r[e]&&r[e].map[t]||null}}}},e[26]={value:function(){return{meta:{fontFamily:"KF AMS BB",src:"KF_AMS_BB.woff"}}}},e[27]={value:function(){return{meta:{fontFamily:"KF AMS CAL",src:"KF_AMS_CAL.woff"}}}},e[28]={value:function(){return{meta:{fontFamily:"KF AMS FRAK",src:"KF_AMS_FRAK.woff"}}}},e[29]={value:function(){return{meta:{fontFamily:"KF AMS MAIN",src:"KF_AMS_MAIN.woff"},map:{Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",varkappa:"ϰ",chi:"χ",psi:"ψ",omega:"ω",digamma:"Ϝ",varepsilon:"ϵ",varrho:"ϱ",varphi:"ϕ",vartheta:"ϑ",varpi:"ϖ",varsigma:"Ϲ",aleph:"ℵ",beth:"ℶ",daleth:"ℸ",gimel:"ℷ",eth:"ð",hbar:"ℎ",hslash:"ℏ",mho:"℧",partial:"∂",wp:"℘",Game:"⅁",Bbbk:"⅌",Finv:"Ⅎ",Im:"ℑ",Re:"ℜ",complement:"∁",ell:"ℓ",circledS:"Ⓢ",imath:"ı",jmath:"ȷ",doublecap:"⋒",Cap:"⋒",doublecup:"⋓",Cup:"⋓",ast:"*",divideontimes:"⋇",rightthreetimes:"⋌",leftthreetimes:"⋋",cdot:"·",colon:":",odot:"⊙",dotplus:"∔",rtimes:"⋊",ltimes:"⋉",centerdot:"▪",doublebarwedge:"⌭",setminus:"⒁",amalg:"∐",circ:"◦",bigcirc:"◯",gtrdot:"⋗",lessdot:"⋖",smallsetminus:"⒅",circledast:"⊛",circledcirc:"⊚",sqcap:"⊓",sqcup:"⊔",barwedge:"⊼",circleddash:"⊝",star:"⋆",bigtriangledown:"▽",bigtriangleup:"△",cup:"∪",cap:"∩",times:"×",mp:"∓",pm:"±",triangleleft:"⊲",triangleright:"⊳",boxdot:"⊡",curlyvee:"⋏",curlywedge:"⋎",boxminus:"⊟",boxtimes:"⊠",ominus:"⊖",oplus:"⊕",oslash:"⊘",otimes:"⊗",uplus:"⊎",boxplus:"⊞",dagger:"†",ddagger:"‡",vee:"∨",lor:"∨",veebar:"⊻",bullet:"•",diamond:"⋄",wedge:"∧",land:"∧",div:"÷",wr:"≀",geqq:"≧",lll:"⋘",llless:"⋘",ggg:"⋙",gggtr:"⋙",preccurlyeq:"≼",geqslant:"⩾",lnapprox:"⪉",preceq:"⪯",gg:"≫",lneq:"⪇",precnapprox:"⪹",approx:"≈",lneqq:"≨",precneqq:"⪵",approxeq:"≊",gnapprox:"⪊",lnsim:"⋦",precnsim:"⋨",asymp:"≍",gneq:"⪈",lvertneqq:"⌮",precsim:"≾",backsim:"∽",gneqq:"≩",ncong:"≇",risingdotseq:"≓",backsimeq:"⋍",gnsim:"⋧",sim:"∼",simeq:"≃",bumpeq:"≏",gtrapprox:"⪆",ngeq:"≱",Bumpeq:"≎",gtreqless:"⋛",ngeqq:"⌱",succ:"≻",circeq:"≗",gtreqqless:"⪌",ngeqslant:"⌳",succapprox:"⪸",cong:"≅",gtrless:"≷",ngtr:"≯",succcurlyeq:"≽",curlyeqprec:"⋞",gtrsim:"≳",nleq:"≰",succeq:"⪰",curlyeqsucc:"⋟",gvertneqq:"⌯",neq:"≠",ne:"≠",nequiv:"≢",nleqq:"⌰",succnapprox:"⪺",doteq:"≐",leq:"≤",le:"≤",nleqslant:"⌲",succneqq:"⪶",doteqdot:"≑",Doteq:"≑",leqq:"≦",nless:"≮",succnsim:"⋩",leqslant:"⩽",nprec:"⊀",succsim:"≿",eqsim:"≂",lessapprox:"⪅",npreceq:"⋠",eqslantgtr:"⪖",lesseqgtr:"⋚",nsim:"≁",eqslantless:"⪕",lesseqqgtr:"⪋",nsucc:"⊁",triangleq:"≜",eqcirc:"≖",equiv:"≡",lessgtr:"≶",nsucceq:"⋡",fallingdotseq:"≒",lesssim:"≲",prec:"≺",geq:"≥",ge:"≥",ll:"≪",precapprox:"⪷",uparrow:"↑",downarrow:"↓",updownarrow:"↕",Uparrow:"⇑",Downarrow:"⇓",Updownarrow:"⇕",circlearrowleft:"↺",circlearrowright:"↻",curvearrowleft:"↶",curvearrowright:"↷",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",leftarrow:"←",gets:"←",Leftarrow:"⇐",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇄",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",Lleftarrow:"⇚",looparrowleft:"↫",looparrowright:"↬",multimap:"⊸",nLeftarrow:"⇍",nRightarrow:"⇏",nLeftrightarrow:"⇎",nearrow:"↗",nleftarrow:"↚",nleftrightarrow:"↮",nrightarrow:"↛",nwarrow:"↖",rightarrow:"→",to:"→",Rightarrow:"⇒",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇆",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"⇝",Rrightarrow:"⇛",searrow:"↘",swarrow:"↙",twoheadleftarrow:"↞",twoheadrightarrow:"↠",upharpoonleft:"↿",upharpoonright:"↾",restriction:"↾",upuparrows:"⇈",Lsh:"↰",Rsh:"↱",longleftarrow:"⟵",longrightarrow:"⟶",Longleftarrow:"⟸",Longrightarrow:"⟹",implies:"⟹",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",backepsilon:"∍",because:"∵",therefore:"∴",between:"≬",blacktriangleleft:"◀",blacktriangleright:"▸",dashv:"⊣",bowtie:"⋈",frown:"⌢",in:"∈",notin:"∉",mid:"∣",parallel:"∥",models:"⊨",ni:"∋",owns:"∋",nmid:"∤",nparallel:"∦",nshortmid:"⏒",nshortparallel:"⏓",nsubseteq:"⊈",nsubseteqq:"⫇",nsupseteq:"⊉",nsupseteqq:"⫈",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nvdash:"⊬",nVdash:"⊮",nvDash:"⊭",nVDash:"⊯",perp:"⊥",pitchfork:"⋔",propto:"∝",shortmid:"⏐",shortparallel:"⏑",smile:"⌣",sqsubset:"⊏",sqsubseteq:"⊑",sqsupset:"⊐",sqsupseteq:"⊒",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",trianglelefteq:"⊴",trianglerighteq:"⊵",varpropto:"⫉",varsubsetneq:"⏔",varsubsetneqq:"⏖",varsupsetneq:"⏕",varsupsetneqq:"⏗",vdash:"⊢",Vdash:"⊩",vDash:"⊨",Vvdash:"⊪",vert:"|",Vert:"ǁ","|":"ǁ","{":"{","}":"}",backslash:"\\",langle:"〈",rangle:"〉",lceil:"⌈",rceil:"⌉",lbrace:"{",rbrace:"}",lfloor:"⌊",rfloor:"⌋",cdots:"⋯",ddots:"⋰",vdots:"⋮",dots:"…",ldots:"…","#":"#",bot:"⊥",angle:"∠",backprime:"‵",bigstar:"★",blacklozenge:"◆",blacksquare:"■",blacktriangle:"▲",blacktriangledown:"▼",clubsuit:"♣",diagdown:"⒁",diagup:"⒂",diamondsuit:"♢",emptyset:"ø",exists:"∃",flat:"♭",forall:"∀",heartsuit:"♡",infty:"∞",lozenge:"◇",measuredangle:"∡",nabla:"∇",natural:"♮",neg:"¬",lnot:"¬",nexists:"∄",prime:"′",sharp:"♯",spadesuit:"♠",sphericalangle:"∢",surd:"√",top:"⊤",varnothing:"∅",triangle:"△",triangledown:"▽"}}}},e[30]={value:function(){return{meta:{fontFamily:"KF AMS ROMAN",src:"KF_AMS_ROMAN.woff"}}}},e[31]={value:function(t){var r=e.r(34),i=e.r(6),n=e.r(25),a=e.r(24),o={fontsize:50,autoresize:!0,padding:[0]},s=e.r(1),c=r.createClass("ExpressionWrap",{constructor:function(t,e){this.wrap=new r.Group,this.bg=new r.Rect(0,0,0,0).fill("transparent"),this.exp=t,this.config=e,this.wrap.setAttr("data-type","kf-exp-wrap"),this.bg.setAttr("data-type","kf-exp-wrap-bg"),this.wrap.addShape(this.bg),this.wrap.addShape(this.exp)},getWrapShape:function(){return this.wrap},getExpression:function(){return this.exp},getBackground:function(){return this.bg},resize:function(){var t=this.config.padding,e=this.exp.getFixRenderBox();1===t.length&&(t[1]=t[0]),this.bg.setSize(2*t[1]+e.width,2*t[0]+e.height),this.exp.translate(t[1],t[0])}}),u=r.createClass("Formula",{base:e.r(32),constructor:function(t,e){this.callBase(t),this.expressions=[],this.fontInstaller=new a(this),this.config=r.Utils.extend({},o,e),this.initEnvironment(),this.initInnerFont()},getContentContainer:function(){return this.container},initEnvironment:function(){this.zoom=this.config.fontsize/50,"width"in this.config&&this.setWidth(this.config.width),"height"in this.config&&this.setHeight(this.config.height),this.node.setAttribute("font-size",o.fontsize)},initInnerFont:function(){var t=n.getFontList(),e=this;r.Utils.each(t,(function(t){!function(t){var r=e.doc.createElement("style");r.setAttribute("type","text/css"),r.innerHTML='@font-face{font-family: "${fontFamily}";font-style: normal;src: url("${src}") format("woff");}'.replace("${fontFamily}",t.meta.fontFamily).replace("${src}",t.meta.src),e.resourceNode.appendChild(r)}(t)}))},insertExpression:function(t,e){var r=this.wrap(t);this.container.clearTransform(),this.expressions.splice(e,0,r.getWrapShape()),this.addShape(r.getWrapShape()),h.call(this,r.getExpression()),r.resize(),l.call(this),this.resetZoom(),this.config.autoresize&&this.resize()},appendExpression:function(t){this.insertExpression(t,this.expressions.length)},resize:function(){var t=this.container.getRenderBox("paper");this.node.setAttribute("width",t.width),this.node.setAttribute("height",t.height)},resetZoom:function(){var t=this.zoom/this.getBaseZoom();0!==t&&this.container.scale(t)},wrap:function(t){return new c(t,this.config)},clear:function(){this.callBase(),this.expressions=[]},clearExpressions:function(){r.Utils.each(this.expressions,(function(t){t.remove()})),this.expressions=[]},toJPG:function(t){new s(this).toJPG(t)},toPNG:function(t){new s(this).toPNG(t)}});function l(){var t=0;return r.Utils.each(this.expressions,(function(e){var i;e&&(e.setMatrix(new r.Matrix(1,0,0,1,0,0)),i=e.getFixRenderBox(),e.translate(0-i.x,t),t+=i.height+10)})),this}function h(t){var e=0;if(t){if(t.getType()===i.EXP){var r=0;for(e=t.getChildren().length;r<e;r++)h(t.getChild(r))}else if(t.getType()===i.COMPOUND_EXP){for(r=0,e=t.getOperands().length;r<e;r++)h(t.getOperand(r));h(t.getOperator())}t.addedCall&&t.addedCall()}}return r.Utils.extend(u,{registerFont:function(t){n.registerFont(t)}}),u}},e[32]={value:function(t){var r=e.r(34);return r.createClass("FPaper",{base:r.Paper,constructor:function(t){this.callBase(t),this.doc=t.ownerDocument,this.container=new r.Group,this.container.setAttr("data-type","kf-container"),this.background=new r.Group,this.background.setAttr("data-type","kf-bg"),this.baseZoom=1,this.zoom=1,this.base("addShape",this.background),this.base("addShape",this.container)},getZoom:function(){return this.zoom},getBaseZoom:function(){return this.baseZoom},addShape:function(t,e){return this.container.addShape(t,e)},getBackground:function(){return this.background},removeShape:function(t){return this.container.removeShape(t)},clear:function(){return this.container.clear()}})}},e[33]={value:function(){if(!window.jQuery)throw new Error("Missing jQuery");return window.jQuery}},e[34]={value:function(){if(!window.kity)throw new Error("Missing Kity Graphic Lib");return window.kity}},e[35]={value:function(t){var r=e.r(34),i=e.r(5);return r.createClass("BracketsOperator",{base:e.r(41),constructor:function(){this.callBase("Brackets")},applyOperand:function(t){n.call(this,t)}});function n(t){var e=this.getParentExpression().getLeftSymbol(),n=this.getParentExpression().getRightSymbol(),a=t.getFixRenderBox().height,o=new r.Group,s=0,c=new i(e,"KF AMS MAIN").fill("black"),u=new i(n,"KF AMS MAIN").fill("black");c.setFontSize(a),u.setFontSize(a),this.addOperatorShape(o.addShape(c).addShape(u)),s+=c.getFixRenderBox().width,t.translate(s,0),s+=t.getFixRenderBox().width,u.translate(s,0)}}},e[36]={value:function(t){var r=e.r(34);return r.createClass("CombinationOperator",{base:e.r(41),constructor:function(){this.callBase("Combination")},applyOperand:function(){var t=0,e=arguments,i=0,n=0,a=0,o=[],s=[];r.Utils.each(e,(function(t){var e=t.getFixRenderBox(),r=t.getOffset();e.height-=r.top+r.bottom,o.push(e),s.push(r),n=Math.max(r.top,n),a=Math.max(r.bottom,a),i=Math.max(e.height,i)})),r.Utils.each(e,(function(e,r){var n=o[r];e.translate(t-n.x,(i-(n.y+n.height))/2+a-s[r].bottom),t+=n.width})),this.parentExpression.setOffset(n,a),this.parentExpression.updateBoxSize()}})}},e[37]={value:function(t){var r=e.r(34),i=e.r(20),n={subOffset:0,supOffset:0,zoom:.66};return r.createClass("ScriptController",{constructor:function(t,e,i,a,o){this.observer=t.getParentExpression(),this.target=e,this.sup=i,this.sub=a,this.options=r.Utils.extend({},n,o)},applyUpDown:function(){var t=this.target,e=this.sup,r=this.sub,n=this.options;e.scale(n.zoom),r.scale(n.zoom);var a=t.getFixRenderBox();return i.isEmpty(e)&&i.isEmpty(r)?{width:a.width,height:a.height,top:0,bottom:0}:!i.isEmpty(e)&&i.isEmpty(r)?this.applyUp(t,e):i.isEmpty(e)&&!i.isEmpty(r)?this.applyDown(t,r):this.applyUpDownScript(t,e,r)},applySide:function(){var t=this.target,e=this.sup,r=this.sub;if(i.isEmpty(e)&&i.isEmpty(r)){var n=t.getRenderBox(this.observer);return{width:n.width,height:n.height,top:0,bottom:0}}return i.isEmpty(e)&&!i.isEmpty(r)?this.applySideSub(t,r):!i.isEmpty(e)&&i.isEmpty(r)?this.applySideSuper(t,e):this.applySideScript(t,e,r)},applySideSuper:function(t,e){e.scale(this.options.zoom);var r=t.getRenderBox(this.observer),i=e.getRenderBox(this.observer),n=t.getMeanline(this.observer),a=e.getBaseline(this.observer)-n,o={top:0,bottom:0,width:r.width+i.width,height:r.height};return e.translate(r.width,0),this.options.supOffset&&e.translate(this.options.supOffset,0),a>0?(t.translate(0,a),o.bottom=a,o.height+=a):e.translate(0,-a),o},applySideSub:function(t,e){e.scale(this.options.zoom);var r=t.getRenderBox(this.observer),i=e.getRenderBox(this.observer),n=e.getOffset(),a=t.getBaseline(this.observer),o=(i.height+n.top+n.bottom)/2,s=r.height-a-o,c={top:0,bottom:0,width:r.width+i.width,height:r.height};return e.translate(r.width,n.top+a-o),this.options.subOffset&&e.translate(this.options.subOffset,0),s<0&&(c.top=-s,c.height-=s),c},applySideScript:function(t,e,r){e.scale(this.options.zoom),r.scale(this.options.zoom);var i=t.getRenderBox(this.observer),n=r.getRenderBox(this.observer),a=e.getRenderBox(this.observer),o=t.getMeanline(this.observer),s=t.getBaseline(this.observer),c=e.getBaseline(this.observer),u=r.getAscenderline(this.observer),l=o+2*(s-o)/3,h=o-c,f=i.height-l-(n.height-u),p={top:0,bottom:0,width:i.width+Math.max(n.width,a.width),height:i.height};return e.translate(i.width,h),r.translate(i.width,l-u),this.options.supOffset&&e.translate(this.options.supOffset,0),this.options.subOffset&&r.translate(this.options.subOffset,0),h>0?f<0&&(i.height-=f,p.top=-f):(t.translate(0,-h),e.translate(0,-h),r.translate(0,-h),p.height-=h,f>0?p.bottom=-h:(p.height-=f,(h=-h)>(f=-f)?p.bottom=h-f:p.top=f-h)),p},applyUp:function(t,e){var r=e.getFixRenderBox(),i=t.getFixRenderBox(),n={width:Math.max(i.width,r.width),height:r.height+i.height,top:0,bottom:r.height};return e.translate((n.width-r.width)/2,0),t.translate((n.width-i.width)/2,r.height),n},applyDown:function(t,e){var r=e.getFixRenderBox(),i=t.getFixRenderBox(),n={width:Math.max(i.width,r.width),height:r.height+i.height,top:r.height,bottom:0};return e.translate((n.width-r.width)/2,i.height),t.translate((n.width-i.width)/2,0),n},applyUpDownScript:function(t,e,r){var i=e.getFixRenderBox(),n=r.getFixRenderBox(),a=t.getFixRenderBox(),o={width:Math.max(a.width,i.width,n.width),height:i.height+n.height+a.height,top:0,bottom:0};return e.translate((o.width-i.width)/2,0),t.translate((o.width-a.width)/2,i.height),r.translate((o.width-n.width)/2,i.height+a.height),o}})}},e[38]={value:function(t){var r=e.r(34),i=e.r(47).zoom;return r.createClass("FractionOperator",{base:e.r(41),constructor:function(){this.callBase("Fraction")},applyOperand:function(t,e){t.scale(i),e.scale(i);var n=Math.ceil(t.getWidth()),a=Math.ceil(e.getWidth()),o=Math.ceil(t.getHeight()),s=Math.ceil(e.getHeight()),c=Math.max(n,a),u=Math.max(o,s),l=function(t,e){return new r.Rect(t+6,1).fill("black")}(c);this.addOperatorShape(l),t.translate((c-n)/2+3,0),l.translate(0,o+1),e.translate((c-a)/2+3,o+l.getHeight()+2),this.parentExpression.setOffset(u-o,u-s),this.parentExpression.expand(2,2),this.parentExpression.translateElement(1,1)}})}},e[39]={value:function(t){var r=e.r(34),i=e.r(5),n=e.r(37);return r.createClass("FunctionOperator",{base:e.r(41),constructor:function(t){this.callBase("Function: "+t),this.funcName=t},applyOperand:function(t,e,r){var i=a.call(this),o=t.getFixRenderBox(),s=this.parentExpression.isSideScript()?"applySide":"applyUpDown",c=new n(this,i,e,r,{zoom:.5})[s](),u=(c.height+c.top+c.bottom-o.height)/2;i.translate(0,c.top),e.translate(0,c.top),r.translate(0,c.top),u>=0?t.translate(c.width+5,u):(u=-u,i.translate(0,u),e.translate(0,u),r.translate(0,u),t.translate(c.width+5,0)),this.parentExpression.expand(5,10),this.parentExpression.translateElement(5,5)}});function a(){var t=new i(this.funcName,"KF AMS ROMAN");return this.addOperatorShape(t),t.getBaseline=function(){return t.getFixRenderBox().height},t.getMeanline=function(){return 0},t}}},e[40]={value:function(t){var r=e.r(34),i=e.r(37);return r.createClass("IntegrationOperator",{base:e.r(41),constructor:function(t){this.callBase("Integration"),this.opType=t||1},setType:function(t){this.opType=0|t},resetType:function(){this.opType=1},applyOperand:function(t,e,r){var n=this.getOperatorShape(),a=t.getFixRenderBox(),o=new i(this,n,e,r,{supOffset:3,subOffset:-15}).applySide(),s=(o.height+o.top-a.height)/2;n.translate(0,o.top),e.translate(0,o.top),r.translate(0,o.top),s>=0?t.translate(o.width+3,s):(s=-s,n.translate(0,s),e.translate(0,s),r.translate(0,s),t.translate(o.width+3,0)),this.parentExpression.expand(3,6),this.parentExpression.translateElement(3,3)},getOperatorShape:function(){var t=new r.Group,e=new r.Group,i=new r.Path("M1.318,48.226c0,0,0.044,0.066,0.134,0.134c0.292,0.313,0.626,0.447,1.006,0.447c0.246,0.022,0.358-0.044,0.604-0.268 c0.782-0.782,1.497-2.838,2.324-6.727c0.514-2.369,0.938-4.693,1.586-8.448C8.559,24.068,9.9,17.878,11.978,9.52 c0.917-3.553,1.922-7.576,3.866-8.983C16.247,0.246,16.739,0,17.274,0c1.564,0,2.503,1.162,2.592,2.57 c0,0.827-0.424,1.386-1.273,1.386c-0.671,0-1.229-0.514-1.229-1.251c0-0.805,0.514-1.095,1.185-1.274 c0.022,0-0.291-0.29-0.425-0.379c-0.201-0.134-0.514-0.224-0.737-0.224c-0.067,0-0.112,0-0.157,0.022 c-0.469,0.134-0.983,0.939-1.453,2.234c-0.537,1.475-0.961,3.174-1.631,6.548c-0.424,2.101-0.693,3.464-1.229,6.727 c-1.608,9.185-2.949,15.487-5.006,23.756c-0.514,2.034-0.849,3.24-1.207,4.335c-0.559,1.698-1.162,2.95-1.811,3.799 c-0.514,0.715-1.385,1.408-2.436,1.408c-1.363,0-2.391-1.185-2.458-2.592c0-0.804,0.447-1.363,1.273-1.363 c0.671,0,1.229,0.514,1.229,1.251C2.503,47.757,1.989,48.047,1.318,48.226z").fill("black"),n=new r.Rect(0,0,0,0).fill("transparent"),a=null;e.addShape(i),t.addShape(n),t.addShape(e),this.addOperatorShape(t);for(var o=1;o<this.opType;o++)a=new r.Use(i).translate(i.getWidth()/2*o,0),e.addShape(a);return e.scale(1.6),a=null,t.getBaseline=function(){return e.getFixRenderBox().height},t.getMeanline=function(){return 10},t}})}},e[41]={value:function(t){var r=e.r(34),i=e.r(6);return r.createClass("Operator",{base:e.r(46),constructor:function(t){this.callBase(),this.type=i.OP,this.parentExpression=null,this.operatorName=t,this.operatorShape=new r.Group,this.addShape(this.operatorShape)},applyOperand:function(){throw new Error("applyOperand is abstract")},setParentExpression:function(t){this.parentExpression=t},getParentExpression:function(){return this.parentExpression},clearParentExpression:function(){this.parentExpression=null},addOperatorShape:function(t){return this.operatorShape.addShape(t)},getOperatorShape:function(){return this.operatorShape}})}},e[42]={value:function(t){var r=e.r(34),i=2*Math.PI/360,n=Math.sin(15*i),a=Math.cos(15*i),o=Math.tan(15*i);return r.createClass("RadicalOperator",{base:e.r(41),constructor:function(){this.callBase("Radical")},applyOperand:function(t,e){s.call(this,t,e)}});function s(t,e){var i,s,u,l,h=function(t){var e=new r.Path,i=t.getHeight()/3,s=e.getDrawer();return s.moveTo(0,1*a*6),s.lineBy(1*n,1*a),s.lineBy(1*a*3,1*-n*3),s.lineBy(o*i,i),s.lineBy(1*n*3,1*-a*3),s.lineBy(-n*i,-i),s.close(),e.fill("black")}(t),f=(i=t,s=new r.Path,u=.9*i.getHeight(),(l=s.getDrawer()).moveTo(o*u,0),l.lineTo(0,u),l.lineBy(1*n*3,1*a*3),l.lineBy(o*u+1*n*3,-(u+3*a)),l.close(),s.fill("black")),p=function(t){var e=t.getWidth()+2;return new r.Rect(e,2).fill("black")}(t);this.addOperatorShape(h),this.addOperatorShape(f),this.addOperatorShape(p),c.call(this,function(t,e,r){var i=t.getFixRenderBox(),o=e.getFixRenderBox();return e.translate(i.width-1*n*3,0),t.translate(0,o.height-i.height),o=e.getFixRenderBox(),r.translate(o.x+o.width-1/a,0),{x:o.x+o.width-1/a,y:0}}(h,f,p),this.operatorShape,t,e),this.parentExpression.expand(0,10),this.parentExpression.translateElement(0,5)}function c(t,e,r,i){var n,a={x:0,y:0},s=e.getFixRenderBox();i.scale(.66),(n=i.getFixRenderBox()).width>0&&n.height>0&&(a.y=n.height-s.height/2,a.y<0&&(i.translate(0,-a.y),a.y=0),a.x=n.width+s.height/2*o-t.x),e.translate(a.x,a.y),r.translate(a.x+t.x+1,a.y+2)}}},e[43]={value:function(t){var r=e.r(34),i=e.r(37);return r.createClass("ScriptOperator",{base:e.r(41),constructor:function(t){this.callBase(t||"Script")},applyOperand:function(t,e,r){var n=this.parentExpression,a=new i(this,t,e,r).applySide();this.getOperatorShape(),a&&n.setOffset(a.top,a.bottom),n.expand(4,2),n.translateElement(2,1)}})}},e[44]={value:function(t){var r=e.r(34),i=e.r(37);return r.createClass("SummationOperator",{base:e.r(41),constructor:function(){this.callBase("Summation"),this.displayType="equation"},applyOperand:function(t,e,r){var n=this.getOperatorShape(),a=t.getFixRenderBox(),o=new i(this,n,e,r).applyUpDown(),s=(o.height-o.top-o.bottom-a.height)/2;s>=0?t.translate(o.width+0,s+o.bottom):(s=-s,n.translate(0,s),e.translate(0,s),r.translate(0,s),t.translate(o.width+0,o.bottom)),this.parentExpression.setOffset(o.top,o.bottom),this.parentExpression.expand(0,0),this.parentExpression.translateElement(0,0)},getOperatorShape:function(){var t,e=new r.Path("M0.672,33.603c-0.432,0-0.648,0-0.648-0.264c0-0.024,0-0.144,0.24-0.432l12.433-14.569L0,0.96c0-0.264,0-0.72,0.024-0.792 C0.096,0.024,0.12,0,0.672,0h28.371l2.904,6.745h-0.6C30.531,4.8,28.898,3.72,28.298,3.336c-1.896-1.2-3.984-1.608-5.28-1.8 c-0.216-0.048-2.4-0.384-5.617-0.384H4.248l11.185,15.289c0.168,0.24,0.168,0.312,0.168,0.36c0,0.12-0.048,0.192-0.216,0.384 L3.168,31.515h14.474c4.608,0,6.96-0.624,7.464-0.744c2.76-0.72,5.305-2.352,6.241-4.848h0.6l-2.904,7.681H0.672z").fill("black"),i=new r.Rect(0,0,0,0).fill("transparent"),n=new r.Group;return n.addShape(i),n.addShape(e),e.scale(1.6),this.addOperatorShape(n),t=e.getFixRenderBox(),"inline"===this.displayType?(e.translate(5,15),i.setSize(t.width+10,t.height+25)):(e.translate(2,5),i.setSize(t.width+4,t.height+8)),n}})}},e[45]={value:function(t){var r=e.r(34),i=[],n=e.r(47).resource,a=e.r(24),o=e.r(31),s=!1;return{ready:function(t,e){s||(s=!0,function(t){var e,i;t=r.Utils.extend({},n,t),/^(https?:)?\/\//.test(t.path)||(t.path=(e=t.path,(i=location.pathname.split("/")).length-=1,i=i.join("/")+"/",[location.protocol,"//",location.host,i,e.replace(/^\//,"")].join(""))),new a(document,t.path).mount(c)}(e)),i.push(t)}};function c(){r.Utils.each(i,(function(t){t(o)}))}}},e[46]={value:function(t){var r=e.r(34),i=e.r(6);return r.createClass("SignGroup",{base:r.Group,constructor:function(){this.callBase(),this.box=new r.Rect(0,0,0,0),this.type=i.UNKNOWN,this.addShape(this.box),this.zoom=1},setZoom:function(t){this.zoom=t},getZoom:function(){return this.zoom},setBoxSize:function(t,e){return this.box.setSize(t,e)},setBoxWidth:function(t){return this.box.setWidth(t)},setBoxHeight:function(t){return this.box.setHeight(t)},getType:function(){return this.type},getBaseHeight:function(){return this.getHeight()},getBaseWidth:function(){return this.getWidth()},addedCall:function(){}})}},e[47]={value:function(t){return{zoom:.66,font:{meanline:Math.round(19),baseline:Math.round(40),baseHeight:50,list:[e.r(29),e.r(27),e.r(28),e.r(26),e.r(30)]},resource:{path:"src/resource/"},func:{"ud-script":{lim:!0}}}}},e[48]={value:function(t){return window.kf={ResourceManager:e.r(45),Operator:e.r(41),Expression:e.r(21),CompoundExpression:e.r(19),TextExpression:e.r(22),EmptyExpression:e.r(20),CombinationExpression:e.r(12),FunctionExpression:e.r(14),FractionExpression:e.r(13),IntegrationExpression:e.r(15),RadicalExpression:e.r(16),ScriptExpression:e.r(17),SuperscriptExpression:e.r(9),SubscriptExpression:e.r(8),SummationExpression:e.r(18),BracketsExpression:e.r(11)},window.kf}};var r={"kf.start":48};!function(t){kity.Shape.getRenderBox,kity.extendClass(kity.Shape,{getFixRenderBox:function(){return this.getRenderBox(this.container.container)},getTranslate:function(){return this.transform.translate}});try{"kf.start",e.r([r["kf.start"]])}catch(t){console.log(t)}}()}()},317:(t,e,r)=>{var i=r(809).Z,n=r(282).default;!function(){var t={r:function(e){if(t[e].inited)return t[e].value;if("function"!=typeof t[e].value)return t[e].inited=!0,t[e].value;var r={exports:{}},i=t[e].value(null,r.exports,r);if(t[e].inited=!0,t[e].value=i,void 0!==i)return i;for(var n in r.exports)if(r.exports.hasOwnProperty(n))return t[e].inited=!0,t[e].value=r.exports,r.exports}};function e(t){return e="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},e(t)}function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function a(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function a(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function a(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function a(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}t[0]={value:function(t){var r={extend:function(t,n){var a=!1;if("boolean"==typeof t?(a=t,t=n,n=[].splice.call(arguments,2)):n=[].splice.call(arguments,1),!t)throw new Error("Utils: extend, target can not be empty");return r.each(n,(function(r){(r&&"object"===e(r)||"function"==typeof r)&&i(a,t,r)})),t},contains:function(t,e){return t.contains?t.contains(e):t.compareDocumentPosition?!!(16&t.compareDocumentPosition(e)):void 0},getRect:function(t){return t.getBoundingClientRect()},isArray:function(t){return t&&"[object Array]"==={}.toString.call(t)},isString:function(t){return"string"==typeof t},proxy:function(t,e){return function(){return t.apply(e,arguments)}},each:function(t,e){if(t)if("length"in t&&"number"==typeof t.length)for(var r=0,i=t.length;r<i&&!1!==e.call(null,t[r],r,t);r++);else for(var n in t)if(t.hasOwnProperty(n)&&!1===e.call(null,t[n],n,t))break}};function i(t,n,a,o){return(o|=0)>10?a:(o++,r.each(a,(function(a,s,c){t?!a||"object"!==e(a)&&"function"!=typeof a?n[s]=a:(n[s]=n[s]||(r.isArray(a)?[]:{}),n[s]=i(t,n[s],a,o)):n[s]=a})),n)}return r}},t[1]={value:function(e){return t.r(22).createClass("Component",{constructor:function(){}})}},t[2]={value:function(e,r,i){var n={},a=0,o=!0,s=t.r(3),c=t.r(0),u=function(t){var e=t.type,r=t.target,i=this.__kfe_eid,a=/^(?:before|after)/.test(e),s=n[i][e];if(!a&&(l.trigger(r,"before"+e),!1===o))return o=!0,!1;c.each(s,(function(e,i){if(e)return!1===e.call(r,t)?o=!1:void 0})),a||l.trigger(r,"after"+e)},l={addEvent:function(t,e,r){var i=!0,o=null;t.__kfe_eid||(i=!1,t.__kfe_eid=++a,n[t.__kfe_eid]={}),(o=n[t.__kfe_eid])[e]||(i=!1,o[e]=[]),o[e].push(r),i||t.addEventListener(e,u,!1)},trigger:function(t,e,r){r=r||s.createEvent(e,r),t.dispatchEvent(r)}};return l}},t[3]={value:function(t){return{createEvent:function(t,e){var r=document.createEvent("Event");return r.initEvent(t,!0,!0),r}}}},t[4]={value:function(e){var r={},i=t.r(0);return i.extend(r,i,t.r(2)),r}},t[5]={value:function(){return window.bundle}},t[6]={value:function(e){var r=t.r(22),i=t.r(9);return r.createClass("ControllerComponent",{constructor:function(t){this.kfEditor=t,this.components={},this.initComponents()},initComponents:function(){this.components.listener=new i(this,this.kfEditor)}})}},t[7]={value:function(t){var e={32:"\\,","s+219":"\\{","s+221":"\\}",220:"\\backslash","s+51":"\\#","s+52":"\\$","s+53":"\\%","s+54":"\\^","s+55":"\\&","s+189":"\\_","s+192":"\\~"};return{getReplaceString:function(t){return e[t]||null}}}},t[8]={value:function(e,r,i){var n=t.r(22),a=t.r(4),o=t.r(7);return n.createClass("InputComponent",{constructor:function(t,e){this.parentComponent=t,this.kfEditor=e,this.inputBox=this.createInputBox(),this.initServices(),this.initCommands(),this.initEvent()},initServices:function(){this.kfEditor.registerService("control.update.input",this,{updateInput:this.updateInput}),this.kfEditor.registerService("control.insert.string",this,{insertStr:this.insertStr}),this.kfEditor.registerService("control.delete.string",this,{deleteStr:this.deleteStr})},initCommands:function(){this.kfEditor.registerCommand("focus",this,this.focus)},createInputBox:function(){var t=this.kfEditor.getContainer(),e=this.kfEditor.getDocument().createElement("input");return e.className="kf-editor-input-box",e.inputmode="none",e.setAttribute("inputmode","none"),e.type="text",e.isTrusted=!1,t.appendChild(e),e},focus:function(t){var e=null;this.inputBox.focus(),this.kfEditor.requestService("syntax.has.cursor.info")&&!t||(e=this.kfEditor.requestService("syntax.get.root.group.info"),this.kfEditor.requestService("syntax.update.record.cursor",{groupId:e.id,startOffset:0,endOffset:e.content.length}),this.kfEditor.requestService("control.update.input")),this.kfEditor.requestService("control.reselect")},setUntrusted:function(){this.inputBox.isTrusted=!1},setTrusted:function(){this.inputBox.isTrusted=!0},updateInput:function(){var t=this.kfEditor.requestService("syntax.serialization");this.setUntrusted(),this.inputBox.value=t.str,this.inputBox.selectionStart=t.startOffset,this.inputBox.selectionEnd=t.endOffset,this.inputBox.focus(),this.setTrusted()},insertStr:function(t){var e=this.kfEditor.requestService("syntax.serialization"),r=e.str;r=r.substring(0,e.startOffset)+" "+t+" "+r.substring(e.endOffset),this.restruct(r),this.updateInput(),this.kfEditor.requestService("ui.update.canvas.view")},initEvent:function(){var t=this;a.addEvent(this.inputBox,"keydown",(function(e){var r=!1;if(e.ctrlKey)t.processUserCtrl(e);else{switch(e.keyCode){case 229:return;case 46:return void e.preventDefault();case 37:e.preventDefault(),t.leftMove(),r=!0;break;case 39:e.preventDefault(),t.rightMove(),r=!0;break;case 8:e.preventDefault(),t.delete(),r=!0}r&&t.kfEditor.requestService("ui.update.canvas.view"),t.pretreatmentInput(e)||e.preventDefault()}})),a.addEvent(this.inputBox,"input",(function(e){t.processingInput()})),a.addEvent(this.inputBox,"blur",(function(e){t.kfEditor.requestService("control.cursor.hide"),t.kfEditor.requestService("render.clear.select")})),a.addEvent(this.inputBox,"focus",(function(e){this.isTrusted&&t.kfEditor.requestService("control.reselect")})),a.addEvent(this.inputBox,"paste",(function(t){t.preventDefault()}))},hasRootplaceholder:function(){return this.kfEditor.requestService("syntax.has.root.placeholder")},leftMove:function(){this.hasRootplaceholder()||(this.kfEditor.requestService("syntax.cursor.move.left"),this.update())},rightMove:function(){this.hasRootplaceholder()||(this.kfEditor.requestService("syntax.cursor.move.right"),this.update())},delete:function(){this.hasRootplaceholder()||(this.kfEditor.requestService("syntax.delete.group")?(this.updateInput(),this.processingInput()):(this.updateInput(),this.kfEditor.requestService("control.reselect")))},processUserCtrl:function(t){switch(t.preventDefault(),t.keyCode){case 65:this.kfEditor.requestService("control.select.all");break;case 83:this.kfEditor.requestService("print.image")}},pretreatmentInput:function(t){var e=this.getKeyCode(t),r=o.getReplaceString(e);return null===r||(this.insertStr(r),!1)},getKeyCode:function(t){return(t.shiftKey?"s+":"")+t.keyCode},processingInput:function(){this.restruct(this.inputBox.value),this.kfEditor.requestService("ui.update.canvas.view")},restruct:function(t){this.kfEditor.requestService("render.draw",t),this.kfEditor.requestService("control.reselect")},update:function(){this.updateInput(),this.kfEditor.requestService("control.reselect")},deleteStr:function(){this.delete()}})}},t[9]={value:function(e,r,i){var n=t.r(22),a=t.r(10),o=t.r(8),s=t.r(11);return n.createClass("MoveComponent",{constructor:function(t,e){this.parentComponent=t,this.kfEditor=e,this.components={},this.initComponents()},initComponents:function(){this.components.location=new a(this,this.kfEditor),this.components.selection=new s(this,this.kfEditor),this.components.input=new o(this,this.kfEditor)}})}},t[10]={value:function(e,r,i){var n=t.r(22);return n.createClass("LocationComponent",{constructor:function(t,e){this.parentComponent=t,this.kfEditor=e,this.paper=this.getPaper(),this.cursorShape=this.createCursor(),this.initServices(),this.initEvent()},getPaper:function(){return this.kfEditor.requestService("render.get.paper")},initServices:function(){this.kfEditor.registerService("control.cursor.relocation",this,{relocationCursor:this.updateCursor}),this.kfEditor.registerService("control.cursor.hide",this,{hideCursor:this.hideCursor}),this.kfEditor.registerService("control.reselect",this,{reselect:this.reselect}),this.kfEditor.registerService("control.get.cursor.location",this,{getCursorLocation:this.getCursorLocation})},createCursor:function(){var t=new n.Rect(1,0,0,0).fill("black");return t.setAttr("style","display: none"),this.paper.addShape(t),t},initEvent:function(){var t=this.kfEditor.request("ui.canvas.container.event"),e=this;t.on("mousedown",(function(t){t.preventDefault(),e.updateCursorInfo(t),e.kfEditor.requestService("control.update.input"),e.reselect()}))},updateCursorInfo:function(t){var e,r,i=null;return this.kfEditor.requestService("syntax.has.root.placeholder")?(this.kfEditor.requestService("syntax.update.record.cursor",{groupId:this.kfEditor.requestService("syntax.get.root.group.info").id,startOffset:0,endOffset:1}),!1):(e=this.kfEditor.requestService("position.get.wrap",t.target))&&this.kfEditor.requestService("syntax.is.placeholder.node",e.id)?(i=this.kfEditor.requestService("position.get.group.info",e),void this.kfEditor.requestService("syntax.update.record.cursor",i.group.id,i.index,i.index+1)):(null===(i=this.kfEditor.requestService("position.get.group",t.target))&&(i=this.kfEditor.requestService("syntax.get.root.group.info")),r=this.getIndex(t.clientX,i),void this.kfEditor.requestService("syntax.update.record.cursor",i.id,r))},hideCursor:function(){this.cursorShape.setAttr("style","display: none")},reselect:function(){var t=this.kfEditor.requestService("syntax.get.record.cursor"),e=null;if(this.hideCursor(),this.kfEditor.requestService("syntax.is.select.placeholder"))return e=this.kfEditor.requestService("syntax.get.group.content",t.groupId),void this.kfEditor.requestService("render.select.group",e.content[t.startOffset].id);t.startOffset===t.endOffset?(this.updateCursor(),this.kfEditor.requestService("render.tint.current.cursor")):this.kfEditor.requestService("render.select.current.cursor")},updateCursor:function(){var t=this.kfEditor.requestService("syntax.get.record.cursor");if(t.startOffset===t.endOffset){var e=this.kfEditor.requestService("syntax.get.group.content",t.groupId),r=0===t.endOffset,i=r?0:t.endOffset-1,n=e.content[i],o=a(this.paper.container.node),s=0,c=a(n),u=this.cursorShape.getTransform(this.cursorShape),l=this.kfEditor.requestService("render.get.canvas.zoom"),h=this.paper.getZoom();this.cursorShape.setHeight(c.height/l/h),s=r?c.left-2:c.left+c.width-2,s-=o.left,u.m.e=Math.floor(s/l/h)+.5,u.m.f=(c.top-o.top)/l/h,this.cursorShape.setMatrix(u),this.cursorShape.setAttr("style","display: block")}else this.hideCursor()},getCursorLocation:function(){var t=this.cursorShape.getRenderBox("paper");return{x:t.x,y:t.y}},getIndex:function(t,e){for(var r=-1,i=e.content,n=null,o=i.length-1;o>=0;o--)if(r=o,(n=a(i[o])).left<t){n.left+n.width/2<t&&(r+=1);break}return r}});function a(t){return t.getBoundingClientRect()}}},t[11]={value:function(e,r,i){var n=t.r(22),a=t.r(4);return n.createClass("SelectionComponent",{constructor:function(t,e){this.parentComponent=t,this.kfEditor=e,this.isDrag=!1,this.isMousedown=!1,this.startPoint={x:-1,y:-1},this.startGroupIsPlaceholder=!1,this.startGroup={},this.initServices(),this.initEvent()},initServices:function(){this.kfEditor.registerService("control.select.all",this,{selectAll:this.selectAll})},initEvent:function(){var t=this.kfEditor.request("ui.canvas.container.event"),e=this;t.on("mousedown",(function(t){if(t.preventDefault(),e.kfEditor.requestService("syntax.has.root.placeholder"))return!1;e.isMousedown=!0,e.updateStartPoint(t.clientX,t.clientY),e.updateStartGroup()})),t.on("mouseup",(function(t){t.preventDefault(),e.stopUpdateSelection()})),t.on("mousemove",(function(t){if(t.preventDefault(),e.isDrag){if(1!==t.which)return void e.stopUpdateSelection();e.updateSelection(t.target,t.clientX,t.clientY)}else e.isMousedown&&10<e.getDistance(t.clientX,t.clientY)&&(e.kfEditor.requestService("control.cursor.hide"),e.startUpdateSelection())})),t.on("dblclick",(function(t){e.updateSelectionByTarget(t.target)}))},getDistance:function(t,e){var r=Math.abs(t-this.startPoint.x),i=Math.abs(e-this.startPoint.y);return Math.max(r,i)},updateStartPoint:function(t,e){this.startPoint.x=t,this.startPoint.y=e},updateStartGroup:function(){var t=this.kfEditor.requestService("syntax.get.record.cursor");this.startGroupIsPlaceholder=this.kfEditor.requestService("syntax.is.select.placeholder"),this.startGroup={groupInfo:this.kfEditor.requestService("syntax.get.group.content",t.groupId),offset:t.startOffset}},startUpdateSelection:function(){this.isDrag=!0,this.isMousedown=!1,this.clearSelection()},stopUpdateSelection:function(){this.isDrag=!1,this.isMousedown=!1,this.kfEditor.requestService("control.update.input")},clearSelection:function(){this.kfEditor.requestService("render.clear.select")},updateSelection:function(t,e,r){var i=e>this.startPoint.x,n={},o=null,s=this.startGroup,c=null,u=this.getGroupInof(e,t);u.groupInfo.id===s.groupInfo.id?(n={groupId:u.groupInfo.id,startOffset:s.offset,endOffset:u.offset},this.startGroupIsPlaceholder&&(i?n.startOffset===n.endOffset&&(n.endOffset+=1):n.startOffset+=1)):a.contains(s.groupInfo.groupObj,u.groupInfo.groupObj)?n={groupId:s.groupInfo.id,startOffset:s.offset,endOffset:this.getIndex(s.groupInfo.groupObj,t,e)}:a.contains(u.groupInfo.groupObj,s.groupInfo.groupObj)?(n={groupId:u.groupInfo.id,startOffset:this.kfEditor.requestService("position.get.index",u.groupInfo.groupObj,s.groupInfo.groupObj),endOffset:u.offset},i||(n.startOffset+=1)):((o=this.getCommunityGroup(s.groupInfo,u.groupInfo)).startOffset===o.endOffset?o.endOffset+=1:(c=o.group.content[o.endOffset],this.kfEditor.requestService("position.get.area",c,e)&&(o.endOffset+=1),i||(o.startOffset+=1)),n={groupId:o.group.id,startOffset:o.startOffset,endOffset:o.endOffset}),this.kfEditor.requestService("syntax.update.record.cursor",n.groupId,n.startOffset,n.endOffset),this.kfEditor.requestService("control.reselect")},updateSelectionByTarget:function(t){var e=this.kfEditor.requestService("position.get.parent.group",t),r=null,i={};null!==e&&(this.kfEditor.requestService("syntax.is.root.node",e.id)?this.selectAll():(i=this.kfEditor.requestService("syntax.is.virtual.node",e.id)?{groupId:(r=this.kfEditor.requestService("position.get.group.info",e.groupObj)).group.id,startOffset:r.index,endOffset:r.index+1}:{groupId:e.id,startOffset:0,endOffset:e.content.length},this.kfEditor.requestService("syntax.update.record.cursor",i),this.kfEditor.requestService("control.reselect"),this.kfEditor.requestService("control.update.input")))},selectAll:function(){var t=this.kfEditor.requestService("syntax.get.root.group.info"),e={groupId:t.id,startOffset:0,endOffset:t.content.length};this.kfEditor.requestService("syntax.update.record.cursor",e),this.kfEditor.requestService("control.reselect"),this.kfEditor.requestService("control.update.input")},getGroupInof:function(t,e){var r=this.kfEditor.requestService("position.get.group",e);return null===r&&(r=this.kfEditor.requestService("syntax.get.root.group.info")),{groupInfo:r,offset:this.kfEditor.requestService("position.get.location.info",t,r)}},getIndex:function(t,e,r){var i=this.kfEditor.requestService("position.get.index",t,e),n=this.kfEditor.requestService("syntax.get.group.content",t.id).content[i],o=a.getRect(n);return o.left+o.width/2<r&&(i+=1),i},getCommunityGroup:function(t,e){for(var r,i=null,n=t.groupObj;(i=this.kfEditor.requestService("position.get.group.info",n))&&(n=i.group.groupObj,!a.contains(i.group.groupObj,e.groupObj)););return r=i.group.groupObj,{group:i.group,startOffset:i.index,endOffset:this.kfEditor.requestService("position.get.index",r,e.groupObj)}}})}},t[12]={value:function(){return{GROUP:"kf-editor-group",VIRTUAL:"kf-editor-virtual-group"}}},t[13]={value:function(e){return t.r(22).createClass("Messager",{constructor:function(){},getCheckServiceType:function(){return"common.requestFunctions"},onReceiveMessage:function(t){document.addEventListener("documentMessage",(function(e){e.detail&&e.detail.headers&&t(e.detail)}))},sendAction:function(t){var e=t.type,r=t.headers,i=t.data,n=new CustomEvent("documentMessage",{detail:{type:e,headers:r,data:i}});document.dispatchEvent(n)}})}},t[14]={value:function(e){var r=t.r(22),a=t.r(4),o=(t.r(5),t.r(13)),s={formula:{fontsize:50,autoresize:!1},ui:{zoom:!0,maxzoom:2,minzoom:1}},c={},u=t.r(21).ResourceManager,l=r.createClass("KFEditor",{constructor:function(t,e){this.options=a.extend(!0,{},s,e),this.FormulaClass=null,this._readyState=!1,this._callbacks=[],this.container=t,this.services={},this.commands={},this.initResource(),this.initWebService()},isReady:function(){return!!this._readyState},triggerReady:function(){for(var t=null;t=this._callbacks.shift();)t.call(this,this)},ready:function(t){this._readyState?t.call(this,this):this._callbacks.push(t)},getContainer:function(){return this.container},getDocument:function(){return this.container.ownerDocument},getFormulaClass:function(){return this.FormulaClass},getOptions:function(){return this.options},initResource:function(){var t=this;u.ready((function(e){t.FormulaClass=e,t.initComponents(),t._readyState=!0,t.triggerReady()}),this.options.resource)},initWebService:function(){var t=this;"webview"===this.options.ui.protocol?this.eclassWebService=new i("webview"):"iframe"===this.options.ui.protocol?this.eclassWebService=new i("iframe"):"documentEvent"===this.options.ui.protocol&&(this.eclassWebService=new n({messager:new o})),this.eclassWebService.on("common.readFormula",(function(e){e.body.formula&&t.execCommand("render",e.body.formula),t.execCommand("focus",!0)})),this.eclassWebService.on("common.clearFormula",(function(){t.execCommand("render","\\placeholder"),t.execCommand("menu.clearType")})),this.registerCommand("ready",this,(function(){this.eclassWebService.send({type:"common.ready"})}))},initComponents:function(){var t=this;a.each(c,(function(e,r){new e(t,t.options[r])}))},requestService:function(t,e){var r=h.call(this,t);return r.service[r.key].apply(r.provider,[].slice.call(arguments,1))},request:function(t){return h.call(this,t).service},registerService:function(t,e,r){var i=null;for(i in r)r[i]&&r.hasOwnProperty(i)&&(r[i]=a.proxy(r[i],e));this.services[t]={provider:e,key:i,service:r}},registerCommand:function(t,e,r){this.commands[t]={executor:e,execFn:r}},execCommand:function(t,e){console.log("[execCommand]",t);var r=this.commands[t];if(!r)throw new Error("KFEditor: not found command, "+t);return r.execFn.apply(r.executor,[].slice.call(arguments,1))}});function h(t){var e=this.services[t];if(!e)throw new Error("KFEditor: not found service, "+t);return e}return a.extend(l,{registerComponents:function(t,e){c[t]=e}}),l}},t[15]={value:function(e){var r=t.r(22),i=t.r(14);function n(t,e){var r=this;this._callbacks=[],this.editor=new i(t,e),this.editor.ready((function(){r._trigger()}))}return n.prototype._trigger=function(){var t=this.editor;r.Utils.each(this._callbacks,(function(e){e.call(t,t)}))},n.prototype.ready=function(t){this.editor.isReady()?t.call(this.editor,this.editor):this._callbacks.push(t)},{create:function(t,e){return new n(t,e)}}}},t[16]={value:function(){return window.jQuery}},t[17]={value:function(){return{selectColor:"rgba(42, 106, 189, 0.6)",allSelectColor:"rgba(42, 106, 189, 0.6)"}}},t[18]={value:function(e,r,i){var n=t.r(22),a=t.r(21),o=t.r(20);return n.createClass("PlaceholderExpression",{base:a.CompoundExpression,constructor:function(){this.callBase(),this.setFlag("Placeholder"),this.label=null,this.box.setAttr("data-type",null),this.setOperator(new o)},setLabel:function(t){this.label=t},getLabel:function(){return this.label},setAttr:function(t,e){"label"===t?this.setLabel(e):(t.label&&(this.setLabel(t.label),delete t.label),this.callBase(t,e))},select:function(){this.getOperator().select()},selectAll:function(){this.getOperator().selectAll()},unselect:function(){this.getOperator().unselect()}})}},t[19]={value:function(e){var r=t.r(21),i=t.r(17).selectColor,n=t.r(17).allSelectColor;return{ext:function(e){r.PlaceholderExpression=t.r(18),r.Expression.prototype.select=function(){this.box.fill(i)},r.Expression.prototype.selectAll=function(){this.box.fill(n)},r.Expression.prototype.unselect=function(){this.box.fill("transparent")},e.getKFParser().expand({parse:{placeholder:{name:"placeholder",handler:function(t){return delete t.handler,t.operand=[],t},sign:!1}},reverse:{placeholder:function(){return"\\placeholder "}}})}}}},t[20]={value:function(e,r,i){var n=t.r(22),a=t.r(17).selectColor,o=t.r(17).allSelectColor;return n.createClass("PlaceholderOperator",{base:t.r(21).Operator,constructor:function(){this.opShape=null,this.callBase("Placeholder")},applyOperand:function(){this.opShape=(this,null!==this.parentExpression.getLabel()?function(t,e){var r=new n.Rect(1,50,0,0).fill("#000");return r.setAttr("style","display: block"),t.addOperatorShape(r),r}(this):function(t){var e=null;return(e=new n.Rect(35,50,0,0).stroke("black").fill("transparent")).setAttr("stroke-dasharray","5, 5"),t.addOperatorShape(e),e}(this)),this.parentExpression.expand(20,20),this.parentExpression.translateElement(10,10)},select:function(){var t=!!this.parentExpression.getLabel();this.opShape.fill(t?"#000":a)},selectAll:function(){this.opShape.fill(o)},unselect:function(){this.opShape.fill("transparent")}})}},t[21]={value:function(){return window.kf}},t[22]={value:function(){return window.kity}},t[23]={value:function(e){var r=t.r(21).Parser,i=t.r(22),n=t.r(31).cursorCharacter,a=t.r(24),o=t.r(31).rootPlaceholder.content,s=t.r(12),c=0;function u(t,e,r){var i=null,a=!r;e.attr=e.attr||{},e.attr.id=t.getGroupId(),a?function(t,e){t.isResetId?e.attr["data-root"]="true":e.attr["data-type"]=s.VIRTUAL}(t,e):r.attr["data-root"]&&"placeholder"===e.name&&function(t){var e=1;if(t.length>3)return!1;for(var r=0,i=t.length;r<i;r++)t[r]!==n&&t[r]&&"placeholder"===t[r].name&&e--;return!e}(r.operand)&&(e.attr.label=o);for(var c=0,u=e.operand.length;c<u;c++)i=e.operand[c],f(e)?l(t,c,e,i):h(t,c,e,i);return e}function l(t,e,r,i){"brackets"===r.name&&e<2||"function"===r.name&&0===e||(r.attr["data-type"]=s.VIRTUAL,i?"string"==typeof i?(r.operand[e]=p(t),r.operand[e].operand[0]=i):function(t){return"placeholder"===t.name}(i)?(r.operand[e]=p(t),r.operand[e].operand[0]=u(t,i,r.operand[e])):r.operand[e]=u(t,i,r):r.operand[e]=i)}function h(t,e,r,i){r.attr["data-type"]=s.GROUP,i&&"string"!=typeof i?"text"===i.name?r.operand[e]=i:r.operand[e]=u(t,i,r):r.operand[e]=i}function f(t){return!!a[t.name]}function p(t){return{name:"combination",attr:{"data-type":s.GROUP,id:t.getGroupId()},operand:[]}}return i.createClass("Parser",{constructor:function(t){this.kfEditor=t,this.callBase(),this.kfParser=r.use("latex"),this.initKFormulExtension(),this.pid="_kf_editor_"+ ++c,this.groupRecord=0,this.tree=null,this.isResetId=!0,this.initServices()},parse:function(t,e){var r;return this.isResetId=!!e,this.isResetId&&this.resetGroupId(),u(this,(r=this.kfParser.parse(t)).tree),r},serialization:function(t){return this.kfParser.serialization(t)},initServices:function(){this.kfEditor.registerService("parser.parse",this,{parse:this.parse}),this.kfEditor.registerService("parser.latex.serialization",this,{serialization:this.serialization})},getKFParser:function(){return this.kfParser},initKFormulExtension:function(){t.r(19).ext(this)},resetGroupId:function(){this.groupRecord=0},getGroupId:function(){return this.pid+"_"+ ++this.groupRecord}})}},t[24]={value:function(){return{radical:!0,fraction:!0,summation:!0,integration:!0,placeholder:!0,script:!0,superscript:!0,subscript:!0,brackets:!0,function:!0}}},t[25]={value:function(e){var r=t.r(22),i=t.r(4);function n(t,e,r){var i;return t.ownerSVGElement?(i=(t=t.parentNode).tagName.toLowerCase(),t&&"body"!==i&&"svg"!==i?"kf-editor-group"===t.getAttribute("data-type")||e&&"kf-editor-virtual-group"===t.getAttribute("data-type")||r&&null!==t.getAttribute("data-flag")?t:n(t,e,r):null):null}return r.createClass("PositionComponenet",{constructor:function(t){this.kfEditor=t,this.initServices()},initServices:function(){this.kfEditor.registerService("position.get.group",this,{getGroupByTarget:this.getGroupByTarget}),this.kfEditor.registerService("position.get.index",this,{getIndexByTargetInGroup:this.getIndexByTargetInGroup}),this.kfEditor.registerService("position.get.location.info",this,{getLocationInfo:this.getLocationInfo}),this.kfEditor.registerService("position.get.parent.group",this,{getParentGroupByTarget:this.getParentGroupByTarget}),this.kfEditor.registerService("position.get.wrap",this,{getWrap:this.getWrap}),this.kfEditor.registerService("position.get.area",this,{getAreaByCursorInGroup:this.getAreaByCursorInGroup}),this.kfEditor.registerService("position.get.group.info",this,{getGroupInfoByNode:this.getGroupInfoByNode}),this.kfEditor.registerService("position.get.parent.info",this,{getParentInfoByNode:this.getParentInfoByNode})},getGroupByTarget:function(t){var e=n(t,!1,!1);return e?this.kfEditor.requestService("syntax.get.group.content",e.id):null},getIndexByTargetInGroup:function(t,e){var n=this.kfEditor.requestService("syntax.get.group.content",t.id),a=-1;return r.Utils.each(n.content,(function(t,r){if(a=r,i.contains(t,e))return!1})),a},getAreaByCursorInGroup:function(t,e){var r=i.getRect(t);return r.left+r.width/2<e},getLocationInfo:function(t,e){for(var r=-1,n=e.content,a=null,o=n.length-1,s=null;o>=0;o--)if(r=o,s=n[o],(a=i.getRect(s)).left<t){a.left+a.width/2<t&&(r+=1);break}return r},getParentGroupByTarget:function(t){var e=n(t,!0,!1);return e?this.kfEditor.requestService("syntax.get.group.content",e.id):null},getWrap:function(t){return n(t,!0,!0)},getGroupInfoByNode:function(t){var e,r={},a=n(t,!1,!1);if(!a)return null;for(var o=0,s=(e=this.kfEditor.requestService("syntax.get.group.content",a.id)).content.length;o<s&&(r.index=o,!i.contains(e.content[o],t));o++);return r.group=e,r},getParentInfoByNode:function(t){var e=n(t,!0,!1);return{group:e=this.kfEditor.requestService("syntax.get.group.content",e.id),index:e.content.indexOf(t)}}})}},t[26]={value:function(e){return t.r(22).createClass("Printer",{constructor:function(t){this.kfEditor=t,this.initServices(),this.initCommands()},initServices:function(){this.kfEditor.registerService("print.image",this,{printImage:this.printImage})},initCommands:function(){this.kfEditor.registerCommand("get.image.data",this,this.getImageData)},printImage:function(t){var e=this.kfEditor.requestService("render.get.paper");this._formatCanvas(),e.toPNG((function(t){document.body.innerHTML='<img style="background: red;" src="'+t+'">'})),this._restoreCanvas()},getImageData:function(t){var e=this.kfEditor.requestService("render.get.canvas"),r=this.kfEditor.requestService("render.get.paper");this._formatCanvas(),r.toPNG((function(r){t({width:e.width,height:e.height,img:r})})),this._restoreCanvas()},_formatCanvas:function(){var t=this.kfEditor.requestService("render.get.canvas"),e=t.container.getRenderBox();t.node.setAttribute("width",e.width),t.node.setAttribute("height",e.height),this.kfEditor.requestService("render.clear.canvas.transform"),this.kfEditor.requestService("control.cursor.hide"),this.kfEditor.requestService("render.clear.select")},_restoreCanvas:function(){var t=this.kfEditor.requestService("render.get.canvas");t.node.setAttribute("width","100%"),t.node.setAttribute("height","100%"),this.kfEditor.requestService("render.revert.canvas.transform"),this.kfEditor.requestService("control.cursor.relocation"),this.kfEditor.requestService("render.reselect")}})}},t[27]={value:function(e){var r=t.r(22),i=t.r(21).Assembly,n={autoresize:!1,fontsize:50,padding:[0,5]};return r.createClass("RenderComponent",{base:t.r(1),constructor:function(t,e){this.callBase(),this.options=r.Utils.extend({},n,e),this.kfEditor=t,this.assembly=null,this.formula=null,this.relDisabled=!0,this.canvasZoom=1,this.record={select:{},cursor:{},canvas:{}},this.initCanvas(),this.initServices(),this.initCommands()},initCanvas:function(){var t=this.kfEditor.requestService("ui.get.canvas.container"),e=this.kfEditor.getFormulaClass();this.assembly=new i(new e(t,this.options)),this.formula=this.assembly.formula,this.setCanvasToCenter()},setCanvasOffset:function(t,e){var r=this.formula.getViewBox();e=void 0!==e?e:-r.height/2,this.formula.setViewBox(t,e,r.width,r.height)},setCanvasToCenter:function(){var t=this.formula.getViewBox();this.formula.setViewBox(-t.width/2,-t.height/2,t.width,t.height)},initServices:function(){this.kfEditor.registerService("render.get.canvas",this,{getCanvas:this.getCanvas}),this.kfEditor.registerService("render.get.content.size",this,{getContentSize:this.getContentSize}),this.kfEditor.registerService("render.clear.canvas.transform",this,{clearCanvasOffset:this.clearCanvasTransform}),this.kfEditor.registerService("render.set.canvas.offset",this,{setCanvasOffset:this.setCanvasOffset}),this.kfEditor.registerService("render.set.canvas.to.center",this,{setCanvasToCenter:this.setCanvasToCenter}),this.kfEditor.registerService("render.revert.canvas.transform",this,{revertCanvasTransform:this.revertCanvasTransform}),this.kfEditor.registerService("render.relocation",this,{relocation:this.relocation}),this.kfEditor.registerService("render.disable.relocation",this,{disableRelocation:this.disableRelocation}),this.kfEditor.registerService("render.enable.relocation",this,{enableRelocation:this.enableRelocation}),this.kfEditor.registerService("render.select.group.content",this,{selectGroupContent:this.selectGroupContent}),this.kfEditor.registerService("render.select.group",this,{selectGroup:this.selectGroup}),this.kfEditor.registerService("render.select.group.all",this,{selectAllGroup:this.selectAllGroup}),this.kfEditor.registerService("render.tint.current.cursor",this,{tintCurrentGroup:this.tintCurrentGroup}),this.kfEditor.registerService("render.select.current.cursor",this,{selectCurrentCursor:this.selectCurrentCursor}),this.kfEditor.registerService("render.reselect",this,{reselect:this.reselect}),this.kfEditor.registerService("render.clear.select",this,{clearSelect:this.clearSelect}),this.kfEditor.registerService("render.set.canvas.zoom",this,{setCanvasZoom:this.setCanvasZoom}),this.kfEditor.registerService("render.get.canvas.zoom",this,{getCanvasZoom:this.getCanvasZoom}),this.kfEditor.registerService("render.get.paper.offset",this,{getPaperOffset:this.getPaperOffset}),this.kfEditor.registerService("render.draw",this,{render:this.render}),this.kfEditor.registerService("render.insert.string",this,{insertString:this.insertString}),this.kfEditor.registerService("render.insert.group",this,{insertGroup:this.insertGroup}),this.kfEditor.registerService("render.get.paper",this,{getPaper:this.getPaper})},initCommands:function(){this.kfEditor.registerCommand("render",this,(function(t){this.render(t),this.kfEditor.requestService("ui.update.canvas.view")})),this.kfEditor.registerCommand("getPaper",this,this.getPaper)},relocation:function(){this.relDisabled?this.relocationToLeft():this.relocationToCenter()},relocationToCenter:function(){var t=this.formula.container.getRenderBox();this.formula.container.setTranslate(-t.width/2,-t.height/2),this.setCanvasToCenter()},relocationToLeft:function(){var t=this.formula.container.getRenderBox();this.formula.container.setTranslate(0,-t.height/2),this.setCanvasOffset(0)},selectGroup:function(t){var e=this.kfEditor.requestService("syntax.get.group.object",t);this.clearSelect(),e.node.getAttribute("data-root")||(this.record.select.lastSelect=e,e.select())},selectGroupContent:function(t){null!==t.groupObj.getAttribute("data-placeholder")&&(t={id:t.content[0].id});var e=this.kfEditor.requestService("syntax.get.group.object",t.id);this.clearSelect(),this.record.select.lastSelect=e,e.node.getAttribute("data-root")||e.select()},selectAllGroup:function(t){null!==t.groupObj.getAttribute("data-placeholder")&&(t={id:t.content[0].id});var e=this.kfEditor.requestService("syntax.get.group.object",t.id);this.clearSelect(),this.record.select.lastSelect=e,e.selectAll()},selectCurrentCursor:function(){var t=this.kfEditor.requestService("syntax.get.record.cursor"),e=this.kfEditor.requestService("syntax.get.group.object",t.groupId),r=null,i=-1,n=0,a=Math.min(t.startOffset,t.endOffset),o=Math.max(t.startOffset,t.endOffset);this.clearSelect(),this.record.select.lastSelect=e;for(var s=a,c=o;s<c;s++)r=e.getOperand(s).getRenderBox(e),-1==i&&(i=r.x),n+=r.width;e.setBoxWidth(n),e.selectAll(),e.getBox().setTranslate(i,0)},tintCurrentGroup:function(){var t=this.kfEditor.requestService("syntax.get.record.cursor").groupId,e=this.kfEditor.requestService("syntax.get.group.object",t),r=this.kfEditor.requestService("syntax.is.placeholder.node",t);this.clearSelect(),e.node.getAttribute("data-root")||(r&&(e=this.kfEditor.requestService("syntax.get.group.object",e.operands[0].node.id)),this.record.select.lastSelect=e,e.select())},reselect:function(){var t=this.kfEditor.requestService("syntax.get.record.cursor"),e=null;e=this.kfEditor.requestService("syntax.get.group.object",t.groupId),this.clearSelect(),this.record.select.lastSelect=e,e.node.getAttribute("data-root")||e.select()},clearSelect:function(){var t,e=this.record.select.lastSelect;e&&e.node.ownerSVGElement&&(e.unselect(),t=e.getRenderBox(e),e.setBoxWidth(t.width),e.getBox().setTranslate(0,0))},getPaper:function(){return this.formula},render:function(t){var e=this.kfEditor.requestService("parser.parse",t,!0),r=this.assembly.regenerateBy(e);this.kfEditor.requestService("syntax.update.objtree",r)},enableRelocation:function(){},disableRelocation:function(){},setCanvasZoom:function(t){var e=this.formula.getViewPort();this.canvasZoom=t,e.zoom=t,this.formula.setViewPort(e)},getCanvas:function(){return this.formula},getContentSize:function(){return this.formula.container.getRenderBox()},clearCanvasTransform:function(){var t=this.record.canvas;t.viewBox=this.formula.getViewBox(),t.contentOffset=this.formula.container.getTranslate(),this.setCanvasToCenter(),this.formula.node.removeAttribute("viewBox"),this.formula.container.setTranslate(0,0)},revertCanvasTransform:function(){var t=this.record.canvas,e=t.viewBox;if(!e)return!1;this.formula.setViewBox(e.x,e.y,e.width,e.height),this.formula.container.setTranslate(t.contentOffset),t.viewBox=null,t.contentOffset=null},getCanvasZoom:function(){return this.canvasZoom}})}},t[28]={value:function(e,r,i){return t.r(22).createClass("DeleteComponent",{constructor:function(t,e){this.parentComponent=t,this.kfEditor=e},deleteGroup:function(){var t=this.parentComponent.getCursorRecord(),e=this.parentComponent.getObjectTree().mapping[t.groupId].strGroup;return t.startOffset!==t.endOffset?this.parentComponent.isSelectPlaceholder()?(this.parentComponent.isRootTree(e)||(t=this.selectParentContainer(t.groupId),this.parentComponent.updateCursor(t)),!1):this.deleteSelection(e,t):0===t.startOffset?(this.parentComponent.isRootTree(e)||(t=this.selectParentContainer(t.groupId),this.parentComponent.updateCursor(t)),!1):e.operand.length>1?(t=this.deletePrevGroup(e,t),this.parentComponent.updateCursor(t),t.startOffset===t.endOffset):(t.startOffset=0,t.endOffset=1,e.operand[0].attr&&this.parentComponent.isGroupNode(e.operand[0].attr.id)?(this.parentComponent.updateCursor(t),!1):(e.operand[0]={name:"placeholder",operand:[]},this.parentComponent.updateCursor(t),!0))},deletePrevGroup:function(t,e){var r=e.startOffset-1,i=t.operand[r];return this.parentComponent.isLeafTree(i)?(t.operand.splice(r,1),e.startOffset-=1,e.endOffset-=1):e.startOffset-=1,e},deleteSelection:function(t,e){return 0===e.startOffset&&e.endOffset===t.operand.length?(t.operand.length=1,t.operand[0]={name:"placeholder",operand:[]},e.endOffset=1):(t.operand.splice(e.startOffset,e.endOffset-e.startOffset),e.endOffset=e.startOffset),this.parentComponent.updateCursor(e),!0},selectParentContainer:function(t){var e=this.parentComponent.getGroupObject(t).node,r=this.kfEditor.requestService("position.get.group",e),i=this.kfEditor.requestService("position.get.index",r.groupObj,e);return{groupId:r.id,startOffset:i,endOffset:i+1}}})}},t[29]={value:function(e,r,i){var n=t.r(22),a="left",o="right";return n.createClass("MoveComponent",{constructor:function(t,e){this.parentComponent=t,this.kfEditor=e},leftMove:function(){var t=this.parentComponent.getCursorRecord();(t=s.call(this,t))&&this.parentComponent.updateCursor(t)},rightMove:function(){var t=this.parentComponent.getCursorRecord();(t=c.call(this,t))&&this.parentComponent.updateCursor(t)}});function s(t){var e,r=null,i=this.parentComponent;return e=i.getGroupContent(t.groupId),i.isSelectPlaceholder()?l(this,e.content[t.startOffset],a):(t.startOffset===t.endOffset?t.startOffset>0?v(r=e.content[t.startOffset-1])?t=u(this,r,a):(t.startOffset-=1,y(r)||(t.endOffset=t.startOffset)):t=l(this,e.groupObj,a):(t.startOffset=Math.min(t.startOffset,t.endOffset),t.endOffset=t.startOffset),t)}function c(t){var e,r=null,i=this.parentComponent;return e=i.getGroupContent(t.groupId),i.isSelectPlaceholder()?l(this,e.content[t.startOffset],o):(t.startOffset===t.endOffset?t.startOffset<e.content.length?v(r=e.content[t.startOffset])?t=u(this,r,o):(t.startOffset+=1,y(r)||(t.endOffset=t.startOffset)):t=l(this,e.groupObj,o):(t.endOffset=Math.max(t.startOffset,t.endOffset),t.startOffset=t.endOffset),t)}function u(t,e,r){switch(r){case a:return h(t,e);case o:return p(t,e)}throw new Error("undefined move direction!")}function l(t,e,r){switch(r){case a:return f(t,e);case o:return d(t,e)}throw new Error("undefined move direction!")}function h(t,e){var r=t.parentComponent,i=null,n=null;if(y(e)||b(e))return f(t,e);if(v(e)){if(b(n=(i=r.getGroupContent(e.id)).content[i.content.length-1]))return f(t,n);if(m(e))return y(n)?{groupId:e.id,startOffset:i.content.length-1,endOffset:i.content.length}:m(n)&&1===i.content.length?h(t,n):{groupId:e.id,startOffset:i.content.length,endOffset:i.content.length};for(;!m(n)&&!b(n)&&!y(n);)n=(i=r.getGroupContent(n.id)).content[i.content.length-1];return b(n)?f(t,n):y(n)?{groupId:n.id,startOffset:i.content.length,endOffset:i.content.length}:h(t,n)}return null}function f(t,e){var r=t.kfEditor,i=null;if(g(e))return null;for(i=r.requestService("position.get.parent.info",e);0===i.index;){if(g(i.group.groupObj))return{groupId:i.group.id,startOffset:0,endOffset:0};if(m(i.group.groupObj)&&i.group.content.length>1)return{groupId:i.group.id,startOffset:0,endOffset:0};i=r.requestService("position.get.parent.info",i.group.groupObj)}return m(i.group.groupObj)?{groupId:i.group.id,startOffset:i.index,endOffset:i.index}:v(e=i.group.content[i.index-1])?(m(e),h(t,e)):b(e)?f(t,e):{groupId:i.group.id,startOffset:i.index,endOffset:i.index}}function p(t,e){var r=t.parentComponent,i=null;if(v(e)){if(i=r.getGroupContent(e.id).content[0],m(e))return m(i)?p(t,i):y(i)?{groupId:e.id,startOffset:0,endOffset:1}:{groupId:e.id,startOffset:0,endOffset:0};for(;!m(i)&&!y(i)&&!b(i);)i=r.getGroupContent(i.id).content[0];return y(i)?{groupId:i.id,startOffset:0,endOffset:0}:b(i)?d(t,i):p(t,i)}return null}function d(t,e){var r=t.kfEditor,i=t.parentComponent,n=null,a=null;if(g(e))return null;for(n=r.requestService("position.get.parent.info",e);n.index===n.group.content.length-1;){if(g(n.group.groupObj))return{groupId:n.group.id,startOffset:n.group.content.length,endOffset:n.group.content.length};if(m(n.group.groupObj)&&n.group.content.length>1)return{groupId:n.group.id,startOffset:n.group.content.length,endOffset:n.group.content.length};n=r.requestService("position.get.parent.info",n.group.groupObj)}return b(e=n.group.content[n.index+1])?d(t,e):m(e)?(a=i.getGroupContent(e.id),i.isPlaceholder(a.content[0].id)?{groupId:e.id,startOffset:0,endOffset:1}:{groupId:e.id,startOffset:0,endOffset:0}):{groupId:n.group.id,startOffset:n.index+1,endOffset:n.index+1}}function g(t){return!!t.getAttribute("data-root")}function m(t){return"kf-editor-group"===t.getAttribute("data-type")}function v(t){var e=t.getAttribute("data-type");return"kf-editor-group"===e||"kf-editor-virtual-group"===e}function y(t){return"Placeholder"===t.getAttribute("data-flag")}function b(t){return"Empty"===t.getAttribute("data-flag")}}},t[30]={value:function(e){var r=t.r(22),i=t.r(29),n=t.r(28),a=t.r(31).cursorCharacter,o=t.r(12),s=r.createClass("SyntaxComponenet",{constructor:function(t){this.kfEditor=t,this.record={cursor:{group:null,startOffset:-1,endOffset:-1}},this.components={},this.objTree=null,this.initComponents(),this.initServices(),this.initCommands()},initComponents:function(){this.components.move=new i(this,this.kfEditor),this.components.delete=new n(this,this.kfEditor)},initServices:function(){this.kfEditor.registerService("syntax.update.objtree",this,{updateObjTree:this.updateObjTree}),this.kfEditor.registerService("syntax.get.objtree",this,{getObjectTree:this.getObjectTree}),this.kfEditor.registerService("syntax.get.group.object",this,{getGroupObject:this.getGroupObject}),this.kfEditor.registerService("syntax.is.root.node",this,{isRootNode:this.isRootNode}),this.kfEditor.registerService("syntax.is.group.node",this,{isGroupNode:this.isGroupNode}),this.kfEditor.registerService("syntax.is.virtual.node",this,{isVirtualNode:this.isVirtualNode}),this.kfEditor.registerService("syntax.is.placeholder.node",this,{isPlaceholder:this.isPlaceholder}),this.kfEditor.registerService("syntax.is.select.placeholder",this,{isSelectPlaceholder:this.isSelectPlaceholder}),this.kfEditor.registerService("syntax.has.root.placeholder",this,{hasRootplaceholder:this.hasRootplaceholder}),this.kfEditor.registerService("syntax.valid.brackets",this,{isBrackets:this.isBrackets}),this.kfEditor.registerService("syntax.get.group.content",this,{getGroupContent:this.getGroupContent}),this.kfEditor.registerService("syntax.get.root.group.info",this,{getRootGroupInfo:this.getRootGroupInfo}),this.kfEditor.registerService("syntax.get.root",this,{getRootObject:this.getRootObject}),this.kfEditor.registerService("syntax.update.record.cursor",this,{updateCursor:this.updateCursor}),this.kfEditor.registerService("syntax.update.selection",this,{updateSelection:this.updateSelection}),this.kfEditor.registerService("syntax.get.record.cursor",this,{getCursorRecord:this.getCursorRecord}),this.kfEditor.registerService("syntax.has.cursor.info",this,{hasCursorInfo:this.hasCursorInfo}),this.kfEditor.registerService("syntax.serialization",this,{serialization:this.serialization}),this.kfEditor.registerService("syntax.cursor.move.left",this,{leftMove:this.leftMove}),this.kfEditor.registerService("syntax.cursor.move.right",this,{rightMove:this.rightMove}),this.kfEditor.registerService("syntax.delete.group",this,{deleteGroup:this.deleteGroup})},initCommands:function(){this.kfEditor.registerCommand("get.source",this,this.getSource),this.kfEditor.registerCommand("content.is.empty",this,this.isEmpty)},updateObjTree:function(t){var e=t.select;e&&e.groupId&&this.updateCursor(e.groupId,e.startOffset,e.endOffset),this.objTree=t},hasCursorInfo:function(){return null!==this.record.cursor.group},isRootNode:function(t){return this.objTree.mapping.root.strGroup.attr.id===t},isGroupNode:function(t){var e=this.objTree.mapping[t].strGroup.attr["data-type"];return e===o.GROUP||e===o.VIRTUAL},isVirtualNode:function(t){return this.objTree.mapping[t].strGroup.attr["data-type"]===o.VIRTUAL},isPlaceholder:function(t){var e=this.objTree.mapping[t];return!!e&&"Placeholder"===(e=e.objGroup.node).getAttribute("data-flag")},isBrackets:function(t){return!!this.objTree.mapping[t].objGroup.node.getAttribute("data-brackets")},hasRootplaceholder:function(){return"placeholder"===this.objTree.mapping.root.strGroup.operand[0].name},isSelectPlaceholder:function(){var t,e=this.record.cursor;return e.endOffset-e.startOffset==1&&(t=this.getGroupContent(e.groupId),!!this.isPlaceholder(t.content[e.startOffset].id))},isLeafTree:function(t){return"string"==typeof t},isRootTree:function(t){return t.attr&&t.attr["data-root"]},getObjectTree:function(){return this.objTree},getGroupObject:function(t){return this.objTree.mapping[t].objGroup||null},getCursorRecord:function(){return r.Utils.extend({},this.record.cursor)||null},getGroupContent:function(t){var e=this.objTree.mapping[t],i=[],n=e.objGroup.operands,a=n.length-1,o="rtl"!==e.strGroup.traversal;return r.Utils.each(n,(function(t,e){o?i.push(t.node):i[a-e]=t.node})),{id:t,traversal:e.strGroup.traversal||"ltr",groupObj:e.objGroup.node,content:i}},getRootObject:function(){return this.objTree.mapping.root.objGroup},getRootGroupInfo:function(){var t=this.objTree.mapping.root.strGroup.attr.id;return this.getGroupContent(t)},updateSelection:function(t){var e,r,i=this.objTree.mapping[t.id],n=i.strGroup,o=null,s=null,c=null;if(o=t,s=i,"combination"===n.name)this.record.cursor={groupId:o.id,startOffset:0,endOffset:n.operand.length},n.operand.unshift(a),n.operand.push(a);else{for(;"combination"!==s.strGroup.name||1===o.content;)t=o,i=s,o=this.kfEditor.requestService("position.get.parent.group",i.objGroup.node),s=this.objTree.mapping[o.id];var u=[].indexOf.call(o.content,t.groupObj);this.record.cursor={groupId:o.id,startOffset:u,endOffset:u+1},s.strGroup.operand.splice(u+1,0,a),s.strGroup.operand.splice(u,0,a)}return e=(c=this.kfEditor.requestService("parser.latex.serialization",this.objTree.parsedTree)).indexOf(a),r=(c=c.replace(a,"")).indexOf(a),s.strGroup.operand.splice(this.record.cursor.startOffset,1),s.strGroup.operand.splice(this.record.cursor.endOffset,1),{str:c,startOffset:e,endOffset:r}},getSource:function(){return this.serialization().str.replace(a,"").replace(a,"")},isEmpty:function(){return this.hasRootplaceholder()},serialization:function(){var t=this.record.cursor,e=this.objTree.mapping[t.groupId].strGroup,r=null,i=-1,n=-1;return i=Math.min(t.endOffset,t.startOffset),n=Math.max(t.endOffset,t.startOffset),e.operand.splice(n,0,a),e.operand.splice(i,0,a),n+=1,r=this.kfEditor.requestService("parser.latex.serialization",this.objTree.parsedTree),e.operand.splice(n,1),e.operand.splice(i,1),i=r.indexOf(a),t.startOffset===t.endOffset&&(r=r.replace(a,"")),n=r.lastIndexOf(a),{str:r,startOffset:i,endOffset:n}},updateCursor:function(t,e,r){var i=null;1===arguments.length&&(r=t.endOffset,e=t.startOffset,t=t.groupId),void 0===r&&(r=e),e>r&&(i=r,r=e,e=i),this.record.cursor={groupId:t,startOffset:e,endOffset:r}},leftMove:function(){this.components.move.leftMove()},rightMove:function(){this.components.move.rightMove()},deleteGroup:function(){return this.components.delete.deleteGroup()},insertSubtree:function(t){var e=this.record.cursor,r=0,i=0;this.isPlaceholder(e.groupId)?this.replaceTree(t):(r=Math.min(e.startOffset,e.endOffset),i=Math.max(e.startOffset,e.endOffset)-r,this.objTree.mapping[e.groupId].strGroup.operand.splice(r,i,t),e.startOffset+=1,e.endOffset=e.startOffset)},replaceTree:function(t){var e=this.record.cursor,r=this.objTree.mapping[e.groupId].objGroup.node,i=this.kfEditor.requestService("position.get.parent.info",r);this.objTree.mapping[i.group.id].strGroup.operand[i.index]=t,e.groupId=i.group.id,e.startOffset=i.index+1,e.endOffset=i.index+1}});return s}},t[31]={value:function(){return{cursorCharacter:"",rootPlaceholder:{color:"#666",content:"在此处键入公式",fontsize:16},scrollbar:{padding:5,step:150}}}},t[32]={value:function(){return{"\\pm":{x:5,y:0},"\\infty":{x:42,y:0},"=":{x:79,y:0},"\\sim":{x:116,y:0},"\\times":{x:153,y:0},"\\div":{x:190,y:0},"!":{x:227,y:0},"<":{x:264,y:0},"\\ll":{x:301,y:0},">":{x:338,y:0},"\\gg":{x:375,y:0},"\\leq":{x:412,y:0},"\\geq":{x:449,y:0},"\\mp":{x:486,y:0},"\\cong":{x:523,y:0},"\\equiv":{x:560,y:0},"\\propto":{x:597,y:0},"\\approx":{x:634,y:0},"\\forall":{x:671,y:0},"\\partial":{x:708,y:0},"\\surd":{x:745,y:0},"\\cup":{x:782,y:0},"\\cap":{x:819,y:0},"\\varnothing":{x:856,y:0},"%":{x:893,y:0},"\\circ":{x:930,y:0},"\\exists":{x:967,y:0},"\\nexists":{x:1004,y:0},"\\in":{x:1041,y:0},"\\ni":{x:1078,y:0},"\\gets":{x:5,y:37},"\\uparrow":{x:42,y:37},"\\to":{x:79,y:37},"\\downarrow":{x:116,y:37},"\\leftrightarrow":{x:153,y:37},"\\therefore":{x:190,y:37},"\\because":{x:227,y:37},"+":{x:264,y:37},"-":{x:301,y:37},"\\neg":{x:338,y:37},"\\ast":{x:375,y:37},"\\cdot":{x:412,y:37},"\\vdots":{x:449,y:37},"\\ddots":{x:486,y:37},"\\aleph":{x:523,y:37},"\\beth":{x:560,y:37},"\\blacksquare":{x:597,y:37},"\\alpha":{x:634,y:37},"\\beta":{x:671,y:37},"\\gamma":{x:708,y:37},"\\delta":{x:745,y:37},"\\epsilon":{x:782,y:37},"\\zeta":{x:819,y:37},"\\eta":{x:856,y:37},"\\theta":{x:893,y:37},"\\iota":{x:930,y:37},"\\kappa":{x:967,y:37},"\\lambda":{x:1004,y:37},"\\mu":{x:1041,y:37},"\\nu":{x:1078,y:37},"\\xi":{x:5,y:74},"\\omicron":{x:42,y:74},"\\pi":{x:79,y:74},"\\rho":{x:116,y:74},"\\sigma":{x:153,y:74},"\\tau":{x:190,y:74},"\\upsilon":{x:227,y:74},"\\phi":{x:264,y:74},"\\chi":{x:301,y:74},"\\psi":{x:338,y:74},"\\omega":{x:375,y:74},"\\Alpha":{x:412,y:74},"\\Beta":{x:449,y:74},"\\Gamma":{x:486,y:74},"\\Delta":{x:523,y:74},"\\Epsilon":{x:560,y:74},"\\Zeta":{x:597,y:74},"\\Eta":{x:634,y:74},"\\Theta":{x:671,y:74},"\\Iota":{x:708,y:74},"\\Kappa":{x:745,y:74},"\\Lambda":{x:782,y:74},"\\Mu":{x:819,y:74},"\\Nu":{x:856,y:74},"\\Xi":{x:893,y:74},"\\Omicron":{x:930,y:74},"\\Pi":{x:967,y:74},"\\Rho":{x:1004,y:74},"\\Sigma":{x:1041,y:74},"\\Tau":{x:1078,y:74},"\\Upsilon":{x:5,y:111},"\\Phi":{x:42,y:111},"\\Chi":{x:79,y:111},"\\Psi":{x:116,y:111},"\\Omega":{x:153,y:111},"\\digamma":{x:190,y:111},"\\varepsilon":{x:227,y:111},"\\varkappa":{x:264,y:111},"\\varphi":{x:301,y:111},"\\varpi":{x:338,y:111},"\\varrho":{x:375,y:111},"\\varsigma":{x:412,y:111},"\\vartheta":{x:449,y:111},"\\neq":{x:486,y:111},"\\nless":{x:523,y:111},"\\ngtr":{x:560,y:111},"\\nleq":{x:597,y:111},"\\ngeq":{x:634,y:111},"\\nsim":{x:671,y:111},"\\lneqq":{x:708,y:111},"\\gneqq":{x:745,y:111},"\\nprec":{x:782,y:111},"\\nsucc":{x:819,y:111},"\\notin":{x:856,y:111},"\\nsubseteq":{x:893,y:111},"\\nsupseteq":{x:930,y:111},"\\subsetneq":{x:967,y:111},"\\supsetneq":{x:1004,y:111},"\\lnsim":{x:1041,y:111},"\\gnsim":{x:1078,y:111},"\\precnsim":{x:5,y:148},"\\succnsim":{x:42,y:148},"\\ntriangleleft":{x:79,y:148},"\\ntriangleright":{x:116,y:148},"\\ntrianglelefteq":{x:153,y:148},"\\ntrianglerighteq":{x:190,y:148},"\\nmid":{x:227,y:148},"\\nparallel":{x:264,y:148},"\\nvdash":{x:301,y:148},"\\nVdash":{x:338,y:148},"\\nvDash":{x:375,y:148},"\\nVDash":{x:412,y:148},"\\daleth":{x:449,y:148},"\\gimel":{x:486,y:148},"\\complement":{x:523,y:148},"\\ell":{x:560,y:148},"\\eth":{x:597,y:148},"\\hbar":{x:634,y:148},"\\hslash":{x:671,y:148},"\\mho":{x:708,y:148},"\\wp":{x:745,y:148},"\\circledS":{x:782,y:148},"\\Bbbk":{x:819,y:148},"\\Finv":{x:856,y:148},"\\Game":{x:893,y:148},"\\Im":{x:930,y:148},"\\Re":{x:967,y:148},"\\updownarrow":{x:1004,y:148},"\\Leftarrow":{x:1041,y:148},"\\Rightarrow":{x:1078,y:148},"\\Uparrow":{x:5,y:185},"\\Downarrow":{x:42,y:185},"\\Leftrightarrow":{x:79,y:185},"\\Updownarrow":{x:116,y:185},"\\longleftarrow":{x:153,y:185},"\\longrightarrow":{x:190,y:185},"\\longleftrightarrow":{x:227,y:185},"\\Longleftarrow":{x:264,y:185},"\\Longrightarrow":{x:301,y:185},"\\Longleftrightarrow":{x:338,y:185},"\\nearrow":{x:375,y:185},"\\nwarrow":{x:412,y:185},"\\searrow":{x:449,y:185},"\\swarrow":{x:486,y:185},"\\nleftarrow":{x:523,y:185},"\\nrightarrow":{x:560,y:185},"\\nLeftarrow":{x:597,y:185},"\\nRightarrow":{x:634,y:185},"\\nLeftrightarrow":{x:671,y:185},"\\leftharpoonup":{x:708,y:185},"\\leftharpoondown":{x:745,y:185},"\\rightharpoonup":{x:782,y:185},"\\rightharpoondown":{x:819,y:185},"\\upharpoonleft":{x:856,y:185},"\\upharpoonright":{x:893,y:185},"\\downharpoonleft":{x:930,y:185},"\\downharpoonright":{x:967,y:185},"\\leftrightharpoons":{x:1004,y:185},"\\rightleftharpoons":{x:1041,y:185},"\\leftleftarrows":{x:1078,y:185},"\\rightrightarrows":{x:5,y:222},"\\upuparrows":{x:42,y:222},"\\downdownarrows":{x:79,y:222},"\\leftrightarrows":{x:116,y:222},"\\rightleftarrows":{x:153,y:222},"\\looparrowleft":{x:190,y:222},"\\looparrowright":{x:227,y:222},"\\leftarrowtail":{x:264,y:222},"\\rightarrowtail":{x:301,y:222},"\\Lsh":{x:338,y:222},"\\Rsh":{x:375,y:222},"\\Lleftarrow":{x:412,y:222},"\\Rrightarrow":{x:449,y:222},"\\curvearrowleft":{x:486,y:222},"\\curvearrowright":{x:523,y:222},"\\circlearrowleft":{x:560,y:222},"\\circlearrowright":{x:597,y:222},"\\multimap":{x:634,y:222},"\\leftrightsquigarrow":{x:671,y:222},"\\twoheadleftarrow":{x:708,y:222},"\\twoheadrightarrow":{x:745,y:222},"\\rightsquigarrow":{x:782,y:222},"\\mathcal{A}":{x:819,y:222},"\\mathcal{B}":{x:856,y:222},"\\mathcal{C}":{x:893,y:222},"\\mathcal{D}":{x:930,y:222},"\\mathcal{E}":{x:967,y:222},"\\mathcal{F}":{x:1004,y:222},"\\mathcal{G}":{x:1041,y:222},"\\mathcal{H}":{x:1078,y:222},"\\mathcal{I}":{x:5,y:259},"\\mathcal{J}":{x:42,y:259},"\\mathcal{K}":{x:79,y:259},"\\mathcal{L}":{x:116,y:259},"\\mathcal{M}":{x:153,y:259},"\\mathcal{N}":{x:190,y:259},"\\mathcal{O}":{x:227,y:259},"\\mathcal{P}":{x:264,y:259},"\\mathcal{Q}":{x:301,y:259},"\\mathcal{R}":{x:338,y:259},"\\mathcal{S}":{x:375,y:259},"\\mathcal{T}":{x:412,y:259},"\\mathcal{U}":{x:449,y:259},"\\mathcal{V}":{x:486,y:259},"\\mathcal{W}":{x:523,y:259},"\\mathcal{X}":{x:560,y:259},"\\mathcal{Y}":{x:597,y:259},"\\mathcal{Z}":{x:634,y:259},"\\mathfrak{A}":{x:671,y:259},"\\mathfrak{B}":{x:708,y:259},"\\mathfrak{C}":{x:745,y:259},"\\mathfrak{D}":{x:782,y:259},"\\mathfrak{E}":{x:819,y:259},"\\mathfrak{F}":{x:856,y:259},"\\mathfrak{G}":{x:893,y:259},"\\mathfrak{H}":{x:930,y:259},"\\mathfrak{I}":{x:967,y:259},"\\mathfrak{J}":{x:1004,y:259},"\\mathfrak{K}":{x:1041,y:259},"\\mathfrak{L}":{x:1078,y:259},"\\mathfrak{M}":{x:5,y:296},"\\mathfrak{N}":{x:42,y:296},"\\mathfrak{O}":{x:79,y:296},"\\mathfrak{P}":{x:116,y:296},"\\mathfrak{Q}":{x:153,y:296},"\\mathfrak{R}":{x:190,y:296},"\\mathfrak{S}":{x:227,y:296},"\\mathfrak{T}":{x:264,y:296},"\\mathfrak{U}":{x:301,y:296},"\\mathfrak{V}":{x:338,y:296},"\\mathfrak{W}":{x:375,y:296},"\\mathfrak{X}":{x:412,y:296},"\\mathfrak{Y}":{x:449,y:296},"\\mathfrak{Z}":{x:486,y:296},"\\mathfrak{a}":{x:523,y:296},"\\mathfrak{b}":{x:560,y:296},"\\mathfrak{c}":{x:597,y:296},"\\mathfrak{d}":{x:634,y:296},"\\mathfrak{e}":{x:671,y:296},"\\mathfrak{f}":{x:708,y:296},"\\mathfrak{g}":{x:745,y:296},"\\mathfrak{h}":{x:782,y:296},"\\mathfrak{i}":{x:819,y:296},"\\mathfrak{j}":{x:856,y:296},"\\mathfrak{k}":{x:893,y:296},"\\mathfrak{l}":{x:930,y:296},"\\mathfrak{m}":{x:967,y:296},"\\mathfrak{n}":{x:1004,y:296},"\\mathfrak{o}":{x:1041,y:296},"\\mathfrak{p}":{x:1078,y:296},"\\mathfrak{q}":{x:5,y:333},"\\mathfrak{r}":{x:42,y:333},"\\mathfrak{s}":{x:79,y:333},"\\mathfrak{t}":{x:116,y:333},"\\mathfrak{u}":{x:153,y:333},"\\mathfrak{v}":{x:190,y:333},"\\mathfrak{w}":{x:227,y:333},"\\mathfrak{x}":{x:264,y:333},"\\mathfrak{y}":{x:301,y:333},"\\mathfrak{z}":{x:338,y:333},"\\mathbb{A}":{x:375,y:333},"\\mathbb{B}":{x:412,y:333},"\\mathbb{C}":{x:449,y:333},"\\mathbb{D}":{x:486,y:333},"\\mathbb{E}":{x:523,y:333},"\\mathbb{F}":{x:560,y:333},"\\mathbb{G}":{x:597,y:333},"\\mathbb{H}":{x:634,y:333},"\\mathbb{I}":{x:671,y:333},"\\mathbb{J}":{x:708,y:333},"\\mathbb{K}":{x:745,y:333},"\\mathbb{L}":{x:782,y:333},"\\mathbb{M}":{x:819,y:333},"\\mathbb{N}":{x:856,y:333},"\\mathbb{O}":{x:893,y:333},"\\mathbb{P}":{x:930,y:333},"\\mathbb{Q}":{x:967,y:333},"\\mathbb{R}":{x:1004,y:333},"\\mathbb{S}":{x:1041,y:333},"\\mathbb{T}":{x:1078,y:333},"\\mathbb{U}":{x:5,y:370},"\\mathbb{V}":{x:42,y:370},"\\mathbb{W}":{x:79,y:370},"\\mathbb{X}":{x:116,y:370},"\\mathbb{Y}":{x:153,y:370},"\\mathbb{Z}":{x:190,y:370},"\\mathrm{A}":{x:227,y:370},"\\mathrm{B}":{x:264,y:370},"\\mathrm{C}":{x:301,y:370},"\\mathrm{D}":{x:338,y:370},"\\mathrm{E}":{x:375,y:370},"\\mathrm{F}":{x:412,y:370},"\\mathrm{G}":{x:449,y:370},"\\mathrm{H}":{x:486,y:370},"\\mathrm{I}":{x:523,y:370},"\\mathrm{J}":{x:560,y:370},"\\mathrm{K}":{x:597,y:370},"\\mathrm{L}":{x:634,y:370},"\\mathrm{M}":{x:671,y:370},"\\mathrm{N}":{x:708,y:370},"\\mathrm{O}":{x:745,y:370},"\\mathrm{P}":{x:782,y:370},"\\mathrm{Q}":{x:819,y:370},"\\mathrm{R}":{x:856,y:370},"\\mathrm{S}":{x:893,y:370},"\\mathrm{T}":{x:930,y:370},"\\mathrm{U}":{x:967,y:370},"\\mathrm{V}":{x:1004,y:370},"\\mathrm{W}":{x:1041,y:370},"\\mathrm{X}":{x:1078,y:370},"\\mathrm{Y}":{x:5,y:407},"\\mathrm{Z}":{x:42,y:407},"\\mathrm{a}":{x:79,y:407},"\\mathrm{b}":{x:116,y:407},"\\mathrm{c}":{x:153,y:407},"\\mathrm{d}":{x:190,y:407},"\\mathrm{e}":{x:227,y:407},"\\mathrm{f}":{x:264,y:407},"\\mathrm{g}":{x:301,y:407},"\\mathrm{h}":{x:338,y:407},"\\mathrm{i}":{x:375,y:407},"\\mathrm{j}":{x:412,y:407},"\\mathrm{k}":{x:449,y:407},"\\mathrm{l}":{x:486,y:407},"\\mathrm{m}":{x:523,y:407},"\\mathrm{n}":{x:560,y:407},"\\mathrm{o}":{x:597,y:407},"\\mathrm{p}":{x:634,y:407},"\\mathrm{q}":{x:671,y:407},"\\mathrm{r}":{x:708,y:407},"\\mathrm{s}":{x:745,y:407},"\\mathrm{t}":{x:782,y:407},"\\mathrm{u}":{x:819,y:407},"\\mathrm{v}":{x:856,y:407},"\\mathrm{w}":{x:893,y:407},"\\mathrm{x}":{x:930,y:407},"\\mathrm{y}":{x:967,y:407},"\\mathrm{z}":{x:1004,y:407}}}},t[33]={value:function(e){var r=t.r(4),i=t.r(22),n={min:1,max:2};return i.createClass("ScrollZoomController",{constructor:function(t,e,i,a){this.kfEditor=e,this.target=i,this.zoom=1,this.step=.05,this.options=r.extend({},n,a),this.initEvent()},initEvent:function(){var t=this.kfEditor,e=this,i=this.options.min,n=this.options.max,a=this.step;r.addEvent(this.target,"mousewheel",(function(r){r.preventDefault(),r.wheelDelta<0?e.zoom-=e.zoom*a:e.zoom+=e.zoom*a,e.zoom=Math.max(e.zoom,i),e.zoom=Math.min(e.zoom,n),t.requestService("render.set.canvas.zoom",e.zoom)}))}})}},t[34]={value:function(t){return{VIEW_STATE:{NO_OVERFLOW:0,OVERFLOW:1},scrollbar:{step:50,thumbMinSize:50}}}},t[35]={value:function(e){var r=t.r(22),i=t.r(60);return r.createClass("Header",{constructor:function(t,e){this.prefix="kf-editor-header-container",this.kfEditor=e,this.uiComponent=t,this.initKeyboardElements(),this.initEvent()},initEvent:function(){var t=this;i.delegate(this.uiComponent.header,"."+this.prefix+"-close","click",(function(){t.kfEditor.eclassWebService.send({type:"common.closeModal"})}))},initKeyboardElements:function(){var t=this.uiComponent.header.ownerDocument,e=this.createHeader(t,this.kfEditor);this.uiComponent.header.appendChild(e)},createHeader:function(t,e){return i.ele(t,"div",{className:this.prefix,content:'\n <div class="'.concat(this.prefix,'-title">插入公式</div>\n <div class="').concat(this.prefix,'-close"></div>\n ')})}})}},t[36]={value:function(e){var r=t.r(22),i=t.r(61),n=t.r(60);return r.createClass("Keyboard",{constructor:function(t,e){this.kfEditor=e,this.uiComponent=t,this.initKeyboardElements(),this.initEvent()},initEvent:function(){var t=this;n.on(this.uiComponent.keyboardContainer,"mousedown",(function(t){t.preventDefault()})),n.on(this.uiComponent.keyboardContainer,"mousewheel",(function(t){t.preventDefault()})),n.subscribe("panel.select",(function(e){t.insertSource(e)}))},insertSource:function(t){this.kfEditor.requestService("control.insert.string",t),this.kfEditor.eclassWebService.send({type:"common.selectKey",data:{body:{key:t}}})},initKeyboardElements:function(){var t,e,r=(t=this.uiComponent.keyboardContainer.ownerDocument,e=this.kfEditor,new i.Keyboard(t,e));this.appendElement(r)},appendElement:function(t){t.attachTo(this.uiComponent.keyboardContainer)}})}},t[37]={value:function(){return{"x=\\frac {-b\\pm\\sqrt {b^2-4ac}}{2a}":{pos:{x:0,y:0},size:{width:310,height:73}},"{\\placeholder/\\placeholder}":{pos:{x:315,y:0},size:{width:56,height:75}},"\\frac \\placeholder\\placeholder":{pos:{x:376,y:0},size:{width:56,height:75}},"a^2+b^2=c^2":{pos:{x:437,y:0},size:{width:310,height:73}},"{\\left(x+a\\right)}^2=\\sum^n_{k=0}{\\left(^n_k\\right)x^ka^{n-k}}":{pos:{x:752,y:0},size:{width:310,height:73}},"\\frac {dy}{dx}":{pos:{x:1067,y:0},size:{width:56,height:75}},"\\frac {\\Delta y}{\\Delta x}":{pos:{x:1128,y:0},size:{width:56,height:75}},"\\frac {\\delta y}{\\delta x}":{pos:{x:1189,y:0},size:{width:56,height:75}},"\\frac \\pi 2":{pos:{x:1250,y:0},size:{width:56,height:75}},"\\placeholder^\\placeholder":{pos:{x:1311,y:0},size:{width:56,height:75}},"\\placeholder^\\placeholder_\\placeholder":{pos:{x:1372,y:0},size:{width:56,height:75}},"\\placeholder_\\placeholder":{pos:{x:1433,y:0},size:{width:56,height:75}},"{^\\placeholder_\\placeholder\\placeholder}":{pos:{x:1494,y:0},size:{width:56,height:75}},"e^{-i\\omega t}":{pos:{x:1555,y:0},size:{width:56,height:75}},"x^2":{pos:{x:1616,y:0},size:{width:56,height:75}},"{}^n_1Y":{pos:{x:1677,y:0},size:{width:56,height:75}},"\\sqrt \\placeholder":{pos:{x:1738,y:0},size:{width:56,height:75}},"\\sqrt [\\placeholder] \\placeholder":{pos:{x:1799,y:0},size:{width:56,height:75}},"\\sqrt [2] \\placeholder":{pos:{x:1860,y:0},size:{width:56,height:75}},"\\sqrt [3] \\placeholder":{pos:{x:1921,y:0},size:{width:56,height:75}},"\\frac {-b\\pm\\sqrt{b^2-4ac}}{2a}":{pos:{x:1982,y:0},size:{width:137,height:75}},"\\sqrt {a^2+b^2}":{pos:{x:2124,y:0},size:{width:137,height:75}},"\\int \\placeholder":{pos:{x:2266,y:0},size:{width:56,height:75}},"\\int^\\placeholder_\\placeholder\\placeholder":{pos:{x:2327,y:0},size:{width:56,height:75}},"\\iint\\placeholder":{pos:{x:2388,y:0},size:{width:56,height:75}},"\\iint^\\placeholder_\\placeholder\\placeholder":{pos:{x:2449,y:0},size:{width:56,height:75}},"\\iiint\\placeholder":{pos:{x:2510,y:0},size:{width:56,height:75}},"\\iiint^\\placeholder_\\placeholder\\placeholder":{pos:{x:2571,y:0},size:{width:56,height:75}},"\\sum\\placeholder":{pos:{x:2632,y:0},size:{width:56,height:75}},"\\sum^\\placeholder_\\placeholder\\placeholder":{pos:{x:2693,y:0},size:{width:56,height:75}},"\\sum_\\placeholder\\placeholder":{pos:{x:2754,y:0},size:{width:56,height:75}},"\\left(\\placeholder\\right)":{pos:{x:2815,y:0},size:{width:56,height:75}},"\\left[\\placeholder\\right]":{pos:{x:2876,y:0},size:{width:56,height:75}},"\\left\\{\\placeholder\\right\\}":{pos:{x:2937,y:0},size:{width:56,height:75}},"\\left|\\placeholder\\right|":{pos:{x:2998,y:0},size:{width:56,height:75}},"\\sin\\placeholder":{pos:{x:3059,y:0},size:{width:56,height:75}},"\\cos\\placeholder":{pos:{x:3120,y:0},size:{width:56,height:75}},"\\tan\\placeholder":{pos:{x:3181,y:0},size:{width:56,height:75}},"\\csc\\placeholder":{pos:{x:3242,y:0},size:{width:56,height:75}},"\\sec\\placeholder":{pos:{x:3303,y:0},size:{width:56,height:75}},"\\cot\\placeholder":{pos:{x:3364,y:0},size:{width:56,height:75}},"\\sin\\theta":{pos:{x:3425,y:0},size:{width:56,height:75}},"\\cos{2x}":{pos:{x:3486,y:0},size:{width:56,height:75}},"\\tan\\theta=\\frac {\\sin\\theta}{\\cos\\theta}":{pos:{x:3547,y:0},size:{width:137,height:75}}}}},t[38]={value:function(e){var r,i,n,a,o=t.r(45),s=t.r(44),c=t.r(22),u=[{type:o.DRAPDOWN_BOX,options:{button:{label:"预设<br/>",className:"yushe-btn",icon:"assets/images/toolbar/button/fx.png",iconSize:{w:40}},box:{width:367,group:[{title:"预设公式",items:[{title:"预设公式",content:[{label:"二次公式",item:{show:"assets/images/toolbar/ys/1.png",val:"x=\\frac {-b\\pm\\sqrt {b^2-4ac}}{2a}"}},{label:"二项式定理",item:{show:"assets/images/toolbar/ys/2.png",val:"{\\left(x+a\\right)}^2=\\sum^n_{k=0}{\\left(^n_k\\right)x^ka^{n-k}}"}},{label:"勾股定理",item:{show:"assets/images/toolbar/ys/3.png",val:"a^2+b^2=c^2"}}]}]}]}}},{type:o.DELIMITER},{type:o.AREA,options:{box:{fixOffset:!0,width:527,type:s.OVERLAP,group:[{title:"基础数学",items:[]},{title:"希腊字母",items:[]},{title:"求反关系运算符",items:[]},{title:"字母类符号",items:[]},{title:"箭头",items:[]},{title:"手写体",items:[]}]}}},{type:o.DELIMITER},{type:o.DRAPDOWN_BOX,options:{button:{label:"分数<br/>",icon:"assets/images/toolbar/button/frac.png"},box:{width:332,group:[{title:"分数",items:[{title:"分数",content:[{item:{show:"assets/images/toolbar/frac/1.png",val:"\\frac \\placeholder\\placeholder"}},{item:{show:"assets/images/toolbar/frac/2.png",val:"{\\placeholder/\\placeholder}"}}]},{title:"常用分数",content:[{item:{show:"assets/images/toolbar/frac/c1.png",val:"\\frac {dy}{dx}"}},{item:{show:"assets/images/toolbar/frac/c2.png",val:"\\frac {\\Delta y}{\\Delta x}"}},{item:{show:"assets/images/toolbar/frac/c4.png",val:"\\frac {\\delta y}{\\delta x}"}},{item:{show:"assets/images/toolbar/frac/c5.png",val:"\\frac \\pi 2"}}]}]}]}}},{type:o.DRAPDOWN_BOX,options:{button:{label:"上下标<br/>",icon:"assets/images/toolbar/button/script.png"},box:{width:332,group:[{title:"上标和下标",items:[{title:"上标和下标",content:[{item:{show:"assets/images/toolbar/script/1.png",val:"\\placeholder^\\placeholder"}},{item:{show:"assets/images/toolbar/script/2.png",val:"\\placeholder_\\placeholder"}},{item:{show:"assets/images/toolbar/script/3.png",val:"\\placeholder^\\placeholder_\\placeholder"}},{item:{show:"assets/images/toolbar/script/4.png",val:"{^\\placeholder_\\placeholder\\placeholder}"}}]},{title:"常用的上标和下标",content:[{item:{show:"assets/images/toolbar/script/c1.png",val:"e^{-i\\omega t}"}},{item:{show:"assets/images/toolbar/script/c2.png",val:"x^2"}},{item:{show:"assets/images/toolbar/script/c3.png",val:"{}^n_1Y"}}]}]}]}}},{type:o.DRAPDOWN_BOX,options:{button:{label:"根式<br/>",icon:"assets/images/toolbar/button/sqrt.png"},box:{width:342,group:[{title:"根式",items:[{title:"根式",content:[{item:{show:"assets/images/toolbar/sqrt/1.png",val:"\\sqrt \\placeholder"}},{item:{show:"assets/images/toolbar/sqrt/2.png",val:"\\sqrt [\\placeholder] \\placeholder"}},{item:{show:"assets/images/toolbar/sqrt/3.png",val:"\\sqrt [2] \\placeholder"}},{item:{show:"assets/images/toolbar/sqrt/4.png",val:"\\sqrt [3] \\placeholder"}}]},{title:"常用根式",content:[{item:{show:"assets/images/toolbar/sqrt/c1.png",val:"\\frac {-b\\pm\\sqrt{b^2-4ac}}{2a}"}},{item:{show:"assets/images/toolbar/sqrt/c2.png",val:"\\sqrt {a^2+b^2}"}}]}]}]}}},{type:o.DRAPDOWN_BOX,options:{button:{label:"积分<br/>",icon:"assets/images/toolbar/button/int.png"},box:{width:332,group:[{title:"积分",items:[{title:"积分",content:[{item:{show:"assets/images/toolbar/int/1.png",val:"\\int \\placeholder"}},{item:{show:"assets/images/toolbar/int/2.png",val:"\\int^\\placeholder_\\placeholder\\placeholder"}},{item:{show:"assets/images/toolbar/int/3.png",val:"\\iint\\placeholder"}},{item:{show:"assets/images/toolbar/int/4.png",val:"\\iint^\\placeholder_\\placeholder\\placeholder"}},{item:{show:"assets/images/toolbar/int/5.png",val:"\\iiint\\placeholder"}},{item:{show:"assets/images/toolbar/int/6.png",val:"\\iiint^\\placeholder_\\placeholder\\placeholder"}}]}]}]}}},{type:o.DRAPDOWN_BOX,options:{button:{label:"大型<br/>运算符",icon:"assets/images/toolbar/button/sum.png"},box:{width:332,group:[{title:"求和",items:[{title:"求和",content:[{item:{show:"assets/images/toolbar/large/1.png",val:"\\sum\\placeholder"}},{item:{show:"assets/images/toolbar/large/2.png",val:"\\sum^\\placeholder_\\placeholder\\placeholder"}},{item:{show:"assets/images/toolbar/large/3.png",val:"\\sum_\\placeholder\\placeholder"}}]}]}]}}},{type:o.DRAPDOWN_BOX,options:{button:{label:"括号<br/>",icon:"assets/images/toolbar/button/brackets.png"},box:{width:332,group:[{title:"方括号",items:[{title:"方括号",content:[{item:{show:"assets/images/toolbar/brackets/1.png",val:"\\left(\\placeholder\\right)"}},{item:{show:"assets/images/toolbar/brackets/2.png",val:"\\left[\\placeholder\\right]"}},{item:{show:"assets/images/toolbar/brackets/3.png",val:"\\left\\{\\placeholder\\right\\}"}},{item:{show:"assets/images/toolbar/brackets/4.png",val:"\\left|\\placeholder\\right|"}}]}]}]}}},{type:o.DRAPDOWN_BOX,options:{button:{label:"函数<br/>",icon:"assets/images/toolbar/button/sin.png"},box:{width:340,group:[{title:"函数",items:[{title:"三角函数",content:[{item:{show:"assets/images/toolbar/func/1.png",val:"\\sin\\placeholder"}},{item:{show:"assets/images/toolbar/func/2.png",val:"\\cos\\placeholder"}},{item:{show:"assets/images/toolbar/func/3.png",val:"\\tan\\placeholder"}},{item:{show:"assets/images/toolbar/func/4.png",val:"\\csc\\placeholder"}},{item:{show:"assets/images/toolbar/func/5.png",val:"\\sec\\placeholder"}},{item:{show:"assets/images/toolbar/func/6.png",val:"\\cot\\placeholder"}}]},{title:"常用函数",content:[{item:{show:"assets/images/toolbar/func/c1.png",val:"\\sin\\theta"}},{item:{show:"assets/images/toolbar/func/c2.png",val:"\\sin{2x}"}},{item:{show:"assets/images/toolbar/func/c3.png",val:"\\tan\\theta=\\frac {\\sin\\theta}{\\cos\\theta}"}}]}]}]}}}];function l(t){var e=[],r=t.path,i=t.values;return c.Utils.each(i,(function(t){var i=t,n=t;"string"!=typeof t?(i=t.img,n=t.key):n="\\"+t,e.push({item:{show:""+r+i.toLowerCase()+".png",val:n}})})),e}return u[2].options.box.group[0].items.push({title:"基础数学",content:l({path:"assets/images/toolbar/char/math/",values:["pm","infty",{key:"=",img:"eq"},"sim","times","div",{key:"!",img:"tanhao"},{key:"<",img:"lt"},"ll",{key:">",img:"gt"},"gg","leq","geq","mp","cong","equiv","propto","approx","forall","partial","surd","cup","cap","varnothing",{key:"%",img:"baifenhao"},"circ","exists","nexists","in","ni","gets","uparrow","to","downarrow","leftrightarrow","therefore","because",{key:"+",img:"plus"},{key:"-",img:"minus"},"neg","ast","cdot","vdots","ddots","aleph","beth","blacksquare"]})}),r=[{title:"小写",values:["alpha","beta","gamma","delta","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","pi","rho","sigma","tau","upsilon","phi","chi","psi","omega"]},{title:"大写",values:["Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega"]},{title:"变体",values:["digamma","varepsilon","varkappa","varphi","varpi","varrho","varsigma","vartheta"]}],(i=u[2].options.box.group[1].items).push({title:r[0].title,content:l({path:"assets/images/toolbar/char/greek/lower/",values:r[0].values})}),i.push({title:r[1].title,content:l({path:"assets/images/toolbar/char/greek/upper/",values:r[1].values})}),i.push({title:r[2].title,content:l({path:"assets/images/toolbar/char/greek/misc/",values:r[2].values})}),function(){var t=[{title:"求反关系运算符",values:["neq","nless","ngtr","nleq","ngeq","nsim","lneqq","gneqq","nprec","nsucc","notin","nsubseteq","nsupseteq","subsetneq","supsetneq","lnsim","gnsim","precnsim","succnsim","ntriangleleft","ntriangleright","ntrianglelefteq","ntrianglerighteq","nmid","nparallel","nvdash",{key:"\\nVdash",img:"nvdash-1"},{key:"\\nvDash",img:"nvdash-2"},{key:"\\nVDash",img:"nvdash-3"},"nexists"]}];u[2].options.box.group[2].items.push({title:t[0].title,content:l({path:"assets/images/toolbar/char/not/",values:t[0].values})})}(),u[2].options.box.group[3].items.push({title:"字母类符号",content:l({path:"assets/images/toolbar/alphabetic/",values:["aleph","beth","daleth","gimel","complement","ell","eth","hbar","hslash","mho","partial","wp","circledS","Bbbk","Finv","Game","Im","Re"]})}),u[2].options.box.group[4].items.push({title:"箭头",content:l({path:"assets/images/toolbar/arrow/",values:["gets","to","uparrow","downarrow","leftrightarrow","updownarrow",{key:"\\Leftarrow",img:"u-leftarrow"},{key:"\\Rightarrow",img:"u-rightarrow"},{key:"\\Uparrow",img:"u-uparrow"},{key:"\\Downarrow",img:"u-downarrow"},{key:"\\Leftrightarrow",img:"u-leftrightarrow"},{key:"\\Updownarrow",img:"u-updownarrow"},"longleftarrow","longrightarrow","longleftrightarrow",{key:"\\Longleftarrow",img:"u-longleftarrow"},{key:"\\Longrightarrow",img:"u-longrightarrow"},{key:"\\Longleftrightarrow",img:"u-longleftrightarrow"},"nearrow","nwarrow","searrow","swarrow","nleftarrow","nrightarrow",{key:"\\nLeftarrow",img:"u-nleftarrow"},{key:"\\nRightarrow",img:"u-nrightarrow"},{key:"\\nLeftrightarrow",img:"u-nleftrightarrow"},"leftharpoonup","leftharpoondown","rightharpoonup","rightharpoondown","upharpoonleft","upharpoonright","downharpoonleft","downharpoonright","leftrightharpoons","rightleftharpoons","leftleftarrows","rightrightarrows","upuparrows","downdownarrows","leftrightarrows","rightleftarrows","looparrowleft","looparrowright","leftarrowtail","rightarrowtail",{key:"\\Lsh",img:"u-lsh"},{key:"\\Rsh",img:"u-rsh"},{key:"\\Lleftarrow",img:"u-lleftarrow"},{key:"\\Rrightarrow",img:"u-rrightarrow"},"curvearrowleft","curvearrowright","circlearrowleft","circlearrowright","multimap","leftrightsquigarrow","twoheadleftarrow","twoheadrightarrow","rightsquigarrow"]})}),n=[{title:"手写体",values:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]},{title:"花体",values:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]},{title:"双线",values:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]},{title:"罗马",values:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]}],a=u[2].options.box.group[5].items,c.Utils.each(n[0].values,(function(t,e){n[0].values[e]={key:"\\mathcal{"+t+"}",img:t.toLowerCase()}})),c.Utils.each(n[1].values,(function(t,e){n[1].values[e]={key:"\\mathfrak{"+t+"}",img:t.replace(/[A-Z]/,(function(t){return"u"+t.toLowerCase()}))}})),c.Utils.each(n[2].values,(function(t,e){n[2].values[e]={key:"\\mathbb{"+t+"}",img:t.toLowerCase()}})),c.Utils.each(n[3].values,(function(t,e){n[3].values[e]={key:"\\mathrm{"+t+"}",img:t.replace(/[A-Z]/,(function(t){return"u"+t.toLowerCase()}))}})),a.push({title:n[0].title,content:l({path:"assets/images/toolbar/char/cal/",values:n[0].values})}),a.push({title:n[1].title,content:l({path:"assets/images/toolbar/char/frak/",values:n[1].values})}),a.push({title:n[2].title,content:l({path:"assets/images/toolbar/char/bb/",values:n[2].values})}),a.push({title:n[3].title,content:l({path:"assets/images/toolbar/char/rm/",values:n[3].values})}),window.iconConfig=u,u}},t[39]={value:function(e){var r,i,n,a,o,s,c=t.r(45),u=t.r(44),l=t.r(32),h=t.r(37),f=t.r(22),p=[{type:c.DRAPDOWN_BOX,options:{button:{label:"预设<br/>",className:"yushe-btn",icon:{src:"assets/images/toolbar/btn.png",x:0,y:0},iconSize:{w:40}},box:{width:367,group:[{title:"预设公式",items:[{title:"预设公式",content:[{label:"二次公式",item:{val:"x=\\frac {-b\\pm\\sqrt {b^2-4ac}}{2a}"}},{label:"二项式定理",item:{val:"{\\left(x+a\\right)}^2=\\sum^n_{k=0}{\\left(^n_k\\right)x^ka^{n-k}}"}},{label:"勾股定理",item:{val:"a^2+b^2=c^2"}}]}]}]}}},{type:c.DELIMITER},{type:c.AREA,options:{box:{fixOffset:!0,width:527,type:u.OVERLAP,group:[{title:"基础数学",items:[]},{title:"希腊字母",items:[]},{title:"求反关系运算符",items:[]},{title:"字母类符号",items:[]},{title:"箭头",items:[]},{title:"手写体",items:[]}]}}},{type:c.DELIMITER},{type:c.DRAPDOWN_BOX,options:{button:{label:"分数<br/>",icon:{src:"assets/images/toolbar/btn.png",x:45,y:0}},box:{width:332,group:[{title:"分数",items:[{title:"分数",content:[{item:{val:"\\frac \\placeholder\\placeholder"}},{item:{val:"{\\placeholder/\\placeholder}"}}]},{title:"常用分数",content:[{item:{val:"\\frac {dy}{dx}"}},{item:{val:"\\frac {\\Delta y}{\\Delta x}"}},{item:{val:"\\frac {\\delta y}{\\delta x}"}},{item:{val:"\\frac \\pi 2"}}]}]}]}}},{type:c.DRAPDOWN_BOX,options:{button:{label:"上下标<br/>",icon:{src:"assets/images/toolbar/btn.png",x:82,y:0}},box:{width:332,group:[{title:"上标和下标",items:[{title:"上标和下标",content:[{item:{val:"\\placeholder^\\placeholder"}},{item:{val:"\\placeholder_\\placeholder"}},{item:{val:"\\placeholder^\\placeholder_\\placeholder"}},{item:{val:"{^\\placeholder_\\placeholder\\placeholder}"}}]},{title:"常用的上标和下标",content:[{item:{val:"e^{-i\\omega t}"}},{item:{val:"x^2"}},{item:{val:"{}^n_1Y"}}]}]}]}}},{type:c.DRAPDOWN_BOX,options:{button:{label:"根式<br/>",icon:{src:"assets/images/toolbar/btn.png",x:119,y:0}},box:{width:342,group:[{title:"根式",items:[{title:"根式",content:[{item:{val:"\\sqrt \\placeholder"}},{item:{val:"\\sqrt [\\placeholder] \\placeholder"}},{item:{val:"\\sqrt [2] \\placeholder"}},{item:{val:"\\sqrt [3] \\placeholder"}}]},{title:"常用根式",content:[{item:{val:"\\frac {-b\\pm\\sqrt{b^2-4ac}}{2a}"}},{item:{val:"\\sqrt {a^2+b^2}"}}]}]}]}}},{type:c.DRAPDOWN_BOX,options:{button:{label:"积分<br/>",icon:{src:"assets/images/toolbar/btn.png",x:156,y:0}},box:{width:332,group:[{title:"积分",items:[{title:"积分",content:[{item:{val:"\\int \\placeholder"}},{item:{val:"\\int^\\placeholder_\\placeholder\\placeholder"}},{item:{val:"\\iint\\placeholder"}},{item:{val:"\\iint^\\placeholder_\\placeholder\\placeholder"}},{item:{val:"\\iiint\\placeholder"}},{item:{val:"\\iiint^\\placeholder_\\placeholder\\placeholder"}}]}]}]}}},{type:c.DRAPDOWN_BOX,options:{button:{label:"大型<br/>运算符",icon:{src:"assets/images/toolbar/btn.png",x:193,y:0}},box:{width:332,group:[{title:"求和",items:[{title:"求和",content:[{item:{val:"\\sum\\placeholder"}},{item:{val:"\\sum^\\placeholder_\\placeholder\\placeholder"}},{item:{val:"\\sum_\\placeholder\\placeholder"}}]}]}]}}},{type:c.DRAPDOWN_BOX,options:{button:{label:"括号<br/>",icon:{src:"assets/images/toolbar/btn.png",x:230,y:0}},box:{width:332,group:[{title:"方括号",items:[{title:"方括号",content:[{item:{val:"\\left(\\placeholder\\right)"}},{item:{val:"\\left[\\placeholder\\right]"}},{item:{val:"\\left\\{\\placeholder\\right\\}"}},{item:{val:"\\left|\\placeholder\\right|"}}]}]}]}}},{type:c.DRAPDOWN_BOX,options:{button:{label:"函数<br/>",icon:{src:"assets/images/toolbar/btn.png",x:267,y:0}},box:{width:340,group:[{title:"函数",items:[{title:"三角函数",content:[{item:{val:"\\sin\\placeholder"}},{item:{val:"\\cos\\placeholder"}},{item:{val:"\\tan\\placeholder"}},{item:{val:"\\csc\\placeholder"}},{item:{val:"\\sec\\placeholder"}},{item:{val:"\\cot\\placeholder"}}]},{title:"常用函数",content:[{item:{val:"\\sin\\theta"}},{item:{val:"\\cos{2x}"}},{item:{val:"\\tan\\theta=\\frac {\\sin\\theta}{\\cos\\theta}"}}]}]}]}}}];function d(t,e){var r=[];return f.Utils.each(t,(function(t){t.length>1&&(t="\\"+t),r.push({key:t,img:e,pos:l[t]})})),r}return r=[],i=[],f.Utils.each(p,(function(t){t.type!==c.DELIMITER&&(t=t.options.box.group,r=r.concat(t))})),f.Utils.each(r,(function(t){for(var e=0,r=(t=t.items).length;e<r;e++)i=i.concat(t[e].content)})),f.Utils.each(i,(function(t){var e=h[t.item.val];e&&(t.item.img="assets/images/toolbar/other.png",t.item.pos=e.pos,t.item.size=e.size)})),p[2].options.box.group[0].items.push({title:"基础数学",content:d(["pm","infty","=","sim","times","div","!","<","ll",">","gg","leq","geq","mp","cong","equiv","propto","approx","forall","partial","surd","cup","cap","varnothing","%","circ","exists","nexists","in","ni","gets","uparrow","to","downarrow","leftrightarrow","therefore","because","+","-","neg","ast","cdot","vdots","aleph","beth","blacksquare"],"assets/images/toolbar/char.png")}),n=[{title:"小写",values:["alpha","beta","gamma","delta","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","pi","rho","sigma","tau","upsilon","phi","chi","psi","omega"]},{title:"大写",values:["Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega"]},{title:"变体",values:["digamma","varepsilon","varkappa","varphi","varpi","varrho","varsigma","vartheta"]}],(a=p[2].options.box.group[1].items).push({title:n[0].title,content:d(n[0].values,"assets/images/toolbar/char.png")}),a.push({title:n[1].title,content:d(n[1].values,"assets/images/toolbar/char.png")}),a.push({title:n[2].title,content:d(n[2].values,"assets/images/toolbar/char.png")}),function(){var t=[{title:"求反关系运算符",values:["neq","nless","ngtr","nleq","ngeq","nsim","lneqq","gneqq","nprec","nsucc","notin","nsubseteq","nsupseteq","subsetneq","supsetneq","lnsim","gnsim","precnsim","succnsim","ntriangleleft","ntriangleright","ntrianglelefteq","ntrianglerighteq","nmid","nparallel","nvdash","nVdash","nvDash","nVDash","nexists"]}];p[2].options.box.group[2].items.push({title:t[0].title,content:d(t[0].values,"assets/images/toolbar/char.png")})}(),p[2].options.box.group[3].items.push({title:"字母类符号",content:d(["aleph","beth","daleth","gimel","complement","ell","eth","hbar","hslash","mho","partial","wp","circledS","Bbbk","Finv","Game","Im","Re"],"assets/images/toolbar/char.png")}),p[2].options.box.group[4].items.push({title:"箭头",content:d(["gets","to","uparrow","downarrow","leftrightarrow","updownarrow","Leftarrow","Rightarrow","Uparrow","Downarrow","Leftrightarrow","Updownarrow","longleftarrow","longrightarrow","longleftrightarrow","Longleftarrow","Longrightarrow","Longleftrightarrow","nearrow","nwarrow","searrow","swarrow","nleftarrow","nrightarrow","nLeftarrow","nRightarrow","nLeftrightarrow","leftharpoonup","leftharpoondown","rightharpoonup","rightharpoondown","upharpoonleft","upharpoonright","downharpoonleft","downharpoonright","leftrightharpoons","rightleftharpoons","leftleftarrows","rightrightarrows","upuparrows","downdownarrows","leftrightarrows","rightleftarrows","looparrowleft","looparrowright","leftarrowtail","rightarrowtail","Lsh","Rsh","Lleftarrow","Rrightarrow","curvearrowleft","curvearrowright","circlearrowleft","circlearrowright","multimap","leftrightsquigarrow","twoheadleftarrow","twoheadrightarrow","rightsquigarrow"],"assets/images/toolbar/char.png")}),o=[{title:"手写体",values:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]},{title:"花体",values:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]},{title:"双线",values:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]},{title:"罗马",values:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]}],s=p[2].options.box.group[5].items,f.Utils.each(o[0].values,(function(t,e){o[0].values[e]="mathcal{"+t+"}"})),f.Utils.each(o[1].values,(function(t,e){o[1].values[e]="mathfrak{"+t+"}"})),f.Utils.each(o[2].values,(function(t,e){o[2].values[e]="mathbb{"+t+"}"})),f.Utils.each(o[3].values,(function(t,e){o[3].values[e]="mathrm{"+t+"}"})),s.push({title:o[0].title,content:d(o[0].values,"assets/images/toolbar/char.png")}),s.push({title:o[1].title,content:d(o[1].values,"assets/images/toolbar/char.png")}),s.push({title:o[2].title,content:d(o[2].values,"assets/images/toolbar/char.png")}),s.push({title:o[3].title,content:d(o[3].values,"assets/images/toolbar/char.png")}),p}},t[40]={value:function(e){var r=t.r(22),i=t.r(61),n=t.r(60),a=t.r(45),o=r.createClass("Tollbar",{constructor:function(t,e,r){this.kfEditor=e,this.uiComponent=t,this.elementList=r,this.elements=[],this.initToolbarElements(),this.initServices(),this.initEvent()},initServices:function(){this.kfEditor.registerService("ui.toolbar.disable",this,{disableToolbar:this.disableToolbar}),this.kfEditor.registerService("ui.toolbar.enable",this,{enableToolbar:this.enableToolbar}),this.kfEditor.registerService("ui.toolbar.close",this,{closeToolbar:this.closeToolbar})},initEvent:function(){var t=this;n.on(this.uiComponent.toolbarContainer,"mousedown",(function(t){t.preventDefault()})),n.on(this.uiComponent.toolbarContainer,"mousewheel",(function(t){t.preventDefault()})),n.on(this.kfEditor.getContainer(),"mousedown",(function(){t.notify("closeAll")})),n.subscribe("data.select",(function(e){t.insertSource(e)}))},insertSource:function(t){this.kfEditor.requestService("control.insert.string",t)},disableToolbar:function(){r.Utils.each(this.elements,(function(t){t.disable&&t.disable()}))},enableToolbar:function(){r.Utils.each(this.elements,(function(t){t.enable&&t.enable()}))},getContainer:function(){return this.kfEditor.requestService("ui.get.canvas.container")},closeToolbar:function(){this.closeElement()},notify:function(t){switch(t){case"closeAll":case"closeOther":return void this.closeElement(arguments[1])}},closeElement:function(t){r.Utils.each(this.elements,(function(e){e!=t&&e.hide&&e.hide()}))},initToolbarElements:function(){var t=this.elements,e=this.uiComponent.toolbarContainer.ownerDocument,n=this;r.Utils.each(this.elementList,(function(r,o){var s=function(t,e,r){switch(t){case a.DRAPDOWN_BOX:return function(t,e){return new i.DrapdownBox(t,e)}(e,r);case a.DELIMITER:return function(t){return new i.Delimiter(t)}(e);case a.AREA:return function(t,e){return new i.Area(t,e)}(e,r)}}(r.type,e,r.options);t.push(s),n.appendElement(s)}))},appendElement:function(t){t.setToolbar(this),t.attachTo(this.uiComponent.toolbarContainer)}});return o}},t[41]={value:function(e){var r=t.r(22),i="kf-editor-ui-",n=t.r(60),a=t.r(42);return r.createClass("Area",{constructor:function(t,e){this.options=e,this.doc=t,this.toolbar=null,this.disabled=!0,this.panelIndex=0,this.maxPanelIndex=0,this.currentItemCount=0,this.lineMaxCount=9,this.element=this.createArea(),this.container=this.createContainer(),this.panel=this.createPanel(),this.buttonContainer=this.createButtonContainer(),this.button=this.createButton(),this.mountPoint=this.createMountPoint(),this.moveDownButton=this.createMoveDownButton(),this.moveUpButton=this.createMoveUpButton(),this.boxObject=this.createBox(),this.mergeElement(),this.mount(),this.setListener(),this.initEvent()},initEvent:function(){var t=this;n.on(this.button,"mousedown",(function(e){e.preventDefault(),e.stopPropagation(),1!==e.which||t.disabled||(t.showMount(),t.toolbar.notify("closeOther",t))})),n.on(this.moveDownButton,"mousedown",(function(e){e.preventDefault(),e.stopPropagation(),1!==e.which||t.disabled||(t.nextPanel(),t.toolbar.notify("closeOther",t))})),n.on(this.moveUpButton,"mousedown",(function(e){e.preventDefault(),e.stopPropagation(),1!==e.which||t.disabled||(t.prevPanel(),t.toolbar.notify("closeOther",t))})),n.delegate(this.container,".kf-editor-ui-area-item","mousedown",(function(e){e.preventDefault(),1!==e.which||t.disabled||n.publish("data.select",this.getAttribute("data-value"))})),this.boxObject.initEvent()},disable:function(){this.disabled=!0,this.boxObject.disable(),n.getClassList(this.element).remove(i+"enabled")},enable:function(){this.disabled=!1,this.boxObject.enable(),n.getClassList(this.element).add(i+"enabled")},setListener:function(){var t=this;this.boxObject.setSelectHandler((function(e){n.publish("data.select",e),t.hide()})),this.boxObject.setChangeHandler((function(e){t.updateContent()}))},createArea:function(){var t=n.ele(this.doc,"div",{className:i+"area"});return"width"in this.options&&(t.style.width=this.options.width+"px"),t},checkMaxPanelIndex:function(){this.maxPanelIndex=Math.ceil(this.currentItemCount/this.lineMaxCount/2)},updateContent:function(){var t=this.boxObject.getOverlapContent(),e=0,n=null,a=0,o=0,s=this.lineMaxCount,c=[];this.panel.innerHTML="",r.Utils.each(t,(function(t){var u=t.content;r.Utils.each(u,(function(t,r){a=Math.floor(e/s),o=e%s,e++,n="top: "+(33*a+5)+"px; left: "+(32*o+5)+"px;",c.push('<div class="'+i+'area-item" data-value="'+t.key+'" style="'+n+'"><div class="'+i+'area-item-inner"><div class="'+i+'area-item-img" style="background: url('+t.img+") no-repeat "+-t.pos.x+"px "+-t.pos.y+'px;"></div></div></div>')}))})),this.currentItemCount=e,this.panelIndex=0,this.panel.style.top=0,this.panel.innerHTML=c.join(""),this.checkMaxPanelIndex(),this.updatePanelButtonState()},mount:function(){this.boxObject.mountTo(this.mountPoint)},showMount:function(){this.mountPoint.style.display="block",this.boxObject.updateSize()},hideMount:function(){this.mountPoint.style.display="none"},hide:function(){this.hideMount(),this.boxObject.hide()},createButton:function(){return n.ele(this.doc,"div",{className:i+"area-button"})},createMoveDownButton:function(){return n.ele(this.doc,"div",{className:i+"movedown-button",content:""})},createMoveUpButton:function(){return n.ele(this.doc,"div",{className:i+"moveup-button",content:""})},createMountPoint:function(){return n.ele(this.doc,"div",{className:i+"area-mount"})},createBox:function(){return new a(this.doc,this.options.box)},createContainer:function(){return n.ele(this.doc,"div",{className:i+"area-container"})},createPanel:function(){return n.ele(this.doc,"div",{className:i+"area-panel"})},createButtonContainer:function(){return n.ele(this.doc,"div",{className:i+"area-button-container"})},mergeElement:function(){this.buttonContainer.appendChild(this.moveUpButton),this.buttonContainer.appendChild(this.moveDownButton),this.buttonContainer.appendChild(this.button),this.container.appendChild(this.panel),this.element.appendChild(this.container),this.element.appendChild(this.buttonContainer),this.element.appendChild(this.mountPoint)},disablePanelUp:function(){this.disabledUp=!0,n.getClassList(this.moveUpButton).add("kf-editor-ui-disabled")},enablePanelUp:function(){this.disabledUp=!1,n.getClassList(this.moveUpButton).remove("kf-editor-ui-disabled")},disablePanelDown:function(){this.disabledDown=!0,n.getClassList(this.moveDownButton).add("kf-editor-ui-disabled")},enablePanelDown:function(){this.disabledDown=!1,n.getClassList(this.moveDownButton).remove("kf-editor-ui-disabled")},updatePanelButtonState:function(){0===this.panelIndex?this.disablePanelUp():this.enablePanelUp(),this.panelIndex+1>=this.maxPanelIndex?this.disablePanelDown():this.enablePanelDown()},nextPanel:function(){this.disabledDown||this.panelIndex+1>=this.maxPanelIndex||(this.panelIndex++,this.panel.style.top=66*-this.panelIndex+"px",this.updatePanelButtonState())},prevPanel:function(){this.disabledUp||0!==this.panelIndex&&(this.panelIndex--,this.panel.style.top=66*-this.panelIndex+"px",this.updatePanelButtonState())},setToolbar:function(t){this.toolbar=t,this.boxObject.setToolbar(t)},attachTo:function(t){t.appendChild(this.element),this.updateContent(),this.updatePanelButtonState()}})}},t[42]={value:function(e){var r=t.r(22),i="kf-editor-ui-",n=t.r(60),a=t.r(44),o=t.r(46),s=t.r(43),c=t.r(58),u=r.createClass("Box",{constructor:function(t,e){this.options=e,this.toolbar=null,this.options.type=this.options.type||a.DETACHED,this.doc=t,this.itemPanels=null,this.overlapButtonObject=null,this.overlapIndex=-1,this.element=this.createBox(),this.groupContainer=this.createGroupContainer(),this.itemGroups=this.createItemGroup(),this.mergeElement()},createBox:function(){var t=n.ele(this.doc,"div",{className:i+"box"});return"width"in this.options&&(t.style.width=this.options.width+"px"),t},setToolbar:function(t){this.toolbar=t,this.overlapButtonObject&&this.overlapButtonObject.setToolbar(t)},updateSize:function(){var t=n.getRectBox(this.toolbar.getContainer()),e=n.getRectBox(this.element);if(this.options.type===a.DETACHED){if(e.bottom<=t.bottom)return void(this.element.scrollTop=0);this.element.style.height=e.height-(e.bottom-t.bottom+30)+"px"}else{var r,i=this.getCurrentItemPanel();if(i.scrollTop=0,e.bottom<=t.bottom)return;r=i.getBoundingClientRect(),i.style.height=t.bottom-r.top-30+"px"}},initEvent:function(){var t=this;n.delegate(this.groupContainer,".kf-editor-ui-box-item","mousedown",(function(e){e.preventDefault(),1===e.which&&t.onselectHandler&&t.onselectHandler(this.getAttribute("data-value"))})),n.on(this.element,"mousedown",(function(t){t.stopPropagation(),t.preventDefault()})),n.on(this.element,"mousewheel",(function(e){e.preventDefault(),e.stopPropagation(),t.scroll(e.originalEvent.wheelDelta)}))},getNode:function(){return this.element},setSelectHandler:function(t){this.onselectHandler=t},scroll:function(t){t<0?this.scrollDown():(this.scrollUp(),this.element.scrollTop-=20)},scrollDown:function(){this.options.type===a.DETACHED?this.element.scrollTop+=20:this.getCurrentItemPanel().scrollTop+=20},scrollUp:function(){this.options.type===a.DETACHED?this.element.scrollTop-=20:this.getCurrentItemPanel().scrollTop-=20},setChangeHandler:function(t){this.onchangeHandler=t},onchangeHandler:function(t){},createGroupContainer:function(){return n.ele(this.doc,"div",{className:i+"box-container"})},getPositionInfo:function(){return n.getRectBox(this.element)},createItemGroup:function(){var t=this.createGroup();switch(this.options.type){case a.DETACHED:return t.items[0];case a.OVERLAP:return this.createOverlapGroup(t)}return null},enable:function(){this.overlapButtonObject&&this.overlapButtonObject.enable()},disable:function(){this.overlapButtonObject&&this.overlapButtonObject.disable()},hide:function(){this.overlapButtonObject&&this.overlapButtonObject.hideMount()},getOverlapContent:function(){return this.options.type!==a.OVERLAP?null:this.options.group[this.overlapIndex].items},createOverlapGroup:function(t){var e,a=t.title,o=this,u=(e=this.doc,n.ele(e,"div",{className:i+"overlap-container"})),l=function(t,e){return new s(t,{className:"overlap-button",label:"",fixOffset:e.fixOffset})}(this.doc,{fixOffset:this.options.fixOffset}),h=function(t,e){return new c(t,e)}(this.doc,{width:150,items:a}),f=n.ele(this.doc,"div",{className:i+"wrap-group"});return this.overlapButtonObject=l,l.mount(h),l.initEvent(),h.initEvent(),r.Utils.each(t.items,(function(e,i){var n=f.cloneNode(!1);r.Utils.each(e,(function(t){n.appendChild(t)})),t.items[i]=n})),this.itemPanels=t.items,h.setSelectHandler((function(e,r){o.overlapIndex=e,l.setLabel(a[e]),l.hideMount(),t.items[r].style.display="none",t.items[e].style.display="block",e!==r&&o.updateSize(),o.onchangeHandler(e)})),u.appendChild(l.getNode()),r.Utils.each(t.items,(function(t,e){e>0&&(t.style.display="none"),u.appendChild(t)})),h.select(0),[u]},getCurrentItemPanel:function(){return this.itemPanels[this.overlapIndex]},getGroupList:function(){var t=[];return r.Utils.each(this.options.group,(function(e,r){t.push(e.title)})),{width:150,items:t}},createGroup:function(){var t=this.doc,e=[],s={title:[],items:[]},c=null,u=null,h=a.DETACHED===this.options.type?o.BIG:o.SMALL,f=null;return c=n.ele(this.doc,"div",{className:i+"box-group"}),(f=c.cloneNode(!1)).className=i+"box-group-item-container",r.Utils.each(this.options.group,(function(a,o){s.title.push(a.title||""),e=[],r.Utils.each(a.items,(function(a){c=c.cloneNode(!1),f=f.cloneNode(!1),u=n.ele(t,"div",{className:i+"box-group-title",content:a.title}),c.appendChild(u),c.appendChild(f),r.Utils.each(function(t,e,i){var n=[];return r.Utils.each(e,(function(e,r){n.push(new l(i,t,e))})),n}(t,a.content,h),(function(t){t.appendTo(f)})),e.push(c)})),s.items.push(e)})),s},mergeElement:function(){var t=this.groupContainer;this.element.appendChild(t),r.Utils.each(this.itemGroups,(function(e){t.appendChild(e)}))},mountTo:function(t){t.appendChild(this.element)},appendTo:function(t){t.appendChild(this.element)}}),l=r.createClass("BoxItem",{constructor:function(t,e,r){this.type=t,this.doc=e,this.options=r,this.element=this.createItem(),this.labelNode=this.createLabel(),this.contentNode=this.createContent(),this.mergeElement()},getNode:function(){return this.element},createItem:function(){return n.ele(this.doc,"div",{className:i+"box-item"})},createLabel:function(){if("label"in this.options)return n.ele(this.doc,"div",{className:i+"box-item-label",content:this.options.label})},getContent:function(){},createContent:function(){switch(this.type){case o.BIG:return this.createBigContent();case o.SMALL:return this.createSmallContent()}},createBigContent:function(){var t,e,r=this.doc,a=n.ele(r,"div",{className:i+"box-item-content"}),o=this.options.item,s=null,c=(e="background: url( "+(t=o).img+" ) no-repeat ",e+=-t.pos.x+"px ",e+=-t.pos.y+"px;",e+=" width: "+t.size.width+"px;",e+=" height: "+t.size.height+"px;");return(s=n.ele(r,"div",{className:"kf-editor-ui-box-item-val"})).innerHTML='<div class="'+i+'item-image" style="'+c+'"></div>',this.element.setAttribute("data-value",o.val),a.appendChild(s),a},createSmallContent:function(){var t=this.doc,e=n.ele(t,"div",{className:i+"box-item-content"}),r=this.options,a=null;return(a=n.ele(t,"div",{className:"kf-editor-ui-box-item-val"})).style.background="url( "+r.img+" )",a.style.backgroundPosition=-r.pos.x+"px "+-r.pos.y+"px",this.element.setAttribute("data-value",r.key),e.appendChild(a),e},mergeElement:function(){this.labelNode&&this.element.appendChild(this.labelNode),this.element.appendChild(this.contentNode)},appendTo:function(t){t.appendChild(this.element)}});return u}},t[43]={value:function(e){var r=t.r(22),i="kf-editor-ui-",n={iconSize:{w:32,h:32}},a=t.r(60);return r.createClass("Button",{constructor:function(t,e){this.options=r.Utils.extend({},n,e),this.eventState=!1,this.toolbar=null,this.displayState=!1,this.fixOffset=e.fixOffset||!1,this.doc=t,this.element=this.createButton(),this.disabled=!0,this.mountElement=null,this.icon=this.createIcon(),this.label=this.createLabel(),this.sign=this.createSign(),this.mountPoint=this.createMountPoint(),this.mergeElement()},initEvent:function(){var t=this;this.eventState||(this.eventState=!0,a.on(this.element,"mousedown",(function(e){e.preventDefault(),e.stopPropagation(),1===e.which&&(t.disabled||(t.toggleSelect(),t.toggleMountElement()))})))},setToolbar:function(t){this.toolbar=t},toggleMountElement:function(){this.displayState?this.hideMount():this.showMount()},setLabel:function(t){var e="";this.sign&&(e='<div class="'+i+'button-sign"></div>'),this.label.innerHTML=t+e},toggleSelect:function(){a.getClassList(this.element).toggle(i+"button-in")},unselect:function(){a.getClassList(this.element).remove(i+"button-in")},select:function(){a.getClassList(this.element).add(i+"button-in")},show:function(){this.select(),this.showMount()},hide:function(){this.unselect(),this.hideMount()},showMount:function(){if(this.displayState=!0,this.mountPoint.style.display="block",this.fixOffset){var t=this.element.getBoundingClientRect();this.mountElement.setOffset(t.left+7,t.bottom)}var e=this.toolbar.getContainer(),r=null,i=a.getRectBox(e),n=this.mountElement.getPositionInfo();n.right>i.right&&(r=a.getRectBox(this.element),this.mountPoint.style.left=r.right-n.right-1+"px"),this.mountElement.updateSize&&this.mountElement.updateSize()},hideMount:function(){this.displayState=!1,this.mountPoint.style.display="none"},getNode:function(){return this.element},mount:function(t){this.mountElement=t,t.mountTo(this.mountPoint)},createButton:function(){var t=a.ele(this.doc,"div",{className:i+"button"});return this.options.className&&(t.className+=" "+i+this.options.className),t},createIcon:function(){if(!this.options.icon)return null;var t,e,r=a.ele(this.doc,"div",{className:i+"button-icon"});return"string"==typeof this.options.icon?r.style.backgroundImage="url("+this.options.icon+") no-repeat":r.style.background=(e="url( "+(t=this.options.icon).src+" ) no-repeat ",e+=-t.x+"px ",e+=-t.y+"px"),this.options.iconSize.w&&(r.style.width=this.options.iconSize.w+"px"),this.options.iconSize.h&&(r.style.height=this.options.iconSize.h+"px"),r},createLabel:function(){return a.ele(this.doc,"div",{className:i+"button-label",content:this.options.label})},createSign:function(){return!1===this.options.sign?null:a.ele(this.doc,"div",{className:i+"button-sign"})},createMountPoint:function(){return a.ele(this.doc,"div",{className:i+"button-mount-point"})},disable:function(){this.disabled=!0,a.getClassList(this.element).remove(i+"enabled")},enable:function(){this.disabled=!1,a.getClassList(this.element).add(i+"enabled")},mergeElement:function(){this.icon&&this.element.appendChild(this.icon),this.element.appendChild(this.label),this.sign&&this.label.appendChild(this.sign),this.element.appendChild(this.mountPoint)}})}},t[44]={value:function(t){return{DETACHED:1,OVERLAP:2}}},t[45]={value:function(t){return{DRAPDOWN_BOX:1,AREA:2,DELIMITER:3,KEYBOARD:4}}},t[46]={value:function(t){return{BIG:1,SMALL:2}}},t[47]={value:function(e){var r=t.r(22),i="kf-editor-ui-",n=t.r(60);return r.createClass("Delimiter",{constructor:function(t){this.doc=t,this.element=this.createDilimiter()},setToolbar:function(t){},createDilimiter:function(){var t=n.ele(this.doc,"div",{className:i+"delimiter"});return t.appendChild(n.ele(this.doc,"div",{className:i+"delimiter-line"})),t},attachTo:function(t){t.appendChild(this.element)}})}},t[48]={value:function(e){var r=t.r(22),i=t.r(60),n=t.r(43),a=t.r(42);return r.createClass("DrapdownBox",{constructor:function(t,e){this.options=e,this.toolbar=null,this.doc=t,this.buttonElement=this.createButton(),this.element=this.buttonElement.getNode(),this.boxElement=this.createBox(),this.buttonElement.mount(this.boxElement),this.initEvent()},initEvent:function(){var t=this;i.on(this.element,"mousedown",(function(e){e.preventDefault(),e.stopPropagation(),t.toolbar.notify("closeOther",t)})),this.buttonElement.initEvent(),this.boxElement.initEvent(),this.boxElement.setSelectHandler((function(e){i.publish("data.select",e),t.buttonElement.hide()}))},disable:function(){this.buttonElement.disable()},enable:function(){this.buttonElement.enable()},setToolbar:function(t){this.toolbar=t,this.buttonElement.setToolbar(t),this.boxElement.setToolbar(t)},createButton:function(){return new n(this.doc,this.options.button)},show:function(){this.buttonElement.show()},hide:function(){this.buttonElement.hide()},createBox:function(){return new a(this.doc,this.options.box)},attachTo:function(t){t.appendChild(this.element)}})}},t[49]={value:function(t){return{Type:{Common:"common",Algebra:"algebra",Geometry:"geometry",Unit:"unit",Other:"other",Letter:"letter"}}}},t[50]={value:function(e){var r=t.r(22),i=t.r(60);return r.createClass("Footer",{constructor:function(t,e){this.parentNode=t,this.props=e,this.prefix=e.prefix+"keyboard-footer",this.state={},this.containerClassName=this.prefix,this.itemClassName="".concat(this.prefix,"-button"),this.cancelClassName="".concat(this.itemClassName,"-cancel"),this.submitClassName="".concat(this.itemClassName,"-submit"),this._onSubmit=this._onSubmit.bind(this),this._onCancel=this._onCancel.bind(this)},_render:function(){return i.ele(this.props.doc,"div",{className:this.containerClassName,content:'\n <div id="'.concat(this.cancelClassName,'">\n <span>取消</span>\n </div>\n <div id="').concat(this.submitClassName,'">\n <span>确定</span>\n </div>\n ')})},mount:function(){var t=this._render();i.delegate(this.parentNode,"#".concat(this.cancelClassName),"click",this._onCancel),i.delegate(this.parentNode,"#".concat(this.submitClassName),"click",this._onSubmit),this.parentNode.appendChild(t)},_onCancel:function(t){console.log("cancel"),this.props.onCancel()},_onSubmit:function(t){console.log("submit"),this.props.onSubmit()}})}},t[51]={value:function(e){var r=t.r(22),i="kf-editor-ui-",n=t.r(60),s=t.r(52),c=t.r(55),u=t.r(53),l=t.r(49),h=t.r(56),f=t.r(54),p=t.r(50);return r.createClass("Keyboard",{constructor:function(t,e){var r;this.doc=t,this.kfEditor=e,this.pageSize="android"===this.getDeviceType()?32:40,this.panelConstant=this.getConstant(),this.typeEnum=(o(r={},l.Type.Common,0),o(r,l.Type.Algebra,1),o(r,l.Type.Geometry,2),o(r,l.Type.Letter,3),o(r,l.Type.Other,4),o(r,0,l.Type.Common),o(r,1,l.Type.Algebra),o(r,2,l.Type.Geometry),o(r,3,l.Type.Letter),o(r,4,l.Type.Other),r),this.state={type:l.Type.Common,page:0,totalPage:this.getTotalPage(this.panelConstant[0].items.length)},this.element=this.render(),this.menuChild=new s(this.element,{type:this.state.type,prefix:i,doc:this.doc,kfEditor:this.kfEditor,onClick:this.onMenuClick.bind(this)}),this.panelChild=new c(this.element,{type:this.state.type,page:this.state.page,prefix:i,doc:this.doc,kfEditor:this.kfEditor,panelConstant:this.panelConstant,rowHeight:"android"===this.getDeviceType()?146:63,scrollHeight:"android"===this.getDeviceType()?584:315,onClick:this.onPanelClick.bind(this)}),this.pageChild=new u(this.element,{type:this.state.type,page:this.state.page,totalPage:this.state.totalPage,prefix:i,doc:this.doc,kfEditor:this.kfEditor,onPrevPage:this.onPrevPage.bind(this),onNextPage:this.onNextPage.bind(this),onDelete:this.onDelete.bind(this),onSubmit:this.onSubmit.bind(this)}),this.footerChild=new p(this.element,{prefix:i,doc:this.doc,onSubmit:this.onSubmit.bind(this),onCancel:this.onCancel.bind(this)}),this.renderKeyboard(),this.sendService()},sendService:function(){this.kfEditor.eclassWebService.send({type:"common.setType",data:{body:{type:this.state.type}}})},renderKeyboard:function(){this.menuChild.mount(),this.panelChild.mount(),this.pageChild.mount(),this.footerChild.mount()},onMenuClick:function(t){var e=this.panelConstant.find((function(e){return e.type===t}))||{},r=e.items?e.items.length:0;this.kfEditor.eclassWebService.send({type:"common.setType",data:{body:{type:t}}}),this.setState({type:t,page:0,totalPage:this.getTotalPage(r)})},onPanelClick:function(t){n.publish("panel.select",t)},onPrevPage:function(){var t=this.state,e=t.page,r=t.type;0===e&&r===l.Type.Common||(0!==e?this.setState({page:e-1}):this._prevMode(r))},onNextPage:function(){var t=this.state,e=t.page,r=t.type,i=t.totalPage;e===i-1&&r===l.Type.Other||(e!==i-1?this.setState({page:e+1}):this._nextMode(r))},onDelete:function(){this.kfEditor.requestService("control.delete.string")},onSubmit:function(){var t=this;this.kfEditor.execCommand("get.image.data",(function(e){var r=t.kfEditor.execCommand("get.source");t.kfEditor.eclassWebService.send({type:"common.setFormula",data:{body:{formulaSrc:e.img,formula:r}}})}))},onCancel:function(){this.kfEditor.eclassWebService.send({type:"common.closeModal"})},render:function(){return n.ele(this.doc,"div",{className:i+"keyboard"})},setState:function(t){this.state=a(a({},this.state),t),this.menuChild.update(this.state),this.panelChild.update(this.state),this.pageChild.update(this.state)},getTotalPage:function(t){return Math.ceil(t/this.pageSize)||1},getDeviceType:function(){return this.kfEditor.options.ui.device},getConstant:function(){switch(this.getDeviceType()){case"android":return f;case"pc":return h}},attachTo:function(t){t.appendChild(this.element)},_prevMode:function(t){var e=this.typeEnum[this.typeEnum[t]-1],r=this.panelConstant.find((function(t){return t.type===e}))||{},i=r.items?r.items.length:0;this.setState({type:e,page:0,totalPage:this.getTotalPage(i)})},_nextMode:function(t){var e=this.typeEnum[this.typeEnum[t]+1],r=this.panelConstant.find((function(t){return t.type===e}))||{},i=r.items?r.items.length:0;this.setState({type:e,page:0,totalPage:this.getTotalPage(i)})}})}},t[52]={value:function(e){var r=t.r(22),i=t.r(60),n=t.r(49);return r.createClass("Menu",{constructor:function(t,e){this.parentNode=t,this.props=e,this.prefix=e.prefix+"keyboard-menu",this.elementList=[{type:n.Type.Common,title:"常用",index:0},{type:n.Type.Algebra,title:"代数",index:1},{type:n.Type.Geometry,title:"几何",index:2},{type:n.Type.Letter,title:"字母",index:3},{type:n.Type.Other,title:"其他",index:4}],this.state={type:n.Type.Common},this.containerClassName=this.prefix,this.listClassName="".concat(this.prefix,"-list"),this.itemClassName="".concat(this.prefix,"-list-item"),this._onClick=this._onClick.bind(this),this._initCommand.call(this)},_render:function(){var t=this;return i.ele(this.props.doc,"div",{className:this.containerClassName,content:'\n <ul id="'.concat(this.prefix,'" class="').concat(this.listClassName,'">\n ').concat(this.elementList.map((function(r){return'<li class="'.concat(t.itemClassName," ").concat(e.call(t,r.type)?t.itemClassName+"-active":"",'" data-value="').concat(r.type,'">').concat(r.title,"</li>")})).join(""),"\n </ul>\n ")});function e(t){return t===this.state.type}},mount:function(){var t=this._render();i.delegate(this.parentNode,"."+this.itemClassName,"click",this._onClick),this.parentNode.appendChild(t)},destroy:function(){$(this.parentNode).find(this.prefix).remove()},update:function(t){var e=this;if(this._shouldUpdate(t)){Object.keys(t).filter((function(t){return t in e.props})).forEach((function(r){return e._setState(o({},r,t[r]))}));var r=this._render();$("."+this.prefix).html(r)}},_shouldUpdate:function(t){var e=this;return!Object.keys(this.state).every((function(r){return t[r]===e.state[r]}))},_initCommand:function(){this.props.kfEditor.registerCommand("menu.clearType",this,(function(){this.props.onClick(n.Type.Common)}))},_onClick:function(t){var e=t.target.dataset.value;this.props.onClick(e)},_setState:function(t){this.state=a(a({},this.state),t)}})}},t[53]={value:function(e){var r=t.r(22),i=t.r(60);return r.createClass("Page",{constructor:function(t,e){this.parentNode=t,this.props=e,this.prefix=e.prefix+"keyboard-page",this.elementList=[{type:"prev",title:"上一页",index:0},{type:"next",title:"下一页",index:1}],this.state={type:this.props.type,page:this.props.page,totalPage:this.props.totalPage},this.containerClassName=this.prefix,this.listClassName="".concat(this.prefix,"-list"),this.itemClassName="".concat(this.prefix,"-list-item"),this._onClick=this._onClick.bind(this)},_render:function(){var t=this;return i.ele(this.props.doc,"div",{className:this.containerClassName,content:'\n <ul id="'.concat(this.prefix,'" class="').concat(this.listClassName,'">\n <li class="').concat(this.itemClassName," ").concat(this.itemClassName,'-delete" data-value="delete"></li>\n ').concat(this.elementList.map((function(r){return'<li class="'.concat(t.itemClassName," ").concat(t.itemClassName,"-").concat(r.type," ").concat(e.call(t,r.type)?t.itemClassName+"-disabled":"",'" data-value="').concat(r.type,'"></li>')})).join(""),'\n <li class="').concat(this.itemClassName," ").concat(this.itemClassName,'-ok" data-value="submit">完成</li>\n </ul>\n ')});function e(t){return"prev"===t?0===this.state.page&&"common"===this.state.type:"next"===t?this.state.page===this.state.totalPage-1&&"other"===this.state.type:void 0}},mount:function(){var t=this._render();i.delegate(this.parentNode,"."+this.itemClassName,"click",this._onClick),this.parentNode.appendChild(t)},update:function(t){var e=this;if(this._shouldUpdate(t)){Object.keys(t).filter((function(t){return t in e.state})).forEach((function(r){return e._setState(o({},r,t[r]))}));var r=this._render();$("."+this.prefix).html(r)}},_shouldUpdate:function(t){var e=this;return!Object.keys(this.state).every((function(r){return t[r]===e.state[r]}))},_onClick:function(t){switch(t.target.dataset.value){case"next":this.props.onNextPage();break;case"prev":this.props.onPrevPage();break;case"delete":this.props.onDelete();break;case"submit":this.props.onSubmit()}},_setState:function(t){this.state=a(a({},this.state),t)}})}},t[54]={value:function(e){var r=t.r(22),i=t.r(57),n=[{type:"common",title:"常用",index:0,items:[]},{type:"algebra",title:"代数",index:1,items:[]},{type:"geometry",title:"几何",index:2,items:[]},{type:"letter",title:"字母",index:3,items:[]},{type:"other",title:"其他",index:4,items:[]}];function a(t,e){var n=[];return r.Utils.each(t,(function(t){var r=i[t]||{x:0,y:0},a={x:172*r.x,y:146*r.y+26};n.push({key:t,img:e,pos:a})})),n}return n[0].items=a(["<","\\frac \\placeholder\\placeholder","\\sqrt \\placeholder","a","+","7","8","9",">","\\left|\\placeholder\\right|","\\placeholder^2","b","-","4","5","6","\\leq","\\left(\\placeholder\\right)","\\sqrt [3] \\placeholder","x","\\pm","1","2","3","\\geq","%","\\placeholder^3","y",",","0",".","="],"https://store-g1.seewo.com/easiclass-public/ec4941099e30462b935956b413e3ca8d"),n[1].items=a(["\\times","\\div","\\approx","\\neq","\\sqrt [\\placeholder] \\placeholder","\\pi","\\delta","\\left[\\placeholder\\right]","\\placeholder^\\placeholder","\\placeholder_\\placeholder","{^\\placeholder_\\placeholder\\placeholder}","\\placeholder^\\placeholder_\\placeholder","\\sum\\placeholder","\\sum_\\placeholder\\placeholder","\\sum^\\placeholder_\\placeholder\\placeholder","\\int \\placeholder","\\int^\\placeholder_\\placeholder\\placeholder","\\iint\\placeholder","\\iint^\\placeholder_\\placeholder\\placeholder","\\iiint\\placeholder","\\iiint^\\placeholder_\\placeholder\\placeholder","\\log\\placeholder","\\ln\\placeholder","\\land","\\lor","\\neg","\\forall","\\exists","\\infty","\\cup","\\cap","\\in","\\notin","\\subset","\\subseteq","\\supset","\\supseteq","\\varnothing","\\cdot","\\colon"],"https://store-g1.seewo.com/easiclass-public/ec4941099e30462b935956b413e3ca8d"),n[2].items=a(["\\sin\\placeholder","\\cos\\placeholder","\\tan\\placeholder","\\sec\\placeholder","\\csc\\placeholder","\\cot\\placeholder","\\arcsin\\placeholder","\\arccos\\placeholder","\\arctan\\placeholder","\\triangle","\\sim","\\cong","\\angle","\\bot","\\alpha","\\beta","\\gamma","\\theta","\\degree","\\bigcirc"],"https://store-g1.seewo.com/easiclass-public/ec4941099e30462b935956b413e3ca8d"),n[3].items=a(["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],"https://store-g1.seewo.com/easiclass-public/ec4941099e30462b935956b413e3ca8d"),n[4].items=a(["\\Omega","\\because","\\therefore","\\Longrightarrow","\\Leftrightarrow","\\uparrow","\\downarrow","\\lambda","\\kappa","\\mu","\\rho","\\sigma","\\tau","\\upsilon","\\varphi","\\Psi","\\omega","\\varepsilon","\\zeta","\\eta","\\nu","\\xi","\\chi"],"https://store-g1.seewo.com/easiclass-public/ec4941099e30462b935956b413e3ca8d"),n}},t[55]={value:function(e){var r=t.r(22),i=t.r(60);return r.createClass("Panel",{constructor:function(t,e){this.parentNode=t,this.props=e,this.prefix=e.prefix+"keyboard-panel",this.scrollHeight=e.scrollHeight,this.rowHeight=e.rowHeight,this.state={type:this.props.type,page:this.props.page},this.containerClassName=this.prefix,this.listClassName="".concat(this.prefix,"-list"),this.itemClassName="".concat(this.prefix,"-list-item"),this._onClick=this._onClick.bind(this)},_calculateHeight:function(t,e){var r=this.props.panelConstant.findIndex((function(e){return e.type===t}))||0;return(this.props.panelConstant.slice(0,r)||this.props.panelConstant[0]).reduce((function(t,e,r){return t+Math.ceil(e.items.length/8)}),0)*this.rowHeight+e*this.scrollHeight},_render:function(){var t=this,e=this.props.panelConstant.reduce((function(t,e,r){var i=e.items.length%8,n=i?new Array(8-i).fill(""):[];return t.concat(e.items,n)}),[]).reduce((function(t,e,r){var i=Math.floor(r/8),n=Math.floor(r%8);return t[i]||(t[i]=[]),t[i][n]=e,t}),[]);return i.ele(this.props.doc,"div",{className:this.containerClassName,content:'\n <table id="'.concat(this.listClassName,'" class="').concat(this.listClassName,'" style="top: -').concat(this._calculateHeight(this.state.type,this.state.page),'px" cellspacing="0" cellpadding="0">\n ').concat(e.map((function(e){return"<tr>"+e.map((function(e){return e?"<td class='".concat(t.itemClassName,"' style=\"background-image: url(").concat(e.img,");background-position: ").concat(-e.pos.x,"px ").concat(-e.pos.y,'px" data-value="').concat(e.key,'" />'):null})).join("")+"</tr>"})).join(""),"\n </table>\n ")})},mount:function(){var t=this._render();i.delegate(this.parentNode,"."+this.itemClassName,"click",this._onClick),this.parentNode.appendChild(t)},update:function(t){$("#"+this.listClassName).css("top","-".concat(this._calculateHeight(t.type,t.page),"px")),this._setState({type:t.type,page:t.page})},_onClick:function(t){var e=t.target.dataset.value;this.props.onClick(e)},_setState:function(t){this.state=a(a({},this.state),t)}})}},t[56]={value:function(e){var r=t.r(22),i=t.r(57),n=[{type:"common",title:"常用",index:0,items:[]},{type:"algebra",title:"代数",index:1,items:[]},{type:"geometry",title:"几何",index:2,items:[]},{type:"letter",title:"字母",index:3,items:[]},{type:"other",title:"其他",index:4,items:[]}];function a(t,e){var n=[];return r.Utils.each(t,(function(t){var r=i[t]||{x:0,y:0},a={x:83*r.x,y:65*r.y};n.push({key:t,img:e,pos:a})})),n}return n[0].items=a(["<","\\frac \\placeholder\\placeholder","\\sqrt \\placeholder","a","+","7","8","9",">","\\left|\\placeholder\\right|","\\placeholder^2","b","-","4","5","6","\\leq","\\left(\\placeholder\\right)","\\sqrt [3] \\placeholder","x","\\pm","1","2","3","\\geq","%","\\placeholder^3","y",",","0",".","="],"https://store-g1.seewo.com/easiclass-public/a7da75a0d13c427eb7299fac9f634783"),n[1].items=a(["\\times","\\div","\\approx","\\neq","\\sqrt [\\placeholder] \\placeholder","\\pi","\\delta","\\left[\\placeholder\\right]","\\placeholder^\\placeholder","\\placeholder_\\placeholder","{^\\placeholder_\\placeholder\\placeholder}","\\placeholder^\\placeholder_\\placeholder","\\sum\\placeholder","\\sum_\\placeholder\\placeholder","\\sum^\\placeholder_\\placeholder\\placeholder","\\int \\placeholder","\\int^\\placeholder_\\placeholder\\placeholder","\\iint\\placeholder","\\iint^\\placeholder_\\placeholder\\placeholder","\\iiint\\placeholder","\\iiint^\\placeholder_\\placeholder\\placeholder","\\log\\placeholder","\\ln\\placeholder","\\land","\\lor","\\neg","\\forall","\\exists","\\infty","\\cup","\\cap","\\in","\\notin","\\subset","\\subseteq","\\supset","\\supseteq","\\varnothing","\\cdot","\\colon"],"https://store-g1.seewo.com/easiclass-public/a7da75a0d13c427eb7299fac9f634783"),n[2].items=a(["\\sin\\placeholder","\\cos\\placeholder","\\tan\\placeholder","\\sec\\placeholder","\\csc\\placeholder","\\cot\\placeholder","\\arcsin\\placeholder","\\arccos\\placeholder","\\arctan\\placeholder","\\triangle","\\sim","\\cong","\\angle","\\bot","\\alpha","\\beta","\\gamma","\\theta","\\degree","\\bigcirc"],"https://store-g1.seewo.com/easiclass-public/a7da75a0d13c427eb7299fac9f634783"),n[3].items=a(["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],"https://store-g1.seewo.com/easiclass-public/a7da75a0d13c427eb7299fac9f634783"),n[4].items=a(["\\Omega","\\because","\\therefore","\\Longrightarrow","\\Leftrightarrow","\\uparrow","\\downarrow","\\lambda","\\kappa","\\mu","\\rho","\\sigma","\\tau","\\upsilon","\\varphi","\\Psi","\\omega","\\varepsilon","\\zeta","\\eta","\\nu","\\xi","\\chi"],"https://store-g1.seewo.com/easiclass-public/a7da75a0d13c427eb7299fac9f634783"),n}},t[57]={value:function(){var t;return o(t={"<":{x:0,y:0},"\\frac \\placeholder\\placeholder":{x:1,y:0},"\\sqrt \\placeholder":{x:2,y:0},a:{x:3,y:0},"+":{x:4,y:0},7:{x:5,y:0},8:{x:6,y:0},9:{x:7,y:0},">":{x:0,y:1},"\\left|\\placeholder\\right|":{x:1,y:1},"\\placeholder^2":{x:2,y:1},b:{x:3,y:1},"-":{x:4,y:1},4:{x:5,y:1},5:{x:6,y:1},6:{x:7,y:1},"\\leq":{x:0,y:2},"\\left(\\placeholder\\right)":{x:1,y:2},"\\sqrt [3] \\placeholder":{x:2,y:2},x:{x:3,y:2},"\\pm":{x:4,y:2},1:{x:5,y:2},2:{x:6,y:2},3:{x:7,y:2},"\\geq":{x:0,y:3},"%":{x:1,y:3},"\\placeholder^3":{x:2,y:3},y:{x:3,y:3},",":{x:4,y:3},0:{x:5,y:3},".":{x:6,y:3},"=":{x:7,y:3},"\\times":{x:0,y:4},"\\div":{x:1,y:4},"\\approx":{x:2,y:4},"\\neq":{x:3,y:4},"\\sqrt [\\placeholder] \\placeholder":{x:4,y:4},"\\pi":{x:5,y:4},"\\delta":{x:6,y:4},"\\left[\\placeholder\\right]":{x:7,y:4},"\\placeholder^\\placeholder":{x:0,y:5},"\\placeholder_\\placeholder":{x:1,y:5},"{^\\placeholder_\\placeholder\\placeholder}":{x:2,y:5},"\\placeholder^\\placeholder_\\placeholder":{x:3,y:5},"\\sum\\placeholder":{x:4,y:5},"\\sum_\\placeholder\\placeholder":{x:5,y:5},"\\sum^\\placeholder_\\placeholder\\placeholder":{x:6,y:5},"\\int \\placeholder":{x:7,y:5},"\\int^\\placeholder_\\placeholder\\placeholder":{x:0,y:6},"\\iint\\placeholder":{x:1,y:6},"\\iint^\\placeholder_\\placeholder\\placeholder":{x:2,y:6},"\\iiint\\placeholder":{x:3,y:6},"\\iiint^\\placeholder_\\placeholder\\placeholder":{x:4,y:6},"\\log\\placeholder":{x:5,y:6},"\\ln\\placeholder":{x:6,y:6},"\\land":{x:7,y:6},"\\lor":{x:0,y:7},"\\neg":{x:1,y:7},"\\forall":{x:2,y:7},"\\exists":{x:3,y:7},"\\infty":{x:4,y:7},"\\cup":{x:5,y:7},"\\cap":{x:6,y:7},"\\in":{x:7,y:7},"\\notin":{x:0,y:8},"\\subset":{x:1,y:8},"\\subseteq":{x:2,y:8},"\\supset":{x:3,y:8},"\\supseteq":{x:4,y:8},"\\varnothing":{x:5,y:8},"\\cdot":{x:6,y:8},"\\colon":{x:7,y:8},"\\sin\\placeholder":{x:0,y:9},"\\cos\\placeholder":{x:1,y:9},"\\tan\\placeholder":{x:2,y:9},"\\sec\\placeholder":{x:3,y:9},"\\csc\\placeholder":{x:4,y:9},"\\cot\\placeholder":{x:5,y:9},"\\arcsin\\placeholder":{x:6,y:9},"\\arccos\\placeholder":{x:7,y:9},"\\arctan\\placeholder":{x:0,y:10},"\\triangle":{x:1,y:10},"\\sim":{x:2,y:10},"\\cong":{x:3,y:10},"\\angle":{x:4,y:10},"\\bot":{x:5,y:10},"\\alpha":{x:6,y:10},"\\beta":{x:7,y:10},"\\gamma":{x:0,y:11},"\\theta":{x:1,y:11},"\\degree":{x:2,y:11},"\\bigcirc":{x:3,y:11}},"a",{x:0,y:12}),o(t,"b",{x:1,y:12}),o(t,"c",{x:2,y:12}),o(t,"d",{x:3,y:12}),o(t,"e",{x:4,y:12}),o(t,"f",{x:5,y:12}),o(t,"g",{x:6,y:12}),o(t,"h",{x:7,y:12}),o(t,"i",{x:0,y:13}),o(t,"j",{x:1,y:13}),o(t,"k",{x:2,y:13}),o(t,"l",{x:3,y:13}),o(t,"m",{x:4,y:13}),o(t,"n",{x:5,y:13}),o(t,"o",{x:6,y:13}),o(t,"p",{x:7,y:13}),o(t,"q",{x:0,y:14}),o(t,"r",{x:1,y:14}),o(t,"s",{x:2,y:14}),o(t,"t",{x:3,y:14}),o(t,"u",{x:4,y:14}),o(t,"v",{x:5,y:14}),o(t,"w",{x:6,y:14}),o(t,"x",{x:7,y:14}),o(t,"y",{x:0,y:15}),o(t,"z",{x:1,y:15}),o(t,"\\Omega",{x:0,y:16}),o(t,"\\because",{x:1,y:16}),o(t,"\\therefore",{x:2,y:16}),o(t,"\\Longrightarrow",{x:3,y:16}),o(t,"\\Leftrightarrow",{x:4,y:16}),o(t,"\\uparrow",{x:5,y:16}),o(t,"\\downarrow",{x:6,y:16}),o(t,"\\lambda",{x:7,y:16}),o(t,"\\kappa",{x:0,y:17}),o(t,"\\mu",{x:1,y:17}),o(t,"\\rho",{x:2,y:17}),o(t,"\\sigma",{x:3,y:17}),o(t,"\\tau",{x:4,y:17}),o(t,"\\upsilon",{x:5,y:17}),o(t,"\\varphi",{x:6,y:17}),o(t,"\\Psi",{x:7,y:17}),o(t,"\\omega",{x:0,y:18}),o(t,"\\varepsilon",{x:1,y:18}),o(t,"\\zeta",{x:2,y:18}),o(t,"\\eta",{x:3,y:18}),o(t,"\\nu",{x:4,y:18}),o(t,"\\xi",{x:5,y:18}),o(t,"\\chi",{x:6,y:18}),t}},t[58]={value:function(e){var r=t.r(22),i="kf-editor-ui-",n=t.r(60);return r.createClass("List",{constructor:function(t,e){this.options=e,this.doc=t,this.onselectHandler=null,this.currentSelect=-1,this.element=this.createBox(),this.itemGroups=this.createItems(),this.mergeElement()},onselectHandler:function(t,e){},setSelectHandler:function(t){this.onselectHandler=t},createBox:function(){var t=n.ele(this.doc,"div",{className:i+"list"}),e=n.ele(this.doc,"div",{className:i+"list-bg"});return"width"in this.options&&(t.style.width=this.options.width+"px"),t.appendChild(e),t},select:function(t){var e=this.currentSelect;-1===e&&(e=t),this.unselect(e),this.currentSelect=t,n.getClassList(this.itemGroups.items[t]).add(i+"list-item-select"),this.onselectHandler(t,e)},unselect:function(t){n.getClassList(this.itemGroups.items[t]).remove(i+"list-item-select")},setOffset:function(t,e){this.element.style.left=t+"px",this.element.style.top=e+"px"},initEvent:function(){var t=this;n.delegate(this.itemGroups.container,".kf-editor-ui-list-item","mousedown",(function(e){e.preventDefault(),1===e.which&&t.select(this.getAttribute("data-index"))})),n.on(this.element,"mousedown",(function(t){t.stopPropagation(),t.preventDefault()}))},getPositionInfo:function(){return n.getRectBox(this.element)},createItems:function(){var t=this.doc,e=null,a=null,o=null,s=[],c=null;return e=n.ele(this.doc,"div",{className:i+"list-item"}),(c=e.cloneNode(!1)).className=i+"list-item-container",r.Utils.each(this.options.items,(function(r,u){a=e.cloneNode(!1),(o=e.cloneNode(!1)).className=i+"list-item-icon",a.appendChild(o),a.appendChild(n.ele(t,"text",r)),a.setAttribute("data-index",u),s.push(a),c.appendChild(a)})),{container:c,items:s}},mergeElement:function(){this.element.appendChild(this.itemGroups.container)},mountTo:function(t){t.appendChild(this.element)}})}},t[59]={value:function(e){var r=t.r(22),i=t.r(34).scrollbar,n=t.r(31).scrollbar,a=t.r(4),o="kf-editor-ui-";return r.createClass("Scrollbar",{constructor:function(t,e){this.uiComponent=t,this.kfEditor=e,this.widgets=null,this.container=this.uiComponent.scrollbarContainer,this.canvasContainer=this.uiComponent.canvasContainer,this.state=!1,this.values={offset:0,left:0,viewWidth:0,contentWidth:0,trackWidth:0,thumbWidth:0,scrollWidth:0,canvasWidth:0,viewBoxWidth:0},this.thumbLocationX=0,this.leftOverflow=0,this.rightOverflow=0,this.isExpand=!0,this.initWidget(),this.mountWidget(),this.initSize(),this.hide(),this.initServices(),this.initEvent(),this.updateHandler=function(){}},initWidget:function(){var t=this.container.ownerDocument;this.widgets={leftButton:s(t,"div","left-button"),rightButton:s(t,"div","right-button"),track:s(t,"div","track"),thumb:s(t,"div","thumb"),thumbBody:s(t,"div","thumb-body")}},initSize:function(){var t=c(this.widgets.leftButton).width,e=c(this.widgets.rightButton).width;this.values.canvasWidth=c(this.canvasContainer).width,this.values.viewWidth=this.values.canvasWidth,this.values.viewBoxWidth=c(this.container).width,this.values.trackWidth=this.values.viewBoxWidth-t-e,this.widgets.track.style.width=this.values.trackWidth+"px"},initServices:function(){this.kfEditor.registerService("ui.show.scrollbar",this,{showScrollbar:this.show}),this.kfEditor.registerService("ui.hide.scrollbar",this,{hideScrollbar:this.hide}),this.kfEditor.registerService("ui.update.scrollbar",this,{updateScrollbar:this.update}),this.kfEditor.registerService("ui.set.scrollbar.update.handler",this,{setUpdateHandler:this.setUpdateHandler}),this.kfEditor.registerService("ui.relocation.scrollbar",this,{relocation:this.relocation})},initEvent:function(){a.addEvent(this.container,"mousedown",(function(t){t.preventDefault()})),function(t){a.addEvent(t.widgets.track,"mousedown",(function(e){!function(t,e,r){var i=c(t),n=e.values,a=n.viewWidth/(n.contentWidth-n.viewWidth)*n.trackWidth;r.clientX-i.left>n.offset?n.offset+a>n.trackWidth?l(e,n.trackWidth):l(e,n.offset+a):n.offset-a<0?l(e,0):l(e,n.offset-a)}(this,t,e)}))}(this),function(t){var e=!1,r=0,i=0,n=t.values.trackWidth;a.addEvent(t.widgets.thumb,"mousedown",(function(n){n.preventDefault(),n.stopPropagation(),e=!0,r=n.clientX,i=t.thumbLocationX})),a.addEvent(t.container.ownerDocument,"mouseup",(function(){e=!1,r=0,i=0})),a.addEvent(t.container.ownerDocument,"mousemove",(function(a){if(e){var o=a.clientX-r,s=i+o,c=t.values.thumbWidth;s<0?s=0:s+c>n&&(s=n-c),function(t,e){var r=t.values,i=r.trackWidth-r.thumbWidth,n=Math.floor(e/i*r.trackWidth);t.updateOffset(n),t.thumbLocationX=e,t.widgets.thumb.style.left=e+"px"}(t,s)}}))}(this),function(t){a.addEvent(t.widgets.leftButton,"mousedown",(function(){u(t,-n.step)})),a.addEvent(t.widgets.rightButton,"mousedown",(function(){u(t,n.step)}))}(this)},mountWidget:function(){var t=this.widgets,e=this.container;for(var r in t)t.hasOwnProperty(r)&&e.appendChild(t[r]);t.thumb.appendChild(t.thumbBody),t.track.appendChild(t.thumb)},show:function(){this.state=!0,this.container.style.display="block"},hide:function(){this.state=!1,this.container.style.display="none"},update:function(t){var e,r=this.values.trackWidth;this.values.canvasWidth,this.isExpand=t>this.values.contentWidth,this.values.contentWidth=t,this.values.scrollWidth=t-this.values.viewWidth,this.values.viewWidth>=t?this.hide():(e=Math.max(Math.ceil(r*r/t),i.thumbMinSize),this.values.thumbWidth=e,this.widgets.thumb.style.width=e+"px",this.widgets.thumbBody.style.width=e-10+"px")},setUpdateHandler:function(t){this.updateHandler=t},updateOffset:function(t){var e=this.values;e.offset=t,e.left=t/e.trackWidth,this.leftOverflow=e.left*(e.contentWidth-e.viewWidth),this.rightOverflow=e.contentWidth-e.viewWidth-this.leftOverflow,this.updateHandler(e.left,e.offset,e)},relocation:function(){var t=this.kfEditor.requestService("control.get.cursor.location"),e=n.padding,r=this.values.contentWidth,i=this.values.viewWidth,a=this.values.left*(r-i);t.x<a?(t.x<0&&(t.x=0),h(this,t.x)):t.x+e>a+i?(t.x+=e,t.x>r&&(t.x=r),h(this,t.x-i)):this.isExpand?f(this,this.leftOverflow):f(this,r-i-this.rightOverflow)}});function s(t,e,r){var i=t.createElement(e);return i.className=o+r,"thumb"===r&&(r=o+r,i.innerHTML='<div class="$1"></div><div class="$2"></div>'.replace("$1",r+"-left").replace("$2",r+"-right")),i}function c(t){return t.getBoundingClientRect()}function u(t,e){var r=t.leftOverflow+e;r<0?r=0:r>t.values.scrollWidth&&(r=t.values.scrollWidth),f(t,r)}function l(t,e){var r=t.values,i=e/r.trackWidth,n=r.trackWidth-r.thumbWidth,a=0;a=Math.floor(i*n),e<0&&(e=0,a=0),t.updateOffset(e),t.widgets.thumb.style.left=a+"px",t.thumbLocationX=a}function h(t,e){var r,i=t.values;r=e/(i.contentWidth-i.viewWidth),l(t,Math.floor(r*i.trackWidth))}function f(t,e){var r=t.values;l(t,e/(r.contentWidth-r.viewWidth)*r.trackWidth)}}},t[60]={value:function(e){var r=t.r(16),i=t.r(22),n={},a={ele:function(t,e,r){var i=null;return"text"===e?t.createTextNode(r):(i=t.createElement(e),r.className&&(i.className=r.className),r.content&&(i.innerHTML=r.content),i)},getRectBox:function(t){return t.getBoundingClientRect()},on:function(t,e,i){return r(t).on(e,i),this},delegate:function(t,e,i,n){return r(t).delegate(e,i,n),this},publish:function(t,e){var r=n[t];r&&(e=[].slice.call(arguments,1),i.Utils.each(r,(function(t){t.apply(null,e)})))},subscribe:function(t,e){n[t]||(n[t]=[]),n[t].push(e)},getClassList:function(t){return t.classList||new o(t)}};function o(t){this.node=t,this.classes=t.className.replace(/^\s+|\s+$/g,"").split(/\s+/)}return o.prototype={constructor:o,contains:function(t){return-1!==this.classes.indexOf(t)},add:function(t){return-1==this.classes.indexOf(t)&&this.classes.push(t),this._update(),this},remove:function(t){var e=this.classes.indexOf(t);return-1!==e&&(this.classes.splice(e,1),this._update()),this},toggle:function(t){return this[this.contains(t)?"remove":"add"](t)},_update:function(){this.node.className=this.classes.join(" ")}},a}},t[61]={value:function(e){return{DrapdownBox:t.r(48),Delimiter:t.r(47),Area:t.r(41),Keyboard:t.r(51)}}},t[62]={value:function(e){var r=t.r(22),i=t.r(16),n=t.r(4),a=t.r(34).VIEW_STATE,o=t.r(59),s=(t.r(33),t.r(36)),c=t.r(35);return r.createClass("UIComponent",{constructor:function(t,e){var r,i;this.options=e,this.container=t.getContainer(),this.switchThemeByDeviceType(),r=this.container.ownerDocument,this.components={},this.canvasRect=null,this.viewState=a.NO_OVERFLOW,this.kfEditor=t,this.header=((i=r.createElement("div")).className="kf-editor-header",i),this.editArea=function(t){var e=t.createElement("div");return e.className="kf-editor-edit-area",e}(r),this.canvasContainer=function(t){var e=t.createElement("div");return e.className="kf-editor-canvas-container",e}(r),this.canvasWrapper=function(t){var e=t.createElement("div");return e.className="kf-editor-canvas-wrapper",e}(r),this.scrollbarContainer=function(t){var e=t.createElement("div");return e.className="kf-editor-edit-scrollbar",e}(r),this.keyboardContainer=function(t){var e=t.createElement("div");return e.className="kf-editor-edit-keyboard",e}(r),this.editArea.appendChild(this.header),this.editArea.appendChild(this.canvasWrapper),this.editArea.appendChild(this.scrollbarContainer),this.canvasWrapper.appendChild(this.canvasContainer),this.container.appendChild(this.editArea),this.container.appendChild(this.keyboardContainer),this.updateSize(),this.initComponents(),this.initServices(),this.initEvent(),this.initScrollEvent()},updateSize:function(){var t=this.options.scale,e=i(this.canvasContainer),r=i(this.editArea),n=i(this.canvasWrapper),a=i(this.container);this.scaleWidth(e).scaleHeight(e),this.scaleWidth(r).scalePadding(r),this.scaleWidth(n).scaleHeight(n).scalePadding(n),this.scaleWidth(a).scaleHeight(a),this.keyboardContainer.style.transform="scale(".concat(t,")"),this.keyboardContainer.style.transformOrigin="left top"},scaleWidth:function(t){var e=this.options.scale,r=t.outerWidth();return t.outerWidth(Math.floor(r*e)),this},scaleHeight:function(t){var e=this.options.scale,r=t.outerHeight();return t.outerHeight(Math.floor(r*e)),this},scalePadding:function(t){var e=this.options.scale,r=t.css("padding-left").split("px")[0],i=t.css("padding-right").split("px")[0],n=t.css("padding-top").split("px")[0],a=t.css("padding-bottom").split("px")[0];return t.css("padding-left",Math.floor(r*e)),t.css("padding-right",Math.floor(i*e)),t.css("padding-top",Math.floor(n*e)),t.css("padding-bottom",Math.floor(a*e)),this},scaleTop:function(t){var e=this.options.scale,r=t.css("top").split("px")[0];return t.css("top",Math.floor(r*e)),this},isAndroid:function(){return"android"===this.options.device},switchThemeByDeviceType:function(){this.isAndroid()?this.container.className+=" android":this.container.className+=" pc"},initComponents:function(){this.components.header=new c(this,this.kfEditor),this.components.scrollbar=new o(this,this.kfEditor),this.components.keyboard=new s(this,this.kfEditor)},initServices:function(){this.kfEditor.registerService("ui.get.canvas.container",this,{getCanvasContainer:this.getCanvasContainer}),this.kfEditor.registerService("ui.update.canvas.view",this,{updateCanvasView:this.updateCanvasView}),this.kfEditor.registerService("ui.canvas.container.event",this,{on:this.addEvent,off:this.removeEvent,trigger:this.trigger,fire:this.trigger})},initEvent:function(){},initScrollEvent:function(){var t=this;this.kfEditor.requestService("ui.set.scrollbar.update.handler",(function(e,r,i){r=Math.floor(e*(i.contentWidth-i.viewWidth)),t.kfEditor.requestService("render.set.canvas.offset",r)}))},getCanvasContainer:function(){return this.canvasContainer},addEvent:function(t,e){n.addEvent(this.canvasContainer,t,e)},removeEvent:function(){},trigger:function(t){n.trigger(this.canvasContainer,t)},updateCanvasView:function(){var t,e=this.kfEditor.requestService("render.get.canvas").getContentContainer();null===this.canvasRect&&(this.canvasRect=this.canvasContainer.getBoundingClientRect()),(t=e.getRenderBox("paper")).width>this.canvasRect.width?(this.viewState===a.NO_OVERFLOW&&(this.toggleViewState(),this.kfEditor.requestService("ui.show.scrollbar"),this.kfEditor.requestService("render.disable.relocation")),this.kfEditor.requestService("render.relocation"),this.kfEditor.requestService("ui.update.scrollbar",t.width),this.kfEditor.requestService("ui.relocation.scrollbar")):(this.viewState===a.OVERFLOW&&(this.toggleViewState(),this.kfEditor.requestService("ui.hide.scrollbar"),this.kfEditor.requestService("render.enable.relocation")),this.kfEditor.requestService("render.relocation"))},toggleViewState:function(){this.viewState=this.viewState===a.NO_OVERFLOW?a.OVERFLOW:a.NO_OVERFLOW},getDeviceType:function(){return this.options.device}})}},t[63]={value:function(e){var r=t.r(14),i=t.r(15);r.registerComponents("ui",t.r(62)),r.registerComponents("parser",t.r(23)),r.registerComponents("render",t.r(27)),r.registerComponents("position",t.r(25)),r.registerComponents("syntax",t.r(30)),r.registerComponents("control",t.r(6)),r.registerComponents("print",t.r(26)),kf.EditorFactory=i}};var s={"kf.start":63};!function(e){try{"kf.start",t.r([s["kf.start"]])}catch(t){}}()}()},415:()=>{function t(e){return t="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},t(e)}!function(){var e={};function r(t,r,i){if(e[t]={exports:{},value:null,factory:null},2===arguments.length&&(i=r),"[object Object]"===e.toString.call(i))e[t].value=i;else{if("function"!=typeof i)throw new Error("define函数未定义的行为");e[t].factory=i}}function i(t){var r,n=e[t];return n?(n.value||((r=n.factory.call(null,i,n.exports,n))&&(n.exports=r),n.value=n.exports),n.value):null}r("animate/animator",["animate/timeline","graphic/eventhandler","animate/frame","core/utils","core/class","animate/easing","graphic/shape","graphic/svg","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t){function e(t){var e=parseFloat(t,10);return/ms/.test(t)?e:/s/.test(t)?1e3*e:/min/.test(t)?60*e*1e3:e}var r=t("animate/timeline"),i=t("animate/easing"),n=t("core/class").createClass("Animator",{constructor:function(t,e,r){if(1==arguments.length){var i=arguments[0];this.beginValue=i.beginValue,this.finishValue=i.finishValue,this.setter=i.setter}else this.beginValue=t,this.finishValue=e,this.setter=r},start:function(t,r,i,n,a){4===arguments.length&&"function"==typeof n&&(a=n,n=0);var o=this.create(t,r,i,a);return(n=e(n))>0?setTimeout((function(){o.play()}),n):o.play(),o},create:function(t,a,o,s){var c;return a=a&&e(a)||n.DEFAULT_DURATION,"string"==typeof(o=o||n.DEFAULT_EASING)&&(o=i[o]),c=new r(this,t,a,o),"function"==typeof s&&c.on("finish",s),c},reverse:function(){return new n(this.finishValue,this.beginValue,this.setter)}});n.DEFAULT_DURATION=300,n.DEFAULT_EASING="linear";var a=t("graphic/shape");return t("core/class").extendClass(a,{animate:function(t,e,r,i,n){var a=this._KityAnimateQueue=this._KityAnimateQueue||[],o=t.create(this,e,r,n);return o.on("finish",(function(){a.shift(),a.length&&setTimeout(a[0].t.play.bind(a[0].t),a[0].d)})),a.push({t:o,d:i}),1==a.length&&setTimeout(o.play.bind(o),i),this},timeline:function(){return this._KityAnimateQueue[0].t},stop:function(){var t=this._KityAnimateQueue;if(t)for(;t.length;)t.shift().stop()}}),n})),r("animate/easing",[],(function(t,e,r){var i={linear:function(t,e,r,i){return r*(t/i)+e},swing:function(t,e,r,n){return i.easeOutQuad(t,e,r,n)},ease:function(t,e,r,n){return i.easeInOutCubic(t,e,r,n)},easeInQuad:function(t,e,r,i){return r*(t/=i)*t+e},easeOutQuad:function(t,e,r,i){return-r*(t/=i)*(t-2)+e},easeInOutQuad:function(t,e,r,i){return(t/=i/2)<1?r/2*t*t+e:-r/2*(--t*(t-2)-1)+e},easeInCubic:function(t,e,r,i){return r*(t/=i)*t*t+e},easeOutCubic:function(t,e,r,i){return r*((t=t/i-1)*t*t+1)+e},easeInOutCubic:function(t,e,r,i){return(t/=i/2)<1?r/2*t*t*t+e:r/2*((t-=2)*t*t+2)+e},easeInQuart:function(t,e,r,i){return r*(t/=i)*t*t*t+e},easeOutQuart:function(t,e,r,i){return-r*((t=t/i-1)*t*t*t-1)+e},easeInOutQuart:function(t,e,r,i){return(t/=i/2)<1?r/2*t*t*t*t+e:-r/2*((t-=2)*t*t*t-2)+e},easeInQuint:function(t,e,r,i){return r*(t/=i)*t*t*t*t+e},easeOutQuint:function(t,e,r,i){return r*((t=t/i-1)*t*t*t*t+1)+e},easeInOutQuint:function(t,e,r,i){return(t/=i/2)<1?r/2*t*t*t*t*t+e:r/2*((t-=2)*t*t*t*t+2)+e},easeInSine:function(t,e,r,i){return-r*Math.cos(t/i*(Math.PI/2))+r+e},easeOutSine:function(t,e,r,i){return r*Math.sin(t/i*(Math.PI/2))+e},easeInOutSine:function(t,e,r,i){return-r/2*(Math.cos(Math.PI*t/i)-1)+e},easeInExpo:function(t,e,r,i){return 0===t?e:r*Math.pow(2,10*(t/i-1))+e},easeOutExpo:function(t,e,r,i){return t==i?e+r:r*(1-Math.pow(2,-10*t/i))+e},easeInOutExpo:function(t,e,r,i){return 0===t?e:t==i?e+r:(t/=i/2)<1?r/2*Math.pow(2,10*(t-1))+e:r/2*(2-Math.pow(2,-10*--t))+e},easeInCirc:function(t,e,r,i){return-r*(Math.sqrt(1-(t/=i)*t)-1)+e},easeOutCirc:function(t,e,r,i){return r*Math.sqrt(1-(t=t/i-1)*t)+e},easeInOutCirc:function(t,e,r,i){return(t/=i/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+e:r/2*(Math.sqrt(1-(t-=2)*t)+1)+e},easeInElastic:function(t,e,r,i){var n=1.70158,a=0,o=r;return 0===t?e:1==(t/=i)?e+r:(a||(a=.3*i),o<Math.abs(r)?(o=r,n=a/4):n=a/(2*Math.PI)*Math.asin(r/o),-o*Math.pow(2,10*(t-=1))*Math.sin(2*(t*i-n)*Math.PI/a)+e)},easeOutElastic:function(t,e,r,i){var n=1.70158,a=0,o=r;return 0===t?e:1==(t/=i)?e+r:(a||(a=.3*i),o<Math.abs(r)?(o=r,n=a/4):n=a/(2*Math.PI)*Math.asin(r/o),o*Math.pow(2,-10*t)*Math.sin(2*(t*i-n)*Math.PI/a)+r+e)},easeInOutElastic:function(t,e,r,i){var n=1.70158,a=0,o=r;return 0===t?e:2==(t/=i/2)?e+r:(a||(a=.3*i*1.5),o<Math.abs(r)?(o=r,n=a/4):n=a/(2*Math.PI)*Math.asin(r/o),t<1?-.5*o*Math.pow(2,10*(t-=1))*Math.sin(2*(t*i-n)*Math.PI/a)+e:o*Math.pow(2,-10*(t-=1))*Math.sin(2*(t*i-n)*Math.PI/a)*.5+r+e)},easeInBack:function(t,e,r,i,n){return null==n&&(n=1.70158),r*(t/=i)*t*((n+1)*t-n)+e},easeOutBack:function(t,e,r,i,n){return null==n&&(n=1.70158),r*((t=t/i-1)*t*((n+1)*t+n)+1)+e},easeInOutBack:function(t,e,r,i,n){return null==n&&(n=1.70158),(t/=i/2)<1?r/2*t*t*((1+(n*=1.525))*t-n)+e:r/2*((t-=2)*t*((1+(n*=1.525))*t+n)+2)+e},easeInBounce:function(t,e,r,n){return r-i.easeOutBounce(n-t,0,r,n)+e},easeOutBounce:function(t,e,r,i){return(t/=i)<1/2.75?7.5625*r*t*t+e:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+e:r*(7.5625*(t-=2.625/2.75)*t+.984375)+e},easeInOutBounce:function(t,e,r,n){return t<n/2?.5*i.easeInBounce(2*t,0,r,n)+e:.5*i.easeOutBounce(2*t-n,0,r,n)+.5*r+e}};return i})),r("animate/frame",[],(function(t,e){var r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,1e3/60)},i=[];function n(t){1===i.push(t)&&r(a)}function a(){var t,e,r,n=i;for(i=[];n.length;)t=n.pop(),e=void 0,r=void 0,e=+new Date,(r=e-t.time)>200&&(r=1e3/60),t.dur=r,t.elapsed+=r,t.time=e,t.action.call(null,t),t.index++}e.requestFrame=function(t){var e=function(t){var e={index:0,time:+new Date,elapsed:0,action:t,next:function(){n(e)}};return e}(t);return n(e),e},e.releaseFrame=function(t){var e=i.indexOf(t);~e&&i.splice(e,1)}})),r("animate/motionanimator",["animate/animator","animate/timeline","animate/easing","core/class","graphic/shape","graphic/geometry","core/utils","graphic/point","graphic/vector","graphic/matrix","graphic/path","graphic/svg"],(function(t){var e=t("animate/animator"),r=t("graphic/geometry"),i=t("graphic/path"),n=t("core/class").createClass("MotionAnimator",{base:e,constructor:function(t){var e=this;this.callBase({beginValue:0,finishValue:1,setter:function(t,n){var a=e.motionPath instanceof i?e.motionPath.getPathData():e.motionPath,o=r.pointAtPath(a,n);t.setTranslate(o.x,o.y),t.setRotate(o.tan.getAngle())}}),this.updatePath(t)},updatePath:function(t){this.motionPath=t}});return t("core/class").extendClass(i,{motion:function(t,e,r,i,a){return this.animate(new n(t),e,r,i,a)}}),n})),r("animate/opacityanimator",["animate/animator","animate/timeline","animate/easing","core/class","graphic/shape","graphic/svg","core/utils","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t){var e=t("animate/animator"),r=t("core/class").createClass("OpacityAnimator",{base:e,constructor:function(t){this.callBase({beginValue:function(t){return t.getOpacity()},finishValue:t,setter:function(t,e){t.setOpacity(e)}})}}),i=t("graphic/shape");return t("core/class").extendClass(i,{fxOpacity:function(t,e,i,n,a){return this.animate(new r(t),e,i,n,a)},fadeTo:function(){return this.fxOpacity.apply(this,arguments)},fadeIn:function(){return this.fxOpacity.apply(this,[1].concat([].slice.call(arguments)))},fadeOut:function(){return this.fxOpacity.apply(this,[0].concat([].slice.call(arguments)))}}),r})),r("animate/pathanimator",["animate/animator","animate/timeline","animate/easing","core/class","graphic/shape","graphic/geometry","core/utils","graphic/point","graphic/vector","graphic/matrix","graphic/path","graphic/svg"],(function(t){var e=t("animate/animator"),r=t("graphic/geometry"),i=t("core/class").createClass("OpacityAnimator",{base:e,constructor:function(t){this.callBase({beginValue:function(t){return this.beginPath=t.getPathData(),0},finishValue:1,setter:function(e,i){e.setPathData(r.pathTween(this.beginPath,t,i))}})}}),n=t("graphic/path");return t("core/class").extendClass(n,{fxPath:function(t,e,r,n,a){return this.animate(new i(t),e,r,n,a)}}),i})),r("animate/rotateanimator",["animate/animator","animate/timeline","animate/easing","core/class","graphic/shape","graphic/svg","core/utils","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t){var e=t("animate/animator"),r=t("core/class").createClass("RotateAnimator",{base:e,constructor:function(t,e,r){this.callBase({beginValue:0,finishValue:t,setter:function(t,i,n){var a=n.getDelta();t.rotate(a,e,r)}})}}),i=t("graphic/shape");return t("core/class").extendClass(i,{fxRotate:function(t,e,i,n,a){return this.animate(new r(t),e,i,n,a)},fxRotateAnchor:function(t,e,i,n,a,o,s){return this.animate(new r(t,e,i),n,a,o,s)}}),r})),r("animate/scaleanimator",["animate/animator","animate/timeline","animate/easing","core/class","graphic/shape","graphic/svg","core/utils","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t){var e=t("animate/animator"),r=t("core/class").createClass("ScaleAnimator",{base:e,constructor:function(t,e){this.callBase({beginValue:0,finishValue:1,setter:function(r,i,n){var a=n.getDelta(),o=Math.pow(t,a),s=Math.pow(e,a);r.scale(s,o)}})}}),i=t("graphic/shape");return t("core/class").extendClass(i,{fxScale:function(t,e,i,n,a,o){return this.animate(new r(t,e),i,n,a,o)}}),r})),r("animate/timeline",["graphic/eventhandler","core/utils","graphic/shapeevent","core/class","animate/frame"],(function(t){var e=t("graphic/eventhandler"),r=t("animate/frame"),i=t("core/utils");function n(t,e,r){for(var i in this.timeline=t,this.target=t.target,this.type=e,r)r.hasOwnProperty(i)&&(this[i]=r[i])}var a=t("core/class").createClass("Timeline",{mixins:[e],constructor:function(t,e,r,i){this.callMixin(),this.target=e,this.time=0,this.duration=r,this.easing=i,this.animator=t,this.beginValue=t.beginValue,this.finishValue=t.finishValue,this.setter=t.setter,this.status="ready"},nextFrame:function(t){"playing"==this.status&&(this.time+=t.dur,this.setValue(this.getValue()),this.time>=this.duration&&this.timeUp(),t.next())},getPlayTime:function(){return this.rollbacking?this.duration-this.time:this.time},getTimeProportion:function(){return this.getPlayTime()/this.duration},getValueProportion:function(){return this.easing(this.getPlayTime(),0,1,this.duration)},getValue:function(){return t=this.beginValue,e=this.finishValue,r=this.getValueProportion(),i.paralle(t,e,(function(t,e){return t+(e-t)*r}));var t,e,r},setValue:function(t){this.lastValue=this.currentValue,this.currentValue=t,this.setter.call(this.target,this.target,t,this)},getDelta:function(){return this.lastValue=void 0===this.lastValue?this.beginValue:this.lastValue,t=this.lastValue,e=this.currentValue,i.paralle(t,e,(function(t,e){return e-t}));var t,e},play:function(){var t=this.status;switch(this.status="playing",t){case"ready":i.isFunction(this.beginValue)&&(this.beginValue=this.beginValue.call(this.target,this.target)),i.isFunction(this.finishValue)&&(this.finishValue=this.finishValue.call(this.target,this.target)),this.time=0,this.frame=r.requestFrame(this.nextFrame.bind(this));break;case"finished":case"stoped":this.time=0,this.frame=r.requestFrame(this.nextFrame.bind(this));break;case"paused":this.frame.next()}return this.fire("play",new n(this,"play",{lastStatus:t})),this},pause:function(){return this.status="paused",this.fire("pause",new n(this,"pause")),r.releaseFrame(this.frame),this},stop:function(){return this.status="stoped",this.setValue(this.finishValue),this.rollbacking=!1,this.fire("stop",new n(this,"stop")),r.releaseFrame(this.frame),this},timeUp:function(){this.repeatOption?(this.time=0,this.rollback?this.rollbacking?(this.decreaseRepeat(),this.rollbacking=!1):(this.rollbacking=!0,this.fire("rollback",new n(this,"rollback"))):this.decreaseRepeat(),this.repeatOption?this.fire("repeat",new n(this,"repeat")):this.finish()):this.finish()},finish:function(){this.setValue(this.finishValue),this.status="finished",this.fire("finish",new n(this,"finish")),r.releaseFrame(this.frame)},decreaseRepeat:function(){!0!==this.repeatOption&&this.repeatOption--},repeat:function(t,e){return this.repeatOption=t,this.rollback=e,this}});return a.requestFrame=r.requestFrame,a.releaseFrame=r.releaseFrame,a})),r("animate/translateanimator",["animate/animator","animate/timeline","animate/easing","core/class","graphic/shape","graphic/svg","core/utils","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t){var e=t("animate/animator"),r=t("core/class").createClass("TranslateAnimator",{base:e,constructor:function(t,e){this.callBase({x:0,y:0},{x:t,y:e},(function(t,e,r){var i=r.getDelta();t.translate(i.x,i.y)}))}}),i=t("graphic/shape");return t("core/class").extendClass(i,{fxTranslate:function(t,e,i,n,a,o){return this.animate(new r(t,e),i,n,a,o)}}),r})),r("core/browser",[],(function(){return function(){var t,e=navigator.userAgent.toLowerCase(),r=window.opera;(t={ie:/(msie\s|trident.*rv:)([\w.]+)/.test(e),opera:!!r&&r.version,webkit:e.indexOf(" applewebkit/")>-1,mac:e.indexOf("macintosh")>-1,quirks:"BackCompat"==document.compatMode}).gecko="Gecko"==navigator.product&&!t.webkit&&!t.opera&&!t.ie;var i=0;if(t.ie&&(i=1*(e.match(/(msie\s|trident.*rv:)([\w.]+)/)[2]||0),t.ie11Compat=11==document.documentMode,t.ie9Compat=9==document.documentMode),t.gecko){var n=e.match(/rv:([\d\.]+)/);n&&(i=1e4*(n=n[1].split("."))[0]+100*(n[1]||0)+1*(n[2]||0))}return/chrome\/(\d+\.\d)/i.test(e)&&(t.chrome=+RegExp.$1),/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(e)&&!/chrome/i.test(e)&&(t.safari=+(RegExp.$1||RegExp.$2)),t.opera&&(i=parseFloat(r.version())),t.webkit&&(i=parseFloat(e.match(/ applewebkit\/(\d+)/)[1])),t.version=i,t.isCompatible=!t.mobile&&(t.ie&&i>=6||t.gecko&&i>=10801||t.opera&&i>=9.5||t.air&&i>=1||t.webkit&&i>=522||!1),t}()})),r("core/class",[],(function(t,e){function r(){}function i(t,e){var r=t.toString();if(!/this\.callBase/.test(r))throw new Error(e+" : 类构造函数没有调用父类的构造函数!为了安全,请调用父类的构造函数")}Function.prototype.bind=Function.prototype.bind||function(t){var e=Array.prototype.slice.call(arguments,1);return this.apply(t,e)},r.__KityClassName="Class",r.prototype.base=function(t){var e=arguments.callee.caller,r=e.__KityMethodClass.__KityBaseClass.prototype[t];return r.apply(this,Array.prototype.slice.call(arguments,1))},r.prototype.callBase=function(){var t=arguments.callee.caller,e=t.__KityMethodClass.__KityBaseClass.prototype[t.__KityMethodName];return e.apply(this,arguments)},r.prototype.mixin=function(t){var e=arguments.callee.caller,r=e.__KityMethodClass.__KityMixins;if(!r)return this;var i=r[t];return i.apply(this,Array.prototype.slice.call(arguments,1))},r.prototype.callMixin=function(){var t=arguments.callee.caller,e=t.__KityMethodName,r=t.__KityMethodClass.__KityMixins;if(!r)return this;var i=r[e];if("constructor"==e){for(var n=0,a=i.length;n<a;n++)i[n].call(this);return this}return i.apply(this,arguments)},r.prototype.pipe=function(t){return"function"==typeof t&&t.call(this,this),this},r.prototype.getType=function(){return this.__KityClassName},r.prototype.getClass=function(){return this.constructor};var n="__KITY_INHERIT_FLAG_"+ +new Date;function a(t,e,r){var i=function t(e){e!=n&&t.__KityConstructor.apply(this,arguments),this.__KityClassName=t.__KityClassName};for(var a in i.__KityConstructor=t,i.prototype=new e(n),e.prototype)e.prototype.hasOwnProperty(a)&&0!==a.indexOf("__Kity")&&(i.prototype[a]=e.prototype[a]);return i.prototype.constructor=i,i}function o(t,e){if(0==e instanceof Array)return t;var r,i,n,a=e.length;for(t.__KityMixins={constructor:[]},r=0;r<a;r++)for(n in i=e[r].prototype)!1!==i.hasOwnProperty(n)&&0!==n.indexOf("__Kity")&&("constructor"===n?t.__KityMixins.constructor.push(i[n]):t.prototype[n]=t.__KityMixins[n]=i[n]);return t}function s(t,e){for(var r in e.__KityClassName&&(e=e.prototype),e)if(e.hasOwnProperty(r)&&r.indexOf("__Kity")&&"constructor"!=r){var i=t.prototype[r]=e[r];i.__KityMethodClass=t,i.__KityMethodName=r}return t}r.prototype._accessProperty=function(){return this._propertyRawData||(this._propertyRawData={})},e.createClass=function(t,e){var n,c,u;return 1===arguments.length&&(e=arguments[0],t="AnonymousClass"),u=e.base||r,e.hasOwnProperty("constructor")?(n=e.constructor,u!=r&&i(n,t)):n=function(){this.callBase.apply(this,arguments),this.callMixin.apply(this,arguments)},(c=o(c=a(n,u),e.mixins)).__KityClassName=n.__KityClassName=t,c.__KityBaseClass=n.__KityBaseClass=u,c.__KityMethodName=n.__KityMethodName="constructor",c.__KityMethodClass=n.__KityMethodClass=c,delete e.mixins,delete e.constructor,delete e.base,s(c,e)},e.extendClass=s})),r("core/utils",[],(function(){var e={each:function(t,e,r){if(null!==t)if(t.length===+t.length){for(var i=0,n=t.length;i<n;i++)if(!1===e.call(r,t[i],i,t))return!1}else for(var a in t)if(t.hasOwnProperty(a)&&!1===e.call(r,t[a],a,t))return!1},extend:function(t){for(var e=arguments,r=!!this.isBoolean(e[e.length-1])&&e[e.length-1],i=this.isBoolean(e[e.length-1])?e.length-1:e.length,n=1;n<i;n++){var a=e[n];for(var o in a)r&&t.hasOwnProperty(o)||(t[o]=a[o])}return t},deepExtend:function(t,e){for(var r=arguments,i=!!this.isBoolean(r[r.length-1])&&r[r.length-1],n=this.isBoolean(r[r.length-1])?r.length-1:r.length,a=1;a<n;a++){var o=r[a];for(var s in o)i&&t.hasOwnProperty(s)||(this.isObject(t[s])&&this.isObject(o[s])?this.deepExtend(t[s],o[s],i):t[s]=o[s])}return t},clone:function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},copy:function(e){return"object"!==t(e)?e:"function"==typeof e?null:JSON.parse(JSON.stringify(e))},queryPath:function(t,e){for(var r=t.split("."),i=0,n=e,a=r.length;i<a;){if(!(r[i]in n))return;if(n=n[r[i]],++i>=a||void 0===n)return n}},getValue:function(t,e){return void 0!==t?t:e},flatten:function(t){var r,i=[],n=t.length;for(r=0;r<n;r++)t[r]instanceof Array?i=i.concat(e.flatten(t[r])):i.push(t[r]);return i},paralle:function(t,r,i){var n,a,o,s;if(t instanceof Array){for(s=[],a=0;a<t.length;a++)s.push(e.paralle(t[a],r[a],i));return s}if(t instanceof Object){if((n=t.getClass&&t.getClass())&&n.parse)t=t.valueOf(),r=r.valueOf(),s=e.paralle(t,r,i),s=n.parse(s);else for(o in s={},t)t.hasOwnProperty(o)&&r.hasOwnProperty(o)&&(s[o]=e.paralle(t[o],r[o],i));return s}return!1===isNaN(parseFloat(t))?i(t,r):s},parallelize:function(t){return function(r,i){return e.paralle(r,i,t)}}};return e.each(["String","Function","Array","Number","RegExp","Object","Boolean"],(function(t){e["is"+t]=function(e){return Object.prototype.toString.apply(e)=="[object "+t+"]"}})),e})),r("filter/effect/colormatrixeffect",["filter/effect/effect","graphic/svg","core/class","core/utils"],(function(t,e,r){var i=t("filter/effect/effect"),n=t("core/utils"),a=t("core/class").createClass("ColorMatrixEffect",{base:i,constructor:function(t,e){this.callBase(i.NAME_COLOR_MATRIX),this.set("type",n.getValue(t,a.TYPE_MATRIX)),this.set("in",n.getValue(e,i.INPUT_SOURCE_GRAPHIC))}});return n.extend(a,{TYPE_MATRIX:"matrix",TYPE_SATURATE:"saturate",TYPE_HUE_ROTATE:"hueRotate",TYPE_LUMINANCE_TO_ALPHA:"luminanceToAlpha",MATRIX_ORIGINAL:"10000010000010000010".split("").join(" "),MATRIX_EMPTY:"00000000000000000000".split("").join(" ")}),a})),r("filter/effect/compositeeffect",["filter/effect/effect","graphic/svg","core/class","core/utils"],(function(t,e,r){var i=t("filter/effect/effect"),n=t("core/utils"),a=t("core/class").createClass("CompositeEffect",{base:i,constructor:function(t,e,r){this.callBase(i.NAME_COMPOSITE),this.set("operator",n.getValue(t,a.OPERATOR_OVER)),e&&this.set("in",e),r&&this.set("in2",r)}});return n.extend(a,{OPERATOR_OVER:"over",OPERATOR_IN:"in",OPERATOR_OUT:"out",OPERATOR_ATOP:"atop",OPERATOR_XOR:"xor",OPERATOR_ARITHMETIC:"arithmetic"}),a})),r("filter/effect/convolvematrixeffect",["filter/effect/effect","graphic/svg","core/class","core/utils"],(function(t,e,r){var i=t("filter/effect/effect"),n=t("core/utils"),a=t("core/class").createClass("ConvolveMatrixEffect",{base:i,constructor:function(t,e){this.callBase(i.NAME_CONVOLVE_MATRIX),this.set("edgeMode",n.getValue(t,a.MODE_DUPLICATE)),this.set("in",n.getValue(e,i.INPUT_SOURCE_GRAPHIC))}});return n.extend(a,{MODE_DUPLICATE:"duplicate",MODE_WRAP:"wrap",MODE_NONE:"none"}),a})),r("filter/effect/effect",["graphic/svg","core/class","core/utils"],(function(t,e,r){var i=t("graphic/svg"),n=t("core/class").createClass("Effect",{constructor:function(t){this.node=i.createNode(t)},getId:function(){return this.node.id},setId:function(t){return this.node.id=t,this},set:function(t,e){return this.node.setAttribute(t,e),this},get:function(t){return this.node.getAttribute(t)},getNode:function(){return this.node},toString:function(){return this.node.getAttribute("result")||""}});return t("core/utils").extend(n,{NAME_GAUSSIAN_BLUR:"feGaussianBlur",NAME_OFFSET:"feOffset",NAME_COMPOSITE:"feComposite",NAME_COLOR_MATRIX:"feColorMatrix",NAME_CONVOLVE_MATRIX:"feConvolveMatrix",INPUT_SOURCE_GRAPHIC:"SourceGraphic",INPUT_SOURCE_ALPHA:"SourceAlpha",INPUT_BACKGROUND_IMAGE:"BackgroundImage",INPUT_BACKGROUND_ALPHA:"BackgroundAlpha",INPUT_FILL_PAINT:"FillPaint",INPUT_STROKE_PAINT:"StrokePaint"}),n})),r("filter/effect/gaussianblureffect",["filter/effect/effect","graphic/svg","core/class","core/utils"],(function(t,e,r){var i=t("filter/effect/effect"),n=t("core/utils");return t("core/class").createClass("GaussianblurEffect",{base:i,constructor:function(t,e){this.callBase(i.NAME_GAUSSIAN_BLUR),this.set("stdDeviation",n.getValue(t,1)),this.set("in",n.getValue(e,i.INPUT_SOURCE_GRAPHIC))}})})),r("filter/effect/offseteffect",["filter/effect/effect","graphic/svg","core/class","core/utils"],(function(t,e,r){var i=t("filter/effect/effect"),n=t("core/utils");return t("core/class").createClass("OffsetEffect",{base:i,constructor:function(t,e,r){this.callBase(i.NAME_OFFSET),this.set("dx",n.getValue(t,0)),this.set("dy",n.getValue(e,0)),this.set("in",n.getValue(r,i.INPUT_SOURCE_GRAPHIC))}})})),r("filter/effectcontainer",["core/class","graphic/container"],(function(t){return t("core/class").createClass("EffectContainer",{base:t("graphic/container"),addEffect:function(t,e){return this.addItem.apply(this,arguments)},prependEffect:function(){return this.prependItem.apply(this,arguments)},appendEffect:function(){return this.appendItem.apply(this,arguments)},removeEffect:function(t){return this.removeItem.apply(this,arguments)},addEffects:function(){return this.addItems.apply(this,arguments)},setEffects:function(){return this.setItems.apply(this,arguments)},getEffect:function(){return this.getItem.apply(this,arguments)},getEffects:function(){return this.getItems.apply(this,arguments)},getFirstEffect:function(){return this.getFirstItem.apply(this,arguments)},getLastEffect:function(){return this.getLastItem.apply(this,arguments)},handleAdd:function(t,e){var r=this.getEffects().length,i=this.getItem(e+1);r!==e+1?this.node.insertBefore(t.getNode(),i.getNode()):this.node.appendChild(t.getNode())}})})),r("filter/filter",["graphic/svg","core/class","filter/effectcontainer","graphic/container","graphic/shape","core/utils","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t,e,r){var i=t("graphic/svg"),n=t("core/class"),a=n.createClass("Filter",{mixins:[t("filter/effectcontainer")],constructor:function(t,e,r,n){this.node=i.createNode("filter"),void 0!==t&&this.set("x",t),void 0!==e&&this.set("y",e),void 0!==r&&this.set("width",r),void 0!==n&&this.set("height",n)},getId:function(){return this.id},setId:function(t){return this.node.id=t,this},set:function(t,e){return this.node.setAttribute(t,e),this},get:function(t){return this.node.getAttribute(t)},getNode:function(){return this.node}}),o=t("graphic/shape");return n.extendClass(o,{applyFilter:function(t){var e=t.get("id");return e&&this.node.setAttribute("filter","url(#"+e+")"),this}}),a})),r("filter/gaussianblurfilter",["filter/effect/gaussianblureffect","filter/effect/effect","core/utils","core/class","filter/filter","graphic/svg","filter/effectcontainer","graphic/shape"],(function(t,e,r){var i=t("filter/effect/gaussianblureffect");return t("core/class").createClass("GaussianblurFilter",{base:t("filter/filter"),constructor:function(t){this.callBase(),this.addEffect(new i(t))}})})),r("filter/projectionfilter",["filter/effect/gaussianblureffect","filter/effect/effect","core/utils","core/class","graphic/svg","filter/effect/colormatrixeffect","graphic/color","graphic/standardcolor","filter/effect/compositeeffect","filter/effect/offseteffect","filter/filter","filter/effectcontainer","graphic/shape"],(function(t,e,r){var i=t("filter/effect/gaussianblureffect"),n=t("filter/effect/effect"),a=t("filter/effect/colormatrixeffect"),o=t("graphic/color"),s=t("core/utils"),c=t("filter/effect/compositeeffect"),u=t("filter/effect/offseteffect");return t("core/class").createClass("ProjectionFilter",{base:t("filter/filter"),constructor:function(t,e,r){this.callBase(),this.gaussianblurEffect=new i(t,n.INPUT_SOURCE_ALPHA),this.gaussianblurEffect.set("result","gaussianblur"),this.addEffect(this.gaussianblurEffect),this.offsetEffect=new u(e,r,this.gaussianblurEffect),this.offsetEffect.set("result","offsetBlur"),this.addEffect(this.offsetEffect),this.colorMatrixEffect=new a(a.TYPE_MATRIX,this.offsetEffect),this.colorMatrixEffect.set("values",a.MATRIX_ORIGINAL),this.colorMatrixEffect.set("result","colorOffsetBlur"),this.addEffect(this.colorMatrixEffect),this.compositeEffect=new c(c.OPERATOR_OVER,n.INPUT_SOURCE_GRAPHIC,this.colorMatrixEffect),this.addEffect(this.compositeEffect)},setColor:function(t){var e=null,r=[];if(s.isString(t)&&(t=o.parse(t)),!t)return this;e=a.MATRIX_EMPTY.split(" "),r.push(t.get("r")),r.push(t.get("g")),r.push(t.get("b"));for(var i=0,n=r.length;i<n;i++)e[5*i+3]=r[i]/255;return e[18]=t.get("a"),this.colorMatrixEffect.set("values",e.join(" ")),this},setOpacity:function(t){var e=this.colorMatrixEffect.get("values").split(" ");return e[18]=t,this.colorMatrixEffect.set("values",e.join(" ")),this},setOffset:function(t,e){this.setOffsetX(t),this.setOffsetY(e)},setOffsetX:function(t){this.offsetEffect.set("dx",t)},setOffsetY:function(t){this.offsetEffect.set("dy",t)},setDeviation:function(t){this.gaussianblurEffect.set("stdDeviation",t)}})})),r("graphic/bezier",["core/class","graphic/pointcontainer","graphic/container","graphic/path","core/utils","graphic/shape","graphic/svg","graphic/geometry"],(function(t,e,r){return t("core/class").createClass("Bezier",{mixins:[t("graphic/pointcontainer")],base:t("graphic/path"),constructor:function(t){this.callBase(),t=t||[],this.changeable=!0,this.setBezierPoints(t)},getBezierPoints:function(){return this.getPoints()},setBezierPoints:function(t){return this.setPoints(t)},onContainerChanged:function(){this.changeable&&this.update()},update:function(){var t=null,e=this.getBezierPoints();if(!(e.length<2)){(t=this.getDrawer()).clear();var r=e[0].getVertex(),i=null,n=null;t.moveTo(r.x,r.y);for(var a=1,o=e.length;a<o;a++)r=e[a].getVertex(),n=e[a].getBackward(),i=e[a-1].getForward(),t.bezierTo(i.x,i.y,n.x,n.y,r.x,r.y);return this}}})})),r("graphic/bezierpoint",["graphic/shapepoint","core/class","graphic/point","graphic/vector","graphic/matrix"],(function(t,e,r){var i=t("graphic/shapepoint"),n=t("graphic/vector"),a=t("core/class").createClass("BezierPoint",{constructor:function(t,e,r){this.vertex=new i(t,e),this.forward=new i(t,e),this.backward=new i(t,e),this.setSmooth(void 0===r||r),this.setSymReflaction(!0)},clone:function(){var t=new a,e=null;return e=this.getVertex(),t.setVertex(e.x,e.y),e=this.getForward(),t.setForward(e.x,e.y),e=this.getBackward(),t.setBackward(e.x,e.y),t.setSmooth(t.isSmooth()),t},setVertex:function(t,e){return this.vertex.setPoint(t,e),this.update(),this},moveTo:function(t,e){var r=this.forward.getPoint(),i=this.backward.getPoint(),n=this.vertex.getPoint(),a=t-n.x,o=e-n.y;this.forward.setPoint(r.x+a,r.y+o),this.backward.setPoint(i.x+a,i.y+o),this.vertex.setPoint(t,e),this.update()},setForward:function(t,e){return this.forward.setPoint(t,e),this.smooth&&this.updateAnother(this.forward,this.backward),this.update(),this},setBackward:function(t,e){return this.backward.setPoint(t,e),this.smooth&&this.updateAnother(this.backward,this.forward),this.update(),this},setSymReflaction:function(t){this.symReflaction=t},isSymReflaction:function(){return this.symReflaction},updateAnother:function(t,e){var r=this.getVertex(),i=n.fromPoints(t.getPoint(),r),a=n.fromPoints(r,e.getPoint());a=n.normalize(i,this.isSymReflaction()?i.length():a.length()),e.setPoint(r.x+a.x,r.y+a.y)},setSmooth:function(t){return this.smooth=!!t,this},getVertex:function(){return this.vertex.getPoint()},getForward:function(){return this.forward.getPoint()},getBackward:function(){return this.backward.getPoint()},isSmooth:function(){return this.smooth},update:function(){if(!this.container)return this;this.container.update&&this.container.update(this)}});return a})),r("graphic/box",["core/class"],(function(e,r,i){var n=e("core/class").createClass("Box",{constructor:function(e,r,i,n){var a=arguments[0];a&&"object"===t(a)&&(e=a.x,r=a.y,i=a.width,n=a.height),i<0&&(e-=i=-i),n<0&&(r-=n=-n),this.x=e,this.y=r,this.width=i,this.height=n},getLeft:function(){return this.x},getRight:function(){return this.x+this.width},getTop:function(){return this.y},getBottom:function(){return this.y+this.height},getRangeX:function(){return[this.x,this.x+this.width]},getRangeY:function(){return[this.y,this.y+this.height]},merge:function(t){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),a=Math.max(this.y+this.height,t.y+t.height);return new n(e,i,r-e,a-i)},valueOf:function(){return[this.x,this.y,this.width,this.height]},toString:function(){return this.valueOf().join(" ")}});return n})),r("graphic/circle",["core/class","graphic/ellipse","core/utils","graphic/point","graphic/path"],(function(t,e,r){return t("core/class").createClass("Circle",{base:t("graphic/ellipse"),constructor:function(t,e,r){this.callBase(t,t,e,r)},getRadius:function(){return this.getRadiusX()},setRadius:function(t){return this.callBase(t,t)}})})),r("graphic/clip",["core/class","graphic/shape","graphic/svg","core/utils","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box","graphic/shapecontainer","graphic/container"],(function(t,e,r){var i=t("core/class"),n=t("graphic/shape"),a=i.createClass("Clip",{base:n,mixins:[t("graphic/shapecontainer")],constructor:function(){this.callBase("clipPath")},clip:function(t){return t.getNode().setAttribute("clip-path","url(#"+this.getId()+")"),this}});return i.extendClass(n,{clipWith:function(t){return t.clip(this),this}}),a})),r("graphic/color",["core/utils","graphic/standardcolor","core/class"],(function(t,e,r){var i=t("core/utils"),n=t("graphic/standardcolor"),a={},o=t("core/class").createClass("Color",{constructor:function(){var t=null;"string"==typeof arguments[0]?null===(t=a.parseToValue(arguments[0]))&&(t={r:0,g:0,b:0,h:0,s:0,l:0,a:1}):(t={r:0|arguments[0],g:0|arguments[1],b:0|arguments[2],a:parseFloat(arguments[3])||1},t=a.overflowFormat(t),t=i.extend(t,a.rgbValueToHslValue(t))),this._color=t},set:function(t,e){if(!o._MAX_VALUE[t])throw new Error("Color set(): Illegal parameter");return"a"!==t&&(e=Math.floor(e)),"h"==t&&(e=(e+360)%360),this._color[t]=Math.max(o._MIN_VALUE[t],Math.min(o._MAX_VALUE[t],e)),-1!=="rgb".indexOf(t)?this._color=i.extend(this._color,a.rgbValueToHslValue(this._color)):-1!=="hsl".indexOf(t)&&(this._color=i.extend(this._color,a.hslValueToRGBValue(this._color))),this},inc:function(t,e){return e=this.get(t)+e,"h"==t?e=(e+360)%360:(e=Math.min(o._MAX_VALUE[t],e),e=Math.max(o._MIN_VALUE[t],e)),this.clone().set(t,e)},dec:function(t,e){return this.inc(t,-e)},clone:function(){return new o(this.toRGBA())},get:function(t){return o._MAX_VALUE[t]?this._color[t]:null},getValues:function(){return i.clone(this._color)},valueOf:function(){return this.getValues()},toRGB:function(){return a.toString(this._color,"rgb")},toRGBA:function(){return a.toString(this._color,"rgba")},toHEX:function(){return a.toString(this._color,"hex")},toHSL:function(){return a.toString(this._color,"hsl")},toHSLA:function(){return a.toString(this._color,"hsla")},toString:function(){return 1===this._color.a?this.toRGB():this.toRGBA()}});return i.extend(o,{_MAX_VALUE:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},_MIN_VALUE:{r:0,g:0,b:0,h:0,s:0,l:0,a:0},R:"r",G:"g",B:"b",H:"h",S:"s",L:"l",A:"a",parse:function(t){var e;return i.isString(t)&&(e=a.parseToValue(t)),i.isObject(t)&&"r"in t&&(e=t),null===e?new o:new o(e.r,e.g,e.b,e.a)},createHSL:function(t,e,r){return o.createHSLA(t,e,r,1)},createHSLA:function(t,e,r,i){var n=null;return n=["hsla("+t,e+="%",r+="%",i+")"],o.parse(n.join(", "))},createRGB:function(t,e,r){return o.createRGBA(t,e,r,1)},createRGBA:function(t,e,r,i){return new o(t,e,r,i)}}),i.extend(a,{parseToValue:function(t){var e={};if(t=n.EXTEND_STANDARD[t]||n.COLOR_STANDARD[t]||t,/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(t))e=a.hexToValue(t);else if(/^(rgba?)/i.test(t))e=a.rgbaToValue(t);else{if(!/^(hsla?)/i.test(t))return null;e=a.hslaToValue(t)}return a.overflowFormat(e)},hexToValue:function(t){var e={};return/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(t)?(t=RegExp.$1.split(""),i.each(["r","g","b"],(function(r,i){3===t.length?e[r]=a.toNumber(t[i]+t[i]):e[r]=a.toNumber(t[2*i]+t[2*i+1])})),(e=i.extend(e,a.rgbValueToHslValue(e))).a=1,e):null},rgbaToValue:function(t){var e={},r=!1;return/^(rgba?)/i.test(t)?(r=4===RegExp.$1.length,t=t.replace(/^rgba?/i,"").replace(/\s+/g,"").replace(/[^0-9,.]/g,"").split(","),i.each(["r","g","b"],(function(r,i){e[r]=0|t[i]})),(e=i.extend(e,a.rgbValueToHslValue(e))).a=r?parseFloat(t[3]):1,e):null},hslaToValue:function(t){var e={},r=!1;return/^(hsla?)/i.test(t)?(r=4===RegExp.$1.length,t=t.replace(/^hsla?/i,"").replace(/\s+/g,"").replace(/[^0-9,.]/g,"").split(","),e.h=0|t[0],e.s=0|t[1],e.l=0|t[2],e=i.extend(e,a.hslValueToRGBValue(e)),(e=a.hslValueToRGBValue(e)).a=r?parseFloat(t[3]):1,e):null},hslValueToRGBValue:function(t){function e(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+6*(e-t)*r:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}var r=null,n=null,a={};return(t=i.extend({},t)).h=t.h/360,t.s=t.s/100,t.l=t.l/100,0===t.s?a.r=a.g=a.b=t.l:(r=t.l<.5?t.l*(1+t.s):t.l+t.s-t.l*t.s,n=2*t.l-r,a.r=e(n,r,t.h+1/3),a.g=e(n,r,t.h),a.b=e(n,r,t.h-1/3)),a.r=Math.min(Math.round(255*a.r),255),a.g=Math.min(Math.round(255*a.g),255),a.b=Math.min(Math.round(255*a.b),255),a},rgbValueToHslValue:function(t){var e,r,n={};return(t=i.extend({},t)).r=t.r/255,t.g=t.g/255,t.b=t.b/255,(e=Math.max(t.r,t.g,t.b))===(r=Math.min(t.r,t.g,t.b))?n.h=0:e===t.r?t.g>=t.b?n.h=60*(t.g-t.b)/(e-r):n.h=60*(t.g-t.b)/(e-r)+360:e===t.g?n.h=60*(t.b-t.r)/(e-r)+120:e===t.b&&(n.h=60*(t.r-t.g)/(e-r)+240),n.l=(e+r)/2,0===n.l||e===r?n.s=0:n.l>0&&n.l<=.5?n.s=(e-r)/(e+r):n.s=(e-r)/(2-e-r),n.h=Math.round(n.h),n.s=Math.round(100*n.s),n.l=Math.round(100*n.l),n},toString:function(t,e){var r=[];return t=i.extend({},t),-1!==e.indexOf("hsl")&&(t.s+="%",t.l+="%"),"hex"!==e?(i.each(e.split(""),(function(e){r.push(t[e])})),(e+"("+r.join(", ")+")").toLowerCase()):(r.push(a.toHexValue(+t.r)),r.push(a.toHexValue(+t.g)),r.push(a.toHexValue(+t.b)),("#"+r.join("")).toLowerCase())},toNumber:function(t){return 0|Number("0x"+t)},toHexValue:function(t){var e=t.toString(16);return 1===e.length?"0"+e:e},overflowFormat:function(t){var e=i.extend({},t);return i.each("rgba".split(""),(function(t){e.hasOwnProperty(t)&&(e[t]=Math.min(o._MAX_VALUE[t],e[t]),e[t]=Math.max(o._MIN_VALUE[t],e[t]))})),e}}),o})),r("graphic/container",["core/class"],(function(e,r,i){function n(){return this.container.removeItem(this),this}return e("core/class").createClass("Container",{getItems:function(){return this.items||(this.items=[])},getItem:function(t){return this.getItems()[t]},getFirstItem:function(){return this.getItem(0)},getLastItem:function(){return this.getItem(this.getItems().length-1)},indexOf:function(t){return this.getItems().indexOf(t)},eachItem:function(t){var e,r=this.getItems(),i=r.length;for(e=0;e<i;e++)t.call(this,e,r[e]);return this},addItem:function(e,r,i){var a=this.getItems(),o=a.length;return~a.indexOf(e)||(r>=0&&r<o||(r=o),a.splice(r,0,e),"object"===t(e)&&(e.container=this,e.remove=n),this.handleAdd(e,r),i||this.onContainerChanged("add",[e])),this},addItems:function(t){for(var e=0,r=t.length;e<r;e++)this.addItem(t[e],-1,!0);return this.onContainerChanged("add",t),this},setItems:function(t){return this.clear().addItems(t)},appendItem:function(t){return this.addItem(t)},prependItem:function(t){return this.addItem(t,0)},removeItem:function(t,e){if("number"!=typeof t)return this.removeItem(this.indexOf(t));var r=this.getItems(),i=(r.length,r[t]);return void 0===i||(r.splice(t,1),i.container&&delete i.container,i.remove&&delete i.remove,this.handleRemove(i,t),e||this.onContainerChanged("remove",[i])),this},clear:function(){for(var t,e=[];t=this.getFirstItem();)e.push(t),this.removeItem(0,!0);return this.onContainerChanged("remove",e),this},onContainerChanged:function(t,e){},handleAdd:function(t,e){},handleRemove:function(t,e){}})})),r("graphic/curve",["core/utils","core/class","graphic/path","graphic/shape","graphic/svg","graphic/geometry","graphic/pointcontainer","graphic/container"],(function(t,e,r){var i=t("core/utils"),n={getCurvePanLines:function(t,e){var r=n.getCenterPoints(t),i=n.getPanLine(t.length,r);return n.getMovedPanLines(t,i,e)},getCenterPoints:function(t){for(var e={},r=0,i=0,n=t.length;r<n;r++)e[r+","+(i=r===n-1?0:r+1)]={x:(t[r].x+t[i].y)/2,y:(t[r].x+t[i].y)/2};return e},getPanLine:function(t,e){for(var r,i={},n=null,a=0;a<t;a++){var o,s;n=r=(a+1)%t,o=e[a+","+r],s=e[(a=r)+","+(r=(a+1)%t)],i[n]={points:[{x:o.x,y:o.y},{x:s.x,y:s.y}],center:{x:(o.x+s.x)/2,y:(o.y+s.y)/2}},a=(n+t-1)%t}return i},getMovedPanLines:function(t,e,r){var n={};return i.each(t,(function(t,a){var o=e[a],s=o.center,c=s.x-t.x,u=s.y-t.y,l=n[a]={points:[],center:{x:t.x,y:t.y}};i.each(o.points,(function(t,e){var i={x:t.x-c,y:t.y-u},n=l.center,a=i.x-n.x,o=i.y-n.y;i.x=n.x+r*a,i.y=n.y+r*o,l.points.push(i)}))})),n}};return t("core/class").createClass("Curve",{base:t("graphic/path"),mixins:[t("graphic/pointcontainer")],constructor:function(t,e){this.callBase(),this.setPoints(t||[]),this.closeState=!!e,this.changeable=!0,this.smoothFactor=1,this.update()},onContainerChanged:function(){this.changeable&&this.update()},setSmoothFactor:function(t){return this.smoothFactor=t<0?0:t,this.update(),this},getSmoothFactor:function(){return this.smoothFactor},update:function(){var t,e=this.getPoints(),r=this.getDrawer(),i=null,a=null,o=null;if(r.clear(),0===e.length)return this;if(r.moveTo(e[0]),1===e.length)return this;if(2===e.length)return r.lineTo(e[1]),this;t=n.getCurvePanLines(e,this.getSmoothFactor());for(var s=1,c=e.length;s<c;s++)i=t[s].center,a=this.closeState||s!=c-1?t[s].points[0]:t[s].center,o=this.closeState||1!=s?t[s-1].points[1]:t[s-1].center,r.bezierTo(o.x,o.y,a.x,a.y,i.x,i.y);return this.closeState&&(i=t[0].center,a=t[0].points[0],o=t[e.length-1].points[1],r.bezierTo(o.x,o.y,a.x,a.y,i.x,i.y)),this},close:function(){return this.closeState=!0,this.update()},open:function(){return this.closeState=!1,this.update()},isClose:function(){return!!this.closeState}})})),r("graphic/data",["core/class"],(function(t,e,r){return t("core/class").createClass("Data",{constructor:function(){this._data={}},setData:function(t,e){return this._data[t]=e,this},getData:function(t){return this._data[t]},removeData:function(t){return delete this._data[t],this}})})),r("graphic/defbrush",["core/class","graphic/resource","graphic/svg"],(function(t,e,r){return t("core/class").createClass("GradientBrush",{base:t("graphic/resource"),constructor:function(t){this.callBase(t)}})})),r("graphic/ellipse",["core/utils","graphic/point","core/class","graphic/path","graphic/shape","graphic/svg","graphic/geometry"],(function(t,e,r){t("core/utils");var i=t("graphic/point");return t("core/class").createClass("Ellipse",{base:t("graphic/path"),constructor:function(t,e,r,i){this.callBase(),this.rx=t||0,this.ry=e||0,this.cx=r||0,this.cy=i||0,this.update()},update:function(){var t=this.rx,e=this.ry,r=this.cx+t,i=this.cx-t,n=this.cy,a=this.getDrawer();return a.clear(),a.moveTo(r,n),a.arcTo(t,e,0,1,1,i,n),a.arcTo(t,e,0,1,1,r,n),this},getRadius:function(){return{x:this.rx,y:this.ry}},getRadiusX:function(){return this.rx},getRadiusY:function(){return this.ry},getCenter:function(){return new i(this.cx,this.cy)},getCenterX:function(){return this.cx},getCenterY:function(){return this.cy},setRadius:function(t,e){return this.rx=t,this.ry=e,this.update()},setRadiusX:function(t){return this.rx=t,this.update()},setRadiusY:function(t){return this.ry=t,this.update()},setCenter:function(t,e){if(1==arguments.length){var r=i.parse(arguments[0]);t=r.x,e=r.y}return this.cx=t,this.cy=e,this.update()},setCenterX:function(t){return this.cx=t,this.update()},setCenterY:function(t){return this.cy=t,this.update()}})})),r("graphic/eventhandler",["core/utils","graphic/shapeevent","graphic/matrix","graphic/point","core/class"],(function(t,e,r){!function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),r}t.prototype=window.Event.prototype,window.CustomEvent=t}();var i=t("core/utils"),n=t("graphic/shapeevent"),a={},o={},s=0;function c(t,e,r){return r=!!r,i.isString(t)&&(t=t.match(/\S+/g)),i.each(t,(function(t){l.call(this,this.node,t,e,r)}),this),this}function u(t,e){var r=null,n=this._EVNET_UID,s=void 0===e;try{r=o[n][t]}catch(t){return}return s||(s=!0,i.each(r,(function(t,i){t===e?delete r[i]:s=!1}))),s&&(function(t,e,r){t.removeEventListener?t.removeEventListener(e,r,!1):t.detachEvent(e,r)}(this.node,t,a[n][t]),delete o[n][t],delete a[n][t]),this}function l(t,e,r,s){var c=this._EVNET_UID,u=this;a[c]||(a[c]={}),a[c][e]||(a[c][e]=function(t){t=new n(t||window.event),i.each(o[c][e],(function(r){var i;return r&&(i=r.call(u,t),s&&u.off(e,r)),i}),u)}),o[c]||(o[c]={}),o[c][e]?o[c][e].push(r):(o[c][e]=[r],t&&function(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}(t,e,a[c][e]))}return t("core/class").createClass("EventHandler",{constructor:function(){this._EVNET_UID=++s},addEventListener:function(t,e){return c.call(this,t,e,!1)},addOnceEventListener:function(t,e){return c.call(this,t,e,!0)},removeEventListener:function(t,e){return u.call(this,t,e)},on:function(t,e){return this.addEventListener.apply(this,arguments)},once:function(t,e){return this.addOnceEventListener.apply(this,arguments)},off:function(){return this.removeEventListener.apply(this,arguments)},fire:function(t,e){return this.trigger.apply(this,arguments)},trigger:function(t,e){return this.node?function(t,e,r){var i=new CustomEvent(e,{bubbles:!0,cancelable:!0});i._kityParam=r,t.dispatchEvent(i)}(this.node,t,e):function(t,e,r){var n,o=null;try{if(!(o=a[t._EVNET_UID][e]))return}catch(t){return}n=i.extend({type:e,target:t},r||{}),o.call(t,n)}(this,t,e),this}})})),r("graphic/geometry",["core/utils","graphic/point","core/class","graphic/vector","graphic/matrix","graphic/box"],(function(t){var e=t("core/utils"),r=t("graphic/point"),i=t("graphic/vector"),n=t("graphic/matrix"),a={},o=/([achlmrqstvz])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?\s*)+)/gi,s=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)\s*,?\s*/gi,c={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0};function u(t){var e,r,i,n,a;for(e=[],r=0;r<t.length;r++)for(n=t[r],e.push(a=[]),i=0;i<n.length;i++)a.push(n[i]);return t.isUniform&&(e.isUniform=!0),t.isAbsolute&&(e.isAbsolute=!0),t.isCurve&&(e.isCurve=!0),e}function l(t,e,r){function i(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return t.push(t.splice(r,1)[0])}return function n(){var a=Array.prototype.slice.call(arguments,0),o=a.join("␀"),s=n.cache=n.cache||{},c=n.count=n.count||[];return s.hasOwnProperty(o)?(i(c,o),r?r(s[o]):s[o]):(c.length>=1e3&&delete s[c.shift()],c.push(o),s[o]=t.apply(e,a),r?r(s[o]):s[o])}}function h(t,e,r,i,n,a,o,s,c,u){var l,f,p,d,g,m,v,y,b,x,A,w,k,C,E,S,_,B,O,P,T,M,I,R,N,q,D,U,L,V=Math,z=V.PI,F=Math.abs,j=120*z/180,W=z/180*(+n||0),G=[],H=function(t,e,r){return{x:t*V.cos(r)-e*V.sin(r),y:t*V.sin(r)+e*V.cos(r)}};if(u?(x=u[0],A=u[1],y=u[2],b=u[3]):(t=(l=H(t,e,-W)).x,e=l.y,s=(l=H(s,c,-W)).x,c=l.y,V.cos(z/180*n),V.sin(z/180*n),(f=(p=(t-s)/2)*p/(r*r)+(d=(e-c)/2)*d/(i*i))>1&&(r*=f=V.sqrt(f),i*=f),g=r*r,m=i*i,y=(v=(a==o?-1:1)*V.sqrt(F((g*m-g*d*d-m*p*p)/(g*d*d+m*p*p))))*r*d/i+(t+s)/2,b=v*-i*p/r+(e+c)/2,x=V.asin(((e-b)/i).toFixed(9)),A=V.asin(((c-b)/i).toFixed(9)),(x=t<y?z-x:x)<0&&(x=2*z+x),(A=s<y?z-A:A)<0&&(A=2*z+A),o&&x>A&&(x-=2*z),!o&&A>x&&(A-=2*z)),F(A-x)>j&&(k=A,C=s,E=c,A=x+j*(o&&A>x?1:-1),G=h(s=y+r*V.cos(A),c=b+i*V.sin(A),r,i,n,0,o,C,E,[A,k,y,b])),w=A-x,S=V.cos(x),_=V.sin(x),B=V.cos(A),O=V.sin(A),N=[s+(T=4/3*r*(P=V.tan(w/4)))*O,c-(M=4/3*i*P)*B],q=[s,c],(R=[t+T*_,e-M*S])[0]=2*(I=[t,e])[0]-R[0],R[1]=2*I[1]-R[1],u)return[R,N,q].concat(G);for(D=[],U=0,L=(G=[R,N,q].concat(G).join().split(",")).length;U<L;U++)D[U]=U%2?H(G[U-1],G[U],W).y:H(G[U],G[U+1],W).x;return D}function f(t,e,r,i,n,a){var o=1/3,s=2/3;return[o*t+s*r,o*e+s*i,o*n+s*r,o*a+s*i,n,a]}function p(t,e){var r=function(t){return function(e,r){return e+t*(r-e)}}(e||.5),i=t,n=i[0],a=i[1],o=i[2],s=i[3],c=i[4],u=i[5],l=i[6],h=i[7],f=r(n,o),p=r(a,s),d=r(o,c),g=r(s,u),m=r(c,l),v=r(u,h),y=r(f,d),b=r(p,g),x=r(d,m),A=r(g,v),w=r(y,x),k=r(b,A);return[[n,a,f,p,y,b,w,k],[w,k,x,A,m,v,l,h]]}a.pathToString=function(t){return"string"==typeof(t=t||this)?t:t instanceof Array?(t=e.flatten(t)).join(",").replace(/,?([achlmqrstvxz]),?/gi,"$1"):void 0},a.parsePathString=l((function(t){var e=[];return t.replace(o,(function(t,r,i){var n=[],a=r.toLowerCase();if(i.replace(s,(function(t,e){e&&n.push(+e)})),"m"==a&&n.length>2&&(e.push([r].concat(n.splice(0,2))),a="l",r="m"==r?"l":"L"),"r"==a)e.push([r].concat(n));else for(;n.length>=c[a]&&(e.push([r].concat(n.splice(0,c[a]))),c[a]););})),e.isUniform=!0,e.toString=a.pathToString,e})),a.pathToAbsolute=l((function(t){var e,r,i,n,o,s,c,u,l=t.isUniform?t:a.parsePathString(a.pathToString(t)),h=[],f=0,p=0,d=0,g=0,m=0;for("M"==l[0][0]&&(d=f=+l[0][1],g=p=+l[0][2],m++,h[0]=["M",f,p]),i=m,s=l.length;i<s;i++){if(h.push(e=[]),(r=l[i])[0]!=r[0].toUpperCase())switch(e[0]=r[0].toUpperCase(),e[0]){case"A":e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=+(r[6]+f),e[7]=+(r[7]+p);break;case"V":e[1]=+r[1]+p;break;case"H":e[1]=+r[1]+f;break;case"M":d=+r[1]+f,g=+r[2]+p;break;default:for(n=1,c=r.length;n<c;n++)e[n]=+r[n]+(n%2?f:p)}else for(o=0,u=r.length;o<u;o++)e[o]=r[o];switch(e[0]){case"Z":f=d,p=g;break;case"H":f=e[1];break;case"V":p=e[1];break;case"M":d=e[e.length-2],g=e[e.length-1];break;default:f=e[e.length-2],p=e[e.length-1]}}return h.isUniform=!0,h.isAbsolute=!0,h.toString=a.pathToString,h})),a.pathToCurve=l((function(t){var e,r,i,n,o,s,c,u,l,p,d,g=[];for(t.isAbsolute||(t=a.pathToAbsolute(t)),e=0;e<t.length;e++)if(r=t[e][0],i=t[e].slice(1),"M"!=r){switch("Z"==r&&(c=!0,r="L",i=n),s=i.slice(i.length-2),"H"==r&&(s=[i[0],o[1]],r="L"),"V"==r&&(s=[o[0],i[0]],r="L"),"S"!=r&&"T"!=r||(l=[o[0]+(o[0]-u[0]),o[1]+(o[1]-u[1])]),r){case"L":p=o,d=s;break;case"C":p=i.slice(0,2),d=i.slice(2,4);break;case"S":p=l.slice(),d=i.slice(0,2);break;case"Q":u=i.slice(0,2),p=(i=f.apply(null,o.concat(i))).slice(0,2),d=i.slice(2,4);break;case"T":p=(i=f.apply(null,o.concat(l).concat(i))).slice(0,2),d=i.slice(2,4);break;case"A":p=(i=h.apply(null,o.concat(i))).slice(0,2),d=i.slice(2,4)}g.push(["C"].concat(p).concat(d).concat(s)),o=s,"Q"!=r&&(u=d),c&&(g.push(["Z"]),c=!1)}else n=u=o=i,g.push(t[e]);return g.isUniform=!0,g.isAbsolute=!0,g.isCurve=!0,g.toString=a.pathToString,g})),a.cutBezier=l(p),a.subBezier=function(t,e,r){var i=p(t,e)[0];return r?p(i,r/e)[1]:i},a.pointAtBezier=function(t,e){var n=p(t,e)[0],o=r.parse(n.slice(6)),s=r.parse(n.slice(4,2)),c=i.fromPoints(s,o);return o.tan=0===e?a.pointAtBezier(t,.01).tan:c.normalize(),o},a.bezierLength=l((function t(e,r){function i(t,e){var r=t[0]-e[0],i=t[1]-e[1];return Math.sqrt(r*r+i*i)}var n,a,o,s,c;return r=Math.max(r||.001,1e-9),n=p(e),a=e.slice(0,2),o=e.slice(6),(c=i(a,s=n[1].slice(0,2))+i(s,o))-i(a,o)<r?c:t(n[0],r/2)+t(n[1],r/3)}));var d=l((function(t){var e,r,i,n,o,s,c;for(s=[],c=0,e=0,r=t.length;e<r;e++)"M"!=(i=t[e])[0]?"Z"!=i[0]?(o=a.bezierLength(n.concat(i.slice(1))),s.push([c,c+o]),c+=o,n=i.slice(4)):s.push(null):(n=i.slice(1),s.push(null));return s.totalLength=c,s}));a.subPath=function(t,e,r){var i;if(i=e-(r=r||0),(e=(r-=0|r)+(i-=0|i))>1)return a.subPath(t,1,r).concat(a.subPath(t,e-1));t.isCurve||(t=a.pathToCurve(t));var n,o,s,c,u,l,h,f,p,g=d(t),m=g.totalLength,v=m*e,y=m*(r||0),b=[];for(n=0,o=t.length;n<o;n++)if("M"!=t[n][0]){if("Z"!=t[n][0])if(s=g[n][0],u=(c=g[n][1])-s,h=l.concat(t[n].slice(1)),y>c)l=h.slice(h.length-2);else{if(y>=s)p=!0,l=(f=a.subBezier(h,Math.min((v-s)/u,1),(y-s)/u)).slice(0,2),b.push(["M"].concat(f.slice(0,2))),b.push(["C"].concat(f.slice(2)));else if(v>=c)b.push(t[n].slice());else{if(!(v>=s))break;f=a.subBezier(h,(v-s)/u),b.push(["C"].concat(f.slice(2))),p=!1}l=h.slice(h.length-2)}}else l=t[n].slice(1),p&&b.push(t[n].slice());return b.isAbsolute=!0,b.isCurve=!0,b.isUniform=!0,b.toString=a.pathToString,b},a.pointAtPath=function(t,e){t.isCurve||(t=a.pathToCurve(t));var n=a.subPath(t,e),o="Z"==n[n.length-1][0]?n[n.length-2]:n[n.length-1];o=o.slice(1);var s=r.parse(o.slice(4)),c=r.parse(o.slice(2,4));return s.tan=i.fromPoints(c,s).normalize(),s},a.pathLength=l((function(t){return t.isCurve||(t=a.pathToCurve(t)),d(t).totalLength})),a.pathKeyPoints=l((function(t){var e,r,i;for(t.isCurve||(t=a.pathToCurve(t)),i=[],e=0,r=t.length;e<r;e++)"z"!=t[e][0]&&i.push(t[e].slice(t[e].length-2));return i}));var g=l((function(t,e){t.isCurve||(t=a.pathToCurve(t)),e.isCurve||(e=a.pathToCurve(e));var r=u(t),i=u(e);function n(t,e){return t[e||t.i]&&t[e||t.i][0]}function o(t,e){var r=function(t,e){return t[e||t.i]&&t[e||t.i].slice(1)}(t,e);return r&&r.slice(-2)}function s(t){return"Z"==n(t)&&(t.splice(t.i,1),!0)}function c(t){return"M"==n(t)&&(t.o.splice(t.o.i,0,["M"].concat(o(t.o,t.o.i-1))),t.i++,t.o.i++,!0)}function l(t){for(var e,r=1;!e;)e=o(t,t.length-r++);for(t.o.i=t.i;t.length<t.o.length;)s(t.o)||c(t.o)||(t.push(["C"].concat(e).concat(e).concat(e)),t.i++,t.o.i++)}for(r.i=0,i.i=0,r.o=i,i.o=r;r.i<r.length&&i.i<i.length;)s(r)||s(i)||n(r)!=n(i)&&(c(r)||c(i))||(r.i++,i.i++);return r.i==r.length&&l(r),i.i==i.length&&l(i),delete r.i,delete r.o,delete i.i,delete i.o,[r,i]}));return a.alignCurve=g,a.pathTween=function(t,e,r){if(0===r)return t;if(1===r)return e;var i,n,a,o=g(t,e),s=[];for(t=o[0],e=o[1],n=0;n<t.length;n++)for(s.push(i=[]),i.push(t[n][0]),a=1;a<t[n].length;a++)i.push(t[n][a]+r*(e[n][a]-t[n][a]));return s.isUniform=s.isCurve=s.isAbsolute=!0,s},a.transformPath=l((function(t,e){var i,n,o,s,c;for(t.isCurve||(t=a.pathToCurve(t)),s=[],i=0,n=t.length;i<n;i++)for(s.push([t[i][0]]),o=1;o<t[i].length;o+=2)c=t[i].slice(o,o+2),c=e.transformPoint(r.parse(c)),s.push(c);return s})),t("core/class").extendClass(n,{transformPath:function(t){return a.transformPath(t,this)}}),a})),r("graphic/gradientbrush",["graphic/svg","graphic/defbrush","core/class","graphic/resource","graphic/color","core/utils","graphic/standardcolor"],(function(t,e,r){var i=t("graphic/svg"),n=t("graphic/defbrush"),a=t("graphic/color");return t("core/class").createClass("GradientBrush",{base:n,constructor:function(t){this.callBase(t),this.stops=[]},addStop:function(t,e,r){var n=i.createNode("stop");return e instanceof a||(e=a.parse(e)),void 0===r&&(r=e.get("a")),n.setAttribute("offset",t),n.setAttribute("stop-color",e.toRGB()),r<1&&n.setAttribute("stop-opacity",r),this.node.appendChild(n),this}})})),r("graphic/group",["graphic/shapecontainer","graphic/container","core/utils","core/class","graphic/shape","graphic/svg","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t,e,r){var i=t("graphic/shapecontainer");return t("core/class").createClass("Group",{mixins:[i],base:t("graphic/shape"),constructor:function(){this.callBase("g")}})})),r("graphic/hyperlink",["graphic/shapecontainer","graphic/container","core/utils","core/class","graphic/shape","graphic/svg","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t,e,r){var i=t("graphic/shapecontainer");return t("core/class").createClass("HyperLink",{mixins:[i],base:t("graphic/shape"),constructor:function(t){this.callBase("a"),this.setHref(t)},setHref:function(t){return this.node.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t),this},getHref:function(){return this.node.getAttributeNS("xlink:href")},setTarget:function(t){return this.node.setAttribute("target",t),this},getTarget:function(){return this.node.getAttribute("target")}})})),r("graphic/image",["core/class","graphic/shape","graphic/svg","core/utils","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t,e,r){return t("core/class").createClass("Image",{base:t("graphic/shape"),constructor:function(t,e,r,i,n){this.callBase("image"),this.url=t,this.width=e||0,this.height=r||0,this.x=i||0,this.y=n||0,this.update()},update:function(){return this.node.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.url),this.node.setAttribute("x",this.x),this.node.setAttribute("y",this.y),this.node.setAttribute("width",this.width),this.node.setAttribute("height",this.height),this},setUrl:function(t){return this.url=""===t?null:t,this.update()},getUrl:function(){return this.url},setWidth:function(t){return this.width=t,this.update()},getWidth:function(){return this.width},setHeight:function(t){return this.height=t,this.update()},getHeight:function(){return this.height},setX:function(t){return this.x=t,this.update()},getX:function(){return this.x},setY:function(t){return this.y=t,this.update()},getY:function(){return this.y}})})),r("graphic/line",["core/class","graphic/path","core/utils","graphic/shape","graphic/svg","graphic/geometry"],(function(t,e,r){return t("core/class").createClass("Line",{base:t("graphic/path"),constructor:function(t,e,r,i){this.callBase(),this.point1={x:t||0,y:e||0},this.point2={x:r||0,y:i||0},this.update()},setPoint1:function(t,e){return this.point1.x=t,this.point1.y=e,this.update()},setPoint2:function(t,e){return this.point2.x=t,this.point2.y=e,this.update()},getPoint1:function(){return{x:this.point1.x,y:this.point1.y}},getPoint2:function(){return{x:this.point2.x,y:this.point2.y}},update:function(){var t=this.getDrawer();return t.clear(),t.moveTo(this.point1.x,this.point1.y),t.lineTo(this.point2.x,this.point2.y),this}})})),r("graphic/lineargradientbrush",["graphic/svg","graphic/gradientbrush","graphic/defbrush","graphic/color","core/class"],(function(t,e,r){t("graphic/svg");var i=t("graphic/gradientbrush");return t("core/class").createClass("LinearGradientBrush",{base:i,constructor:function(t){this.callBase("linearGradient"),this.setStartPosition(0,0),this.setEndPosition(1,0),"function"==typeof t&&t.call(this,this)},setStartPosition:function(t,e){return this.node.setAttribute("x1",t),this.node.setAttribute("y1",e),this},setEndPosition:function(t,e){return this.node.setAttribute("x2",t),this.node.setAttribute("y2",e),this},getStartPosition:function(){return{x:+this.node.getAttribute("x1"),y:+this.node.getAttribute("y1")}},getEndPosition:function(){return{x:+this.node.getAttribute("x2"),y:+this.node.getAttribute("y2")}}})})),r("graphic/marker",["graphic/point","core/class","graphic/resource","graphic/svg","graphic/shapecontainer","graphic/container","core/utils","graphic/shape","graphic/viewbox","graphic/path","graphic/geometry"],(function(t,e,r){var i=t("graphic/point"),n=t("core/class").createClass("Marker",{base:t("graphic/resource"),mixins:[t("graphic/shapecontainer"),t("graphic/viewbox")],constructor:function(){this.callBase("marker"),this.setOrient("auto")},setRef:function(t,e){return 1===arguments.length&&(e=t.y,t=t.x),this.node.setAttribute("refX",t),this.node.setAttribute("refY",e),this},getRef:function(){return new i(+this.node.getAttribute("refX"),+this.node.getAttribute("refY"))},setWidth:function(t){return this.node.setAttribute("markerWidth",this.width=t),this},setOrient:function(t){return this.node.setAttribute("orient",this.orient=t),this},getOrient:function(){return this.orient},getWidth:function(){return+this.width},setHeight:function(t){return this.node.setAttribute("markerHeight",this.height=t),this},getHeight:function(){return+this.height}}),a=t("graphic/path");return t("core/class").extendClass(a,{setMarker:function(t,e){return e=e||"end",t?this.node.setAttribute("marker-"+e,t.toString()):this.node.removeAttribute("marker-"+e),this}}),n})),r("graphic/mask",["core/class","graphic/shape","graphic/svg","core/utils","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box","graphic/shapecontainer","graphic/container"],(function(t,e,r){var i=t("core/class"),n=t("graphic/shape"),a=i.createClass("Mask",{base:n,mixins:[t("graphic/shapecontainer")],constructor:function(){this.callBase("mask")},mask:function(t){return t.getNode().setAttribute("mask","url(#"+this.getId()+")"),this}});return i.extendClass(n,{maskWith:function(t){return t.mask(this),this}}),a})),r("graphic/matrix",["core/utils","graphic/box","core/class","graphic/point"],(function(t,e,r){var i=t("core/utils"),n=t("graphic/box"),a=/matrix\((.+)\)/i,o=t("graphic/point");function s(t,e){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}function c(t){return t*Math.PI/180}var u=t("core/class").createClass("Matrix",{constructor:function(){arguments.length?this.setMatrix.apply(this,arguments):this.setMatrix(1,0,0,1,0,0)},translate:function(t,e){return this.m=s(this.m,{a:1,c:0,e:t,b:0,d:1,f:e}),this},rotate:function(t){var e=c(t),r=Math.sin(e),i=Math.cos(e);return this.m=s(this.m,{a:i,c:-r,e:0,b:r,d:i,f:0}),this},scale:function(t,e){return void 0===e&&(e=t),this.m=s(this.m,{a:t,c:0,e:0,b:0,d:e,f:0}),this},skew:function(t,e){void 0===e&&(e=t);var r=Math.tan(c(t)),i=Math.tan(c(e));return this.m=s(this.m,{a:1,c:r,e:0,b:i,d:1,f:0}),this},inverse:function(){var t,e=this.m,r=e.a,i=e.b,n=e.c,a=e.d,o=e.e,s=e.f;return new u(a/(t=r*a-i*n),-i/t,-n/t,r/t,(n*s-o*a)/t,(i*o-r*s)/t)},setMatrix:function(t,e,r,n,a,o){return this.m=1===arguments.length?i.clone(arguments[0]):{a:t,b:e,c:r,d:n,e:a,f:o},this},getMatrix:function(){return i.clone(this.m)},getTranslate:function(){var t=this.m;return{x:t.e/t.a,y:t.f/t.d}},mergeMatrix:function(t){return new u(s(this.m,t.m))},merge:function(t){return this.mergeMatrix(t)},toString:function(){return this.valueOf().join(" ")},valueOf:function(){var t=this.m;return[t.a,t.b,t.c,t.d,t.e,t.f]},equals:function(t){var e=this.m,r=t.m;return e.a==r.a&&e.b==r.b&&e.c==r.c&&e.d==r.d&&e.e==r.e&&e.f==r.f},transformPoint:function(){return u.transformPoint.apply(null,[].slice.call(arguments).concat([this.m]))},transformBox:function(t){return u.transformBox(t,this.m)}});return u.parse=function(t){var e,r=parseFloat;if(t instanceof Array)return new u({a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]});if(e=a.exec(t)){var i=e[1].split(",");return 6!=i.length&&(i=e[1].split(" ")),new u({a:r(i[0]),b:r(i[1]),c:r(i[2]),d:r(i[3]),e:r(i[4]),f:r(i[5])})}return new u},u.transformPoint=function(t,e,r){return 2===arguments.length&&(r=e,e=t.y,t=t.x),new o(r.a*t+r.c*e+r.e,r.b*t+r.d*e+r.f)},u.transformBox=function(t,e){for(var r,a,o=Number.MAX_VALUE,s=-Number.MAX_VALUE,c=Number.MAX_VALUE,l=-Number.MAX_VALUE,h=[[t.x,t.y],[t.x+t.width,t.y],[t.x,t.y+t.height],[t.x+t.width,t.y+t.height]],f=[];r=h.pop();)a=u.transformPoint(r[0],r[1],e),f.push(a),o=Math.min(o,a.x),s=Math.max(s,a.x),c=Math.min(c,a.y),l=Math.max(l,a.y);return t=new n({x:o,y:c,width:s-o,height:l-c}),i.extend(t,{closurePoints:f,left:o,right:s,top:c,bottom:l,cx:(o+s)/2,cy:(c+l)/2}),t},u.getCTM=function(t,e){var r={a:1,b:0,c:0,d:1,e:0,f:0};function i(t,e){var r;try{r=e.getScreenCTM().inverse()}catch(t){throw new Error("Can not inverse source element' ctm.")}return r.multiply(t.getScreenCTM())}switch(e=e||"parent"){case"screen":r=t.node.getScreenCTM();break;case"doc":case"paper":r=t.node.getCTM();break;case"view":case"top":t.getPaper()&&(r=void 0!==t.node.getTransformToElement?t.node.getTransformToElement(t.getPaper().shapeNode):i(t.node,t.getPaper().shapeNode));break;case"parent":t.node.parentNode&&(r=void 0!==t.node.getTransformToElement?t.node.getTransformToElement(t.node.parentNode):i(t.node,t.node.parentNode));break;default:e.node&&(r=void 0!==t.node.getTransformToElement?t.node.getTransformToElement(e.shapeNode||e.node):i(t.node,e.shapeNode||e.node))}return r?new u(r.a,r.b,r.c,r.d,r.e,r.f):new u},u})),r("graphic/palette",["graphic/standardcolor","graphic/color","core/utils","core/class"],(function(t,e,r){var i=t("graphic/standardcolor"),n=t("graphic/color"),a=t("core/utils"),o=t("core/class").createClass("Palette",{constructor:function(){this.color={}},get:function(t){var e=this.color[t]||i.EXTEND_STANDARD[t]||i.COLOR_STANDARD[t]||"";return e?new n(e):null},getColorValue:function(t){return this.color[t]||i.EXTEND_STANDARD[t]||i.COLOR_STANDARD[t]||""},add:function(t,e){return this.color[t]="string"==typeof e?new n(e).toRGBA():e.toRGBA(),e},remove:function(t){return!!this.color.hasOwnProperty(t)&&(delete this.color[t],!0)}});return a.extend(o,{getColor:function(t){var e=i.EXTEND_STANDARD[t]||i.COLOR_STANDARD[t];return e?new n(e):null},getColorValue:function(t){return i.EXTEND_STANDARD[t]||i.COLOR_STANDARD[t]||""},addColor:function(t,e){return i.EXTEND_STANDARD[t]="string"==typeof e?new n(e).toRGBA():e.toRGBA(),e},removeColor:function(t){return!!i.EXTEND_STANDARD.hasOwnProperty(t)&&(delete i.EXTEND_STANDARD[t],!0)}}),o})),r("graphic/paper",["core/class","core/utils","graphic/svg","graphic/container","graphic/shapecontainer","graphic/shape","graphic/viewbox","graphic/eventhandler","graphic/shapeevent","graphic/styled","graphic/matrix","graphic/box","graphic/point","graphic/data","graphic/pen"],(function(t,e,r){var i=t("core/class"),n=t("core/utils"),a=t("graphic/svg"),o=t("graphic/container"),s=t("graphic/shapecontainer"),c=t("graphic/viewbox"),u=t("graphic/eventhandler"),l=t("graphic/styled"),h=t("graphic/matrix"),f=i.createClass("Paper",{mixins:[s,u,l,c],constructor:function(t){this.callBase(),this.node=this.createSVGNode(),this.node.paper=this,this.node.appendChild(this.resourceNode=a.createNode("defs")),this.node.appendChild(this.shapeNode=a.createNode("g")),this.resources=new o,this.setWidth("100%").setHeight("100%"),t&&this.renderTo(t),this.callMixin()},renderTo:function(t){n.isString(t)&&(t=document.getElementById(t)),this.container=t,t.appendChild(this.node)},createSVGNode:function(){var t=a.createNode("svg");return t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),t},getNode:function(){return this.node},getContainer:function(){return this.container},getWidth:function(){return this.node.clientWidth},setWidth:function(t){return this.node.setAttribute("width",t),this},getHeight:function(){return this.node.clientHeight},setHeight:function(t){return this.node.setAttribute("height",t),this},setViewPort:function(t,e,r){var i,n;1==arguments.length&&(t=(i=arguments[0]).center.x,e=i.center.y,r=i.zoom),r=r||1,n=this.getViewBox();var a=new h,o=n.x+n.width/2-t,s=n.y+n.height/2-e;return a.translate(-t,-e),a.scale(r),a.translate(t,e),a.translate(o,s),this.shapeNode.setAttribute("transform","matrix("+a+")"),this.viewport={center:{x:t,y:e},offset:{x:o,y:s},zoom:r},this},getViewPort:function(){if(!this.viewport){var t=this.getViewBox();return{zoom:1,center:{x:t.x+t.width/2,y:t.y+t.height/2},offset:{x:0,y:0}}}return this.viewport},getViewPortTransform:function(){var t=this.shapeNode.getCTM();return new h(t.a,t.b,t.c,t.d,t.e,t.f)},getTransform:function(){return this.getViewPortTransform().reverse()},addResource:function(t){return this.resources.appendItem(t),t.node&&this.resourceNode.appendChild(t.node),this},removeResource:function(t){return t.remove&&t.remove(),t.node&&this.resourceNode.removeChild(t.node),this},getPaper:function(){return this}}),p=t("graphic/shape");return i.extendClass(p,{getPaper:function(){for(var t=this.container;t&&t instanceof f==0;)t=t.container;return t},whenPaperReady:function(t){var e=this;function r(){var r=e.getPaper();return r&&t&&t.call(e,r),r}return r()||this.on("add treeadd",(function t(){r()&&(e.off("add",t),e.off("treeadd",t))})),this}}),f})),r("graphic/path",["core/utils","core/class","graphic/shape","graphic/svg","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box","graphic/geometry","graphic/point","graphic/vector"],(function(t,e,r){var i=t("core/utils"),n=t("core/class").createClass,a=t("graphic/shape"),o=t("graphic/svg"),s=t("graphic/geometry"),c=Array.prototype.slice,u=(i.flatten,n("PathDrawer",{constructor:function(t){this.segment=[],this.path=t,this.__clear=!1},getPath:function(){return this.path},redraw:function(){return this._transation=this._transation||[],this.clear()},done:function(){var t=this._transation;return this._transation=null,this.push(t),this},clear:function(){return this._transation?this._transation=[]:this.path.setPathData("M 0 0"),this._clear=!0,this},push:function(){var t,e=c.call(arguments);return this._transation?(this._transation.push(e),this):(this._clear?(t="",this._clear=!1):t=this.path.getPathData(),t=t||"",this.path.setPathData(t+s.pathToString(e)),this)},moveTo:function(t,e){return this.push("M",c.call(arguments))},moveBy:function(t,e){return this.push("m",c.call(arguments))},lineTo:function(t,e){return this.push("L",c.call(arguments))},lineBy:function(t,e){return this.push("l",c.call(arguments))},arcTo:function(t,e,r,i,n,a,o){return this.push("A",c.call(arguments))},arcBy:function(t,e,r,i,n,a,o){return this.push("a",arguments)},carcTo:function(t,e,r,i,n){return this.push("A",[t,t,0].concat(c.call(arguments,1)))},carcBy:function(t,e,r,i,n){return this.push("a",[t,t,0].concat(c.call(arguments,1)))},bezierTo:function(t,e,r,i,n,a){return this.push("C",c.call(arguments))},bezierBy:function(t,e,r,i,n,a){return this.push("c",c.call(arguments))},close:function(){return this.push("z")}}));return n("Path",{base:a,constructor:function(t){this.callBase("path"),t&&this.setPathData(t),this.node.setAttribute("fill",o.defaults.fill),this.node.setAttribute("stroke",o.defaults.stroke)},setPathData:function(t){return t=t||"M0,0",this.pathdata=s.pathToString(t),this.node.setAttribute("d",this.pathdata),this.trigger("shapeupdate",{type:"pathdata"}),this},getPathData:function(){return this.pathdata||""},getDrawer:function(){return new u(this)},isClosed:function(){var t=this.getPathData();return!!~t.indexOf("z")||!!~t.indexOf("Z")}})})),r("graphic/patternbrush",["graphic/defbrush","core/class","graphic/resource","graphic/shapecontainer","graphic/container","core/utils","graphic/shape","graphic/svg"],(function(t,e,r){var i=t("graphic/defbrush"),n=t("graphic/shapecontainer");return t("graphic/svg"),t("core/class").createClass("PatternBrush",{base:i,mixins:[n],constructor:function(){this.callBase("pattern"),this.node.setAttribute("patternUnits","userSpaceOnUse")},setX:function(t){return this.x=t,this.node.setAttribute("x",t),this},setY:function(t){return this.y=t,this.node.setAttribute("y",t),this},setWidth:function(t){return this.width=t,this.node.setAttribute("width",t),this},setHeight:function(t){return this.height=t,this.node.setAttribute("height",t),this},getWidth:function(){return this.width},getHeight:function(){return this.height}})})),r("graphic/pen",["graphic/color","core/utils","graphic/standardcolor","core/class"],(function(t,e,r){var i=t("graphic/color");return t("core/class").createClass("Pen",{constructor:function(t,e){this.brush=t,this.width=e||1,this.linecap=null,this.linejoin=null,this.dashArray=null,this.opacity=1},getBrush:function(){return this.brush},setBrush:function(t){return this.brush=t,this},setColor:function(t){return this.setBrush(t)},getColor:function(){return this.brush instanceof i?this.brush:null},getWidth:function(){return this.width},setWidth:function(t){return this.width=t,this},getOpacity:function(){return this.opacity},setOpacity:function(t){this.opacity=t},getLineCap:function(){return this.linecap},setLineCap:function(t){return this.linecap=t,this},getLineJoin:function(){return this.linejoin},setLineJoin:function(t){return this.linejoin=t,this},getDashArray:function(){return this.dashArray},setDashArray:function(t){return this.dashArray=t,this},stroke:function(t){var e=t.node;e.setAttribute("stroke",this.brush.toString()),e.setAttribute("stroke-width",this.getWidth()),this.getOpacity()<1&&e.setAttribute("stroke-opacity",this.getOpacity()),this.getLineCap()&&e.setAttribute("stroke-linecap",this.getLineCap()),this.getLineJoin()&&e.setAttribute("stroke-linejoin",this.getLineJoin()),this.getDashArray()&&e.setAttribute("stroke-dasharray",this.getDashArray())}})})),r("graphic/pie",["core/class","graphic/sweep","graphic/point","graphic/path"],(function(t,e,r){return t("core/class").createClass({base:t("graphic/sweep"),constructor:function(t,e,r){this.callBase([0,t],e,r)},getRadius:function(){return this.getSectionArray()[1]},setRadius:function(t){this.setSectionArray([0,t])}})})),r("graphic/point",["core/class"],(function(t,e,r){var i=t("core/class").createClass("Point",{constructor:function(t,e){this.x=t||0,this.y=e||0},offset:function(t,e){return 1==arguments.length&&(e=t.y,t=t.x),new i(this.x+t,this.y+e)},valueOf:function(){return[this.x,this.y]},toString:function(){return this.valueOf().join(" ")},spof:function(){return new i(.5+(0|this.x),.5+(0|this.y))}});return i.fromPolar=function(t,e,r){return"rad"!=r&&(e=e/180*Math.PI),new i(t*Math.cos(e),t*Math.sin(e))},i.parse=function(t){return t instanceof i?t:"string"==typeof t?i.parse(t.split(/\s*[\s,]\s*/)):"0"in t&&"1"in t?new i(t[0],t[1]):void 0},i})),r("graphic/pointcontainer",["core/class","graphic/container"],(function(t,e,r){return t("core/class").createClass("PointContainer",{base:t("graphic/container"),constructor:function(){this.callBase()},addPoint:function(t,e){return this.addItem.apply(this,arguments)},prependPoint:function(){return this.prependItem.apply(this,arguments)},appendPoint:function(){return this.appendItem.apply(this,arguments)},removePoint:function(t){return this.removeItem.apply(this,arguments)},addPoints:function(){return this.addItems.apply(this,arguments)},setPoints:function(){return this.setItems.apply(this,arguments)},getPoint:function(){return this.getItem.apply(this,arguments)},getPoints:function(){return this.getItems.apply(this,arguments)},getFirstPoint:function(){return this.getFirstItem.apply(this,arguments)},getLastPoint:function(){return this.getLastItem.apply(this,arguments)}})})),r("graphic/poly",["core/utils","core/class","graphic/path","graphic/shape","graphic/svg","graphic/geometry","graphic/pointcontainer","graphic/container"],(function(t,e,r){return t("core/utils"),t("core/class").createClass("Poly",{base:t("graphic/path"),mixins:[t("graphic/pointcontainer")],constructor:function(t,e){this.callBase(),this.closeable=!!e,this.setPoints(t||[]),this.changeable=!0,this.update()},onContainerChanged:function(){this.changeable&&this.update()},update:function(){var t=this.getDrawer(),e=this.getPoints();if(t.clear(),!e.length)return this;t.moveTo(e[0]);for(var r,i=1,n=e.length;i<n;i++)r=e[i],t.lineTo(r);return this.closeable&&e.length>2&&t.close(),this}})})),r("graphic/polygon",["core/class","graphic/poly","core/utils","graphic/path","graphic/pointcontainer"],(function(t,e,r){return t("core/class").createClass("Polygon",{base:t("graphic/poly"),constructor:function(t){this.callBase(t,!0)}})})),r("graphic/polyline",["core/class","graphic/poly","core/utils","graphic/path","graphic/pointcontainer"],(function(t,e,r){return t("core/class").createClass("Polyline",{base:t("graphic/poly"),constructor:function(t){this.callBase(t)}})})),r("graphic/radialgradientbrush",["graphic/gradientbrush","graphic/svg","graphic/defbrush","graphic/color","core/class"],(function(t,e,r){var i=t("graphic/gradientbrush");return t("core/class").createClass("RadialGradientBrush",{base:i,constructor:function(t){this.callBase("radialGradient"),this.setCenter(.5,.5),this.setFocal(.5,.5),this.setRadius(.5),"function"==typeof t&&t.call(this,this)},setCenter:function(t,e){return this.node.setAttribute("cx",t),this.node.setAttribute("cy",e),this},getCenter:function(){return{x:+this.node.getAttribute("cx"),y:+this.node.getAttribute("cy")}},setFocal:function(t,e){return this.node.setAttribute("fx",t),this.node.setAttribute("fy",e),this},getFocal:function(){return{x:+this.node.getAttribute("fx"),y:+this.node.getAttribute("fy")}},setRadius:function(t){return this.node.setAttribute("r",t),this},getRadius:function(){return+this.node.getAttribute("r")}})})),r("graphic/rect",["core/utils","graphic/point","core/class","graphic/path","graphic/shape","graphic/svg","graphic/geometry"],(function(t,e,r){var i={},n=t("core/utils"),a=t("graphic/point");return n.extend(i,{formatRadius:function(t,e,r){var i=Math.floor(Math.min(t/2,e/2));return Math.min(i,r)}}),t("core/class").createClass("Rect",{base:t("graphic/path"),constructor:function(t,e,r,n,a){this.callBase(),this.x=r||0,this.y=n||0,this.width=t||0,this.height=e||0,this.radius=i.formatRadius(this.width,this.height,a||0),this.update()},update:function(){var t=this.x,e=this.y,r=this.width,i=this.height,n=this.radius,a=this.getDrawer().redraw();return n?(r-=2*n,i-=2*n,a.push("M",t+n,e),a.push("h",r),a.push("a",n,n,0,0,1,n,n),a.push("v",i),a.push("a",n,n,0,0,1,-n,n),a.push("h",-r),a.push("a",n,n,0,0,1,-n,-n),a.push("v",-i),a.push("a",n,n,0,0,1,n,-n),a.push("z")):(a.push("M",t,e),a.push("h",r),a.push("v",i),a.push("h",-r),a.push("z")),a.done(),this},setWidth:function(t){return this.width=t,this.update()},setHeight:function(t){return this.height=t,this.update()},setSize:function(t,e){return this.width=t,this.height=e,this.update()},getRadius:function(){return this.radius},setRadius:function(t){return this.radius=t,this.update()},getPosition:function(){return new a(this.x,this.y)},setPosition:function(t,e){if(1==arguments.length){var r=a.parse(arguments[0]);e=r.y,t=r.x}return this.x=t,this.y=e,this.update()},getWidth:function(){return this.width},getHeight:function(){return this.height},getPositionX:function(){return this.x},getPositionY:function(){return this.y},setPositionX:function(t){return this.x=t,this.update()},setPositionY:function(t){return this.y=t,this.update()}})})),r("graphic/regularpolygon",["graphic/point","core/class","graphic/path","core/utils","graphic/shape","graphic/svg","graphic/geometry"],(function(t,e,r){var i=t("graphic/point");return t("core/class").createClass("RegularPolygon",{base:t("graphic/path"),constructor:function(t,e,r,n){this.callBase(),this.radius=e||0,this.side=Math.max(t||3,3),arguments.length>2&&3==arguments.length&&(n=r.y,r=r.x),this.center=new i(r,n),this.draw()},getSide:function(){return this.side},setSide:function(t){return this.side=t,this.draw()},getRadius:function(){return this.radius},setRadius:function(t){return this.radius=t,this.draw()},draw:function(){var t,e=this.radius,r=this.side,n=2*Math.PI/r,a=this.getDrawer();for(a.clear(),a.moveTo(i.fromPolar(e,Math.PI/2,"rad").offset(this.center)),t=0;t<=r;t++)a.lineTo(i.fromPolar(e,n*t+Math.PI/2,"rad").offset(this.center));return a.close(),this}})})),r("graphic/resource",["graphic/svg","core/class"],(function(t,e,r){var i=t("graphic/svg");return t("core/class").createClass("Resource",{constructor:function(t){this.callBase(),this.node=i.createNode(t)},toString:function(){return"url(#"+this.node.id+")"}})})),r("graphic/ring",["core/class","graphic/sweep","graphic/point","graphic/path"],(function(t,e,r){return t("core/class").createClass({base:t("graphic/sweep"),constructor:function(t,e){this.callBase([t,e],360,0)},getInnerRadius:function(){return this.getSectionArray()[0]},getOuterRadius:function(){return this.getSectionArray()[1]},setInnerRadius:function(t){this.setSectionArray([t,this.getOuterRadius()])},setOuterRadius:function(t){this.setSectionArray([this.getInnerRadius(),t])}})})),r("graphic/shape",["graphic/svg","core/utils","graphic/eventhandler","graphic/shapeevent","core/class","graphic/styled","graphic/data","graphic/matrix","graphic/box","graphic/point","graphic/pen","graphic/color"],(function(t,e,r){var i=t("graphic/svg"),n=t("core/utils"),a=t("graphic/eventhandler"),o=t("graphic/styled"),s=t("graphic/data"),c=t("graphic/matrix"),u=(t("graphic/pen"),Array.prototype.slice),l=t("graphic/box"),h=t("core/class").createClass("Shape",{mixins:[a,o,s],constructor:function(t){this.node=i.createNode(t),this.node.shape=this,this.transform={translate:null,rotate:null,scale:null,matrix:null},this.callMixin()},getId:function(){return this.node.id},setId:function(t){return this.node.id=t,this},getNode:function(){return this.node},getBoundaryBox:function(){var t;try{t=this.node.getBBox()}catch(e){t={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}return new l(t)},getRenderBox:function(t){var e=this.getBoundaryBox();return this.getTransform(t).transformBox(e)},getWidth:function(){return this.getRenderBox().width},getHeight:function(){return this.getRenderBox().height},getSize:function(){var t=this.getRenderBox();return delete t.x,delete t.y,t},setOpacity:function(t){return this.node.setAttribute("opacity",t),this},getOpacity:function(){var t=this.node.getAttribute("opacity");return t?+t:1},setVisible:function(t){return t?this.node.removeAttribute("display"):this.node.setAttribute("display","none"),this},getVisible:function(){this.node.getAttribute("display")},hasAncestor:function(t){for(var e=this.container;e;){if(e===t)return!0;e=e.container}return!1},getTransform:function(t){return c.getCTM(this,t)},clearTransform:function(){return this.node.removeAttribute("transform"),this.transform={translate:null,rotate:null,scale:null,matrix:null},this.trigger("shapeupdate",{type:"transform"}),this},_applyTransform:function(){var t=this.transform,e=[];return t.translate&&e.push(["translate(",t.translate,")"]),t.rotate&&e.push(["rotate(",t.rotate,")"]),t.scale&&e.push(["scale(",t.scale,")"]),t.matrix&&e.push(["matrix(",t.matrix,")"]),this.node.setAttribute("transform",n.flatten(e).join(" ")),this},setMatrix:function(t){return this.transform.matrix=t,this._applyTransform()},setTranslate:function(t){return this.transform.translate=null!==t&&u.call(arguments)||null,this._applyTransform()},setRotate:function(t){return this.transform.rotate=null!==t&&u.call(arguments)||null,this._applyTransform()},setScale:function(t){return this.transform.scale=null!==t&&u.call(arguments)||null,this._applyTransform()},translate:function(t,e){var r=this.transform.matrix||new c;return void 0===e&&(e=0),this.transform.matrix=r.translate(t,e),this._applyTransform()},rotate:function(t){var e=this.transform.matrix||new c;return this.transform.matrix=e.rotate(t),this._applyTransform()},scale:function(t,e){var r=this.transform.matrix||new c;return void 0===e&&(e=t),this.transform.matrix=r.scale(t,e),this._applyTransform()},skew:function(t,e){var r=this.transform.matrix||new c;return void 0===e&&(e=t),this.transform.matrix=r.skew(t,e),this._applyTransform()},stroke:function(t,e){return t&&t.stroke?t.stroke(this):(this.node.setAttribute("stroke",t.toString()),e&&this.node.setAttribute("stroke-width",e)),this},fill:function(t){return this.node.setAttribute("fill",t.toString()),this},setAttr:function(t,e){var r=this;n.isObject(t)&&n.each(t,(function(t,e){r.setAttr(e,t)})),null==e||""===e?this.node.removeAttribute(t):this.node.setAttribute(t,e)},getAttr:function(t){return this.node.getAttribute(t)}});return h})),r("graphic/shapecontainer",["graphic/container","core/class","core/utils","graphic/shape","graphic/svg","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t,e,r){var i=t("graphic/container"),n=t("core/utils"),a=t("core/class").createClass("ShapeContainer",{base:i,isShapeContainer:!0,handleAdd:function(t,e){var r=this.getShapeNode();r.insertBefore(t.node,r.childNodes[e]||null),t.trigger("add",{container:this}),t.notifyTreeModification&&t.notifyTreeModification("treeadd",this)},handleRemove:function(t,e){this.getShapeNode().removeChild(t.node),t.trigger("remove",{container:this}),t.notifyTreeModification&&t.notifyTreeModification("treeremove",this)},notifyTreeModification:function(t,e){this.eachItem((function(r,i){i.notifyTreeModification&&i.notifyTreeModification(t,e),i.trigger(t,{container:e})}))},getShape:function(t){return this.getItem(t)},addShape:function(t,e){return this.addItem(t,e)},appendShape:function(t){return this.addShape(t)},prependShape:function(t){return this.addShape(t,0)},replaceShape:function(t,e){var r=this.indexOf(e);if(-1!==r)return this.removeShape(r),this.addShape(t,r),this},addShapeBefore:function(t,e){var r=this.indexOf(e);return this.addShape(t,r)},addShapeAfter:function(t,e){var r=this.indexOf(e);return this.addShape(t,-1===r?void 0:r+1)},addShapes:function(t){return this.addItems(t)},removeShape:function(t){return this.removeItem(t)},getShapes:function(){return this.getItems()},getShapesByType:function(t){var e=[];return function r(i){t.toLowerCase()==i.getType().toLowerCase()&&e.push(i),i.isShapeContainer&&n.each(i.getShapes(),(function(t){r(t)}))}(this),e},getShapeById:function(t){return this.getShapeNode().getElementById(t).shape},arrangeShape:function(t,e){return this.removeShape(t).addShape(t,e)},getShapeNode:function(){return this.shapeNode||this.node}}),o=t("graphic/shape");return t("core/class").extendClass(o,{bringTo:function(t){return this.container.arrangeShape(this,t),this},bringFront:function(){return this.bringTo(this.container.indexOf(this)+1)},bringBack:function(){return this.bringTo(this.container.indexOf(this)-1)},bringTop:function(){return this.container.removeShape(this).addShape(this),this},bringRear:function(){return this.bringTo(0)},bringRefer:function(t,e){return t.container&&(this.remove&&this.remove(),t.container.addShape(this,t.container.indexOf(t)+(e||0))),this},bringAbove:function(t){return this.bringRefer(t)},bringBelow:function(t){return this.bringRefer(t,1)},replaceBy:function(t){return this.container&&(t.bringAbove(this),this.remove()),this}}),a})),r("graphic/shapeevent",["graphic/matrix","core/utils","graphic/box","graphic/point","core/class"],(function(t,e,r){var i=t("graphic/matrix"),n=t("core/utils");return t("graphic/point"),t("core/class").createClass("ShapeEvent",{constructor:function(t){var e=null;n.isObject(t.target)?n.extend(this,t):(this.type=t.type,(e=t.target).correspondingUseElement&&(e=e.correspondingUseElement),this.originEvent=t,this.targetShape=e.shape||e.paper||t.currentTarget&&(t.currentTarget.shape||t.currentTarget.paper),t._kityParam&&n.extend(this,t._kityParam))},preventDefault:function(){var t=this.originEvent;return!t||(t.preventDefault?(t.preventDefault(),t.cancelable):(t.returnValue=!1,!0))},getPosition:function(t,e){if(!this.originEvent)return null;var r=this.originEvent.touches?this.originEvent.touches[e||0]:this.originEvent,n=r&&r.clientX||0,a=r&&r.clientY||0,o=this.targetShape.shapeNode||this.targetShape.node,s=i.transformPoint(n,a,o.getScreenCTM().inverse());return i.getCTM(this.targetShape,t||"view").transformPoint(s)},stopPropagation:function(){var t=this.originEvent;if(!t)return!0;t.stopPropagation?t.stopPropagation():t.cancelBubble=!1}})})),r("graphic/shapepoint",["core/class","graphic/point"],(function(t,e,r){return t("core/class").createClass("ShapePoint",{base:t("graphic/point"),constructor:function(t,e){this.callBase(t,e)},setX:function(t){return this.setPoint(t,this.y)},setY:function(t){return this.setPoint(this.x,t)},setPoint:function(t,e){return this.x=t,this.y=e,this.update(),this},getPoint:function(){return this},update:function(){return this.container&&this.container.update&&this.container.update(),this}})})),r("graphic/standardcolor",[],{COLOR_STANDARD:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00"},EXTEND_STANDARD:{}}),r("graphic/star",["graphic/point","core/class","graphic/path","core/utils","graphic/shape","graphic/svg","graphic/geometry"],(function(t,e,r){var i={3:.2,5:.38196601125,6:.57735026919,8:.541196100146,10:.726542528005,12:.707106781187},n=t("graphic/point");return t("core/class").createClass("Star",{base:t("graphic/path"),constructor:function(t,e,r,i,a){this.callBase(),this.vertex=t||3,this.radius=e||0,this.shrink=r,this.offset=i||new n(0,0),this.angleOffset=a||0,this.draw()},getVertex:function(){return this.vertex},setVertex:function(t){return this.vertex=t,this.draw()},getRadius:function(){return this.radius},setRadius:function(t){return this.radius=t,this.draw()},getShrink:function(){return this.shrink},setShrink:function(t){return this.shrink=t,this.draw()},getOffset:function(){return this.offset},setOffset:function(t){return this.offset=t,this.draw()},getAngleOffset:function(){return this.angleOffset},setAngleOffset:function(t){return this.angleOffset=t,this.draw()},draw:function(){var t,e,r=this.radius,a=this.radius*(this.shrink||i[this.vertex]||.5),o=this.vertex,s=this.offset,c=180/o,u=this.angleOffset,l=this.getDrawer();for(l.clear(),l.moveTo(n.fromPolar(a,90)),t=1;t<=2*o;t++)e=90+c*t,t%2?l.lineTo(n.fromPolar(r,e+u).offset(s)):l.lineTo(n.fromPolar(a,e));l.close()}})})),r("graphic/styled",["core/class"],(function(t,e,r){var i=t("core/class").createClass("ClassList",{constructor:function(t){this._node=t,this._list=t.className.toString().split(" ")},_update:function(){this._node.className=this._list.join(" ")},add:function(t){this._list.push(t),this._update()},remove:function(t){var e=this._list.indexOf(t);~e&&this._list.splice(e,1),this._update()},contains:function(t){return!!~this._list.indexOf(t)}});function n(t){return t.classList||(t.classList=new i(t)),t.classList}return t("core/class").createClass("Styled",{addClass:function(t){return n(this.node).add(t),this},removeClass:function(t){return n(this.node).remove(t),this},hasClass:function(t){return n(this.node).contains(t)},setStyle:function(t){if(2==arguments.length)return this.node.style[arguments[0]]=arguments[1],this;for(var e in t)t.hasOwnProperty(e)&&(this.node.style[e]=t[e]);return this}})})),r("graphic/svg",[],(function(t,e,r){var i=document,n=0,a={createNode:function(t){var e=i.createElementNS(a.ns,t);return e.id="kity_"+t+"_"+n++,e},defaults:{stroke:"none",fill:"none"},xlink:"http://www.w3.org/1999/xlink",ns:"http://www.w3.org/2000/svg"};return a})),r("graphic/sweep",["graphic/point","core/class","graphic/path","core/utils","graphic/shape","graphic/svg","graphic/geometry"],(function(t,e,r){var i=t("graphic/point");return t("core/class").createClass("Sweep",{base:t("graphic/path"),constructor:function(t,e,r){this.callBase(),this.sectionArray=t||[],this.angle=e||0,this.angleOffset=r||0,this.draw()},getSectionArray:function(){return this.sectionArray},setSectionArray:function(t){return this.sectionArray=t,this.draw()},getAngle:function(){return this.angle},setAngle:function(t){return this.angle=t,this.draw()},getAngleOffset:function(){return this.angleOffset},setAngleOffset:function(t){return this.angleOffset=t,this.draw()},draw:function(){var t,e=this.sectionArray;for(t=0;t<e.length;t+=2)this.drawSection(e[t],e[t+1]);return this},drawSection:function(t,e){var r=this.angle&&(this.angle%360?this.angle%360:360),n=this.angleOffset,a=n+r/2,o=n+r,s=this.getDrawer();s.redraw(),0!==r?(s.moveTo(i.fromPolar(t,n)),s.lineTo(i.fromPolar(e,n)),e&&(s.carcTo(e,0,1,i.fromPolar(e,a)),s.carcTo(e,0,1,i.fromPolar(e,o))),s.lineTo(i.fromPolar(t,o)),t&&(s.carcTo(t,0,1,i.fromPolar(t,a)),s.carcTo(t,0,1,i.fromPolar(t,n))),s.close(),s.done()):s.done()}})})),r("graphic/text",["graphic/textcontent","graphic/shape","core/class","graphic/shapecontainer","graphic/container","core/utils","graphic/svg"],(function(t,e,r){var i=t("graphic/textcontent"),n=t("graphic/shapecontainer"),a=t("graphic/svg"),o={};function s(t){var e=window.getComputedStyle(t.node),r=[e.fontFamily,e.fontSize,e.fontStretch,e.fontStyle,e.fontVariant,e.fontWeight].join("-");if(o[r])return o[r];var i=t.getContent();t.setContent("test");var n=t.getBoundaryBox(),a=t.getY()+ +t.node.getAttribute("dy")-n.y,s=a-n.height;return t.setContent(i),o[r]={top:a,bottom:s,middle:(a+s)/2}}return t("core/class").createClass("Text",{base:i,mixins:[n],constructor:function(t){this.callBase("text"),void 0!==t&&this.setContent(t)},setX:function(t){return this.node.setAttribute("x",t),this},setPosition:function(t,e){return this.setX(t).setY(e)},setY:function(t){return this.node.setAttribute("y",t),this},getX:function(){return+this.node.getAttribute("x")||0},getY:function(){return+this.node.getAttribute("y")||0},setFont:function(t){return this.callBase(t),this.setVerticalAlign(this.getVerticalAlign())},setTextAnchor:function(t){return this.node.setAttribute("text-anchor",t),this},getTextAnchor:function(){return this.node.getAttribute("text-anchor")||"start"},setVerticalAlign:function(t){return this.whenPaperReady((function(){var e;switch(t){case"top":e=s(this).top;break;case"bottom":e=s(this).bottom;break;case"middle":e=s(this).middle;break;default:e=0}this.node.setAttribute("dy",e)})),this.verticalAlign=t,this},getVerticalAlign:function(){return this.verticalAlign||"baseline"},setStartOffset:function(t){this.shapeNode!=this.node&&this.shapeNode.setAttribute("startOffset",100*t+"%")},addSpan:function(t){return this.addShape(t),this},setPath:function(t){var e=this.shapeNode;if(this.shapeNode==this.node){for(e=this.shapeNode=a.createNode("textPath");this.node.firstChild;)this.shapeNode.appendChild(this.node.firstChild);this.node.appendChild(e)}return e.setAttributeNS(a.xlink,"xlink:href","#"+t.node.id),this.setTextAnchor(this.getTextAnchor()),this}})})),r("graphic/textcontent",["graphic/shape","graphic/svg","core/utils","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box","core/class"],(function(t,e,r){var i=t("graphic/shape");return t("core/class").createClass("TextContent",{base:i,constructor:function(t){this.callBase(t),this.shapeNode=this.shapeNode||this.node},clearContent:function(){for(;this.shapeNode.firstChild;)this.shapeNode.removeChild(this.shapeNode.firstChild);return this},setContent:function(t){return this.shapeNode.textContent=t,this},getContent:function(){return this.shapeNode.textContent},appendContent:function(t){return this.shapeNode.textContent+=t,this},setSize:function(t){return this.setFontSize(t)},setFontSize:function(t){return this.setFont({size:t})},setFontFamily:function(t){return this.setFont({family:t})},setFontBold:function(t){return this.setFont({weight:t?"bold":"normal"})},setFontItalic:function(t){return this.setFont({style:t?"italic":"normal"})},setFont:function(t){var e=this.node;return["family","size","weight","style"].forEach((function(r){null===t[r]?e.removeAttribute("font-"+r):t[r]&&e.setAttribute("font-"+r,t[r])})),this},getExtentOfChar:function(t){return this.node.getExtentOfChar(t)},getRotationOfChar:function(t){return this.node.getRotationOfChar(t)},getCharNumAtPosition:function(t,e){return this.node.getCharNumAtPosition(this.node.viewportElement.createSVGPoint(t,e))}})})),r("graphic/textspan",["graphic/textcontent","graphic/shape","core/class","graphic/styled"],(function(t,e,r){var i=t("graphic/textcontent"),n=t("graphic/styled");return t("core/class").createClass("TextSpan",{base:i,mixins:[n],constructor:function(t){this.callBase("tspan"),this.setContent(t)}})})),r("graphic/use",["graphic/svg","core/class","graphic/shape","core/utils","graphic/eventhandler","graphic/styled","graphic/data","graphic/matrix","graphic/pen","graphic/box"],(function(t,e,r){var i=t("graphic/svg"),n=t("core/class"),a=n.createClass("Use",{base:t("graphic/shape"),constructor:function(t){var e;this.callBase("use"),(e=t.getId())&&this.node.setAttributeNS(i.xlink,"xlink:href","#"+e),"none"===t.node.getAttribute("fill")&&t.node.removeAttribute("fill"),"none"===t.node.getAttribute("stroke")&&t.node.removeAttribute("stroke")}}),o=t("graphic/shape");return n.extendClass(o,{use:function(){return new a(this)}}),a})),r("graphic/vector",["graphic/point","core/class","graphic/matrix","core/utils","graphic/box"],(function(t,e,r){var i=t("graphic/point"),n=t("graphic/matrix"),a=t("core/class").createClass("Vector",{base:i,constructor:function(t,e){this.callBase(t,e)},square:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.square())},add:function(t){return new a(this.x+t.x,this.y+t.y)},minus:function(t){return new a(this.x-t.x,this.y-t.y)},dot:function(t){return this.x*t.x+this.y*t.y},project:function(t){return t.multipy(this.dot(t)/t.square())},normalize:function(t){return void 0===t&&(t=1),this.multipy(t/this.length())},multipy:function(t){return new a(this.x*t,this.y*t)},rotate:function(t,e){"rad"==e&&(t=t/Math.PI*180);var r=(new n).rotate(t).transformPoint(this);return new a(r.x,r.y)},vertical:function(){return new a(this.y,-this.x)},reverse:function(){return this.multipy(-1)},getAngle:function(){var t=this.length();if(0===t)return 0;var e=Math.acos(this.x/t);return 180*(this.y>0?1:-1)*e/Math.PI}});return a.fromPoints=function(t,e){return new a(e.x-t.x,e.y-t.y)},t("core/class").extendClass(i,{asVector:function(){return new a(this.x,this.y)}}),a})),r("graphic/view",["graphic/shapecontainer","graphic/container","core/utils","core/class","graphic/shape","graphic/viewbox","graphic/view"],(function(t,e,r){var i=t("graphic/shapecontainer"),n=t("graphic/viewbox");return t("core/class").createClass("View",{mixins:[i,n],base:t("graphic/view"),constructor:function(){this.callBase("view")}})})),r("graphic/viewbox",["core/class"],(function(t,e,r){return t("core/class").createClass("ViewBox",{getViewBox:function(){var t=this.node.getAttribute("viewBox");return null===t?{x:0,y:0,width:this.node.clientWidth||this.node.parentNode.clientWidth,height:this.node.clientHeight||this.node.parentNode.clientHeight}:{x:+(t=t.split(" "))[0],y:+t[1],width:+t[2],height:+t[3]}},setViewBox:function(t,e,r,i){return this.node.setAttribute("viewBox",[t,e,r,i].join(" ")),this}})})),r("kity",["core/utils","core/class","core/browser","graphic/bezier","graphic/pointcontainer","graphic/path","graphic/bezierpoint","graphic/shapepoint","graphic/vector","graphic/circle","graphic/ellipse","graphic/clip","graphic/shape","graphic/shapecontainer","graphic/color","graphic/standardcolor","graphic/container","graphic/curve","graphic/point","graphic/gradientbrush","graphic/svg","graphic/defbrush","graphic/group","graphic/hyperlink","graphic/image","graphic/line","graphic/lineargradientbrush","graphic/mask","graphic/matrix","graphic/box","graphic/marker","graphic/resource","graphic/viewbox","graphic/palette","graphic/paper","graphic/eventhandler","graphic/styled","graphic/geometry","graphic/patternbrush","graphic/pen","graphic/polygon","graphic/poly","graphic/polyline","graphic/pie","graphic/sweep","graphic/radialgradientbrush","graphic/rect","graphic/regularpolygon","graphic/ring","graphic/data","graphic/star","graphic/text","graphic/textcontent","graphic/textspan","graphic/use","animate/animator","animate/timeline","animate/easing","animate/opacityanimator","animate/rotateanimator","animate/scaleanimator","animate/frame","animate/translateanimator","animate/pathanimator","animate/motionanimator","filter/filter","filter/effectcontainer","filter/gaussianblurfilter","filter/effect/gaussianblureffect","filter/projectionfilter","filter/effect/effect","filter/effect/colormatrixeffect","filter/effect/compositeeffect","filter/effect/offseteffect","filter/effect/convolvematrixeffect"],(function(t,e,r){var i={},n=t("core/utils");return i.version="2.0.0",n.extend(i,{createClass:t("core/class").createClass,extendClass:t("core/class").extendClass,Utils:n,Browser:t("core/browser"),Bezier:t("graphic/bezier"),BezierPoint:t("graphic/bezierpoint"),Circle:t("graphic/circle"),Clip:t("graphic/clip"),Color:t("graphic/color"),Container:t("graphic/container"),Curve:t("graphic/curve"),Ellipse:t("graphic/ellipse"),GradientBrush:t("graphic/gradientbrush"),Group:t("graphic/group"),HyperLink:t("graphic/hyperlink"),Image:t("graphic/image"),Line:t("graphic/line"),LinearGradientBrush:t("graphic/lineargradientbrush"),Mask:t("graphic/mask"),Matrix:t("graphic/matrix"),Marker:t("graphic/marker"),Palette:t("graphic/palette"),Paper:t("graphic/paper"),Path:t("graphic/path"),PatternBrush:t("graphic/patternbrush"),Pen:t("graphic/pen"),Point:t("graphic/point"),Polygon:t("graphic/polygon"),Polyline:t("graphic/polyline"),Pie:t("graphic/pie"),RadialGradientBrush:t("graphic/radialgradientbrush"),Rect:t("graphic/rect"),RegularPolygon:t("graphic/regularpolygon"),Ring:t("graphic/ring"),Shape:t("graphic/shape"),ShapePoint:t("graphic/shapepoint"),ShapeContainer:t("graphic/shapecontainer"),Sweep:t("graphic/sweep"),Star:t("graphic/star"),Text:t("graphic/text"),TextSpan:t("graphic/textspan"),Use:t("graphic/use"),Vector:t("graphic/vector"),g:t("graphic/geometry"),Animator:t("animate/animator"),Easing:t("animate/easing"),OpacityAnimator:t("animate/opacityanimator"),RotateAnimator:t("animate/rotateanimator"),ScaleAnimator:t("animate/scaleanimator"),Timeline:t("animate/timeline"),TranslateAnimator:t("animate/translateanimator"),PathAnimator:t("animate/pathanimator"),MotionAnimator:t("animate/motionanimator"),Filter:t("filter/filter"),GaussianblurFilter:t("filter/gaussianblurfilter"),ProjectionFilter:t("filter/projectionfilter"),ColorMatrixEffect:t("filter/effect/colormatrixeffect"),CompositeEffect:t("filter/effect/compositeeffect"),ConvolveMatrixEffect:t("filter/effect/convolvematrixeffect"),Effect:t("filter/effect/effect"),GaussianblurEffect:t("filter/effect/gaussianblureffect"),OffsetEffect:t("filter/effect/offseteffect")}),window.kity=i})),function(){try{inc.use("kity")}catch(t){i("kity")}}()}()},475:(t,e,r)=>{"use strict";r.d(e,{Z:()=>y});var i=r(537),n=r.n(i),a=r(645),o=r.n(a),s=r(667),c=r.n(s),u=new URL(r(207),r.b),l=new URL(r(133),r.b),h=new URL(r(45),r.b),f=new URL(r(561),r.b),p=o()(n()),d=c()(u),g=c()(l),m=c()(h),v=c()(f);p.push([t.id,"@font-face {\n font-family: \"KF AMS BB\";\n src: 'url(resource/KF_AMS_BB.woff)'\n}\n@font-face {\n font-family: \"KF AMS CAL\";\n src: 'url(resource/KF_AMS_CAL.woff)'\n}\n@font-face {\n font-family: \"KF AMS FRAK\";\n src: 'url(resource/KF_AMS_FRAK.woff)'\n}\n@font-face {\n font-family: \"KF AMS MAIN\";\n src: 'url(resource/KF_AMS_MAIN.woff)'\n}\n@font-face {\n font-family: \"KF AMS ROMAN\";\n src: 'url(resource/KF_AMS_ROMAN.woff)'\n}\n.kf-editor{width:100%;height:100%;border:1px solid #e0e0e0;overflow:hidden;z-index:2;background-color:#eee}.kf-loading{width:864px;height:580px;text-align:center;line-height:580px;position:fixed;top:0;left:0}.kf-editor-edit-area{position:relative;top:0;left:0;z-index:1;height:0;background-color:#fff}.kf-editor-canvas-container{width:100%;height:100%}.kf-editor-input-box{position:fixed;top:0;left:-99999999px;z-index:999999}/*!\n * 滚动条\n **/.kf-editor-edit-scrollbar{width:100%;height:8px;position:absolute;left:0;z-index:994}.kf-editor-ui-left-button{position:absolute;top:0;left:0;width:5px;height:100%;background:#fff}.kf-editor-ui-right-button{position:absolute;top:0;right:0;width:5px;height:100%;background:#fff}.kf-editor-ui-track{position:absolute;top:0;left:5px;width:0;height:100%}.kf-editor-ui-thumb{position:absolute;top:0;left:0;width:0;height:100%;background:rgba(0,0,0,.15);border-radius:6px}.kf-editor-ui-thumb-left{width:5px;height:100%;position:absolute;top:0;left:0;z-index:1}.kf-editor-ui-thumb-right{width:5px;height:100%;position:absolute;top:0;right:0}.kf-editor-ui-thumb-body{position:absolute;top:0;left:5px;width:0;height:100%}.android{width:1920px;height:835px;position:fixed;bottom:0;background-color:transparent;user-select:none}.android *{box-sizing:border-box;margin:0;padding:0;list-style:none}.android .kf-editor-edit-area{width:100%;height:auto;float:left;padding:40px;position:relative}.android .kf-editor-edit-area .kf-editor-edit-scrollbar{bottom:0}.android .kf-editor-edit-area .kf-editor-header-container{display:none}.android .kf-editor-edit-area .kf-editor-canvas-wrapper{width:1840px;height:140px;background:#f8f8f8;padding:0 40px;float:left;border-radius:54px}.android .kf-editor-edit-area .kf-editor-canvas-wrapper .kf-editor-canvas-container{width:100%;height:100%}.android .kf-editor-edit-keyboard{width:1920px;height:615px;float:left;background:#eceff1;overflow:hidden}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-menu{width:274px;height:615px;float:left;border-right:1px solid rgba(0,0,0,.1)}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list{width:100%;height:100%;padding:26px;background:#eceff1;overflow:hidden}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list .kf-editor-ui-keyboard-menu-list-item{width:183px;height:75px;margin:19px;text-align:center;line-height:75px;font-size:16px;color:#49494d;cursor:pointer;float:left;font-size:34px}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list .kf-editor-ui-keyboard-menu-list-item-active{background:#ffab30;border-radius:8px;color:#fff}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-panel{width:1425px;height:100%;float:left}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list{width:100%;height:100%;padding:14px 0 0 33px;overflow:hidden;position:relative;transition:top .3s linear}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list .kf-editor-ui-keyboard-panel-list-item{width:148px;height:122px;margin:12px;text-align:center;line-height:121px;font-size:16px;color:#49494d;cursor:pointer;float:left;position:relative}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list .kf-editor-ui-keyboard-panel-list-item:active::before{content:'';display:block;position:absolute;width:100%;height:100%;background-color:rgba(64,75,80,.15)}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page{width:212px;height:100%;float:left}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list{width:100%;height:100%;padding:14px 0 26px 0;overflow:hidden}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item{width:100%;height:122px;margin:12px;float:left;font-size:46px;color:#ff9800;text-align:center;line-height:122px;cursor:pointer}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-delete{width:100%;height:122px;background:url("+d+") center no-repeat;background-size:initial}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-delete:active{background-color:rgba(64,75,80,.15)}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev{position:relative}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev::before{content:' ';display:block;width:100%;height:100%;background:url("+g+") center no-repeat;background-size:initial}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev:not(.kf-editor-ui-keyboard-page-list-item-disabled):active{background-color:rgba(64,75,80,.15)}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next{position:relative}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next::before{content:' ';display:block;width:100%;height:100%;background:url("+m+") center no-repeat;background-size:initial}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next:not(.kf-editor-ui-keyboard-page-list-item-disabled):active{background-color:rgba(64,75,80,.15)}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-disabled::before{opacity:.5}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-footer{display:none}\n.pc{width:864px;height:580px;position:relative;top:0;left:0;display: flex;flex-direction: column;}\n.pc *{box-sizing:border-box;margin:0;padding:0;list-style:none}.pc .kf-editor-edit-area{width:100%;height:168px;float:left}.pc .kf-editor-edit-area .kf-editor-edit-scrollbar{bottom:0}.pc .kf-editor-edit-area .kf-editor-header-container{width:100%;height:48px;background:#eee;overflow:hidden;padding-left:16px}.pc .kf-editor-edit-area .kf-editor-header-container .kf-editor-header-container-title{font-size:16px;color:#616266;line-height:48px;float:left}.pc .kf-editor-edit-area .kf-editor-header-container .kf-editor-header-container-close{width:48px;height:48px;float:right;cursor:pointer;position:relative}.pc .kf-editor-edit-area .kf-editor-header-container .kf-editor-header-container-close::before{content:'';display:block;background:url(https://store-g1.seewo.com/easiclass-public/8747fc92a01246e19d7f9bc9f3868652) center no-repeat;background-size:100%;position:absolute;width:16px;height:16px;top:16px;right:16px}.pc .kf-editor-edit-area .kf-editor-header-container .kf-editor-header-container-close:hover::before{background:url(https://store-g1.seewo.com/easiclass-public/c2682d9dcc844986898be60b26ee5823)}.pc .kf-editor-edit-area .kf-editor-header-container .kf-editor-header-container-close:active::before{background:url(https://store-g1.seewo.com/easiclass-public/9550aaa080574f739425122e7908e012)}.pc .kf-editor-edit-area .kf-editor-canvas-wrapper{width:100%;height:calc(100% - 48px);background:#fff;float:left;padding:0 40px}.pc .kf-editor-edit-area .kf-editor-canvas-wrapper .kf-editor-canvas-container{width:100%;height:100%}.pc .kf-editor-edit-keyboard{width:100%;height:411px;border-top:1px solid #ddd;box-sizing:border-box;background-color:#fff}.pc .kf-editor-edit-keyboard *{list-style:none;padding:0;margin:0;box-sizing:border-box}.pc .kf-editor-ui-keyboard{width:100%;height:100%;overflow:hidden;background:#fff;border-top:1px solid #e4e4e4}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-menu{width:118px;height:347px;border-right:1px solid #e4e4e4;float:left}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list{width:100%;height:100%;padding:11px;background:#f4f4f4;overflow:hidden}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list .kf-editor-ui-keyboard-menu-list-item{width:72px;height:40px;margin:12px;text-align:center;line-height:40px;font-size:16px;color:#49494d;cursor:pointer;float:left}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list .kf-editor-ui-keyboard-menu-list-item-active{background:#198cff;border-radius:4px;color:#fff}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-panel{width:664px;height:347px;float:left;overflow:hidden}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list{width:100%;position:relative;top:0;transition:.3s top linear}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list .kf-editor-ui-keyboard-panel-list-item{width:83px;height:64px;cursor:pointer;float:left;border:solid #e4e4e4;border-width:1px 1px 1px 0;margin-top:-1px;position:relative}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list .kf-editor-ui-keyboard-panel-list-item:hover::before{content:'';display:block;position:absolute;width:100%;height:100%;background-color:rgba(73,73,77,.1)}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page{width:81px;height:347px;float:left;margin-left:-1px;border-left:1px solid #e4e4e4}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item{width:81px;height:128px;cursor:pointer}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-delete{width:81px;height:64px;background:url("+v+") center no-repeat;background-size:initial;border-bottom:1px solid #e4e4e4}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-delete:hover{background-color:rgba(73,73,77,.1)}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev{border-bottom:1px solid #e4e4e4;position:relative}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev::before{content:' ';display:block;width:100%;height:100%;background:url(https://store-g1.seewo.com/easiclass-public/4993661fa54249249b152a89cb1cec6b) center no-repeat;background-size:initial}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev:not(.kf-editor-ui-keyboard-page-list-item-disabled):hover{background-color:rgba(73,73,77,.1)}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next{position:relative}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next:not(.kf-editor-ui-keyboard-page-list-item-disabled):hover{background-color:rgba(73,73,77,.1)}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next::before{content:' ';display:block;width:100%;height:100%;background:url(https://store-g1.seewo.com/easiclass-public/f4df574b99d748f0823ccd36362d1a9c) center no-repeat;background-size:initial}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-disabled::before{opacity:.5}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-ok{display:none}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer{width:100%;height:64px;padding:14px 0;float:left;border-top:1px solid #e4e4e4}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-cancel{width:120px;height:36px;background:#fff;border:1px solid #ddd;border-radius:18px;font-size:16px;color:#616266;text-align:center;line-height:34px;float:left;margin-left:calc(50% - 128px);cursor:pointer;user-select:none}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-cancel:not(:disabled){cursor:pointer}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-cancel:not(:disabled):hover{background-color:#ebf5ff}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-cancel:not(:disabled):active{background-color:#dce8f5}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-submit{width:120px;height:36px;background:#198cff;border-radius:18px;font-size:16px;color:#fff;text-align:center;line-height:36px;float:left;margin-left:16px;cursor:pointer}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-submit:not(:disabled){cursor:pointer}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-submit:not(:disabled):hover{background-color:#39f}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-submit:not(:disabled):active{background-color:#1885f2}\n","",{version:3,sources:["webpack://./src/index.min.css"],names:[],mappings:"AAAA;IACI,wBAAwB;IACxB;AACJ;AACA;IACI,yBAAyB;IACzB;AACJ;AACA;IACI,0BAA0B;IAC1B;AACJ;AACA;IACI,0BAA0B;IAC1B;AACJ;AACA;IACI,2BAA2B;IAC3B;AACJ;AACA,WAAW,UAAU,CAAC,WAAW,CAAC,wBAAwB,CAAC,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAAC,YAAY,WAAW,CAAC,YAAY,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,qBAAqB,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,4BAA4B,UAAU,CAAC,WAAW,CAAC,qBAAqB,cAAc,CAAC,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC;;GAEva,CAAC,0BAA0B,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,0BAA0B,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,eAAe,CAAC,2BAA2B,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,eAAe,CAAC,oBAAoB,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,oBAAoB,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,0BAA0B,CAAC,iBAAiB,CAAC,yBAAyB,SAAS,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,0BAA0B,SAAS,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,yBAAyB,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,YAAY,CAAC,YAAY,CAAC,cAAc,CAAC,QAAQ,CAAC,4BAA4B,CAAC,gBAAgB,CAAC,WAAW,qBAAqB,CAAC,QAAQ,CAAC,SAAS,CAAC,eAAe,CAAC,8BAA8B,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAC,wDAAwD,QAAQ,CAAC,0DAA0D,YAAY,CAAC,wDAAwD,YAAY,CAAC,YAAY,CAAC,kBAAkB,CAAC,cAAc,CAAC,UAAU,CAAC,kBAAkB,CAAC,oFAAoF,UAAU,CAAC,WAAW,CAAC,kCAAkC,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,kBAAkB,CAAC,eAAe,CAAC,8DAA8D,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC,qCAAqC,CAAC,+FAA+F,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,eAAe,CAAC,qIAAqI,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,cAAc,CAAC,aAAa,CAAC,cAAc,CAAC,UAAU,CAAC,cAAc,CAAC,4IAA4I,kBAAkB,CAAC,iBAAiB,CAAC,UAAU,CAAC,+DAA+D,YAAY,CAAC,WAAW,CAAC,UAAU,CAAC,iGAAiG,UAAU,CAAC,WAAW,CAAC,qBAAqB,CAAC,eAAe,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,wIAAwI,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,cAAc,CAAC,aAAa,CAAC,cAAc,CAAC,UAAU,CAAC,iBAAiB,CAAC,uJAAuJ,UAAU,CAAC,aAAa,CAAC,iBAAiB,CAAC,UAAU,CAAC,WAAW,CAAC,mCAAmC,CAAC,8DAA8D,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,+FAA+F,UAAU,CAAC,WAAW,CAAC,qBAAqB,CAAC,eAAe,CAAC,qIAAqI,UAAU,CAAC,YAAY,CAAC,WAAW,CAAC,UAAU,CAAC,cAAc,CAAC,aAAa,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,cAAc,CAAC,4IAA4I,UAAU,CAAC,YAAY,CAAC,mEAA8E,CAAC,uBAAuB,CAAC,mJAAmJ,mCAAmC,CAAC,0IAA0I,iBAAiB,CAAC,kJAAkJ,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,mEAA8E,CAAC,uBAAuB,CAAC,qMAAqM,mCAAmC,CAAC,0IAA0I,iBAAiB,CAAC,kJAAkJ,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,mEAA8E,CAAC,uBAAuB,CAAC,qMAAqM,mCAAmC,CAAC,sJAAsJ,UAAU,CAAC,gEAAgE,YAAY;AACrhL,IAAI,WAAW,CAAC,YAAY,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,sBAAsB,CAAC;AACjG,MAAM,qBAAqB,CAAC,QAAQ,CAAC,SAAS,CAAC,eAAe,CAAC,yBAAyB,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,mDAAmD,QAAQ,CAAC,qDAAqD,UAAU,CAAC,WAAW,CAAC,eAAe,CAAC,eAAe,CAAC,iBAAiB,CAAC,uFAAuF,cAAc,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,CAAC,uFAAuF,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,iBAAiB,CAAC,+FAA+F,UAAU,CAAC,aAAa,CAAC,6GAA6G,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,qGAAqG,4FAA4F,CAAC,sGAAsG,4FAA4F,CAAC,mDAAmD,UAAU,CAAC,wBAAwB,CAAC,eAAe,CAAC,UAAU,CAAC,cAAc,CAAC,+EAA+E,UAAU,CAAC,WAAW,CAAC,6BAA6B,UAAU,CAAC,YAAY,CAAC,yBAAyB,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,+BAA+B,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,2BAA2B,UAAU,CAAC,WAAW,CAAC,eAAe,CAAC,eAAe,CAAC,4BAA4B,CAAC,uDAAuD,WAAW,CAAC,YAAY,CAAC,8BAA8B,CAAC,UAAU,CAAC,wFAAwF,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,eAAe,CAAC,8HAA8H,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,cAAc,CAAC,aAAa,CAAC,cAAc,CAAC,UAAU,CAAC,qIAAqI,kBAAkB,CAAC,iBAAiB,CAAC,UAAU,CAAC,wDAAwD,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC,eAAe,CAAC,0FAA0F,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,yBAAyB,CAAC,iIAAiI,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,oBAAoB,CAAC,0BAA0B,CAAC,eAAe,CAAC,iBAAiB,CAAC,+IAA+I,UAAU,CAAC,aAAa,CAAC,iBAAiB,CAAC,UAAU,CAAC,WAAW,CAAC,kCAAkC,CAAC,uDAAuD,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,gBAAgB,CAAC,6BAA6B,CAAC,8HAA8H,UAAU,CAAC,YAAY,CAAC,cAAc,CAAC,qIAAqI,UAAU,CAAC,WAAW,CAAC,mEAA8E,CAAC,uBAAuB,CAAC,+BAA+B,CAAC,2IAA2I,kCAAkC,CAAC,mIAAmI,+BAA+B,CAAC,iBAAiB,CAAC,2IAA2I,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,6GAA6G,CAAC,uBAAuB,CAAC,6LAA6L,kCAAkC,CAAC,mIAAmI,iBAAiB,CAAC,6LAA6L,kCAAkC,CAAC,2IAA2I,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,6GAA6G,CAAC,uBAAuB,CAAC,+IAA+I,UAAU,CAAC,iIAAiI,YAAY,CAAC,yDAAyD,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,4BAA4B,CAAC,qGAAqG,WAAW,CAAC,WAAW,CAAC,eAAe,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,cAAc,CAAC,aAAa,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,UAAU,CAAC,6BAA6B,CAAC,cAAc,CAAC,gBAAgB,CAAC,oHAAoH,cAAc,CAAC,0HAA0H,wBAAwB,CAAC,2HAA2H,wBAAwB,CAAC,qGAAqG,WAAW,CAAC,WAAW,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,cAAc,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,UAAU,CAAC,gBAAgB,CAAC,cAAc,CAAC,oHAAoH,cAAc,CAAC,0HAA0H,qBAAqB,CAAC,2HAA2H,wBAAwB",sourcesContent:["@font-face {\n font-family: \"KF AMS BB\";\n src: 'url(resource/KF_AMS_BB.woff)'\n}\n@font-face {\n font-family: \"KF AMS CAL\";\n src: 'url(resource/KF_AMS_CAL.woff)'\n}\n@font-face {\n font-family: \"KF AMS FRAK\";\n src: 'url(resource/KF_AMS_FRAK.woff)'\n}\n@font-face {\n font-family: \"KF AMS MAIN\";\n src: 'url(resource/KF_AMS_MAIN.woff)'\n}\n@font-face {\n font-family: \"KF AMS ROMAN\";\n src: 'url(resource/KF_AMS_ROMAN.woff)'\n}\n.kf-editor{width:100%;height:100%;border:1px solid #e0e0e0;overflow:hidden;z-index:2;background-color:#eee}.kf-loading{width:864px;height:580px;text-align:center;line-height:580px;position:fixed;top:0;left:0}.kf-editor-edit-area{position:relative;top:0;left:0;z-index:1;height:0;background-color:#fff}.kf-editor-canvas-container{width:100%;height:100%}.kf-editor-input-box{position:fixed;top:0;left:-99999999px;z-index:999999}/*!\n * 滚动条\n **/.kf-editor-edit-scrollbar{width:100%;height:8px;position:absolute;left:0;z-index:994}.kf-editor-ui-left-button{position:absolute;top:0;left:0;width:5px;height:100%;background:#fff}.kf-editor-ui-right-button{position:absolute;top:0;right:0;width:5px;height:100%;background:#fff}.kf-editor-ui-track{position:absolute;top:0;left:5px;width:0;height:100%}.kf-editor-ui-thumb{position:absolute;top:0;left:0;width:0;height:100%;background:rgba(0,0,0,.15);border-radius:6px}.kf-editor-ui-thumb-left{width:5px;height:100%;position:absolute;top:0;left:0;z-index:1}.kf-editor-ui-thumb-right{width:5px;height:100%;position:absolute;top:0;right:0}.kf-editor-ui-thumb-body{position:absolute;top:0;left:5px;width:0;height:100%}.android{width:1920px;height:835px;position:fixed;bottom:0;background-color:transparent;user-select:none}.android *{box-sizing:border-box;margin:0;padding:0;list-style:none}.android .kf-editor-edit-area{width:100%;height:auto;float:left;padding:40px;position:relative}.android .kf-editor-edit-area .kf-editor-edit-scrollbar{bottom:0}.android .kf-editor-edit-area .kf-editor-header-container{display:none}.android .kf-editor-edit-area .kf-editor-canvas-wrapper{width:1840px;height:140px;background:#f8f8f8;padding:0 40px;float:left;border-radius:54px}.android .kf-editor-edit-area .kf-editor-canvas-wrapper .kf-editor-canvas-container{width:100%;height:100%}.android .kf-editor-edit-keyboard{width:1920px;height:615px;float:left;background:#eceff1;overflow:hidden}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-menu{width:274px;height:615px;float:left;border-right:1px solid rgba(0,0,0,.1)}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list{width:100%;height:100%;padding:26px;background:#eceff1;overflow:hidden}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list .kf-editor-ui-keyboard-menu-list-item{width:183px;height:75px;margin:19px;text-align:center;line-height:75px;font-size:16px;color:#49494d;cursor:pointer;float:left;font-size:34px}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list .kf-editor-ui-keyboard-menu-list-item-active{background:#ffab30;border-radius:8px;color:#fff}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-panel{width:1425px;height:100%;float:left}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list{width:100%;height:100%;padding:14px 0 0 33px;overflow:hidden;position:relative;transition:top .3s linear}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list .kf-editor-ui-keyboard-panel-list-item{width:148px;height:122px;margin:12px;text-align:center;line-height:121px;font-size:16px;color:#49494d;cursor:pointer;float:left;position:relative}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list .kf-editor-ui-keyboard-panel-list-item:active::before{content:'';display:block;position:absolute;width:100%;height:100%;background-color:rgba(64,75,80,.15)}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page{width:212px;height:100%;float:left}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list{width:100%;height:100%;padding:14px 0 26px 0;overflow:hidden}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item{width:100%;height:122px;margin:12px;float:left;font-size:46px;color:#ff9800;text-align:center;line-height:122px;cursor:pointer}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-delete{width:100%;height:122px;background:url(resource/a7ea5932b621487aaa1c8b9dd4e58cb0.svg) center no-repeat;background-size:initial}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-delete:active{background-color:rgba(64,75,80,.15)}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev{position:relative}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev::before{content:' ';display:block;width:100%;height:100%;background:url(resource/27257523137e47499311266d0f872c8b.svg) center no-repeat;background-size:initial}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev:not(.kf-editor-ui-keyboard-page-list-item-disabled):active{background-color:rgba(64,75,80,.15)}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next{position:relative}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next::before{content:' ';display:block;width:100%;height:100%;background:url(resource/3c2faacfac52472ea6cb522a34aa04db.svg) center no-repeat;background-size:initial}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next:not(.kf-editor-ui-keyboard-page-list-item-disabled):active{background-color:rgba(64,75,80,.15)}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-disabled::before{opacity:.5}.android .kf-editor-edit-keyboard .kf-editor-ui-keyboard-footer{display:none}\n.pc{width:864px;height:580px;position:relative;top:0;left:0;display: flex;flex-direction: column;}\n.pc *{box-sizing:border-box;margin:0;padding:0;list-style:none}.pc .kf-editor-edit-area{width:100%;height:168px;float:left}.pc .kf-editor-edit-area .kf-editor-edit-scrollbar{bottom:0}.pc .kf-editor-edit-area .kf-editor-header-container{width:100%;height:48px;background:#eee;overflow:hidden;padding-left:16px}.pc .kf-editor-edit-area .kf-editor-header-container .kf-editor-header-container-title{font-size:16px;color:#616266;line-height:48px;float:left}.pc .kf-editor-edit-area .kf-editor-header-container .kf-editor-header-container-close{width:48px;height:48px;float:right;cursor:pointer;position:relative}.pc .kf-editor-edit-area .kf-editor-header-container .kf-editor-header-container-close::before{content:'';display:block;background:url(https://store-g1.seewo.com/easiclass-public/8747fc92a01246e19d7f9bc9f3868652) center no-repeat;background-size:100%;position:absolute;width:16px;height:16px;top:16px;right:16px}.pc .kf-editor-edit-area .kf-editor-header-container .kf-editor-header-container-close:hover::before{background:url(https://store-g1.seewo.com/easiclass-public/c2682d9dcc844986898be60b26ee5823)}.pc .kf-editor-edit-area .kf-editor-header-container .kf-editor-header-container-close:active::before{background:url(https://store-g1.seewo.com/easiclass-public/9550aaa080574f739425122e7908e012)}.pc .kf-editor-edit-area .kf-editor-canvas-wrapper{width:100%;height:calc(100% - 48px);background:#fff;float:left;padding:0 40px}.pc .kf-editor-edit-area .kf-editor-canvas-wrapper .kf-editor-canvas-container{width:100%;height:100%}.pc .kf-editor-edit-keyboard{width:100%;height:411px;border-top:1px solid #ddd;box-sizing:border-box;background-color:#fff}.pc .kf-editor-edit-keyboard *{list-style:none;padding:0;margin:0;box-sizing:border-box}.pc .kf-editor-ui-keyboard{width:100%;height:100%;overflow:hidden;background:#fff;border-top:1px solid #e4e4e4}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-menu{width:118px;height:347px;border-right:1px solid #e4e4e4;float:left}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list{width:100%;height:100%;padding:11px;background:#f4f4f4;overflow:hidden}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list .kf-editor-ui-keyboard-menu-list-item{width:72px;height:40px;margin:12px;text-align:center;line-height:40px;font-size:16px;color:#49494d;cursor:pointer;float:left}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-menu .kf-editor-ui-keyboard-menu-list .kf-editor-ui-keyboard-menu-list-item-active{background:#198cff;border-radius:4px;color:#fff}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-panel{width:664px;height:347px;float:left;overflow:hidden}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list{width:100%;position:relative;top:0;transition:.3s top linear}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list .kf-editor-ui-keyboard-panel-list-item{width:83px;height:64px;cursor:pointer;float:left;border:solid #e4e4e4;border-width:1px 1px 1px 0;margin-top:-1px;position:relative}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-panel .kf-editor-ui-keyboard-panel-list .kf-editor-ui-keyboard-panel-list-item:hover::before{content:'';display:block;position:absolute;width:100%;height:100%;background-color:rgba(73,73,77,.1)}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page{width:81px;height:347px;float:left;margin-left:-1px;border-left:1px solid #e4e4e4}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item{width:81px;height:128px;cursor:pointer}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-delete{width:81px;height:64px;background:url(resource/78c93d3c1204445982c6b5700e1442eb.svg) center no-repeat;background-size:initial;border-bottom:1px solid #e4e4e4}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-delete:hover{background-color:rgba(73,73,77,.1)}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev{border-bottom:1px solid #e4e4e4;position:relative}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev::before{content:' ';display:block;width:100%;height:100%;background:url(https://store-g1.seewo.com/easiclass-public/4993661fa54249249b152a89cb1cec6b) center no-repeat;background-size:initial}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-prev:not(.kf-editor-ui-keyboard-page-list-item-disabled):hover{background-color:rgba(73,73,77,.1)}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next{position:relative}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next:not(.kf-editor-ui-keyboard-page-list-item-disabled):hover{background-color:rgba(73,73,77,.1)}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-next::before{content:' ';display:block;width:100%;height:100%;background:url(https://store-g1.seewo.com/easiclass-public/f4df574b99d748f0823ccd36362d1a9c) center no-repeat;background-size:initial}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-disabled::before{opacity:.5}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-page .kf-editor-ui-keyboard-page-list .kf-editor-ui-keyboard-page-list-item-ok{display:none}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer{width:100%;height:64px;padding:14px 0;float:left;border-top:1px solid #e4e4e4}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-cancel{width:120px;height:36px;background:#fff;border:1px solid #ddd;border-radius:18px;font-size:16px;color:#616266;text-align:center;line-height:34px;float:left;margin-left:calc(50% - 128px);cursor:pointer;user-select:none}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-cancel:not(:disabled){cursor:pointer}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-cancel:not(:disabled):hover{background-color:#ebf5ff}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-cancel:not(:disabled):active{background-color:#dce8f5}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-submit{width:120px;height:36px;background:#198cff;border-radius:18px;font-size:16px;color:#fff;text-align:center;line-height:36px;float:left;margin-left:16px;cursor:pointer}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-submit:not(:disabled){cursor:pointer}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-submit:not(:disabled):hover{background-color:#39f}.pc .kf-editor-ui-keyboard .kf-editor-ui-keyboard-footer #kf-editor-ui-keyboard-footer-button-submit:not(:disabled):active{background-color:#1885f2}\n"],sourceRoot:""}]);const y=p},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",i=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),i&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),i&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,i,n,a){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(i)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(o[c]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);i&&o[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),n&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=n):l[4]="".concat(n)),e.push(l))}},e}},667:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},537:t=>{"use strict";t.exports=function(t){var e=t[1],r=t[3];if(!r)return e;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),a="/*# ".concat(n," */"),o=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[e].concat(o).concat([a]).join("\n")}return[e].join("\n")}},486:function(t,e,r){var i;t=r.nmd(t),function(){var n,a="Expected a function",o="__lodash_hash_undefined__",s="__lodash_placeholder__",c=32,u=128,l=1/0,h=9007199254740991,f=NaN,p=4294967295,d=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",b="[object Error]",x="[object Function]",A="[object GeneratorFunction]",w="[object Map]",k="[object Number]",C="[object Object]",E="[object Promise]",S="[object RegExp]",_="[object Set]",B="[object String]",O="[object Symbol]",P="[object WeakMap]",T="[object ArrayBuffer]",M="[object DataView]",I="[object Float32Array]",R="[object Float64Array]",N="[object Int8Array]",q="[object Int16Array]",D="[object Int32Array]",U="[object Uint8Array]",L="[object Uint8ClampedArray]",V="[object Uint16Array]",z="[object Uint32Array]",F=/\b__p \+= '';/g,j=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,K=RegExp(G.source),X=RegExp(H.source),Y=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(et.source),it=/^\s+/,nt=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ot=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ut=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ft=/\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,At="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",wt="a-z\\xdf-\\xf6\\xf8-\\xff",kt="A-Z\\xc0-\\xd6\\xd8-\\xde",Ct="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Et="["+Ct+"]",St="["+At+"]",_t="\\d+",Bt="["+wt+"]",Ot="[^\\ud800-\\udfff"+Ct+_t+"\\u2700-\\u27bf"+wt+kt+"]",Pt="\\ud83c[\\udffb-\\udfff]",Tt="[^\\ud800-\\udfff]",Mt="(?:\\ud83c[\\udde6-\\uddff]){2}",It="[\\ud800-\\udbff][\\udc00-\\udfff]",Rt="["+kt+"]",Nt="(?:"+Bt+"|"+Ot+")",qt="(?:"+Rt+"|"+Ot+")",Dt="(?:['’](?:d|ll|m|re|s|t|ve))?",Ut="(?:['’](?:D|LL|M|RE|S|T|VE))?",Lt="(?:"+St+"|"+Pt+")?",Vt="[\\ufe0e\\ufe0f]?",zt=Vt+Lt+"(?:\\u200d(?:"+[Tt,Mt,It].join("|")+")"+Vt+Lt+")*",Ft="(?:"+["[\\u2700-\\u27bf]",Mt,It].join("|")+")"+zt,jt="(?:"+[Tt+St+"?",St,Mt,It,"[\\ud800-\\udfff]"].join("|")+")",Wt=RegExp("['’]","g"),Gt=RegExp(St,"g"),Ht=RegExp(Pt+"(?="+Pt+")|"+jt+zt,"g"),Kt=RegExp([Rt+"?"+Bt+"+"+Dt+"(?="+[Et,Rt,"$"].join("|")+")",qt+"+"+Ut+"(?="+[Et,Rt+Nt,"$"].join("|")+")",Rt+"?"+Nt+"+"+Dt,Rt+"+"+Ut,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_t,Ft].join("|"),"g"),Xt=RegExp("[\\u200d\\ud800-\\udfff"+At+"\\ufe0e\\ufe0f]"),Yt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$t=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zt=-1,Qt={};Qt[I]=Qt[R]=Qt[N]=Qt[q]=Qt[D]=Qt[U]=Qt[L]=Qt[V]=Qt[z]=!0,Qt[g]=Qt[m]=Qt[T]=Qt[v]=Qt[M]=Qt[y]=Qt[b]=Qt[x]=Qt[w]=Qt[k]=Qt[C]=Qt[S]=Qt[_]=Qt[B]=Qt[P]=!1;var Jt={};Jt[g]=Jt[m]=Jt[T]=Jt[M]=Jt[v]=Jt[y]=Jt[I]=Jt[R]=Jt[N]=Jt[q]=Jt[D]=Jt[w]=Jt[k]=Jt[C]=Jt[S]=Jt[_]=Jt[B]=Jt[O]=Jt[U]=Jt[L]=Jt[V]=Jt[z]=!0,Jt[b]=Jt[x]=Jt[P]=!1;var te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ee=parseFloat,re=parseInt,ie="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ne="object"==typeof self&&self&&self.Object===Object&&self,ae=ie||ne||Function("return this")(),oe=e&&!e.nodeType&&e,se=oe&&t&&!t.nodeType&&t,ce=se&&se.exports===oe,ue=ce&&ie.process,le=function(){try{return se&&se.require&&se.require("util").types||ue&&ue.binding&&ue.binding("util")}catch(t){}}(),he=le&&le.isArrayBuffer,fe=le&&le.isDate,pe=le&&le.isMap,de=le&&le.isRegExp,ge=le&&le.isSet,me=le&&le.isTypedArray;function ve(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function ye(t,e,r,i){for(var n=-1,a=null==t?0:t.length;++n<a;){var o=t[n];e(i,o,r(o),t)}return i}function be(t,e){for(var r=-1,i=null==t?0:t.length;++r<i&&!1!==e(t[r],r,t););return t}function xe(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function Ae(t,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(!e(t[r],r,t))return!1;return!0}function we(t,e){for(var r=-1,i=null==t?0:t.length,n=0,a=[];++r<i;){var o=t[r];e(o,r,t)&&(a[n++]=o)}return a}function ke(t,e){return!(null==t||!t.length)&&Ie(t,e,0)>-1}function Ce(t,e,r){for(var i=-1,n=null==t?0:t.length;++i<n;)if(r(e,t[i]))return!0;return!1}function Ee(t,e){for(var r=-1,i=null==t?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}function Se(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}function _e(t,e,r,i){var n=-1,a=null==t?0:t.length;for(i&&a&&(r=t[++n]);++n<a;)r=e(r,t[n],n,t);return r}function Be(t,e,r,i){var n=null==t?0:t.length;for(i&&n&&(r=t[--n]);n--;)r=e(r,t[n],n,t);return r}function Oe(t,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}var Pe=De("length");function Te(t,e,r){var i;return r(t,(function(t,r,n){if(e(t,r,n))return i=r,!1})),i}function Me(t,e,r,i){for(var n=t.length,a=r+(i?1:-1);i?a--:++a<n;)if(e(t[a],a,t))return a;return-1}function Ie(t,e,r){return e==e?function(t,e,r){for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}(t,e,r):Me(t,Ne,r)}function Re(t,e,r,i){for(var n=r-1,a=t.length;++n<a;)if(i(t[n],e))return n;return-1}function Ne(t){return t!=t}function qe(t,e){var r=null==t?0:t.length;return r?Ve(t,e)/r:f}function De(t){return function(e){return null==e?n:e[t]}}function Ue(t){return function(e){return null==t?n:t[e]}}function Le(t,e,r,i,n){return n(t,(function(t,n,a){r=i?(i=!1,t):e(r,t,n,a)})),r}function Ve(t,e){for(var r,i=-1,a=t.length;++i<a;){var o=e(t[i]);o!==n&&(r=r===n?o:r+o)}return r}function ze(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}function Fe(t){return t?t.slice(0,or(t)+1).replace(it,""):t}function je(t){return function(e){return t(e)}}function We(t,e){return Ee(e,(function(e){return t[e]}))}function Ge(t,e){return t.has(e)}function He(t,e){for(var r=-1,i=t.length;++r<i&&Ie(e,t[r],0)>-1;);return r}function Ke(t,e){for(var r=t.length;r--&&Ie(e,t[r],0)>-1;);return r}function Xe(t,e){for(var r=t.length,i=0;r--;)t[r]===e&&++i;return i}var Ye=Ue({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),$e=Ue({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ze(t){return"\\"+te[t]}function Qe(t){return Xt.test(t)}function Je(t){var e=-1,r=Array(t.size);return t.forEach((function(t,i){r[++e]=[i,t]})),r}function tr(t,e){return function(r){return t(e(r))}}function er(t,e){for(var r=-1,i=t.length,n=0,a=[];++r<i;){var o=t[r];o!==e&&o!==s||(t[r]=s,a[n++]=r)}return a}function rr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function ir(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function nr(t){return Qe(t)?function(t){for(var e=Ht.lastIndex=0;Ht.test(t);)++e;return e}(t):Pe(t)}function ar(t){return Qe(t)?function(t){return t.match(Ht)||[]}(t):function(t){return t.split("")}(t)}function or(t){for(var e=t.length;e--&&nt.test(t.charAt(e)););return e}var sr=Ue({"&":"&","<":"<",">":">",""":'"',"'":"'"}),cr=function t(e){var r,i=(e=null==e?ae:cr.defaults(ae.Object(),e,cr.pick(ae,$t))).Array,nt=e.Date,At=e.Error,wt=e.Function,kt=e.Math,Ct=e.Object,Et=e.RegExp,St=e.String,_t=e.TypeError,Bt=i.prototype,Ot=wt.prototype,Pt=Ct.prototype,Tt=e["__core-js_shared__"],Mt=Ot.toString,It=Pt.hasOwnProperty,Rt=0,Nt=(r=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",qt=Pt.toString,Dt=Mt.call(Ct),Ut=ae._,Lt=Et("^"+Mt.call(It).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=ce?e.Buffer:n,zt=e.Symbol,Ft=e.Uint8Array,jt=Vt?Vt.allocUnsafe:n,Ht=tr(Ct.getPrototypeOf,Ct),Xt=Ct.create,te=Pt.propertyIsEnumerable,ie=Bt.splice,ne=zt?zt.isConcatSpreadable:n,oe=zt?zt.iterator:n,se=zt?zt.toStringTag:n,ue=function(){try{var t=ua(Ct,"defineProperty");return t({},"",{}),t}catch(t){}}(),le=e.clearTimeout!==ae.clearTimeout&&e.clearTimeout,Pe=nt&&nt.now!==ae.Date.now&&nt.now,Ue=e.setTimeout!==ae.setTimeout&&e.setTimeout,ur=kt.ceil,lr=kt.floor,hr=Ct.getOwnPropertySymbols,fr=Vt?Vt.isBuffer:n,pr=e.isFinite,dr=Bt.join,gr=tr(Ct.keys,Ct),mr=kt.max,vr=kt.min,yr=nt.now,br=e.parseInt,xr=kt.random,Ar=Bt.reverse,wr=ua(e,"DataView"),kr=ua(e,"Map"),Cr=ua(e,"Promise"),Er=ua(e,"Set"),Sr=ua(e,"WeakMap"),_r=ua(Ct,"create"),Br=Sr&&new Sr,Or={},Pr=Ua(wr),Tr=Ua(kr),Mr=Ua(Cr),Ir=Ua(Er),Rr=Ua(Sr),Nr=zt?zt.prototype:n,qr=Nr?Nr.valueOf:n,Dr=Nr?Nr.toString:n;function Ur(t){if(rs(t)&&!Go(t)&&!(t instanceof Fr)){if(t instanceof zr)return t;if(It.call(t,"__wrapped__"))return La(t)}return new zr(t)}var Lr=function(){function t(){}return function(e){if(!es(e))return{};if(Xt)return Xt(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function Vr(){}function zr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}function Fr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function jr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Gr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Hr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Gr;++e<r;)this.add(t[e])}function Kr(t){var e=this.__data__=new Wr(t);this.size=e.size}function Xr(t,e){var r=Go(t),i=!r&&Wo(t),n=!r&&!i&&Yo(t),a=!r&&!i&&!n&&ls(t),o=r||i||n||a,s=o?ze(t.length,St):[],c=s.length;for(var u in t)!e&&!It.call(t,u)||o&&("length"==u||n&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ma(u,c))||s.push(u);return s}function Yr(t){var e=t.length;return e?t[Gi(0,e-1)]:n}function $r(t,e){return Ia(_n(t),ai(e,0,t.length))}function Zr(t){return Ia(_n(t))}function Qr(t,e,r){(r!==n&&!zo(t[e],r)||r===n&&!(e in t))&&ii(t,e,r)}function Jr(t,e,r){var i=t[e];It.call(t,e)&&zo(i,r)&&(r!==n||e in t)||ii(t,e,r)}function ti(t,e){for(var r=t.length;r--;)if(zo(t[r][0],e))return r;return-1}function ei(t,e,r,i){return li(t,(function(t,n,a){e(i,t,r(t),a)})),i}function ri(t,e){return t&&Bn(e,Ms(e),t)}function ii(t,e,r){"__proto__"==e&&ue?ue(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function ni(t,e){for(var r=-1,a=e.length,o=i(a),s=null==t;++r<a;)o[r]=s?n:_s(t,e[r]);return o}function ai(t,e,r){return t==t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function oi(t,e,r,i,a,o){var s,c=1&e,u=2&e,l=4&e;if(r&&(s=a?r(t,i,a,o):r(t)),s!==n)return s;if(!es(t))return t;var h=Go(t);if(h){if(s=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&It.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!c)return _n(t,s)}else{var f=fa(t),p=f==x||f==A;if(Yo(t))return An(t,c);if(f==C||f==g||p&&!a){if(s=u||p?{}:da(t),!c)return u?function(t,e){return Bn(t,ha(t),e)}(t,function(t,e){return t&&Bn(e,Is(e),t)}(s,t)):function(t,e){return Bn(t,la(t),e)}(t,ri(s,t))}else{if(!Jt[f])return a?t:{};s=function(t,e,r){var i,n=t.constructor;switch(e){case T:return wn(t);case v:case y:return new n(+t);case M:return function(t,e){var r=e?wn(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case I:case R:case N:case q:case D:case U:case L:case V:case z:return kn(t,r);case w:return new n;case k:case B:return new n(t);case S:return function(t){var e=new t.constructor(t.source,ft.exec(t));return e.lastIndex=t.lastIndex,e}(t);case _:return new n;case O:return i=t,qr?Ct(qr.call(i)):{}}}(t,f,c)}}o||(o=new Kr);var d=o.get(t);if(d)return d;o.set(t,s),ss(t)?t.forEach((function(i){s.add(oi(i,e,r,i,t,o))})):is(t)&&t.forEach((function(i,n){s.set(n,oi(i,e,r,n,t,o))}));var m=h?n:(l?u?ra:ea:u?Is:Ms)(t);return be(m||t,(function(i,n){m&&(i=t[n=i]),Jr(s,n,oi(i,e,r,n,t,o))})),s}function si(t,e,r){var i=r.length;if(null==t)return!i;for(t=Ct(t);i--;){var a=r[i],o=e[a],s=t[a];if(s===n&&!(a in t)||!o(s))return!1}return!0}function ci(t,e,r){if("function"!=typeof t)throw new _t(a);return Oa((function(){t.apply(n,r)}),e)}function ui(t,e,r,i){var n=-1,a=ke,o=!0,s=t.length,c=[],u=e.length;if(!s)return c;r&&(e=Ee(e,je(r))),i?(a=Ce,o=!1):e.length>=200&&(a=Ge,o=!1,e=new Hr(e));t:for(;++n<s;){var l=t[n],h=null==r?l:r(l);if(l=i||0!==l?l:0,o&&h==h){for(var f=u;f--;)if(e[f]===h)continue t;c.push(l)}else a(e,h,i)||c.push(l)}return c}Ur.templateSettings={escape:Y,evaluate:$,interpolate:Z,variable:"",imports:{_:Ur}},Ur.prototype=Vr.prototype,Ur.prototype.constructor=Ur,zr.prototype=Lr(Vr.prototype),zr.prototype.constructor=zr,Fr.prototype=Lr(Vr.prototype),Fr.prototype.constructor=Fr,jr.prototype.clear=function(){this.__data__=_r?_r(null):{},this.size=0},jr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},jr.prototype.get=function(t){var e=this.__data__;if(_r){var r=e[t];return r===o?n:r}return It.call(e,t)?e[t]:n},jr.prototype.has=function(t){var e=this.__data__;return _r?e[t]!==n:It.call(e,t)},jr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=_r&&e===n?o:e,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(t){var e=this.__data__,r=ti(e,t);return!(r<0||(r==e.length-1?e.pop():ie.call(e,r,1),--this.size,0))},Wr.prototype.get=function(t){var e=this.__data__,r=ti(e,t);return r<0?n:e[r][1]},Wr.prototype.has=function(t){return ti(this.__data__,t)>-1},Wr.prototype.set=function(t,e){var r=this.__data__,i=ti(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this},Gr.prototype.clear=function(){this.size=0,this.__data__={hash:new jr,map:new(kr||Wr),string:new jr}},Gr.prototype.delete=function(t){var e=sa(this,t).delete(t);return this.size-=e?1:0,e},Gr.prototype.get=function(t){return sa(this,t).get(t)},Gr.prototype.has=function(t){return sa(this,t).has(t)},Gr.prototype.set=function(t,e){var r=sa(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this},Hr.prototype.add=Hr.prototype.push=function(t){return this.__data__.set(t,o),this},Hr.prototype.has=function(t){return this.__data__.has(t)},Kr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Kr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Kr.prototype.get=function(t){return this.__data__.get(t)},Kr.prototype.has=function(t){return this.__data__.has(t)},Kr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Wr){var i=r.__data__;if(!kr||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new Gr(i)}return r.set(t,e),this.size=r.size,this};var li=Tn(yi),hi=Tn(bi,!0);function fi(t,e){var r=!0;return li(t,(function(t,i,n){return r=!!e(t,i,n)})),r}function pi(t,e,r){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(c===n?s==s&&!us(s):r(s,c)))var c=s,u=o}return u}function di(t,e){var r=[];return li(t,(function(t,i,n){e(t,i,n)&&r.push(t)})),r}function gi(t,e,r,i,n){var a=-1,o=t.length;for(r||(r=ga),n||(n=[]);++a<o;){var s=t[a];e>0&&r(s)?e>1?gi(s,e-1,r,i,n):Se(n,s):i||(n[n.length]=s)}return n}var mi=Mn(),vi=Mn(!0);function yi(t,e){return t&&mi(t,e,Ms)}function bi(t,e){return t&&vi(t,e,Ms)}function xi(t,e){return we(e,(function(e){return Qo(t[e])}))}function Ai(t,e){for(var r=0,i=(e=vn(e,t)).length;null!=t&&r<i;)t=t[Da(e[r++])];return r&&r==i?t:n}function wi(t,e,r){var i=e(t);return Go(t)?i:Se(i,r(t))}function ki(t){return null==t?t===n?"[object Undefined]":"[object Null]":se&&se in Ct(t)?function(t){var e=It.call(t,se),r=t[se];try{t[se]=n;var i=!0}catch(t){}var a=qt.call(t);return i&&(e?t[se]=r:delete t[se]),a}(t):function(t){return qt.call(t)}(t)}function Ci(t,e){return t>e}function Ei(t,e){return null!=t&&It.call(t,e)}function Si(t,e){return null!=t&&e in Ct(t)}function _i(t,e,r){for(var a=r?Ce:ke,o=t[0].length,s=t.length,c=s,u=i(s),l=1/0,h=[];c--;){var f=t[c];c&&e&&(f=Ee(f,je(e))),l=vr(f.length,l),u[c]=!r&&(e||o>=120&&f.length>=120)?new Hr(c&&f):n}f=t[0];var p=-1,d=u[0];t:for(;++p<o&&h.length<l;){var g=f[p],m=e?e(g):g;if(g=r||0!==g?g:0,!(d?Ge(d,m):a(h,m,r))){for(c=s;--c;){var v=u[c];if(!(v?Ge(v,m):a(t[c],m,r)))continue t}d&&d.push(m),h.push(g)}}return h}function Bi(t,e,r){var i=null==(t=Ea(t,e=vn(e,t)))?t:t[Da($a(e))];return null==i?n:ve(i,t,r)}function Oi(t){return rs(t)&&ki(t)==g}function Pi(t,e,r,i,a){return t===e||(null==t||null==e||!rs(t)&&!rs(e)?t!=t&&e!=e:function(t,e,r,i,a,o){var s=Go(t),c=Go(e),u=s?m:fa(t),l=c?m:fa(e),h=(u=u==g?C:u)==C,f=(l=l==g?C:l)==C,p=u==l;if(p&&Yo(t)){if(!Yo(e))return!1;s=!0,h=!1}if(p&&!h)return o||(o=new Kr),s||ls(t)?Jn(t,e,r,i,a,o):function(t,e,r,i,n,a,o){switch(r){case M:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case T:return!(t.byteLength!=e.byteLength||!a(new Ft(t),new Ft(e)));case v:case y:case k:return zo(+t,+e);case b:return t.name==e.name&&t.message==e.message;case S:case B:return t==e+"";case w:var s=Je;case _:var c=1&i;if(s||(s=rr),t.size!=e.size&&!c)return!1;var u=o.get(t);if(u)return u==e;i|=2,o.set(t,e);var l=Jn(s(t),s(e),i,n,a,o);return o.delete(t),l;case O:if(qr)return qr.call(t)==qr.call(e)}return!1}(t,e,u,r,i,a,o);if(!(1&r)){var d=h&&It.call(t,"__wrapped__"),x=f&&It.call(e,"__wrapped__");if(d||x){var A=d?t.value():t,E=x?e.value():e;return o||(o=new Kr),a(A,E,r,i,o)}}return!!p&&(o||(o=new Kr),function(t,e,r,i,a,o){var s=1&r,c=ea(t),u=c.length;if(u!=ea(e).length&&!s)return!1;for(var l=u;l--;){var h=c[l];if(!(s?h in e:It.call(e,h)))return!1}var f=o.get(t),p=o.get(e);if(f&&p)return f==e&&p==t;var d=!0;o.set(t,e),o.set(e,t);for(var g=s;++l<u;){var m=t[h=c[l]],v=e[h];if(i)var y=s?i(v,m,h,e,t,o):i(m,v,h,t,e,o);if(!(y===n?m===v||a(m,v,r,i,o):y)){d=!1;break}g||(g="constructor"==h)}if(d&&!g){var b=t.constructor,x=e.constructor;b==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(d=!1)}return o.delete(t),o.delete(e),d}(t,e,r,i,a,o))}(t,e,r,i,Pi,a))}function Ti(t,e,r,i){var a=r.length,o=a,s=!i;if(null==t)return!o;for(t=Ct(t);a--;){var c=r[a];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<o;){var u=(c=r[a])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===n&&!(u in t))return!1}else{var f=new Kr;if(i)var p=i(l,h,u,t,e,f);if(!(p===n?Pi(h,l,3,i,f):p))return!1}}return!0}function Mi(t){return!(!es(t)||(e=t,Nt&&Nt in e))&&(Qo(t)?Lt:gt).test(Ua(t));var e}function Ii(t){return"function"==typeof t?t:null==t?nc:"object"==typeof t?Go(t)?Ui(t[0],t[1]):Di(t):pc(t)}function Ri(t){if(!Aa(t))return gr(t);var e=[];for(var r in Ct(t))It.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Ni(t,e){return t<e}function qi(t,e){var r=-1,n=Ko(t)?i(t.length):[];return li(t,(function(t,i,a){n[++r]=e(t,i,a)})),n}function Di(t){var e=ca(t);return 1==e.length&&e[0][2]?ka(e[0][0],e[0][1]):function(r){return r===t||Ti(r,t,e)}}function Ui(t,e){return ya(t)&&wa(e)?ka(Da(t),e):function(r){var i=_s(r,t);return i===n&&i===e?Bs(r,t):Pi(e,i,3)}}function Li(t,e,r,i,a){t!==e&&mi(e,(function(o,s){if(a||(a=new Kr),es(o))!function(t,e,r,i,a,o,s){var c=_a(t,r),u=_a(e,r),l=s.get(u);if(l)Qr(t,r,l);else{var h=o?o(c,u,r+"",t,e,s):n,f=h===n;if(f){var p=Go(u),d=!p&&Yo(u),g=!p&&!d&&ls(u);h=u,p||d||g?Go(c)?h=c:Xo(c)?h=_n(c):d?(f=!1,h=An(u,!0)):g?(f=!1,h=kn(u,!0)):h=[]:as(u)||Wo(u)?(h=c,Wo(c)?h=ys(c):es(c)&&!Qo(c)||(h=da(u))):f=!1}f&&(s.set(u,h),a(h,u,i,o,s),s.delete(u)),Qr(t,r,h)}}(t,e,s,r,Li,i,a);else{var c=i?i(_a(t,s),o,s+"",t,e,a):n;c===n&&(c=o),Qr(t,s,c)}}),Is)}function Vi(t,e){var r=t.length;if(r)return ma(e+=e<0?r:0,r)?t[e]:n}function zi(t,e,r){e=e.length?Ee(e,(function(t){return Go(t)?function(e){return Ai(e,1===t.length?t[0]:t)}:t})):[nc];var i=-1;e=Ee(e,je(oa()));var n=qi(t,(function(t,r,n){var a=Ee(e,(function(e){return e(t)}));return{criteria:a,index:++i,value:t}}));return function(t,e){var i=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var i=-1,n=t.criteria,a=e.criteria,o=n.length,s=r.length;++i<o;){var c=Cn(n[i],a[i]);if(c)return i>=s?c:c*("desc"==r[i]?-1:1)}return t.index-e.index}(t,e,r)}));i--;)t[i]=t[i].value;return t}(n)}function Fi(t,e,r){for(var i=-1,n=e.length,a={};++i<n;){var o=e[i],s=Ai(t,o);r(s,o)&&$i(a,vn(o,t),s)}return a}function ji(t,e,r,i){var n=i?Re:Ie,a=-1,o=e.length,s=t;for(t===e&&(e=_n(e)),r&&(s=Ee(t,je(r)));++a<o;)for(var c=0,u=e[a],l=r?r(u):u;(c=n(s,l,c,i))>-1;)s!==t&&ie.call(s,c,1),ie.call(t,c,1);return t}function Wi(t,e){for(var r=t?e.length:0,i=r-1;r--;){var n=e[r];if(r==i||n!==a){var a=n;ma(n)?ie.call(t,n,1):un(t,n)}}return t}function Gi(t,e){return t+lr(xr()*(e-t+1))}function Hi(t,e){var r="";if(!t||e<1||e>h)return r;do{e%2&&(r+=t),(e=lr(e/2))&&(t+=t)}while(e);return r}function Ki(t,e){return Pa(Ca(t,e,nc),t+"")}function Xi(t){return Yr(zs(t))}function Yi(t,e){var r=zs(t);return Ia(r,ai(e,0,r.length))}function $i(t,e,r,i){if(!es(t))return t;for(var a=-1,o=(e=vn(e,t)).length,s=o-1,c=t;null!=c&&++a<o;){var u=Da(e[a]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(a!=s){var h=c[u];(l=i?i(h,u,c):n)===n&&(l=es(h)?h:ma(e[a+1])?[]:{})}Jr(c,u,l),c=c[u]}return t}var Zi=Br?function(t,e){return Br.set(t,e),t}:nc,Qi=ue?function(t,e){return ue(t,"toString",{configurable:!0,enumerable:!1,value:ec(e),writable:!0})}:nc;function Ji(t){return Ia(zs(t))}function tn(t,e,r){var n=-1,a=t.length;e<0&&(e=-e>a?0:a+e),(r=r>a?a:r)<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var o=i(a);++n<a;)o[n]=t[n+e];return o}function en(t,e){var r;return li(t,(function(t,i,n){return!(r=e(t,i,n))})),!!r}function rn(t,e,r){var i=0,n=null==t?i:t.length;if("number"==typeof e&&e==e&&n<=2147483647){for(;i<n;){var a=i+n>>>1,o=t[a];null!==o&&!us(o)&&(r?o<=e:o<e)?i=a+1:n=a}return n}return nn(t,e,nc,r)}function nn(t,e,r,i){var a=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(e=r(e))!=e,c=null===e,u=us(e),l=e===n;a<o;){var h=lr((a+o)/2),f=r(t[h]),p=f!==n,d=null===f,g=f==f,m=us(f);if(s)var v=i||g;else v=l?g&&(i||p):c?g&&p&&(i||!d):u?g&&p&&!d&&(i||!m):!d&&!m&&(i?f<=e:f<e);v?a=h+1:o=h}return vr(o,4294967294)}function an(t,e){for(var r=-1,i=t.length,n=0,a=[];++r<i;){var o=t[r],s=e?e(o):o;if(!r||!zo(s,c)){var c=s;a[n++]=0===o?0:o}}return a}function on(t){return"number"==typeof t?t:us(t)?f:+t}function sn(t){if("string"==typeof t)return t;if(Go(t))return Ee(t,sn)+"";if(us(t))return Dr?Dr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function cn(t,e,r){var i=-1,n=ke,a=t.length,o=!0,s=[],c=s;if(r)o=!1,n=Ce;else if(a>=200){var u=e?null:Kn(t);if(u)return rr(u);o=!1,n=Ge,c=new Hr}else c=e?[]:s;t:for(;++i<a;){var l=t[i],h=e?e(l):l;if(l=r||0!==l?l:0,o&&h==h){for(var f=c.length;f--;)if(c[f]===h)continue t;e&&c.push(h),s.push(l)}else n(c,h,r)||(c!==s&&c.push(h),s.push(l))}return s}function un(t,e){return null==(t=Ea(t,e=vn(e,t)))||delete t[Da($a(e))]}function ln(t,e,r,i){return $i(t,e,r(Ai(t,e)),i)}function hn(t,e,r,i){for(var n=t.length,a=i?n:-1;(i?a--:++a<n)&&e(t[a],a,t););return r?tn(t,i?0:a,i?a+1:n):tn(t,i?a+1:0,i?n:a)}function fn(t,e){var r=t;return r instanceof Fr&&(r=r.value()),_e(e,(function(t,e){return e.func.apply(e.thisArg,Se([t],e.args))}),r)}function pn(t,e,r){var n=t.length;if(n<2)return n?cn(t[0]):[];for(var a=-1,o=i(n);++a<n;)for(var s=t[a],c=-1;++c<n;)c!=a&&(o[a]=ui(o[a]||s,t[c],e,r));return cn(gi(o,1),e,r)}function dn(t,e,r){for(var i=-1,a=t.length,o=e.length,s={};++i<a;){var c=i<o?e[i]:n;r(s,t[i],c)}return s}function gn(t){return Xo(t)?t:[]}function mn(t){return"function"==typeof t?t:nc}function vn(t,e){return Go(t)?t:ya(t,e)?[t]:qa(bs(t))}var yn=Ki;function bn(t,e,r){var i=t.length;return r=r===n?i:r,!e&&r>=i?t:tn(t,e,r)}var xn=le||function(t){return ae.clearTimeout(t)};function An(t,e){if(e)return t.slice();var r=t.length,i=jt?jt(r):new t.constructor(r);return t.copy(i),i}function wn(t){var e=new t.constructor(t.byteLength);return new Ft(e).set(new Ft(t)),e}function kn(t,e){var r=e?wn(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Cn(t,e){if(t!==e){var r=t!==n,i=null===t,a=t==t,o=us(t),s=e!==n,c=null===e,u=e==e,l=us(e);if(!c&&!l&&!o&&t>e||o&&s&&u&&!c&&!l||i&&s&&u||!r&&u||!a)return 1;if(!i&&!o&&!l&&t<e||l&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!u)return-1}return 0}function En(t,e,r,n){for(var a=-1,o=t.length,s=r.length,c=-1,u=e.length,l=mr(o-s,0),h=i(u+l),f=!n;++c<u;)h[c]=e[c];for(;++a<s;)(f||a<o)&&(h[r[a]]=t[a]);for(;l--;)h[c++]=t[a++];return h}function Sn(t,e,r,n){for(var a=-1,o=t.length,s=-1,c=r.length,u=-1,l=e.length,h=mr(o-c,0),f=i(h+l),p=!n;++a<h;)f[a]=t[a];for(var d=a;++u<l;)f[d+u]=e[u];for(;++s<c;)(p||a<o)&&(f[d+r[s]]=t[a++]);return f}function _n(t,e){var r=-1,n=t.length;for(e||(e=i(n));++r<n;)e[r]=t[r];return e}function Bn(t,e,r,i){var a=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var c=e[o],u=i?i(r[c],t[c],c,r,t):n;u===n&&(u=t[c]),a?ii(r,c,u):Jr(r,c,u)}return r}function On(t,e){return function(r,i){var n=Go(r)?ye:ei,a=e?e():{};return n(r,t,oa(i,2),a)}}function Pn(t){return Ki((function(e,r){var i=-1,a=r.length,o=a>1?r[a-1]:n,s=a>2?r[2]:n;for(o=t.length>3&&"function"==typeof o?(a--,o):n,s&&va(r[0],r[1],s)&&(o=a<3?n:o,a=1),e=Ct(e);++i<a;){var c=r[i];c&&t(e,c,i,o)}return e}))}function Tn(t,e){return function(r,i){if(null==r)return r;if(!Ko(r))return t(r,i);for(var n=r.length,a=e?n:-1,o=Ct(r);(e?a--:++a<n)&&!1!==i(o[a],a,o););return r}}function Mn(t){return function(e,r,i){for(var n=-1,a=Ct(e),o=i(e),s=o.length;s--;){var c=o[t?s:++n];if(!1===r(a[c],c,a))break}return e}}function In(t){return function(e){var r=Qe(e=bs(e))?ar(e):n,i=r?r[0]:e.charAt(0),a=r?bn(r,1).join(""):e.slice(1);return i[t]()+a}}function Rn(t){return function(e){return _e(Qs(Ws(e).replace(Wt,"")),t,"")}}function Nn(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Lr(t.prototype),i=t.apply(r,e);return es(i)?i:r}}function qn(t){return function(e,r,i){var a=Ct(e);if(!Ko(e)){var o=oa(r,3);e=Ms(e),r=function(t){return o(a[t],t,a)}}var s=t(e,r,i);return s>-1?a[o?e[s]:s]:n}}function Dn(t){return ta((function(e){var r=e.length,i=r,o=zr.prototype.thru;for(t&&e.reverse();i--;){var s=e[i];if("function"!=typeof s)throw new _t(a);if(o&&!c&&"wrapper"==na(s))var c=new zr([],!0)}for(i=c?i:r;++i<r;){var u=na(s=e[i]),l="wrapper"==u?ia(s):n;c=l&&ba(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[na(l[0])].apply(c,l[3]):1==s.length&&ba(s)?c[u]():c.thru(s)}return function(){var t=arguments,i=t[0];if(c&&1==t.length&&Go(i))return c.plant(i).value();for(var n=0,a=r?e[n].apply(this,t):i;++n<r;)a=e[n].call(this,a);return a}}))}function Un(t,e,r,a,o,s,c,l,h,f){var p=e&u,d=1&e,g=2&e,m=24&e,v=512&e,y=g?n:Nn(t);return function n(){for(var u=arguments.length,b=i(u),x=u;x--;)b[x]=arguments[x];if(m)var A=aa(n),w=Xe(b,A);if(a&&(b=En(b,a,o,m)),s&&(b=Sn(b,s,c,m)),u-=w,m&&u<f){var k=er(b,A);return Gn(t,e,Un,n.placeholder,r,b,k,l,h,f-u)}var C=d?r:this,E=g?C[t]:t;return u=b.length,l?b=Sa(b,l):v&&u>1&&b.reverse(),p&&h<u&&(b.length=h),this&&this!==ae&&this instanceof n&&(E=y||Nn(E)),E.apply(C,b)}}function Ln(t,e){return function(r,i){return function(t,e,r,i){return yi(t,(function(t,n,a){e(i,r(t),n,a)})),i}(r,t,e(i),{})}}function Vn(t,e){return function(r,i){var a;if(r===n&&i===n)return e;if(r!==n&&(a=r),i!==n){if(a===n)return i;"string"==typeof r||"string"==typeof i?(r=sn(r),i=sn(i)):(r=on(r),i=on(i)),a=t(r,i)}return a}}function zn(t){return ta((function(e){return e=Ee(e,je(oa())),Ki((function(r){var i=this;return t(e,(function(t){return ve(t,i,r)}))}))}))}function Fn(t,e){var r=(e=e===n?" ":sn(e)).length;if(r<2)return r?Hi(e,t):e;var i=Hi(e,ur(t/nr(e)));return Qe(e)?bn(ar(i),0,t).join(""):i.slice(0,t)}function jn(t){return function(e,r,a){return a&&"number"!=typeof a&&va(e,r,a)&&(r=a=n),e=ds(e),r===n?(r=e,e=0):r=ds(r),function(t,e,r,n){for(var a=-1,o=mr(ur((e-t)/(r||1)),0),s=i(o);o--;)s[n?o:++a]=t,t+=r;return s}(e,r,a=a===n?e<r?1:-1:ds(a),t)}}function Wn(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=vs(e),r=vs(r)),t(e,r)}}function Gn(t,e,r,i,a,o,s,u,l,h){var f=8&e;e|=f?c:64,4&(e&=~(f?64:c))||(e&=-4);var p=[t,e,a,f?o:n,f?s:n,f?n:o,f?n:s,u,l,h],d=r.apply(n,p);return ba(t)&&Ba(d,p),d.placeholder=i,Ta(d,t,e)}function Hn(t){var e=kt[t];return function(t,r){if(t=vs(t),(r=null==r?0:vr(gs(r),292))&&pr(t)){var i=(bs(t)+"e").split("e");return+((i=(bs(e(i[0]+"e"+(+i[1]+r)))+"e").split("e"))[0]+"e"+(+i[1]-r))}return e(t)}}var Kn=Er&&1/rr(new Er([,-0]))[1]==l?function(t){return new Er(t)}:uc;function Xn(t){return function(e){var r=fa(e);return r==w?Je(e):r==_?ir(e):function(t,e){return Ee(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Yn(t,e,r,o,l,h,f,p){var d=2&e;if(!d&&"function"!=typeof t)throw new _t(a);var g=o?o.length:0;if(g||(e&=-97,o=l=n),f=f===n?f:mr(gs(f),0),p=p===n?p:gs(p),g-=l?l.length:0,64&e){var m=o,v=l;o=l=n}var y=d?n:ia(t),b=[t,e,r,o,l,m,v,h,f,p];if(y&&function(t,e){var r=t[1],i=e[1],n=r|i,a=n<131,o=i==u&&8==r||i==u&&256==r&&t[7].length<=e[8]||384==i&&e[7].length<=e[8]&&8==r;if(!a&&!o)return t;1&i&&(t[2]=e[2],n|=1&r?0:4);var c=e[3];if(c){var l=t[3];t[3]=l?En(l,c,e[4]):c,t[4]=l?er(t[3],s):e[4]}(c=e[5])&&(l=t[5],t[5]=l?Sn(l,c,e[6]):c,t[6]=l?er(t[5],s):e[6]),(c=e[7])&&(t[7]=c),i&u&&(t[8]=null==t[8]?e[8]:vr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=n}(b,y),t=b[0],e=b[1],r=b[2],o=b[3],l=b[4],!(p=b[9]=b[9]===n?d?0:t.length:mr(b[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)x=8==e||16==e?function(t,e,r){var a=Nn(t);return function o(){for(var s=arguments.length,c=i(s),u=s,l=aa(o);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:er(c,l);return(s-=h.length)<r?Gn(t,e,Un,o.placeholder,n,c,h,n,n,r-s):ve(this&&this!==ae&&this instanceof o?a:t,this,c)}}(t,e,p):e!=c&&33!=e||l.length?Un.apply(n,b):function(t,e,r,n){var a=1&e,o=Nn(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=n.length,h=i(l+c),f=this&&this!==ae&&this instanceof e?o:t;++u<l;)h[u]=n[u];for(;c--;)h[u++]=arguments[++s];return ve(f,a?r:this,h)}}(t,e,r,o);else var x=function(t,e,r){var i=1&e,n=Nn(t);return function e(){return(this&&this!==ae&&this instanceof e?n:t).apply(i?r:this,arguments)}}(t,e,r);return Ta((y?Zi:Ba)(x,b),t,e)}function $n(t,e,r,i){return t===n||zo(t,Pt[r])&&!It.call(i,r)?e:t}function Zn(t,e,r,i,a,o){return es(t)&&es(e)&&(o.set(e,t),Li(t,e,n,Zn,o),o.delete(e)),t}function Qn(t){return as(t)?n:t}function Jn(t,e,r,i,a,o){var s=1&r,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=o.get(t),h=o.get(e);if(l&&h)return l==e&&h==t;var f=-1,p=!0,d=2&r?new Hr:n;for(o.set(t,e),o.set(e,t);++f<c;){var g=t[f],m=e[f];if(i)var v=s?i(m,g,f,e,t,o):i(g,m,f,t,e,o);if(v!==n){if(v)continue;p=!1;break}if(d){if(!Oe(e,(function(t,e){if(!Ge(d,e)&&(g===t||a(g,t,r,i,o)))return d.push(e)}))){p=!1;break}}else if(g!==m&&!a(g,m,r,i,o)){p=!1;break}}return o.delete(t),o.delete(e),p}function ta(t){return Pa(Ca(t,n,Ga),t+"")}function ea(t){return wi(t,Ms,la)}function ra(t){return wi(t,Is,ha)}var ia=Br?function(t){return Br.get(t)}:uc;function na(t){for(var e=t.name+"",r=Or[e],i=It.call(Or,e)?r.length:0;i--;){var n=r[i],a=n.func;if(null==a||a==t)return n.name}return e}function aa(t){return(It.call(Ur,"placeholder")?Ur:t).placeholder}function oa(){var t=Ur.iteratee||ac;return t=t===ac?Ii:t,arguments.length?t(arguments[0],arguments[1]):t}function sa(t,e){var r,i,n=t.__data__;return("string"==(i=typeof(r=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?n["string"==typeof e?"string":"hash"]:n.map}function ca(t){for(var e=Ms(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,wa(n)]}return e}function ua(t,e){var r=function(t,e){return null==t?n:t[e]}(t,e);return Mi(r)?r:n}var la=hr?function(t){return null==t?[]:(t=Ct(t),we(hr(t),(function(e){return te.call(t,e)})))}:mc,ha=hr?function(t){for(var e=[];t;)Se(e,la(t)),t=Ht(t);return e}:mc,fa=ki;function pa(t,e,r){for(var i=-1,n=(e=vn(e,t)).length,a=!1;++i<n;){var o=Da(e[i]);if(!(a=null!=t&&r(t,o)))break;t=t[o]}return a||++i!=n?a:!!(n=null==t?0:t.length)&&ts(n)&&ma(o,n)&&(Go(t)||Wo(t))}function da(t){return"function"!=typeof t.constructor||Aa(t)?{}:Lr(Ht(t))}function ga(t){return Go(t)||Wo(t)||!!(ne&&t&&t[ne])}function ma(t,e){var r=typeof t;return!!(e=null==e?h:e)&&("number"==r||"symbol"!=r&&vt.test(t))&&t>-1&&t%1==0&&t<e}function va(t,e,r){if(!es(r))return!1;var i=typeof e;return!!("number"==i?Ko(r)&&ma(e,r.length):"string"==i&&e in r)&&zo(r[e],t)}function ya(t,e){if(Go(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!us(t))||J.test(t)||!Q.test(t)||null!=e&&t in Ct(e)}function ba(t){var e=na(t),r=Ur[e];if("function"!=typeof r||!(e in Fr.prototype))return!1;if(t===r)return!0;var i=ia(r);return!!i&&t===i[0]}(wr&&fa(new wr(new ArrayBuffer(1)))!=M||kr&&fa(new kr)!=w||Cr&&fa(Cr.resolve())!=E||Er&&fa(new Er)!=_||Sr&&fa(new Sr)!=P)&&(fa=function(t){var e=ki(t),r=e==C?t.constructor:n,i=r?Ua(r):"";if(i)switch(i){case Pr:return M;case Tr:return w;case Mr:return E;case Ir:return _;case Rr:return P}return e});var xa=Tt?Qo:vc;function Aa(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Pt)}function wa(t){return t==t&&!es(t)}function ka(t,e){return function(r){return null!=r&&r[t]===e&&(e!==n||t in Ct(r))}}function Ca(t,e,r){return e=mr(e===n?t.length-1:e,0),function(){for(var n=arguments,a=-1,o=mr(n.length-e,0),s=i(o);++a<o;)s[a]=n[e+a];a=-1;for(var c=i(e+1);++a<e;)c[a]=n[a];return c[e]=r(s),ve(t,this,c)}}function Ea(t,e){return e.length<2?t:Ai(t,tn(e,0,-1))}function Sa(t,e){for(var r=t.length,i=vr(e.length,r),a=_n(t);i--;){var o=e[i];t[i]=ma(o,r)?a[o]:n}return t}function _a(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ba=Ma(Zi),Oa=Ue||function(t,e){return ae.setTimeout(t,e)},Pa=Ma(Qi);function Ta(t,e,r){var i=e+"";return Pa(t,function(t,e){var r=e.length;if(!r)return t;var i=r-1;return e[i]=(r>1?"& ":"")+e[i],e=e.join(r>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(i,function(t,e){return be(d,(function(r){var i="_."+r[0];e&r[1]&&!ke(t,i)&&t.push(i)})),t.sort()}(function(t){var e=t.match(ot);return e?e[1].split(st):[]}(i),r)))}function Ma(t){var e=0,r=0;return function(){var i=yr(),a=16-(i-r);if(r=i,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Ia(t,e){var r=-1,i=t.length,a=i-1;for(e=e===n?i:e;++r<e;){var o=Gi(r,a),s=t[o];t[o]=t[r],t[r]=s}return t.length=e,t}var Ra,Na,qa=(Ra=No((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,r,i,n){e.push(i?n.replace(lt,"$1"):r||t)})),e}),(function(t){return 500===Na.size&&Na.clear(),t})),Na=Ra.cache,Ra);function Da(t){if("string"==typeof t||us(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ua(t){if(null!=t){try{return Mt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function La(t){if(t instanceof Fr)return t.clone();var e=new zr(t.__wrapped__,t.__chain__);return e.__actions__=_n(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Va=Ki((function(t,e){return Xo(t)?ui(t,gi(e,1,Xo,!0)):[]})),za=Ki((function(t,e){var r=$a(e);return Xo(r)&&(r=n),Xo(t)?ui(t,gi(e,1,Xo,!0),oa(r,2)):[]})),Fa=Ki((function(t,e){var r=$a(e);return Xo(r)&&(r=n),Xo(t)?ui(t,gi(e,1,Xo,!0),n,r):[]}));function ja(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var n=null==r?0:gs(r);return n<0&&(n=mr(i+n,0)),Me(t,oa(e,3),n)}function Wa(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var a=i-1;return r!==n&&(a=gs(r),a=r<0?mr(i+a,0):vr(a,i-1)),Me(t,oa(e,3),a,!0)}function Ga(t){return null!=t&&t.length?gi(t,1):[]}function Ha(t){return t&&t.length?t[0]:n}var Ka=Ki((function(t){var e=Ee(t,gn);return e.length&&e[0]===t[0]?_i(e):[]})),Xa=Ki((function(t){var e=$a(t),r=Ee(t,gn);return e===$a(r)?e=n:r.pop(),r.length&&r[0]===t[0]?_i(r,oa(e,2)):[]})),Ya=Ki((function(t){var e=$a(t),r=Ee(t,gn);return(e="function"==typeof e?e:n)&&r.pop(),r.length&&r[0]===t[0]?_i(r,n,e):[]}));function $a(t){var e=null==t?0:t.length;return e?t[e-1]:n}var Za=Ki(Qa);function Qa(t,e){return t&&t.length&&e&&e.length?ji(t,e):t}var Ja=ta((function(t,e){var r=null==t?0:t.length,i=ni(t,e);return Wi(t,Ee(e,(function(t){return ma(t,r)?+t:t})).sort(Cn)),i}));function to(t){return null==t?t:Ar.call(t)}var eo=Ki((function(t){return cn(gi(t,1,Xo,!0))})),ro=Ki((function(t){var e=$a(t);return Xo(e)&&(e=n),cn(gi(t,1,Xo,!0),oa(e,2))})),io=Ki((function(t){var e=$a(t);return e="function"==typeof e?e:n,cn(gi(t,1,Xo,!0),n,e)}));function no(t){if(!t||!t.length)return[];var e=0;return t=we(t,(function(t){if(Xo(t))return e=mr(t.length,e),!0})),ze(e,(function(e){return Ee(t,De(e))}))}function ao(t,e){if(!t||!t.length)return[];var r=no(t);return null==e?r:Ee(r,(function(t){return ve(e,n,t)}))}var oo=Ki((function(t,e){return Xo(t)?ui(t,e):[]})),so=Ki((function(t){return pn(we(t,Xo))})),co=Ki((function(t){var e=$a(t);return Xo(e)&&(e=n),pn(we(t,Xo),oa(e,2))})),uo=Ki((function(t){var e=$a(t);return e="function"==typeof e?e:n,pn(we(t,Xo),n,e)})),lo=Ki(no),ho=Ki((function(t){var e=t.length,r=e>1?t[e-1]:n;return r="function"==typeof r?(t.pop(),r):n,ao(t,r)}));function fo(t){var e=Ur(t);return e.__chain__=!0,e}function po(t,e){return e(t)}var go=ta((function(t){var e=t.length,r=e?t[0]:0,i=this.__wrapped__,a=function(e){return ni(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Fr&&ma(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:po,args:[a],thisArg:n}),new zr(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(n),t}))):this.thru(a)})),mo=On((function(t,e,r){It.call(t,r)?++t[r]:ii(t,r,1)})),vo=qn(ja),yo=qn(Wa);function bo(t,e){return(Go(t)?be:li)(t,oa(e,3))}function xo(t,e){return(Go(t)?xe:hi)(t,oa(e,3))}var Ao=On((function(t,e,r){It.call(t,r)?t[r].push(e):ii(t,r,[e])})),wo=Ki((function(t,e,r){var n=-1,a="function"==typeof e,o=Ko(t)?i(t.length):[];return li(t,(function(t){o[++n]=a?ve(e,t,r):Bi(t,e,r)})),o})),ko=On((function(t,e,r){ii(t,r,e)}));function Co(t,e){return(Go(t)?Ee:qi)(t,oa(e,3))}var Eo=On((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),So=Ki((function(t,e){if(null==t)return[];var r=e.length;return r>1&&va(t,e[0],e[1])?e=[]:r>2&&va(e[0],e[1],e[2])&&(e=[e[0]]),zi(t,gi(e,1),[])})),_o=Pe||function(){return ae.Date.now()};function Bo(t,e,r){return e=r?n:e,e=t&&null==e?t.length:e,Yn(t,u,n,n,n,n,e)}function Oo(t,e){var r;if("function"!=typeof e)throw new _t(a);return t=gs(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var Po=Ki((function(t,e,r){var i=1;if(r.length){var n=er(r,aa(Po));i|=c}return Yn(t,i,e,r,n)})),To=Ki((function(t,e,r){var i=3;if(r.length){var n=er(r,aa(To));i|=c}return Yn(e,i,t,r,n)}));function Mo(t,e,r){var i,o,s,c,u,l,h=0,f=!1,p=!1,d=!0;if("function"!=typeof t)throw new _t(a);function g(e){var r=i,a=o;return i=o=n,h=e,c=t.apply(a,r)}function m(t){return h=t,u=Oa(y,e),f?g(t):c}function v(t){var r=t-l;return l===n||r>=e||r<0||p&&t-h>=s}function y(){var t=_o();if(v(t))return b(t);u=Oa(y,function(t){var r=e-(t-l);return p?vr(r,s-(t-h)):r}(t))}function b(t){return u=n,d&&i?g(t):(i=o=n,c)}function x(){var t=_o(),r=v(t);if(i=arguments,o=this,l=t,r){if(u===n)return m(l);if(p)return xn(u),u=Oa(y,e),g(l)}return u===n&&(u=Oa(y,e)),c}return e=vs(e)||0,es(r)&&(f=!!r.leading,s=(p="maxWait"in r)?mr(vs(r.maxWait)||0,e):s,d="trailing"in r?!!r.trailing:d),x.cancel=function(){u!==n&&xn(u),h=0,i=l=o=u=n},x.flush=function(){return u===n?c:b(_o())},x}var Io=Ki((function(t,e){return ci(t,1,e)})),Ro=Ki((function(t,e,r){return ci(t,vs(e)||0,r)}));function No(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new _t(a);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=t.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(No.Cache||Gr),r}function qo(t){if("function"!=typeof t)throw new _t(a);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}No.Cache=Gr;var Do=yn((function(t,e){var r=(e=1==e.length&&Go(e[0])?Ee(e[0],je(oa())):Ee(gi(e,1),je(oa()))).length;return Ki((function(i){for(var n=-1,a=vr(i.length,r);++n<a;)i[n]=e[n].call(this,i[n]);return ve(t,this,i)}))})),Uo=Ki((function(t,e){var r=er(e,aa(Uo));return Yn(t,c,n,e,r)})),Lo=Ki((function(t,e){var r=er(e,aa(Lo));return Yn(t,64,n,e,r)})),Vo=ta((function(t,e){return Yn(t,256,n,n,n,e)}));function zo(t,e){return t===e||t!=t&&e!=e}var Fo=Wn(Ci),jo=Wn((function(t,e){return t>=e})),Wo=Oi(function(){return arguments}())?Oi:function(t){return rs(t)&&It.call(t,"callee")&&!te.call(t,"callee")},Go=i.isArray,Ho=he?je(he):function(t){return rs(t)&&ki(t)==T};function Ko(t){return null!=t&&ts(t.length)&&!Qo(t)}function Xo(t){return rs(t)&&Ko(t)}var Yo=fr||vc,$o=fe?je(fe):function(t){return rs(t)&&ki(t)==y};function Zo(t){if(!rs(t))return!1;var e=ki(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!as(t)}function Qo(t){if(!es(t))return!1;var e=ki(t);return e==x||e==A||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Jo(t){return"number"==typeof t&&t==gs(t)}function ts(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function es(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function rs(t){return null!=t&&"object"==typeof t}var is=pe?je(pe):function(t){return rs(t)&&fa(t)==w};function ns(t){return"number"==typeof t||rs(t)&&ki(t)==k}function as(t){if(!rs(t)||ki(t)!=C)return!1;var e=Ht(t);if(null===e)return!0;var r=It.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Mt.call(r)==Dt}var os=de?je(de):function(t){return rs(t)&&ki(t)==S},ss=ge?je(ge):function(t){return rs(t)&&fa(t)==_};function cs(t){return"string"==typeof t||!Go(t)&&rs(t)&&ki(t)==B}function us(t){return"symbol"==typeof t||rs(t)&&ki(t)==O}var ls=me?je(me):function(t){return rs(t)&&ts(t.length)&&!!Qt[ki(t)]},hs=Wn(Ni),fs=Wn((function(t,e){return t<=e}));function ps(t){if(!t)return[];if(Ko(t))return cs(t)?ar(t):_n(t);if(oe&&t[oe])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[oe]());var e=fa(t);return(e==w?Je:e==_?rr:zs)(t)}function ds(t){return t?(t=vs(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function gs(t){var e=ds(t),r=e%1;return e==e?r?e-r:e:0}function ms(t){return t?ai(gs(t),0,p):0}function vs(t){if("number"==typeof t)return t;if(us(t))return f;if(es(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=es(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Fe(t);var r=dt.test(t);return r||mt.test(t)?re(t.slice(2),r?2:8):pt.test(t)?f:+t}function ys(t){return Bn(t,Is(t))}function bs(t){return null==t?"":sn(t)}var xs=Pn((function(t,e){if(Aa(e)||Ko(e))Bn(e,Ms(e),t);else for(var r in e)It.call(e,r)&&Jr(t,r,e[r])})),As=Pn((function(t,e){Bn(e,Is(e),t)})),ws=Pn((function(t,e,r,i){Bn(e,Is(e),t,i)})),ks=Pn((function(t,e,r,i){Bn(e,Ms(e),t,i)})),Cs=ta(ni),Es=Ki((function(t,e){t=Ct(t);var r=-1,i=e.length,a=i>2?e[2]:n;for(a&&va(e[0],e[1],a)&&(i=1);++r<i;)for(var o=e[r],s=Is(o),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===n||zo(h,Pt[l])&&!It.call(t,l))&&(t[l]=o[l])}return t})),Ss=Ki((function(t){return t.push(n,Zn),ve(Ns,n,t)}));function _s(t,e,r){var i=null==t?n:Ai(t,e);return i===n?r:i}function Bs(t,e){return null!=t&&pa(t,e,Si)}var Os=Ln((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=qt.call(e)),t[e]=r}),ec(nc)),Ps=Ln((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=qt.call(e)),It.call(t,e)?t[e].push(r):t[e]=[r]}),oa),Ts=Ki(Bi);function Ms(t){return Ko(t)?Xr(t):Ri(t)}function Is(t){return Ko(t)?Xr(t,!0):function(t){if(!es(t))return function(t){var e=[];if(null!=t)for(var r in Ct(t))e.push(r);return e}(t);var e=Aa(t),r=[];for(var i in t)("constructor"!=i||!e&&It.call(t,i))&&r.push(i);return r}(t)}var Rs=Pn((function(t,e,r){Li(t,e,r)})),Ns=Pn((function(t,e,r,i){Li(t,e,r,i)})),qs=ta((function(t,e){var r={};if(null==t)return r;var i=!1;e=Ee(e,(function(e){return e=vn(e,t),i||(i=e.length>1),e})),Bn(t,ra(t),r),i&&(r=oi(r,7,Qn));for(var n=e.length;n--;)un(r,e[n]);return r})),Ds=ta((function(t,e){return null==t?{}:function(t,e){return Fi(t,e,(function(e,r){return Bs(t,r)}))}(t,e)}));function Us(t,e){if(null==t)return{};var r=Ee(ra(t),(function(t){return[t]}));return e=oa(e),Fi(t,r,(function(t,r){return e(t,r[0])}))}var Ls=Xn(Ms),Vs=Xn(Is);function zs(t){return null==t?[]:We(t,Ms(t))}var Fs=Rn((function(t,e,r){return e=e.toLowerCase(),t+(r?js(e):e)}));function js(t){return Zs(bs(t).toLowerCase())}function Ws(t){return(t=bs(t))&&t.replace(yt,Ye).replace(Gt,"")}var Gs=Rn((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Hs=Rn((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Ks=In("toLowerCase"),Xs=Rn((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Ys=Rn((function(t,e,r){return t+(r?" ":"")+Zs(e)})),$s=Rn((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Zs=In("toUpperCase");function Qs(t,e,r){return t=bs(t),(e=r?n:e)===n?function(t){return Yt.test(t)}(t)?function(t){return t.match(Kt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(e)||[]}var Js=Ki((function(t,e){try{return ve(t,n,e)}catch(t){return Zo(t)?t:new At(t)}})),tc=ta((function(t,e){return be(e,(function(e){e=Da(e),ii(t,e,Po(t[e],t))})),t}));function ec(t){return function(){return t}}var rc=Dn(),ic=Dn(!0);function nc(t){return t}function ac(t){return Ii("function"==typeof t?t:oi(t,1))}var oc=Ki((function(t,e){return function(r){return Bi(r,t,e)}})),sc=Ki((function(t,e){return function(r){return Bi(t,r,e)}}));function cc(t,e,r){var i=Ms(e),n=xi(e,i);null!=r||es(e)&&(n.length||!i.length)||(r=e,e=t,t=this,n=xi(e,Ms(e)));var a=!(es(r)&&"chain"in r&&!r.chain),o=Qo(t);return be(n,(function(r){var i=e[r];t[r]=i,o&&(t.prototype[r]=function(){var e=this.__chain__;if(a||e){var r=t(this.__wrapped__),n=r.__actions__=_n(this.__actions__);return n.push({func:i,args:arguments,thisArg:t}),r.__chain__=e,r}return i.apply(t,Se([this.value()],arguments))})})),t}function uc(){}var lc=zn(Ee),hc=zn(Ae),fc=zn(Oe);function pc(t){return ya(t)?De(Da(t)):function(t){return function(e){return Ai(e,t)}}(t)}var dc=jn(),gc=jn(!0);function mc(){return[]}function vc(){return!1}var yc,bc=Vn((function(t,e){return t+e}),0),xc=Hn("ceil"),Ac=Vn((function(t,e){return t/e}),1),wc=Hn("floor"),kc=Vn((function(t,e){return t*e}),1),Cc=Hn("round"),Ec=Vn((function(t,e){return t-e}),0);return Ur.after=function(t,e){if("function"!=typeof e)throw new _t(a);return t=gs(t),function(){if(--t<1)return e.apply(this,arguments)}},Ur.ary=Bo,Ur.assign=xs,Ur.assignIn=As,Ur.assignInWith=ws,Ur.assignWith=ks,Ur.at=Cs,Ur.before=Oo,Ur.bind=Po,Ur.bindAll=tc,Ur.bindKey=To,Ur.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Go(t)?t:[t]},Ur.chain=fo,Ur.chunk=function(t,e,r){e=(r?va(t,e,r):e===n)?1:mr(gs(e),0);var a=null==t?0:t.length;if(!a||e<1)return[];for(var o=0,s=0,c=i(ur(a/e));o<a;)c[s++]=tn(t,o,o+=e);return c},Ur.compact=function(t){for(var e=-1,r=null==t?0:t.length,i=0,n=[];++e<r;){var a=t[e];a&&(n[i++]=a)}return n},Ur.concat=function(){var t=arguments.length;if(!t)return[];for(var e=i(t-1),r=arguments[0],n=t;n--;)e[n-1]=arguments[n];return Se(Go(r)?_n(r):[r],gi(e,1))},Ur.cond=function(t){var e=null==t?0:t.length,r=oa();return t=e?Ee(t,(function(t){if("function"!=typeof t[1])throw new _t(a);return[r(t[0]),t[1]]})):[],Ki((function(r){for(var i=-1;++i<e;){var n=t[i];if(ve(n[0],this,r))return ve(n[1],this,r)}}))},Ur.conforms=function(t){return function(t){var e=Ms(t);return function(r){return si(r,t,e)}}(oi(t,1))},Ur.constant=ec,Ur.countBy=mo,Ur.create=function(t,e){var r=Lr(t);return null==e?r:ri(r,e)},Ur.curry=function t(e,r,i){var a=Yn(e,8,n,n,n,n,n,r=i?n:r);return a.placeholder=t.placeholder,a},Ur.curryRight=function t(e,r,i){var a=Yn(e,16,n,n,n,n,n,r=i?n:r);return a.placeholder=t.placeholder,a},Ur.debounce=Mo,Ur.defaults=Es,Ur.defaultsDeep=Ss,Ur.defer=Io,Ur.delay=Ro,Ur.difference=Va,Ur.differenceBy=za,Ur.differenceWith=Fa,Ur.drop=function(t,e,r){var i=null==t?0:t.length;return i?tn(t,(e=r||e===n?1:gs(e))<0?0:e,i):[]},Ur.dropRight=function(t,e,r){var i=null==t?0:t.length;return i?tn(t,0,(e=i-(e=r||e===n?1:gs(e)))<0?0:e):[]},Ur.dropRightWhile=function(t,e){return t&&t.length?hn(t,oa(e,3),!0,!0):[]},Ur.dropWhile=function(t,e){return t&&t.length?hn(t,oa(e,3),!0):[]},Ur.fill=function(t,e,r,i){var a=null==t?0:t.length;return a?(r&&"number"!=typeof r&&va(t,e,r)&&(r=0,i=a),function(t,e,r,i){var a=t.length;for((r=gs(r))<0&&(r=-r>a?0:a+r),(i=i===n||i>a?a:gs(i))<0&&(i+=a),i=r>i?0:ms(i);r<i;)t[r++]=e;return t}(t,e,r,i)):[]},Ur.filter=function(t,e){return(Go(t)?we:di)(t,oa(e,3))},Ur.flatMap=function(t,e){return gi(Co(t,e),1)},Ur.flatMapDeep=function(t,e){return gi(Co(t,e),l)},Ur.flatMapDepth=function(t,e,r){return r=r===n?1:gs(r),gi(Co(t,e),r)},Ur.flatten=Ga,Ur.flattenDeep=function(t){return null!=t&&t.length?gi(t,l):[]},Ur.flattenDepth=function(t,e){return null!=t&&t.length?gi(t,e=e===n?1:gs(e)):[]},Ur.flip=function(t){return Yn(t,512)},Ur.flow=rc,Ur.flowRight=ic,Ur.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,i={};++e<r;){var n=t[e];i[n[0]]=n[1]}return i},Ur.functions=function(t){return null==t?[]:xi(t,Ms(t))},Ur.functionsIn=function(t){return null==t?[]:xi(t,Is(t))},Ur.groupBy=Ao,Ur.initial=function(t){return null!=t&&t.length?tn(t,0,-1):[]},Ur.intersection=Ka,Ur.intersectionBy=Xa,Ur.intersectionWith=Ya,Ur.invert=Os,Ur.invertBy=Ps,Ur.invokeMap=wo,Ur.iteratee=ac,Ur.keyBy=ko,Ur.keys=Ms,Ur.keysIn=Is,Ur.map=Co,Ur.mapKeys=function(t,e){var r={};return e=oa(e,3),yi(t,(function(t,i,n){ii(r,e(t,i,n),t)})),r},Ur.mapValues=function(t,e){var r={};return e=oa(e,3),yi(t,(function(t,i,n){ii(r,i,e(t,i,n))})),r},Ur.matches=function(t){return Di(oi(t,1))},Ur.matchesProperty=function(t,e){return Ui(t,oi(e,1))},Ur.memoize=No,Ur.merge=Rs,Ur.mergeWith=Ns,Ur.method=oc,Ur.methodOf=sc,Ur.mixin=cc,Ur.negate=qo,Ur.nthArg=function(t){return t=gs(t),Ki((function(e){return Vi(e,t)}))},Ur.omit=qs,Ur.omitBy=function(t,e){return Us(t,qo(oa(e)))},Ur.once=function(t){return Oo(2,t)},Ur.orderBy=function(t,e,r,i){return null==t?[]:(Go(e)||(e=null==e?[]:[e]),Go(r=i?n:r)||(r=null==r?[]:[r]),zi(t,e,r))},Ur.over=lc,Ur.overArgs=Do,Ur.overEvery=hc,Ur.overSome=fc,Ur.partial=Uo,Ur.partialRight=Lo,Ur.partition=Eo,Ur.pick=Ds,Ur.pickBy=Us,Ur.property=pc,Ur.propertyOf=function(t){return function(e){return null==t?n:Ai(t,e)}},Ur.pull=Za,Ur.pullAll=Qa,Ur.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?ji(t,e,oa(r,2)):t},Ur.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?ji(t,e,n,r):t},Ur.pullAt=Ja,Ur.range=dc,Ur.rangeRight=gc,Ur.rearg=Vo,Ur.reject=function(t,e){return(Go(t)?we:di)(t,qo(oa(e,3)))},Ur.remove=function(t,e){var r=[];if(!t||!t.length)return r;var i=-1,n=[],a=t.length;for(e=oa(e,3);++i<a;){var o=t[i];e(o,i,t)&&(r.push(o),n.push(i))}return Wi(t,n),r},Ur.rest=function(t,e){if("function"!=typeof t)throw new _t(a);return Ki(t,e=e===n?e:gs(e))},Ur.reverse=to,Ur.sampleSize=function(t,e,r){return e=(r?va(t,e,r):e===n)?1:gs(e),(Go(t)?$r:Yi)(t,e)},Ur.set=function(t,e,r){return null==t?t:$i(t,e,r)},Ur.setWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:$i(t,e,r,i)},Ur.shuffle=function(t){return(Go(t)?Zr:Ji)(t)},Ur.slice=function(t,e,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&va(t,e,r)?(e=0,r=i):(e=null==e?0:gs(e),r=r===n?i:gs(r)),tn(t,e,r)):[]},Ur.sortBy=So,Ur.sortedUniq=function(t){return t&&t.length?an(t):[]},Ur.sortedUniqBy=function(t,e){return t&&t.length?an(t,oa(e,2)):[]},Ur.split=function(t,e,r){return r&&"number"!=typeof r&&va(t,e,r)&&(e=r=n),(r=r===n?p:r>>>0)?(t=bs(t))&&("string"==typeof e||null!=e&&!os(e))&&!(e=sn(e))&&Qe(t)?bn(ar(t),0,r):t.split(e,r):[]},Ur.spread=function(t,e){if("function"!=typeof t)throw new _t(a);return e=null==e?0:mr(gs(e),0),Ki((function(r){var i=r[e],n=bn(r,0,e);return i&&Se(n,i),ve(t,this,n)}))},Ur.tail=function(t){var e=null==t?0:t.length;return e?tn(t,1,e):[]},Ur.take=function(t,e,r){return t&&t.length?tn(t,0,(e=r||e===n?1:gs(e))<0?0:e):[]},Ur.takeRight=function(t,e,r){var i=null==t?0:t.length;return i?tn(t,(e=i-(e=r||e===n?1:gs(e)))<0?0:e,i):[]},Ur.takeRightWhile=function(t,e){return t&&t.length?hn(t,oa(e,3),!1,!0):[]},Ur.takeWhile=function(t,e){return t&&t.length?hn(t,oa(e,3)):[]},Ur.tap=function(t,e){return e(t),t},Ur.throttle=function(t,e,r){var i=!0,n=!0;if("function"!=typeof t)throw new _t(a);return es(r)&&(i="leading"in r?!!r.leading:i,n="trailing"in r?!!r.trailing:n),Mo(t,e,{leading:i,maxWait:e,trailing:n})},Ur.thru=po,Ur.toArray=ps,Ur.toPairs=Ls,Ur.toPairsIn=Vs,Ur.toPath=function(t){return Go(t)?Ee(t,Da):us(t)?[t]:_n(qa(bs(t)))},Ur.toPlainObject=ys,Ur.transform=function(t,e,r){var i=Go(t),n=i||Yo(t)||ls(t);if(e=oa(e,4),null==r){var a=t&&t.constructor;r=n?i?new a:[]:es(t)&&Qo(a)?Lr(Ht(t)):{}}return(n?be:yi)(t,(function(t,i,n){return e(r,t,i,n)})),r},Ur.unary=function(t){return Bo(t,1)},Ur.union=eo,Ur.unionBy=ro,Ur.unionWith=io,Ur.uniq=function(t){return t&&t.length?cn(t):[]},Ur.uniqBy=function(t,e){return t&&t.length?cn(t,oa(e,2)):[]},Ur.uniqWith=function(t,e){return e="function"==typeof e?e:n,t&&t.length?cn(t,n,e):[]},Ur.unset=function(t,e){return null==t||un(t,e)},Ur.unzip=no,Ur.unzipWith=ao,Ur.update=function(t,e,r){return null==t?t:ln(t,e,mn(r))},Ur.updateWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:ln(t,e,mn(r),i)},Ur.values=zs,Ur.valuesIn=function(t){return null==t?[]:We(t,Is(t))},Ur.without=oo,Ur.words=Qs,Ur.wrap=function(t,e){return Uo(mn(e),t)},Ur.xor=so,Ur.xorBy=co,Ur.xorWith=uo,Ur.zip=lo,Ur.zipObject=function(t,e){return dn(t||[],e||[],Jr)},Ur.zipObjectDeep=function(t,e){return dn(t||[],e||[],$i)},Ur.zipWith=ho,Ur.entries=Ls,Ur.entriesIn=Vs,Ur.extend=As,Ur.extendWith=ws,cc(Ur,Ur),Ur.add=bc,Ur.attempt=Js,Ur.camelCase=Fs,Ur.capitalize=js,Ur.ceil=xc,Ur.clamp=function(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=(r=vs(r))==r?r:0),e!==n&&(e=(e=vs(e))==e?e:0),ai(vs(t),e,r)},Ur.clone=function(t){return oi(t,4)},Ur.cloneDeep=function(t){return oi(t,5)},Ur.cloneDeepWith=function(t,e){return oi(t,5,e="function"==typeof e?e:n)},Ur.cloneWith=function(t,e){return oi(t,4,e="function"==typeof e?e:n)},Ur.conformsTo=function(t,e){return null==e||si(t,e,Ms(e))},Ur.deburr=Ws,Ur.defaultTo=function(t,e){return null==t||t!=t?e:t},Ur.divide=Ac,Ur.endsWith=function(t,e,r){t=bs(t),e=sn(e);var i=t.length,a=r=r===n?i:ai(gs(r),0,i);return(r-=e.length)>=0&&t.slice(r,a)==e},Ur.eq=zo,Ur.escape=function(t){return(t=bs(t))&&X.test(t)?t.replace(H,$e):t},Ur.escapeRegExp=function(t){return(t=bs(t))&&rt.test(t)?t.replace(et,"\\$&"):t},Ur.every=function(t,e,r){var i=Go(t)?Ae:fi;return r&&va(t,e,r)&&(e=n),i(t,oa(e,3))},Ur.find=vo,Ur.findIndex=ja,Ur.findKey=function(t,e){return Te(t,oa(e,3),yi)},Ur.findLast=yo,Ur.findLastIndex=Wa,Ur.findLastKey=function(t,e){return Te(t,oa(e,3),bi)},Ur.floor=wc,Ur.forEach=bo,Ur.forEachRight=xo,Ur.forIn=function(t,e){return null==t?t:mi(t,oa(e,3),Is)},Ur.forInRight=function(t,e){return null==t?t:vi(t,oa(e,3),Is)},Ur.forOwn=function(t,e){return t&&yi(t,oa(e,3))},Ur.forOwnRight=function(t,e){return t&&bi(t,oa(e,3))},Ur.get=_s,Ur.gt=Fo,Ur.gte=jo,Ur.has=function(t,e){return null!=t&&pa(t,e,Ei)},Ur.hasIn=Bs,Ur.head=Ha,Ur.identity=nc,Ur.includes=function(t,e,r,i){t=Ko(t)?t:zs(t),r=r&&!i?gs(r):0;var n=t.length;return r<0&&(r=mr(n+r,0)),cs(t)?r<=n&&t.indexOf(e,r)>-1:!!n&&Ie(t,e,r)>-1},Ur.indexOf=function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var n=null==r?0:gs(r);return n<0&&(n=mr(i+n,0)),Ie(t,e,n)},Ur.inRange=function(t,e,r){return e=ds(e),r===n?(r=e,e=0):r=ds(r),function(t,e,r){return t>=vr(e,r)&&t<mr(e,r)}(t=vs(t),e,r)},Ur.invoke=Ts,Ur.isArguments=Wo,Ur.isArray=Go,Ur.isArrayBuffer=Ho,Ur.isArrayLike=Ko,Ur.isArrayLikeObject=Xo,Ur.isBoolean=function(t){return!0===t||!1===t||rs(t)&&ki(t)==v},Ur.isBuffer=Yo,Ur.isDate=$o,Ur.isElement=function(t){return rs(t)&&1===t.nodeType&&!as(t)},Ur.isEmpty=function(t){if(null==t)return!0;if(Ko(t)&&(Go(t)||"string"==typeof t||"function"==typeof t.splice||Yo(t)||ls(t)||Wo(t)))return!t.length;var e=fa(t);if(e==w||e==_)return!t.size;if(Aa(t))return!Ri(t).length;for(var r in t)if(It.call(t,r))return!1;return!0},Ur.isEqual=function(t,e){return Pi(t,e)},Ur.isEqualWith=function(t,e,r){var i=(r="function"==typeof r?r:n)?r(t,e):n;return i===n?Pi(t,e,n,r):!!i},Ur.isError=Zo,Ur.isFinite=function(t){return"number"==typeof t&&pr(t)},Ur.isFunction=Qo,Ur.isInteger=Jo,Ur.isLength=ts,Ur.isMap=is,Ur.isMatch=function(t,e){return t===e||Ti(t,e,ca(e))},Ur.isMatchWith=function(t,e,r){return r="function"==typeof r?r:n,Ti(t,e,ca(e),r)},Ur.isNaN=function(t){return ns(t)&&t!=+t},Ur.isNative=function(t){if(xa(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mi(t)},Ur.isNil=function(t){return null==t},Ur.isNull=function(t){return null===t},Ur.isNumber=ns,Ur.isObject=es,Ur.isObjectLike=rs,Ur.isPlainObject=as,Ur.isRegExp=os,Ur.isSafeInteger=function(t){return Jo(t)&&t>=-9007199254740991&&t<=h},Ur.isSet=ss,Ur.isString=cs,Ur.isSymbol=us,Ur.isTypedArray=ls,Ur.isUndefined=function(t){return t===n},Ur.isWeakMap=function(t){return rs(t)&&fa(t)==P},Ur.isWeakSet=function(t){return rs(t)&&"[object WeakSet]"==ki(t)},Ur.join=function(t,e){return null==t?"":dr.call(t,e)},Ur.kebabCase=Gs,Ur.last=$a,Ur.lastIndexOf=function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var a=i;return r!==n&&(a=(a=gs(r))<0?mr(i+a,0):vr(a,i-1)),e==e?function(t,e,r){for(var i=r+1;i--;)if(t[i]===e)return i;return i}(t,e,a):Me(t,Ne,a,!0)},Ur.lowerCase=Hs,Ur.lowerFirst=Ks,Ur.lt=hs,Ur.lte=fs,Ur.max=function(t){return t&&t.length?pi(t,nc,Ci):n},Ur.maxBy=function(t,e){return t&&t.length?pi(t,oa(e,2),Ci):n},Ur.mean=function(t){return qe(t,nc)},Ur.meanBy=function(t,e){return qe(t,oa(e,2))},Ur.min=function(t){return t&&t.length?pi(t,nc,Ni):n},Ur.minBy=function(t,e){return t&&t.length?pi(t,oa(e,2),Ni):n},Ur.stubArray=mc,Ur.stubFalse=vc,Ur.stubObject=function(){return{}},Ur.stubString=function(){return""},Ur.stubTrue=function(){return!0},Ur.multiply=kc,Ur.nth=function(t,e){return t&&t.length?Vi(t,gs(e)):n},Ur.noConflict=function(){return ae._===this&&(ae._=Ut),this},Ur.noop=uc,Ur.now=_o,Ur.pad=function(t,e,r){t=bs(t);var i=(e=gs(e))?nr(t):0;if(!e||i>=e)return t;var n=(e-i)/2;return Fn(lr(n),r)+t+Fn(ur(n),r)},Ur.padEnd=function(t,e,r){t=bs(t);var i=(e=gs(e))?nr(t):0;return e&&i<e?t+Fn(e-i,r):t},Ur.padStart=function(t,e,r){t=bs(t);var i=(e=gs(e))?nr(t):0;return e&&i<e?Fn(e-i,r)+t:t},Ur.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),br(bs(t).replace(it,""),e||0)},Ur.random=function(t,e,r){if(r&&"boolean"!=typeof r&&va(t,e,r)&&(e=r=n),r===n&&("boolean"==typeof e?(r=e,e=n):"boolean"==typeof t&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=ds(t),e===n?(e=t,t=0):e=ds(e)),t>e){var i=t;t=e,e=i}if(r||t%1||e%1){var a=xr();return vr(t+a*(e-t+ee("1e-"+((a+"").length-1))),e)}return Gi(t,e)},Ur.reduce=function(t,e,r){var i=Go(t)?_e:Le,n=arguments.length<3;return i(t,oa(e,4),r,n,li)},Ur.reduceRight=function(t,e,r){var i=Go(t)?Be:Le,n=arguments.length<3;return i(t,oa(e,4),r,n,hi)},Ur.repeat=function(t,e,r){return e=(r?va(t,e,r):e===n)?1:gs(e),Hi(bs(t),e)},Ur.replace=function(){var t=arguments,e=bs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Ur.result=function(t,e,r){var i=-1,a=(e=vn(e,t)).length;for(a||(a=1,t=n);++i<a;){var o=null==t?n:t[Da(e[i])];o===n&&(i=a,o=r),t=Qo(o)?o.call(t):o}return t},Ur.round=Cc,Ur.runInContext=t,Ur.sample=function(t){return(Go(t)?Yr:Xi)(t)},Ur.size=function(t){if(null==t)return 0;if(Ko(t))return cs(t)?nr(t):t.length;var e=fa(t);return e==w||e==_?t.size:Ri(t).length},Ur.snakeCase=Xs,Ur.some=function(t,e,r){var i=Go(t)?Oe:en;return r&&va(t,e,r)&&(e=n),i(t,oa(e,3))},Ur.sortedIndex=function(t,e){return rn(t,e)},Ur.sortedIndexBy=function(t,e,r){return nn(t,e,oa(r,2))},Ur.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var i=rn(t,e);if(i<r&&zo(t[i],e))return i}return-1},Ur.sortedLastIndex=function(t,e){return rn(t,e,!0)},Ur.sortedLastIndexBy=function(t,e,r){return nn(t,e,oa(r,2),!0)},Ur.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=rn(t,e,!0)-1;if(zo(t[r],e))return r}return-1},Ur.startCase=Ys,Ur.startsWith=function(t,e,r){return t=bs(t),r=null==r?0:ai(gs(r),0,t.length),e=sn(e),t.slice(r,r+e.length)==e},Ur.subtract=Ec,Ur.sum=function(t){return t&&t.length?Ve(t,nc):0},Ur.sumBy=function(t,e){return t&&t.length?Ve(t,oa(e,2)):0},Ur.template=function(t,e,r){var i=Ur.templateSettings;r&&va(t,e,r)&&(e=n),t=bs(t),e=ws({},e,i,$n);var a,o,s=ws({},e.imports,i.imports,$n),c=Ms(s),u=We(s,c),l=0,h=e.interpolate||bt,f="__p += '",p=Et((e.escape||bt).source+"|"+h.source+"|"+(h===Z?ht:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),d="//# sourceURL="+(It.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zt+"]")+"\n";t.replace(p,(function(e,r,i,n,s,c){return i||(i=n),f+=t.slice(l,c).replace(xt,Ze),r&&(a=!0,f+="' +\n__e("+r+") +\n'"),s&&(o=!0,f+="';\n"+s+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),f+="';\n";var g=It.call(e,"variable")&&e.variable;if(g){if(ut.test(g))throw new At("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(o?f.replace(F,""):f).replace(j,"$1").replace(W,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Js((function(){return wt(c,d+"return "+f).apply(n,u)}));if(m.source=f,Zo(m))throw m;return m},Ur.times=function(t,e){if((t=gs(t))<1||t>h)return[];var r=p,i=vr(t,p);e=oa(e),t-=p;for(var n=ze(i,e);++r<t;)e(r);return n},Ur.toFinite=ds,Ur.toInteger=gs,Ur.toLength=ms,Ur.toLower=function(t){return bs(t).toLowerCase()},Ur.toNumber=vs,Ur.toSafeInteger=function(t){return t?ai(gs(t),-9007199254740991,h):0===t?t:0},Ur.toString=bs,Ur.toUpper=function(t){return bs(t).toUpperCase()},Ur.trim=function(t,e,r){if((t=bs(t))&&(r||e===n))return Fe(t);if(!t||!(e=sn(e)))return t;var i=ar(t),a=ar(e);return bn(i,He(i,a),Ke(i,a)+1).join("")},Ur.trimEnd=function(t,e,r){if((t=bs(t))&&(r||e===n))return t.slice(0,or(t)+1);if(!t||!(e=sn(e)))return t;var i=ar(t);return bn(i,0,Ke(i,ar(e))+1).join("")},Ur.trimStart=function(t,e,r){if((t=bs(t))&&(r||e===n))return t.replace(it,"");if(!t||!(e=sn(e)))return t;var i=ar(t);return bn(i,He(i,ar(e))).join("")},Ur.truncate=function(t,e){var r=30,i="...";if(es(e)){var a="separator"in e?e.separator:a;r="length"in e?gs(e.length):r,i="omission"in e?sn(e.omission):i}var o=(t=bs(t)).length;if(Qe(t)){var s=ar(t);o=s.length}if(r>=o)return t;var c=r-nr(i);if(c<1)return i;var u=s?bn(s,0,c).join(""):t.slice(0,c);if(a===n)return u+i;if(s&&(c+=u.length-c),os(a)){if(t.slice(c).search(a)){var l,h=u;for(a.global||(a=Et(a.source,bs(ft.exec(a))+"g")),a.lastIndex=0;l=a.exec(h);)var f=l.index;u=u.slice(0,f===n?c:f)}}else if(t.indexOf(sn(a),c)!=c){var p=u.lastIndexOf(a);p>-1&&(u=u.slice(0,p))}return u+i},Ur.unescape=function(t){return(t=bs(t))&&K.test(t)?t.replace(G,sr):t},Ur.uniqueId=function(t){var e=++Rt;return bs(t)+e},Ur.upperCase=$s,Ur.upperFirst=Zs,Ur.each=bo,Ur.eachRight=xo,Ur.first=Ha,cc(Ur,(yc={},yi(Ur,(function(t,e){It.call(Ur.prototype,e)||(yc[e]=t)})),yc),{chain:!1}),Ur.VERSION="4.17.21",be(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Ur[t].placeholder=Ur})),be(["drop","take"],(function(t,e){Fr.prototype[t]=function(r){r=r===n?1:mr(gs(r),0);var i=this.__filtered__&&!e?new Fr(this):this.clone();return i.__filtered__?i.__takeCount__=vr(r,i.__takeCount__):i.__views__.push({size:vr(r,p),type:t+(i.__dir__<0?"Right":"")}),i},Fr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),be(["filter","map","takeWhile"],(function(t,e){var r=e+1,i=1==r||3==r;Fr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oa(t,3),type:r}),e.__filtered__=e.__filtered__||i,e}})),be(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Fr.prototype[t]=function(){return this[r](1).value()[0]}})),be(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Fr.prototype[t]=function(){return this.__filtered__?new Fr(this):this[r](1)}})),Fr.prototype.compact=function(){return this.filter(nc)},Fr.prototype.find=function(t){return this.filter(t).head()},Fr.prototype.findLast=function(t){return this.reverse().find(t)},Fr.prototype.invokeMap=Ki((function(t,e){return"function"==typeof t?new Fr(this):this.map((function(r){return Bi(r,t,e)}))})),Fr.prototype.reject=function(t){return this.filter(qo(oa(t)))},Fr.prototype.slice=function(t,e){t=gs(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Fr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(r=(e=gs(e))<0?r.dropRight(-e):r.take(e-t)),r)},Fr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Fr.prototype.toArray=function(){return this.take(p)},yi(Fr.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),a=Ur[i?"take"+("last"==e?"Right":""):e],o=i||/^find/.test(e);a&&(Ur.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,c=e instanceof Fr,u=s[0],l=c||Go(e),h=function(t){var e=a.apply(Ur,Se([t],s));return i&&f?e[0]:e};l&&r&&"function"==typeof u&&1!=u.length&&(c=l=!1);var f=this.__chain__,p=!!this.__actions__.length,d=o&&!f,g=c&&!p;if(!o&&l){e=g?e:new Fr(this);var m=t.apply(e,s);return m.__actions__.push({func:po,args:[h],thisArg:n}),new zr(m,f)}return d&&g?t.apply(this,s):(m=this.thru(h),d?i?m.value()[0]:m.value():m)})})),be(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Bt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);Ur.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var n=this.value();return e.apply(Go(n)?n:[],t)}return this[r]((function(r){return e.apply(Go(r)?r:[],t)}))}})),yi(Fr.prototype,(function(t,e){var r=Ur[e];if(r){var i=r.name+"";It.call(Or,i)||(Or[i]=[]),Or[i].push({name:e,func:r})}})),Or[Un(n,2).name]=[{name:"wrapper",func:n}],Fr.prototype.clone=function(){var t=new Fr(this.__wrapped__);return t.__actions__=_n(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=_n(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=_n(this.__views__),t},Fr.prototype.reverse=function(){if(this.__filtered__){var t=new Fr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Fr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Go(t),i=e<0,n=r?t.length:0,a=function(t,e,r){for(var i=-1,n=r.length;++i<n;){var a=r[i],o=a.size;switch(a.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=vr(e,t+o);break;case"takeRight":t=mr(t,e-o)}}return{start:t,end:e}}(0,n,this.__views__),o=a.start,s=a.end,c=s-o,u=i?s:o-1,l=this.__iteratees__,h=l.length,f=0,p=vr(c,this.__takeCount__);if(!r||!i&&n==c&&p==c)return fn(t,this.__actions__);var d=[];t:for(;c--&&f<p;){for(var g=-1,m=t[u+=e];++g<h;){var v=l[g],y=v.iteratee,b=v.type,x=y(m);if(2==b)m=x;else if(!x){if(1==b)continue t;break t}}d[f++]=m}return d},Ur.prototype.at=go,Ur.prototype.chain=function(){return fo(this)},Ur.prototype.commit=function(){return new zr(this.value(),this.__chain__)},Ur.prototype.next=function(){this.__values__===n&&(this.__values__=ps(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},Ur.prototype.plant=function(t){for(var e,r=this;r instanceof Vr;){var i=La(r);i.__index__=0,i.__values__=n,e?a.__wrapped__=i:e=i;var a=i;r=r.__wrapped__}return a.__wrapped__=t,e},Ur.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Fr){var e=t;return this.__actions__.length&&(e=new Fr(this)),(e=e.reverse()).__actions__.push({func:po,args:[to],thisArg:n}),new zr(e,this.__chain__)}return this.thru(to)},Ur.prototype.toJSON=Ur.prototype.valueOf=Ur.prototype.value=function(){return fn(this.__wrapped__,this.__actions__)},Ur.prototype.first=Ur.prototype.head,oe&&(Ur.prototype[oe]=function(){return this}),Ur}();ae._=cr,(i=function(){return cr}.call(e,r,e,t))===n||(t.exports=i)}.call(this)},379:t=>{"use strict";var e=[];function r(t){for(var r=-1,i=0;i<e.length;i++)if(e[i].identifier===t){r=i;break}return r}function i(t,i){for(var a={},o=[],s=0;s<t.length;s++){var c=t[s],u=i.base?c[0]+i.base:c[0],l=a[u]||0,h="".concat(u," ").concat(l);a[u]=l+1;var f=r(h),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==f)e[f].references++,e[f].updater(p);else{var d=n(p,i);i.byIndex=s,e.splice(s,0,{identifier:h,updater:d,references:1})}o.push(h)}return o}function n(t,e){var r=e.domAPI(e);return r.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,n){var a=i(t=t||[],n=n||{});return function(t){t=t||[];for(var o=0;o<a.length;o++){var s=r(a[o]);e[s].references--}for(var c=i(t,n),u=0;u<a.length;u++){var l=r(a[u]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}a=c}}},569:t=>{"use strict";var e={};t.exports=function(t,r){var i=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(r)}},216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,r)=>{"use strict";t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},795:t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var i="";r.supports&&(i+="@supports (".concat(r.supports,") {")),r.media&&(i+="@media ".concat(r.media," {"));var n=void 0!==r.layer;n&&(i+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),i+=r.css,n&&(i+="}"),r.media&&(i+="}"),r.supports&&(i+="}");var a=r.sourceMap;a&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},877:(t,e,r)=>{var i=r(570),n=r(171),a=n;a.v1=i,a.v4=n,t.exports=a},327:t=>{for(var e=[],r=0;r<256;++r)e[r]=(r+256).toString(16).substr(1);t.exports=function(t,r){var i=r||0,n=e;return[n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]]].join("")}},217:t=>{var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r}}else{var i=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}}},570:(t,e,r)=>{var i,n,a=r(217),o=r(327),s=0,c=0;t.exports=function(t,e,r){var u=e&&r||0,l=e||[],h=(t=t||{}).node||i,f=void 0!==t.clockseq?t.clockseq:n;if(null==h||null==f){var p=a();null==h&&(h=i=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=n=16383&(p[6]<<8|p[7]))}var d=void 0!==t.msecs?t.msecs:(new Date).getTime(),g=void 0!==t.nsecs?t.nsecs:c+1,m=d-s+(g-c)/1e4;if(m<0&&void 0===t.clockseq&&(f=f+1&16383),(m<0||d>s)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=d,c=g,n=f;var v=(1e4*(268435455&(d+=122192928e5))+g)%4294967296;l[u++]=v>>>24&255,l[u++]=v>>>16&255,l[u++]=v>>>8&255,l[u++]=255&v;var y=d/4294967296*1e4&268435455;l[u++]=y>>>8&255,l[u++]=255&y,l[u++]=y>>>24&15|16,l[u++]=y>>>16&255,l[u++]=f>>>8|128,l[u++]=255&f;for(var b=0;b<6;++b)l[u+b]=h[b];return e||o(l)}},171:(t,e,r)=>{var i=r(217),n=r(327);t.exports=function(t,e,r){var a=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var s=0;s<16;++s)e[a+s]=o[s];return e||n(o)}},133:(t,e,r)=>{"use strict";t.exports=r.p+"a9725bf94df04c757ec7.svg"},45:(t,e,r)=>{"use strict";t.exports=r.p+"4b270364a62cd4aff906.svg"},561:(t,e,r)=>{"use strict";t.exports=r.p+"eefa2679ba9773006be3.svg"},207:(t,e,r)=>{"use strict";t.exports=r.p+"827243e05e4282ca675b.svg"}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var a=e[i]={id:i,loaded:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.m=t,r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},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=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");i.length&&(t=i[i.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})(),r.b=document.baseURI||self.location.href,(()=>{"use strict";var t=r(379),e=r.n(t),i=r(795),n=r.n(i),a=r(569),o=r.n(a),s=r(565),c=r.n(s),u=r(216),l=r.n(u),h=r(589),f=r.n(h),p=r(475),d={};d.styleTagTransform=f(),d.setAttributes=c(),d.insert=o().bind(null,"head"),d.domAPI=n(),d.insertStyleElement=l(),e()(p.Z,d),p.Z&&p.Z.locals&&p.Z.locals,r(415),r(622),r(787),r(317),window.kity;var g=window.kf;function m(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var v=function(){function t(e){var r=this,i=e.id,n=e.path,a=e.container,o=e.options;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var s=document.getElementById(i);if(s)return s.KFEditor;"complete"===document.readyState?this.init(i,n,a,o):window.addEventListener("load",(function(){r.init(i,n,a,o)}))}var e,r;return e=t,r=[{key:"init",value:function(t,e,r,i){var n=this;r?"string"==typeof r?(this.container=document.querySelector(r),this.container||(this.container=document.body)):this.container=r:this.container=document.body,this.width=i&&i.width?i.width:window.innerWidth,this.zIndex=i&&i.zIndex?i.zIndex:2147483584,this.mode=i&&i.mode?i.mode:"android",this.isBottom=!i||void 0===i.bottom||!!i.bottom,this.editor=document.getElementById(t),this.editor||(this.editor=document.createElement("div"),this.editor.className="kf-editor",this.editor.style.visibility="hidden",this.editor.id=t,this.container.append(this.editor)),this.placeholder=document.getElementById("kfPlaceholder"),this.placeholder||(this.placeholder=document.createElement("div"),this.placeholder.className="kf-placeholder",this.placeholder.id="kfPlaceholder",this.container.append(this.placeholder)),g.EditorFactory.create(document.getElementById(t),{render:{fontsize:50*(this.width/1920).toFixed(3)},ui:{device:this.mode,scale:(this.width/1920).toFixed(3),protocol:"documentEvent"},resource:{path:e||"/"}}).ready((function(t){n.editor.KFEditor=t,t.execCommand("render","\\placeholder"),t.execCommand("focus"),t.execCommand("ready");var e=".kf-editor {\n transform: ".concat(n.isBottom?"translateY(100%)":"none",";\n transition: all .5s;\n width: ").concat(n.width,"px;\n z-index: ").concat(n.zIndex,";\n visibility: ").concat(n.isBottom?"hidden":"visible",";\n }\n .kf-placeholder{\n height: 0;\n width: 100%;\n }\n "),r=document.head,i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),r.appendChild(i),n.kfe=t,window.dispatchEvent(new CustomEvent("kfe-ready"))}))}},{key:"show",value:function(t){t&&this.set(t),this.placeholder.style.height=this.kfe.container.style.height,this.editor.style.transform="translateY(0)",this.editor.style.visibility="visible"}},{key:"hide",value:function(){this.placeholder.style.height="0",this.editor.style.transform="translateY(100%)"}},{key:"clear",value:function(){var t=new CustomEvent("documentMessage",{detail:{type:"common.clearFormula",headers:{reqId:2},data:{body:{}}}});document.dispatchEvent(t)}},{key:"set",value:function(t){var e=new CustomEvent("documentMessage",{detail:{type:"common.readFormula",headers:{reqId:1},data:{body:{formula:t}}}});document.dispatchEvent(e)}}],r&&m(e.prototype,r),t}();window.FormulaBoard=v})()})(); //# sourceMappingURL=formula-board.js.map