Add leaui mind map plugin

This commit is contained in:
lealife committed 2017-01-23 17:43:13 +08:00
1 parent 956e1ba2bb
commit f3e1eb6c3f
93 files changed
+64559 -220

No files matched your search

@@ -0,0 +1,22 @@
!function(window){function getMetaKeyCode(t){var e=4096,n=8192,i=16384,r=0;return"string"==typeof t?t.toLowerCase().split(/\+\s*/).forEach(function(t){switch(t){case"ctrl":case"cmd":r|=e;break;case"alt":r|=n;break;case"shift":r|=i;break;default:r|=keymap[t]}}):((t.ctrlKey||t.metaKey)&&(r|=e),t.altKey&&(r|=n),t.shiftKey&&(r|=i),r|=t.keyCode),r}function updateCircle(t,e,n){var i=e.getStyle("padding-left"),r=e.getStyle("padding-right"),o=e.getStyle("padding-top"),a=e.getStyle("padding-bottom"),s=Math.max(n.width,n.height),l={x:n.x-i,y:n.y-o,width:s+i+r,height:s+o+a},u=e.isSelected()?"selected-":"";return s=Math.max(l.width,l.height),t.setPosition(l.x,l.y).setSize(s,s).setRadius(s/2).fill(e.getData("background")||e.getStyle(u+"background")||e.getStyle("background")).stroke(e.getStyle(u+"stroke"||e.getStyle("stroke")),e.getStyle(u+"stroke-width")),new kity.Box(l)}function asc(t,e){return t.getIndex()-e.getIndex()}function desc(t,e){return-asc(t,e)}function canArrange(t){var e=t.getSelectedNode();return e&&e.parent&&e.parent.children.length>1}!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=t.length,n=Z.type(t);return"function"===n||Z.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function i(t,e,n){if(Z.isFunction(e))return Z.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return Z.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(se.test(e))return Z.filter(e,t,n);e=Z.filter(e,t)}return Z.grep(t,function(t){return q.call(e,t)>=0!==n})}function r(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function o(t){var e=pe[t]={};return Z.each(t.match(fe)||[],function(t,n){e[n]=!0}),e}function a(){Q.removeEventListener("DOMContentLoaded",a,!1),t.removeEventListener("load",a,!1),Z.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+Math.random()}function l(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(be,"-$1").toLowerCase(),n=t.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:_e.test(n)?Z.parseJSON(n):n}catch(r){}ye.set(t,e,n)}else n=void 0;return n}function u(){return!0}function c(){return!1}function h(){try{return Q.activeElement}catch(t){}}function d(t,e){return Z.nodeName(t,"table")&&Z.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function f(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function p(t){var e=Be.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function g(t,e){for(var n=0,i=t.length;i>n;n++)ve.set(t[n],"globalEval",!e||ve.get(e[n],"globalEval"))}function m(t,e){var n,i,r,o,a,s,l,u;if(1===e.nodeType){if(ve.hasData(t)&&(o=ve.access(t),a=ve.set(e,o),u=o.events)){delete a.handle,a.events={};for(r in u)for(n=0,i=u[r].length;i>n;n++)Z.event.add(e,r,u[r][n])}ye.hasData(t)&&(s=ye.access(t),l=Z.extend({},s),ye.set(e,l))}}function v(t,e){var n=t.getElementsByTagName?t.getElementsByTagName(e||"*"):t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&Z.nodeName(t,e)?Z.merge([t],n):n}function y(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Ce.test(t.type)?e.checked=t.checked:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}function _(e,n){var i,r=Z(n.createElement(e)).appendTo(n.body),o=t.getDefaultComputedStyle&&(i=t.getDefaultComputedStyle(r[0]))?i.display:Z.css(r[0],"display");return r.detach(),o}function b(t){var e=Q,n=Ve[t];return n||(n=_(t,e),"none"!==n&&n||(He=(He||Z("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=He[0].contentDocument,e.write(),e.close(),n=_(t,e),He.detach()),Ve[t]=n),n}function x(t,e,n){var i,r,o,a,s=t.style;return n=n||je(t),n&&(a=n.getPropertyValue(e)||n[e]),n&&(""!==a||Z.contains(t.ownerDocument,t)||(a=Z.style(t,e)),Fe.test(a)&&ze.test(e)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function w(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function k(t,e){if(e in t)return e;for(var n=e[0].toUpperCase()+e.slice(1),i=e,r=Xe.length;r--;)if(e=Xe[r]+n,e in t)return e;return i}function C(t,e,n){var i=Ke.exec(e);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):e}function S(t,e,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===e?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=Z.css(t,n+we[o],!0,r)),i?("content"===n&&(a-=Z.css(t,"padding"+we[o],!0,r)),"margin"!==n&&(a-=Z.css(t,"border"+we[o]+"Width",!0,r))):(a+=Z.css(t,"padding"+we[o],!0,r),"padding"!==n&&(a+=Z.css(t,"border"+we[o]+"Width",!0,r)));return a}function T(t,e,n){var i=!0,r="width"===e?t.offsetWidLine truncated
}),x.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){return n||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(ne,function(t,e,n){var i;return n?void 0:t[e]===!0?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);Z.find=re,Z.expr=re.selectors,Z.expr[":"]=Z.expr.pseudos,Z.unique=re.uniqueSort,Z.text=re.getText,Z.isXMLDoc=re.isXML,Z.contains=re.contains;var oe=Z.expr.match.needsContext,ae=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,se=/^.[^:#\[\.,]*$/;Z.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?Z.find.matchesSelector(i,t)?[i]:[]:Z.find.matches(t,Z.grep(e,function(t){return 1===t.nodeType}))},Z.fn.extend({find:function(t){var e,n=this.length,i=[],r=this;if("string"!=typeof t)return this.pushStack(Z(t).filter(function(){for(e=0;n>e;e++)if(Z.contains(r[e],this))return!0}));for(e=0;n>e;e++)Z.find(t,r[e],i);return i=this.pushStack(n>1?Z.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&oe.test(t)?Z(t):t||[],!1).length}});var le,ue=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ce=Z.fn.init=function(t,e){var n,i;if(!t)return this;if("string"==typeof t){if(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:ue.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||le).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof Z?e[0]:e,Z.merge(this,Z.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:Q,!0)),ae.test(n[1])&&Z.isPlainObject(e))for(n in e)Z.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return i=Q.getElementById(n[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=Q,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):Z.isFunction(t)?"undefined"!=typeof le.ready?le.ready(t):t(Z):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),Z.makeArray(t,this))};ce.prototype=Z.fn,le=Z(Q);var he=/^(?:parents|prev(?:Until|All))/,de={children:!0,contents:!0,next:!0,prev:!0};Z.extend({dir:function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&Z(t).is(n))break;i.push(t)}return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}}),Z.fn.extend({has:function(t){var e=Z(t,this),n=e.length;return this.filter(function(){for(var t=0;n>t;t++)if(Z.contains(this,e[t]))return!0})},closest:function(t,e){for(var n,i=0,r=this.length,o=[],a=oe.test(t)||"string"!=typeof t?Z(t,e||this.context):0;r>i;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&Z.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?Z.unique(o):o)},index:function(t){return t?"string"==typeof t?q.call(Z(t),this[0]):q.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(Z.unique(Z.merge(this.get(),Z(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),Z.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Z.dir(t,"parentNode")},parentsUntil:function(t,e,n){return Z.dir(t,"parentNode",n)},next:function(t){return r(t,"nextSibling")},prev:function(t){return r(t,"previousSibling")},nextAll:function(t){return Z.dir(t,"nextSibling")},prevAll:function(t){return Z.dir(t,"previousSibling")},nextUntil:function(t,e,n){return Z.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return Z.dir(t,"previousSibling",n)},siblings:function(t){return Z.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return Z.sibling(t.firstChild)},contents:function(t){return t.contentDocument||Z.merge([],t.childNodes)}},function(t,e){Z.fn[t]=function(n,i){var r=Z.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=Z.filter(i,r)),this.length>1&&(de[t]||Z.unique(r),he.test(t)&&r.reverse()),this.pushStack(r)}});var fe=/\S+/g,pe={};Z.Callbacks=function(t){t="string"==typeof t?pe[t]||o(t):Z.extend({},t);var e,n,i,r,a,s,l=[],u=!t.once&&[],c=function(o){for(e=t.memory&&o,n=!0,s=r||0,r=0,a=l.length,i=!0;l&&a>s;s++)if(l[s].apply(o[0],o[1])===!1&&t.stopOnFalse){e=!1;break}i=!1,l&&(u?u.length&&c(u.shift()):e?l=[]:h.disable())},h={add:function(){if(l){var n=l.length;!function o(e){Z.each(e,function(e,n){var i=Z.type(n);"function"===i?t.unique&&h.has(n)||l.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),i?a=l.length:e&&(r=n,c(e))}return this},remove:function(){return l&&Z.each(arguments,function(t,e){for(var n;(n=Z.inArray(e,l,n))>-1;)l.splice(n,1),i&&(a>=n&&a--,s>=n&&s--)}),this},has:function(t){return t?Z.inArray(t,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,thLine truncated
(r||ve.get(this,"finish"))&&e.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=Z.timers,a=ve.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&tn.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));(e||!n)&&Z.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=ve.get(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=Z.timers,a=i?i.length:0;for(n.finish=!0,Z.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;a>e;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),Z.each(["toggle","show","hide"],function(t,e){var n=Z.fn[e];Z.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(N(e,!0),t,i,r)}}),Z.each({slideDown:N("show"),slideUp:N("hide"),slideToggle:N("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){Z.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),Z.timers=[],Z.fx.tick=function(){var t,e=0,n=Z.timers;for(Ye=Z.now();e<n.length;e++)t=n[e],t()||n[e]!==t||n.splice(e--,1);n.length||Z.fx.stop(),Ye=void 0},Z.fx.timer=function(t){Z.timers.push(t),t()?Z.fx.start():Z.timers.pop()},Z.fx.interval=13,Z.fx.start=function(){Qe||(Qe=setInterval(Z.fx.tick,Z.fx.interval))},Z.fx.stop=function(){clearInterval(Qe),Qe=null},Z.fx.speeds={slow:600,fast:200,_default:400},Z.fn.delay=function(t,e){return t=Z.fx?Z.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,n){var i=setTimeout(e,t);n.stop=function(){clearTimeout(i)}})},function(){var t=Q.createElement("input"),e=Q.createElement("select"),n=e.appendChild(Q.createElement("option"));t.type="checkbox",Y.checkOn=""!==t.value,Y.optSelected=n.selected,e.disabled=!0,Y.optDisabled=!n.disabled,t=Q.createElement("input"),t.value="t",t.type="radio",Y.radioValue="t"===t.value}();var rn,on,an=Z.expr.attrHandle;Z.fn.extend({attr:function(t,e){return me(this,Z.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){Z.removeAttr(this,t)})}}),Z.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return typeof t.getAttribute===Se?Z.prop(t,e,n):(1===o&&Z.isXMLDoc(t)||(e=e.toLowerCase(),i=Z.attrHooks[e]||(Z.expr.match.bool.test(e)?on:rn)),void 0===n?i&&"get"in i&&null!==(r=i.get(t,e))?r:(r=Z.find.attr(t,e),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):void Z.removeAttr(t,e))},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(fe);if(o&&1===t.nodeType)for(;n=o[r++];)i=Z.propFix[n]||n,Z.expr.match.bool.test(n)&&(t[i]=!1),t.removeAttribute(n)},attrHooks:{type:{set:function(t,e){if(!Y.radioValue&&"radio"===e&&Z.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),on={set:function(t,e,n){return e===!1?Z.removeAttr(t,n):t.setAttribute(n,n),n}},Z.each(Z.expr.match.bool.source.match(/\w+/g),function(t,e){var n=an[e]||Z.find.attr;an[e]=function(t,e,i){var r,o;return i||(o=an[e],an[e]=r,r=null!=n(t,e,i)?e.toLowerCase():null,an[e]=o),r}});var sn=/^(?:input|select|textarea|button)$/i;Z.fn.extend({prop:function(t,e){return me(this,Z.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[Z.propFix[t]||t]})}}),Z.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(t,e,n){var i,r,o,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return o=1!==a||!Z.isXMLDoc(t),o&&(e=Z.propFix[e]||e,r=Z.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||sn.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),Y.optSelected||(Z.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),Z.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Z.propFix[this.toLowerCase()]=this});var ln=/[\t\r\n\f]/g;Z.fn.extend({addClass:function(t){var e,n,i,r,o,a,s="string"==typeof t&&t,l=0,u=this.length;if(Z.isFunction(t))return this.each(function(e){Z(this).addClass(t.call(this,e,this.className))});if(s)for(e=(t||"").match(fe)||[];u>l;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ln," "):" ")){for(o=0;r=e[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=Z.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(t){var e,n,i,r,o,a,s=0===arguments.length||"string"==typeof t&&t,l=0,u=this.length;if(Z.isFunction(t))return this.each(function(e){Z(this).removeClass(t.call(this,e,this.className))});if(s)fLine truncated
this.setter[t]?this.setter[t].apply(this,e):this[t]=e.join(",")},get:function(t){return this.getter[t]?this.getter[t].apply(this):this[t]||0},setter:{rotate:function(t){this.rotate=u(t,"deg")},rotateX:function(t){this.rotateX=u(t,"deg")},rotateY:function(t){this.rotateY=u(t,"deg")},scale:function(t,e){void 0===e&&(e=t),this.scale=t+","+e},skewX:function(t){this.skewX=u(t,"deg")},skewY:function(t){this.skewY=u(t,"deg")},perspective:function(t){this.perspective=u(t,"px")},x:function(t){this.set("translate",t,null)},y:function(t){this.set("translate",null,t)},translate:function(t,e){void 0===this._translateX&&(this._translateX=0),void 0===this._translateY&&(this._translateY=0),null!==t&&void 0!==t&&(this._translateX=u(t,"px")),null!==e&&void 0!==e&&(this._translateY=u(e,"px")),this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var t=(this.scale||"1,1").split(",");return t[0]&&(t[0]=parseFloat(t[0])),t[1]&&(t[1]=parseFloat(t[1])),t[0]===t[1]?t[0]:t},rotate3d:function(){for(var t=(this.rotate3d||"0,0,0,0deg").split(","),e=0;3>=e;++e)t[e]&&(t[e]=parseFloat(t[e]));return t[3]&&(t[3]=u(t[3],"deg")),t}},parse:function(t){var e=this;t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,n,i){e.setFromString(n,i)})},toString:function(t){var e=[];for(var n in this)if(this.hasOwnProperty(n)){if(!d.transform3d&&("rotateX"===n||"rotateY"===n||"perspective"===n||"transformOrigin"===n))continue;"_"!==n[0]&&e.push(t&&"scale"===n?n+"3d("+this[n]+",1)":t&&"translate"===n?n+"3d("+this[n]+",0)":n+"("+this[n]+")")}return e.join(" ")}},t.fn.transition=t.fn.transit=function(e,n,i,o){var s=this,l=0,u=!0,h=t.extend(!0,{},e);"function"==typeof n&&(o=n,n=void 0),"object"==typeof n&&(i=n.easing,l=n.delay||0,u="undefined"==typeof n.queue?!0:n.queue,o=n.complete,n=n.duration),"function"==typeof i&&(o=i,i=void 0),"undefined"!=typeof h.easing&&(i=h.easing,delete h.easing),"undefined"!=typeof h.duration&&(n=h.duration,delete h.duration),"undefined"!=typeof h.complete&&(o=h.complete,delete h.complete),"undefined"!=typeof h.queue&&(u=h.queue,delete h.queue),"undefined"!=typeof h.delay&&(l=h.delay,delete h.delay),"undefined"==typeof n&&(n=t.fx.speeds._default),"undefined"==typeof i&&(i=t.cssEase._default),n=c(n);var f=a(h,n,i,l),p=t.transit.enabled&&d.transition,m=p?parseInt(n,10)+parseInt(l,10):0;if(0===m){var v=function(t){s.css(h),o&&o.apply(s),t&&t()};return r(s,u,v),s}var y={},_=function(e){var n=!1,i=function(){n&&s.unbind(g,i),m>0&&s.each(function(){this.style[d.transition]=y[this]||null}),"function"==typeof o&&o.apply(s),"function"==typeof e&&e()};m>0&&g&&t.transit.useTransitionEnd?(n=!0,s.bind(g,i)):window.setTimeout(i,m),s.each(function(){m>0&&(this.style[d.transition]=f),t(this).css(h)})},b=function(t){this.offsetWidth,_(t)};return r(s,u,b),this},t.transit.getTransitionValue=a,t}),function(t){t.ajaxTransport("+*",function(t,e,n){return window.FormData&&(t.dataType&&("blob"===t.dataType||"arraybuffer"===t.dataType)||t.data&&(window.Blob&&t.data instanceof Blob||window.ArrayBuffer&&t.data instanceof ArrayBuffer))?{send:function(e,n){var i,r=new XMLHttpRequest,o=t.url||window.location.href,a=t.type||"GET",s=t.dataType||"text",l=t.data||null,u=t.async||!0;r.addEventListener("load",function(){var t,e={};t=r.status>=200&&r.status<300||304===r.status,t?e[s]=r.response:e.text=String.fromCharCode.apply(null,new Uint8Array(r.response)),n(r.status,r.statusText,e,r.getAllResponseHeaders())}),r.open(a,o,u),r.responseType=s;for(i in e)e.hasOwnProperty(i)&&r.setRequestHeader(i,e[i]);r.send(l)},abort:function(){n.abort()}}:void 0})}(window.jQuery),function(t){function e(){var t=-1,e=this;e.append=function(n){var i,r=e.table;for(i=0;i<n.length;i++)t=t>>>8^r[255&(t^n[i])]},e.get=function(){return~t}}function n(t,e,n){return t.slice?t.slice(e,e+n):t.webkitSlice?t.webkitSlice(e,e+n):t.mozSlice?t.mozSlice(e,e+n):t.msSlice?t.msSlice(e,e+n):void 0}function i(t,e){var n,i;return n=new ArrayBuffer(t),i=new Uint8Array(n),e&&i.set(e,0),{buffer:n,array:i,view:new DataView(n)}}function r(){}function o(t){function e(e,n){var o=new Blob([t],{type:"text/plain"});i=new s(o),i.init(function(){r.size=i.size,e()},n)}function n(t,e,n,r){i.readUint8Array(t,e,n,r)}var i,r=this;r.size=0,r.init=e,r.readUint8Array=n}function a(e){function n(t){for(var n=e.length;"="==e.charAt(n-1);)n--;o=e.indexOf(",")+1,a.size=Math.floor(.75*(n-o)),t()}function r(n,r,a){var s,l=i(r),u=4*Math.floor(n/3),c=4*Math.ceil((n+r)/3),h=t.atob(e.substring(u+o,c+o)),d=n-3*Math.floor(u/4);for(s=d;d+r>s;s++)l.array[s-d]=h.charCodeAt(s);a(l.array)}var o,a=this;a.size=0,a.init=n,a.readUint8Array=r}function s(t){function e(e){this.size=t.size,e()}function i(e,i,r,o){var a=new FileReader;a.onload=function(t){r(new Uint8Array(t.target.result))},a.onerror=o,a.readAsArrayBuffer(n(t,e,i))}var r=this;r.size=0,r.init=e,r.readUint8Array=i}function l(t){function e(e,n){var i;r.data?e():(i=new XMLHttpRequest,i.adLine truncated
if(e&&"string"==typeof e){var n=(e||"").split(/\s+/);if(1===t.nodeType)if(t.className){for(var i=" "+t.className+" ",r=t.className,o=0,a=n.length;a>o;o++)i.indexOf(" "+n[o]+" ")<0&&(r+=" "+n[o]);t.className=r.replace(/^\s+|\s+$/g,"")}else t.className=e}return t},ke=function(t,e){if(!t||1!==t.nodeType)return t;if(t.classList)return t.classList.contains(e)&&t.classList.remove(e),t;if("string"==typeof e&&e){var n=e.split(/\s+/);if(1===t.nodeType&&t.className){for(var i=(" "+t.className+" ").replace(/[\n\t]/g," "),r=0,o=n.length;o>r;r++)i=i.replace(" "+n[r]+" "," ");t.className=i.replace(/^\s+|\s+$/g,"")}}return t},Ce=function(t,e){var n=r.getComputedStyle(t,null).getPropertyValue(e);return"cursor"!==e||n&&"auto"!==n||"A"!==t.nodeName?n:"pointer"},Se=function(){var t,e,n,i=1;return"function"==typeof o.body.getBoundingClientRect&&(t=o.body.getBoundingClientRect(),e=t.right-t.left,n=o.body.offsetWidth,i=p(e/n*100)/100),i},Te=function(t){var e={left:0,top:0,width:0,height:0};if(t.getBoundingClientRect){var n,i,a,s=t.getBoundingClientRect();"pageXOffset"in r&&"pageYOffset"in r?(n=r.pageXOffset,i=r.pageYOffset):(a=Se(),n=p(o.documentElement.scrollLeft/a),i=p(o.documentElement.scrollTop/a));var l=o.documentElement.clientLeft||0,u=o.documentElement.clientTop||0;e.left=s.left+n-l,e.top=s.top+i-u,e.width="width"in s?s.width:s.right-s.left,e.height="height"in s?s.height:s.bottom-s.top}return e},Me=function(){var t;if(n&&(t=de(D.bridge))){var e=Te(n);w(t.style,{width:e.width+"px",height:e.height+"px",top:e.top+"px",left:e.left+"px",zIndex:""+Ee(V.zIndex)})}},Le=function(t){D.ready===!0&&(D.bridge&&"function"==typeof D.bridge.setHandCursor?D.bridge.setHandCursor(t):D.ready=!1)},Ee=function(t){if(/^(?:auto|inherit)$/.test(t))return t;var e;return"number"!=typeof t||f(t)?"string"==typeof t&&(e=Ee(h(t,10))):e=t,"number"==typeof e?e:"auto"},Ne=function(t){function e(t){var e=t.match(/[\d]+/g);return e.length=3,e.join(".")}function n(t){return!!t&&(t=t.toLowerCase())&&(/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(t)||"chrome.plugin"===t.slice(-13))}function i(t){t&&(l=!0,t.version&&(h=e(t.version)),!h&&t.description&&(h=e(t.description)),t.filename&&(c=n(t.filename)))}var r,o,s,l=!1,u=!1,c=!1,h="";if(a.plugins&&a.plugins.length)r=a.plugins["Shockwave Flash"],i(r),a.plugins["Shockwave Flash 2.0"]&&(l=!0,h="2.0.0.11");else if(a.mimeTypes&&a.mimeTypes.length)s=a.mimeTypes["application/x-shockwave-flash"],r=s&&s.enabledPlugin,i(r);else if("undefined"!=typeof t){u=!0;try{o=new t("ShockwaveFlash.ShockwaveFlash.7"),l=!0,h=e(o.GetVariable("$version"))}catch(f){try{o=new t("ShockwaveFlash.ShockwaveFlash.6"),l=!0,h="6.0.21"}catch(p){try{o=new t("ShockwaveFlash.ShockwaveFlash"),l=!0,h=e(o.GetVariable("$version"))}catch(g){u=!1}}}}D.disabled=l!==!0,D.outdated=h&&d(h)<d(I),D.version=h||"0.0.0",D.pluginType=c?"pepper":u?"activex":l?"netscape":"unknown"};Ne(u);var Pe=function(){return this instanceof Pe?void("function"==typeof Pe._createClient&&Pe._createClient.apply(this,x(arguments))):new Pe};v(Pe,"version",{value:"2.1.6",writable:!1,configurable:!0,enumerable:!0}),Pe.config=function(){return z.apply(this,x(arguments))},Pe.state=function(){return F.apply(this,x(arguments))},Pe.isFlashUnusable=function(){return j.apply(this,x(arguments))},Pe.on=function(){return U.apply(this,x(arguments))},Pe.off=function(){return K.apply(this,x(arguments))},Pe.handlers=function(){return q.apply(this,x(arguments))},Pe.emit=function(){return $.apply(this,x(arguments))},Pe.create=function(){return G.apply(this,x(arguments))},Pe.destroy=function(){return X.apply(this,x(arguments))},Pe.setData=function(){return Y.apply(this,x(arguments))},Pe.clearData=function(){return Q.apply(this,x(arguments))},Pe.getData=function(){return J.apply(this,x(arguments))},Pe.focus=Pe.activate=function(){return Z.apply(this,x(arguments))},Pe.blur=Pe.deactivate=function(){return te.apply(this,x(arguments))},Pe.activeElement=function(){return ee.apply(this,x(arguments))};var Ae=0,Oe={},De=0,Ie={},Be={};w(V,{autoActivate:!0});var Re=function(t){var e=this;e.id=""+Ae++,Oe[e.id]={instance:e,elements:[],handlers:{}},t&&e.clip(t),Pe.on("*",function(t){return e.emit(t)}),Pe.on("destroy",function(){e.destroy()}),Pe.create()},We=function(t,e){var n,i,r,o={},a=Oe[this.id]&&Oe[this.id].handlers;if("string"==typeof t&&t)r=t.toLowerCase().split(/\s+/);else if("object"==typeof t&&t&&"undefined"==typeof e)for(n in t)y.call(t,n)&&"string"==typeof n&&n&&"function"==typeof t[n]&&this.on(n,t[n]);if(r&&r.length){for(n=0,i=r.length;i>n;n++)t=r[n].replace(/^on/,""),o[t]=!0,a[t]||(a[t]=[]),a[t].push(e);if(o.ready&&D.ready&&this.emit({type:"ready",client:this}),o.error){var s=["disabled","outdated","unavailable","deactivated","overdue"];for(n=0,i=s.length;i>n;n++)if(D[s[n]]){this.emit({type:"error",name:"flash-"+s[n],client:this});break}}}return this},He=function(t,e){var n,i,r,o,a,s=Oe[this.id]&&Oe[this.id].handlers;if(0===arguments.length)o=m(s);else if("string"==typeof Line truncated
}},_p[2]={value:function(){var t=_p.r(11);t.___register({TablePicker:_p.r(17)})}},_p[3]={value:function(){return jhtmls}},_p[4]={value:function(){return window.jQuery}},_p[5]={value:function(require,exports){function Class(){}function checkBaseConstructorCall(t,e){var n=t.toString();if(!/this\.callBase/.test(n))throw new Error(e+" : 类构造函数没有调用父类的构造函数!为了安全,请调用父类的构造函数")}function inherit(constructor,BaseClass,classname){var KityClass=eval("(function "+classname+"( __inherit__flag ) {if( __inherit__flag != KITY_INHERIT_FLAG ) {KityClass.__KityConstructor.apply(this, arguments);}this.__KityClassName = KityClass.__KityClassName;})||0");KityClass.__KityConstructor=constructor,KityClass.prototype=new BaseClass(KITY_INHERIT_FLAG);for(var methodName in BaseClass.prototype)BaseClass.prototype.hasOwnProperty(methodName)&&0!==methodName.indexOf("__Kity")&&(KityClass.prototype[methodName]=BaseClass.prototype[methodName]);return KityClass.prototype.constructor=KityClass,KityClass}function mixin(t,e){if(!1==e instanceof Array)return t;var n,i,r,o=e.length;for(t.__KityMixins={constructor:[]},n=0;o>n;n++){i=e[n].prototype;for(r in i)!1!==i.hasOwnProperty(r)&&0!==r.indexOf("__Kity")&&("constructor"===r?t.__KityMixins.constructor.push(i[r]):t.prototype[r]=t.__KityMixins[r]=i[r])}return t}function extend(t,e){e.__KityClassName&&(e=e.prototype);for(var n in e)if(e.hasOwnProperty(n)&&n.indexOf("__Kity")&&"constructor"!=n){var i=t.prototype[n]=e[n];i.__KityMethodClass=t,i.__KityMethodName=n}return t}Function.prototype.bind=Function.prototype.bind||function(t){var e=Array.prototype.slice.call(arguments,1);return this.apply(t,e)},Class.__KityClassName="Class",Class.prototype.base=function(t){var e=arguments.callee.caller,n=e.__KityMethodClass.__KityBaseClass.prototype[t];return n.apply(this,Array.prototype.slice.call(arguments,1))},Class.prototype.callBase=function(){var t=arguments.callee.caller,e=t.__KityMethodClass.__KityBaseClass.prototype[t.__KityMethodName];return e.apply(this,arguments)},Class.prototype.mixin=function(t){var e=arguments.callee.caller,n=e.__KityMethodClass.__KityMixins;if(!n)return this;var i=n[t];return i.apply(this,Array.prototype.slice.call(arguments,1))},Class.prototype.callMixin=function(){var t=arguments.callee.caller,e=t.__KityMethodName,n=t.__KityMethodClass.__KityMixins;if(!n)return this;var i=n[e];if("constructor"==e){for(var r=0,o=i.length;o>r;r++)i[r].call(this);return this}return i.apply(this,arguments)},Class.prototype.pipe=function(t){return"function"==typeof t&&t.call(this,this),this},Class.prototype.getType=function(){return this.__KityClassName},Class.prototype.getClass=function(){return this.constructor};var KITY_INHERIT_FLAG="__KITY_INHERIT_FLAG_"+ +new Date;Class.prototype._accessProperty=function(){return this._propertyRawData||(this._propertyRawData={})},exports.createClass=function(t,e){var n,i,r;return 1===arguments.length&&(e=arguments[0],t="AnonymousClass"),r=e.base||Class,e.hasOwnProperty("constructor")?(n=e.constructor,r!=Class&&checkBaseConstructorCall(n,t)):n=function(){this.callBase.apply(this,arguments),this.callMixin.apply(this,arguments)},i=inherit(n,r,t),i=mixin(i,e.mixins),i.__KityClassName=n.__KityClassName=t,i.__KityBaseClass=n.__KityBaseClass=r,i.__KityMethodName=n.__KityMethodName="constructor",i.__KityMethodClass=n.__KityMethodClass=i,delete e.mixins,delete e.constructor,delete e.base,i=extend(i,e)},exports.extendClass=extend}},_p[6]={value:function(){var t=_p.r(4),e="__fui__marker__"+ +new Date;return{isElement:function(t){return 1===t.nodeType},getMarker:function(){return e},getRect:function(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,bottom:e.bottom,left:e.left,right:e.right}},getBound:function(e){var n=0,i=0;return"body"===e.tagName.toLowerCase()?(i=t(this.getView(e)),n=i.width(),i=i.height(),{top:0,left:0,bottom:i,right:n,width:n,height:i}):this.getRect(e)},getView:function(t){return t.ownerDocument.defaultView||t.ownerDocument.parentWindow}}}},_p[7]={value:function(){var t=_p.r(3),e=_p.r(4),n={forEach:function(t,n){e.each(t,function(t,e){n.call(null,t,e)})}};return{compile:function(i,r){return i=e.trim(i),0===i.length?"":t.render(i,r,n)}}}},_p[8]={value:function(){function t(t){this.__options=e.extend({},i,t),this.__started=!1,this.__point={x:0,y:0},this.__location={x:0,y:0},this.__range={top:0,left:0,bottom:0,right:0}}var e=_p.r(4),n=_p.r(6),i={handler:null,target:null,axis:"all",range:null};return e.extend(t.prototype,{bind:function(t){if(t&&(this.__options.target=t),!this.__options.target)throw new Error("target unset");this.__target=this.__options.target,this.__handler=this.__options.handler,this.__rangeNode=this.__options.range,this.__initOptions(),this.__initEnv(),this.__initEvent()},__initEvent:function(){var t=this.__handler,i=this;e(t).on("mousedown",function(e){if(1===e.which){var r=n.getRect(t);e.preventDefault(),i.__started=!0,i.__point={x:e.clientX,yLine truncated
e=t.extend({},n,e),this.callBase(e)},disable:function(){this.callBase()},enable:function(){this.callBase()},open:function(){this.__popupWidget.appendWidget(this.__panelWidget),this.__maskWidget.show(),this.__popupWidget.show();var e=t(this.__popupWidget.getElement());e.css("top",parseInt(e.css("top"))-t(this.__element).outerHeight()),e.css("min-width",t(this.__element).outerWidth()),e.css("min-height",t(this.__element).height())},close:function(){this.__maskWidget.hide(),this.__popupWidget.hide(),this.__panelWidget.appendTo(this.__contentElement)},getPanelElement:function(){return this.__panelWidget.getElement()},appendWidget:function(t){this.__panelWidget.appendWidget(t)},getWidgets:function(){return this.__panelWidget.getWidgets()},getWidget:function(t){return this.__panelWidget.getWidget(t)},appendWidgets:function(){return this.__panelWidget.appendWidgets.apply(this,arguments),this},insertWidget:function(t,e){this.__panelWidget.insertWidget(t,e)},insertWidgets:function(){return this.__panelWidget.insertWidgets.apply(this,arguments),this},removeWidget:function(t){return this.__panelWidget.removeWidget(t)},__render:function(){this.__initOptions(),this.__buttonWidget=new i(this.__options.button),this.__panelWidget=new r(this.__options.content),this.__popupWidget=new o,this.__maskWidget=new a(this.__options.mask),this.callBase(),this.__popupWidget.positionTo(this.__element),t(this.__popupWidget.getElement()).addClass(e.classPrefix+"drop-panel-popup");var n=t('<div class="'+e.classPrefix+'drop-panel-content"></div>').append(this.__panelWidget.getElement());this.__contentElement=n[0],t(this.__element).append(n).append(this.__buttonWidget.getElement()),this.__initDropPanelEvent()},__initOptions:function(){this.widgetName="DropPanel",this.__tpl=n,this.__buttonWidget=null,this.__popupWidget=null,this.__panelWidget=null,this.__contentElement=null,this.__maskWidget=null,this.__popupState=!1,"object"!=typeof this.__options.button&&(this.__options.input={icon:this.__options.button})},__initDropPanelEvent:function(){var t=this;this.__buttonWidget.on("click",function(){t.__popupState||(t.__appendPopup(),t.__popupState=!0),t.trigger("buttonclick"),t.open()}),this.__panelWidget.on("click",function(){t.trigger("panelclick")}),this.__maskWidget.on("maskclick",function(){t.close()})},__appendPopup:function(){this.__popupWidget.appendTo(this.__element.ownerDocument.body)}})}},_p[42]={value:function(){var t=_p.r(4),e=_p.r(23);return _p.r(13).createClass("Icon",{base:_p.r(60),constructor:function(e){var n={img:null};e=t.extend({},n,e),this.callBase(e)},getValue:function(){return this.__options.value||this.__options.img},setImage:function(t){return this.__options.img===t?this:(this.__image&&(this.__image.src=t),void this.trigger("iconchange",{prevImage:this.__prevIcon,currentImage:this.__currentIcon}))},getImage:function(){return this.__currentIcon},__initOptions:function(){this.callBase(),this.widgetName="Icon",this.__tpl=e,this.__prevIcon=null,this.__currentIcon=this.__options.img,this.__image=null},__render:function(){this.__options.__width=this.__options.width,this.__options.__height=this.__options.height,this.__options.width=null,this.__options.height=null,this.callBase(),this.__options.img&&(this.__image=t("img",this.__element)[0],null!==this.__options.__width&&(this.__image.width=this.__options.__width),null!==this.__options.__height&&(this.__image.height=this.__options.__height))}})}},_p[43]={value:function(){var t=_p.r(4),e=_p.r(12),n=_p.r(24),i=_p.r(37),r=_p.r(45);return _p.r(13).createClass("InputButton",{base:_p.r(60),constructor:function(e){var n={button:null,input:null,placeholder:null,layout:"right"};e=t.extend({},n,e),this.callBase(e)},getValue:function(){return this.__inputWidget.getValue()},setValue:function(t){return this.__inputWidget.setValue(t),this},reset:function(){this.__inputWidget.reset()},selectAll:function(){return this.__inputWidget.selectAll(),this},selectRange:function(t,e){return this.__inputWidget.selectRange(t,e),this},focus:function(){return this.__inputWidget.focus(),this},unfocus:function(){return this.__inputWidget.unfocus(),this},__initOptions:function(){this.callBase(),this.widgetName="InputButton",this.__tpl=n,this.__inputWidget=null,this.__buttonWidget=null,"object"!=typeof this.__options.input&&(this.__options.input={placeholder:this.__options.input}),this.__options.input=t.extend({},this.__options.input,{placeholder:this.__options.placeholder}),"object"!=typeof this.__options.button&&(this.__options.button={icon:this.__options.button})},__render:function(){var n=this;switch(this.callBase(),this.__buttonWidget=new i(this.__options.button),this.__inputWidget=new r(this.__options.input),this.__options.layout){case"left":case"top":this.__buttonWidget.appendTo(this.__element),this.__inputWidget.appendTo(this.__element);break;case"right":case"bottom":default:this.__inputWidget.appendTo(this.__element),this.__buttonWidget.appendTo(this.__element)}t(this.__element).addClass(e.classPrefix+"lLine truncated
},__initButtonState:function(){this.__options.pressed&&(t(this.__element).addClass(e.classPrefix+"button-pressed"),this.__state=!0)},__initEvent:function(){this.callBase(),this.on("click",function(){this.toggle()})},__updateState:function(t){t=!!t,this.__state=t,this.trigger("change",t,!t)}})}},_p[60]={value:function(){function t(){return e+ ++n}var e="_fui_",n=0,i=_p.r(12),r=_p.r(11),o=_p.r(4),a=_p.r(13),s=a.createClass("Widget",{constructor:function(t){var e={id:null,className:"",disabled:!1,preventDefault:!1,text:"",value:null,hide:!1,width:null,height:null};this.__widgetType="widget",this.__tpl="",this.__compiledTpl="",this.__options={},this.__element=null,this.__allow_focus=!!i.allowFocus,this.widgetName="Widget",this.__extendOptions(e,t),this.__initOptions(),this.__render(),this.__initEvent(),this.__initWidgets&&this.__initWidgets()},getId:function(){return this.id},getValue:function(){return this.__options.value},getOptions:function(){return this.__options},setValue:function(t){return this.__options.value=t,this},show:function(){return this.__show(),this},hide:function(){return this.__hide(),this},addClass:function(t){return o(this.__element).addClass(t),this},removeClass:function(t){return o(this.__element).removeClass(t),this},setStyle:function(){return o.fn.css.apply(o(this.__element),arguments),this},getStyle:function(){return o.fn.css.apply(o(this.__element),arguments)},isDisabled:function(){return this.__options.disabled},enable:function(){return this.__options.disabled=!1,o(this.__element).removeClass(i.classPrefix+"disabled"),this},disable:function(){return this.__options.disabled=!0,o(this.__element).addClass(i.classPrefix+"disabled"),this},cloneElement:function(){return this.__element.cloneNode(!0)},getElement:function(){return this.__element},appendTo:function(t){if(a.isElement(t))t.appendChild(this.__element);else{if(!(t instanceof s))throw new Error("TypeError: Widget.appendTo()");t.__appendChild(this)}return this},remove:function(){var t=this.__element.parentNode;return t&&t.removeChild(this.__element),this},off:function(t,e){return o(this.__element).off(e&&e.__fui_listener),this},on:function(t,e){return this.__options.preventDefault||this.__on(t,e),this},__initOptions:function(){},__render:function(){var t=null,e=this.__tpl,n=this.__options,s=null;return this.id=this.__id(),r.__registerInstance(this),this.__compiledTpl=a.Tpl.compile(e,n),this.__element=o(this.__compiledTpl)[0],this.__element.setAttribute("id",this.id),t=o(this.__element),n.disabled&&t.addClass(i.classPrefix+"disabled"),t.addClass(i.classPrefix+"widget"),s=n.className,s.length>0&&t.addClass(o.isArray(s)?s.join(" "):s),this.__initBasicEnv(),n.hide&&this.__hide(),n.style&&this.setStyle(n.style),this},__appendChild:function(t){return this.__element.appendChild(t.getElement())},__initEvent:function(){this.on("mousedown",function(t){var e=t.target.tagName.toLowerCase();i.control[e]||this.__allowFocus()?t.stopPropagation():t.preventDefault()})},__on:function(t,e){var n=this;return e.__fui_listener=function(t,i){for(var r=[],o=0,a=arguments.length;a>o;o++)1!==o&&r.push(arguments[o]);return t.widget=i,n.isDisabled()?void 0:e.apply(n,r)},o(this.__element).on(t,e.__fui_listener),this},trigger:function(){return this.__options.preventDefault||this.__trigger.apply(this,arguments),this},__allowShowTitle:function(){return!0},__allowFocus:function(){return!!this.__allow_focus},__trigger:function(t){var e=[].slice.call(arguments,1);return o(this.__element).trigger(t,[this].concat(e)),this},__triggerHandler:function(t){var e=[this].concat([].slice.call(arguments,1));return o(this.__element).triggerHandler(t,e)},__fire:function(t,e){var n={cancel:!1};return/^(before|after)/.test(t)?this:(this.__trigger("before"+t,n),n.cancel===!0?this:(n=e.call(this,t),this.__trigger(t),this.__trigger("after"+t,n),this))},__extendOptions:function(){var t=[{},this.__options],e=[!0];t=t.concat([].slice.call(arguments,0));for(var n=0,i=t.length;i>n;n++)"string"!=typeof t[n]&&e.push(t[n]);this.__options=o.extend.apply(o,e)},__hide:function(){o(this.__element).addClass(i.classPrefix+"hide")},__show:function(){o(this.__element).removeClass(i.classPrefix+"hide")},__initBasicEnv:function(){this.__options.text&&this.__allowShowTitle()&&this.__element.setAttribute("title",this.__options.text),this.__options.width&&(this.__element.style.width=this.__options.width+"px"),this.__options.height&&(this.__element.style.height=this.__options.height+"px"),this.widgetName&&this.__element.setAttribute("rule",this.widgetName)},__id:function(){return this.__options.id||t()}});return s}},_p[61]={value:function(){_p.r(1),_p.r(2)}};var moduleMapping={"fui.export":61};use("fui.export")}(),function(t){function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function n(){Error.apply(this,arguments)}function i(t){if(Error.call(this,t),"object"==typeof t)for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);else this.detail=t}function r(t,e){this.id=t,this.usernamLine truncated
return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-a),i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",h(t),!0}return!1}function x(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function w(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function k(t,e,n){var i=t.display;this.viewport=e,this.visible=y(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.oldViewFrom=i.viewFrom,this.oldViewTo=i.viewTo,this.oldScrollerWidth=i.scroller.clientWidth,this.force=n,this.dims=P(t)}function C(t,e){var n=t.display,i=t.doc;if(e.editorIsHidden)return vn(t),!1;if(!e.force&&e.visible.from>=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&0==xn(t))return!1;b(t)&&(vn(t),e.dims=P(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),a=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(r,n.viewTo)),va&&(o=tr(t.doc,o),a=er(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastSizeC!=e.wrapperHeight;bn(t,o,a),n.viewOffset=Br(Nr(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=xn(t);if(!s&&0==l&&!e.force&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=So();return l>4&&(n.lineDiv.style.display="none"),A(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),u&&So()!=u&&u.offsetHeight&&u.focus(),wo(n.cursorDiv),wo(n.selectionDiv),s&&(n.lastSizeC=e.wrapperHeight,we(t,400)),n.updateLineNumbers=null,!0}function S(t,e){for(var n=e.force,i=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldScrollerWidth!=t.display.scroller.clientWidth)n=!0;else if(n=!1,i&&null!=i.top&&(i={top:Math.min(t.doc.height+Me(t.display)-fs-t.display.scroller.clientHeight,i.top)}),e.visible=y(t.display,t.doc,i),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!C(t,e))break;E(t);var o=m(t);ye(t),M(t,o),v(t,o)}no(t,"update",t),(t.display.viewFrom!=e.oldViewFrom||t.display.viewTo!=e.oldViewTo)&&no(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo)}function T(t,e){var n=new k(t,e);if(C(t,n)){E(t),S(t,n);var i=m(t);ye(t),M(t,i),v(t,i)}}function M(t,e){t.display.sizer.style.minHeight=t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=Math.max(e.docHeight,e.clientHeight-fs)+"px"}function L(t,e){t.display.sizer.offsetWidth+t.display.gutters.offsetWidth<t.display.scroller.clientWidth-1&&(t.display.sizer.style.minHeight=t.display.heightForcer.style.top="0px",t.display.gutters.style.height=e.docHeight+"px")}function E(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i<e.view.length;i++){var r,o=e.view[i];if(!o.hidden){if(Zo&&8>ta){var a=o.node.offsetTop+o.node.offsetHeight;r=a-n,n=a}else{var s=o.node.getBoundingClientRect();r=s.bottom-s.top}var l=o.line.height-r;if(2>r&&(r=Qe(e)),(l>.001||-.001>l)&&(Or(o.line,r),N(o.line),o.rest))for(var u=0;u<o.rest.length;u++)N(o.rest[u])}}}function N(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e)t.widgets[e].height=t.widgets[e].node.offsetHeight}function P(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[t.options.gutters[a]]=o.offsetLeft+o.clientLeft+r,i[t.options.gutters[a]]=o.clientWidth;return{fixedPos:w(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function A(t,e,n){function i(e){var n=e.nextSibling;return ea&&ha&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var r=t.display,o=t.options.lineNumbers,a=r.lineDiv,s=a.firstChild,l=r.view,u=r.viewFrom,c=0;c<l.length;c++){var h=l[c];if(h.hidden);else if(h.node){for(;s!=h.node;)s=i(s);var d=o&&null!=e&&u>=e&&h.lineNumber;h.changes&&(fo(h.changes,"gutter")>-1&&(d=!1),O(t,h,u,n)),d&&(wo(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(x(t.options,u)))),s=h.node.nextSibling}else{var f=z(t,h,u,n);a.insertBefore(f,s)}u+=h.size}for(;s;)s=i(s)}function O(t,e,n,i){for(var r=0;r<e.changes.length;r++){var o=e.changes[r];"text"==o?R(t,e):"gutter"==o?H(t,e,n,i):"class"==o?W(e):"widget"==o&&V(e,i)}e.changes=null}function D(t){return t.node==t.text&&(t.node=xo("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),Zo&&8>ta&&(t.node.style.zIndex=2)),t.node}function I(t){var e=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(e&&(e+=" CodeMirror-linebackground"),t.background)e?t.background.className=e:(t.background.parentNode.removeChild(t.background),t.background=null);else if(e){var n=D(t);t.background=n.insertBefore(xo("div",null,e),n.firstChild)}}function B(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.dLine truncated
i.push(s),n.push(t.getRange(s.anchor,s.head))}"cut"==e.type?t.setSelections(i,null,gs):(r.prevInput="",r.input.value=n.join("\n"),bs(r.input)),Ta=n}"cut"==e.type&&(t.state.cutIncoming=!0)}var r=t.display;us(r.scroller,"mousedown",cn(t,On)),Zo&&11>ta?us(r.scroller,"dblclick",cn(t,function(e){if(!ro(t,e)){var n=An(t,e);if(n&&!Wn(t,e)&&!Pn(t.display,e)){as(e);var i=t.findWordAt(n);re(t.doc,i.anchor,i.head)}}})):us(r.scroller,"dblclick",function(e){ro(t,e)||as(e)}),us(r.lineSpace,"selectstart",function(t){Pn(r,t)||as(t)}),ga||us(r.scroller,"contextmenu",function(e){ti(t,e)}),us(r.scroller,"scroll",function(){r.scroller.clientHeight&&(zn(t,r.scroller.scrollTop),Fn(t,r.scroller.scrollLeft,!0),hs(t,"scroll",t))}),us(r.scrollbarV,"scroll",function(){r.scroller.clientHeight&&zn(t,r.scrollbarV.scrollTop)}),us(r.scrollbarH,"scroll",function(){r.scroller.clientHeight&&Fn(t,r.scrollbarH.scrollLeft)}),us(r.scroller,"mousewheel",function(e){jn(t,e)}),us(r.scroller,"DOMMouseScroll",function(e){jn(t,e)}),us(r.scrollbarH,"mousedown",e),us(r.scrollbarV,"mousedown",e),us(r.wrapper,"scroll",function(){r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),us(r.input,"keyup",function(e){Yn.call(t,e)}),us(r.input,"input",function(){Zo&&ta>=9&&t.display.inputHasSelection&&(t.display.inputHasSelection=null),kn(t)}),us(r.input,"keydown",cn(t,Gn)),us(r.input,"keypress",cn(t,Qn)),us(r.input,"focus",vo(Jn,t)),us(r.input,"blur",vo(Zn,t)),t.options.dragDrop&&(us(r.scroller,"dragstart",function(e){Vn(t,e)}),us(r.scroller,"dragenter",n),us(r.scroller,"dragover",n),us(r.scroller,"drop",cn(t,Hn))),us(r.scroller,"paste",function(e){Pn(r,e)||(t.state.pasteIncoming=!0,Tn(t),kn(t))}),us(r.input,"paste",function(){if(ea&&!t.state.fakedLastChar&&!(new Date-t.state.lastMiddleDown<200)){var e=r.input.selectionStart,n=r.input.selectionEnd;r.input.value+="$",r.input.selectionEnd=n,r.input.selectionStart=e,t.state.fakedLastChar=!0}t.state.pasteIncoming=!0,kn(t)}),us(r.input,"cut",i),us(r.input,"copy",i),aa&&us(r.sizer,"mouseup",function(){So()==r.input&&r.input.blur(),Tn(t)})}function Nn(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,t.setSize()}function Pn(t,e){for(var n=to(e);n!=t.wrapper;n=n.parentNode)if(!n||n.ignoreEvents||n.parentNode==t.sizer&&n!=t.mover)return!0}function An(t,e,n,i){var r=t.display;if(!n){var o=to(e);if(o==r.scrollbarH||o==r.scrollbarV||o==r.scrollbarFiller||o==r.gutterFiller)return null}var a,s,l=r.lineSpace.getBoundingClientRect();try{a=e.clientX-l.left,s=e.clientY-l.top}catch(e){return null}var u,c=Xe(t,a,s);if(i&&1==c.xRel&&(u=Nr(t.doc,c.line).text).length==c.ch){var h=ys(u,u.length,t.options.tabSize)-u.length;c=ya(c.line,Math.max(0,Math.round((a-Le(t.display).left)/Je(t.display))-h))}return c}function On(t){if(!ro(this,t)){var e=this,n=e.display;if(n.shift=t.shiftKey,Pn(n,t))return void(ea||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Wn(e,t)){var i=An(e,t);switch(window.focus(),eo(t)){case 1:i?Dn(e,t,i):to(t)==n.scroller&&as(t);break;case 2:ea&&(e.state.lastMiddleDown=+new Date),i&&re(e.doc,i),setTimeout(vo(Tn,e),20),as(t);break;case 3:ga&&ti(e,t)}}}}function Dn(t,e,n){setTimeout(vo(Mn,t),0);var i,r=+new Date;wa&&wa.time>r-400&&0==_a(wa.pos,n)?i="triple":xa&&xa.time>r-400&&0==_a(xa.pos,n)?(i="double",wa={time:r,pos:n}):(i="single",xa={time:r,pos:n});var o=t.doc.sel,a=ha?e.metaKey:e.ctrlKey;t.options.dragDrop&&Es&&!Ln(t)&&"single"==i&&o.contains(n)>-1&&o.somethingSelected()?In(t,e,n,a):Bn(t,e,n,i,a)}function In(t,e,n,i){var r=t.display,o=cn(t,function(a){ea&&(r.scroller.draggable=!1),t.state.draggingText=!1,cs(document,"mouseup",o),cs(r.scroller,"drop",o),Math.abs(e.clientX-a.clientX)+Math.abs(e.clientY-a.clientY)<10&&(as(a),i||re(t.doc,n),Tn(t),Zo&&9==ta&&setTimeout(function(){document.body.focus(),Tn(t)},20))});ea&&(r.scroller.draggable=!0),t.state.draggingText=o,r.scroller.dragDrop&&r.scroller.dragDrop(),us(document,"mouseup",o),us(r.scroller,"drop",o)}function Bn(t,e,n,i,r){function o(e){if(0!=_a(g,e))if(g=e,"rect"==i){for(var r=[],o=t.options.tabSize,a=ys(Nr(u,n.line).text,n.ch,o),s=ys(Nr(u,e.line).text,e.ch,o),l=Math.min(a,s),f=Math.max(a,s),p=Math.min(n.line,e.line),m=Math.min(t.lastLine(),Math.max(n.line,e.line));m>=p;p++){var v=Nr(u,p).text,y=uo(v,l,o);l==f?r.push(new X(ya(p,y),ya(p,y))):v.length>y&&r.push(new X(ya(p,y),ya(p,uo(v,f,o))))}r.length||r.push(new X(n,n)),ce(u,Y(d.ranges.slice(0,h).concat(r),h),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var _=c,b=_.anchor,x=e;if("single"!=i){if("double"==i)var w=t.findWordAt(e);else var w=new X(ya(e.line,0),Z(u,ya(e.line+1,0)));_a(w.anchor,b)>0?(x=w.head,b=$(_.from(),w.anchor)):(x=w.anchor,b=q(_.to(),w.head))}var r=d.ranges.slice(0);r[h]=new X(Z(u,b),x),ce(u,Y(r,h),ms)}}function a(e){var n=++v,r=An(t,e,!0,"rect"==i);if(r)if(0!=_a(r,g)){Mn(t),o(r);var s=y(l,u);(r.line>=s.to||r.line<s.from)&&setTimeout(cn(t,function(){v==n&&a(e)}),150)}else{var c=e.clientY<m.top?-20:e.clientY>m.bottom?20:0;c&&setTimeouLine truncated
for(o.start=o.pos=i||0,""==e&&cr(r,n);!o.eol()&&o.pos<=t.options.maxHighlightLength;)hr(r,o,n),o.start=o.pos}function mr(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?es:ts;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function vr(t,e){var n=xo("span",null,null,ea?"padding-right: .1px":null),i={pre:xo("pre",[n]),content:n,col:0,pos:0,cm:t};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var o,a=r?e.rest[r-1]:e.line;i.pos=0,i.addToken=_r,(Zo||ea)&&t.getOption("lineWrapping")&&(i.addToken=br(i.addToken)),Io(t.display.measure)&&(o=Rr(a))&&(i.addToken=xr(i.addToken,o)),i.map=[],kr(a,i,pr(t,a)),a.styleClasses&&(a.styleClasses.bgClass&&(i.bgClass=Eo(a.styleClasses.bgClass,i.bgClass||"")),a.styleClasses.textClass&&(i.textClass=Eo(a.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Do(t.display.measure))),0==r?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}return hs(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=Eo(i.pre.className,i.textClass||"")),i}function yr(t){var e=xo("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e}function _r(t,e,n,i,r,o){if(e){var a=t.cm.options.specialChars,s=!1;if(a.test(e))for(var l=document.createDocumentFragment(),u=0;;){a.lastIndex=u;var c=a.exec(e),h=c?c.index-u:e.length-u;if(h){var d=document.createTextNode(e.slice(u,u+h));l.appendChild(Zo&&9>ta?xo("span",[d]):d),t.map.push(t.pos,t.pos+h,d),t.col+=h,t.pos+=h}if(!c)break;if(u+=h+1," "==c[0]){var f=t.cm.options.tabSize,p=f-t.col%f,d=l.appendChild(xo("span",co(p),"cm-tab"));t.col+=p}else{var d=t.cm.options.specialCharPlaceholder(c[0]);l.appendChild(Zo&&9>ta?xo("span",[d]):d),t.col+=1}t.map.push(t.pos,t.pos+1,d),t.pos++}else{t.col+=e.length;var l=document.createTextNode(e);t.map.push(t.pos,t.pos+e.length,l),Zo&&9>ta&&(s=!0),t.pos+=e.length}if(n||i||r||s){var g=n||"";i&&(g+=i),r&&(g+=r);var m=xo("span",[l],g);return o&&(m.title=o),t.content.appendChild(m)}t.content.appendChild(l)}}function br(t){function e(t){for(var e=" ",n=0;n<t.length-2;++n)e+=n%2?" ":" ";return e+=" "}return function(n,i,r,o,a,s){t(n,i.replace(/ {3,}/g,e),r,o,a,s)}}function xr(t,e){return function(n,i,r,o,a,s){r=r?r+" cm-force-border":"cm-force-border";for(var l=n.pos,u=l+i.length;;){for(var c=0;c<e.length;c++){var h=e[c];if(h.to>l&&h.from<=l)break}if(h.to>=u)return t(n,i,r,o,a,s);t(n,i.slice(0,h.to-l),r,o,null,s),o=null,i=i.slice(h.to-l),l=h.to}}}function wr(t,e,n,i){var r=!i&&n.widgetNode;r&&(t.map.push(t.pos,t.pos+e,r),t.content.appendChild(r)),t.pos+=e}function kr(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var a,s,l,u,c,h,d=r.length,f=0,p=1,g="",m=0;;){if(m==f){s=l=u=c="",h=null,m=1/0;for(var v=[],y=0;y<i.length;++y){var _=i[y],b=_.marker;_.from<=f&&(null==_.to||_.to>f)?(null!=_.to&&m>_.to&&(m=_.to,l=""),b.className&&(s+=" "+b.className),b.startStyle&&_.from==f&&(u+=" "+b.startStyle),b.endStyle&&_.to==m&&(l+=" "+b.endStyle),b.title&&!c&&(c=b.title),b.collapsed&&(!h||$i(h.marker,b)<0)&&(h=_)):_.from>f&&m>_.from&&(m=_.from),"bookmark"==b.type&&_.from==f&&b.widgetNode&&v.push(b)}if(h&&(h.from||0)==f&&(wr(e,(null==h.to?d+1:h.to)-f,h.marker,null==h.from),null==h.to))return;if(!h&&v.length)for(var y=0;y<v.length;++y)wr(e,0,v[y])}if(f>=d)break;for(var x=Math.min(d,m);;){if(g){var w=f+g.length;if(!h){var k=w>x?g.slice(0,x-f):g;e.addToken(e,k,a?a+s:s,u,f+k.length==m?l:"",c)}if(w>=x){g=g.slice(x-f),f=x;break}f=w,u=""}g=r.slice(o,o=n[p++]),a=mr(n[p++],e.cm.options)}}else for(var p=1;p<n.length;p+=2)e.addToken(e,r.slice(o,o=n[p]),mr(n[p+1],e.cm.options))}function Cr(t,e){return 0==e.from.ch&&0==e.to.ch&&""==ho(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function Sr(t,e,n,i){function r(t){return n?n[t]:null}function o(t,n,r){sr(t,n,r,i),no(t,"change",t,e)}var a=e.from,s=e.to,l=e.text,u=Nr(t,a.line),c=Nr(t,s.line),h=ho(l),d=r(l.length-1),f=s.line-a.line;if(Cr(t,e)){for(var p=0,g=[];p<l.length-1;++p)g.push(new Za(l[p],r(p),i));o(c,c.text,d),f&&t.remove(a.line,f),g.length&&t.insert(a.line,g)}else if(u==c)if(1==l.length)o(u,u.text.slice(0,a.ch)+h+u.text.slice(s.ch),d);else{for(var g=[],p=1;p<l.length-1;++p)g.push(new Za(l[p],r(p),i));g.push(new Za(h+u.text.slice(s.ch),d,i)),o(u,u.text.slice(0,a.ch)+l[0],r(0)),t.insert(a.line+1,g)}else if(1==l.length)o(u,u.text.slice(0,a.ch)+l[0]+c.text.slice(s.ch),r(0)),t.remove(a.line+1,f);else{o(u,u.text.slice(0,a.ch)+l[0],r(0)),o(c,h+c.text.slice(s.ch),d);for(var p=1,g=[];p<l.length-1;++p)g.push(new Za(l[p],r(p),i));f>1&&t.remove(a.line+1,f-1),t.insert(a.line+1,g)}no(t,"change",t,e)}function Tr(t){this.lines=t,this.parent=null;for(var e=0,n=0;e<t.length;++e)t[e].parent=this,n+=t[e].height;this.height=n}function Mr(t){this.children=t;for(var e=0,n=0,i=0;i<t.length;++i){var r=t[i];e+=r.chunkSize(),n+=r.height,r.parent=this}this.size=e,this.height=n,this.parent=null}function Lr(t,e,n){function i(t,r,o){if(t.linked)foLine truncated
})},undo:function(t){t.undo()},redo:function(t){t.redo()},undoSelection:function(t){t.undoSelection()},redoSelection:function(t){t.redoSelection()},goDocStart:function(t){t.extendSelection(ya(t.firstLine(),0))},goDocEnd:function(t){t.extendSelection(ya(t.lastLine()))},goLineStart:function(t){t.extendSelectionsBy(function(e){return Fo(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){t.extendSelectionsBy(function(e){return Uo(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){t.extendSelectionsBy(function(e){return jo(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){t.extendSelectionsBy(function(e){var n=t.charCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div")},vs)},goLineLeft:function(t){t.extendSelectionsBy(function(e){var n=t.charCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:n},"div")},vs)},goLineLeftSmart:function(t){t.extendSelectionsBy(function(e){var n=t.charCoords(e.head,"div").top+5,i=t.coordsChar({left:0,top:n},"div");return i.ch<t.getLine(i.line).search(/\S/)?Uo(t,e.head):i},vs)},goLineUp:function(t){t.moveV(-1,"line")},goLineDown:function(t){t.moveV(1,"line")},goPageUp:function(t){t.moveV(-1,"page")},goPageDown:function(t){t.moveV(1,"page")},goCharLeft:function(t){t.moveH(-1,"char")},goCharRight:function(t){t.moveH(1,"char")},goColumnLeft:function(t){t.moveH(-1,"column")},goColumnRight:function(t){t.moveH(1,"column")},goWordLeft:function(t){t.moveH(-1,"word")},goGroupRight:function(t){t.moveH(1,"group")},goGroupLeft:function(t){t.moveH(-1,"group")},goWordRight:function(t){t.moveH(1,"word")},delCharBefore:function(t){t.deleteH(-1,"char")},delCharAfter:function(t){t.deleteH(1,"char")},delWordBefore:function(t){t.deleteH(-1,"word")},delWordAfter:function(t){t.deleteH(1,"word")},delGroupBefore:function(t){t.deleteH(-1,"group")},delGroupAfter:function(t){t.deleteH(1,"group")},indentAuto:function(t){t.indentSelection("smart")},indentMore:function(t){t.indentSelection("add")},indentLess:function(t){t.indentSelection("subtract")},insertTab:function(t){t.replaceSelection(" ")},insertSoftTab:function(t){for(var e=[],n=t.listSelections(),i=t.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),a=ys(t.getLine(o.line),o.ch,i);e.push(new Array(i-a%i+1).join(" "))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){un(t,function(){for(var e=t.listSelections(),n=[],i=0;i<e.length;i++){var r=e[i].head,o=Nr(t.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new ya(r.line,r.ch-1)),r.ch>0)r=new ya(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),ya(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var a=Nr(t.doc,r.line-1).text;a&&t.replaceRange(o.charAt(0)+"\n"+a.charAt(a.length-1),ya(r.line-1,a.length-1),ya(r.line,1),"+transpose")}n.push(new X(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){un(t,function(){for(var e=t.listSelections().length,n=0;e>n;n++){var i=t.listSelections()[n];t.replaceRange("\n",i.anchor,i.head,"+input"),t.indentLine(i.from().line+1,null,!0),_i(t)}})},toggleOverwrite:function(t){t.toggleOverwrite()}},Ua=t.keyMap={};Ua.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ua.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ua.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ua.emLine truncated
}return C="error",m}function v(t,e,n){return"equals"==t?y:(S.allowMissing||(C="error"),m(t,e,n))}function y(t,e,n){return"string"==t?_:"word"==t&&S.allowUnquoted?(C="string",m):(C="error",m(t,e,n))}function _(t,e,n){return"string"==t?_:m(t,e,n)}var b=e.indentUnit,x=n.multilineTagIndentFactor||1,w=n.multilineTagIndentPastTag;null==w&&(w=!0);var k,C,S=n.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},T=n.alignCDATA;return{startState:function(){return{tokenize:i,state:h,indented:0,tagName:null,tagStart:null,context:null}},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;k=null;var n=e.tokenize(t,e);return(n||k)&&"comment"!=n&&(C=null,e.state=e.state(k||n,t,e),C&&(n="error"==C?n+" error":C)),n},indent:function(e,n,o){var a=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+b;if(a&&a.noIndent)return t.Pass;if(e.tokenize!=r&&e.tokenize!=i)return o?o.match(/^(\s*)/)[0].length:0;if(e.tagName)return w?e.tagStart+e.tagName.length+2:e.tagStart+b*x;if(T&&/<!\[CDATA\[/.test(n))return 0;var s=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(s&&s[1])for(;a;){if(a.tagName==s[2]){a=a.prev;break}if(!S.implicitlyClosed.hasOwnProperty(a.tagName))break;a=a.prev}else if(s)for(;a;){var l=S.contextGrabbers[a.tagName];if(!l||!l.hasOwnProperty(s[2]))break;a=a.prev}for(;a&&!a.startOfLine;)a=a.prev;return a?a.indent+b:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:n.htmlMode?"html":"xml",helperType:n.htmlMode?"html":"xml"}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(t){for(var e,n=!1,i=!1;null!=(e=t.next());){if(!n){if("/"==e&&!i)return;"["==e?i=!0:i&&"]"==e&&(i=!1)}n=!n&&"\\"==e}}function r(t,e,n){return pe=t,ge=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=a(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=s,s(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):"operator"==e.lastType||"keyword c"==e.lastType||"sof"==e.lastType||/^[\[{}\(,;:]$/.test(e.lastType)?(i(t),t.eatWhile(/[gimy]/),r("regexp","string-2")):(t.eatWhile(ke),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(ke.test(n))return t.eatWhile(ke),r("operator","operator",t.current());if(xe.test(n)){t.eatWhile(xe);var o=t.current(),u=we.propertyIsEnumerable(o)&&we[o];return u&&"."!=e.lastType?r(u.type,u.style,o):r("variable","variable",o)}}function a(t){return function(e,n){var i,a=!1;if(ye&&"@"==e.peek()&&e.match(Ce))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||a);)a=!a&&"\\"==i;return a||(n.tokenize=o),r("string","string")}}function s(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function u(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(0>n)){for(var i=0,r=!1,o=n-1;o>=0;--o){var a=t.string.charAt(o),s=Se.indexOf(a);if(s>=0&&3>s){if(!i){++o;break}if(0==--i)break}else if(s>=3&&6>s)++i;else if(xe.test(a))r=!0;else if(r&&!i){++o;break}}r&&!i&&(e.fatArrowAt=o)}}function c(t,e,n,i,r,o){this.indented=t,this.columLine truncated
t.registerHelper("hintWords","css",y),t.defineMIME("text/css",{mediaTypes:o,mediaFeatures:s,propertyKeywords:u,nonStandardPropertyKeywords:h,colorKeywords:f,valueKeywords:g,fontProperties:v,tokenHooks:{"<":function(t,e){return t.match("!--")?(e.tokenize=i,i(t,e)):!1},"/":function(t,e){return t.eat("*")?(e.tokenize=n,n(t,e)):!1}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,propertyKeywords:u,nonStandardPropertyKeywords:h,colorKeywords:f,valueKeywords:g,fontProperties:v,allowNested:!0,tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(t,e)):["operator","operator"]},":":function(t){return t.match(/\s*\{/)?[null,"{"]:!1},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return t.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,propertyKeywords:u,nonStandardPropertyKeywords:h,colorKeywords:f,valueKeywords:g,fontProperties:v,allowNested:!0,tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(t,e)):["operator","operator"]},"@":function(t){return t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("htmlmixed",function(e,n){function i(t,e){var n=e.htmlState.tagName;n&&(n=n.toLowerCase());var i=s.token(t,e.htmlState);if("script"==n&&/\btag\b/.test(i)&&">"==t.current()){var r=t.string.slice(Math.max(0,t.pos-100),t.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);r=r?r[1]:"",r&&/[\"\']/.test(r.charAt(0))&&(r=r.slice(1,r.length-1));for(var c=0;c<u.length;++c){var h=u[c];if("string"==typeof h.matches?r==h.matches:h.matches.test(r)){h.mode&&(e.token=o,e.localMode=h.mode,e.localState=h.mode.startState&&h.mode.startState(s.indent(e.htmlState,"")));break}}}else"style"==n&&/\btag\b/.test(i)&&">"==t.current()&&(e.token=a,e.localMode=l,e.localState=l.startState(s.indent(e.htmlState,"")));return i}function r(t,e,n){var i,r=t.current(),o=r.search(e);return o>-1?t.backUp(r.length-o):(i=r.match(/<\/?$/))&&(t.backUp(r.length),t.match(e,!1)||t.match(r)),n}function o(t,e){return t.match(/^<\/\s*script\s*>/i,!1)?(e.token=i,e.localState=e.localMode=null,i(t,e)):r(t,/<\/\s*script\s*>/,e.localMode.token(t,e.localState))}function a(t,e){return t.match(/^<\/\s*style\s*>/i,!1)?(e.token=i,e.localState=e.localMode=null,i(t,e)):r(t,/<\/\s*style\s*>/,l.token(t,e.localState))}var s=t.getMode(e,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),l=t.getMode(e,"css"),u=[],c=n&&n.scriptTypes;if(u.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:t.getMode(e,"javascript")}),c)for(var h=0;h<c.length;++h){var d=c[h];u.push({matches:d.matches,mode:d.mode&&t.getMode(e,d.mode)})}return u.push({matches:/./,mode:t.getMode(e,"text/plain")}),{startState:function(){var t=s.startState();return{token:i,localMode:null,localState:null,htmlState:t}},copyState:function(e){if(e.localState)var n=t.copyState(e.localMode,e.localState);return{token:e.token,localMode:e.localMode,localState:n,htmlState:t.copyState(s,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n){return!e.localMode||/^\s*<\//.test(n)?s.indent(e.htmlState,n):e.localMode.indent?e.localMode.indent(e.localState,n):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||s}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror",require("../xml/xml"))):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("markdown",function(e,n){function i(t,e,n){return e.f=e.inline=n,n(t,e)}function r(t,e,n){return e.f=e.block=n,n(t,e)}function o(t){return t.linkTitle=!1,t.em=!1,t.strong=!1,t.quote=0,_||t.f!=s||(t.f=h,t.block=a),t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.thisLineHasContent=!1,null}function a(t,e){var o=t.sol(),a=e.list!==!1;e.list!==!1&&e.indentationDiff>=0?(e.indentationDiff<4&&(e.indentation-=e.indentationDiff),e.list=null):e.list!==!1&&e.indentation>0?(e.list=null,e.listDepth=Math.floor(e.indentation/4)):e.list!==!1&&(e.list=!1,e.listDepth=0);vaLine truncated
},i=inherit(n,r,t),i=mixin(i,e.mixins),i.__KityClassName=n.__KityClassName=t,i.__KityBaseClass=n.__KityBaseClass=r,i.__KityMethodName=n.__KityMethodName="constructor",i.__KityMethodClass=n.__KityMethodClass=i,delete e.mixins,delete e.constructor,delete e.base,i=extend(i,e)},exports.extendClass=extend}},_p[12]={value:function(){var t={each:function(t,e,n){if(null!==t)if(t.length===+t.length){for(var i=0,r=t.length;r>i;i++)if(e.call(n,t[i],i,t)===!1)return!1}else for(var o in t)if(t.hasOwnProperty(o)&&e.call(n,t[o],o,t)===!1)return!1},extend:function(t){for(var e=arguments,n=this.isBoolean(e[e.length-1])?e[e.length-1]:!1,i=this.isBoolean(e[e.length-1])?e.length-1:e.length,r=1;i>r;r++){var o=e[r];for(var a in o)n&&t.hasOwnProperty(a)||(t[a]=o[a])}return t},deepExtend:function(t){for(var e=arguments,n=this.isBoolean(e[e.length-1])?e[e.length-1]:!1,i=this.isBoolean(e[e.length-1])?e.length-1:e.length,r=1;i>r;r++){var o=e[r];for(var a in o)n&&t.hasOwnProperty(a)||(this.isObject(t[a])&&this.isObject(o[a])?this.deepExtend(t[a],o[a],n):t[a]=o[a])}return t},clone:function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},copy:function(t){return"object"!=typeof t?t:"function"==typeof t?null:JSON.parse(JSON.stringify(t))},queryPath:function(t,e){for(var n=t.split("."),i=0,r=e,o=n.length;o>i;){if(!(n[i]in r))return void 0;if(r=r[n[i]],i++,i>=o||void 0===r)return r}},getValue:function(t,e){return void 0!==t?t:e},flatten:function(e){var n,i=[],r=e.length;for(n=0;r>n;n++)e[n]instanceof Array?i=i.concat(t.flatten(e[n])):i.push(e[n]);return i},paralle:function(e,n,i){var r,o,a,s;if(e instanceof Array){for(s=[],o=0;o<e.length;o++)s.push(t.paralle(e[o],n[o],i));return s}if(e instanceof Object){if(r=e.getClass&&e.getClass(),r&&r.parse)e=e.valueOf(),n=n.valueOf(),s=t.paralle(e,n,i),s=r.parse(s);else{s={};for(a in e)e.hasOwnProperty(a)&&n.hasOwnProperty(a)&&(s[a]=t.paralle(e[a],n[a],i))}return s}return!1===isNaN(parseFloat(e))?i(e,n):s},parallelize:function(e){return function(n,i){return t.paralle(n,i,e)}}};return t.each(["String","Function","Array","Number","RegExp","Object","Boolean"],function(e){t["is"+e]=function(t){return Object.prototype.toString.apply(t)=="[object "+e+"]"}}),t}},_p[13]={value:function(){var t=_p.r(16),e=_p.r(12),n=_p.r(11).createClass("ColorMatrixEffect",{base:t,constructor:function(i,r){this.callBase(t.NAME_COLOR_MATRIX),this.set("type",e.getValue(i,n.TYPE_MATRIX)),this.set("in",e.getValue(r,t.INPUT_SOURCE_GRAPHIC))}});return e.extend(n,{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(" ")}),n}},_p[14]={value:function(){var t=_p.r(16),e=_p.r(12),n=_p.r(11).createClass("CompositeEffect",{base:t,constructor:function(i,r,o){this.callBase(t.NAME_COMPOSITE),this.set("operator",e.getValue(i,n.OPERATOR_OVER)),r&&this.set("in",r),o&&this.set("in2",o)}});return e.extend(n,{OPERATOR_OVER:"over",OPERATOR_IN:"in",OPERATOR_OUT:"out",OPERATOR_ATOP:"atop",OPERATOR_XOR:"xor",OPERATOR_ARITHMETIC:"arithmetic"}),n}},_p[15]={value:function(){var t=_p.r(16),e=_p.r(12),n=_p.r(11).createClass("ConvolveMatrixEffect",{base:t,constructor:function(i,r){this.callBase(t.NAME_CONVOLVE_MATRIX),this.set("edgeMode",e.getValue(i,n.MODE_DUPLICATE)),this.set("in",e.getValue(r,t.INPUT_SOURCE_GRAPHIC))}});return e.extend(n,{MODE_DUPLICATE:"duplicate",MODE_WRAP:"wrap",MODE_NONE:"none"}),n}},_p[16]={value:function(){var t=_p.r(67),e=_p.r(11).createClass("Effect",{constructor:function(e){this.node=t.createNode(e)},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 _p.r(12).extend(e,{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"}),e}},_p[17]={value:function(){var t=_p.r(16),e=_p.r(12);return _p.r(11).createClass("GaussianblurEffect",{base:t,constructor:function(n,i){this.callBase(t.NAME_GAUSSIAN_BLUR),this.set("stdDeviation",e.getValue(n,1)),this.set("in",e.getValue(i,t.INPUT_SOURCE_GRAPHIC))}})}},_p[18]={value:function(){var t=_p.r(16),e=_p.r(12);return _p.r(11).createClass("OffsetEffect",{base:t,constructor:function(n,i,r){this.callBase(t.NAME_OFFSET),this.set("dx",e.getValue(n,0)),this.set("dy",e.getValue(i,0)),this.set("in",e.getValue(r,t.INPUT_SOURCE_GRAPHIC))}})}},_p[19]={value:function(){return _p.r(11).createClass("EffectContainer",{base:_p.r(29),addEffect:function(){retuLine truncated
return c.i==c.length&&l(c),h.i==h.length&&l(h),delete c.i,delete c.o,delete h.i,delete h.o,[c,h]});return u.alignCurve=p,u.pathTween=function(t,e,n){if(0===n)return t;if(1===n)return e;var i,r,o,a=p(t,e),s=[];for(t=a[0],e=a[1],r=0;r<t.length;r++)for(s.push(i=[]),i.push(t[r][0]),o=1;o<t[r].length;o++)i.push(t[r][o]+n*(e[r][o]-t[r][o]));return s.isUniform=s.isCurve=s.isAbsolute=!0,s},u.transformPath=e(function(t,e){var n,i,r,o,s,l;for(t.isCurve||(t=u.pathToCurve(t)),o=[],n=0,i=t.length;i>n;n++)for(o.push(s=[t[n][0]]),r=1;r<t[n].length;r+=2)l=t[n].slice(r,r+2),l=e.transformPoint(a.parse(l)),o.push(l);return o}),_p.r(11).extendClass(l,{transformPath:function(t){return u.transformPath(t,this)}}),u}},_p[35]={value:function(){var t=_p.r(67),e=_p.r(58),n=_p.r(28);return _p.r(11).createClass("GradientBrush",{base:e,constructor:function(t,e){this.callBase(t,e),this.stops=[]},addStop:function(e,i,r){var o=t.createNode("stop");return i instanceof n||(i=n.parse(i)),void 0===r&&(r=i.get("a")),o.setAttribute("offset",e),o.setAttribute("stop-color",i.toRGB()),1>r&&o.setAttribute("stop-opacity",r),this.node.appendChild(o),this}})}},_p[36]={value:function(){var t=_p.r(61);return _p.r(11).createClass("Group",{mixins:[t],base:_p.r(60),constructor:function(){this.callBase("g")}})}},_p[37]={value:function(){var t=_p.r(61);return _p.r(11).createClass("HyperLink",{mixins:[t],base:_p.r(60),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")}})}},_p[38]={value:function(){return _p.r(11).createClass("Image",{base:_p.r(60),constructor:function(t,e,n,i,r){this.callBase("image"),this.url=t,this.width=e||0,this.height=n||0,this.x=i||0,this.y=r||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}})}},_p[39]={value:function(){return _p.r(11).createClass("Line",{base:_p.r(46),constructor:function(t,e,n,i){this.callBase(),this.point1={x:t||0,y:e||0},this.point2={x:n||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}})}},_p[40]={value:function(){var t=(_p.r(67),_p.r(35));return _p.r(11).createClass("LinearGradientBrush",{base:t,constructor:function(t){this.callBase("linearGradient",t),this.setStartPosition(0,0),this.setEndPosition(1,0)},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")}}})}},_p[41]={value:function(){var t=_p.r(50),e=_p.r(11).createClass("Marker",{base:_p.r(58),mixins:[_p.r(61),_p.r(75)],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 t(+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}}),n=_p.r(46);return _p.r(11).extendClass(n,{setMarker:function(t,e){return e=e||"end",t?this.node.setAttribute("marker-"+e,t.toString()):this.node.removeAttribute("marker-"+e),this}}),e}},_p[42]={value:function(){var t=_p.r(11),e=_p.r(60),n=t.createClass("Mask",{Line truncated
return _p.r(11).createClass("Star",{base:_p.r(46),constructor:function(t,n,i,r,o){this.callBase(),this.vertex=t||3,this.radius=n||0,this.shrink=i,this.offset=r||new e(0,0),this.angleOffset=o||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 n,i,r=this.radius,o=this.radius*(this.shrink||t[this.vertex]||.5),a=this.vertex,s=this.offset,l=90,u=180/a,c=this.angleOffset,h=this.getDrawer();for(h.clear(),h.moveTo(e.fromPolar(o,l)),n=1;2*a>=n;n++)i=l+u*n,h.lineTo(n%2?e.fromPolar(r,i+c).offset(s):e.fromPolar(o,i));h.close()}})}},_p[66]={value:function(){function t(t){return t.classList||(t.classList=new e(t)),t.classList}var e=_p.r(11).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)}});return _p.r(11).createClass("Styled",{addClass:function(e){return t(this.node).add(e),this},removeClass:function(e){return t(this.node).remove(e),this},hasClass:function(e){return t(this.node).contains(e)},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}})}},_p[67]={value:function(){var t=document,e=0,n={createNode:function(i){var r=t.createElementNS(n.ns,i);return r.id="kity_"+i+"_"+e++,r},defaults:{stroke:"none",fill:"none"},xlink:"http://www.w3.org/1999/xlink",ns:"http://www.w3.org/2000/svg"};return n}},_p[68]={value:function(){var t=_p.r(50);return _p.r(11).createClass("Sweep",{base:_p.r(46),constructor:function(t,e,n){this.callBase(),this.sectionArray=t||[],this.angle=e||0,this.angleOffset=n||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(e,n){var i=this.angle&&(this.angle%360?this.angle%360:360),r=this.angleOffset,o=r+i/2,a=r+i,s=0>i?0:1,l=this.getDrawer();return l.redraw(),0===i?void l.done():(l.moveTo(t.fromPolar(e,r)),l.lineTo(t.fromPolar(n,r)),n&&(l.carcTo(n,0,s,t.fromPolar(n,o)),l.carcTo(n,0,s,t.fromPolar(n,a))),l.lineTo(t.fromPolar(e,a)),e&&(l.carcTo(e,0,s,t.fromPolar(e,o)),l.carcTo(e,0,s,t.fromPolar(e,r))),l.close(),void l.done())}})}},_p[69]={value:function(){function t(t){var e=t._cachedFontHash;if(o[e])return o[e];var n=t.getContent();t.setContent("百度Fex");var i=t.getBoundaryBox(),r=t.getY(),a=r-i.y+ +t.node.getAttribute("dy"),s=a-i.height;return t.setContent(n),o[e]={top:a,bottom:s,middle:(a+s)/2}}var e=_p.r(70),n=_p.r(61),i=_p.r(67),r=_p.r(12),o={};return _p.r(11).createClass("Text",{base:e,mixins:[n],constructor:function(t){this.callBase("text"),void 0!==t&&this.setContent(t),this._buildFontHash()},_buildFontHash:function(){var t=window.getComputedStyle(this.node);this._cachedFontHash=[t.fontFamily,t.fontSize,t.fontStretch,t.fontStyle,t.fontVariant,t.fontWeight].join("-")},_fontChanged:function(t){var e=this._lastFont,n=r.extend({},e,t);if(!e)return this._lastFont=t,!0;var i=e.family!=n.family||e.size!=n.size||e.style!=n.style||e.weight!=n.weight;return this._lastFont=n,i},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._fontChanged(t)&&(this._buildFontHash(),this.setVerticalAlign(this.getVerticalAlign())),this},setTextAnchor:function(t){return this.node.setAttribute("text-anchor",t),this},getTextAnchor:function(){return this.node.getAttribute("text-anchor")||"start"},setVerticalAlign:function(e){return this.whenPaperReady(function(){var n;switch(e){case"top":n=t(this).top;break;case"bottom":n=t(this).bottom;break;case"middle":n=t(this).middle;break;default:n=0}this.node.setAttribute("dy",n)}),this.verticalAlign=e,this},getVerticalAlign:function(){return this.verticalAlign||"baseline"},setStartOffsLine truncated
return e&&e[t]||null}}),Minder.registerInit(function(){this._initContextMenu()}),kity.extendClass(Minder,{_initContextMenu:function(){this.contextmenus=[]},addContextMenu:function(t){return utils.isArray(t)?this.contextmenus=this.contextmenus.concat(t):this.contextmenus.push(t),this},getContextMenu:function(){return this.contextmenus}}),function(){var t;KityMinder.registerModule=function(e,n){t||(t={}),t[e]=n},KityMinder.getModules=function(){return t}}(),Minder.registerInit(function(){this._initModules()}),kity.extendClass(Minder,{_initModules:function(){var t=KityMinder.getModules(),e=this._options.modules||Utils.keys(t);this._commands={},this._query={},this._modules={},this._rendererClasses={};var n,i,r,o,a,s,l,u=this;for(n=0;n<e.length;n++)if(i=e[n],t[i]&&(o="function"==typeof t[i]?t[i].call(u):t[i],this._modules[i]=o,o)){o.init&&o.init.call(u,this._options),a=o.commands;for(i in a)this._commands[i.toLowerCase()]=new a[i];if(s=o.events)for(r in s)u.on(r,s[r]);if(l=o.renderers)for(r in l)this._rendererClasses[r]=this._rendererClasses[r]||[],Utils.isArray(l[r])?this._rendererClasses[r]=this._rendererClasses[r].concat(l[r]):this._rendererClasses[r].push(l[r]);o.defaultOptions&&this.setDefaultOptions(o.defaultOptions),o.commandShortcutKeys&&this.addCommandShortcutKeys(o.commandShortcutKeys),o.contextmenu&&this.addContextMenu(o.contextmenu)}},_garbage:function(){for(this.clearSelect();this._root.getChildren().length;)this._root.removeChild(0)},destroy:function(){var t=this._modules;this._resetEvents(),this._garbage();for(var e in t)t[e].destroy&&t[e].destroy.call(this)},reset:function(){var t=this._modules;this._garbage();for(var e in t)t[e].reset&&t[e].reset.call(this)}}),Utils.extend(KityMinder,{_protocols:{},registerProtocol:function(t,e){KityMinder._protocols[t]=e}});var DEFAULT_TEXT={root:"maintopic",main:"topic",sub:"topic"};Minder.registerInit(function(){this._initProtocols()}),kity.extendClass(Minder,{_initProtocols:function(){var t=this._protocols={},e=KityMinder._protocols;for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n](this)),t[n].name=n},getProtocol:function(t){return this._protocols[t]||null},getSupportedProtocols:function(){var t=this._protocols;return Utils.keys(t).map(function(e){return t[e]})},exportJson:function(){function t(e){var n={};n.data=e.getData();var i=e.getChildren();if(i.length){n.children=[];for(var r=0;r<i.length;r++)n.children.push(t(i[r]))}return n}var e=t(this.getRoot());return e.template=this.getTemplate(),e.theme=this.getTheme(),e.version=KityMinder.version,e},importJson:function(t,e){function n(t,e,i){var r=e.data;t.data={};for(var o in r)t.setData(o,r[o]);t.setData("text",r.text||i.getLang(DEFAULT_TEXT[t.getType()]));for(var a=e.children||[],s=0;s<a.length;s++){var l=i.createNode(null,t);n(l,a[s],i)}return t}if(t){for(this._fire(new MinderEvent("preimport",e,!1));this._root.getChildren().length;)this.removeNode(this._root.getChildren()[0]);t=KityMinder.compatibility(t),n(this._root,t,this),this.setTemplate(t.template||"default"),this.setTheme(t.theme||null),this.refresh(),this.fire("import",e),this._firePharse({type:"contentchange"}),this._interactChange()}},exportData:function(t,e){var n,i;return n=this.exportJson(),!t||(i=this.getProtocol(t),i&&i.encode)?(this._fire(new MinderEvent("beforeexport",{json:n,protocolName:t,protocol:i})),Promise.resolve(i?i.encode(n,this,e):n)):Promise.reject(new Error("Not supported protocol:"+t))},importData:function(t,e){var n,i=this;if(e&&(n=this.getProtocol(e),!n||!n.decode))return Promise.reject(new Error("Not supported protocol:"+e));var r={local:t,protocolName:e,protocol:n};return this._fire(new MinderEvent("beforeimport",r)),new Promise(function(e){e(n?n.decode(t):t)}).then(function(t){return i.importJson(t,r),t})}}),Minder.registerInit(function(t){t.readOnly&&this.setDisabled()}),kity.extendClass(Minder,{disable:function(){var t=this;t.bkqueryCommandState=t.queryCommandState,t.bkqueryCommandValue=t.queryCommandValue,t.queryCommandState=function(e){var n=this._getCommand(e);return n&&n.enableReadOnly?t.bkqueryCommandState.apply(t,arguments):-1},t.queryCommandValue=function(e){var n=this._getCommand(e);return n&&n.enableReadOnly?t.bkqueryCommandValue.apply(t,arguments):null},this.setStatus("readonly"),t._interactChange()},enable:function(){var t=this;t.bkqueryCommandState&&(t.queryCommandState=t.bkqueryCommandState,delete t.bkqueryCommandState),t.bkqueryCommandValue&&(t.queryCommandValue=t.bkqueryCommandValue,delete t.bkqueryCommandValue),this.setStatus("normal"),t._interactChange()}}),Utils.extend(KityMinder,{_layout:{},registerLayout:function(t,e){KityMinder._layout[t]=e,KityMinder._defaultLayout||(KityMinder._defaultLayout=t)},getLayoutList:function(){return this._layout},getLayoutInstance:function(t){var e=KityMinder._layout[t];if(!e)throw new Error("Missing Layout: "+t);var n=new e;return n}}),kity.extendClass(MinderNode,{getLayout:function(){var t=this.getData("layout");return t=t||(this.isRoot()?KityMinder._defaultLayout:thisLine truncated
}),["snow","snow-compact"].forEach(function(t){var e="snow-compact"==t;KityMinder.registerTheme(t,{background:"#3A4144 url(ui/theme/default/images/grid.png) repeat","root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":24,"root-padding":e?[5,10]:[15,25],"root-margin":e?15:30,"root-radius":5,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":16,"main-padding":e?[4,10]:[6,20],"main-margin":e?[5,10]:[20,40],"main-radius":5,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","sub-color":"black","sub-background":"white","sub-stroke":"white","sub-font-size":12,"sub-padding":[5,10],"sub-margin":e?[5,10]:[10,20],"sub-radius":5,"sub-space":5,"connect-color":"white","connect-width":2,"main-connect-width":3,"connect-radius":5,"selected-background":"rgb(254, 219, 0)","selected-stroke":"rgb(254, 219, 0)","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5})}),function(){function t(t,e,n){return kity.Color.createHSL(t,e,n)}function e(e,n){return{background:"#fbfbfb","root-color":"white","root-background":t(e,37,60),"root-stroke":t(e,37,60),"root-font-size":16,"root-padding":n?[6,12]:[12,24],"root-margin":n?10:[30,100],"root-radius":5,"root-space":10,"main-color":"black","main-background":t(e,33,95),"main-stroke":t(e,37,60),"main-stroke-width":1,"main-font-size":14,"main-padding":[6,20],"main-margin":n?8:20,"main-radius":3,"main-space":5,"sub-color":"black","sub-background":"transparent","sub-stroke":"none","sub-font-size":12,"sub-padding":n?[3,5]:[5,10],"sub-margin":n?[4,8]:[15,20],"sub-radius":5,"sub-space":5,"connect-color":t(e,37,60),"connect-width":1,"connect-radius":5,"selected-stroke":t(e,26,30),"selected-stroke-width":"3","marquee-background":t(e,100,80).set("a",.1),"marquee-stroke":t(e,37,60),"drop-hint-color":t(e,26,35),"drop-hint-width":5,"order-hint-area-color":t(e,100,30).set("a",.5),"order-hint-path-color":t(e,100,25),"order-hint-path-width":1,"text-selection-color":t(e,100,20),"line-height":1.5}}var n,i={red:0,soil:25,green:122,blue:204,purple:246,pink:334};for(n in i)KityMinder.registerTheme("fresh-"+n,e(i[n])),KityMinder.registerTheme("fresh-"+n+"-compat",e(i[n],!0))}(),KityMinder.registerTheme("fish",{background:"#3A4144 url(ui/theme/default/images/grid.png) repeat","root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":24,"root-padding":[35,35],"root-margin":30,"root-radius":100,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":16,"main-padding":[6,20],"main-margin":[20,20],"main-radius":5,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","sub-color":"black","sub-background":"white","sub-stroke":"white","sub-font-size":12,"sub-padding":[5,10],"sub-margin":[10],"sub-radius":5,"sub-space":5,"connect-color":"white","connect-width":3,"main-connect-width":3,"connect-radius":5,"selected-background":"rgb(254, 219, 0)","selected-stroke":"rgb(254, 219, 0)","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5}),KityMinder.registerTheme("wire",{background:"black",color:"#999",stroke:"none",padding:10,margin:20,"font-size":14,"connect-color":"#999","connect-width":1,"selected-background":"#999","selected-color":"black","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","sub-drop-hint-width":2,"main-drop-hint-width":4,"root-drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5}),["tianpan","tianpan-compact"].forEach(function(t){var e="tianpan-compact"==t;KityMinder.registerTheme(t,{background:"#3A4144 url(ui/theme/default/images/grid.png) repeat","root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":25,"root-padding":e?15:20,"root-margin":e?[15,25]:100,"root-radius":30,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","root-shape":"circle","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":15,"main-padding":e?10:12,"main-margin":e?10:12,"main-radius":10,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","main-shape":"circle","sub-color":"#333","sub-background":"#99ca6a","sub-stroke":"#a4c5c0","sub-font-size":13,"sub-padding":5,"sub-margin":e?6:10,"sub-tree-margin":30,"sub-radius":5,"sub-space":5,"sub-shadow":"rgba(0, 0, 0, .25)","sub-shape":"circle","connect-color":"white","connect-width":2,Line truncated
for(t in e)e.hasOwnProperty(t)&&n.push(t);return n},_getNextResourceColorIndex:function(){var t,n,i,r=this._getResourceColorIndexMapping();n=[];for(t in r)r.hasOwnProperty(t)&&n.push(r[t]);for(i=0;i<e.length;i++)if(!~n.indexOf(i))return i;return-1},_getResourceColorIndexMapping:function(){return this._resourceColorMapping||(this._resourceColorMapping={})}});var n=kity.createClass("ResourceCommand",{base:Command,execute:function(t,e){var n=t.getSelectedNodes();"string"==typeof e&&(e=[e]),n.forEach(function(t){t.setData("resource",e).render()}),t.layout(200)},queryValue:function(t){var e=t.getSelectedNodes(),n=[];return e.forEach(function(t){var e=t.getData("resource");e&&e.forEach(function(t){~n.indexOf(t)||n.push(t)})}),n},queryState:function(t){return t.getSelectedNode()?0:-1}}),i=kity.createClass("ResourceOverlay",{base:kity.Group,constructor:function(){this.callBase();var t,e;e=this.rect=(new kity.Rect).setRadius(4),t=this.text=(new kity.Text).setFontSize(12).setVerticalAlign("middle"),this.addShapes([e,t])},setValue:function(t,e){var n,i,r,o=8,a=4;n=this.text,t==this.lastResourceName?i=this.lastBox:(n.setContent(t),i=n.getBoundaryBox(),this.lastResourceName=t,this.lastBox=i),n.setX(o).fill(e.dec("l",70)),r=this.rect,r.setPosition(0,i.y-a),this.width=Math.round(i.width+2*o),this.height=Math.round(i.height+2*a),r.setSize(this.width,this.height),r.fill(e)}}),r=kity.createClass("ResourceRenderer",{base:KityMinder.Renderer,create:function(){return this.overlays=[],new kity.Group},shouldRender:function(t){return t.getData("resource")&&t.getData("resource").length},update:function(t,e,n){var r,o,a,s=e.getStyle("space-right"),l=this.overlays,u=e.getData("resource"),c=e.getMinder();for(a=0,r=0;r<u.length;r++)a+=s,o=l[r],o||(o=new i,l.push(o),t.addShape(o)),o.setVisible(!0),o.setValue(u[r],c.getResourceColor(u[r])),o.setTranslate(a,-1),a+=o.width;for(;o=l[r++];)o.setVisible(!1);return t.setTranslate(n.right,0),new kity.Box({x:n.right,y:Math.round(-l[0].height/2),width:a,height:l[0].height})}});return{commands:{resource:n},renderers:{right:r}}}),KityMinder.registerModule("NoteModule",function(){var t="M9,9H3V8h6L9,9L9,9z M9,7H3V6h6V7z M9,5H3V4h6V5z M8.5,11H2V2h8v7.5 M9,12l2-2V1H1v11",e=kity.createClass("NoteCommand",{base:Command,execute:function(t,e){var n=t.getSelectedNode();n.setData("note",e),n.render(),n.getMinder().layout(300)},queryState:function(t){return 1===t.getSelectedNodes().length?0:-1},queryValue:function(t){var e=t.getSelectedNode();return e&&e.getData("note")}}),n=kity.createClass("NoteIcon",{base:kity.Group,constructor:function(){this.callBase(),this.width=16,this.height=17,this.rect=new kity.Rect(16,17,.5,-8.5,2).fill("transparent"),this.path=(new kity.Path).setPathData(t).setTranslate(2.5,-6.5),this.addShapes([this.rect,this.path]),this.on("mouseover",function(){this.rect.fill("rgba(255, 255, 200, .8)")}).on("mouseout",function(){this.rect.fill("transparent")}),this.setStyle("cursor","pointer")}}),i=kity.createClass("NoteIconRenderer",{base:KityMinder.Renderer,create:function(t){var e=new n;return e.on("mousedown",function(e){e.preventDefault(),t.getMinder().fire("editnoterequest")}),e.on("mouseover",function(){t.getMinder().fire("shownoterequest",{node:t,icon:e})}),e.on("mouseout",function(){t.getMinder().fire("hidenoterequest",{node:t,icon:e})}),e},shouldRender:function(t){return t.getData("note")},update:function(t,e,n){var i=n.right+e.getStyle("space-left"),r=n.cy;return t.path.fill(e.getStyle("color")),t.setTranslate(i,r),new kity.Box(i,Math.round(r-t.height/2),t.width,t.height)}});return{renderers:{right:i},commands:{note:e}}});var ViewDragger=kity.createClass("ViewDragger",{constructor:function(t){this._minder=t,this._enabled=!1,this._bind();var e=this;this._minder.getViewDragger=function(){return e}},isEnabled:function(){return this._enabled},setEnabled:function(t){var e=this._minder.getPaper();e.setStyle("cursor",t?"pointer":"default"),e.setStyle("cursor",t?"-webkit-grab":"default"),this._enabled=t},move:function(t,e){var n=(this._minder,this.getMovement().offset(t));this.moveTo(n,e)},moveTo:function(t,e){if(e){var n=this;return this._moveTimeline&&this._moveTimeline.stop(),this._moveTimeline=this._minder.getRenderContainer().animate(new kity.Animator(this.getMovement(),t,function(t,e){n.moveTo(e)}),e,"easeOutCubic"),this._moveTimeline.on("finish",function(){n._moveTimeline=null}),this}this._minder.getRenderContainer().setTranslate(t.round()),this._minder.fire("viewchange")},getMovement:function(){var t=this._minder.getRenderContainer().transform.translate;return t?t[0]:new kity.Point},getView:function(){var t=this._minder,e={width:t.getRenderTarget().clientWidth,height:t.getRenderTarget().clientHeight},n=this.getMovement(),i=new kity.Box(0,0,e.width,e.height),r=t.getPaper().getViewPortMatrix();return r.inverse().translate(-n.x,-n.y).transformBox(i)},_bind:function(){function t(t){if(i){i=null,t.stopPropagation(),n&&(e.setEnabled(!1),n=!1,"hand"==e._minder.getStatus()&&e._minder.rollbLine truncated
}),this},setTextGroup:function(t){return this.textGroup=t,this},setKityMinder:function(t){return this.km=t,this},updateByMinderNode:function(t){return this.setMinderNode(t),this._addSelection(),this.setTextGroup(t.getTextGroup()),this.setContainerStyle(),this.updateTextOffsetData(),this.setSelectionHeight(),this.setContainerTxt(),this},setMinderNode:function(t){return this.minderNode=t,this.selection.setMinderNode(t),this},_addSelection:function(){return this.selection.container&&this.selection.remove(),this.minderNode.getRenderContainer().addShape(this.selection),this},getMinderNode:function(){return this.minderNode},updateIndex:function(){return this.index=this.range.getStartOffset(),this},setSelection:function(t){return this.selection=t,this},updateSelection:function(t){return this.selection.update(this.textData,t),this},getOffsetByIndex:function(t){return utils.getValueByIndex(this.textData,void 0!==t?t:this.index)},getBaseOffset:function(){var t=this.textGroup.getRenderBox("screen");return t},setContainerStyle:function(){var t=this.getBaseOffset();return this.container.style.cssText=";left:"+(browser.ipad?"-":"")+t.x+"px;top:"+(t.y+(/\?debug#?/.test(location.href)?this.textGroup.getItems().length*this.getlineHeight():0))+"px;width:"+t.width+"px;height:"+t.height+"px;",this},updateTextOffsetData:function(){var t,e=this,n=this.minderNode.getData("font-size")||this.minderNode.getStyle("font-size"),i=this.minderNode.getStyle("line-height")*n,r=(e.textGroup.getShapes().length*i-(i-n))/2;return this.textData=[],e.textGroup.eachItem(function(n,o){e.textData[n]=[];for(var a=n*i+1,s=o.getContent(),l=0,u=s.length;u>l;l++){try{t=o.getExtentOfChar(l)}catch(c){console.log(c)}e.textData[n].push({x:t.x,y:a-r,width:t.width,height:t.height})}0===s.length&&e.textData[n].push({x:0,y:a-r,width:0,height:i})}),this},getlineHeight:function(){return this.minderNode.getStyle("line-height")*(this.minderNode.getData("font-size")||this.minderNode.getStyle("font-size"))},updateIndexByMouse:function(t){var e=this;e.updateTextOffsetData(),this.index=0;var n=this.getlineHeight();return utils.each(this.textData,function(i,r){var o=r[0];return o.y<=t.y&&o.y+n>=t.y?(utils.each(r,function(n,i){return 0===n&&t.x<=i.x?!1:t.x>=i.x&&t.x<=i.x+i.width?(e.index+=t.x-i.x>i.width/2?n+1:n,!1):n==r.length-1&&t.x>=i.x?(e.index+=1==r.length&&0===r[0].width?0:r.length,!1):void 0}),!1):void(e.index+=r.length+(1==r.length&&0===r[0].width?0:1))}),this.selection.setStartOffset(this.index).collapse(!0),this},setSelectionHeight:function(){return this.selection.setHeight(1*(this.minderNode.getData("font-size")||this.minderNode.getStyle("font-size"))),this},updateSelectionByMousePosition:function(t){var e=this,n=0,i=this.getlineHeight();return utils.each(this.textData,function(r,o){var a=o[0];return a.y<=t.y&&a.y+i>=t.y?(utils.each(o,function(e,i){return 0===e&&t.x<=i.x?!1:t.x>=i.x&&t.x<=i.x+i.width?(n+=e,t.x-i.x>i.width/2&&(n+=1),!1):e==o.length-1&&t.x>=i.x?(n+=1==o.length&&0===o[0].width?0:o.length,!1):void 0}),!1):a.y>t.y&&0===r?(n=0,!1):r==e.textData.length-1&&a.y+i<t.y?(n+=o.length+1,!1):void(n+=o.length+(1==o.length&&0===o[0].width?0:1))}),n<e.index?(this.selection.setStartOffset(n),this.selection.setEndOffset(e.index)):n==e.index?this.selection.setStartOffset(n).collapse(!0):(this.selection.setStartOffset(e.index),this.selection.setEndOffset(n)),this},updateRange:function(){return this.range.update(),this},updateContainerRangeBySel:function(){var t=this;return this.range.setStartOffset(this.selection.startOffset),this.range.setEndOffset(this.selection.endOffset),browser.gecko?(this.container.focus(),setTimeout(function(){t.range.select()})):this.range.select(),this},updateSelectionByRange:function(){return this.selection.setStartOffset(this.range.getStartOffset()),this.selection.setEndOffset(this.range.getEndOffset()),this},setIndex:function(t){return this.index=t,this},setContainerTxt:function(t){function e(t){return t.replace(/</g,"&lt;").replace(/>/g,"&gt;")}return t?(t=e(t),t=t.replace(/[\n]/g,"<br/>")):(t="",this.textGroup.eachItem(function(n,i){t+=e(i.getContent())+"<br/>"})),this.container.innerHTML=t,this},setReady:function(){this._ready=!0},clearReady:function(){this._ready=!1},isReady:function(){return this._ready},focus:function(){this.container.focus()},getTxtOfContainer:function(){var t="",e=this.container;return utils.each(e.childNodes,function(n,i){3==i.nodeType?t+=i.nodeValue.replace(/[\u200b]/g,""):i!==e.lastChild&&(t+="\n")}),t}}),Minder.Selection=kity.createClass("Selection",{base:kity.Path,constructor:function(t){this.callBase(),this.height=t||20,this.setAttr("id","_kity_selection"),this.width=2,this.fill("rgb(27,171,255)"),this.setHide(),this.timer=null,this.collapsed=!0,this.startOffset=this.endOffset=0,this.setOpacity(.5),this.setStyle("cursor","text"),this._show=!1,this.offset=[],this.setTranslate(-.5,-1.5)},setMinderNode:function(t){this.minderNode=t},setColor:function(t){this.fill(t)},updateOffsetByTextData:function(t){if(thiLine truncated
return i&&i.forEach(function(e){e.apply(t,r)}),this},t}}}),KityMinder.registerUI("memory",function(){var t=window.localStorage,e=t.uiMemory?JSON.parse(t.uiMemory):{};return{get:function(t){return e[t]||null},set:function(n,i){e[n]=i,t.uiMemory=JSON.stringify(e)}}}),kity.extendClass(FUI.Widget,{setEnable:function(t){t===!1?this.disable():this.enable()},setActive:function(t){t===!1?this.removeClass("active"):this.addClass("active")},bindExecution:function(t,e){var n=this;n.on(t,function(){n.interactFlag||e.apply(n,arguments)})},bindCommandState:function(t,e,n){var i=this;t.on("interactchange",function(){if(i.interactFlag=!0,n){var t=this.queryCommandValue(e);t!=i.lastHandleCommandValue&&(n.call(i,t),i.lastHandleCommandValue=t)}i.setEnable(-1!==this.queryCommandState(e)),i.setActive(1===this.queryCommandState(e)),i.interactFlag=!1})}}),KityMinder.registerUI("axss",function(){function t(t){var e=document.createElement("div");e.innerHTML=t,$(e).find("script, iframe, link").remove();for(var n in e)0===n.indexOf("on")&&e.removeAttribute(n);return e.innerHTML}return t}),KityMinder.registerUI("widget/commandbutton",function(t){return{generate:function(e,n){var i=new FUI.Button({label:t.getLang("ui.command."+e)||t.getLang("ui."+e),text:t.getLang("ui.command."+e)||t.getLang("ui."+e),className:["command-widget","command-button",e]});return i.bindExecution("click",n||function(){t.execCommand(e)}),i.bindCommandState(t,e),i}}}),KityMinder.registerUI("widget/commandbuttonset",function(t){function e(e,n){return n.map(function(n){var i=t.getLang([e,n].join("."))||n;return{label:i,text:i,value:n,className:[e,n].join(" ")}})}function n(n,i){var r=new FUI.Buttonset({id:"template-set",buttons:"object"==typeof i[0]?i:e(n,i),className:["command-widget","command-buttonset",n].join(" ")});return r.bindExecution("change",function(){t.execCommand(n,r.getValue())}),r.bindCommandState(t,n,function(t){this.selectByValue(t)}),r}return{generate:n}}),KityMinder.registerUI("widget/commandinputmenu",function(t){function e(e,n){var i=new FUI.InputMenu({menu:{items:n},input:{placeholder:t.getLang("ui."+e)},className:["command-widget","command-inputmenu",e]});i.bindCommandState(t,e,function(t){i.selectByValue(t)||i.clearSelect()});var r=-1;return i.bindExecution("select",function(n,o){~o.index?t.execCommand(e,o.value):i.select(r),r=o.index}),i}return{generate:e}}),KityMinder.registerUI("widget/commandselectmenu",function(t){function e(e,n){return n.map(function(n){var i=t.getLang([e,n].join("."))||n;return{clazz:"Button",label:i,text:i,value:n,className:[e,n].join(" ")}})}function n(n,i,r){var o=new FUI.SelectMenu({widgets:"object"==typeof i[0]?i:e(n,i),className:["command-widget","command-selectmenu",n].join(" "),column:r||3});return o.bindExecution("change",function(){t.execCommand(n,o.getValue())}),o.bindCommandState(t,n,function(t){void 0!==t&&this.selectByValue(t)}),o}return{generate:n}}),KityMinder.registerUI("widget/notice",function(t){function e(t,e){function n(){var e=t.text(),n=new RegExp("at.+"+p+".+\\:(\\d+)\\:(\\d+)\\)?","g");t.text(e.replace(n,function(t,e,n){var i={line:+e,column:+n},r=d.originalPositionFor(i),o=r.name;i={line:r.line,column:r.column},r=h.originalPositionFor(i),o=o||"<Anonymous>";var a="at "+o+" ("+r.source.replace("../","")+":"+r.line+":"+r.column+")";return-1!=a.indexOf("promise")&&(a="at <async> Promise."+o),a}))}if(p){if(h)return n();e.addClass("loading"),setTimeout(function(){e.removeClass("loading")},5e3);var i=document.createElement("script");i.onload=function(){Promise.all([$.pajax({url:p.replace("min.js","js.map"),dataType:"json"}),$.pajax({url:p.replace(".js",".map"),dataType:"json"})]).then(function(t){h=new window.sourceMap.SourceMapConsumer(t[0]),d=new window.sourceMap.SourceMapConsumer(t[1]),n(),e.removeClass("loading")})},i.src="lib/source-map.min.js",document.head.appendChild(i)}}function n(e,i,r){u.hasClass("show")||u.empty(),clearTimeout(n.ttl2),i?u.addClass("warn"):u.removeClass("warn");var o=t.getUI("menu/menu");u.css({top:o&&o.isVisible()?$("#main-menu .main-menu-level1").offset().top:$("#kityminder").offset().top+20}),u.append($("<p>").text(e)),u.addClass("show"),clearTimeout(n.ttl),r=r||(i?5e3:3e3),n.ttl=setTimeout(function(){u.removeClass("show"),n.ttl2=setTimeout(function(){u.empty()},1e3)},r)}function i(t){n(t,i)}function r(t){return t=t||new Error,"string"==typeof t&&(t=new Error(t)),t.getDetail?t:("undefined"!=typeof fio&&t instanceof fio.FileRequestError?(t.description=t.status?s.pcs_code[t.detail.error_code]:s.err_network,t.getDetail=function(){return JSON.stringify(t,null,4)}):"readyState"in t||(t.getDetail=function(){return t.stack||(new Error).stack}),t)}function o(n,i){1==arguments.length&&(i=n,n="unknown"),f.empty(),i=r(i);{var u=$("<div>").addClass("error-content").appendTo(f);$("<h3>").text(s[n]||s.err_unknown).appendTo(u),$("<p>").text(i.message||i.description||s.unknownreason).appendTo(u)}if(i.getDetail){var h=$("<div>").addClass("error-detail").append($('<a class="expander">Line truncated