# HG changeset patch # User durandn # Date 1474451904 -7200 # Node ID 24e4aba394bf1d2e24dc41243f9f9204318fa9d8 # Parent 24dc4fe0c9a474a974118a84f9ef4d5c6e3677d0 cleared incompatibility with older versions of Firefox and bug on Chrome for the fragment editor #35 diff -r 24dc4fe0c9a4 -r 24e4aba394bf src/iconolab/settings/dev.py.tmpl --- a/src/iconolab/settings/dev.py.tmpl Tue Sep 20 15:57:42 2016 +0200 +++ b/src/iconolab/settings/dev.py.tmpl Wed Sep 21 11:58:24 2016 +0200 @@ -106,9 +106,9 @@ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', - 'django.core.context_processors.media', - 'django.core.context_processors.static', - 'django.core.context_processors.i18n', + 'django.template.context_processors.media', + 'django.template.context_processors.static', + 'django.template.context_processors.i18n', 'iconolab.utils.context_processors.env', ], }, diff -r 24dc4fe0c9a4 -r 24e4aba394bf src/iconolab/static/iconolab/js/iconolab.js --- a/src/iconolab/static/iconolab/js/iconolab.js Tue Sep 20 15:57:42 2016 +0200 +++ b/src/iconolab/static/iconolab/js/iconolab.js Wed Sep 21 11:58:24 2016 +0200 @@ -1,7 +1,7 @@ !function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="/dist/",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}n(133),n(134),n(132);var i=n(122),o=(r(i),n(32)),a=r(o),s=n(127),u=r(s),l=n(50),c=r(l),f=n(138),h=r(f),d=n(49),p=r(d),v=n(16),g=r(v),m=n(99);Vue.config.ignoredElements=["mask"];var y={Cutout:u["default"],JsDiff:m,JsonDiff:g["default"],VueComponents:{Typeahead:a["default"],MergeTool:h["default"],Zoomview:c["default"],DiffViewer:p["default"]}};window.iconolab||(window.iconolab=y)},function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array},i="function"==typeof Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e},o=function(t){return"_"===t.substr(0,1)?t.slice(1):t},a=function(t){return"_t"===t?-1:"_"===t.substr(0,1)?parseInt(t.slice(1),10):parseInt(t,10)+.1},s=function(t,e){return a(t)-a(e)},u=function(){};u.prototype.format=function(t,e){var n={};return this.prepareContext(n),this.recurse(n,t,e),this.finalize(n)},u.prototype.prepareContext=function(t){t.buffer=[],t.out=function(){this.buffer.push.apply(this.buffer,arguments)}},u.prototype.typeFormattterNotFound=function(t,e){throw new Error("cannot format delta type: "+e)},u.prototype.typeFormattterErrorFormatter=function(t,e){return e.toString()},u.prototype.finalize=function(t){if(r(t.buffer))return t.buffer.join("")},u.prototype.recurse=function(t,e,n,r,i,o,a){var s=e&&o,u=s?o.value:n;if("undefined"!=typeof e||"undefined"!=typeof r){var l=this.getDeltaType(e,o),c="node"===l?"a"===e._t?"array":"object":"";"undefined"!=typeof r?this.nodeBegin(t,r,i,l,c,a):this.rootBegin(t,l,c);var f;try{f=this["format_"+l]||this.typeFormattterNotFound(t,l),f.call(this,t,e,u,r,i,o)}catch(h){this.typeFormattterErrorFormatter(t,h,e,u,r,i,o),"undefined"!=typeof console&&console.error&&console.error(h.stack)}"undefined"!=typeof r?this.nodeEnd(t,r,i,l,c,a):this.rootEnd(t,l,c)}},u.prototype.formatDeltaChildren=function(t,e,n){var r=this;this.forEachDeltaKey(e,n,function(i,o,a,s){r.recurse(t,e[i],n?n[o]:void 0,i,o,a,s)})},u.prototype.forEachDeltaKey=function(t,e,n){var a,u=i(t),l="a"===t._t,c={};if("undefined"!=typeof e)for(a in e)"undefined"!=typeof t[a]||l&&"undefined"!=typeof t["_"+a]||u.push(a);for(a in t){var f=t[a];r(f)&&3===f[2]&&(c[f[1].toString()]={key:a,value:e&&e[parseInt(a.substr(1))]},this.includeMoveDestinations!==!1&&"undefined"==typeof e&&"undefined"==typeof t[f[1]]&&u.push(f[1].toString()))}l?u.sort(s):u.sort();for(var h=0,d=u.length;ht.length?n:t}),l.value=f.join("")}else l.value=n.slice(s,s+l.count).join("");s+=l.count,l.added||(u+=l.count)}}var h=e[a-1];return a>1&&(h.added||h.removed)&&t.equals("",h.value)&&(e[a-2].value+=h.value,e.pop()),e}function i(t){return{newPos:t.newPos,components:t.components.slice(0)}}e.__esModule=!0,e["default"]=n,n.prototype={diff:function(t,e){function n(t){return s?(setTimeout(function(){s(void 0,t)},0),!0):t}function o(){for(var o=-1*f;o<=f;o+=2){var a=void 0,s=d[o-1],h=d[o+1],p=(h?h.newPos:0)-o;s&&(d[o-1]=void 0);var v=s&&s.newPos+1=l&&p+1>=c)return n(r(u,a.components,e,t,u.useLongestToken));d[o]=a}else d[o]=void 0}f++}var a=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],s=a.callback;"function"==typeof a&&(s=a,a={}),this.options=a;var u=this;t=this.castInput(t),e=this.castInput(e),t=this.removeEmpty(this.tokenize(t)),e=this.removeEmpty(this.tokenize(e));var l=e.length,c=t.length,f=1,h=l+c,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],e,t,0);if(d[0].newPos+1>=l&&p+1>=c)return n([{value:e.join(""),count:e.length}]);if(s)!function g(){setTimeout(function(){return f>h?s():void(o()||g())},0)}();else for(;f<=h;){var v=o();if(v)return v}},pushComponent:function(t,e,n){var r=t[t.length-1];r&&r.added===e&&r.removed===n?t[t.length-1]={count:r.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,r){for(var i=e.length,o=n.length,a=t.newPos,s=a-r,u=0;a+1
'),t.out(t.indentPad),t.out('
'),t.out(e),t.out('
'),t.out(n),t.out("
")}},o.prototype.typeFormattterErrorFormatter=function(t,e){t.row("",'
'+e+"
")},o.prototype.formatTextDiffString=function(t,e){var n=this.parseTextDiff(e);t.out('
    ');for(var r=0,i=n.length;r
    '+o.location.line+''+o.location.chr+'
    ');for(var a=o.pieces,s=0,u=a.length;s'+l.text+"")}t.out("
    ")}t.out("
")},o.prototype.rootBegin=function(t,e,n){t.out(''),"node"===e&&(t.row("{"),t.indent()),"array"===n&&t.row('"_t": "a",',"Array delta (member names indicate array indices)")},o.prototype.rootEnd=function(t,e){"node"===e&&(t.indent(-1),t.row("}")),t.out("
")},o.prototype.nodeBegin=function(t,e,n,r,i){t.row("""+e+"": {"),"node"===r&&t.indent(),"array"===i&&t.row('"_t": "a",',"Array delta (member names indicate array indices)")},o.prototype.nodeEnd=function(t,e,n,r,i,o){"node"===r&&t.indent(-1),t.row("}"+(o?"":","))},o.prototype.format_unchanged=function(){},o.prototype.format_movedestination=function(){},o.prototype.format_node=function(t,e,n){this.formatDeltaChildren(t,e,n)};var a=function(t){return'
"'+t+""
"},s={added:function(t,e,n,r){var i="
([newValue])
";return"undefined"==typeof r?"new value"+i:"number"==typeof r?"insert at index "+r+i:"add property "+a(r)+i},modified:function(t,e,n,r){var i="
([previousValue, newValue])
";return"undefined"==typeof r?"modify value"+i:"number"==typeof r?"modify at index "+r+i:"modify property "+a(r)+i},deleted:function(t,e,n,r){var i="
([previousValue, 0, 0])
";return"undefined"==typeof r?"delete value"+i:"number"==typeof r?"remove index "+r+i:"delete property "+a(r)+i},moved:function(t,e,n,r){return'move from index '+r+' to index '+t[1]+""},textdiff:function(t,e,n,r){var i="undefined"==typeof r?"":"number"==typeof r?" at index "+r:" at property "+a(r);return"text diff"+i+', format is a variation of Unidiff'}},u=function(t,e){var n=this.getDeltaType(e),r=s[n],i=r&&r.apply(r,Array.prototype.slice.call(arguments,1)),o=JSON.stringify(e,null,2);"textdiff"===n&&(o=o.split("\\n").join('\\n"+\n "')),t.indent(),t.row(o,i),t.indent(-1)};o.prototype.format_added=u,o.prototype.format_modified=u,o.prototype.format_deleted=u,o.prototype.format_moved=u,o.prototype.format_textdiff=u,e.AnnotatedFormatter=o;var l;e.format=function(t,e){return l||(l=new o),l.format(t,e)}},function(t,e,n){"use strict";function r(t){for(var e=t,n=[[/&/g,"&"],[//g,">"],[/'/g,"'"],[/"/g,"""]],r=0;r'+e+"")},a.prototype.formatValue=function(t,e){t.out("
"+r(JSON.stringify(e,null,2))+"
")},a.prototype.formatTextDiffString=function(t,e){var n=this.parseTextDiff(e);t.out('
    ');for(var i=0,o=n.length;i
    '+a.location.line+''+a.location.chr+'
    ');for(var s=a.pieces,u=0,l=s.length;u'+r(unescape(c.text))+"")}t.out("
    ")}t.out("
")};var s=function(t){t=t||document;var e=function(t){return t.textContent||t.innerText},n=function(t,e,n){for(var r=t.querySelectorAll(e),i=0,o=r.length;i0?0:l)+"px";var c=l>0?"M30,0 Q-10,"+Math.round(l/2)+" 26,"+(l-4):"M30,"+-l+" Q-10,"+Math.round(-l/2)+" 26,4";o.setAttribute("d",c),i.style.display=""}catch(f){return}})};a.prototype.rootBegin=function(t,e,n){var r="jsondiffpatch-"+e+(n?" jsondiffpatch-child-node-type-"+n:"");t.out('
')},a.prototype.rootEnd=function(t){t.out("
"+(t.hasArrows?'":""))},a.prototype.nodeBegin=function(t,e,n,r,i){var o="jsondiffpatch-"+r+(i?" jsondiffpatch-child-node-type-"+i:"");t.out('
  • '+n+"
    ")},a.prototype.nodeEnd=function(t){t.out("
  • ")},a.prototype.format_unchanged=function(t,e,n){"undefined"!=typeof n&&(t.out('
    '),this.formatValue(t,n),t.out("
    "))},a.prototype.format_movedestination=function(t,e,n){"undefined"!=typeof n&&(t.out('
    '),this.formatValue(t,n),t.out("
    "))},a.prototype.format_node=function(t,e,n){var r="a"===e._t?"array":"object";t.out('
      '),this.formatDeltaChildren(t,e,n),t.out("
    ")},a.prototype.format_added=function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out("
    ")},a.prototype.format_modified=function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out('
    '),this.formatValue(t,e[1]),t.out("
    ")},a.prototype.format_deleted=function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out("
    ")},a.prototype.format_moved=function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out('
    '+e[1]+"
    "),t.out('
    \t \t \t \t \t \t \t \t \t
    '),t.hasArrows=!0},a.prototype.format_textdiff=function(t,e){t.out('
    '),this.formatTextDiffString(t,e[0]),t.out("
    ")};var u=function(t,e,n){var r=e||document.body,i="jsondiffpatch-unchanged-",o={showing:i+"showing",hiding:i+"hiding",visible:i+"visible",hidden:i+"hidden"},a=r.classList;if(a){if(!n)return a.remove(o.showing),a.remove(o.hiding),a.remove(o.visible),a.remove(o.hidden),void(t===!1&&a.add(o.hidden));t===!1?(a.remove(o.showing),a.add(o.visible),setTimeout(function(){a.add(o.hiding)},10)):(a.remove(o.hiding),a.add(o.showing),a.remove(o.hidden));var u=setInterval(function(){s(r)},100);setTimeout(function(){a.remove(o.showing),a.remove(o.hiding),t===!1?(a.add(o.hidden),a.remove(o.visible)):(a.add(o.visible),a.remove(o.hidden)),setTimeout(function(){a.remove(o.visible),clearInterval(u)},n+400)},n)}},l=function(t,e){return u(!1,t,e)};e.HtmlFormatter=a,e.showUnchanged=u,e.hideUnchanged=l;var c;e.format=function(t,e){return c||(c=new a),c.format(t,e)}},function(t,e,n){"use strict";var r=n(7);if(e.base=n(1),e.html=n(9),e.annotated=n(8),e.jsonpatch=n(11),!r.isBrowser){var i="./console";e.console=n(136)(i)}},function(t,e,n){"use strict";!function(){function t(){this.includeMoveDestinations=!1}function r(t){return t[t.length-1]}function i(t,e){return t.sort(e),t}function o(t){return i(t,function(t,e){var n=t.path.split("/"),i=e.path.split("/");return n.length!==i.length?n.length-i.length:h(r(n),r(i))})}function a(t,e){var n=[],r=[];return t.forEach(function(t){var i=e(t)?n:r;i.push(t)}),[n,r]}function s(t){var e=a(t,function(t){return"remove"===t.op}),n=e[0],r=e[1],i=o(n);return i.concat(r)}var u=n(1),l=u.BaseFormatter,c={added:"add",deleted:"remove",modified:"replace",moved:"moved",movedestination:"movedestination",unchanged:"unchanged",error:"error",textDiffLine:"textDiffLine"};t.prototype=new l,t.prototype.prepareContext=function(t){l.prototype.prepareContext.call(this,t),t.result=[],t.path=[],t.pushCurrentOp=function(t,e){var n={op:t,path:this.currentPath()};"undefined"!=typeof e&&(n.value=e),this.result.push(n)},t.currentPath=function(){return"/"+this.path.join("/")}},t.prototype.typeFormattterErrorFormatter=function(t,e){t.out("[ERROR]"+e)},t.prototype.rootBegin=function(){},t.prototype.rootEnd=function(){},t.prototype.nodeBegin=function(t,e,n){t.path.push(n)},t.prototype.nodeEnd=function(t){t.path.pop()},t.prototype.format_unchanged=function(t,e,n){"undefined"!=typeof n&&t.pushCurrentOp(c.unchanged,n)},t.prototype.format_movedestination=function(t,e,n){"undefined"!=typeof n&&t.pushCurrentOp(c.movedestination,n)},t.prototype.format_node=function(t,e,n){this.formatDeltaChildren(t,e,n)},t.prototype.format_added=function(t,e){t.pushCurrentOp(c.added,e[0])},t.prototype.format_modified=function(t,e){t.pushCurrentOp(c.modified,e[1])},t.prototype.format_deleted=function(t){t.pushCurrentOp(c.deleted)},t.prototype.format_moved=function(t,e){t.pushCurrentOp(c.moved,e[1])},t.prototype.format_textdiff=function(){throw"not implimented"},t.prototype.format=function(t,e){var n={};return this.prepareContext(n),this.recurse(n,t,e),n.result},e.JSONFormatter=t;var f,h=function(t,e){var n=parseInt(t,10),r=parseInt(e,10);return isNaN(n)||isNaN(r)?0:r-n},d=function(e,n){return f||(f=new t),s(f.format(e,n))};e.log=function(t,e){console.log(d(t,e))},e.format=d}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.generateId=void 0;var i=n(117),o=r(i),a=(0,o["default"])({}),s=function(){var t=0,e="item_";return function(n){return n="string"==typeof n?n:e,t+=1,n+t}}();e.generateId=s,e.eventEmitter=a},function(t,e,n){"use strict";t.exports=!n(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){"use strict";t.exports=function(t,e){var n;return"string"==typeof e&&(n=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d*))?(Z|([+\-])(\d{2}):(\d{2}))$/.exec(e))?new Date(Date.UTC(+n[1],+n[2]-1,+n[3],+n[4],+n[5],+n[6],+(n[7]||0))):e}},function(t,e,n){"use strict";var r=n(63),i=n(1),o=i.BaseFormatter,a={added:r.green,deleted:r.red,movedestination:r.gray,moved:r.yellow,unchanged:r.gray,error:r.white.bgRed,textDiffLine:r.gray},s=function(){this.includeMoveDestinations=!1};s.prototype=new o,s.prototype.prepareContext=function(t){o.prototype.prepareContext.call(this,t),t.indent=function(t){this.indentLevel=(this.indentLevel||0)+("undefined"==typeof t?1:t),this.indentPad=new Array(this.indentLevel+1).join(" "),this.outLine()},t.outLine=function(){this.buffer.push("\n"+(this.indentPad||""))},t.out=function(){for(var t=0,e=arguments.length;t "),t.pushColor(a.added),this.formatValue(t,e[1]),t.popColor()},s.prototype.format_deleted=function(t,e){this.formatValue(t,e[0])},s.prototype.format_moved=function(t,e){t.out("==> "+e[1])},s.prototype.format_textdiff=function(t,e){this.formatTextDiffString(t,e[0])},e.ConsoleFormatter=s;var u,l=function(t,e){return u||(u=new s),u.format(t,e)};e.log=function(t,e){console.log(l(t,e))},e.format=l},function(t,e,n){"use strict";var r=n(7),i=n(24).DiffPatcher;e.DiffPatcher=i,e.create=function(t){return new i(t)},e.dateReviver=n(14);var o;if(e.diff=function(){return o||(o=new i),o.diff.apply(o,arguments)},e.patch=function(){return o||(o=new i),o.patch.apply(o,arguments)},e.unpatch=function(){return o||(o=new i),o.unpatch.apply(o,arguments)},e.reverse=function(){return o||(o=new i),o.reverse.apply(o,arguments)},r.isBrowser)e.homepage="{{package-homepage}}",e.version="{{package-version}}";else{var a="../package.json",s=n(48)(a);e.homepage=s.homepage,e.version=s.version;var u="./formatters",l=n(48)(u);e.formatters=l,e.console=l.console}},function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(t){this.name=t,this.filters=[]};r.prototype.process=function(t){if(!this.processor)throw new Error("add this pipe to a processor before using it");for(var e=this.debug,r=this.filters.length,i=t,o=0;oe.length?t:e,l=t.length>e.length?e:t,c=u.indexOf(l);if(c!=-1)return s=[[o,u.substring(0,c)],[a,l],[o,u.substring(c+l.length)]],t.length>e.length&&(s[0][0]=s[2][0]=i),s;if(1==l.length)return[[i,t],[o,e]];u=l=null;var f=this.diff_halfMatch_(t,e);if(f){var h=f[0],d=f[1],p=f[2],v=f[3],g=f[4],m=this.diff_main(h,p,n,r),y=this.diff_main(d,v,n,r);return m.concat([[a,g]],y)}return n&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,r):this.diff_bisect_(t,e,r)},n.prototype.diff_lineMode_=function(t,e,n){var r=this.diff_linesToChars_(t,e);t=r[0],e=r[1];var s=r[2],u=this.diff_bisect_(t,e,n);this.diff_charsToLines_(u,s),this.diff_cleanupSemantic(u),u.push([a,""]);for(var l=0,c=0,f=0,h="",d="";l=1&&f>=1){var r=this.diff_main(h,d,!1,n);u.splice(l-c-f,c+f),l=l-c-f;for(var p=r.length-1;p>=0;p--)u.splice(l,0,r[p]);l+=r.length}f=0,c=0,h="",d=""}l++}return u.pop(),u},n.prototype.diff_bisect_=function(t,e,n){for(var r=t.length,a=e.length,s=Math.ceil((r+a)/2),u=s,l=2*s,c=new Array(l),f=new Array(l),h=0;hn);b++){for(var x=-b+v;x<=b-g;x+=2){var _,w=u+x;_=x==-b||x!=b&&c[w-1]r)g+=2;else if(C>a)v+=2;else if(p){var k=u+d-x;if(k>=0&&k=T)return this.diff_bisectSplit_(t,e,_,C,n)}}}for(var S=-b+m;S<=b-y;S+=2){var T,k=u+S;T=S==-b||S!=b&&f[k-1]r)y+=2;else if(A>a)m+=2;else if(!p){var w=u+d-S;if(w>=0&&w=T)return this.diff_bisectSplit_(t,e,_,C,n)}}}}return[[i,t],[o,e]]},n.prototype.diff_bisectSplit_=function(t,e,n,r,i){var o=t.substring(0,n),a=e.substring(0,r),s=t.substring(n),u=e.substring(r),l=this.diff_main(o,a,!1,i),c=this.diff_main(s,u,!1,i);return l.concat(c)},n.prototype.diff_linesToChars_=function(t,e){function n(t){for(var e="",n=0,o=-1,a=r.length;or?t=t.substring(n-r):n=t.length?[r,i,o,s,c]:null}if(this.Diff_Timeout<=0)return null;var r=t.length>e.length?t:e,i=t.length>e.length?e:t;if(r.length<4||2*i.lengthu[4].length?s:u:s;var l,c,f,h;t.length>e.length?(l=o[0],c=o[1],f=o[2],h=o[3]):(f=o[0],h=o[1],l=o[2],c=o[3]);var d=o[4];return[l,c,f,h,d]},n.prototype.diff_cleanupSemantic=function(t){for(var e=!1,n=[],r=0,s=null,u=0,l=0,c=0,f=0,h=0;u0?n[r-1]:-1,l=0,c=0,f=0,h=0,s=null,e=!0)),u++;for(e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),u=1;u=d.length/2||v>=p.length/2)&&(t.splice(u,0,[a,p.substring(0,v)]),t[u-1][1]=d.substring(0,d.length-v),t[u+1][1]=p.substring(v),u++),u++}u++}},n.prototype.diff_cleanupSemanticLossless=function(t){function e(t,e){if(!t||!e)return 5;var a=0;return(t.charAt(t.length-1).match(n)||e.charAt(0).match(n))&&(a++,(t.charAt(t.length-1).match(r)||e.charAt(0).match(r))&&(a++,(t.charAt(t.length-1).match(i)||e.charAt(0).match(i))&&(a++,(t.match(o)||e.match(s))&&a++))),a}for(var n=/[^a-zA-Z0-9]/,r=/\s/,i=/[\r\n]/,o=/\n\r?\n$/,s=/^\r?\n\r?\n/,u=1;u=m&&(m=y,p=l,v=c,g=f)}t[u-1][1]!=p&&(p?t[u-1][1]=p:(t.splice(u-1,1),u--),t[u][1]=v,g?t[u+1][1]=g:(t.splice(u+1,1),u--))}u++}},n.prototype.diff_cleanupEfficiency=function(t){for(var e=!1,n=[],r=0,s="",u=0,l=!1,c=!1,f=!1,h=!1;u0?n[r-1]:-1,f=h=!1),e=!0)),u++;e&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push([a,""]);for(var e,n=0,r=0,s=0,u="",l="";n1?(0!==r&&0!==s&&(e=this.diff_commonPrefix(l,u),0!==e&&(n-r-s>0&&t[n-r-s-1][0]==a?t[n-r-s-1][1]+=l.substring(0,e):(t.splice(0,0,[a,l.substring(0,e)]),n++),l=l.substring(e),u=u.substring(e)),e=this.diff_commonSuffix(l,u),0!==e&&(t[n][1]=l.substring(l.length-e)+t[n][1],l=l.substring(0,l.length-e),u=u.substring(0,u.length-e))),0===r?t.splice(n-r-s,r+s,[o,l]):0===s?t.splice(n-r-s,r+s,[i,u]):t.splice(n-r-s,r+s,[i,u],[o,l]),n=n-r-s+(r?1:0)+(s?1:0)+1):0!==n&&t[n-1][0]==a?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,s=0,r=0,u="",l=""}""===t[t.length-1][1]&&t.pop();var c=!1;for(n=1;ne));n++)s=r,u=a;return t.length!=n&&t[n][0]===i?u:u+(e-s)},n.prototype.diff_prettyHtml=function(t){for(var e=[],n=0,r=/&/g,s=//g,l=/\n/g,c=0;c");switch(f){case o:e[c]=''+d+"";break;case i:e[c]=''+d+"";break;case a:e[c]=""+d+""}f!==i&&(n+=h.length)}return e.join("")},n.prototype.diff_text1=function(t){for(var e=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(e),o=this,a=this.Match_Threshold,s=t.indexOf(e,n);s!=-1&&(a=Math.min(r(0,s),a),s=t.lastIndexOf(e,n+e.length),s!=-1&&(a=Math.min(r(0,s),a)));var u=1<=p;m--){var y=i[t.charAt(m-1)];if(0===d?g[m]=(g[m+1]<<1|1)&y:g[m]=(g[m+1]<<1|1)&y|((f[m+1]|f[m])<<1|1)|f[m+1],g[m]&u){var b=r(d,m-1);if(b<=a){if(a=b,s=m-1,!(s>n))break;p=Math.max(1,2*n-s)}}}if(r(d+1,n)>a)break;f=g}return s},n.prototype.match_alphabet_=function(t){for(var e={},n=0;n2&&(this.diff_cleanupSemantic(l),this.diff_cleanupEfficiency(l));else if(t&&"object"==("undefined"==typeof t?"undefined":r(t))&&"undefined"==typeof e&&"undefined"==typeof s)l=t,u=this.diff_text1(l);else if("string"==typeof t&&e&&"object"==("undefined"==typeof e?"undefined":r(e))&&"undefined"==typeof s)u=t,l=e;else{if("string"!=typeof t||"string"!=typeof e||!s||"object"!=("undefined"==typeof s?"undefined":r(s)))throw new Error("Unknown call format to patch_make.");u=t,l=s}if(0===l.length)return[];for(var c=[],f=new n.patch_obj,h=0,d=0,p=0,v=u,g=u,m=0;m=2*this.Patch_Margin&&h&&(this.patch_addContext_(f,v),c.push(f),f=new n.patch_obj,h=0,v=g,d=p)}y!==o&&(d+=b.length),y!==i&&(p+=b.length)}return h&&(this.patch_addContext_(f,v),c.push(f)),c},n.prototype.patch_deepCopy=function(t){for(var e=[],r=0;rthis.Match_MaxBits?(l=this.match_main(e,f.substring(0,this.Match_MaxBits),c),l!=-1&&(h=this.match_main(e,f.substring(f.length-this.Match_MaxBits),c+f.length-this.Match_MaxBits),(h==-1||l>=h)&&(l=-1))):l=this.match_main(e,f,c),l==-1)s[u]=!1,r-=t[u].length2-t[u].length1;else{s[u]=!0,r=l-c;var d;if(d=h==-1?e.substring(l,l+f.length):e.substring(l,h+this.Match_MaxBits),f==d)e=e.substring(0,l)+this.diff_text2(t[u].diffs)+e.substring(l+f.length);else{var p=this.diff_main(f,d,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(p)/f.length>this.Patch_DeleteThreshold)s[u]=!1;else{this.diff_cleanupSemanticLossless(p);for(var v,g=0,m=0;mo[0][1].length){var s=e-o[0][1].length;o[0][1]=n.substring(o[0][1].length)+o[0][1],i.start1-=s,i.start2-=s,i.length1+=s,i.length2+=s}if(i=t[t.length-1],o=i.diffs,0==o.length||o[o.length-1][0]!=a)o.push([a,n]),i.length1+=e,i.length2+=e;else if(e>o[o.length-1][1].length){var s=e-o[o.length-1][1].length;o[o.length-1][1]+=n.substring(0,s),i.length1+=s,i.length2+=s}return n},n.prototype.patch_splitMax=function(t){for(var e=this.Match_MaxBits,r=0;re){var s=t[r];t.splice(r--,1);for(var u=s.start1,l=s.start2,c="";0!==s.diffs.length;){var f=new n.patch_obj,h=!0;for(f.start1=u-c.length,f.start2=l-c.length,""!==c&&(f.length1=f.length2=c.length,f.diffs.push([a,c]));0!==s.diffs.length&&f.length12*e?(f.length1+=p.length,u+=p.length,h=!1,f.diffs.push([d,p]),s.diffs.shift()):(p=p.substring(0,e-f.length1-this.Patch_Margin),f.length1+=p.length,u+=p.length,d===a?(f.length2+=p.length,l+=p.length):h=!1,f.diffs.push([d,p]),p==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(p.length))}c=this.diff_text2(f.diffs),c=c.substring(c.length-this.Patch_Margin);var v=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);""!==v&&(f.length1+=v.length,f.length2+=v.length,0!==f.diffs.length&&f.diffs[f.diffs.length-1][0]===a?f.diffs[f.diffs.length-1][1]+=v:f.diffs.push([a,v])),h||t.splice(++r,0,f)}}},n.prototype.patch_toText=function(t){for(var e=[],n=0;n0&&m>0&&!u.objectHash&&"boolean"!=typeof u.matchByPosition&&(u.matchByPosition=!r(p,v,g,m));f0)for(var j=0;j=0;e--){n=o[e];var l=r["_"+n],f=i.splice(n,1)[0];l[2]===c&&a.push({index:l[1],value:f})}a=a.sort(p.numericallyBy("index"));var h=a.length;for(e=0;e0)for(e=0;er?r++:a>=r&&st[r-1][i]?a(t,e,n,r,i-1,o):a(t,e,n,r-1,i,o)},o=function(t,e,o,a){a=a||{};var s=r(t,e,o||n,a),u=i(s,t,e,t.length,e.length,a);return"string"==typeof t&&"string"==typeof e&&(u.sequence=u.sequence.join("")),u};e.get=o},function(t,e,n){"use strict";var r=n(4).DiffContext,i=n(5).PatchContext,o=n(6).ReverseContext,a=function(t){if(t&&t.children){for(var e,n=t.children.length,r=t.result,i=0;i0?r:n)(t)}},function(t,e,n){"use strict";var r=n(36),i=n(34);t.exports=function(t){return r(i(t))}},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e1)for(var r=0,i=n.length;r=1&&(delete n[i],o.s=1,t--,function(t){setTimeout(function(){e("mina.finish."+t.id,t)})}(o)),o.update()}t&&r(y)},m=function b(t,e,i,o,a,u,m){var y={id:s(),start:t,end:e,b:i,s:0,dur:o-i,spd:1,get:a,set:u,easing:m||b.linear,status:l,speed:c,duration:f,stop:h,pause:d,resume:p,update:v};n[y.id]=y;var x,_=0;for(x in n)if(n.hasOwnProperty(x)&&(_++,2==_))break;return 1==_&&r(g),y};return m.time=u,m.getById=function(t){return n[t]||null},m.linear=function(t){return t},m.easeout=function(t){return Math.pow(t,1.7)},m.easein=function(t){return Math.pow(t,.48)},m.easeinout=function(t){if(1==t)return 1;if(0==t)return 0;var e=.48-t/1.04,n=Math.sqrt(.1734+e*e),r=n-e,i=Math.pow(Math.abs(r),1/3)*(r<0?-1:1),o=-n-e,a=Math.pow(Math.abs(o),1/3)*(o<0?-1:1),s=i+a+.5;return 3*(1-s)*s*s+s*s*s},m.backin=function(t){if(1==t)return 1;var e=1.70158;return t*t*((e+1)*t-e)},m.backout=function(t){if(0==t)return 0;t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},m.elastic=function(t){return t==!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1},m.bounce=function(t){var e,n=7.5625,r=2.75;return t<1/r?e=n*t*t:t<2/r?(t-=1.5/r,e=n*t*t+.75):t<2.5/r?(t-=2.25/r,e=n*t*t+.9375):(t-=2.625/r,e=n*t*t+.984375),e},t.mina=m,m}("undefined"==typeof e?function(){}:e),r=function(t){function n(t,e){if(t){if(t.nodeType)return C(t);if(i(t,"array")&&n.set)return n.set.apply(n,t);if(t instanceof b)return t;if(null==e)return t=T.doc.querySelector(String(t)),C(t)}return t=null==t?"100%":t,e=null==e?"100%":e,new w(t,e)}function r(t,e){if(e){if("#text"==t&&(t=T.doc.createTextNode(e.text||e["#text"]||"")),"#comment"==t&&(t=T.doc.createComment(e.text||e["#text"]||"")),"string"==typeof t&&(t=r(t)),"string"==typeof e)return 1==t.nodeType?"xlink:"==e.substring(0,6)?t.getAttributeNS(W,e.substring(6)):"xml:"==e.substring(0,4)?t.getAttributeNS(X,e.substring(4)):t.getAttribute(e):"text"==e?t.nodeValue:null;if(1==t.nodeType){for(var n in e)if(e[S](n)){var i=A(e[n]);i?"xlink:"==n.substring(0,6)?t.setAttributeNS(W,n.substring(6),i):"xml:"==n.substring(0,4)?t.setAttributeNS(X,n.substring(4),i):t.setAttribute(n,i):t.removeAttribute(n)}}else"text"in e&&(t.nodeValue=e.text)}else t=T.doc.createElementNS(X,t);return t}function i(t,e){return e=A.prototype.toLowerCase.call(e),"finite"==e?isFinite(t):!("array"!=e||!(t instanceof Array||Array.isArray&&Array.isArray(t)))||("null"==e&&null===t||e==("undefined"==typeof t?"undefined":a(t))&&null!==t||"object"==e&&t===Object(t)||F.call(t).slice(8,-1).toLowerCase()==e)}function o(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)t[S](n)&&(e[n]=o(t[n]));return e}function s(t,e){for(var n=0,r=t.length;n=1e3&&delete a[u.shift()],u.push(o),a[o]=t.apply(e,i),n?n(a[o]):a[o])}return r}function l(t,e,n,r,i,o){if(null==i){var a=t-n,s=e-r;return a||s?(180+180*O.atan2(-s,-a)/P+360)%360:0}return l(t,e,i,o)-l(n,r,i,o)}function c(t){return t%360*P/180}function f(t){return 180*t/P%360}function h(t){var e=[];return t=t.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,function(t,n,r){return r=r.split(/\s*,\s*|\s+/),"rotate"==n&&1==r.length&&r.push(0,0),"scale"==n&&(r.length>2?r=r.slice(0,2):2==r.length&&r.push(0,0),1==r.length&&r.push(r[0],0,0)),"skewX"==n?e.push(["m",1,0,O.tan(c(r[0])),1,0,0]):"skewY"==n?e.push(["m",1,O.tan(c(r[0])),0,1,0,0]):e.push([n.charAt(0)].concat(r)),t}),e}function d(t,e){var r=et(t),i=new n.Matrix;if(r)for(var o=0,a=r.length;o.5;){var d,p,v,g,m,y;(v=o-c)>=0&&(m=r(d=u.getPointAtLength(v)))t-n)return e-o+t}return e},n.getRGB=u(function(t){if(!t||(t=A(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Q};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:Q};if(!(R[S](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=G(t)),!t)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Q};var e,r,o,a,s,u,l=t.match(B);return l?(l[2]&&(o=E(l[2].substring(5),16),r=E(l[2].substring(3,5),16),e=E(l[2].substring(1,3),16)),l[3]&&(o=E((s=l[3].charAt(3))+s,16),r=E((s=l[3].charAt(2))+s,16),e=E((s=l[3].charAt(1))+s,16)),l[4]&&(u=l[4].split(L),e=j(u[0]),"%"==u[0].slice(-1)&&(e*=2.55),r=j(u[1]),"%"==u[1].slice(-1)&&(r*=2.55),o=j(u[2]),"%"==u[2].slice(-1)&&(o*=2.55),"rgba"==l[1].toLowerCase().slice(0,4)&&(a=j(u[3])),u[3]&&"%"==u[3].slice(-1)&&(a/=100)),l[5]?(u=l[5].split(L),e=j(u[0]),"%"==u[0].slice(-1)&&(e/=100),r=j(u[1]),"%"==u[1].slice(-1)&&(r/=100),o=j(u[2]),"%"==u[2].slice(-1)&&(o/=100),("deg"==u[0].slice(-3)||"°"==u[0].slice(-1))&&(e/=360),"hsba"==l[1].toLowerCase().slice(0,4)&&(a=j(u[3])),u[3]&&"%"==u[3].slice(-1)&&(a/=100),n.hsb2rgb(e,r,o,a)):l[6]?(u=l[6].split(L),e=j(u[0]),"%"==u[0].slice(-1)&&(e/=100),r=j(u[1]),"%"==u[1].slice(-1)&&(r/=100),o=j(u[2]),"%"==u[2].slice(-1)&&(o/=100),("deg"==u[0].slice(-3)||"°"==u[0].slice(-1))&&(e/=360),"hsla"==l[1].toLowerCase().slice(0,4)&&(a=j(u[3])),u[3]&&"%"==u[3].slice(-1)&&(a/=100),n.hsl2rgb(e,r,o,a)):(e=N(O.round(e),255),r=N(O.round(r),255),o=N(O.round(o),255),a=N($(a,0),1),l={r:e,g:r,b:o,toString:Q},l.hex="#"+(16777216|o|r<<8|e<<16).toString(16).slice(1),l.opacity=i(a,"finite")?a:1,l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Q}},n),n.hsb=u(function(t,e,r){return n.hsb2rgb(t,e,r).hex}),n.hsl=u(function(t,e,r){return n.hsl2rgb(t,e,r).hex}),n.rgb=u(function(t,e,n,r){if(i(r,"finite")){var o=O.round;return"rgba("+[o(t),o(e),o(n),+r.toFixed(2)]+")"}return"#"+(16777216|n|e<<8|t<<16).toString(16).slice(1)});var G=function(t){var e=T.doc.getElementsByTagName("head")[0]||T.doc.getElementsByTagName("svg")[0],n="rgb(255, 0, 0)";return(G=u(function(t){if("red"==t.toLowerCase())return n;e.style.color=n,e.style.color=t;var r=T.doc.defaultView.getComputedStyle(e,D).getPropertyValue("color");return r==n?null:r}))(t)},Z=function(){return"hsb("+[this.h,this.s,this.b]+")"},Y=function(){return"hsl("+[this.h,this.s,this.l]+")"},Q=function(){return 1==this.opacity||null==this.opacity?this.hex:"rgba("+[this.r,this.g,this.b,this.opacity]+")"},K=function(t,e,r){if(null==e&&i(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(r=t.b,e=t.g,t=t.r),null==e&&i(t,string)){var o=n.getRGB(t);t=o.r,e=o.g,r=o.b}return(t>1||e>1||r>1)&&(t/=255,e/=255,r/=255),[t,e,r]},tt=function(t,e,r,o){t=O.round(255*t),e=O.round(255*e),r=O.round(255*r);var a={r:t,g:e,b:r,opacity:i(o,"finite")?o:1,hex:n.rgb(t,e,r),toString:Q};return i(o,"finite")&&(a.opacity=o),a};n.color=function(t){var e;return i(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=n.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):i(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=n.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):(i(t,"string")&&(t=n.getRGB(t)),i(t,"object")&&"r"in t&&"g"in t&&"b"in t&&!("error"in t)?(e=n.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=n.rgb2hsb(t),t.v=e.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1,t.error=1)),t.toString=Q,t},n.hsb2rgb=function(t,e,n,r){i(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,r=t.o,t=t.h),t*=360;var o,a,s,u,l;return t=t%360/60,l=n*e,u=l*(1-M(t%2-1)),o=a=s=n-l,t=~~t,o+=[l,u,0,0,u,l][t],a+=[u,l,l,u,0,0][t],s+=[0,0,u,l,l,u][t],tt(o,a,s,r)},n.hsl2rgb=function(t,e,n,r){i(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var o,a,s,u,l;return t=t%360/60,l=2*e*(n<.5?n:1-n),u=l*(1-M(t%2-1)),o=a=s=n-l/2,t=~~t,o+=[l,u,0,0,u,l][t],a+=[u,l,l,u,0,0][t],s+=[0,0,u,l,l,u][t],tt(o,a,s,r)},n.rgb2hsb=function(t,e,n){n=K(t,e,n),t=n[0],e=n[1],n=n[2];var r,i,o,a;return o=$(t,e,n),a=o-N(t,e,n),r=0==a?null:o==t?(e-n)/a:o==e?(n-t)/a+2:(t-e)/a+4,r=(r+360)%6*60/360,i=0==a?0:a/o,{h:r,s:i,b:o,toString:Z}},n.rgb2hsl=function(t,e,n){n=K(t,e,n),t=n[0],e=n[1],n=n[2];var r,i,o,a,s,u;return a=$(t,e,n),s=N(t,e,n),u=a-s,r=0==u?null:a==t?(e-n)/u:a==e?(n-t)/u+2:(t-e)/u+4,r=(r+360)%6*60/360,o=(a+s)/2,i=0==u?0:o<.5?u/(2*o):u/(2-2*o),{h:r,s:i,l:o,toString:Y}},n.parsePathString=function(t){if(!t)return null;var e=n.path(t);if(e.arr)return n.path.clone(e.arr);var r={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},o=[];return i(t,"array")&&i(t[0],"array")&&(o=n.path.clone(t)),o.length||A(t).replace(I,function(t,e,n){var i=[],a=e.toLowerCase();if(n.replace(q,function(t,e){e&&i.push(+e)}),"m"==a&&i.length>2&&(o.push([e].concat(i.splice(0,2))),a="l",e="m"==e?"l":"L"),"o"==a&&1==i.length&&o.push([e,i[0]]),"r"==a)o.push([e].concat(i));else for(;i.length>=r[a]&&(o.push([e].concat(i.splice(0,r[a]))),r[a]););}),o.toString=n.path.toString,e.arr=n.path.clone(o),o};var et=n.parseTransformString=function(t){if(!t)return null;var e=[];return i(t,"array")&&i(t[0],"array")&&(e=n.path.clone(t)),e.length||A(t).replace(H,function(t,n,r){var i=[];n.toLowerCase();r.replace(q,function(t,e){e&&i.push(+e)}),e.push([n].concat(i))}),e.toString=n.path.toString,e};n._.svgTransform2string=h,n._.rgTransform=/^[a-z][\s]*-?\.?\d/i,n._.transform2matrix=d,n._unit2px=m;T.doc.contains||T.doc.compareDocumentPosition?function(t,e){var n=9==t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t==r||!(!r||1!=r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e;)if(e=e.parentNode,e==t)return!0;return!1};n._.getSomeDefs=p,n._.getSomeSVG=v,n.select=function(t){return t=A(t).replace(/([^\\]):/g,"$1\\:"),C(T.doc.querySelector(t))},n.selectAll=function(t){for(var e=T.doc.querySelectorAll(t),r=(n.set||Array)(),i=0;i1))return e("snap.util.getattr."+t,r).firstDefined();var c={};c[t]=n,t=c}for(var f in t)t[S](f)&&e("snap.util.attr."+f,r,t[f]);return r},n.parse=function(t){var e=T.doc.createDocumentFragment(),n=!0,r=T.doc.createElement("div");if(t=A(t),t.match(/^\s*<\s*svg(?:\s|>)/)||(t=""+t+"",n=!1),r.innerHTML=t,t=r.getElementsByTagName("svg")[0])if(n)e=t;else for(;t.firstChild;)e.appendChild(t.firstChild);return new x(e)},n.fragment=function(){for(var t=Array.prototype.slice.call(arguments,0),e=T.doc.createDocumentFragment(),r=0,i=t.length;r")}else t&&(e+="/>");return e}}var h=i.prototype,d=r.is,p=String,v=r._unit2px,g=r._.$,m=r._.make,y=r._.getSomeDefs,b="hasOwnProperty",x=r._.wrap;h.getBBox=function(t){if(!r.Matrix||!r.path)return this.node.getBBox();var e=this,n=new r.Matrix;if(e.removed)return r._.box();for(;"use"==e.type;)if(t||(n=n.add(e.transform().localMatrix.translate(e.attr("x")||0,e.attr("y")||0))),e.original)e=e.original;else{var i=e.attr("xlink:href");e=e.original=e.node.ownerDocument.getElementById(i.substring(i.indexOf("#")+1))}var o=e._,a=r.path.get[e.type]||r.path.get.deflt;try{return t?(o.bboxwt=a?r.path.getBBox(e.realPath=a(e)):r._.box(e.node.getBBox()),r._.box(o.bboxwt)):(e.realPath=a(e),e.matrix=e.transform().localMatrix,o.bbox=r.path.getBBox(r.path.map(e.realPath,n.add(e.matrix))),r._.box(o.bbox))}catch(s){return r._.box()}};var _=function(){return this.string};h.transform=function(t){var e=this._;if(null==t){for(var n,i=this,o=new r.Matrix(this.node.getCTM()),a=u(this),s=[a],l=new r.Matrix,c=a.toTransformString(),f=p(a)==p(this.matrix)?p(e.transform):c;"svg"!=i.type&&(i=i.parent());)s.push(u(i));for(n=s.length;n--;)l.add(s[n]);return{string:f,globalMatrix:o,totalMatrix:l,localMatrix:a,diffMatrix:o.clone().add(a.invert()),global:o.toTransformString(),total:l.toTransformString(),local:c,toString:_}}return t instanceof r.Matrix?(this.matrix=t,this._.transform=t.toTransformString()):u(this,t),this.node&&("linearGradient"==this.type||"radialGradient"==this.type?g(this.node,{gradientTransform:this.matrix}):"pattern"==this.type?g(this.node,{patternTransform:this.matrix}):g(this.node,{transform:this.matrix})),this},h.parent=function(){return x(this.node.parentNode)},h.append=h.add=function(t){if(t){if("set"==t.type){var e=this;return t.forEach(function(t){e.add(t)}),this}t=x(t),this.node.appendChild(t.node),t.paper=this.paper}return this},h.appendTo=function(t){return t&&(t=x(t),t.append(this)),this},h.prepend=function(t){if(t){if("set"==t.type){var e,n=this;return t.forEach(function(t){e?e.after(t):n.prepend(t),e=t}),this}t=x(t);var r=t.parent();this.node.insertBefore(t.node,this.node.firstChild),this.add&&this.add(),t.paper=this.paper,this.parent()&&this.parent().add(),r&&r.add()}return this},h.prependTo=function(t){return t=x(t),t.prepend(this),this},h.before=function(t){if("set"==t.type){var e=this;return t.forEach(function(t){var n=t.parent();e.node.parentNode.insertBefore(t.node,e.node),n&&n.add()}),this.parent().add(),this}t=x(t);var n=t.parent();return this.node.parentNode.insertBefore(t.node,this.node),this.parent()&&this.parent().add(),n&&n.add(),t.paper=this.paper,this},h.after=function(t){t=x(t);var e=t.parent();return this.node.nextSibling?this.node.parentNode.insertBefore(t.node,this.node.nextSibling):this.node.parentNode.appendChild(t.node),this.parent()&&this.parent().add(),e&&e.add(),t.paper=this.paper,this},h.insertBefore=function(t){t=x(t);var e=this.parent();return t.node.parentNode.insertBefore(this.node,t.node),this.paper=t.paper,e&&e.add(),t.parent()&&t.parent().add(),this},h.insertAfter=function(t){t=x(t);var e=this.parent();return t.node.parentNode.insertBefore(this.node,t.node.nextSibling),this.paper=t.paper,e&&e.add(),t.parent()&&t.parent().add(),this},h.remove=function(){var t=this.parent();return this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.paper,this.removed=!0,t&&t.add(),this},h.select=function(t){return t=p(t).replace(/([^\\]):/g,"$1\\:"),x(this.node.querySelector(t))},h.selectAll=function(t){for(var e=this.node.querySelectorAll(t),n=(r.set||Array)(),i=0;i{contents}',{x:+e.x.toFixed(3),y:+e.y.toFixed(3),width:+e.width.toFixed(3),height:+e.height.toFixed(3),contents:this.outerSVG()});return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))}},s.prototype.select=h.select,s.prototype.selectAll=h.selectAll}),r.plugin(function(t,e,n,r,i){function o(t,e,n,r,i,o){return null==e&&"[object SVGMatrix]"==a.call(t)?(this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.e=t.e,void(this.f=t.f)):void(null!=t?(this.a=+t,this.b=+e,this.c=+n,this.d=+r,this.e=+i,this.f=+o):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0))}var a=Object.prototype.toString,s=String,u=Math,l="";!function(e){function n(t){return t[0]*t[0]+t[1]*t[1]}function r(t){var e=u.sqrt(n(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}e.add=function(t,e,n,r,i,a){var s,u,l,c,f=[[],[],[]],h=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],d=[[t,n,i],[e,r,a],[0,0,1]];for(t&&t instanceof o&&(d=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;s<3;s++)for(u=0;u<3;u++){for(c=0,l=0;l<3;l++)c+=h[s][l]*d[l][u];f[s][u]=c}return this.a=f[0][0],this.b=f[1][0],this.c=f[0][1],this.d=f[1][1],this.e=f[0][2],this.f=f[1][2],this},e.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new o(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},e.clone=function(){return new o(this.a,this.b,this.c,this.d,this.e,this.f); -},e.translate=function(t,e){return this.add(1,0,0,1,t,e)},e.scale=function(t,e,n,r){return null==e&&(e=t),(n||r)&&this.add(1,0,0,1,n,r),this.add(t,0,0,e,0,0),(n||r)&&this.add(1,0,0,1,-n,-r),this},e.rotate=function(e,n,r){e=t.rad(e),n=n||0,r=r||0;var i=+u.cos(e).toFixed(9),o=+u.sin(e).toFixed(9);return this.add(i,o,-o,i,n,r),this.add(1,0,0,1,-n,-r)},e.x=function(t,e){return t*this.a+e*this.c+this.e},e.y=function(t,e){return t*this.b+e*this.d+this.f},e.get=function(t){return+this[s.fromCharCode(97+t)].toFixed(4)},e.toString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"},e.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},e.determinant=function(){return this.a*this.d-this.b*this.c},e.split=function(){var e={};e.dx=this.e,e.dy=this.f;var i=[[this.a,this.c],[this.b,this.d]];e.scalex=u.sqrt(n(i[0])),r(i[0]),e.shear=i[0][0]*i[1][0]+i[0][1]*i[1][1],i[1]=[i[1][0]-i[0][0]*e.shear,i[1][1]-i[0][1]*e.shear],e.scaley=u.sqrt(n(i[1])),r(i[1]),e.shear/=e.scaley,this.determinant()<0&&(e.scalex=-e.scalex);var o=-i[0][1],a=i[1][1];return a<0?(e.rotate=t.deg(u.acos(a)),o<0&&(e.rotate=360-e.rotate)):e.rotate=t.deg(u.asin(o)),e.isSimple=!(+e.shear.toFixed(9)||e.scalex.toFixed(9)!=e.scaley.toFixed(9)&&e.rotate),e.isSuperSimple=!+e.shear.toFixed(9)&&e.scalex.toFixed(9)==e.scaley.toFixed(9)&&!e.rotate,e.noRotation=!+e.shear.toFixed(9)&&!e.rotate,e},e.toTransformString=function(t){var e=t||this.split();return+e.shear.toFixed(9)?"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]:(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[+e.dx.toFixed(4),+e.dy.toFixed(4)]:l)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:l)+(e.rotate?"r"+[+e.rotate.toFixed(4),0,0]:l))}}(o.prototype),t.Matrix=o,t.matrix=function(t,e,n,r,i,a){return new o(t,e,n,r,i,a)}}),r.plugin(function(t,n,r,i,o){function a(r){return function(i){if(e.stop(),i instanceof o&&1==i.node.childNodes.length&&("radialGradient"==i.node.firstChild.tagName||"linearGradient"==i.node.firstChild.tagName||"pattern"==i.node.firstChild.tagName)&&(i=i.node.firstChild,d(this).appendChild(i),i=f(i)),i instanceof n)if("radialGradient"==i.type||"linearGradient"==i.type||"pattern"==i.type){i.node.id||v(i.node,{id:i.id});var a=g(i.node.id)}else a=i.attr(r);else if(a=t.color(i),a.error){var s=t(d(this).ownerSVGElement).gradient(i);s?(s.node.id||v(s.node,{id:s.id}),a=g(s.node.id)):a=i}else a=m(a);var u={};u[r]=a,v(this.node,u),this.node.style[r]=b}}function s(t){e.stop(),t==+t&&(t+="px"),this.node.style.fontSize=t}function u(t){for(var e=[],n=t.childNodes,r=0,i=n.length;r1&&(t=Array.prototype.slice.call(arguments,0));var e={};return u(t,"object")&&!u(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polyline",e)},s.polygon=function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments,0));var e={};return u(t,"object")&&!u(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polygon",e)},function(){function r(){return this.selectAll("stop")}function i(t,e){var r=c("stop"),i={offset:+e+"%"};return t=n.color(t),i["stop-color"]=t.hex,t.opacity<1&&(i["stop-opacity"]=t.opacity),c(r,i),this.node.appendChild(r),this}function o(){if("linearGradient"==this.type){var t=c(this.node,"x1")||0,e=c(this.node,"x2")||1,r=c(this.node,"y1")||0,i=c(this.node,"y2")||0;return n._.box(t,r,math.abs(e-t),math.abs(i-r))}var o=this.node.cx||.5,a=this.node.cy||.5,s=this.node.r||0;return n._.box(o-s,a-s,2*s,2*s)}function a(t,n){function r(t,e){for(var n=(e-f)/(t-h),r=h;ro){if(r&&!v.start){if(d=u(s,l,f[1],f[2],f[3],f[4],f[5],f[6],o-g),p+=["C"+i(d.start.x),i(d.start.y),i(d.m.x),i(d.m.y),i(d.x),i(d.y)],a)return p;v.start=p,p=["M"+i(d.x),i(d.y)+"C"+i(d.n.x),i(d.n.y),i(d.end.x),i(d.end.y),i(f[5]),i(f[6])].join(),g+=h,s=+f[5],l=+f[6];continue}if(!n&&!r)return d=u(s,l,f[1],f[2],f[3],f[4],f[5],f[6],o-g)}g+=h,s=+f[5],l=+f[6]}p+=f.shift()+f}return v.end=p,d=n?g:r?v:c(s,l,f[0],f[1],f[2],f[3],f[4],f[5],1)},null,t._.clone)}function c(t,e,n,r,i,o,a,s,u){var l=1-u,c=U(l,3),f=U(l,2),h=u*u,d=h*u,p=c*t+3*f*u*n+3*l*u*u*i+d*a,v=c*e+3*f*u*r+3*l*u*u*o+d*s,g=t+2*u*(n-t)+h*(i-2*n+t),m=e+2*u*(r-e)+h*(o-2*r+e),y=n+2*u*(i-n)+h*(a-2*i+n),b=r+2*u*(o-r)+h*(s-2*o+r),x=l*t+u*n,_=l*e+u*r,w=l*i+u*a,C=l*o+u*s,k=90-180*H.atan2(g-y,m-b)/q;return{x:p,y:v,m:{x:g,y:m},n:{x:y,y:b},start:{x:x,y:_},end:{x:w,y:C},alpha:k}}function f(e,n,r,i,a,s,u,l){t.is(e,"array")||(e=[e,n,r,i,a,s,u,l]);var c=$.apply(null,e);return o(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)}function h(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height}function d(t,e){return t=o(t),e=o(e),h(e,t.x,t.y)||h(e,t.x2,t.y)||h(e,t.x,t.y2)||h(e,t.x2,t.y2)||h(t,e.x,e.y)||h(t,e.x2,e.y)||h(t,e.x,e.y2)||h(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}function p(t,e,n,r,i){var o=-3*e+9*n-9*r+3*i,a=t*o+6*e-12*n+6*r;return t*a-3*e+3*n}function v(t,e,n,r,i,o,a,s,u){null==u&&(u=1),u=u>1?1:u<0?0:u;for(var l=u/2,c=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,v=0;vd;)f/=2,h+=(lz(i,a)||z(e,r)z(o,s))){var u=(t*r-e*n)*(i-a)-(t-n)*(i*s-o*a),l=(t*r-e*n)*(o-s)-(e-r)*(i*s-o*a),c=(t-n)*(o-s)-(e-r)*(i-a);if(c){var f=u/c,h=l/c,d=+f.toFixed(2),p=+h.toFixed(2);if(!(d<+V(t,n).toFixed(2)||d>+z(t,n).toFixed(2)||d<+V(i,a).toFixed(2)||d>+z(i,a).toFixed(2)||p<+V(e,r).toFixed(2)||p>+z(e,r).toFixed(2)||p<+V(o,s).toFixed(2)||p>+z(o,s).toFixed(2)))return{x:f,y:h}}}}function y(t,e,n){var r=f(t),i=f(e);if(!d(r,i))return n?0:[];for(var o=v.apply(0,t),a=v.apply(0,e),s=~~(o/8),u=~~(a/8),l=[],h=[],p={},g=n?0:[],y=0;y=0&&j<=1&&E>=0&&E<=1&&(n?g++:g.push({x:A.x,y:A.y,t1:j,t2:E}))}}return g}function b(t,e){return _(t,e)}function x(t,e){return _(t,e,1)}function _(t,e,n){t=N(t),e=N(e);for(var r,i,o,a,s,u,l,c,f,h,d=n?0:[],p=0,v=t.length;p180),0,u,c]];else f=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return f.toString=a,f}function S(e){var n=i(e),r=String.prototype.toLowerCase;if(n.rel)return s(n.rel);t.is(e,"array")&&t.is(e&&e[0],"array")||(e=t.parsePathString(e));var o=[],u=0,l=0,c=0,f=0,h=0;"M"==e[0][0]&&(u=e[0][1],l=e[0][2],c=u,f=l,h++,o.push(["M",u,l]));for(var d=h,p=e.length;d1&&(y=H.sqrt(y),r=y*r,i=y*i);var b=r*r,x=i*i,_=(a==s?-1:1)*H.sqrt(W((b*x-b*m*m-x*g*g)/(b*m*m+x*g*g))),w=_*r*m/i+(e+u)/2,C=_*-i*g/r+(n+l)/2,k=H.asin(((n-C)/i).toFixed(9)),T=H.asin(((l-C)/i).toFixed(9));k=eT&&(k-=2*q),!s&&T>k&&(T-=2*q)}var S=T-k;if(W(S)>h){var A=T,j=u,E=l;T=k+h*(s&&T>k?1:-1),u=w+r*H.cos(T),l=C+i*H.sin(T),p=O(u,l,r,i,o,0,s,j,E,[T,A,w,C])}S=T-k;var $=H.cos(k),N=H.sin(k),M=H.cos(T),P=H.sin(T),D=H.tan(S/4),F=4/3*r*D,B=4/3*i*D,L=[e,n],R=[e+F*N,n-B*$],I=[u+F*P,l-B*M],V=[u,l];if(R[0]=2*L[0]-R[0],R[1]=2*L[1]-R[1],c)return[R,I,V].concat(p);p=[R,I,V].concat(p).join().split(",");for(var z=[],U=0,X=p.length;U7){t[e].shift();for(var n=t[e];n.length;)h[e]="A",o&&(d[e]="A"),t.splice(e++,0,["C"].concat(n.splice(0,6)));t.splice(e,1),m=z(r.length,o&&o.length||0)}},f=function(t,e,n,i,a){t&&e&&"M"==t[a][0]&&"M"!=e[a][0]&&(e.splice(a,0,["M",i.x,i.y]),n.bx=0,n.by=0,n.x=t[a][1],n.y=t[a][2],m=z(r.length,o&&o.length||0))},h=[],d=[],p="",v="",g=0,m=z(r.length,o&&o.length||0);gr;r+=2){var o=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4==r?o[3]={x:+t[0],y:+t[1]}:i-2==r&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[i-2],y:+t[i-1]}:i-4==r?o[3]=o[2]:r||(o[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n}var D=e.prototype,F=t.is,B=t._.clone,L="hasOwnProperty",R=/,?([a-z]),?/gi,I=parseFloat,H=Math,q=H.PI,V=H.min,z=H.max,U=H.pow,W=H.abs,X=l(1),J=l(),G=l(0,1),Z=t._unit2px,Y={path:function(t){return t.attr("path")},circle:function(t){var e=Z(t);return T(e.cx,e.cy,e.r)},ellipse:function(t){var e=Z(t);return T(e.cx||0,e.cy||0,e.rx,e.ry)},rect:function(t){var e=Z(t);return k(e.x||0,e.y||0,e.width,e.height,e.rx,e.ry)},image:function(t){var e=Z(t);return k(e.x||0,e.y||0,e.width,e.height)},line:function(t){return"M"+[t.attr("x1")||0,t.attr("y1")||0,t.attr("x2"),t.attr("y2")]},polyline:function(t){return"M"+t.attr("points")},polygon:function(t){return"M"+t.attr("points")+"z"},deflt:function(t){var e=t.node.getBBox();return k(e.x,e.y,e.width,e.height)}};t.path=i,t.path.getTotalLength=X,t.path.getPointAtLength=J,t.path.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return G(t,e).end;var r=G(t,n,1);return e?G(r,e).end:r},D.getTotalLength=function(){if(this.node.getTotalLength)return this.node.getTotalLength()},D.getPointAtLength=function(t){return J(this.attr("d"),t)},D.getSubpath=function(e,n){return t.path.getSubpath(this.attr("d"),e,n)},t._.box=o,t.path.findDotsAtSegment=c,t.path.bezierBBox=f,t.path.isPointInsideBBox=h,t.closest=function(e,n,r,i){for(var a=100,s=o(e-a/2,n-a/2,a,a),u=[],l=r[0].hasOwnProperty("x")?function(t){return{x:r[t].x,y:r[t].y}}:function(t){return{x:r[t],y:i[t]}},c=0;a<=1e6&&!c;){for(var f=0,d=r.length;fm&&(g=m,u[f].len=m,v=u[f])}return v}},t.path.isBBoxIntersect=d,t.path.intersection=b,t.path.intersectionNumber=x,t.path.isPointInside=w,t.path.getBBox=C,t.path.get=Y,t.path.toRelative=S,t.path.toAbsolute=A,t.path.toCubic=N,t.path.map=M,t.path.toString=a,t.path.clone=s}),r.plugin(function(t,r,i,o){var a=Math.max,s=Math.min,u=function(t){if(this.items=[],this.bindings={},this.length=0,this.type="set",t)for(var e=0,n=t.length;e=1&&(delete n[i],o.s=1,t--,function(t){setTimeout(function(){e("mina.finish."+t.id,t)})}(o)),o.update()}t&&r(y)},m=function b(t,e,i,o,a,u,m){var y={id:s(),start:t,end:e,b:i,s:0,dur:o-i,spd:1,get:a,set:u,easing:m||b.linear,status:l,speed:c,duration:f,stop:h,pause:d,resume:p,update:v};n[y.id]=y;var x,_=0;for(x in n)if(n.hasOwnProperty(x)&&(_++,2==_))break;return 1==_&&r(g),y};return m.time=u,m.getById=function(t){return n[t]||null},m.linear=function(t){return t},m.easeout=function(t){return Math.pow(t,1.7)},m.easein=function(t){return Math.pow(t,.48)},m.easeinout=function(t){if(1==t)return 1;if(0==t)return 0;var e=.48-t/1.04,n=Math.sqrt(.1734+e*e),r=n-e,i=Math.pow(Math.abs(r),1/3)*(r<0?-1:1),o=-n-e,a=Math.pow(Math.abs(o),1/3)*(o<0?-1:1),s=i+a+.5;return 3*(1-s)*s*s+s*s*s},m.backin=function(t){if(1==t)return 1;var e=1.70158;return t*t*((e+1)*t-e)},m.backout=function(t){if(0==t)return 0;t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},m.elastic=function(t){return t==!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1},m.bounce=function(t){var e,n=7.5625,r=2.75;return t<1/r?e=n*t*t:t<2/r?(t-=1.5/r,e=n*t*t+.75):t<2.5/r?(t-=2.25/r,e=n*t*t+.9375):(t-=2.625/r,e=n*t*t+.984375),e},t.mina=m,m}("undefined"==typeof e?function(){}:e),r=function(t){function n(t,e){if(t){if(t.nodeType)return C(t);if(i(t,"array")&&n.set)return n.set.apply(n,t);if(t instanceof b)return t;if(null==e)return t=T.doc.querySelector(String(t)),C(t)}return t=null==t?"100%":t,e=null==e?"100%":e,new w(t,e)}function r(t,e){if(e){if("#text"==t&&(t=T.doc.createTextNode(e.text||e["#text"]||"")),"#comment"==t&&(t=T.doc.createComment(e.text||e["#text"]||"")),"string"==typeof t&&(t=r(t)),"string"==typeof e)return 1==t.nodeType?"xlink:"==e.substring(0,6)?t.getAttributeNS(W,e.substring(6)):"xml:"==e.substring(0,4)?t.getAttributeNS(J,e.substring(4)):t.getAttribute(e):"text"==e?t.nodeValue:null;if(1==t.nodeType){for(var n in e)if(e[S](n)){var i=A(e[n]);i?"xlink:"==n.substring(0,6)?t.setAttributeNS(W,n.substring(6),i):"xml:"==n.substring(0,4)?t.setAttributeNS(J,n.substring(4),i):t.setAttribute(n,i):t.removeAttribute(n)}}else"text"in e&&(t.nodeValue=e.text)}else t=T.doc.createElementNS(J,t);return t}function i(t,e){return e=A.prototype.toLowerCase.call(e),"finite"==e?isFinite(t):!("array"!=e||!(t instanceof Array||Array.isArray&&Array.isArray(t)))||("null"==e&&null===t||e==("undefined"==typeof t?"undefined":a(t))&&null!==t||"object"==e&&t===Object(t)||F.call(t).slice(8,-1).toLowerCase()==e)}function o(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)t[S](n)&&(e[n]=o(t[n]));return e}function s(t,e){for(var n=0,r=t.length;n=1e3&&delete a[u.shift()],u.push(o),a[o]=t.apply(e,i),n?n(a[o]):a[o])}return r}function l(t,e,n,r,i,o){if(null==i){var a=t-n,s=e-r;return a||s?(180+180*O.atan2(-s,-a)/P+360)%360:0}return l(t,e,i,o)-l(n,r,i,o)}function c(t){return t%360*P/180}function f(t){return 180*t/P%360}function h(t){var e=[];return t=t.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,function(t,n,r){return r=r.split(/\s*,\s*|\s+/),"rotate"==n&&1==r.length&&r.push(0,0),"scale"==n&&(r.length>2?r=r.slice(0,2):2==r.length&&r.push(0,0),1==r.length&&r.push(r[0],0,0)),"skewX"==n?e.push(["m",1,0,O.tan(c(r[0])),1,0,0]):"skewY"==n?e.push(["m",1,O.tan(c(r[0])),0,1,0,0]):e.push([n.charAt(0)].concat(r)),t}),e}function d(t,e){var r=et(t),i=new n.Matrix;if(r)for(var o=0,a=r.length;o.5;){var d,p,v,g,m,y;(v=o-c)>=0&&(m=r(d=u.getPointAtLength(v)))t-n)return e-o+t}return e},n.getRGB=u(function(t){if(!t||(t=A(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Q};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:Q};if(!(R[S](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=G(t)),!t)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Q};var e,r,o,a,s,u,l=t.match(B);return l?(l[2]&&(o=E(l[2].substring(5),16),r=E(l[2].substring(3,5),16),e=E(l[2].substring(1,3),16)),l[3]&&(o=E((s=l[3].charAt(3))+s,16),r=E((s=l[3].charAt(2))+s,16),e=E((s=l[3].charAt(1))+s,16)),l[4]&&(u=l[4].split(L),e=j(u[0]),"%"==u[0].slice(-1)&&(e*=2.55),r=j(u[1]),"%"==u[1].slice(-1)&&(r*=2.55),o=j(u[2]),"%"==u[2].slice(-1)&&(o*=2.55),"rgba"==l[1].toLowerCase().slice(0,4)&&(a=j(u[3])),u[3]&&"%"==u[3].slice(-1)&&(a/=100)),l[5]?(u=l[5].split(L),e=j(u[0]),"%"==u[0].slice(-1)&&(e/=100),r=j(u[1]),"%"==u[1].slice(-1)&&(r/=100),o=j(u[2]),"%"==u[2].slice(-1)&&(o/=100),("deg"==u[0].slice(-3)||"°"==u[0].slice(-1))&&(e/=360),"hsba"==l[1].toLowerCase().slice(0,4)&&(a=j(u[3])),u[3]&&"%"==u[3].slice(-1)&&(a/=100),n.hsb2rgb(e,r,o,a)):l[6]?(u=l[6].split(L),e=j(u[0]),"%"==u[0].slice(-1)&&(e/=100),r=j(u[1]),"%"==u[1].slice(-1)&&(r/=100),o=j(u[2]),"%"==u[2].slice(-1)&&(o/=100),("deg"==u[0].slice(-3)||"°"==u[0].slice(-1))&&(e/=360),"hsla"==l[1].toLowerCase().slice(0,4)&&(a=j(u[3])),u[3]&&"%"==u[3].slice(-1)&&(a/=100),n.hsl2rgb(e,r,o,a)):(e=N(O.round(e),255),r=N(O.round(r),255),o=N(O.round(o),255),a=N($(a,0),1),l={r:e,g:r,b:o,toString:Q},l.hex="#"+(16777216|o|r<<8|e<<16).toString(16).slice(1),l.opacity=i(a,"finite")?a:1,l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Q}},n),n.hsb=u(function(t,e,r){return n.hsb2rgb(t,e,r).hex}),n.hsl=u(function(t,e,r){return n.hsl2rgb(t,e,r).hex}),n.rgb=u(function(t,e,n,r){if(i(r,"finite")){var o=O.round;return"rgba("+[o(t),o(e),o(n),+r.toFixed(2)]+")"}return"#"+(16777216|n|e<<8|t<<16).toString(16).slice(1)});var G=function(t){var e=T.doc.getElementsByTagName("head")[0]||T.doc.getElementsByTagName("svg")[0],n="rgb(255, 0, 0)";return(G=u(function(t){if("red"==t.toLowerCase())return n;e.style.color=n,e.style.color=t;var r=T.doc.defaultView.getComputedStyle(e,D).getPropertyValue("color");return r==n?null:r}))(t)},Z=function(){return"hsb("+[this.h,this.s,this.b]+")"},Y=function(){return"hsl("+[this.h,this.s,this.l]+")"},Q=function(){return 1==this.opacity||null==this.opacity?this.hex:"rgba("+[this.r,this.g,this.b,this.opacity]+")"},K=function(t,e,r){if(null==e&&i(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(r=t.b,e=t.g,t=t.r),null==e&&i(t,string)){var o=n.getRGB(t);t=o.r,e=o.g,r=o.b}return(t>1||e>1||r>1)&&(t/=255,e/=255,r/=255),[t,e,r]},tt=function(t,e,r,o){t=O.round(255*t),e=O.round(255*e),r=O.round(255*r);var a={r:t,g:e,b:r,opacity:i(o,"finite")?o:1,hex:n.rgb(t,e,r),toString:Q};return i(o,"finite")&&(a.opacity=o),a};n.color=function(t){var e;return i(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=n.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):i(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=n.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):(i(t,"string")&&(t=n.getRGB(t)),i(t,"object")&&"r"in t&&"g"in t&&"b"in t&&!("error"in t)?(e=n.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=n.rgb2hsb(t),t.v=e.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1,t.error=1)),t.toString=Q,t},n.hsb2rgb=function(t,e,n,r){i(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,r=t.o,t=t.h),t*=360;var o,a,s,u,l;return t=t%360/60,l=n*e,u=l*(1-M(t%2-1)),o=a=s=n-l,t=~~t,o+=[l,u,0,0,u,l][t],a+=[u,l,l,u,0,0][t],s+=[0,0,u,l,l,u][t],tt(o,a,s,r)},n.hsl2rgb=function(t,e,n,r){i(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var o,a,s,u,l;return t=t%360/60,l=2*e*(n<.5?n:1-n),u=l*(1-M(t%2-1)),o=a=s=n-l/2,t=~~t,o+=[l,u,0,0,u,l][t],a+=[u,l,l,u,0,0][t],s+=[0,0,u,l,l,u][t],tt(o,a,s,r)},n.rgb2hsb=function(t,e,n){n=K(t,e,n),t=n[0],e=n[1],n=n[2];var r,i,o,a;return o=$(t,e,n),a=o-N(t,e,n),r=0==a?null:o==t?(e-n)/a:o==e?(n-t)/a+2:(t-e)/a+4,r=(r+360)%6*60/360,i=0==a?0:a/o,{h:r,s:i,b:o,toString:Z}},n.rgb2hsl=function(t,e,n){n=K(t,e,n),t=n[0],e=n[1],n=n[2];var r,i,o,a,s,u;return a=$(t,e,n),s=N(t,e,n),u=a-s,r=0==u?null:a==t?(e-n)/u:a==e?(n-t)/u+2:(t-e)/u+4,r=(r+360)%6*60/360,o=(a+s)/2,i=0==u?0:o<.5?u/(2*o):u/(2-2*o),{h:r,s:i,l:o,toString:Y}},n.parsePathString=function(t){if(!t)return null;var e=n.path(t);if(e.arr)return n.path.clone(e.arr);var r={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},o=[];return i(t,"array")&&i(t[0],"array")&&(o=n.path.clone(t)),o.length||A(t).replace(I,function(t,e,n){var i=[],a=e.toLowerCase();if(n.replace(q,function(t,e){e&&i.push(+e)}),"m"==a&&i.length>2&&(o.push([e].concat(i.splice(0,2))),a="l",e="m"==e?"l":"L"),"o"==a&&1==i.length&&o.push([e,i[0]]),"r"==a)o.push([e].concat(i));else for(;i.length>=r[a]&&(o.push([e].concat(i.splice(0,r[a]))),r[a]););}),o.toString=n.path.toString,e.arr=n.path.clone(o),o};var et=n.parseTransformString=function(t){if(!t)return null;var e=[];return i(t,"array")&&i(t[0],"array")&&(e=n.path.clone(t)),e.length||A(t).replace(H,function(t,n,r){var i=[];n.toLowerCase();r.replace(q,function(t,e){e&&i.push(+e)}),e.push([n].concat(i))}),e.toString=n.path.toString,e};n._.svgTransform2string=h,n._.rgTransform=/^[a-z][\s]*-?\.?\d/i,n._.transform2matrix=d,n._unit2px=m;T.doc.contains||T.doc.compareDocumentPosition?function(t,e){var n=9==t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t==r||!(!r||1!=r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e;)if(e=e.parentNode,e==t)return!0;return!1};n._.getSomeDefs=p,n._.getSomeSVG=v,n.select=function(t){return t=A(t).replace(/([^\\]):/g,"$1\\:"),C(T.doc.querySelector(t))},n.selectAll=function(t){for(var e=T.doc.querySelectorAll(t),r=(n.set||Array)(),i=0;i1))return e("snap.util.getattr."+t,r).firstDefined();var c={};c[t]=n,t=c}for(var f in t)t[S](f)&&e("snap.util.attr."+f,r,t[f]);return r},n.parse=function(t){var e=T.doc.createDocumentFragment(),n=!0,r=T.doc.createElement("div");if(t=A(t),t.match(/^\s*<\s*svg(?:\s|>)/)||(t=""+t+"",n=!1),r.innerHTML=t,t=r.getElementsByTagName("svg")[0])if(n)e=t;else for(;t.firstChild;)e.appendChild(t.firstChild);return new x(e)},n.fragment=function(){for(var t=Array.prototype.slice.call(arguments,0),e=T.doc.createDocumentFragment(),r=0,i=t.length;r")}else t&&(e+="/>");return e}}var h=i.prototype,d=r.is,p=String,v=r._unit2px,g=r._.$,m=r._.make,y=r._.getSomeDefs,b="hasOwnProperty",x=r._.wrap;h.getBBox=function(t){if(!r.Matrix||!r.path)return this.node.getBBox();var e=this,n=new r.Matrix;if(e.removed)return r._.box();for(;"use"==e.type;)if(t||(n=n.add(e.transform().localMatrix.translate(e.attr("x")||0,e.attr("y")||0))),e.original)e=e.original;else{var i=e.attr("xlink:href");e=e.original=e.node.ownerDocument.getElementById(i.substring(i.indexOf("#")+1))}var o=e._,a=r.path.get[e.type]||r.path.get.deflt;try{return t?(o.bboxwt=a?r.path.getBBox(e.realPath=a(e)):r._.box(e.node.getBBox()),r._.box(o.bboxwt)):(e.realPath=a(e),e.matrix=e.transform().localMatrix,o.bbox=r.path.getBBox(r.path.map(e.realPath,n.add(e.matrix))),r._.box(o.bbox))}catch(s){return r._.box()}};var _=function(){return this.string};h.transform=function(t){var e=this._;if(null==t){for(var n,i=this,o=new r.Matrix(this.node.getCTM()),a=u(this),s=[a],l=new r.Matrix,c=a.toTransformString(),f=p(a)==p(this.matrix)?p(e.transform):c;"svg"!=i.type&&(i=i.parent());)s.push(u(i));for(n=s.length;n--;)l.add(s[n]);return{string:f,globalMatrix:o,totalMatrix:l,localMatrix:a,diffMatrix:o.clone().add(a.invert()),global:o.toTransformString(),total:l.toTransformString(),local:c,toString:_}}return t instanceof r.Matrix?(this.matrix=t,this._.transform=t.toTransformString()):u(this,t),this.node&&("linearGradient"==this.type||"radialGradient"==this.type?g(this.node,{gradientTransform:this.matrix}):"pattern"==this.type?g(this.node,{patternTransform:this.matrix}):g(this.node,{transform:this.matrix})),this},h.parent=function(){return x(this.node.parentNode)},h.append=h.add=function(t){if(t){if("set"==t.type){var e=this;return t.forEach(function(t){e.add(t)}),this}t=x(t),this.node.appendChild(t.node),t.paper=this.paper}return this},h.appendTo=function(t){return t&&(t=x(t),t.append(this)),this},h.prepend=function(t){if(t){if("set"==t.type){var e,n=this;return t.forEach(function(t){e?e.after(t):n.prepend(t),e=t}),this}t=x(t);var r=t.parent();this.node.insertBefore(t.node,this.node.firstChild),this.add&&this.add(),t.paper=this.paper,this.parent()&&this.parent().add(),r&&r.add()}return this},h.prependTo=function(t){return t=x(t),t.prepend(this),this},h.before=function(t){if("set"==t.type){var e=this;return t.forEach(function(t){var n=t.parent();e.node.parentNode.insertBefore(t.node,e.node),n&&n.add()}),this.parent().add(),this}t=x(t);var n=t.parent();return this.node.parentNode.insertBefore(t.node,this.node),this.parent()&&this.parent().add(),n&&n.add(),t.paper=this.paper,this},h.after=function(t){t=x(t);var e=t.parent();return this.node.nextSibling?this.node.parentNode.insertBefore(t.node,this.node.nextSibling):this.node.parentNode.appendChild(t.node),this.parent()&&this.parent().add(),e&&e.add(),t.paper=this.paper,this},h.insertBefore=function(t){t=x(t);var e=this.parent();return t.node.parentNode.insertBefore(this.node,t.node),this.paper=t.paper,e&&e.add(),t.parent()&&t.parent().add(),this},h.insertAfter=function(t){t=x(t);var e=this.parent();return t.node.parentNode.insertBefore(this.node,t.node.nextSibling),this.paper=t.paper,e&&e.add(),t.parent()&&t.parent().add(),this},h.remove=function(){var t=this.parent();return this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.paper,this.removed=!0,t&&t.add(),this},h.select=function(t){return t=p(t).replace(/([^\\]):/g,"$1\\:"),x(this.node.querySelector(t))},h.selectAll=function(t){for(var e=this.node.querySelectorAll(t),n=(r.set||Array)(),i=0;i{contents}',{x:+e.x.toFixed(3),y:+e.y.toFixed(3),width:+e.width.toFixed(3),height:+e.height.toFixed(3),contents:this.outerSVG()});return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))}},s.prototype.select=h.select,s.prototype.selectAll=h.selectAll}),r.plugin(function(t,e,n,r,i){function o(t,e,n,r,i,o){return null==e&&"[object SVGMatrix]"==a.call(t)?(this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.e=t.e,void(this.f=t.f)):void(null!=t?(this.a=+t,this.b=+e,this.c=+n,this.d=+r,this.e=+i,this.f=+o):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0))}var a=Object.prototype.toString,s=String,u=Math,l="";!function(e){function n(t){return t[0]*t[0]+t[1]*t[1]}function r(t){var e=u.sqrt(n(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}e.add=function(t,e,n,r,i,a){var s,u,l,c,f=[[],[],[]],h=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],d=[[t,n,i],[e,r,a],[0,0,1]];for(t&&t instanceof o&&(d=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;s<3;s++)for(u=0;u<3;u++){for(c=0,l=0;l<3;l++)c+=h[s][l]*d[l][u];f[s][u]=c}return this.a=f[0][0],this.b=f[1][0],this.c=f[0][1],this.d=f[1][1],this.e=f[0][2],this.f=f[1][2],this},e.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new o(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},e.clone=function(){return new o(this.a,this.b,this.c,this.d,this.e,this.f); +},e.translate=function(t,e){return this.add(1,0,0,1,t,e)},e.scale=function(t,e,n,r){return null==e&&(e=t),(n||r)&&this.add(1,0,0,1,n,r),this.add(t,0,0,e,0,0),(n||r)&&this.add(1,0,0,1,-n,-r),this},e.rotate=function(e,n,r){e=t.rad(e),n=n||0,r=r||0;var i=+u.cos(e).toFixed(9),o=+u.sin(e).toFixed(9);return this.add(i,o,-o,i,n,r),this.add(1,0,0,1,-n,-r)},e.x=function(t,e){return t*this.a+e*this.c+this.e},e.y=function(t,e){return t*this.b+e*this.d+this.f},e.get=function(t){return+this[s.fromCharCode(97+t)].toFixed(4)},e.toString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"},e.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},e.determinant=function(){return this.a*this.d-this.b*this.c},e.split=function(){var e={};e.dx=this.e,e.dy=this.f;var i=[[this.a,this.c],[this.b,this.d]];e.scalex=u.sqrt(n(i[0])),r(i[0]),e.shear=i[0][0]*i[1][0]+i[0][1]*i[1][1],i[1]=[i[1][0]-i[0][0]*e.shear,i[1][1]-i[0][1]*e.shear],e.scaley=u.sqrt(n(i[1])),r(i[1]),e.shear/=e.scaley,this.determinant()<0&&(e.scalex=-e.scalex);var o=-i[0][1],a=i[1][1];return a<0?(e.rotate=t.deg(u.acos(a)),o<0&&(e.rotate=360-e.rotate)):e.rotate=t.deg(u.asin(o)),e.isSimple=!(+e.shear.toFixed(9)||e.scalex.toFixed(9)!=e.scaley.toFixed(9)&&e.rotate),e.isSuperSimple=!+e.shear.toFixed(9)&&e.scalex.toFixed(9)==e.scaley.toFixed(9)&&!e.rotate,e.noRotation=!+e.shear.toFixed(9)&&!e.rotate,e},e.toTransformString=function(t){var e=t||this.split();return+e.shear.toFixed(9)?"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]:(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[+e.dx.toFixed(4),+e.dy.toFixed(4)]:l)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:l)+(e.rotate?"r"+[+e.rotate.toFixed(4),0,0]:l))}}(o.prototype),t.Matrix=o,t.matrix=function(t,e,n,r,i,a){return new o(t,e,n,r,i,a)}}),r.plugin(function(t,n,r,i,o){function a(r){return function(i){if(e.stop(),i instanceof o&&1==i.node.childNodes.length&&("radialGradient"==i.node.firstChild.tagName||"linearGradient"==i.node.firstChild.tagName||"pattern"==i.node.firstChild.tagName)&&(i=i.node.firstChild,d(this).appendChild(i),i=f(i)),i instanceof n)if("radialGradient"==i.type||"linearGradient"==i.type||"pattern"==i.type){i.node.id||v(i.node,{id:i.id});var a=g(i.node.id)}else a=i.attr(r);else if(a=t.color(i),a.error){var s=t(d(this).ownerSVGElement).gradient(i);s?(s.node.id||v(s.node,{id:s.id}),a=g(s.node.id)):a=i}else a=m(a);var u={};u[r]=a,v(this.node,u),this.node.style[r]=b}}function s(t){e.stop(),t==+t&&(t+="px"),this.node.style.fontSize=t}function u(t){for(var e=[],n=t.childNodes,r=0,i=n.length;r1&&(t=Array.prototype.slice.call(arguments,0));var e={};return u(t,"object")&&!u(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polyline",e)},s.polygon=function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments,0));var e={};return u(t,"object")&&!u(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polygon",e)},function(){function r(){return this.selectAll("stop")}function i(t,e){var r=c("stop"),i={offset:+e+"%"};return t=n.color(t),i["stop-color"]=t.hex,t.opacity<1&&(i["stop-opacity"]=t.opacity),c(r,i),this.node.appendChild(r),this}function o(){if("linearGradient"==this.type){var t=c(this.node,"x1")||0,e=c(this.node,"x2")||1,r=c(this.node,"y1")||0,i=c(this.node,"y2")||0;return n._.box(t,r,math.abs(e-t),math.abs(i-r))}var o=this.node.cx||.5,a=this.node.cy||.5,s=this.node.r||0;return n._.box(o-s,a-s,2*s,2*s)}function a(t,n){function r(t,e){for(var n=(e-f)/(t-h),r=h;ro){if(r&&!v.start){if(d=u(s,l,f[1],f[2],f[3],f[4],f[5],f[6],o-g),p+=["C"+i(d.start.x),i(d.start.y),i(d.m.x),i(d.m.y),i(d.x),i(d.y)],a)return p;v.start=p,p=["M"+i(d.x),i(d.y)+"C"+i(d.n.x),i(d.n.y),i(d.end.x),i(d.end.y),i(f[5]),i(f[6])].join(),g+=h,s=+f[5],l=+f[6];continue}if(!n&&!r)return d=u(s,l,f[1],f[2],f[3],f[4],f[5],f[6],o-g)}g+=h,s=+f[5],l=+f[6]}p+=f.shift()+f}return v.end=p,d=n?g:r?v:c(s,l,f[0],f[1],f[2],f[3],f[4],f[5],1)},null,t._.clone)}function c(t,e,n,r,i,o,a,s,u){var l=1-u,c=U(l,3),f=U(l,2),h=u*u,d=h*u,p=c*t+3*f*u*n+3*l*u*u*i+d*a,v=c*e+3*f*u*r+3*l*u*u*o+d*s,g=t+2*u*(n-t)+h*(i-2*n+t),m=e+2*u*(r-e)+h*(o-2*r+e),y=n+2*u*(i-n)+h*(a-2*i+n),b=r+2*u*(o-r)+h*(s-2*o+r),x=l*t+u*n,_=l*e+u*r,w=l*i+u*a,C=l*o+u*s,k=90-180*H.atan2(g-y,m-b)/q;return{x:p,y:v,m:{x:g,y:m},n:{x:y,y:b},start:{x:x,y:_},end:{x:w,y:C},alpha:k}}function f(e,n,r,i,a,s,u,l){t.is(e,"array")||(e=[e,n,r,i,a,s,u,l]);var c=$.apply(null,e);return o(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)}function h(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height}function d(t,e){return t=o(t),e=o(e),h(e,t.x,t.y)||h(e,t.x2,t.y)||h(e,t.x,t.y2)||h(e,t.x2,t.y2)||h(t,e.x,e.y)||h(t,e.x2,e.y)||h(t,e.x,e.y2)||h(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}function p(t,e,n,r,i){var o=-3*e+9*n-9*r+3*i,a=t*o+6*e-12*n+6*r;return t*a-3*e+3*n}function v(t,e,n,r,i,o,a,s,u){null==u&&(u=1),u=u>1?1:u<0?0:u;for(var l=u/2,c=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,v=0;vd;)f/=2,h+=(lz(i,a)||z(e,r)z(o,s))){var u=(t*r-e*n)*(i-a)-(t-n)*(i*s-o*a),l=(t*r-e*n)*(o-s)-(e-r)*(i*s-o*a),c=(t-n)*(o-s)-(e-r)*(i-a);if(c){var f=u/c,h=l/c,d=+f.toFixed(2),p=+h.toFixed(2);if(!(d<+V(t,n).toFixed(2)||d>+z(t,n).toFixed(2)||d<+V(i,a).toFixed(2)||d>+z(i,a).toFixed(2)||p<+V(e,r).toFixed(2)||p>+z(e,r).toFixed(2)||p<+V(o,s).toFixed(2)||p>+z(o,s).toFixed(2)))return{x:f,y:h}}}}function y(t,e,n){var r=f(t),i=f(e);if(!d(r,i))return n?0:[];for(var o=v.apply(0,t),a=v.apply(0,e),s=~~(o/8),u=~~(a/8),l=[],h=[],p={},g=n?0:[],y=0;y=0&&j<=1&&E>=0&&E<=1&&(n?g++:g.push({x:A.x,y:A.y,t1:j,t2:E}))}}return g}function b(t,e){return _(t,e)}function x(t,e){return _(t,e,1)}function _(t,e,n){t=N(t),e=N(e);for(var r,i,o,a,s,u,l,c,f,h,d=n?0:[],p=0,v=t.length;p180),0,u,c]];else f=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return f.toString=a,f}function S(e){var n=i(e),r=String.prototype.toLowerCase;if(n.rel)return s(n.rel);t.is(e,"array")&&t.is(e&&e[0],"array")||(e=t.parsePathString(e));var o=[],u=0,l=0,c=0,f=0,h=0;"M"==e[0][0]&&(u=e[0][1],l=e[0][2],c=u,f=l,h++,o.push(["M",u,l]));for(var d=h,p=e.length;d1&&(y=H.sqrt(y),r=y*r,i=y*i);var b=r*r,x=i*i,_=(a==s?-1:1)*H.sqrt(W((b*x-b*m*m-x*g*g)/(b*m*m+x*g*g))),w=_*r*m/i+(e+u)/2,C=_*-i*g/r+(n+l)/2,k=H.asin(((n-C)/i).toFixed(9)),T=H.asin(((l-C)/i).toFixed(9));k=eT&&(k-=2*q),!s&&T>k&&(T-=2*q)}var S=T-k;if(W(S)>h){var A=T,j=u,E=l;T=k+h*(s&&T>k?1:-1),u=w+r*H.cos(T),l=C+i*H.sin(T),p=O(u,l,r,i,o,0,s,j,E,[T,A,w,C])}S=T-k;var $=H.cos(k),N=H.sin(k),M=H.cos(T),P=H.sin(T),D=H.tan(S/4),F=4/3*r*D,B=4/3*i*D,L=[e,n],R=[e+F*N,n-B*$],I=[u+F*P,l-B*M],V=[u,l];if(R[0]=2*L[0]-R[0],R[1]=2*L[1]-R[1],c)return[R,I,V].concat(p);p=[R,I,V].concat(p).join().split(",");for(var z=[],U=0,J=p.length;U7){t[e].shift();for(var n=t[e];n.length;)h[e]="A",o&&(d[e]="A"),t.splice(e++,0,["C"].concat(n.splice(0,6)));t.splice(e,1),m=z(r.length,o&&o.length||0)}},f=function(t,e,n,i,a){t&&e&&"M"==t[a][0]&&"M"!=e[a][0]&&(e.splice(a,0,["M",i.x,i.y]),n.bx=0,n.by=0,n.x=t[a][1],n.y=t[a][2],m=z(r.length,o&&o.length||0))},h=[],d=[],p="",v="",g=0,m=z(r.length,o&&o.length||0);gr;r+=2){var o=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4==r?o[3]={x:+t[0],y:+t[1]}:i-2==r&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[i-2],y:+t[i-1]}:i-4==r?o[3]=o[2]:r||(o[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n}var D=e.prototype,F=t.is,B=t._.clone,L="hasOwnProperty",R=/,?([a-z]),?/gi,I=parseFloat,H=Math,q=H.PI,V=H.min,z=H.max,U=H.pow,W=H.abs,J=l(1),X=l(),G=l(0,1),Z=t._unit2px,Y={path:function(t){return t.attr("path")},circle:function(t){var e=Z(t);return T(e.cx,e.cy,e.r)},ellipse:function(t){var e=Z(t);return T(e.cx||0,e.cy||0,e.rx,e.ry)},rect:function(t){var e=Z(t);return k(e.x||0,e.y||0,e.width,e.height,e.rx,e.ry)},image:function(t){var e=Z(t);return k(e.x||0,e.y||0,e.width,e.height)},line:function(t){return"M"+[t.attr("x1")||0,t.attr("y1")||0,t.attr("x2"),t.attr("y2")]},polyline:function(t){return"M"+t.attr("points")},polygon:function(t){return"M"+t.attr("points")+"z"},deflt:function(t){var e=t.node.getBBox();return k(e.x,e.y,e.width,e.height)}};t.path=i,t.path.getTotalLength=J,t.path.getPointAtLength=X,t.path.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return G(t,e).end;var r=G(t,n,1);return e?G(r,e).end:r},D.getTotalLength=function(){if(this.node.getTotalLength)return this.node.getTotalLength()},D.getPointAtLength=function(t){return X(this.attr("d"),t)},D.getSubpath=function(e,n){return t.path.getSubpath(this.attr("d"),e,n)},t._.box=o,t.path.findDotsAtSegment=c,t.path.bezierBBox=f,t.path.isPointInsideBBox=h,t.closest=function(e,n,r,i){for(var a=100,s=o(e-a/2,n-a/2,a,a),u=[],l=r[0].hasOwnProperty("x")?function(t){return{x:r[t].x,y:r[t].y}}:function(t){return{x:r[t],y:i[t]}},c=0;a<=1e6&&!c;){for(var f=0,d=r.length;fm&&(g=m,u[f].len=m,v=u[f])}return v}},t.path.isBBoxIntersect=d,t.path.intersection=b,t.path.intersectionNumber=x,t.path.isPointInside=w,t.path.getBBox=C,t.path.get=Y,t.path.toRelative=S,t.path.toAbsolute=A,t.path.toCubic=N,t.path.map=M,t.path.toString=a,t.path.clone=s}),r.plugin(function(t,r,i,o){var a=Math.max,s=Math.min,u=function(t){if(this.items=[],this.bindings={},this.length=0,this.type="set",t)for(var e=0,n=t.length;e',{def:r})},t.filter.blur.toString=function(){return this()},t.filter.shadow=function(e,n,r,i,o){return"string"==typeof r&&(i=r,o=i,r=4),"string"!=typeof i&&(o=i,i="#000"),i=i||"#000",null==r&&(r=4),null==o&&(o=1),null==e&&(e=0,n=2),null==n&&(n=e),i=t.color(i),t.format('',{color:i,dx:e,dy:n,blur:r,opacity:o})},t.filter.shadow.toString=function(){return this()},t.filter.grayscale=function(e){return null==e&&(e=1),t.format('',{a:.2126+.7874*(1-e),b:.7152-.7152*(1-e),c:.0722-.0722*(1-e),d:.2126-.2126*(1-e),e:.7152+.2848*(1-e),f:.0722-.0722*(1-e),g:.2126-.2126*(1-e),h:.0722+.9278*(1-e)})},t.filter.grayscale.toString=function(){return this()},t.filter.sepia=function(e){return null==e&&(e=1),t.format('',{a:.393+.607*(1-e),b:.769-.769*(1-e),c:.189-.189*(1-e),d:.349-.349*(1-e),e:.686+.314*(1-e),f:.168-.168*(1-e),g:.272-.272*(1-e),h:.534-.534*(1-e),i:.131+.869*(1-e)})},t.filter.sepia.toString=function(){return this()},t.filter.saturate=function(e){return null==e&&(e=1),t.format('',{amount:1-e})},t.filter.saturate.toString=function(){return this()},t.filter.hueRotate=function(e){return e=e||0,t.format('',{angle:e})},t.filter.hueRotate.toString=function(){return this()},t.filter.invert=function(e){return null==e&&(e=1),t.format('',{amount:e,amount2:1-e})},t.filter.invert.toString=function(){return this()},t.filter.brightness=function(e){return null==e&&(e=1),t.format('',{amount:e})},t.filter.brightness.toString=function(){return this()},t.filter.contrast=function(e){return null==e&&(e=1),t.format('',{amount:e,amount2:.5-e/2})},t.filter.contrast.toString=function(){return this()}}),r.plugin(function(t,e,n,r,i){var o=t._.box,a=t.is,s=/^[^a-z]*([tbmlrc])/i,u=function(){return"T"+this.dx+","+this.dy};e.prototype.getAlign=function(t,e){null==e&&a(t,"string")&&(e=t,t=null),t=t||this.paper;var n=t.getBBox?t.getBBox():o(t),r=this.getBBox(),i={};switch(e=e&&e.match(s),e=e?e[1].toLowerCase():"c"){case"t":i.dx=0,i.dy=n.y-r.y;break;case"b":i.dx=0,i.dy=n.y2-r.y2;break;case"m":i.dx=0,i.dy=n.cy-r.cy;break;case"l":i.dx=n.x-r.x,i.dy=0;break;case"r":i.dx=n.x2-r.x2,i.dy=0;break;default:i.dx=n.cx-r.cx,i.dy=0}return i.toString=u,i},e.prototype.align=function(t,e){return this.transform("..."+this.getAlign(t,e))}}),r})}).call(window)},function(t,e,n){var r,i;(function(t){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};/*! * jQuery JavaScript Library v3.1.0 * https://jquery.com/ @@ -15,7 +15,7 @@ * * Date: 2016-07-07T21:44Z */ -!function(e,r){"object"===n(t)&&"object"===n(t.exports)?t.exports=e.document?r(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return r(t)}:r(e)}("undefined"!=typeof window?window:void 0,function(o,a){function s(t,e){e=e||it;var n=e.createElement("script");n.text=t,e.head.appendChild(n).parentNode.removeChild(n)}function u(t){var e=!!t&&"length"in t&&t.length,n=mt.type(t);return"function"!==n&&!mt.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function l(t,e,n){if(mt.isFunction(e))return mt.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return mt.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(At.test(e))return mt.filter(e,t,n);e=mt.filter(e,t)}return mt.grep(t,function(t){return lt.call(e,t)>-1!==n&&1===t.nodeType})}function c(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function f(t){var e={};return mt.each(t.match(Mt)||[],function(t,n){e[n]=!0}),e}function h(t){return t}function d(t){throw t}function p(t,e,n){var r;try{t&&mt.isFunction(r=t.promise)?r.call(t).done(e).fail(n):t&&mt.isFunction(r=t.then)?r.call(t,e,n):e.call(void 0,t)}catch(t){n.call(void 0,t)}}function v(){it.removeEventListener("DOMContentLoaded",v),o.removeEventListener("load",v),mt.ready()}function g(){this.expando=mt.expando+g.uid++}function m(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(Ht,"-$&").toLowerCase(),n=t.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:It.test(n)?JSON.parse(n):n)}catch(i){}Rt.set(t,e,n)}else n=void 0;return n}function y(t,e,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return mt.css(t,e,"")},u=s(),l=n&&n[3]||(mt.cssNumber[e]?"":"px"),c=(mt.cssNumber[e]||"px"!==l&&+u)&&Vt.exec(mt.css(t,e));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,mt.style(t,e,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function b(t){var e,n=t.ownerDocument,r=t.nodeName,i=Xt[r];return i?i:(e=n.body.appendChild(n.createElement(r)),i=mt.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),Xt[r]=i,i)}function x(t,e){for(var n,r,i=[],o=0,a=t.length;o-1)i&&i.push(o);else if(l=mt.contains(o.ownerDocument,o),a=_(f.appendChild(o),"script"),l&&w(a),n)for(c=0;o=a[c++];)Zt.test(o.type||"")&&n.push(o);return f}function k(){return!0}function T(){return!1}function S(){try{return it.activeElement}catch(t){}}function A(t,e,r,i,o,a){var s,u;if("object"===("undefined"==typeof e?"undefined":n(e))){"string"!=typeof r&&(i=i||r,r=void 0);for(u in e)A(t,u,r,i,e[u],a);return t}if(null==i&&null==o?(o=r,i=r=void 0):null==o&&("string"==typeof r?(o=i,i=void 0):(o=i,i=r,r=void 0)),o===!1)o=T;else if(!o)return t;return 1===a&&(s=o,o=function(t){return mt().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=mt.guid++)),t.each(function(){mt.event.add(this,e,o,i,r)})}function j(t,e){return mt.nodeName(t,"table")&&mt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t:t}function E(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function O(t){var e=ae.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function $(t,e){var n,r,i,o,a,s,u,l;if(1===e.nodeType){if(Lt.hasData(t)&&(o=Lt.access(t),a=Lt.set(e,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof p&&!vt.checkClone&&oe.test(p))return t.each(function(i){var o=t.eq(i);v&&(e[0]=p.call(this,i,o.html())),M(o,e,n,r)});if(h&&(i=C(e,t[0].ownerDocument,!1,t,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=mt.map(_(i,"script"),E),u=a.length;f=0&&n0&&e-1 in t)}function l(t,e,n){if(mt.isFunction(e))return mt.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return mt.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(At.test(e))return mt.filter(e,t,n);e=mt.filter(e,t)}return mt.grep(t,function(t){return lt.call(e,t)>-1!==n&&1===t.nodeType})}function c(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function f(t){var e={};return mt.each(t.match(Mt)||[],function(t,n){e[n]=!0}),e}function h(t){return t}function d(t){throw t}function p(t,e,n){var r;try{t&&mt.isFunction(r=t.promise)?r.call(t).done(e).fail(n):t&&mt.isFunction(r=t.then)?r.call(t,e,n):e.call(void 0,t)}catch(t){n.call(void 0,t)}}function v(){it.removeEventListener("DOMContentLoaded",v),o.removeEventListener("load",v),mt.ready()}function g(){this.expando=mt.expando+g.uid++}function m(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(Ht,"-$&").toLowerCase(),n=t.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:It.test(n)?JSON.parse(n):n)}catch(i){}Rt.set(t,e,n)}else n=void 0;return n}function y(t,e,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return mt.css(t,e,"")},u=s(),l=n&&n[3]||(mt.cssNumber[e]?"":"px"),c=(mt.cssNumber[e]||"px"!==l&&+u)&&Vt.exec(mt.css(t,e));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,mt.style(t,e,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function b(t){var e,n=t.ownerDocument,r=t.nodeName,i=Jt[r];return i?i:(e=n.body.appendChild(n.createElement(r)),i=mt.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),Jt[r]=i,i)}function x(t,e){for(var n,r,i=[],o=0,a=t.length;o-1)i&&i.push(o);else if(l=mt.contains(o.ownerDocument,o),a=_(f.appendChild(o),"script"),l&&w(a),n)for(c=0;o=a[c++];)Zt.test(o.type||"")&&n.push(o);return f}function k(){return!0}function T(){return!1}function S(){try{return it.activeElement}catch(t){}}function A(t,e,r,i,o,a){var s,u;if("object"===("undefined"==typeof e?"undefined":n(e))){"string"!=typeof r&&(i=i||r,r=void 0);for(u in e)A(t,u,r,i,e[u],a);return t}if(null==i&&null==o?(o=r,i=r=void 0):null==o&&("string"==typeof r?(o=i,i=void 0):(o=i,i=r,r=void 0)),o===!1)o=T;else if(!o)return t;return 1===a&&(s=o,o=function(t){return mt().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=mt.guid++)),t.each(function(){mt.event.add(this,e,o,i,r)})}function j(t,e){return mt.nodeName(t,"table")&&mt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t:t}function E(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function O(t){var e=ae.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function $(t,e){var n,r,i,o,a,s,u,l;if(1===e.nodeType){if(Lt.hasData(t)&&(o=Lt.access(t),a=Lt.set(e,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof p&&!vt.checkClone&&oe.test(p))return t.each(function(i){var o=t.eq(i);v&&(e[0]=p.call(this,i,o.html())),M(o,e,n,r)});if(h&&(i=C(e,t[0].ownerDocument,!1,t,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=mt.map(_(i,"script"),E),u=a.length;f=0&&nC.cacheLength&&delete t[e.shift()],t[n+" "]=r}var e=[];return t}function r(t){return t[I]=!0,t}function i(t){var e=M.createElement("fieldset");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),r=n.length;r--;)C.attrHandle[n[r]]=e}function a(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function s(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function u(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function l(t){return function(e){return"label"in e&&e.disabled===t||"form"in e&&e.disabled===t||"form"in e&&e.disabled===!1&&(e.isDisabled===t||e.isDisabled!==!t&&("label"in e||!kt(e))!==t)}}function c(t){return r(function(e){return e=+e,r(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function h(){}function d(t){for(var e=0,n=t.length,r="";e1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function g(t,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else b=m(b===a?b.splice(p,b.length):b),o?o(null,a,b,u):Q.apply(a,b)})}function b(t){for(var e,n,r,i=t.length,o=C.relative[t[0].type],a=o||C.relative[" "],s=o?1:0,u=p(function(t){return t===e},a,!0),l=p(function(t){return tt(e,t)>-1},a,!0),c=[function(t,n,r){var i=!o&&(r||n!==E)||((e=n).nodeType?u(t,n,r):l(t,n,r));return e=null,i}];s1&&v(c),s>1&&d(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(st,"$1"),n,s0,o=t.length>0,a=function(r,a,s,u,l){var c,f,h,d=0,p="0",v=r&&[],g=[],y=E,b=r||o&&C.find.TAG("*",l),x=q+=null==y?1:Math.random()||.1,_=b.length;for(l&&(E=a===M||a||l);p!==_&&null!=(c=b[p]);p++){if(o&&c){for(f=0,a||c.ownerDocument===M||(N(c),s=!D);h=t[f++];)if(h(c,a||M,s)){u.push(c);break}l&&(q=x)}i&&((c=!h&&c)&&d--,r&&v.push(c))}if(d+=p,i&&p!==d){for(f=0;h=n[f++];)h(v,g,a,s);if(r){if(d>0)for(;p--;)v[p]||g[p]||(g[p]=Z.call(u));g=m(g)}Q.apply(u,g),l&&!r&&g.length>0&&d+n.length>1&&e.uniqueSort(u)}return l&&(q=x,E=y),v};return i?r(a):a}var _,w,C,k,T,S,A,j,E,O,$,N,M,P,D,F,B,L,R,I="sizzle"+1*new Date,H=t.document,q=0,V=0,z=n(),U=n(),W=n(),X=function(t,e){return t===e&&($=!0),0},J={}.hasOwnProperty,G=[],Z=G.pop,Y=G.push,Q=G.push,K=G.slice,tt=function(t,e){for(var n=0,r=t.length;n+~]|"+nt+")"+nt+"*"),ct=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),ft=new RegExp(ot),ht=new RegExp("^"+rt+"$"),dt={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),TAG:new RegExp("^("+rt+"|[*])"),ATTR:new RegExp("^"+it),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},pt=/^(?:input|select|textarea|button)$/i,vt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,mt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),xt=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},_t=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,wt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},Ct=function(){N()},kt=p(function(t){return t.disabled===!0},{dir:"parentNode",next:"legend"});try{Q.apply(G=K.call(H.childNodes),H.childNodes),G[H.childNodes.length].nodeType}catch(Tt){Q={apply:G.length?function(t,e){Y.apply(t,K.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}w=e.support={},T=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},N=e.setDocument=function(t){var e,n,r=t?t.ownerDocument||t:H;return r!==M&&9===r.nodeType&&r.documentElement?(M=r,P=M.documentElement,D=!T(M),H!==M&&(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ct,!1):n.attachEvent&&n.attachEvent("onunload",Ct)),w.attributes=i(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=i(function(t){return t.appendChild(M.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=gt.test(M.getElementsByClassName),w.getById=i(function(t){return P.appendChild(t).id=I,!M.getElementsByName||!M.getElementsByName(I).length}),w.getById?(C.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&D){var n=e.getElementById(t);return n?[n]:[]}},C.filter.ID=function(t){var e=t.replace(bt,xt);return function(t){return t.getAttribute("id")===e}}):(delete C.find.ID,C.filter.ID=function(t){var e=t.replace(bt,xt);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),C.find.TAG=w.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},C.find.CLASS=w.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&D)return e.getElementsByClassName(t)},B=[],F=[],(w.qsa=gt.test(M.querySelectorAll))&&(i(function(t){P.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||F.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+I+"-]").length||F.push("~="),t.querySelectorAll(":checked").length||F.push(":checked"),t.querySelectorAll("a#"+I+"+*").length||F.push(".#.+[+~]")}),i(function(t){t.innerHTML="";var e=M.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&F.push("name"+nt+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&F.push(":enabled",":disabled"),P.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&F.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=gt.test(L=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&i(function(t){w.disconnectedMatch=L.call(t,"*"),L.call(t,"[s!='']:x"),B.push("!=",ot)}),F=F.length&&new RegExp(F.join("|")),B=B.length&&new RegExp(B.join("|")),e=gt.test(P.compareDocumentPosition),R=e||gt.test(P.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},X=e?function(t,e){if(t===e)return $=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n?n:(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!w.sortDetached&&e.compareDocumentPosition(t)===n?t===M||t.ownerDocument===H&&R(H,t)?-1:e===M||e.ownerDocument===H&&R(H,e)?1:O?tt(O,t)-tt(O,e):0:4&n?-1:1)}:function(t,e){if(t===e)return $=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,s=[t],u=[e];if(!i||!o)return t===M?-1:e===M?1:i?-1:o?1:O?tt(O,t)-tt(O,e):0;if(i===o)return a(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===H?-1:u[r]===H?1:0},M):M},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==M&&N(t),n=n.replace(ct,"='$1']"),w.matchesSelector&&D&&!W[n+" "]&&(!B||!B.test(n))&&(!F||!F.test(n)))try{var r=L.call(t,n);if(r||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return e(n,M,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==M&&N(t),R(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==M&&N(t);var n=C.attrHandle[e.toLowerCase()],r=n&&J.call(C.attrHandle,e.toLowerCase())?n(t,e,!D):void 0;return void 0!==r?r:w.attributes||!D?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},e.escape=function(t){return(t+"").replace(_t,wt)},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],r=0,i=0;if($=!w.detectDuplicates,O=!w.sortStable&&t.slice(0),t.sort(X),$){for(;e=t[i++];)e===t[i]&&(r=n.push(i));for(;r--;)t.splice(n[r],1)}return O=null,t},k=e.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=k(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r++];)n+=k(e);return n},C=e.selectors={cacheLength:50,createPseudo:r,match:dt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(bt,xt),t[3]=(t[3]||t[4]||t[5]||"").replace(bt,xt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return dt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ft.test(n)&&(e=S(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(bt,xt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=z[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&z(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(at," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,f,h,d,p,v=o!==a?"nextSibling":"previousSibling",g=e.parentNode,m=s&&e.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(g){if(o){for(;v;){for(h=e;h=h[v];)if(s?h.nodeName.toLowerCase()===m:1===h.nodeType)return!1;p=v="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(h=g,f=h[I]||(h[I]={}),c=f[h.uniqueID]||(f[h.uniqueID]={}),l=c[t]||[],d=l[0]===q&&l[1],b=d&&l[2],h=d&&g.childNodes[d];h=++d&&h&&h[v]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[q,d,b];break}}else if(y&&(h=e,f=h[I]||(h[I]={}),c=f[h.uniqueID]||(f[h.uniqueID]={}),l=c[t]||[],d=l[0]===q&&l[1],b=d),b===!1)for(;(h=++d&&h&&h[v]||(b=d=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==m:1!==h.nodeType)||!++b||(y&&(f=h[I]||(h[I]={}),c=f[h.uniqueID]||(f[h.uniqueID]={}),c[t]=[q,b]),h!==e)););return b-=i,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(t,n){var i,o=C.pseudos[t]||C.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[I]?o(n):o.length>1?(i=[t,t,"",n],C.setFilters.hasOwnProperty(t.toLowerCase())?r(function(t,e){for(var r,i=o(t,n),a=i.length;a--;)r=tt(t,i[a]),t[r]=!(e[r]=i[a])}):function(t){return o(t,0,i)}):o}},pseudos:{not:r(function(t){var e=[],n=[],i=A(t.replace(st,"$1"));return i[I]?r(function(t,e,n,r){for(var o,a=i(t,null,r,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(t){return t=t.replace(bt,xt),function(e){return(e.textContent||e.innerText||k(e)).indexOf(t)>-1}}),lang:r(function(t){return ht.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(bt,xt).toLowerCase(),function(e){var n;do if(n=D?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===P},focus:function(t){return t===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!C.pseudos.empty(t)},header:function(t){return vt.test(t.nodeName)},input:function(t){return pt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,n){return[n<0?n+e:n]}),even:c(function(t,e){for(var n=0;n=0;)t.push(r);return t}),gt:c(function(t,e,n){for(var r=n<0?n+e:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===e.nodeType&&D&&C.relative[o[1].type]){if(e=(C.find.ID(a.matches[0].replace(bt,xt),e)||[])[0],!e)return n;l&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(i=dt.needsContext.test(t)?0:o.length;i--&&(a=o[i],!C.relative[s=a.type]);)if((u=C.find[s])&&(r=u(a.matches[0].replace(bt,xt),yt.test(o[0].type)&&f(e.parentNode)||e))){if(o.splice(i,1),t=r.length&&d(o),!t)return Q.apply(n,r),n;break}}return(l||A(t,c))(r,e,!D,n,!e||yt.test(t)&&f(e.parentNode)||e),n},w.sortStable=I.split("").sort(X).join("")===I,w.detectDuplicates=!!$,N(),w.sortDetached=i(function(t){return 1&t.compareDocumentPosition(M.createElement("fieldset"))}),i(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&i(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),i(function(t){return null==t.getAttribute("disabled")})||o(et,function(t,e,n){var r;if(!n)return t[e]===!0?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),e}(o);mt.find=wt,mt.expr=wt.selectors,mt.expr[":"]=mt.expr.pseudos,mt.uniqueSort=mt.unique=wt.uniqueSort,mt.text=wt.getText,mt.isXMLDoc=wt.isXML,mt.contains=wt.contains,mt.escapeSelector=wt.escape;var Ct=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&mt(t).is(n))break;r.push(t)}return r},kt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},Tt=mt.expr.match.needsContext,St=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,At=/^.[^:#\[\.,]*$/;mt.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?mt.find.matchesSelector(r,t)?[r]:[]:mt.find.matches(t,mt.grep(e,function(t){return 1===t.nodeType}))},mt.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(mt(t).filter(function(){for(e=0;e1?mt.uniqueSort(n):n},filter:function(t){return this.pushStack(l(this,t||[],!1))},not:function(t){return this.pushStack(l(this,t||[],!0))},is:function(t){return!!l(this,"string"==typeof t&&Tt.test(t)?mt(t):t||[],!1).length}});var jt,Et=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Ot=mt.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||jt,"string"==typeof t){if(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:Et.exec(t),!r||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof mt?e[0]:e,mt.merge(this,mt.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:it,!0)),St.test(r[1])&&mt.isPlainObject(e))for(r in e)mt.isFunction(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return i=it.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):mt.isFunction(t)?void 0!==n.ready?n.ready(t):t(mt):mt.makeArray(t,this)};Ot.prototype=mt.fn,jt=mt(it);var $t=/^(?:parents|prev(?:Until|All))/,Nt={children:!0,contents:!0,next:!0,prev:!0};mt.fn.extend({has:function(t){var e=mt(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&mt.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?mt.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?lt.call(mt(t),this[0]):lt.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(mt.uniqueSort(mt.merge(this.get(),mt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),mt.each({parent:function tn(t){var tn=t.parentNode;return tn&&11!==tn.nodeType?tn:null},parents:function(t){return Ct(t,"parentNode")},parentsUntil:function(t,e,n){return Ct(t,"parentNode",n)},next:function(t){return c(t,"nextSibling")},prev:function(t){return c(t,"previousSibling")},nextAll:function(t){return Ct(t,"nextSibling")},prevAll:function(t){return Ct(t,"previousSibling")},nextUntil:function(t,e,n){return Ct(t,"nextSibling",n)},prevUntil:function(t,e,n){return Ct(t,"previousSibling",n)},siblings:function(t){return kt((t.parentNode||{}).firstChild,t)},children:function(t){return kt(t.firstChild)},contents:function(t){return t.contentDocument||mt.merge([],t.childNodes)}},function(t,e){mt.fn[t]=function(n,r){var i=mt.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=mt.filter(r,i)),this.length>1&&(Nt[t]||mt.uniqueSort(i),$t.test(t)&&i.reverse()),this.pushStack(i)}});var Mt=/\S+/g;mt.Callbacks=function(t){t="string"==typeof t?f(t):mt.extend({},t);var e,n,r,i,o=[],a=[],s=-1,u=function(){for(i=t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(t){return t?mt.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=n||[],n=[t,n.slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},mt.extend({Deferred:function(t){var e=[["notify","progress",mt.Callbacks("memory"),mt.Callbacks("memory"),2],["resolve","done",mt.Callbacks("once memory"),mt.Callbacks("once memory"),0,"resolved"],["reject","fail",mt.Callbacks("once memory"),mt.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},"catch":function(t){return i.then(null,t)},pipe:function(){var t=arguments;return mt.Deferred(function(n){mt.each(e,function(e,r){var i=mt.isFunction(t[r[4]])&&t[r[4]];a[r[1]](function(){var t=i&&i.apply(this,arguments);t&&mt.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)})}),t=null}).promise()},then:function(t,r,i){function a(t,e,r,i){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(t=s&&(r!==d&&(u=void 0,l=[n]),e.rejectWith(u,l))}};t?f():(mt.Deferred.getStackHook&&(f.stackTrace=mt.Deferred.getStackHook()),o.setTimeout(f))}}var s=0;return mt.Deferred(function(n){e[0][3].add(a(0,n,mt.isFunction(i)?i:h,n.notifyWith)),e[1][3].add(a(0,n,mt.isFunction(t)?t:h)),e[2][3].add(a(0,n,mt.isFunction(r)?r:d))}).promise()},promise:function(t){return null!=t?mt.extend(t,i):i}},a={};return mt.each(e,function(t,n){var o=n[2],s=n[5];i[n[1]]=o.add,s&&o.add(function(){r=s},e[3-t][2].disable,e[0][2].lock),o.add(n[3].fire),a[n[0]]=function(){return a[n[0]+"With"](this===a?void 0:this,arguments),this},a[n[0]+"With"]=o.fireWith}),i.promise(a),t&&t.call(a,a),a},when:function(t){var e=arguments.length,n=e,r=Array(n),i=at.call(arguments),o=mt.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?at.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(p(t,o.done(a(n)).resolve,o.reject),"pending"===o.state()||mt.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)p(i[n],a(n),o.reject);return o.promise()}});var Pt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;mt.Deferred.exceptionHook=function(t,e){o.console&&o.console.warn&&t&&Pt.test(t.name)&&o.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},mt.readyException=function(t){o.setTimeout(function(){throw t})};var Dt=mt.Deferred();mt.fn.ready=function(t){return Dt.then(t)["catch"](function(t){mt.readyException(t)}),this},mt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?mt.readyWait++:mt.ready(!0)},ready:function(t){(t===!0?--mt.readyWait:mt.isReady)||(mt.isReady=!0,t!==!0&&--mt.readyWait>0||Dt.resolveWith(it,[mt]))}}),mt.ready.then=Dt.then,"complete"===it.readyState||"loading"!==it.readyState&&!it.documentElement.doScroll?o.setTimeout(mt.ready):(it.addEventListener("DOMContentLoaded",v),o.addEventListener("load",v));var Ft=function en(t,e,n,r,i,o,a){var s=0,u=t.length,l=null==n;if("object"===mt.type(n)){i=!0;for(s in n)en(t,e,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,mt.isFunction(r)||(a=!0),l&&(a?(e.call(t,r),e=null):(l=e,e=function(t,e,n){return l.call(mt(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each(function(){Rt.remove(this,t)})}}),mt.extend({queue:function rn(t,e,n){var rn;if(t)return e=(e||"fx")+"queue",rn=Lt.get(t,e),n&&(!rn||mt.isArray(n)?rn=Lt.access(t,e,mt.makeArray(n)):rn.push(n)),rn||[]},dequeue:function(t,e){e=e||"fx";var n=mt.queue(t,e),r=n.length,i=n.shift(),o=mt._queueHooks(t,e),a=function(){mt.dequeue(t,e)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Lt.get(t,n)||Lt.access(t,n,{empty:mt.Callbacks("once memory").add(function(){Lt.remove(t,[e+"queue",n])})})}}),mt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Zt=/^$|\/(?:java|ecma)script/i,Yt={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};Yt.optgroup=Yt.option,Yt.tbody=Yt.tfoot=Yt.colgroup=Yt.caption=Yt.thead,Yt.th=Yt.td;var Qt=/<|&#?\w+;/;!function(){var t=it.createDocumentFragment(),e=t.appendChild(it.createElement("div")),n=it.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),vt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked, -e.innerHTML="",vt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Kt=it.documentElement,te=/^key/,ee=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ne=/^([^.]*)(?:\.(.+)|)/;mt.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,h,d,p,v,g=Lt.get(t);if(g)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&mt.find.matchesSelector(Kt,i),n.guid||(n.guid=mt.guid++),(u=g.events)||(u=g.events={}),(a=g.handle)||(a=g.handle=function(e){return"undefined"!=typeof mt&&mt.event.triggered!==e.type?mt.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(Mt)||[""],l=e.length;l--;)s=ne.exec(e[l])||[],d=v=s[1],p=(s[2]||"").split(".").sort(),d&&(f=mt.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=mt.event.special[d]||{},c=mt.extend({type:d,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&mt.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[d])||(h=u[d]=[],h.delegateCount=0,f.setup&&f.setup.call(t,r,p,a)!==!1||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),mt.event.global[d]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,l,c,f,h,d,p,v,g=Lt.hasData(t)&&Lt.get(t);if(g&&(u=g.events)){for(e=(e||"").match(Mt)||[""],l=e.length;l--;)if(s=ne.exec(e[l])||[],d=v=s[1],p=(s[2]||"").split(".").sort(),d){for(f=mt.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,h=u[d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&v!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,f.remove&&f.remove.call(t,c));a&&!h.length&&(f.teardown&&f.teardown.call(t,p,g.handle)!==!1||mt.removeEvent(t,d,g.handle),delete u[d])}else for(d in u)mt.event.remove(t,d+e[l],n,r,!0);mt.isEmptyObject(u)&&Lt.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=mt.event.fix(t),u=new Array(arguments.length),l=(Lt.get(this,"events")||{})[s.type]||[],c=mt.event.special[s.type]||{};for(u[0]=s,e=1;e-1:mt.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s\x20\t\r\n\f]*)[^>]*)\/>/gi,ie=/\s*$/g;mt.extend({htmlPrefilter:function(t){return t.replace(re,"<$1>")},clone:function on(t,e,n){var r,i,o,a,on=t.cloneNode(!0),s=mt.contains(t.ownerDocument,t);if(!(vt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||mt.isXMLDoc(t)))for(a=_(on),o=_(t),r=0,i=o.length;r0&&w(a,!s&&_(t,"script")),on},cleanData:function(t){for(var e,n,r,i=mt.event.special,o=0;void 0!==(n=t[o]);o++)if(Bt(n)){if(e=n[Lt.expando]){if(e.events)for(r in e.events)i[r]?mt.event.remove(n,r):mt.removeEvent(n,r,e.handle);n[Lt.expando]=void 0}n[Rt.expando]&&(n[Rt.expando]=void 0)}}}),mt.fn.extend({detach:function(t){return P(this,t,!0)},remove:function(t){return P(this,t)},text:function(t){return Ft(this,function(t){return void 0===t?mt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return M(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=j(this,t);e.appendChild(t)}})},prepend:function(){return M(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=j(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return M(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return M(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(mt.cleanData(_(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return mt.clone(this,t,e)})},html:function(t){return Ft(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!ie.test(t)&&!Yt[(Gt.exec(t)||["",""])[1].toLowerCase()]){t=mt.htmlPrefilter(t);try{for(;n1)}}),mt.Tween=H,H.prototype={constructor:H,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||mt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(mt.cssNumber[n]?"":"px")},cur:function(){var t=H.propHooks[this.prop];return t&&t.get?t.get(this):H.propHooks._default.get(this)},run:function(t){var e,n=H.propHooks[this.prop];return this.options.duration?this.pos=e=mt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=mt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){mt.fx.step[t.prop]?mt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[mt.cssProps[t.prop]]&&!mt.cssHooks[t.prop]?t.elem[t.prop]=t.now:mt.style(t.elem,t.prop,t.now+t.unit)}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},mt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},mt.fx=H.prototype.init,mt.fx.step={};var ge,me,ye=/^(?:toggle|show|hide)$/,be=/queueHooks$/;mt.Animation=mt.extend(J,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return y(n.elem,t,Vt.exec(e),n),n}]},tweener:function(t,e){mt.isFunction(t)?(e=t,t=["*"]):t=t.match(Mt);for(var n,r=0,i=t.length;r1)},removeAttr:function(t){return this.each(function(){mt.removeAttr(this,t)})}}),mt.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?mt.prop(t,e,n):(1===o&&mt.isXMLDoc(t)||(i=mt.attrHooks[e.toLowerCase()]||(mt.expr.match.bool.test(e)?xe:void 0)),void 0!==n?null===n?void mt.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:(r=mt.find.attr(t,e),null==r?void 0:r))},attrHooks:{type:{set:function(t,e){if(!vt.radioValue&&"radio"===e&&mt.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(Mt);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),xe={set:function(t,e,n){return e===!1?mt.removeAttr(t,n):t.setAttribute(n,n),n}},mt.each(mt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=_e[e]||mt.find.attr;_e[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=_e[a],_e[a]=i,i=null!=n(t,e,r)?a:null,_e[a]=o),i}});var we=/^(?:input|select|textarea|button)$/i,Ce=/^(?:a|area)$/i;mt.fn.extend({prop:function(t,e){return Ft(this,mt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[mt.propFix[t]||t]})}}),mt.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&mt.isXMLDoc(t)||(e=mt.propFix[e]||e,i=mt.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=mt.find.attr(t,"tabindex");return e?parseInt(e,10):we.test(t.nodeName)||Ce.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),vt.optSelected||(mt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),mt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){mt.propFix[this.toLowerCase()]=this});var ke=/[\t\r\n\f]/g;mt.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(mt.isFunction(t))return this.each(function(e){mt(this).addClass(t.call(this,e,G(this)))});if("string"==typeof t&&t)for(e=t.match(Mt)||[];n=this[u++];)if(i=G(n),r=1===n.nodeType&&(" "+i+" ").replace(ke," ")){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=mt.trim(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(mt.isFunction(t))return this.each(function(e){mt(this).removeClass(t.call(this,e,G(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Mt)||[];n=this[u++];)if(i=G(n),r=1===n.nodeType&&(" "+i+" ").replace(ke," ")){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=mt.trim(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var r="undefined"==typeof t?"undefined":n(t);return"boolean"==typeof e&&"string"===r?e?this.addClass(t):this.removeClass(t):mt.isFunction(t)?this.each(function(n){mt(this).toggleClass(t.call(this,n,G(this),e),e)}):this.each(function(){var e,n,i,o;if("string"===r)for(n=0,i=mt(this),o=t.match(Mt)||[];e=o[n++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else void 0!==t&&"boolean"!==r||(e=G(this),e&&Lt.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||t===!1?"":Lt.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+G(n)+" ").replace(ke," ").indexOf(e)>-1)return!0;return!1}});var Te=/\r/g,Se=/[\x20\t\r\n\f]+/g;mt.fn.extend({val:function(t){var e,n,r,i=this[0];{if(arguments.length)return r=mt.isFunction(t),this.each(function(n){var i;1===this.nodeType&&(i=r?t.call(this,n,mt(this).val()):t,null==i?i="":"number"==typeof i?i+="":mt.isArray(i)&&(i=mt.map(i,function(t){return null==t?"":t+""})),e=mt.valHooks[this.type]||mt.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))});if(i)return e=mt.valHooks[i.type]||mt.valHooks[i.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Te,""):null==n?"":n)}}}),mt.extend({valHooks:{option:{get:function(t){var e=mt.find.attr(t,"value");return null!=e?e:mt.trim(mt.text(t)).replace(Se," ")}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),mt.each(["radio","checkbox"],function(){mt.valHooks[this]={set:function(t,e){if(mt.isArray(e))return t.checked=mt.inArray(mt(t).val(),e)>-1}},vt.checkOn||(mt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Ae=/^(?:focusinfocus|focusoutblur)$/;mt.extend(mt.event,{trigger:function(t,e,r,i){var a,s,u,l,c,f,h,d=[r||it],p=ht.call(t,"type")?t.type:t,v=ht.call(t,"namespace")?t.namespace.split("."):[];if(s=u=r=r||it,3!==r.nodeType&&8!==r.nodeType&&!Ae.test(p+mt.event.triggered)&&(p.indexOf(".")>-1&&(v=p.split("."),p=v.shift(),v.sort()),c=p.indexOf(":")<0&&"on"+p,t=t[mt.expando]?t:new mt.Event(p,"object"===("undefined"==typeof t?"undefined":n(t))&&t),t.isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:mt.makeArray(e,[t]),h=mt.event.special[p]||{},i||!h.trigger||h.trigger.apply(r,e)!==!1)){if(!i&&!h.noBubble&&!mt.isWindow(r)){for(l=h.delegateType||p,Ae.test(l+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),u=s;u===(r.ownerDocument||it)&&d.push(u.defaultView||u.parentWindow||o)}for(a=0;(s=d[a++])&&!t.isPropagationStopped();)t.type=a>1?l:h.bindType||p,f=(Lt.get(s,"events")||{})[t.type]&&Lt.get(s,"handle"),f&&f.apply(s,e),f=c&&s[c],f&&f.apply&&Bt(s)&&(t.result=f.apply(s,e),t.result===!1&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||h._default&&h._default.apply(d.pop(),e)!==!1||!Bt(r)||c&&mt.isFunction(r[p])&&!mt.isWindow(r)&&(u=r[c],u&&(r[c]=null),mt.event.triggered=p,r[p](),mt.event.triggered=void 0,u&&(r[c]=u)),t.result}},simulate:function(t,e,n){var r=mt.extend(new mt.Event,n,{type:t,isSimulated:!0});mt.event.trigger(r,null,e)}}),mt.fn.extend({trigger:function(t,e){return this.each(function(){mt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return mt.event.trigger(t,e,n,!0)}}),mt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){mt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),mt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),vt.focusin="onfocusin"in o,vt.focusin||mt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){mt.event.simulate(e,t.target,mt.event.fix(t))};mt.event.special[e]={setup:function(){var r=this.ownerDocument||this,i=Lt.access(r,e);i||r.addEventListener(t,n,!0),Lt.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Lt.access(r,e)-1;i?Lt.access(r,e,i):(r.removeEventListener(t,n,!0),Lt.remove(r,e))}}});var je=o.location,Ee=mt.now(),Oe=/\?/;mt.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new o.DOMParser).parseFromString(t,"text/xml")}catch(n){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||mt.error("Invalid XML: "+t),e};var $e=/\[\]$/,Ne=/\r?\n/g,Me=/^(?:submit|button|image|reset|file)$/i,Pe=/^(?:input|select|textarea|keygen)/i;mt.param=function(t,e){var n,r=[],i=function(t,e){var n=mt.isFunction(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(mt.isArray(t)||t.jquery&&!mt.isPlainObject(t))mt.each(t,function(){i(this.name,this.value)});else for(n in t)Z(n,t[n],e,i);return r.join("&")},mt.fn.extend({serialize:function(){return mt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=mt.prop(this,"elements");return t?mt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!mt(this).is(":disabled")&&Pe.test(this.nodeName)&&!Me.test(t)&&(this.checked||!Jt.test(t))}).map(function(t,e){var n=mt(this).val();return null==n?null:mt.isArray(n)?mt.map(n,function(t){return{name:e.name,value:t.replace(Ne,"\r\n")}}):{name:e.name,value:n.replace(Ne,"\r\n")}}).get()}});var De=/%20/g,Fe=/#.*$/,Be=/([?&])_=[^&]*/,Le=/^(.*?):[ \t]*([^\r\n]*)$/gm,Re=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ie=/^(?:GET|HEAD)$/,He=/^\/\//,qe={},Ve={},ze="*/".concat("*"),Ue=it.createElement("a");Ue.href=je.href,mt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:je.href,type:"GET",isLocal:Re.test(je.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":mt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?K(K(t,mt.ajaxSettings),e):K(mt.ajaxSettings,t)},ajaxPrefilter:Y(qe),ajaxTransport:Y(Ve),ajax:function(t,e){function r(t,e,n,r){var u,c,d,p,_,w=e;f||(f=!0,l&&o.clearTimeout(l),i=void 0,s=r||"",k.readyState=t>0?4:0,u=t>=200&&t<300||304===t,n&&(p=tt(v,k,n)),p=et(v,p,k,u),u?(v.ifModified&&(_=k.getResponseHeader("Last-Modified"),_&&(mt.lastModified[a]=_),_=k.getResponseHeader("etag"),_&&(mt.etag[a]=_)),204===t||"HEAD"===v.type?w="nocontent":304===t?w="notmodified":(w=p.state,c=p.data,d=p.error,u=!d)):(d=w,!t&&w||(w="error",t<0&&(t=0))),k.status=t,k.statusText=(e||w)+"",u?y.resolveWith(g,[c,w,k]):y.rejectWith(g,[k,w,d]),k.statusCode(x),x=void 0,h&&m.trigger(u?"ajaxSuccess":"ajaxError",[k,v,u?c:d]),b.fireWith(g,[k,w]),h&&(m.trigger("ajaxComplete",[k,v]),--mt.active||mt.event.trigger("ajaxStop")))}"object"===("undefined"==typeof t?"undefined":n(t))&&(e=t,t=void 0),e=e||{};var i,a,s,u,l,c,f,h,d,p,v=mt.ajaxSetup({},e),g=v.context||v,m=v.context&&(g.nodeType||g.jquery)?mt(g):mt.event,y=mt.Deferred(),b=mt.Callbacks("once memory"),x=v.statusCode||{},_={},w={},C="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(f){if(!u)for(u={};e=Le.exec(s);)u[e[1].toLowerCase()]=e[2];e=u[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return f?s:null},setRequestHeader:function(t,e){return null==f&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,_[t]=e),this},overrideMimeType:function(t){return null==f&&(v.mimeType=t),this},statusCode:function(t){var e;if(t)if(f)k.always(t[k.status]);else for(e in t)x[e]=[x[e],t[e]];return this},abort:function(t){var e=t||C;return i&&i.abort(e),r(0,e),this}};if(y.promise(k),v.url=((t||v.url||je.href)+"").replace(He,je.protocol+"//"),v.type=e.method||e.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(Mt)||[""],null==v.crossDomain){c=it.createElement("a");try{c.href=v.url,c.href=c.href,v.crossDomain=Ue.protocol+"//"+Ue.host!=c.protocol+"//"+c.host}catch(T){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=mt.param(v.data,v.traditional)),Q(qe,v,e,k),f)return k;h=mt.event&&v.global,h&&0===mt.active++&&mt.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ie.test(v.type),a=v.url.replace(Fe,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(De,"+")):(p=v.url.slice(a.length),v.data&&(a+=(Oe.test(a)?"&":"?")+v.data,delete v.data),v.cache===!1&&(a=a.replace(Be,""),p=(Oe.test(a)?"&":"?")+"_="+Ee++ +p),v.url=a+p),v.ifModified&&(mt.lastModified[a]&&k.setRequestHeader("If-Modified-Since",mt.lastModified[a]),mt.etag[a]&&k.setRequestHeader("If-None-Match",mt.etag[a])),(v.data&&v.hasContent&&v.contentType!==!1||e.contentType)&&k.setRequestHeader("Content-Type",v.contentType),k.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+ze+"; q=0.01":""):v.accepts["*"]);for(d in v.headers)k.setRequestHeader(d,v.headers[d]);if(v.beforeSend&&(v.beforeSend.call(g,k,v)===!1||f))return k.abort();if(C="abort",b.add(v.complete),k.done(v.success),k.fail(v.error),i=Q(Ve,v,e,k)){if(k.readyState=1,h&&m.trigger("ajaxSend",[k,v]),f)return k;v.async&&v.timeout>0&&(l=o.setTimeout(function(){k.abort("timeout")},v.timeout));try{f=!1,i.send(_,r)}catch(T){if(f)throw T;r(-1,T)}}else r(-1,"No Transport");return k},getJSON:function(t,e,n){return mt.get(t,e,n,"json")},getScript:function(t,e){return mt.get(t,void 0,e,"script")}}),mt.each(["get","post"],function(t,e){mt[e]=function(t,n,r,i){return mt.isFunction(n)&&(i=i||r,r=n,n=void 0),mt.ajax(mt.extend({url:t,type:e,dataType:i,data:n,success:r},mt.isPlainObject(t)&&t))}}),mt._evalUrl=function(t){return mt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},mt.fn.extend({wrapAll:function(t){var e;return this[0]&&(mt.isFunction(t)&&(t=t.call(this[0])),e=mt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return mt.isFunction(t)?this.each(function(e){mt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=mt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=mt.isFunction(t);return this.each(function(n){mt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){ -return this.parent(t).not("body").each(function(){mt(this).replaceWith(this.childNodes)}),this}}),mt.expr.pseudos.hidden=function(t){return!mt.expr.pseudos.visible(t)},mt.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},mt.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(t){}};var We={0:200,1223:204},Xe=mt.ajaxSettings.xhr();vt.cors=!!Xe&&"withCredentials"in Xe,vt.ajax=Xe=!!Xe,mt.ajaxTransport(function(t){var e,n;if(vt.cors||Xe&&!t.crossDomain)return{send:function(r,i){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);e=function(t){return function(){e&&(e=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(We[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),n=s.onerror=e("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){e&&n()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(u){if(e)throw u}},abort:function(){e&&e()}}}),mt.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),mt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return mt.globalEval(t),t}}}),mt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),mt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(r,i){e=mt("