removed deprecated JS
completed import of 3rd party dependencies added url to README.md init GitHub version "Hermes 1.0b"
This commit is contained in:
parent
abc4fb2c21
commit
b16fa60929
81 changed files with 65818 additions and 0 deletions
125
3rd/js/autocomplete.js
Normal file
125
3rd/js/autocomplete.js
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
// Part of open-source library at https://github.com/klokantech/javascript
|
||||
// compiled from https://github.com/klokantech/javascript/blob/master/src/osmnamesautocomplete.js
|
||||
(function(){var g,aa=aa||{},n=this;function p(a){return void 0!==a}function ba(a,b){var c=a.split("."),d=n;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&p(b)?d[e]=b:d=d[e]?d[e]:d[e]={}}function ca(){}
|
||||
function ea(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
|
||||
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function q(a){return"array"==ea(a)}function fa(a){var b=ea(a);return"array"==b||"object"==b&&"number"==typeof a.length}function r(a){return"string"==typeof a}function t(a){return"number"==typeof a}function ga(a){return"function"==ea(a)}function ha(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ia(a){return a[ja]||(a[ja]=++ka)}var ja="closure_uid_"+(1E9*Math.random()>>>0),ka=0;
|
||||
function la(a,b,c){return a.call.apply(a.bind,arguments)}function ma(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function v(a,b,c){v=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?la:ma;return v.apply(null,arguments)}var w=Date.now||function(){return+new Date};
|
||||
function x(a,b){function c(){}c.prototype=b.prototype;a.o=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Uc=function(a,c,f){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[c].apply(a,h)}};var na;var oa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function pa(a){if(!qa.test(a))return a;-1!=a.indexOf("\x26")&&(a=a.replace(ra,"\x26amp;"));-1!=a.indexOf("\x3c")&&(a=a.replace(sa,"\x26lt;"));-1!=a.indexOf("\x3e")&&(a=a.replace(ta,"\x26gt;"));-1!=a.indexOf('"')&&(a=a.replace(ua,"\x26quot;"));-1!=a.indexOf("'")&&(a=a.replace(va,"\x26#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(wa,"\x26#0;"));return a}
|
||||
var ra=/&/g,sa=/</g,ta=/>/g,ua=/"/g,va=/'/g,wa=/\x00/g,qa=/[\x00&<>"']/;function xa(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")}function ya(a,b){return a<b?-1:a>b?1:0};var za=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(r(a))return r(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},y=Array.prototype.forEach?function(a,b,c){Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=r(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Aa=Array.prototype.filter?function(a,b,c){return Array.prototype.filter.call(a,
|
||||
b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,h=r(a)?a.split(""):a,k=0;k<d;k++)if(k in h){var l=h[k];b.call(c,l,k,a)&&(e[f++]=l)}return e},Ba=Array.prototype.map?function(a,b,c){return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=r(a)?a.split(""):a,h=0;h<d;h++)h in f&&(e[h]=b.call(c,f[h],h,a));return e};
|
||||
function Ca(a){var b;a:{b=Da;for(var c=a.length,d=r(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:r(a)?a.charAt(b):a[b]}function Ea(a,b){var c=za(a,b),d;(d=0<=c)&&Array.prototype.splice.call(a,c,1);return d}function Fa(a){return Array.prototype.concat.apply(Array.prototype,arguments)}function Ga(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}
|
||||
function Ha(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};function Ia(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}function Ka(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function La(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Ma(){var a=Na,b;for(b in a)return!1;return!0}var Oa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
|
||||
function Pa(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<Oa.length;f++)c=Oa[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}function Qa(a){var b=arguments.length;if(1==b&&q(arguments[0]))return Qa.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};function Ra(a){if(a.L&&"function"==typeof a.L)return a.L();if(r(a))return a.split("");if(fa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Ka(a)}
|
||||
function Sa(a,b,c){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,c);else if(fa(a)||r(a))y(a,b,c);else{var d;if(a.getKeys&&"function"==typeof a.getKeys)d=a.getKeys();else if(a.L&&"function"==typeof a.L)d=void 0;else if(fa(a)||r(a)){d=[];for(var e=a.length,f=0;f<e;f++)d.push(f)}else d=La(a);for(var e=Ra(a),f=e.length,h=0;h<f;h++)b.call(c,e[h],d&&d[h],a)}};function Ta(a,b){this.P={};this.h=[];this.f=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)}g=Ta.prototype;g.Ab=function(){return this.f};g.L=function(){Ua(this);for(var a=[],b=0;b<this.h.length;b++)a.push(this.P[this.h[b]]);return a};g.getKeys=function(){Ua(this);return this.h.concat()};g.qa=function(a){return Va(this.P,a)};
|
||||
g.equals=function(a,b){if(this===a)return!0;if(this.f!=a.Ab())return!1;var c=b||Wa;Ua(this);for(var d,e=0;d=this.h[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function Wa(a,b){return a===b}g.isEmpty=function(){return 0==this.f};g.clear=function(){this.P={};this.f=this.h.length=0};g.remove=function(a){return Va(this.P,a)?(delete this.P[a],this.f--,this.h.length>2*this.f&&Ua(this),!0):!1};
|
||||
function Ua(a){if(a.f!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Va(a.P,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.f!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Va(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}}g.get=function(a,b){return Va(this.P,a)?this.P[a]:b};g.set=function(a,b){Va(this.P,a)||(this.f++,this.h.push(a));this.P[a]=b};g.addAll=function(a){var b;a instanceof Ta?(b=a.getKeys(),a=a.L()):(b=La(a),a=Ka(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};
|
||||
g.forEach=function(a,b){for(var c=this.getKeys(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};g.clone=function(){return new Ta(this)};function Va(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Xa=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Ya(a,b){if(a)for(var c=a.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f,h=null;0<=e?(f=c[d].substring(0,e),h=c[d].substring(e+1)):f=c[d];b(f,h?decodeURIComponent(h.replace(/\+/g," ")):"")}};function Za(a,b,c){this.f=this.m=null;this.G=a||null;this.Bc=!!c}function z(a){a.m||(a.m=new Ta,a.f=0,a.G&&Ya(a.G,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))}g=Za.prototype;g.Ab=function(){z(this);return this.f};g.add=function(a,b){z(this);this.G=null;a=$a(this,a);var c=this.m.get(a);c||this.m.set(a,c=[]);c.push(b);this.f+=1;return this};g.remove=function(a){z(this);a=$a(this,a);return this.m.qa(a)?(this.G=null,this.f-=this.m.get(a).length,this.m.remove(a)):!1};
|
||||
g.clear=function(){this.m=this.G=null;this.f=0};g.isEmpty=function(){z(this);return 0==this.f};g.qa=function(a){z(this);a=$a(this,a);return this.m.qa(a)};g.getKeys=function(){z(this);for(var a=this.m.L(),b=this.m.getKeys(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};g.L=function(a){z(this);var b=[];if(r(a))this.qa(a)&&(b=Fa(b,this.m.get($a(this,a))));else{a=this.m.L();for(var c=0;c<a.length;c++)b=Fa(b,a[c])}return b};
|
||||
g.set=function(a,b){z(this);this.G=null;a=$a(this,a);this.qa(a)&&(this.f-=this.m.get(a).length);this.m.set(a,[b]);this.f+=1;return this};g.get=function(a,b){var c=a?this.L(a):[];return 0<c.length?String(c[0]):b};g.setValues=function(a,b){this.remove(a);0<b.length&&(this.G=null,this.m.set($a(this,a),Ga(b)),this.f+=b.length)};
|
||||
g.toString=function(){if(this.G)return this.G;if(!this.m)return"";for(var a=[],b=this.m.getKeys(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.L(d),f=0;f<d.length;f++){var h=e;""!==d[f]&&(h+="\x3d"+encodeURIComponent(String(d[f])));a.push(h)}return this.G=a.join("\x26")};g.clone=function(){var a=new Za;a.G=this.G;this.m&&(a.m=this.m.clone(),a.f=this.f);return a};function $a(a,b){var c=String(b);a.Bc&&(c=c.toLowerCase());return c}
|
||||
g.extend=function(a){for(var b=0;b<arguments.length;b++)Sa(arguments[b],function(a,b){this.add(b,a)},this)};var ab;a:{var bb=n.navigator;if(bb){var cb=bb.userAgent;if(cb){ab=cb;break a}}ab=""}function A(a){return-1!=ab.indexOf(a)};function db(a){db[" "](a);return a}db[" "]=ca;function eb(a,b){try{return db(a[b]),!0}catch(c){}return!1}function fb(a,b){var c=gb;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var hb=A("Opera"),B=A("Trident")||A("MSIE"),D=A("Edge"),ib=D||B,E=A("Gecko")&&!(-1!=ab.toLowerCase().indexOf("webkit")&&!A("Edge"))&&!(A("Trident")||A("MSIE"))&&!A("Edge"),G=-1!=ab.toLowerCase().indexOf("webkit")&&!A("Edge"),H=A("Macintosh");function jb(){var a=n.document;return a?a.documentMode:void 0}var kb;
|
||||
a:{var lb="",mb=function(){var a=ab;if(E)return/rv\:([^\);]+)(\)|;)/.exec(a);if(D)return/Edge\/([\d\.]+)/.exec(a);if(B)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(G)return/WebKit\/(\S+)/.exec(a);if(hb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();mb&&(lb=mb?mb[1]:"");if(B){var nb=jb();if(null!=nb&&nb>parseFloat(lb)){kb=String(nb);break a}}kb=lb}var gb={};
|
||||
function I(a){return fb(a,function(){for(var b=0,c=oa(String(kb)).split("."),d=oa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var h=c[f]||"",k=d[f]||"";do{h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];k=/(\d*)(\D*)(.*)/.exec(k)||["","","",""];if(0==h[0].length&&0==k[0].length)break;b=ya(0==h[1].length?0:parseInt(h[1],10),0==k[1].length?0:parseInt(k[1],10))||ya(0==h[2].length,0==k[2].length)||ya(h[2],k[2]);h=h[3];k=k[3]}while(0==b)}return 0<=b})}
|
||||
var ob=n.document,J=ob&&B?jb()||("CSS1Compat"==ob.compatMode?parseInt(kb,10):5):void 0;var pb=!B||9<=Number(J);!E&&!B||B&&9<=Number(J)||E&&I("1.9.1");B&&I("9");function K(a,b){this.x=p(a)?a:0;this.y=p(b)?b:0}g=K.prototype;g.clone=function(){return new K(this.x,this.y)};g.equals=function(a){return a instanceof K&&(this==a?!0:this&&a?this.x==a.x&&this.y==a.y:!1)};function qb(a,b){return new K(a.x-b.x,a.y-b.y)}g.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};g.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};g.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
|
||||
g.translate=function(a,b){a instanceof K?(this.x+=a.x,this.y+=a.y):(this.x+=Number(a),t(b)&&(this.y+=b));return this};g.scale=function(a,b){var c=t(b)?b:a;this.x*=a;this.y*=c;return this};function rb(a,b){this.width=a;this.height=b}g=rb.prototype;g.clone=function(){return new rb(this.width,this.height)};g.nc=function(){return this.width*this.height};g.isEmpty=function(){return!this.nc()};g.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};g.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};g.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
|
||||
g.scale=function(a,b){var c=t(b)?b:a;this.width*=a;this.height*=c;return this};function L(a){return a?new sb(M(a)):na||(na=new sb)}function tb(a,b){Ia(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:ub.hasOwnProperty(d)?a.setAttribute(ub[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})}
|
||||
var ub={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function vb(a){var b=wb(a);a=xb(a);return B&&I("10")&&a.pageYOffset!=b.scrollTop?new K(b.scrollLeft,b.scrollTop):new K(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}
|
||||
function wb(a){return a.scrollingElement?a.scrollingElement:!G&&yb(a)?a.documentElement:a.body||a.documentElement}function xb(a){return a.parentWindow||a.defaultView}function zb(a,b,c,d){function e(c){c&&b.appendChild(r(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var f=c[d];!fa(f)||ha(f)&&0<f.nodeType?e(f):y(Ab(f)?Ga(f):f,e)}}function yb(a){return"CSS1Compat"==a.compatMode}function Bb(a){for(var b;b=a.firstChild;)a.removeChild(b)}
|
||||
function M(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function Ab(a){if(a&&"number"==typeof a.length){if(ha(a))return"function"==typeof a.item||"string"==typeof a.item;if(ga(a))return"function"==typeof a.item}return!1}function Cb(a){return Db(a,function(a){return"FORM"==a.nodeName&&!0})}function Db(a,b){for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function sb(a){this.v=a||n.document||document}g=sb.prototype;
|
||||
g.getElement=function(a){return r(a)?this.v.getElementById(a):a};g.getElementsByTagName=function(a,b){return(b||this.v).getElementsByTagName(String(a))};g.setProperties=tb;
|
||||
g.zb=function(a,b,c){var d=this.v,e=arguments,f=String(e[0]),h=e[1];if(!pb&&h&&(h.name||h.type)){f=["\x3c",f];h.name&&f.push(' name\x3d"',pa(h.name),'"');if(h.type){f.push(' type\x3d"',pa(h.type),'"');var k={};Pa(k,h);delete k.type;h=k}f.push("\x3e");f=f.join("")}f=d.createElement(f);h&&(r(h)?f.className=h:q(h)?f.className=h.join(" "):tb(f,h));2<e.length&&zb(d,f,e,2);return f};g.createElement=function(a){return this.v.createElement(String(a))};g.createTextNode=function(a){return this.v.createTextNode(String(a))};
|
||||
g.appendChild=function(a,b){a.appendChild(b)};g.append=function(a,b){zb(M(a),a,arguments,1)};g.canHaveChildren=function(a){if(1!=a.nodeType)return!1;switch(a.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};
|
||||
g.Kc=Bb;g.removeNode=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};g.contains=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};function Eb(a){if(a.classList)return a.classList;a=a.className;return r(a)&&a.match(/\S+/g)||[]}function Fb(a,b){var c;a.classList?c=a.classList.contains(b):(c=Eb(a),c=0<=za(c,b));return c}function Gb(a,b){a.classList?a.classList.add(b):Fb(a,b)||(a.className+=0<a.className.length?" "+b:b)}function Hb(a,b){if(a.classList)y(b,function(b){Gb(a,b)});else{var c={};y(Eb(a),function(a){c[a]=!0});y(b,function(a){c[a]=!0});a.className="";for(var d in c)a.className+=0<a.className.length?" "+d:d}}
|
||||
function Ib(a,b){a.classList?a.classList.remove(b):Fb(a,b)&&(a.className=Aa(Eb(a),function(a){return a!=b}).join(" "))}function Jb(a,b){a.classList?y(b,function(b){Ib(a,b)}):a.className=Aa(Eb(a),function(a){return!(0<=za(b,a))}).join(" ")};function N(){0!=Kb&&(Lb[ia(this)]=this);this.ra=this.ra;this.La=this.La}var Kb=0,Lb={};N.prototype.ra=!1;N.prototype.X=function(){if(!this.ra&&(this.ra=!0,this.l(),0!=Kb)){var a=ia(this);delete Lb[a]}};N.prototype.l=function(){if(this.La)for(;this.La.length;)this.La.shift()()};function Mb(a){a&&"function"==typeof a.X&&a.X()};var Nb=!B||9<=Number(J),Ob=B&&!I("9");!G||I("528");E&&I("1.9b")||B&&I("8")||hb&&I("9.5")||G&&I("528");E&&!I("8")||B&&I("9");function O(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.fa=!1;this.$b=!0}O.prototype.stopPropagation=function(){this.fa=!0};O.prototype.preventDefault=function(){this.defaultPrevented=!0;this.$b=!1};function P(a,b){O.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.ja=this.state=null;if(a){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;e?E&&(eb(e,"nodeName")||(e=null)):"mouseover"==c?e=a.fromElement:
|
||||
"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;null===d?(this.offsetX=G||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=G||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=
|
||||
a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.ja=a;a.defaultPrevented&&this.preventDefault()}}x(P,O);P.prototype.stopPropagation=function(){P.o.stopPropagation.call(this);this.ja.stopPropagation?this.ja.stopPropagation():this.ja.cancelBubble=!0};
|
||||
P.prototype.preventDefault=function(){P.o.preventDefault.call(this);var a=this.ja;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Ob)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Pb="closure_listenable_"+(1E6*Math.random()|0);function Qb(a){return!(!a||!a[Pb])}var Rb=0;function Sb(a,b,c,d,e){this.listener=a;this.Na=null;this.src=b;this.type=c;this.pa=!!d;this.Ca=e;this.key=++Rb;this.na=this.za=!1}function Ub(a){a.na=!0;a.listener=null;a.Na=null;a.src=null;a.Ca=null};function Vb(a){this.src=a;this.A={};this.xa=0}g=Vb.prototype;g.add=function(a,b,c,d,e){var f=a.toString();a=this.A[f];a||(a=this.A[f]=[],this.xa++);var h=Wb(a,b,d,e);-1<h?(b=a[h],c||(b.za=!1)):(b=new Sb(b,this.src,f,!!d,e),b.za=c,a.push(b));return b};g.remove=function(a,b,c,d){a=a.toString();if(!(a in this.A))return!1;var e=this.A[a];b=Wb(e,b,c,d);return-1<b?(Ub(e[b]),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.A[a],this.xa--),!0):!1};
|
||||
function Xb(a,b){var c=b.type;c in a.A&&Ea(a.A[c],b)&&(Ub(b),0==a.A[c].length&&(delete a.A[c],a.xa--))}g.Oa=function(a){a=a&&a.toString();var b=0,c;for(c in this.A)if(!a||c==a){for(var d=this.A[c],e=0;e<d.length;e++)++b,Ub(d[e]);delete this.A[c];this.xa--}return b};g.sa=function(a,b,c,d){a=this.A[a.toString()];var e=-1;a&&(e=Wb(a,b,c,d));return-1<e?a[e]:null};
|
||||
g.hasListener=function(a,b){var c=p(a),d=c?a.toString():"",e=p(b);return Ja(this.A,function(a){for(var h=0;h<a.length;++h)if(!(c&&a[h].type!=d||e&&a[h].pa!=b))return!0;return!1})};function Wb(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.na&&f.listener==b&&f.pa==!!c&&f.Ca==d)return e}return-1};var Yb="closure_lm_"+(1E6*Math.random()|0),Zb={},$b=0;function R(a,b,c,d,e){if(q(b)){for(var f=0;f<b.length;f++)R(a,b[f],c,d,e);return null}c=ac(c);return Qb(a)?a.D(b,c,d,e):bc(a,b,c,!1,d,e)}
|
||||
function bc(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var h=!!e,k=cc(a);k||(a[Yb]=k=new Vb(a));c=k.add(b,c,d,e,f);if(c.Na)return c;d=dc();c.Na=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,h);else if(a.attachEvent)a.attachEvent(ec(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");$b++;return c}
|
||||
function dc(){var a=fc,b=Nb?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b}function gc(a,b,c,d,e){if(q(b)){for(var f=0;f<b.length;f++)gc(a,b[f],c,d,e);return null}c=ac(c);return Qb(a)?a.lb(b,c,d,e):bc(a,b,c,!0,d,e)}function hc(a,b,c,d,e){if(q(b))for(var f=0;f<b.length;f++)hc(a,b[f],c,d,e);else c=ac(c),Qb(a)?a.F(b,c,d,e):a&&(a=cc(a))&&(b=a.sa(b,c,!!d,e))&&ic(b)}
|
||||
function ic(a){if(t(a)||!a||a.na)return;var b=a.src;if(Qb(b)){Xb(b.O,a);return}var c=a.type,d=a.Na;b.removeEventListener?b.removeEventListener(c,d,a.pa):b.detachEvent&&b.detachEvent(ec(c),d);$b--;(c=cc(b))?(Xb(c,a),0==c.xa&&(c.src=null,b[Yb]=null)):Ub(a)}function ec(a){return a in Zb?Zb[a]:Zb[a]="on"+a}function jc(a,b,c,d){var e=!0;if(a=cc(a))if(b=a.A[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.pa==c&&!f.na&&(f=kc(f,d),e=e&&!1!==f)}return e}
|
||||
function kc(a,b){var c=a.listener,d=a.Ca||a.src;a.za&&ic(a);return c.call(d,b)}
|
||||
function fc(a,b){if(a.na)return!0;if(!Nb){var c;if(!(c=b))a:{c=["window","event"];for(var d=n,e;e=c.shift();)if(null!=d[e])d=d[e];else{c=null;break a}c=d}e=c;c=new P(e,this);d=!0;if(!(0>e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(l){f=!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var f=a.type,h=e.length-1;!c.fa&&0<=h;h--){c.currentTarget=e[h];var k=jc(e[h],f,!0,c),d=d&&k}for(h=0;!c.fa&&h<
|
||||
e.length;h++)c.currentTarget=e[h],k=jc(e[h],f,!1,c),d=d&&k}return d}return kc(a,new P(b,this))}function cc(a){a=a[Yb];return a instanceof Vb?a:null}var lc="__closure_events_fn_"+(1E9*Math.random()>>>0);function ac(a){if(ga(a))return a;a[lc]||(a[lc]=function(b){return a.handleEvent(b)});return a[lc]};function S(){N.call(this);this.O=new Vb(this);this.lc=this;this.ob=null}x(S,N);S.prototype[Pb]=!0;g=S.prototype;g.addEventListener=function(a,b,c,d){R(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){hc(this,a,b,c,d)};
|
||||
g.dispatchEvent=function(a){var b,c=this.ob;if(c)for(b=[];c;c=c.ob)b.push(c);var c=this.lc,d=a.type||a;if(r(a))a=new O(a,c);else if(a instanceof O)a.target=a.target||c;else{var e=a;a=new O(d,c);Pa(a,e)}var e=!0,f;if(b)for(var h=b.length-1;!a.fa&&0<=h;h--)f=a.currentTarget=b[h],e=mc(f,d,!0,a)&&e;a.fa||(f=a.currentTarget=c,e=mc(f,d,!0,a)&&e,a.fa||(e=mc(f,d,!1,a)&&e));if(b)for(h=0;!a.fa&&h<b.length;h++)f=a.currentTarget=b[h],e=mc(f,d,!1,a)&&e;return e};
|
||||
g.l=function(){S.o.l.call(this);this.O&&this.O.Oa(void 0);this.ob=null};g.D=function(a,b,c,d){return this.O.add(String(a),b,!1,c,d)};g.lb=function(a,b,c,d){return this.O.add(String(a),b,!0,c,d)};g.F=function(a,b,c,d){return this.O.remove(String(a),b,c,d)};function mc(a,b,c,d){b=a.O.A[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var h=b[f];if(h&&!h.na&&h.pa==c){var k=h.listener,l=h.Ca||h.src;h.za&&Xb(a.O,h);e=!1!==k.call(l,d)&&e}}return e&&0!=d.$b}
|
||||
g.sa=function(a,b,c,d){return this.O.sa(String(a),b,c,d)};g.hasListener=function(a,b){return this.O.hasListener(p(a)?String(a):void 0,b)};function nc(a,b){S.call(this);this.ea=a||1;this.oa=b||n;this.Za=v(this.Qc,this);this.kb=w()}x(nc,S);g=nc.prototype;g.enabled=!1;g.g=null;g.setInterval=function(a){this.ea=a;this.g&&this.enabled?(this.stop(),this.start()):this.g&&this.stop()};
|
||||
g.Qc=function(){if(this.enabled){var a=w()-this.kb;0<a&&a<.8*this.ea?this.g=this.oa.setTimeout(this.Za,this.ea-a):(this.g&&(this.oa.clearTimeout(this.g),this.g=null),this.dispatchEvent("tick"),this.enabled&&(this.g=this.oa.setTimeout(this.Za,this.ea),this.kb=w()))}};g.start=function(){this.enabled=!0;this.g||(this.g=this.oa.setTimeout(this.Za,this.ea),this.kb=w())};g.stop=function(){this.enabled=!1;this.g&&(this.oa.clearTimeout(this.g),this.g=null)};g.l=function(){nc.o.l.call(this);this.stop();delete this.oa};
|
||||
function oc(a,b,c){if(ga(a))c&&(a=v(a,c));else if(a&&"function"==typeof a.handleEvent)a=v(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:n.setTimeout(a,b||0)};function pc(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);};function qc(){}qc.prototype.yb=null;function rc(a){var b;(b=a.yb)||(b={},sc(a)&&(b[0]=!0,b[1]=!0),b=a.yb=b);return b};var tc;function uc(){}x(uc,qc);function vc(a){return(a=sc(a))?new ActiveXObject(a):new XMLHttpRequest}function sc(a){if(!a.Fb&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.Fb=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Fb}tc=new uc;function wc(a){S.call(this);this.headers=new Ta;this.Wa=a||null;this.W=!1;this.Va=this.a=null;this.Ia=this.ib="";this.ca=this.cb=this.Fa=this.$a=!1;this.Sa=0;this.Ra=null;this.Zb=xc;this.ub=this.Ic=this.jc=!1}x(wc,S);var xc="",yc=/^https?$/i,zc=["POST","PUT"],Ac=[];function Bc(a,b){var c=new wc;Ac.push(c);b&&c.D("complete",b);c.lb("ready",c.rc);c.send(a,void 0,void 0,void 0);return c}g=wc.prototype;g.rc=function(){this.X();Ea(Ac,this)};
|
||||
g.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request\x3d"+this.ib+"; newUri\x3d"+a);b=b?b.toUpperCase():"GET";this.ib=a;this.Ia="";this.$a=!1;this.W=!0;this.a=this.Wa?vc(this.Wa):vc(tc);this.Va=this.Wa?rc(this.Wa):rc(tc);this.a.onreadystatechange=v(this.Vb,this);this.Ic&&"onprogress"in this.a&&(this.a.onprogress=v(function(a){this.Ub(a,!0)},this),this.a.upload&&(this.a.upload.onprogress=v(this.Ub,this)));try{this.cb=!0,this.a.open(b,String(a),!0),
|
||||
this.cb=!1}catch(f){Cc(this,f);return}a=c||"";var e=this.headers.clone();d&&Sa(d,function(a,b){e.set(b,a)});d=Ca(e.getKeys());c=n.FormData&&a instanceof n.FormData;!(0<=za(zc,b))||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset\x3dutf-8");e.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.Zb&&(this.a.responseType=this.Zb);"withCredentials"in this.a&&this.a.withCredentials!==this.jc&&(this.a.withCredentials=this.jc);try{Dc(this),0<this.Sa&&((this.ub=Ec(this.a))?
|
||||
(this.a.timeout=this.Sa,this.a.ontimeout=v(this.cc,this)):this.Ra=oc(this.cc,this.Sa,this)),this.Fa=!0,this.a.send(a),this.Fa=!1}catch(f){Cc(this,f)}};function Ec(a){return B&&I(9)&&t(a.timeout)&&p(a.ontimeout)}function Da(a){return"content-type"==a.toLowerCase()}g.cc=function(){"undefined"!=typeof aa&&this.a&&(this.Ia="Timed out after "+this.Sa+"ms, aborting",this.dispatchEvent("timeout"),this.abort(8))};function Cc(a,b){a.W=!1;a.a&&(a.ca=!0,a.a.abort(),a.ca=!1);a.Ia=b;Fc(a);Gc(a)}
|
||||
function Fc(a){a.$a||(a.$a=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))}g.abort=function(){this.a&&this.W&&(this.W=!1,this.ca=!0,this.a.abort(),this.ca=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Gc(this))};g.l=function(){this.a&&(this.W&&(this.W=!1,this.ca=!0,this.a.abort(),this.ca=!1),Gc(this,!0));wc.o.l.call(this)};g.Vb=function(){this.ra||(this.cb||this.Fa||this.ca?Hc(this):this.Fc())};g.Fc=function(){Hc(this)};
|
||||
function Hc(a){if(a.W&&"undefined"!=typeof aa&&(!a.Va[1]||4!=Ic(a)||2!=a.getStatus()))if(a.Fa&&4==Ic(a))oc(a.Vb,0,a);else if(a.dispatchEvent("readystatechange"),4==Ic(a)){a.W=!1;try{if(Jc(a))a.dispatchEvent("complete"),a.dispatchEvent("success");else{var b;try{b=2<Ic(a)?a.a.statusText:""}catch(c){b=""}a.Ia=b+" ["+a.getStatus()+"]";Fc(a)}}finally{Gc(a)}}}g.Ub=function(a,b){this.dispatchEvent(Kc(a,"progress"));this.dispatchEvent(Kc(a,b?"downloadprogress":"uploadprogress"))};
|
||||
function Kc(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}}function Gc(a,b){if(a.a){Dc(a);var c=a.a,d=a.Va[0]?ca:null;a.a=null;a.Va=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){}}}function Dc(a){a.a&&a.ub&&(a.a.ontimeout=null);t(a.Ra)&&(n.clearTimeout(a.Ra),a.Ra=null)}g.fb=function(){return!!this.a};
|
||||
function Jc(a){var b=a.getStatus(),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}if(!c){if(b=0===b)a=String(a.ib).match(Xa)[1]||null,!a&&n.self&&n.self.location&&(a=n.self.location.protocol,a=a.substr(0,a.length-1)),b=!yc.test(a?a.toLowerCase():"");c=b}return c}function Ic(a){return a.a?a.a.readyState:0}g.getStatus=function(){try{return 2<Ic(this)?this.a.status:-1}catch(a){return-1}};
|
||||
g.getResponseHeader=function(a){if(this.a&&4==Ic(this))return a=this.a.getResponseHeader(a),null===a?void 0:a};g.getAllResponseHeaders=function(){return this.a&&4==Ic(this)?this.a.getAllResponseHeaders():""};function Lc(a,b,c){S.call(this);this.U=a;this.Qa=c;this.I=b;R(b,[Mc,Nc,Oc,Pc],this.handleEvent,!1,this);this.K=null;this.j=[];this.Y=-1;this.B=0;this.ba=this.w=null;this.Hb={}}x(Lc,S);g=Lc.prototype;g.Ec=10;g.oc=!0;g.xb=!1;g.kc=!1;g.dc=!1;var Mc="hilite",Nc="select",Pc="dismiss",Oc="canceldismiss";g=Lc.prototype;
|
||||
g.handleEvent=function(a){var b=this.U;if(a.target==this.I)switch(a.type){case Mc:this.T(a.row);break;case Nc:var c=!1;if(t(a.row)){a=a.row;var d=this.j[Qc(this,a)],c=!!d&&b.gb&&b.gb(d);d&&!c&&this.Y!=a&&this.T(a)}c||Rc(this);break;case Oc:Sc(this);break;case Pc:Tc(this)}};g.getTarget=function(){return this.w};g.setTarget=function(a){this.w=a};
|
||||
function Uc(a){for(var b=a.B+a.j.length-1,c=a.Y,d=0;d<a.j.length;d++){if(c>=a.B&&c<b)c++;else if(-1==c)c=a.B;else if(a.xb&&c==b){a.T(-1);break}else if(a.kc&&c==b)c=a.B;else break;if(a.T(c))break}}function Vc(a){for(var b=a.B+a.j.length-1,c=a.Y,d=0;d<a.j.length;d++){if(c>a.B)c--;else if(a.xb&&c==a.B){a.T(-1);break}else if(!a.kc||-1!=c&&c!=a.B)break;else c=b;if(a.T(c))break}}g.T=function(a){var b=Qc(this,a),c=this.j[b];return c&&this.U.gb&&this.U.gb(c)?!1:(this.Y=a,this.I.T(a),-1!=b)};
|
||||
function Rc(a){var b=Qc(a,a.Y);if(-1!=b){var c=a.j[b],d=a.Qa;if(d.c){var e=c.toString();if(p(void 0)?0:d.ma){var f=Wc(d,d.c.value,Xc(d.c)[0]),h=Yc(d,d.c.value);d.Nc.test(e)||(e=e.replace(/[\s\xa0]+$/,"")+d.sc);d.Tc&&(0==f||/^[\s\xa0]*$/.test(h[f-1])||(e=" "+e),f==h.length-1&&(e+=" "));if(e!=h[f]){h[f]=e;e=d.c;(E||B&&I("9"))&&e.blur();e.value=h.join("");for(var k=0,l=0;l<=f;l++)k+=h[l].length;e.focus();f=k;h=d.c;e=f;Zc(h)?h.selectionStart=e:B&&!I("9")&&(k=$c(h),l=k[0],l.inRange(k[1])&&(e=ad(h,e),l.collapse(!0),
|
||||
l.move("character",e),l.select()));h=d.c;Zc(h)?h.selectionEnd=f:B&&!I("9")&&(k=$c(h),e=k[1],k[0].inRange(e)&&(f=ad(h,f),h=ad(h,Xc(h)[0]),e.collapse(!0),e.moveEnd("character",f-h),e.select()))}}else d.c.value=e;d.sb=!0}a.dc?(a.K=null,Tc(a)):a.S();a.dispatchEvent({type:"update",row:c,index:b});a.dc&&a.Qa.update(!0);return!0}a.S();a.dispatchEvent({type:"update",row:null,index:null});return!1}
|
||||
g.S=function(){this.Y=-1;this.K=null;this.B+=this.j.length;this.j=[];window.clearTimeout(this.ba);this.ba=null;this.I.S();this.dispatchEvent("suggestionsupdate");this.dispatchEvent(Pc)};function Tc(a){a.ba||(a.ba=window.setTimeout(v(a.S,a),100))}g.Gb=function(){return this.ba?(window.clearTimeout(this.ba),this.ba=null,!0):!1};function Sc(a){a.Gb()||window.setTimeout(v(a.Gb,a),10)}g.l=function(){Lc.o.l.call(this);delete this.Hb;this.I.X();this.Qa.X();this.U=null};
|
||||
g.Cc=function(a,b,c){this.K==a&&this.qb(b,c)};g.qb=function(a,b){var c="object"==ea(b)&&b,d=(c?c.Vc():b)?Qc(this,this.Y):-1;this.B+=this.j.length;this.j=a;for(var e=[],f=0;f<a.length;++f)e.push({id:this.B+f,data:a[f]});f=null;this.w&&(f=this.Hb[ia(this.w)]||this.w);this.I.mc=f;this.I.qb(e,this.K,this.w);f=this.oc;c&&void 0!==c.wc()&&(f=c.wc());this.Y=-1;(f||0<=d)&&0!=e.length&&this.K&&(0<=d?this.T(this.B+d):Uc(this));this.dispatchEvent("suggestionsupdate")};
|
||||
function Qc(a,b){var c=b-a.B;return 0>c||c>=a.j.length?-1:c}g.update=function(a){this.Qa.update(a)};var bd;Qa("A AREA BUTTON HEAD INPUT LINK MENU META OPTGROUP OPTION PROGRESS STYLE SELECT SOURCE TEXTAREA TITLE TRACK".split(" "));function cd(a,b){b?a.setAttribute("role",b):a.removeAttribute("role")}
|
||||
function dd(a,b,c){q(c)&&(c=c.join(" "));var d="aria-"+b;""===c||void 0==c?(bd||(bd={atomic:!1,autocomplete:"none",dropeffect:"none",haspopup:!1,live:"off",multiline:!1,multiselectable:!1,orientation:"vertical",readonly:!1,relevant:"additions text",required:!1,sort:"none",busy:!1,disabled:!1,hidden:!1,invalid:"false"}),c=bd,b in c?a.setAttribute(d,c[b]):a.removeAttribute(d)):a.setAttribute(d,c)}function ed(a,b){var c="";b&&(c=b.id);dd(a,"activedescendant",c)};function Xc(a){var b=0,c=0;if(Zc(a))b=a.selectionStart,c=-1;else if(B&&!I("9")){var d=$c(a),e=d[0],d=d[1];if(e.inRange(d)){e.setEndPoint("EndToStart",d);if("textarea"==a.type){d.duplicate();b=a=e.text;for(c=!1;!c;)0==e.compareEndPoints("StartToEnd",e)?c=!0:(e.moveEnd("character",-1),e.text==a?b+="\r\n":c=!0);e=[b.length,-1];return e}b=e.text.length;c=-1}}return[b,c]}
|
||||
function $c(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]}function ad(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function Zc(a){try{return"number"==typeof a.selectionStart}catch(b){return!1}};function fd(a){N.call(this);this.ka=a;this.h={}}x(fd,N);var gd=[];g=fd.prototype;g.D=function(a,b,c,d){q(b)||(b&&(gd[0]=b.toString()),b=gd);for(var e=0;e<b.length;e++){var f=R(a,b[e],c||this.handleEvent,d||!1,this.ka||this);if(!f)break;this.h[f.key]=f}return this};g.lb=function(a,b,c,d){return hd(this,a,b,c,d)};function hd(a,b,c,d,e,f){if(q(c))for(var h=0;h<c.length;h++)hd(a,b,c[h],d,e,f);else{b=gc(b,c,d||a.handleEvent,e,f||a.ka||a);if(!b)return a;a.h[b.key]=b}return a}
|
||||
g.F=function(a,b,c,d,e){if(q(b))for(var f=0;f<b.length;f++)this.F(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.ka||this,c=ac(c),d=!!d,b=Qb(a)?a.sa(b,c,d,e):a?(a=cc(a))?a.sa(b,c,d,e):null:null,b&&(ic(b),delete this.h[b.key]);return this};g.Oa=function(){Ia(this.h,function(a,b){this.h.hasOwnProperty(b)&&ic(a)},this);this.h={}};g.l=function(){fd.o.l.call(this);this.Oa()};g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function id(a,b,c,d,e,f){if(!(B||D||G&&I("525")))return!0;if(H&&e)return jd(a);if(e&&!d)return!1;t(b)&&(b=kd(b));e=17==b||18==b||H&&91==b;if((!c||H)&&e||H&&16==b&&(d||f))return!1;if((G||D)&&d&&c)switch(a){case 220:case 219:case 221:case 192:case 186:case 189:case 187:case 188:case 190:case 191:case 192:case 222:return!1}if(B&&d&&b==a)return!1;switch(a){case 13:return!0;case 27:return!(G||D)}return jd(a)}
|
||||
function jd(a){if(48<=a&&57>=a||96<=a&&106>=a||65<=a&&90>=a||(G||D)&&0==a)return!0;switch(a){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:return!0;default:return!1}}function kd(a){if(E)a=ld(a);else if(H&&G)a:switch(a){case 93:a=91;break a}return a}
|
||||
function ld(a){switch(a){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return a}};function md(a,b){S.call(this);a&&nd(this,a,b)}x(md,S);g=md.prototype;g.b=null;g.Ga=null;g.hb=null;g.Ha=null;g.C=-1;g.Z=-1;g.Ya=!1;
|
||||
var od={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},pd={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},qd=B||D||G&&I("525"),rd=H&&E;g=md.prototype;
|
||||
g.xc=function(a){if(G||D)if(17==this.C&&!a.ctrlKey||18==this.C&&!a.altKey||H&&91==this.C&&!a.metaKey)this.Z=this.C=-1;-1==this.C&&(a.ctrlKey&&17!=a.keyCode?this.C=17:a.altKey&&18!=a.keyCode?this.C=18:a.metaKey&&91!=a.keyCode&&(this.C=91));qd&&!id(a.keyCode,this.C,a.shiftKey,a.ctrlKey,a.altKey,a.metaKey)?this.handleEvent(a):(this.Z=kd(a.keyCode),rd&&(this.Ya=a.altKey))};g.zc=function(a){this.Z=this.C=-1;this.Ya=a.altKey};
|
||||
g.handleEvent=function(a){var b=a.ja,c,d,e=b.altKey;B&&"keypress"==a.type?(c=this.Z,d=13!=c&&27!=c?b.keyCode:0):(G||D)&&"keypress"==a.type?(c=this.Z,d=0<=b.charCode&&63232>b.charCode&&jd(c)?b.charCode:0):hb&&!G?(c=this.Z,d=jd(c)?b.keyCode:0):(c=b.keyCode||this.Z,d=b.charCode||0,rd&&(e=this.Ya),H&&63==d&&224==c&&(c=191));var f=c=kd(c);c?63232<=c&&c in od?f=od[c]:25==c&&a.shiftKey&&(f=9):b.keyIdentifier&&b.keyIdentifier in pd&&(f=pd[b.keyIdentifier]);a=f==this.C;this.C=f;b=new sd(f,d,a,b);b.altKey=
|
||||
e;this.dispatchEvent(b)};g.getElement=function(){return this.b};function nd(a,b,c){a.Ha&&a.detach();a.b=b;a.Ga=R(a.b,"keypress",a,c);a.hb=R(a.b,"keydown",a.xc,c,a);a.Ha=R(a.b,"keyup",a.zc,c,a)}g.detach=function(){this.Ga&&(ic(this.Ga),ic(this.hb),ic(this.Ha),this.Ha=this.hb=this.Ga=null);this.b=null;this.Z=this.C=-1};g.l=function(){md.o.l.call(this);this.detach()};function sd(a,b,c,d){P.call(this,d);this.type="key";this.keyCode=a;this.charCode=b;this.repeat=c}x(sd,P);var td=A("iPhone")&&!A("iPod")&&!A("iPad")||A("iPod"),ud=A("iPad");function vd(a,b,c,d){N.call(this);d=d||150;this.ma=null!=c?c:!0;this.va=a||",;";this.sc=this.va.substring(0,1);a=this.ma?"[\\s"+this.va+"]+":"[\\s]+";this.ec=new RegExp("^"+a+"|"+a+"$","g");this.Nc=new RegExp("\\s*["+this.va+"]$");this.Lb=b||"";this.Hc=!1;this.Gc=this.ma;this.g=0<d?new nc(d):null;this.s=new fd(this);this.ya=new fd(this);this.ua=new md;this.Jb=-1}x(vd,N);var wd=(td||ud)&&!I("533.17.9");g=vd.prototype;g.Tc=!0;g.vc=!0;g.gc=!1;g.Pc=!0;g.Oc=!0;g.Xa=null;g.c=null;g.jb="";g.aa=!1;g.sb=!1;
|
||||
g.fc=!0;g.l=function(){vd.o.l.call(this);null!=this.Xa&&window.clearTimeout(this.Xa);this.s.X();delete this.s;this.ya.X();this.ua.X();Mb(this.g)};function xd(a){a.g?a.g.setInterval(300):a.g=new nc(300)}
|
||||
function yd(a,b){switch(b.keyCode){case 40:if(a.i.I.R){a.gc?Vc(a.i):Uc(a.i);b.preventDefault();return}if(!a.ma){a.update(!0);b.preventDefault();return}break;case 38:if(a.i.I.R){a.gc?Uc(a.i):Vc(a.i);b.preventDefault();return}break;case 9:if(!a.i.I.R||b.shiftKey||a.Hc)a.i.S();else if(a.update(),Rc(a.i)&&a.Gc){b.preventDefault();return}break;case 13:if(a.i.I.R){if(a.update(),Rc(a.i)){b.preventDefault();b.stopPropagation();return}}else a.i.S();break;case 27:if(a.i.I.R){a.i.S();b.preventDefault();b.stopPropagation();
|
||||
return}break;case 229:if(!a.aa){a.aa||(a.s.D(a.c,"keyup",a.Rb),a.s.D(a.c,"keypress",a.Qb),a.aa=!0);return}break;default:a.g&&!a.fc&&(a.g.stop(),a.g.start())}zd(a,b)}function zd(a,b){var c=a.ma&&b.charCode&&-1!=a.va.indexOf(String.fromCharCode(b.charCode));a.Pc&&c&&a.update();a.Oc&&c&&Rc(a.i)&&b.preventDefault()}g.yc=function(){return!1};g.bb=function(a){Ad(this,a.target||null)};
|
||||
function Ad(a,b){a.ya.Oa();a.i&&Sc(a.i);b!=a.c&&(a.c=b,a.g&&(a.g.start(),a.s.D(a.g,"tick",a.Wb)),a.jb=a.c.value,nd(a.ua,a.c),a.s.D(a.ua,"key",a.Sb),a.s.D(a.c,"mousedown",a.Tb),B&&a.s.D(a.c,"keypress",a.Ob))}g.ab=function(){wd?this.Xa=window.setTimeout(v(this.Xb,this),0):this.Xb()};
|
||||
g.Xb=function(){this.c&&(this.s.F(this.ua,"key",this.Sb),this.ua.detach(),this.s.F(this.c,"keyup",this.yc),this.s.F(this.c,"mousedown",this.Tb),B&&this.s.F(this.c,"keypress",this.Ob),this.aa&&Bd(this),this.c=null,this.g&&(this.g.stop(),this.s.F(this.g,"tick",this.Wb)),this.i&&Tc(this.i))};g.Wb=function(){this.update()};g.Pb=function(a){this.bb(a)};g.Sb=function(a){this.Jb=a.keyCode;this.i&&yd(this,a)};g.Qb=function(){this.aa&&229!=this.Jb&&Bd(this)};
|
||||
g.Rb=function(a){this.aa&&(13==a.keyCode||77==a.keyCode&&a.ctrlKey)&&Bd(this)};g.Tb=function(){};function Bd(a){a.aa&&(a.aa=!1,a.s.F(a.c,"keypress",a.Qb),a.s.F(a.c,"keyup",a.Rb))}g.Ob=function(a){zd(this,a)};
|
||||
g.update=function(a){if(this.c&&(a||this.c.value!=this.jb)){if(a||!this.sb){a=Xc(this.c)[0];var b=this.c.value;a=Yc(this,b)[Wc(this,b,a)];a=this.ec?String(a).replace(this.ec,""):a;this.i&&(this.i.setTarget(this.c),b=this.i,b.K!=a&&(b.K=a,Cd(b.U,b.K,b.Ec,v(b.Cc,b)),Sc(b)))}this.jb=this.c.value}this.sb=!1};function Wc(a,b,c){a=Yc(a,b);if(c==b.length)return a.length-1;for(var d=b=0,e=0;d<a.length&&e<=c;d++)e+=a[d].length,b=d;return b}
|
||||
function Yc(a,b){if(!a.ma)return[b];for(var c=String(b).split(""),d=[],e=[],f=0,h=!1;f<c.length;f++)a.Lb&&-1!=a.Lb.indexOf(c[f])?(a.vc&&!h&&(d.push(e.join("")),e.length=0),e.push(c[f]),h=!h):h||-1==a.va.indexOf(c[f])?e.push(c[f]):(e.push(c[f]),d.push(e.join("")),e.length=0);d.push(e.join(""));return d};function Dd(){S.call(this);this.J=Ed;this.endTime=this.startTime=null}x(Dd,S);var Ed=0;Dd.prototype.V=function(){this.M("begin")};Dd.prototype.$=function(){this.M("end")};Dd.prototype.M=function(a){this.dispatchEvent(a)};function Fd(a,b,c){N.call(this);this.mb=a;this.ea=b||0;this.ka=c;this.qc=v(this.tc,this)}x(Fd,N);g=Fd.prototype;g.ta=0;g.l=function(){Fd.o.l.call(this);this.stop();delete this.mb;delete this.ka};g.start=function(a){this.stop();this.ta=oc(this.qc,p(a)?a:this.ea)};g.stop=function(){this.fb()&&n.clearTimeout(this.ta);this.ta=0};g.fb=function(){return 0!=this.ta};g.tc=function(){this.ta=0;this.mb&&this.mb.call(this.ka)};var Na={},Gd=null;function Hd(a){a=ia(a);delete Na[a];Ma()&&Gd&&Gd.stop()}function Id(){Gd||(Gd=new Fd(function(){Jd()},20));var a=Gd;a.fb()||a.start()}function Jd(){var a=w();Ia(Na,function(b){Kd(b,a)});Ma()||Id()};function Ld(a,b,c,d){Dd.call(this);if(!q(a)||!q(b))throw Error("Start and end parameters must be arrays");if(a.length!=b.length)throw Error("Start and end points must be the same length");this.wa=a;this.uc=b;this.duration=c;this.vb=d;this.coords=[];this.H=0}x(Ld,Dd);g=Ld.prototype;
|
||||
g.play=function(a){if(a||this.J==Ed)this.H=0,this.coords=this.wa;else if(1==this.J)return!1;Hd(this);this.startTime=a=w();-1==this.J&&(this.startTime-=this.duration*this.H);this.endTime=this.startTime+this.duration;this.H||this.V();this.M("play");-1==this.J&&this.M("resume");this.J=1;var b=ia(this);b in Na||(Na[b]=this);Id();Kd(this,a);return!0};g.stop=function(a){Hd(this);this.J=Ed;a&&(this.H=1);Md(this,this.H);this.M("stop");this.$()};g.pause=function(){1==this.J&&(Hd(this),this.J=-1,this.M("pause"))};
|
||||
g.l=function(){this.J==Ed||this.stop(!1);this.M("destroy");Ld.o.l.call(this)};function Kd(a,b){b<a.startTime&&(a.endTime=b+a.endTime-a.startTime,a.startTime=b);a.H=(b-a.startTime)/(a.endTime-a.startTime);1<a.H&&(a.H=1);Md(a,a.H);1==a.H?(a.J=Ed,Hd(a),a.M("finish"),a.$()):1==a.J&&a.nb()}function Md(a,b){ga(a.vb)&&(b=a.vb(b));a.coords=Array(a.wa.length);for(var c=0;c<a.wa.length;c++)a.coords[c]=(a.uc[c]-a.wa[c])*b+a.wa[c]}g.nb=function(){this.M("animate")};
|
||||
g.M=function(a){this.dispatchEvent(new Nd(a,this))};function Nd(a,b){O.call(this,a);this.coords=b.coords;this.x=b.coords[0];this.y=b.coords[1];this.z=b.coords[2];this.duration=b.duration;this.H=b.H;this.state=b.J}x(Nd,O);function T(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}g=T.prototype;g.getWidth=function(){return this.right-this.left};g.getHeight=function(){return this.bottom-this.top};g.clone=function(){return new T(this.top,this.right,this.bottom,this.left)};g.contains=function(a){return this&&a?a instanceof T?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};
|
||||
g.expand=function(a,b,c,d){ha(a)?(this.top-=a.top,this.right+=a.right,this.bottom+=a.bottom,this.left-=a.left):(this.top-=a,this.right+=Number(b),this.bottom+=Number(c),this.left-=Number(d));return this};g.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};
|
||||
g.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};g.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};g.translate=function(a,b){a instanceof K?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(this.left+=a,this.right+=a,t(b)&&(this.top+=b,this.bottom+=b));return this};
|
||||
g.scale=function(a,b){var c=t(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function Od(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}g=Od.prototype;g.clone=function(){return new Od(this.left,this.top,this.width,this.height)};g.intersects=function(a){return this.left<=a.left+a.width&&a.left<=this.left+this.width&&this.top<=a.top+a.height&&a.top<=this.top+this.height};
|
||||
g.contains=function(a){return a instanceof K?a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height:this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height};g.distance=function(a){var b=a.x<this.left?this.left-a.x:Math.max(a.x-(this.left+this.width),0);a=a.y<this.top?this.top-a.y:Math.max(a.y-(this.top+this.height),0);return Math.sqrt(b*b+a*a)};g.getSize=function(){return new rb(this.width,this.height)};
|
||||
g.getTopLeft=function(){return new K(this.left,this.top)};g.getCenter=function(){return new K(this.left+this.width/2,this.top+this.height/2)};g.getBottomRight=function(){return new K(this.left+this.width,this.top+this.height)};g.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
|
||||
g.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};g.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};g.translate=function(a,b){a instanceof K?(this.left+=a.x,this.top+=a.y):(this.left+=a,t(b)&&(this.top+=b));return this};
|
||||
g.scale=function(a,b){var c=t(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function U(a,b){var c=M(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function V(a,b){return U(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
|
||||
function Pd(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}B&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
|
||||
function Qd(a){if(B&&!(8<=Number(J)))return a.offsetParent;var b=M(a),c=V(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(11==a.nodeType&&a.host&&(a=a.host),c=V(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null}
|
||||
function Rd(a){for(var b=new T(0,Infinity,Infinity,0),c=L(a),d=c.v.body,e=c.v.documentElement,f=wb(c.v);a=Qd(a);)if(!(B&&0==a.clientWidth||G&&0==a.clientHeight&&a==d)&&a!=d&&a!=e&&"visible"!=V(a,"overflow")){var h=Sd(a),k=new K(a.clientLeft,a.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,h.y);b.right=Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=f.scrollLeft;f=f.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,f);c=(xb(c.v)||
|
||||
window).document;c=yb(c)?c.documentElement:c.body;c=new rb(c.clientWidth,c.clientHeight);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,f+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}function Sd(a){var b=M(a),c=new K(0,0),d;d=b?M(b):document;d=!B||9<=Number(J)||yb(L(d).v)?d.documentElement:d.body;if(a==d)return c;a=Pd(a);b=vb(L(b).v);c.x=a.left+b.x;c.y=a.top+b.y;return c}function Td(a){"number"==typeof a&&(a+="px");return a}
|
||||
function Ud(a){var b=Vd;if("none"!=V(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,f=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=f;c.visibility=e;return a}function Vd(a){var b=a.offsetWidth,c=a.offsetHeight,d=G&&!b&&!c;return p(b)&&!d||!a.getBoundingClientRect?new rb(b,c):(a=Pd(a),new rb(a.right-a.left,a.bottom-a.top))}var Wd=E?"MozUserSelect":G||D?"WebkitUserSelect":null;
|
||||
function Xd(a){var b=a.getElementsByTagName("*");if(Wd){var c="none";a.style&&(a.style[Wd]=c);if(b){a=0;for(var d;d=b[a];a++)d.style&&(d.style[Wd]=c)}}else if(B||hb)if(c="on",a.setAttribute("unselectable",c),b)for(a=0;d=b[a];a++)d.setAttribute("unselectable",c)}function Yd(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var e=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return+e}
|
||||
function Zd(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Yd(a,c):0}var $d={thin:2,medium:4,thick:6};function ae(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null;return c in $d?$d[c]:Yd(a,c)}
|
||||
function be(a){if(B&&!(9<=Number(J))){var b=ae(a,"borderLeft"),c=ae(a,"borderRight"),d=ae(a,"borderTop");a=ae(a,"borderBottom");return new T(d,c,a,b)}b=U(a,"borderLeftWidth");c=U(a,"borderRightWidth");d=U(a,"borderTopWidth");a=U(a,"borderBottomWidth");return new T(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))};function W(a,b,c,d,e){Ld.call(this,b,c,d,e);this.element=a}x(W,Ld);W.prototype.Ua=ca;W.prototype.nb=function(){this.Ua();W.o.nb.call(this)};W.prototype.$=function(){this.Ua();W.o.$.call(this)};W.prototype.V=function(){this.Ua();W.o.V.call(this)};function X(a,b,c,d,e){t(b)&&(b=[b]);t(c)&&(c=[c]);W.call(this,a,b,c,d,e);if(1!=b.length||1!=c.length)throw Error("Start and end points must be 1D");this.Ja=ce}x(X,W);var de=1/1024,ce=-1;
|
||||
X.prototype.Ua=function(){var a=this.coords[0];if(Math.abs(a-this.Ja)>=de){var b=this.element.style;"opacity"in b?b.opacity=a:"MozOpacity"in b?b.MozOpacity=a:"filter"in b&&(b.filter=""===a?"":"alpha(opacity\x3d"+100*Number(a)+")");this.Ja=a}};X.prototype.V=function(){this.Ja=ce;X.o.V.call(this)};X.prototype.$=function(){this.Ja=ce;X.o.$.call(this)};X.prototype.show=function(){this.element.style.display=""};function ee(a,b,c){X.call(this,a,1,0,b,c)}x(ee,X);ee.prototype.V=function(){this.show();ee.o.V.call(this)};
|
||||
ee.prototype.$=function(){this.element.style.display="none";ee.o.$.call(this)};function fe(a,b,c){X.call(this,a,0,1,b,c)}x(fe,X);fe.prototype.V=function(){this.show();fe.o.V.call(this)};function ge(a,b){return(b&8&&"rtl"==V(a,"direction")?b^4:b)&-9};function Y(){}Y.eb=void 0;Y.Bb=function(){return Y.eb?Y.eb:Y.eb=new Y};Y.prototype.Mb=0;function he(a,b,c,d){S.call(this);this.pb=a||document.body;this.N=L(this.pb);this.Lc=!a;this.b=null;this.K="";this.j=[];this.ga=[];this.bc=this.Ea=-1;this.R=!1;this.className="ac-renderer";this.rb="ac-row";this.Kb="active";this.wb="ac-active";this.Ac="ac-highlighted";this.ia=b||null;this.Sc=null!=d?d:!0;this.Dc=!0;this.Da=!1;this.Mc=!!c;this.Ta=!1;this.Ka=0;this.ac=!1}x(he,S);g=he.prototype;g.pc=0;g.getElement=function(){return this.b};
|
||||
g.qb=function(a,b,c){this.K=b;this.j=a;this.Ea=-1;this.bc=w();this.w=c;this.ga=[];ie(this)};g.S=function(){this.R&&(this.R=!1,je(this,!1),0<this.Ka?(Mb(this.ha),this.ha=new ee(this.b,this.Ka),this.ha.play()):this.b.style.display="none")};g.show=function(){this.R||(this.R=!0,je(this,!0),0<this.Ka?(Mb(this.ha),this.ha=new fe(this.b,this.Ka),this.ha.play()):this.b.style.display="")};
|
||||
function je(a,b){a.w&&(dd(a.w,"haspopup",b),dd(a.b,"expanded",b),dd(a.w,"expanded",b),b?dd(a.w,"owns",a.b.id):(a.w.removeAttribute("aria-owns"),ed(a.w,null)))}
|
||||
function ke(a,b){var c=0<=b&&b<a.j.length?a.j[b]:void 0,d=0<=b&&b<a.ga.length?a.ga[b]:void 0;if(a.dispatchEvent({type:"rowhilite",Wc:d,row:c?c.data:null})&&(0<=a.Ea&&Jb(a.ga[a.Ea],[a.wb,a.Kb]),a.Ea=b,d)){Hb(d,[a.wb,a.Kb]);a.w&&ed(a.w,d);var c=a.b||wb(document),e;e=c||wb(document);var f=Sd(d),h=Sd(e),k=be(e);if(e==wb(document)){var l=f.x-e.scrollLeft,f=f.y-e.scrollTop;!B||10<=Number(J)||(l+=k.left,f+=k.top)}else l=f.x-h.x-k.left,f=f.y-h.y-k.top;var d=Vd(d),k=e.clientHeight-d.height,h=e.scrollLeft,
|
||||
u=e.scrollTop,h=h+Math.min(l,Math.max(l-(e.clientWidth-d.width),0)),u=u+Math.min(f,Math.max(f-k,0));e=new K(h,u);c.scrollLeft=e.x;c.scrollTop=e.y}}g.T=function(a){if(-1==a)ke(this,-1);else for(var b=0;b<this.j.length;b++)if(this.j[b].id==a){ke(this,b);break}};
|
||||
function le(a){if(!a.b){var b=a.N.zb("DIV",{style:"display:none"});a.ac&&(b.style.overflowY="auto");a.b=b;Hb(b,oa(a.className).split(" "));cd(b,"listbox");b.id=":"+(Y.Bb().Mb++).toString(36);a.N.appendChild(a.pb,b);R(b,"click",a.Cb,!1,a);R(b,"mousedown",a.Db,!1,a);R(b,"mouseover",a.Eb,!1,a)}}
|
||||
function ie(a){le(a);a.Ta&&(a.b.style.visibility="hidden");a.ic&&(a.b.style.minWidth=a.ic.clientWidth-a.pc+"px");a.ga.length=0;a.N.Kc(a.b);if(a.ia&&a.ia.render)a.ia.render(a,a.b,a.j,a.K);else{var b=null;y(a.j,function(a){var d=a;a=this.K;var e=this.N.zb("DIV",{className:this.rb,id:":"+(Y.Bb().Mb++).toString(36)});cd(e,"option");if(this.ia&&this.ia.Yb)this.ia.Yb(d,a,e);else if(d=d.data.toString(),"textContent"in e)e.textContent=d;else if(3==e.nodeType)e.data=d;else if(e.firstChild&&3==e.firstChild.nodeType){for(;e.lastChild!=
|
||||
e.firstChild;)e.removeChild(e.lastChild);e.firstChild.data=d}else Bb(e),e.appendChild(M(e).createTextNode(String(d)));a&&this.Sc&&(this.hc=!1,me(this,e,a));Gb(e,this.rb);this.ga.push(e);a=e;this.Ta?this.b.insertBefore(a,b):this.N.appendChild(this.b,a);b=a},a)}0==a.j.length?a.S():(a.show(),ne(a),Xd(a.b))}
|
||||
function ne(a){if(a.w&&a.Lc){var b=a.mc||a.w,c,d=a.Mc?5:1;a.Ta&&(d^=1);c=d;var e=65;a.ac&&(a.b.style.height="",e|=32);var d=a.b,f=c^1,h,k;if(h=d.offsetParent){var l="HTML"==h.tagName||"BODY"==h.tagName;l&&"static"==V(h,"position")||(k=Sd(h),l||(l=(l="rtl"==V(h,"direction"))&&E?-h.scrollLeft:!l||ib&&I("8")||"visible"==V(h,"overflowX")?h.scrollLeft:h.scrollWidth-h.clientWidth-h.scrollLeft,k=qb(k,new K(l,h.scrollTop))))}h=k||new K;k=Sd(b);l=Ud(b);k=new Od(k.x,k.y,l.width,l.height);if(l=Rd(b)){var u=
|
||||
new Od(l.left,l.top,l.right-l.left,l.bottom-l.top),l=Math.max(k.left,u.left),C=Math.min(k.left+k.width,u.left+u.width);if(l<=C){var Q=Math.max(k.top,u.top),u=Math.min(k.top+k.height,u.top+u.height);Q<=u&&(k.left=l,k.top=Q,k.width=C-l,k.height=u-Q)}}l=L(b);Q=L(d);if(l.v!=Q.v){C=l.v.body;var Q=xb(Q.v),u=new K(0,0),F;F=(F=M(C))?xb(F):window;if(eb(F,"parent")){var Tb=C;do{var da;F==Q?da=Sd(Tb):(da=Pd(Tb),da=new K(da.left,da.top));u.x+=da.x;u.y+=da.y}while(F&&F!=Q&&F!=F.parent&&(Tb=F.frameElement)&&(F=
|
||||
F.parent))}C=qb(u,Sd(C));!B||9<=Number(J)||yb(l.v)||(C=qb(C,vb(l.v)));k.left+=C.x;k.top+=C.y}b=ge(b,c);c=k.left;b&4?c+=k.width:b&2&&(c+=k.width/2);var b=new K(c,k.top+(b&1?k.height:0)),b=qb(b,h),m;e&&(m=Rd(d))&&(m.top-=h.y,m.right-=h.x,m.bottom-=h.y,m.left-=h.x);b=b.clone();h=ge(d,f);f=Ud(d);c=f.clone();b=b.clone();c=c.clone();k=0;0!=h&&(h&4?b.x-=c.width+0:h&2&&(b.x-=c.width/2),h&1&&(b.y-=c.height+0));e&&(m?(h=b,k=c,l=0,65==(e&65)&&(h.x<m.left||h.x>=m.right)&&(e&=-2),132==(e&132)&&(h.y<m.top||h.y>=
|
||||
m.bottom)&&(e&=-5),h.x<m.left&&e&1&&(h.x=m.left,l|=1),e&16&&(C=h.x,h.x<m.left&&(h.x=m.left,l|=4),h.x+k.width>m.right&&(k.width=Math.min(m.right-h.x,C+k.width-m.left),k.width=Math.max(k.width,0),l|=4)),h.x+k.width>m.right&&e&1&&(h.x=Math.max(m.right-k.width,m.left),l|=1),e&2&&(l|=(h.x<m.left?16:0)|(h.x+k.width>m.right?32:0)),h.y<m.top&&e&4&&(h.y=m.top,l|=2),e&32&&(C=h.y,h.y<m.top&&(h.y=m.top,l|=8),h.y+k.height>m.bottom&&(k.height=Math.min(m.bottom-h.y,C+k.height-m.top),k.height=Math.max(k.height,0),
|
||||
l|=8)),h.y+k.height>m.bottom&&e&4&&(h.y=Math.max(m.bottom-k.height,m.top),l|=2),e&8&&(l|=(h.y<m.top?64:0)|(h.y+k.height>m.bottom?128:0)),e=l):e=256,k=e);e=new Od(0,0,0,0);e.left=b.x;e.top=b.y;e.width=c.width;e.height=c.height;k&496||(b=e.getTopLeft(),b instanceof K?(m=b.x,b=b.y):(m=b,b=void 0),d.style.left=Td(m),d.style.top=Td(b),c=e.getSize(),f==c||f&&c&&f.width==c.width&&f.height==c.height||(e=c,m=yb(L(M(d)).v),!B||I("10")||m&&I("8")?(d=d.style,E?d.MozBoxSizing="border-box":G?d.WebkitBoxSizing=
|
||||
"border-box":d.boxSizing="border-box",d.width=Math.max(e.width,0)+"px",d.height=Math.max(e.height,0)+"px"):(f=d.style,m?(B?(m=Zd(d,"paddingLeft"),b=Zd(d,"paddingRight"),c=Zd(d,"paddingTop"),h=Zd(d,"paddingBottom"),m=new T(c,b,h,m)):(m=U(d,"paddingLeft"),b=U(d,"paddingRight"),c=U(d,"paddingTop"),h=U(d,"paddingBottom"),m=new T(parseFloat(c),parseFloat(b),parseFloat(h),parseFloat(m))),d=be(d),f.pixelWidth=e.width-d.left-m.left-m.right-d.right,f.pixelHeight=e.height-d.top-m.top-m.bottom-d.bottom):(f.pixelWidth=
|
||||
e.width,f.pixelHeight=e.height))));a.Ta&&(a.b.style.visibility="visible")}}g.getTarget=function(){return this.w||null};g.l=function(){this.b&&(hc(this.b,"click",this.Cb,!1,this),hc(this.b,"mousedown",this.Db,!1,this),hc(this.b,"mouseover",this.Eb,!1,this),this.N.removeNode(this.b),this.b=null,this.R=!1);Mb(this.ha);this.pb=null;he.o.l.call(this)};
|
||||
function me(a,b,c){if(a.Da||!a.hc)if(3==b.nodeType){var d=null;q(c)&&1<c.length&&!a.Da&&(d=Ha(c,1));c=oe(a,c);if(0!=c.length){var e=b.nodeValue,f=a.Dc?new RegExp("\\b(?:"+c+")","gi"):new RegExp(c,"gi");c=[];for(var h=0,k=f.exec(e),l=0;k;)l++,c.push(e.substring(h,k.index)),c.push(e.substring(k.index,f.lastIndex)),h=f.lastIndex,k=f.exec(e);c.push(e.substring(h));if(1<c.length){d=a.Da?l:1;for(e=0;e<d;e++)f=2*e,b.nodeValue=c[f],h=a.N.createElement("B"),h.className=a.Ac,a.N.appendChild(h,a.N.createTextNode(c[f+
|
||||
1])),h=b.parentNode.insertBefore(h,b.nextSibling),b.parentNode.insertBefore(a.N.createTextNode(""),h.nextSibling),b=h.nextSibling;b.nodeValue=Ha(c,2*d).join("");a.hc=!0}else d&&me(a,b,d)}}else for(b=b.firstChild;b;)d=b.nextSibling,me(a,b,c),b=d}
|
||||
function oe(a,b){var c="";if(!b)return c;q(b)&&(b=Aa(b,function(a){return!/^[\s\xa0]*$/.test(null==a?"":String(a))}));a.Da?q(b)?c=Ba(b,xa).join("|"):(c=b.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,""),c=xa(c),c=c.replace(/ /g,"|")):q(b)?c=0<b.length?xa(b[0]):"":/^\W/.test(b)||(c=xa(b));return c}function pe(a,b){for(;b&&b!=a.b&&!Fb(b,a.rb);)b=b.parentNode;return b?za(a.ga,b):-1}g.Cb=function(a){var b=pe(this,a.target);0<=b&&this.dispatchEvent({type:Nc,row:this.j[b].id});a.stopPropagation()};
|
||||
g.Db=function(a){a.stopPropagation();a.preventDefault()};g.Eb=function(a){a=pe(this,a.target);0<=a&&!(300>w()-this.bc)&&this.dispatchEvent({type:Mc,row:this.j[a].id})};function Z(a,b,c,d){this.Ma=null;d&&(this.Ma=new Za((location.hash||"").substr(1)));this.u=r(a)?document.getElementById(a):a;R(this.u,["focus","click"],function(){this.u.setSelectionRange(0,this.u.value.length)},!1,this);a=new he(null,{Yb:function(a,b,c){b='\x3cspan class\x3d"name"\x3e';var d=a.data.name_suffix;b=d?b+(a.data.name+'\x3c/span\x3e\x3cspan class\x3d"suffix"\x3e'+d):b+a.data.display_name;b+="\x3c/span\x3e";(a=a.data.type)&&(b+='\x3cspan class\x3d"type"\x3e'+a+"\x3c/span\x3e");c.innerHTML=
|
||||
b}});a.ic=this.u;this.U=new qe(b,c,this.Ma,this.u);this.da=new vd(null,null,!1);xd(this.da);this.da.fc=!1;this.da.i=this;Lc.call(this,this.U,a,this.da);this.Ba=!1;this.D("update",function(a){this.u.value=a.row?a.row.name:""},!1,this);this.enable(!0);if(this.Ma){var e=this.Ma.get("q");e&&r(e)&&setTimeout(v(function(){this.u.value=e.toString();this.da.update()},this),0)}}x(Z,Lc);
|
||||
Z.prototype.enable=function(a){if(this.Ba!=a)if(this.Ba=a){a=this.da;var b=this.u;ha(b)&&1==b.nodeType&&(cd(b,"combobox"),dd(b,"autocomplete","list"));a.s.D(b,"focus",a.bb);a.s.D(b,"blur",a.ab);if(!a.c&&(a.ya.D(b,"keydown",a.Pb),ha(b)&&1==b.nodeType)){var c;a:{var d=M(b);try{c=d&&d.activeElement;break a}catch(e){}c=null}c==b&&Ad(a,b)}}else c=this.da,a=this.u,ha(a)&&1==a.nodeType&&(a.removeAttribute("role"),a.removeAttribute("aria-autocomplete")),a==c.c&&c.ab(),c.s.F(a,"focus",c.bb),c.s.F(a,"blur",
|
||||
c.ab),c.c||c.ya.F(a,"keydown",c.Pb)};Z.prototype.tb=function(a){this.U.tb(a);this.Ba&&this.update(!0)};Z.prototype.Jc=function(a,b){b&&R(this.I,"rowhilite",function(b){b.row&&a(b.row)},!1,this);R(this,"update",function(b){b.row&&a(b.row)},!1,this);var c=v(function(b){b.preventDefault();this.Ba&&this.search(this.u.value,1,v(function(b,c){var d=c[0];d&&a(d)},this))},this),d=Cb(this.u);d&&R(d,"submit",c);R(this.u,["webkitspeechchange","speechchange"],c)};
|
||||
Z.prototype.search=function(a,b,c){Cd(this.U,a,b,c)};ba("kt.OsmNamesAutocomplete",Z);ba("kt.OsmNamesAutocomplete.prototype.registerCallback",Z.prototype.Jc);ba("kt.OsmNamesAutocomplete.prototype.setCountryCode",Z.prototype.tb);function qe(a,b,c,d){this.Rc=a||"https://search.osmnames.org/";this.Ib=b;this.Aa=c&&c.get("country_code")||null;this.la=c||null;this.u=d}qe.prototype.tb=function(a){this.Aa=a;this.la&&(this.la.set("country_code",this.Aa),location.hash=this.la.toString())};
|
||||
function Cd(a,b,c,d){a.u&&Ib(a.u,"working");a.Pa&&b!=a.Nb&&(a.Pa.abort(),a.Pa=null);b&&1!=b.length?(1==c&&(a.Nb=b),1<c&&b===a.Nb||(a.la&&(a.la.set("q",b),location.hash=a.la.toString()),c=a.Rc,a.Aa&&(c+=a.Aa+"/"),c+="q/"+encodeURIComponent(b)+".js",a.Ib&&(c+="?key\x3d"+a.Ib),a.u&&Gb(a.u,"working"),a.Pa=Bc(c,v(function(a){this.u&&Ib(this.u,"working");a=a.target;Jc(a)&&(a=a.a?pc(a.a.responseText):void 0,a=a.results,y(a,function(a){if(a=a.boundingbox)180<a[0]&&180<a[2]?(a[0]-=360,a[2]-=360):-180>a[0]&&
|
||||
-180>a[2]&&(a[0]+=360,a[2]+=360)},this),d(b,a),this.Pa=null)},a)))):d(b,[])};})();
|
||||
2
3rd/js/bootstrap-datetimepicker.min.js
vendored
Normal file
2
3rd/js/bootstrap-datetimepicker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
3rd/js/bootstrap.min.js
vendored
Normal file
7
3rd/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
3rd/js/defiant.min.js
vendored
Normal file
7
3rd/js/defiant.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
3rd/js/ics.deps.min.js
vendored
Normal file
4
3rd/js/ics.deps.min.js
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/*! ics.js Wed Aug 20 2014 17:23:02 */
|
||||
var saveAs=saveAs||function(e){"use strict";if(typeof e==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in r,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},i=/constructor/i.test(e.HTMLElement)||e.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s="application/octet-stream",d=1e3*40,c=function(e){var t=function(){if(typeof e==="string"){n().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,d)},l=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e["on"+t[r]];if(typeof o==="function"){try{o.call(e,n||e)}catch(a){u(a)}}}},p=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},v=function(t,u,d){if(!d){t=p(t)}var v=this,w=t.type,m=w===s,y,h=function(){l(v,"writestart progress write writeend".split(" "))},S=function(){if((f||m&&i)&&e.FileReader){var r=new FileReader;r.onloadend=function(){var t=f?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");var n=e.open(t,"_blank");if(!n)e.location.href=t;t=undefined;v.readyState=v.DONE;h()};r.readAsDataURL(t);v.readyState=v.INIT;return}if(!y){y=n().createObjectURL(t)}if(m){e.location.href=y}else{var o=e.open(y,"_blank");if(!o){e.location.href=y}}v.readyState=v.DONE;h();c(y)};v.readyState=v.INIT;if(o){y=n().createObjectURL(t);setTimeout(function(){r.href=y;r.download=u;a(r);h();c(y);v.readyState=v.DONE});return}S()},w=v.prototype,m=function(e,t,n){return new v(e,t||e.name||"download",n)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,n){t=t||e.name||"download";if(!n){e=p(e)}return navigator.msSaveOrOpenBlob(e,t)}}w.abort=function(){};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return m}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!==null){define("FileSaver.js",function(){return saveAs})}
|
||||
|
||||
var ics=function(e,t){"use strict";{if(!(navigator.userAgent.indexOf("MSIE")>-1&&-1==navigator.userAgent.indexOf("MSIE 10"))){void 0===e&&(e="default"),void 0===t&&(t="Calendar");var r=-1!==navigator.appVersion.indexOf("Win")?"\r\n":"\n",n=[],i=["BEGIN:VCALENDAR","PRODID:"+t,"VERSION:2.0"].join(r),o=r+"END:VCALENDAR",a=["SU","MO","TU","WE","TH","FR","SA"];return{events:function(){return n},calendar:function(){return i+r+n.join(r)+o},addEvent:function(t,i,o,l,u,s){if(void 0===t||void 0===i||void 0===o||void 0===l||void 0===u)return!1;if(s&&!s.rrule){if("YEARLY"!==s.freq&&"MONTHLY"!==s.freq&&"WEEKLY"!==s.freq&&"DAILY"!==s.freq)throw"Recurrence rrule frequency must be provided and be one of the following: 'YEARLY', 'MONTHLY', 'WEEKLY', or 'DAILY'";if(s.until&&isNaN(Date.parse(s.until)))throw"Recurrence rrule 'until' must be a valid date string";if(s.interval&&isNaN(parseInt(s.interval)))throw"Recurrence rrule 'interval' must be an integer";if(s.count&&isNaN(parseInt(s.count)))throw"Recurrence rrule 'count' must be an integer";if(void 0!==s.byday){if("[object Array]"!==Object.prototype.toString.call(s.byday))throw"Recurrence rrule 'byday' must be an array";if(s.byday.length>7)throw"Recurrence rrule 'byday' array must not be longer than the 7 days in a week";s.byday=s.byday.filter(function(e,t){return s.byday.indexOf(e)==t});for(var c in s.byday)if(a.indexOf(s.byday[c])<0)throw"Recurrence rrule 'byday' values must include only the following: 'SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA'"}}var g=new Date(l),d=new Date(u),f=new Date,S=("0000"+g.getFullYear().toString()).slice(-4),E=("00"+(g.getMonth()+1).toString()).slice(-2),v=("00"+g.getDate().toString()).slice(-2),y=("00"+g.getHours().toString()).slice(-2),A=("00"+g.getMinutes().toString()).slice(-2),T=("00"+g.getSeconds().toString()).slice(-2),b=("0000"+d.getFullYear().toString()).slice(-4),D=("00"+(d.getMonth()+1).toString()).slice(-2),N=("00"+d.getDate().toString()).slice(-2),h=("00"+d.getHours().toString()).slice(-2),I=("00"+d.getMinutes().toString()).slice(-2),R=("00"+d.getMinutes().toString()).slice(-2),M=("0000"+f.getFullYear().toString()).slice(-4),w=("00"+(f.getMonth()+1).toString()).slice(-2),L=("00"+f.getDate().toString()).slice(-2),O=("00"+f.getHours().toString()).slice(-2),p=("00"+f.getMinutes().toString()).slice(-2),Y=("00"+f.getMinutes().toString()).slice(-2),U="",V="";y+A+T+h+I+R!=0&&(U="T"+y+A+T,V="T"+h+I+R);var B,C=S+E+v+U,j=b+D+N+V,m=M+w+L+("T"+O+p+Y);if(s)if(s.rrule)B=s.rrule;else{if(B="rrule:FREQ="+s.freq,s.until){var x=new Date(Date.parse(s.until)).toISOString();B+=";UNTIL="+x.substring(0,x.length-13).replace(/[-]/g,"")+"000000Z"}s.interval&&(B+=";INTERVAL="+s.interval),s.count&&(B+=";COUNT="+s.count),s.byday&&s.byday.length>0&&(B+=";BYDAY="+s.byday.join(","))}(new Date).toISOString();var H=["BEGIN:VEVENT","UID:"+n.length+"@"+e,"CLASS:PUBLIC","DESCRIPTION:"+i,"DTSTAMP;VALUE=DATE-TIME:"+m,"DTSTART;VALUE=DATE-TIME:"+C,"DTEND;VALUE=DATE-TIME:"+j,"LOCATION:"+o,"SUMMARY;LANGUAGE=en-us:"+t,"TRANSP:TRANSPARENT","END:VEVENT"];return B&&H.splice(4,0,B),H=H.join(r),n.push(H),H},download:function(e,t){if(n.length<1)return!1;t=void 0!==t?t:".ics",e=void 0!==e?e:"calendar";var a,l=i+r+n.join(r)+o;if(-1===navigator.userAgent.indexOf("MSIE 10"))a=new Blob([l]);else{var u=new BlobBuilder;u.append(l),a=u.getBlob("text/x-vCalendar;charset="+document.characterSet)}return saveAs(a,e+t),l},build:function(){return!(n.length<1)&&i+r+n.join(r)+o}}}console.log("Unsupported Browser")}};
|
||||
12
3rd/js/isotope.pkgd.min.js
vendored
Normal file
12
3rd/js/isotope.pkgd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
3rd/js/jquery-3.2.1.min.js
vendored
Normal file
4
3rd/js/jquery-3.2.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
3rd/js/jquery.loadTemplate.min.js
vendored
Normal file
1
3rd/js/jquery.loadTemplate.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4463
3rd/js/moment.js
Normal file
4463
3rd/js/moment.js
Normal file
File diff suppressed because it is too large
Load diff
480
3rd/js/nprogress.js
Normal file
480
3rd/js/nprogress.js
Normal file
|
|
@ -0,0 +1,480 @@
|
|||
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
||||
* @license MIT */
|
||||
|
||||
;(function(root, factory) {
|
||||
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
module.exports = factory();
|
||||
} else {
|
||||
root.NProgress = factory();
|
||||
}
|
||||
|
||||
})(this, function() {
|
||||
var NProgress = {};
|
||||
|
||||
NProgress.version = '0.2.0';
|
||||
|
||||
var Settings = NProgress.settings = {
|
||||
minimum: 0.08,
|
||||
easing: 'linear',
|
||||
positionUsing: '',
|
||||
speed: 200,
|
||||
trickle: true,
|
||||
trickleSpeed: 200,
|
||||
showSpinner: true,
|
||||
barSelector: '[role="bar"]',
|
||||
spinnerSelector: '[role="spinner"]',
|
||||
parent: 'body',
|
||||
template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates configuration.
|
||||
*
|
||||
* NProgress.configure({
|
||||
* minimum: 0.1
|
||||
* });
|
||||
*/
|
||||
NProgress.configure = function(options) {
|
||||
var key, value;
|
||||
for (key in options) {
|
||||
value = options[key];
|
||||
if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Last number.
|
||||
*/
|
||||
|
||||
NProgress.status = null;
|
||||
|
||||
/**
|
||||
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
|
||||
*
|
||||
* NProgress.set(0.4);
|
||||
* NProgress.set(1.0);
|
||||
*/
|
||||
|
||||
NProgress.set = function(n) {
|
||||
var started = NProgress.isStarted();
|
||||
|
||||
n = clamp(n, Settings.minimum, 1);
|
||||
NProgress.status = (n === 1 ? null : n);
|
||||
|
||||
var progress = NProgress.render(!started),
|
||||
bar = progress.querySelector(Settings.barSelector),
|
||||
speed = Settings.speed,
|
||||
ease = Settings.easing;
|
||||
|
||||
progress.offsetWidth; /* Repaint */
|
||||
|
||||
queue(function(next) {
|
||||
// Set positionUsing if it hasn't already been set
|
||||
if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();
|
||||
|
||||
// Add transition
|
||||
css(bar, barPositionCSS(n, speed, ease));
|
||||
|
||||
if (n === 1) {
|
||||
// Fade out
|
||||
css(progress, {
|
||||
transition: 'none',
|
||||
opacity: 1
|
||||
});
|
||||
progress.offsetWidth; /* Repaint */
|
||||
|
||||
setTimeout(function() {
|
||||
css(progress, {
|
||||
transition: 'all ' + speed + 'ms linear',
|
||||
opacity: 0
|
||||
});
|
||||
setTimeout(function() {
|
||||
NProgress.remove();
|
||||
next();
|
||||
}, speed);
|
||||
}, speed);
|
||||
} else {
|
||||
setTimeout(next, speed);
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
NProgress.isStarted = function() {
|
||||
return typeof NProgress.status === 'number';
|
||||
};
|
||||
|
||||
/**
|
||||
* Shows the progress bar.
|
||||
* This is the same as setting the status to 0%, except that it doesn't go backwards.
|
||||
*
|
||||
* NProgress.start();
|
||||
*
|
||||
*/
|
||||
NProgress.start = function() {
|
||||
if (!NProgress.status) NProgress.set(0);
|
||||
|
||||
var work = function() {
|
||||
setTimeout(function() {
|
||||
if (!NProgress.status) return;
|
||||
NProgress.trickle();
|
||||
work();
|
||||
}, Settings.trickleSpeed);
|
||||
};
|
||||
|
||||
if (Settings.trickle) work();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Hides the progress bar.
|
||||
* This is the *sort of* the same as setting the status to 100%, with the
|
||||
* difference being `done()` makes some placebo effect of some realistic motion.
|
||||
*
|
||||
* NProgress.done();
|
||||
*
|
||||
* If `true` is passed, it will show the progress bar even if its hidden.
|
||||
*
|
||||
* NProgress.done(true);
|
||||
*/
|
||||
|
||||
NProgress.done = function(force) {
|
||||
if (!force && !NProgress.status) return this;
|
||||
|
||||
return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
|
||||
};
|
||||
|
||||
/**
|
||||
* Increments by a random amount.
|
||||
*/
|
||||
|
||||
NProgress.inc = function(amount) {
|
||||
var n = NProgress.status;
|
||||
|
||||
if (!n) {
|
||||
return NProgress.start();
|
||||
} else if(n > 1) {
|
||||
return;
|
||||
} else {
|
||||
if (typeof amount !== 'number') {
|
||||
if (n >= 0 && n < 0.2) { amount = 0.1; }
|
||||
else if (n >= 0.2 && n < 0.5) { amount = 0.04; }
|
||||
else if (n >= 0.5 && n < 0.8) { amount = 0.02; }
|
||||
else if (n >= 0.8 && n < 0.99) { amount = 0.005; }
|
||||
else { amount = 0; }
|
||||
}
|
||||
|
||||
n = clamp(n + amount, 0, 0.994);
|
||||
return NProgress.set(n);
|
||||
}
|
||||
};
|
||||
|
||||
NProgress.trickle = function() {
|
||||
return NProgress.inc();
|
||||
};
|
||||
|
||||
/**
|
||||
* Waits for all supplied jQuery promises and
|
||||
* increases the progress as the promises resolve.
|
||||
*
|
||||
* @param $promise jQUery Promise
|
||||
*/
|
||||
(function() {
|
||||
var initial = 0, current = 0;
|
||||
|
||||
NProgress.promise = function($promise) {
|
||||
if (!$promise || $promise.state() === "resolved") {
|
||||
return this;
|
||||
}
|
||||
|
||||
if (current === 0) {
|
||||
NProgress.start();
|
||||
}
|
||||
|
||||
initial++;
|
||||
current++;
|
||||
|
||||
$promise.always(function() {
|
||||
current--;
|
||||
if (current === 0) {
|
||||
initial = 0;
|
||||
NProgress.done();
|
||||
} else {
|
||||
NProgress.set((initial - current) / initial);
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
/**
|
||||
* (Internal) renders the progress bar markup based on the `template`
|
||||
* setting.
|
||||
*/
|
||||
|
||||
NProgress.render = function(fromStart) {
|
||||
if (NProgress.isRendered()) return document.getElementById('nprogress');
|
||||
|
||||
addClass(document.documentElement, 'nprogress-busy');
|
||||
|
||||
var progress = document.createElement('div');
|
||||
progress.id = 'nprogress';
|
||||
progress.innerHTML = Settings.template;
|
||||
|
||||
var bar = progress.querySelector(Settings.barSelector),
|
||||
perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),
|
||||
parent = document.querySelector(Settings.parent),
|
||||
spinner;
|
||||
|
||||
css(bar, {
|
||||
transition: 'all 0 linear',
|
||||
transform: 'translate3d(' + perc + '%,0,0)'
|
||||
});
|
||||
|
||||
if (!Settings.showSpinner) {
|
||||
spinner = progress.querySelector(Settings.spinnerSelector);
|
||||
spinner && removeElement(spinner);
|
||||
}
|
||||
|
||||
if (parent != document.body) {
|
||||
addClass(parent, 'nprogress-custom-parent');
|
||||
}
|
||||
|
||||
parent.appendChild(progress);
|
||||
return progress;
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes the element. Opposite of render().
|
||||
*/
|
||||
|
||||
NProgress.remove = function() {
|
||||
removeClass(document.documentElement, 'nprogress-busy');
|
||||
removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');
|
||||
var progress = document.getElementById('nprogress');
|
||||
progress && removeElement(progress);
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if the progress bar is rendered.
|
||||
*/
|
||||
|
||||
NProgress.isRendered = function() {
|
||||
return !!document.getElementById('nprogress');
|
||||
};
|
||||
|
||||
/**
|
||||
* Determine which positioning CSS rule to use.
|
||||
*/
|
||||
|
||||
NProgress.getPositioningCSS = function() {
|
||||
// Sniff on document.body.style
|
||||
var bodyStyle = document.body.style;
|
||||
|
||||
// Sniff prefixes
|
||||
var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :
|
||||
('MozTransform' in bodyStyle) ? 'Moz' :
|
||||
('msTransform' in bodyStyle) ? 'ms' :
|
||||
('OTransform' in bodyStyle) ? 'O' : '';
|
||||
|
||||
if (vendorPrefix + 'Perspective' in bodyStyle) {
|
||||
// Modern browsers with 3D support, e.g. Webkit, IE10
|
||||
return 'translate3d';
|
||||
} else if (vendorPrefix + 'Transform' in bodyStyle) {
|
||||
// Browsers without 3D support, e.g. IE9
|
||||
return 'translate';
|
||||
} else {
|
||||
// Browsers without translate() support, e.g. IE7-8
|
||||
return 'margin';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Helpers
|
||||
*/
|
||||
|
||||
function clamp(n, min, max) {
|
||||
if (n < min) return min;
|
||||
if (n > max) return max;
|
||||
return n;
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) converts a percentage (`0..1`) to a bar translateX
|
||||
* percentage (`-100%..0%`).
|
||||
*/
|
||||
|
||||
function toBarPerc(n) {
|
||||
return (-1 + n) * 100;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* (Internal) returns the correct CSS for changing the bar's
|
||||
* position given an n percentage, and speed and ease from Settings
|
||||
*/
|
||||
|
||||
function barPositionCSS(n, speed, ease) {
|
||||
var barCSS;
|
||||
|
||||
if (Settings.positionUsing === 'translate3d') {
|
||||
barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };
|
||||
} else if (Settings.positionUsing === 'translate') {
|
||||
barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };
|
||||
} else {
|
||||
barCSS = { 'margin-left': toBarPerc(n)+'%' };
|
||||
}
|
||||
|
||||
barCSS.transition = 'all '+speed+'ms '+ease;
|
||||
|
||||
return barCSS;
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) Queues a function to be executed.
|
||||
*/
|
||||
|
||||
var queue = (function() {
|
||||
var pending = [];
|
||||
|
||||
function next() {
|
||||
var fn = pending.shift();
|
||||
if (fn) {
|
||||
fn(next);
|
||||
}
|
||||
}
|
||||
|
||||
return function(fn) {
|
||||
pending.push(fn);
|
||||
if (pending.length == 1) next();
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* (Internal) Applies css properties to an element, similar to the jQuery
|
||||
* css method.
|
||||
*
|
||||
* While this helper does assist with vendor prefixed property names, it
|
||||
* does not perform any manipulation of values prior to setting styles.
|
||||
*/
|
||||
|
||||
var css = (function() {
|
||||
var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],
|
||||
cssProps = {};
|
||||
|
||||
function camelCase(string) {
|
||||
return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function(match, letter) {
|
||||
return letter.toUpperCase();
|
||||
});
|
||||
}
|
||||
|
||||
function getVendorProp(name) {
|
||||
var style = document.body.style;
|
||||
if (name in style) return name;
|
||||
|
||||
var i = cssPrefixes.length,
|
||||
capName = name.charAt(0).toUpperCase() + name.slice(1),
|
||||
vendorName;
|
||||
while (i--) {
|
||||
vendorName = cssPrefixes[i] + capName;
|
||||
if (vendorName in style) return vendorName;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
function getStyleProp(name) {
|
||||
name = camelCase(name);
|
||||
return cssProps[name] || (cssProps[name] = getVendorProp(name));
|
||||
}
|
||||
|
||||
function applyCss(element, prop, value) {
|
||||
prop = getStyleProp(prop);
|
||||
element.style[prop] = value;
|
||||
}
|
||||
|
||||
return function(element, properties) {
|
||||
var args = arguments,
|
||||
prop,
|
||||
value;
|
||||
|
||||
if (args.length == 2) {
|
||||
for (prop in properties) {
|
||||
value = properties[prop];
|
||||
if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);
|
||||
}
|
||||
} else {
|
||||
applyCss(element, args[1], args[2]);
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
/**
|
||||
* (Internal) Determines if an element or space separated list of class names contains a class name.
|
||||
*/
|
||||
|
||||
function hasClass(element, name) {
|
||||
var list = typeof element == 'string' ? element : classList(element);
|
||||
return list.indexOf(' ' + name + ' ') >= 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) Adds a class to an element.
|
||||
*/
|
||||
|
||||
function addClass(element, name) {
|
||||
var oldList = classList(element),
|
||||
newList = oldList + name;
|
||||
|
||||
if (hasClass(oldList, name)) return;
|
||||
|
||||
// Trim the opening space.
|
||||
element.className = newList.substring(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) Removes a class from an element.
|
||||
*/
|
||||
|
||||
function removeClass(element, name) {
|
||||
var oldList = classList(element),
|
||||
newList;
|
||||
|
||||
if (!hasClass(element, name)) return;
|
||||
|
||||
// Replace the class name.
|
||||
newList = oldList.replace(' ' + name + ' ', ' ');
|
||||
|
||||
// Trim the opening and closing spaces.
|
||||
element.className = newList.substring(1, newList.length - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) Gets a space separated list of the class names on the element.
|
||||
* The list is wrapped with a single space on each end to facilitate finding
|
||||
* matches within the list.
|
||||
*/
|
||||
|
||||
function classList(element) {
|
||||
return (' ' + (element && element.className || '') + ' ').replace(/\s+/gi, ' ');
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) Removes an element from the DOM.
|
||||
*/
|
||||
|
||||
function removeElement(element) {
|
||||
element && element.parentNode && element.parentNode.removeChild(element);
|
||||
}
|
||||
|
||||
return NProgress;
|
||||
});
|
||||
789
3rd/js/to-markdown.js
Normal file
789
3rd/js/to-markdown.js
Normal file
|
|
@ -0,0 +1,789 @@
|
|||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.toMarkdown = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
/*
|
||||
* to-markdown - an HTML to Markdown converter
|
||||
*
|
||||
* Copyright 2011+, Dom Christie
|
||||
* Licenced under the MIT licence
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
var toMarkdown
|
||||
var converters
|
||||
var mdConverters = require('./lib/md-converters')
|
||||
var gfmConverters = require('./lib/gfm-converters')
|
||||
var HtmlParser = require('./lib/html-parser')
|
||||
var collapse = require('collapse-whitespace')
|
||||
|
||||
/*
|
||||
* Utilities
|
||||
*/
|
||||
|
||||
var blocks = ['address', 'article', 'aside', 'audio', 'blockquote', 'body',
|
||||
'canvas', 'center', 'dd', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption',
|
||||
'figure', 'footer', 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
|
||||
'header', 'hgroup', 'hr', 'html', 'isindex', 'li', 'main', 'menu', 'nav',
|
||||
'noframes', 'noscript', 'ol', 'output', 'p', 'pre', 'section', 'table',
|
||||
'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'ul'
|
||||
]
|
||||
|
||||
function isBlock (node) {
|
||||
return blocks.indexOf(node.nodeName.toLowerCase()) !== -1
|
||||
}
|
||||
|
||||
var voids = [
|
||||
'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input',
|
||||
'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'
|
||||
]
|
||||
|
||||
function isVoid (node) {
|
||||
return voids.indexOf(node.nodeName.toLowerCase()) !== -1
|
||||
}
|
||||
|
||||
function htmlToDom (string) {
|
||||
var tree = new HtmlParser().parseFromString(string, 'text/html')
|
||||
collapse(tree.documentElement, isBlock)
|
||||
return tree
|
||||
}
|
||||
|
||||
/*
|
||||
* Flattens DOM tree into single array
|
||||
*/
|
||||
|
||||
function bfsOrder (node) {
|
||||
var inqueue = [node]
|
||||
var outqueue = []
|
||||
var elem
|
||||
var children
|
||||
var i
|
||||
|
||||
while (inqueue.length > 0) {
|
||||
elem = inqueue.shift()
|
||||
outqueue.push(elem)
|
||||
children = elem.childNodes
|
||||
for (i = 0; i < children.length; i++) {
|
||||
if (children[i].nodeType === 1) inqueue.push(children[i])
|
||||
}
|
||||
}
|
||||
outqueue.shift()
|
||||
return outqueue
|
||||
}
|
||||
|
||||
/*
|
||||
* Contructs a Markdown string of replacement text for a given node
|
||||
*/
|
||||
|
||||
function getContent (node) {
|
||||
var text = ''
|
||||
for (var i = 0; i < node.childNodes.length; i++) {
|
||||
if (node.childNodes[i].nodeType === 1) {
|
||||
text += node.childNodes[i]._replacement
|
||||
} else if (node.childNodes[i].nodeType === 3) {
|
||||
text += node.childNodes[i].data
|
||||
} else continue
|
||||
}
|
||||
return text
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the HTML string of an element with its contents converted
|
||||
*/
|
||||
|
||||
function outer (node, content) {
|
||||
return node.cloneNode(false).outerHTML.replace('><', '>' + content + '<')
|
||||
}
|
||||
|
||||
function canConvert (node, filter) {
|
||||
if (typeof filter === 'string') {
|
||||
return filter === node.nodeName.toLowerCase()
|
||||
}
|
||||
if (Array.isArray(filter)) {
|
||||
return filter.indexOf(node.nodeName.toLowerCase()) !== -1
|
||||
} else if (typeof filter === 'function') {
|
||||
return filter.call(toMarkdown, node)
|
||||
} else {
|
||||
throw new TypeError('`filter` needs to be a string, array, or function')
|
||||
}
|
||||
}
|
||||
|
||||
function isFlankedByWhitespace (side, node) {
|
||||
var sibling
|
||||
var regExp
|
||||
var isFlanked
|
||||
|
||||
if (side === 'left') {
|
||||
sibling = node.previousSibling
|
||||
regExp = / $/
|
||||
} else {
|
||||
sibling = node.nextSibling
|
||||
regExp = /^ /
|
||||
}
|
||||
|
||||
if (sibling) {
|
||||
if (sibling.nodeType === 3) {
|
||||
isFlanked = regExp.test(sibling.nodeValue)
|
||||
} else if (sibling.nodeType === 1 && !isBlock(sibling)) {
|
||||
isFlanked = regExp.test(sibling.textContent)
|
||||
}
|
||||
}
|
||||
return isFlanked
|
||||
}
|
||||
|
||||
function flankingWhitespace (node, content) {
|
||||
var leading = ''
|
||||
var trailing = ''
|
||||
|
||||
if (!isBlock(node)) {
|
||||
var hasLeading = /^[ \r\n\t]/.test(content)
|
||||
var hasTrailing = /[ \r\n\t]$/.test(content)
|
||||
|
||||
if (hasLeading && !isFlankedByWhitespace('left', node)) {
|
||||
leading = ' '
|
||||
}
|
||||
if (hasTrailing && !isFlankedByWhitespace('right', node)) {
|
||||
trailing = ' '
|
||||
}
|
||||
}
|
||||
|
||||
return { leading: leading, trailing: trailing }
|
||||
}
|
||||
|
||||
/*
|
||||
* Finds a Markdown converter, gets the replacement, and sets it on
|
||||
* `_replacement`
|
||||
*/
|
||||
|
||||
function process (node) {
|
||||
var replacement
|
||||
var content = getContent(node)
|
||||
|
||||
// Remove blank nodes
|
||||
if (!isVoid(node) && !/A|TH|TD/.test(node.nodeName) && /^\s*$/i.test(content)) {
|
||||
node._replacement = ''
|
||||
return
|
||||
}
|
||||
|
||||
for (var i = 0; i < converters.length; i++) {
|
||||
var converter = converters[i]
|
||||
|
||||
if (canConvert(node, converter.filter)) {
|
||||
if (typeof converter.replacement !== 'function') {
|
||||
throw new TypeError(
|
||||
'`replacement` needs to be a function that returns a string'
|
||||
)
|
||||
}
|
||||
|
||||
var whitespace = flankingWhitespace(node, content)
|
||||
|
||||
if (whitespace.leading || whitespace.trailing) {
|
||||
content = content.trim()
|
||||
}
|
||||
replacement = whitespace.leading +
|
||||
converter.replacement.call(toMarkdown, content, node) +
|
||||
whitespace.trailing
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
node._replacement = replacement
|
||||
}
|
||||
|
||||
toMarkdown = function (input, options) {
|
||||
options = options || {}
|
||||
|
||||
if (typeof input !== 'string') {
|
||||
throw new TypeError(input + ' is not a string')
|
||||
}
|
||||
|
||||
if (input === '') {
|
||||
return ''
|
||||
}
|
||||
|
||||
// Escape potential ol triggers
|
||||
input = input.replace(/(\d+)\. /g, '$1\\. ')
|
||||
|
||||
var clone = htmlToDom(input).body
|
||||
var nodes = bfsOrder(clone)
|
||||
var output
|
||||
|
||||
converters = mdConverters.slice(0)
|
||||
if (options.gfm) {
|
||||
converters = gfmConverters.concat(converters)
|
||||
}
|
||||
|
||||
if (options.converters) {
|
||||
converters = options.converters.concat(converters)
|
||||
}
|
||||
|
||||
// Process through nodes in reverse (so deepest child elements are first).
|
||||
for (var i = nodes.length - 1; i >= 0; i--) {
|
||||
process(nodes[i])
|
||||
}
|
||||
output = getContent(clone)
|
||||
|
||||
return output.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g, '')
|
||||
.replace(/\n\s+\n/g, '\n\n')
|
||||
.replace(/\n{3,}/g, '\n\n')
|
||||
}
|
||||
|
||||
toMarkdown.isBlock = isBlock
|
||||
toMarkdown.isVoid = isVoid
|
||||
toMarkdown.outer = outer
|
||||
|
||||
module.exports = toMarkdown
|
||||
|
||||
},{"./lib/gfm-converters":2,"./lib/html-parser":3,"./lib/md-converters":4,"collapse-whitespace":7}],2:[function(require,module,exports){
|
||||
'use strict'
|
||||
|
||||
function cell (content, node) {
|
||||
var index = Array.prototype.indexOf.call(node.parentNode.childNodes, node)
|
||||
var prefix = ' '
|
||||
if (index === 0) prefix = '| '
|
||||
return prefix + content + ' |'
|
||||
}
|
||||
|
||||
var highlightRegEx = /highlight highlight-(\S+)/
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
filter: 'br',
|
||||
replacement: function () {
|
||||
return '\n'
|
||||
}
|
||||
},
|
||||
{
|
||||
filter: ['del', 's', 'strike'],
|
||||
replacement: function (content) {
|
||||
return '~~' + content + '~~'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: function (node) {
|
||||
return node.type === 'checkbox' && node.parentNode.nodeName === 'LI'
|
||||
},
|
||||
replacement: function (content, node) {
|
||||
return (node.checked ? '[x]' : '[ ]') + ' '
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: ['th', 'td'],
|
||||
replacement: function (content, node) {
|
||||
return cell(content, node)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: 'tr',
|
||||
replacement: function (content, node) {
|
||||
var borderCells = ''
|
||||
var alignMap = { left: ':--', right: '--:', center: ':-:' }
|
||||
|
||||
if (node.parentNode.nodeName === 'THEAD') {
|
||||
for (var i = 0; i < node.childNodes.length; i++) {
|
||||
var align = node.childNodes[i].attributes.align
|
||||
var border = '---'
|
||||
|
||||
if (align) border = alignMap[align.value] || border
|
||||
|
||||
borderCells += cell(border, node.childNodes[i])
|
||||
}
|
||||
}
|
||||
return '\n' + content + (borderCells ? '\n' + borderCells : '')
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: 'table',
|
||||
replacement: function (content) {
|
||||
return '\n\n' + content + '\n\n'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: ['thead', 'tbody', 'tfoot'],
|
||||
replacement: function (content) {
|
||||
return content
|
||||
}
|
||||
},
|
||||
|
||||
// Fenced code blocks
|
||||
{
|
||||
filter: function (node) {
|
||||
return node.nodeName === 'PRE' &&
|
||||
node.firstChild &&
|
||||
node.firstChild.nodeName === 'CODE'
|
||||
},
|
||||
replacement: function (content, node) {
|
||||
return '\n\n```\n' + node.firstChild.textContent + '\n```\n\n'
|
||||
}
|
||||
},
|
||||
|
||||
// Syntax-highlighted code blocks
|
||||
{
|
||||
filter: function (node) {
|
||||
return node.nodeName === 'PRE' &&
|
||||
node.parentNode.nodeName === 'DIV' &&
|
||||
highlightRegEx.test(node.parentNode.className)
|
||||
},
|
||||
replacement: function (content, node) {
|
||||
var language = node.parentNode.className.match(highlightRegEx)[1]
|
||||
return '\n\n```' + language + '\n' + node.textContent + '\n```\n\n'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: function (node) {
|
||||
return node.nodeName === 'DIV' &&
|
||||
highlightRegEx.test(node.className)
|
||||
},
|
||||
replacement: function (content) {
|
||||
return '\n\n' + content + '\n\n'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
},{}],3:[function(require,module,exports){
|
||||
/*
|
||||
* Set up window for Node.js
|
||||
*/
|
||||
|
||||
var _window = (typeof window !== 'undefined' ? window : this)
|
||||
|
||||
/*
|
||||
* Parsing HTML strings
|
||||
*/
|
||||
|
||||
function canParseHtmlNatively () {
|
||||
var Parser = _window.DOMParser
|
||||
var canParse = false
|
||||
|
||||
// Adapted from https://gist.github.com/1129031
|
||||
// Firefox/Opera/IE throw errors on unsupported types
|
||||
try {
|
||||
// WebKit returns null on unsupported types
|
||||
if (new Parser().parseFromString('', 'text/html')) {
|
||||
canParse = true
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
return canParse
|
||||
}
|
||||
|
||||
function createHtmlParser () {
|
||||
var Parser = function () {}
|
||||
|
||||
// For Node.js environments
|
||||
if (typeof document === 'undefined') {
|
||||
var jsdom = require('jsdom')
|
||||
Parser.prototype.parseFromString = function (string) {
|
||||
return jsdom.jsdom(string, {
|
||||
features: {
|
||||
FetchExternalResources: [],
|
||||
ProcessExternalResources: false
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if (!shouldUseActiveX()) {
|
||||
Parser.prototype.parseFromString = function (string) {
|
||||
var doc = document.implementation.createHTMLDocument('')
|
||||
doc.open()
|
||||
doc.write(string)
|
||||
doc.close()
|
||||
return doc
|
||||
}
|
||||
} else {
|
||||
Parser.prototype.parseFromString = function (string) {
|
||||
var doc = new window.ActiveXObject('htmlfile')
|
||||
doc.designMode = 'on' // disable on-page scripts
|
||||
doc.open()
|
||||
doc.write(string)
|
||||
doc.close()
|
||||
return doc
|
||||
}
|
||||
}
|
||||
}
|
||||
return Parser
|
||||
}
|
||||
|
||||
function shouldUseActiveX () {
|
||||
var useActiveX = false
|
||||
|
||||
try {
|
||||
document.implementation.createHTMLDocument('').open()
|
||||
} catch (e) {
|
||||
if (window.ActiveXObject) useActiveX = true
|
||||
}
|
||||
|
||||
return useActiveX
|
||||
}
|
||||
|
||||
module.exports = canParseHtmlNatively() ? _window.DOMParser : createHtmlParser()
|
||||
|
||||
},{"jsdom":6}],4:[function(require,module,exports){
|
||||
'use strict'
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
filter: 'p',
|
||||
replacement: function (content) {
|
||||
return '\n\n' + content + '\n\n'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: 'br',
|
||||
replacement: function () {
|
||||
return ' \n'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
|
||||
replacement: function (content, node) {
|
||||
var hLevel = node.nodeName.charAt(1)
|
||||
var hPrefix = ''
|
||||
for (var i = 0; i < hLevel; i++) {
|
||||
hPrefix += '#'
|
||||
}
|
||||
return '\n\n' + hPrefix + ' ' + content + '\n\n'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: 'hr',
|
||||
replacement: function () {
|
||||
return '\n\n* * *\n\n'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: ['em', 'i'],
|
||||
replacement: function (content) {
|
||||
return '_' + content + '_'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: ['strong', 'b'],
|
||||
replacement: function (content) {
|
||||
return '**' + content + '**'
|
||||
}
|
||||
},
|
||||
|
||||
// Inline code
|
||||
{
|
||||
filter: function (node) {
|
||||
var hasSiblings = node.previousSibling || node.nextSibling
|
||||
var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings
|
||||
|
||||
return node.nodeName === 'CODE' && !isCodeBlock
|
||||
},
|
||||
replacement: function (content) {
|
||||
return '`' + content + '`'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: function (node) {
|
||||
return node.nodeName === 'A' && node.getAttribute('href')
|
||||
},
|
||||
replacement: function (content, node) {
|
||||
var titlePart = node.title ? ' "' + node.title + '"' : ''
|
||||
return '[' + content + '](' + node.getAttribute('href') + titlePart + ')'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: 'img',
|
||||
replacement: function (content, node) {
|
||||
var alt = node.alt || ''
|
||||
var src = node.getAttribute('src') || ''
|
||||
var title = node.title || ''
|
||||
var titlePart = title ? ' "' + title + '"' : ''
|
||||
return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : ''
|
||||
}
|
||||
},
|
||||
|
||||
// Code blocks
|
||||
{
|
||||
filter: function (node) {
|
||||
return node.nodeName === 'PRE' && node.firstChild.nodeName === 'CODE'
|
||||
},
|
||||
replacement: function (content, node) {
|
||||
return '\n\n ' + node.firstChild.textContent.replace(/\n/g, '\n ') + '\n\n'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: 'blockquote',
|
||||
replacement: function (content) {
|
||||
content = content.trim()
|
||||
content = content.replace(/\n{3,}/g, '\n\n')
|
||||
content = content.replace(/^/gm, '> ')
|
||||
return '\n\n' + content + '\n\n'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: 'li',
|
||||
replacement: function (content, node) {
|
||||
content = content.replace(/^\s+/, '').replace(/\n/gm, '\n ')
|
||||
var prefix = '* '
|
||||
var parent = node.parentNode
|
||||
var index = Array.prototype.indexOf.call(parent.children, node) + 1
|
||||
|
||||
prefix = /ol/i.test(parent.nodeName) ? index + '. ' : '* '
|
||||
return prefix + content
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: ['ul', 'ol'],
|
||||
replacement: function (content, node) {
|
||||
var strings = []
|
||||
for (var i = 0; i < node.childNodes.length; i++) {
|
||||
strings.push(node.childNodes[i]._replacement)
|
||||
}
|
||||
|
||||
if (/li/i.test(node.parentNode.nodeName)) {
|
||||
return '\n' + strings.join('\n')
|
||||
}
|
||||
return '\n\n' + strings.join('\n') + '\n\n'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
filter: function (node) {
|
||||
return this.isBlock(node)
|
||||
},
|
||||
replacement: function (content, node) {
|
||||
return '\n\n' + this.outer(node, content) + '\n\n'
|
||||
}
|
||||
},
|
||||
|
||||
// Anything else!
|
||||
{
|
||||
filter: function () {
|
||||
return true
|
||||
},
|
||||
replacement: function (content, node) {
|
||||
return this.outer(node, content)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
},{}],5:[function(require,module,exports){
|
||||
/**
|
||||
* This file automatically generated from `build.js`.
|
||||
* Do not manually edit.
|
||||
*/
|
||||
|
||||
module.exports = [
|
||||
"address",
|
||||
"article",
|
||||
"aside",
|
||||
"audio",
|
||||
"blockquote",
|
||||
"canvas",
|
||||
"dd",
|
||||
"div",
|
||||
"dl",
|
||||
"fieldset",
|
||||
"figcaption",
|
||||
"figure",
|
||||
"footer",
|
||||
"form",
|
||||
"h1",
|
||||
"h2",
|
||||
"h3",
|
||||
"h4",
|
||||
"h5",
|
||||
"h6",
|
||||
"header",
|
||||
"hgroup",
|
||||
"hr",
|
||||
"main",
|
||||
"nav",
|
||||
"noscript",
|
||||
"ol",
|
||||
"output",
|
||||
"p",
|
||||
"pre",
|
||||
"section",
|
||||
"table",
|
||||
"tfoot",
|
||||
"ul",
|
||||
"video"
|
||||
];
|
||||
|
||||
},{}],6:[function(require,module,exports){
|
||||
|
||||
},{}],7:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var voidElements = require('void-elements');
|
||||
Object.keys(voidElements).forEach(function (name) {
|
||||
voidElements[name.toUpperCase()] = 1;
|
||||
});
|
||||
|
||||
var blockElements = {};
|
||||
require('block-elements').forEach(function (name) {
|
||||
blockElements[name.toUpperCase()] = 1;
|
||||
});
|
||||
|
||||
/**
|
||||
* isBlockElem(node) determines if the given node is a block element.
|
||||
*
|
||||
* @param {Node} node
|
||||
* @return {Boolean}
|
||||
*/
|
||||
function isBlockElem(node) {
|
||||
return !!(node && blockElements[node.nodeName]);
|
||||
}
|
||||
|
||||
/**
|
||||
* isVoid(node) determines if the given node is a void element.
|
||||
*
|
||||
* @param {Node} node
|
||||
* @return {Boolean}
|
||||
*/
|
||||
function isVoid(node) {
|
||||
return !!(node && voidElements[node.nodeName]);
|
||||
}
|
||||
|
||||
/**
|
||||
* whitespace(elem [, isBlock]) removes extraneous whitespace from an
|
||||
* the given element. The function isBlock may optionally be passed in
|
||||
* to determine whether or not an element is a block element; if none
|
||||
* is provided, defaults to using the list of block elements provided
|
||||
* by the `block-elements` module.
|
||||
*
|
||||
* @param {Node} elem
|
||||
* @param {Function} blockTest
|
||||
*/
|
||||
function collapseWhitespace(elem, isBlock) {
|
||||
if (!elem.firstChild || elem.nodeName === 'PRE') return;
|
||||
|
||||
if (typeof isBlock !== 'function') {
|
||||
isBlock = isBlockElem;
|
||||
}
|
||||
|
||||
var prevText = null;
|
||||
var prevVoid = false;
|
||||
|
||||
var prev = null;
|
||||
var node = next(prev, elem);
|
||||
|
||||
while (node !== elem) {
|
||||
if (node.nodeType === 3) {
|
||||
// Node.TEXT_NODE
|
||||
var text = node.data.replace(/[ \r\n\t]+/g, ' ');
|
||||
|
||||
if ((!prevText || / $/.test(prevText.data)) && !prevVoid && text[0] === ' ') {
|
||||
text = text.substr(1);
|
||||
}
|
||||
|
||||
// `text` might be empty at this point.
|
||||
if (!text) {
|
||||
node = remove(node);
|
||||
continue;
|
||||
}
|
||||
|
||||
node.data = text;
|
||||
prevText = node;
|
||||
} else if (node.nodeType === 1) {
|
||||
// Node.ELEMENT_NODE
|
||||
if (isBlock(node) || node.nodeName === 'BR') {
|
||||
if (prevText) {
|
||||
prevText.data = prevText.data.replace(/ $/, '');
|
||||
}
|
||||
|
||||
prevText = null;
|
||||
prevVoid = false;
|
||||
} else if (isVoid(node)) {
|
||||
// Avoid trimming space around non-block, non-BR void elements.
|
||||
prevText = null;
|
||||
prevVoid = true;
|
||||
}
|
||||
} else {
|
||||
node = remove(node);
|
||||
continue;
|
||||
}
|
||||
|
||||
var nextNode = next(prev, node);
|
||||
prev = node;
|
||||
node = nextNode;
|
||||
}
|
||||
|
||||
if (prevText) {
|
||||
prevText.data = prevText.data.replace(/ $/, '');
|
||||
if (!prevText.data) {
|
||||
remove(prevText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* remove(node) removes the given node from the DOM and returns the
|
||||
* next node in the sequence.
|
||||
*
|
||||
* @param {Node} node
|
||||
* @return {Node} node
|
||||
*/
|
||||
function remove(node) {
|
||||
var next = node.nextSibling || node.parentNode;
|
||||
|
||||
node.parentNode.removeChild(node);
|
||||
|
||||
return next;
|
||||
}
|
||||
|
||||
/**
|
||||
* next(prev, current) returns the next node in the sequence, given the
|
||||
* current and previous nodes.
|
||||
*
|
||||
* @param {Node} prev
|
||||
* @param {Node} current
|
||||
* @return {Node}
|
||||
*/
|
||||
function next(prev, current) {
|
||||
if (prev && prev.parentNode === current || current.nodeName === 'PRE') {
|
||||
return current.nextSibling || current.parentNode;
|
||||
}
|
||||
|
||||
return current.firstChild || current.nextSibling || current.parentNode;
|
||||
}
|
||||
|
||||
module.exports = collapseWhitespace;
|
||||
|
||||
},{"block-elements":5,"void-elements":8}],8:[function(require,module,exports){
|
||||
/**
|
||||
* This file automatically generated from `pre-publish.js`.
|
||||
* Do not manually edit.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
"area": true,
|
||||
"base": true,
|
||||
"br": true,
|
||||
"col": true,
|
||||
"embed": true,
|
||||
"hr": true,
|
||||
"img": true,
|
||||
"input": true,
|
||||
"keygen": true,
|
||||
"link": true,
|
||||
"menuitem": true,
|
||||
"meta": true,
|
||||
"param": true,
|
||||
"source": true,
|
||||
"track": true,
|
||||
"wbr": true
|
||||
};
|
||||
|
||||
},{}]},{},[1])(1)
|
||||
});
|
||||
1
3rd/js/tz.js
Normal file
1
3rd/js/tz.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue