PageSourceSearch

https://possessedofficial.com/scripts/platform.client.min_v-740.js

js possessedofficial.com collected 2026-10-03 00:15:52 UTC 752,626 bytes, 90 lines download raw bytes

1/*!
2 * jQuery JavaScript Library v2.2.4
3 * http://jquery.com/
4 *
5 * Includes Sizzle.js
6 * http://sizzlejs.com/
7 *
8 * Copyright jQuery Foundation and other contributors
9 * Released under the MIT license
10 * http://jquery.org/license
11 *
12 * Date: 2016-05-20T17:23Z
13 */
14;if(window.jQuery){((console||{}).warn||function(){})("jQuery imported from third-party sources. Will not include it second time!")}else{(function(b,a){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=b.document?a(b,true):function(c){if(!c.document){throw new Error("jQuery requires a window with a document")}return a(c)}}else{a(b)}}(typeof window!=="undefined"?window:this,function(window,noGlobal){var arr=[];var document=window.document;var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var support={};var version="2.2.4",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(num){return num!=null?(num<0?this[num+this.length]:this[num]):slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;ret.context=this.context;return ret},each:function(callback){return jQuery.each(this,callback)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function(){return this.prevObject||this.constructor()},push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(i===length){target=this;i--}for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue}if(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&jQuery.isArray(src)?src:[]}else{clone=src&&jQuery.isPlainObject(src)?src:{}}target[name]=jQuery.extend(deep,clone,copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg)},noop:function(){},isFunction:function(obj){return jQuery.type(obj)==="function"},isArray:Array.isArray,isWindow:function(obj){return obj!=null&&obj===obj.window},isNumeric:function(obj){var realStringObj=obj&&obj.toString();return !jQuery.isArray(obj)&&(realStringObj-parseFloat(realStringObj)+1)>=0},isPlainObject:function(obj){var key;if(jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false}if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype||{},"isPrototypeOf")){return false}for(key in obj){}return key===undefined||hasOwn.call(obj,key)},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},type:function(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code);if(code){if(code.indexOf("use strict")===1){script=document.createElement("script");script.text=code;document.head.appendChild(script).parentNode.removeChild(script)}else{indirect(code)}}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i<length;i++){if(callback.call(obj[i],i,obj[i])===false){break}}}else{for(i in obj){if(callback.call(obj[i],i,obj[i])===false){break}}}return obj},trim:function(text){return text==null?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var ret=results||[];if(arr!=null){if(isArrayLike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr)}else{push.call(ret,arr)}}return ret},inArray:function(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i)},merge:function(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j]}first.length=i;return first},grep:function(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i])}}return matches},map:function(elems,callback,arg){var length,value,i=0,ret=[];if(isArrayLike(elems)){length=elems.length;for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}return concat.apply([],ret)},guid:1,proxy:function(fn,context){var tmp,args,proxy;if(typeof context==="string"){tmp=fn[context];context=fn;fn=tmp}if(!jQuery.isFunction(fn)){return undefined}args=slice.call(arguments,2);proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy},now:Date.now,support:support});if(typeof Symbol==="function"){jQuery.fn[Symbol.iterator]=arr[Symbol.iterator]}
14jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase()});function isArrayLike(obj){var length=!!obj&&"length" in obj&&obj.length,type=jQuery.type(obj);if(type==="function"||jQuery.isWindow(obj)){return false}return type==="array"||length===0||typeof length==="number"&&length>0&&(length-1) in obj}var Sizzle=
15/*!
16 * Sizzle CSS Selector Engine v2.2.1
17 * http://sizzlejs.com/
18 *
19 * Copyright jQuery Foundation and other contributors
20 * Released under the MIT license
21 * http://jquery.org/license
22 *
23 * Date: 2015-10-17
24 */
25(function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date(),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},MAX_NEGATIVE=1<<31,hasOwn=({}).hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i<len;i++){if(list[i]===elem){return i}}return -1},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",identifier="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|.*)\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},unloadHandler=function(){setDocument()};try{push.apply((arr=slice.call(preferredDoc.childNodes)),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while((target[j++]=els[i++])){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var m,i,elem,nid,nidselect,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results}if(!seed){if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if
25((m=match[1])){if(nodeType===9){if((elem=context.getElementById(m))){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else{if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else{if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}}}if(support.qsa&&!compilerCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nodeType!==1){newContext=context;newSelector=selector}else{if(context.nodeName.toLowerCase()!=="object"){if((nid=context.getAttribute("id"))){nid=nid.replace(rescape,"\\$&")}else{context.setAttribute("id",(nid=expando))}groups=tokenize(selector);i=groups.length;nidselect=ridentifier.test(nid)?"#"+nid:"[id='"+nid+"']";while(i--){groups[i]=nidselect+" "+toSelector(groups[i])}newSelector=groups.join(",");newContext=rsibling.test(selector)&&testContext(context.parentNode)||context}}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(nid===expando){context.removeAttribute("id")}}}}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()]}return(cache[key+" "]=value)}return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var div=document.createElement("div");try{return !!fn(div)}catch(e){return false}finally{if(div.parentNode){div.parentNode.removeChild(div)}div=null}}function addHandle(attrs,handler){var arr=attrs.split("|"),i=arr.length;while(i--){Expr.attrHandle[arr[i]]=handler}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff){return diff}if(cur){while((cur=cur.nextSibling)){if(cur===b){return -1}}}return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[(j=matchIndexes[i])]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false};setDocument=Sizzle.setDocument=function(node){var hasCompare,parent,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);if((parent=document.defaultView)&&parent.top!==parent){if(parent.addEventListener){parent.addEventListener("unload",unloadHandler,false)}else{if(parent.attachEvent){parent.attachEvent("onunload",unloadHandler)}}}support.attributes=assert(function(div){div.className="i";return !div.getAttribute("className")});support.getElementsByTagName=assert(function(div){div.appendChild(document.createComment(""));return !div.getElementsByTagName("*").length});support.getElementsByClassName=rnative.test(document.getElementsByClassName);support.getById=assert(function(div){docElem.appendChild(div).id=expando;return !document.getElementsByName||!document.getElementsByName(expando).length});if(support.getById){Expr.find.ID=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var m=context.getElementById(id);return m?[m]:[]}};Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}}else{delete Expr.find.ID;Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId}}}Expr.find.TAG=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag)}else{if(support.qsa){return context.querySelectorAll(tag)}}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while((elem=results[i++])){if(elem.nodeType===1){tmp.push(elem)}}return tmp}return results};Expr.find.CLASS=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className)}};rbuggyMatches=[];rbuggyQSA=[];if((support.qsa=rnative.test(document.querySelectorAll))){assert(function(div){docElem.appendChild(div).innerHTML="<a id='"+expando+"'></a><select id='"+expando+"-\r\\' msallowcapture=''><option selected=''></option></select>";if(div.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")")}if(!div.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")")}if(!div.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=")}if(!div.querySelectorAll(":checked").length){rbuggyQSA.push(":checked")}if(!div.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]")}});assert(function(div){var input=document.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");if(div.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=")}if(!div.querySelectorAll(":enabled").length){rbuggyQSA.push(":enabled",":disabled")}div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})}if((support.matchesSelector=rnative.test((matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)))){assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos)})}
25rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while((b=b.parentNode)){if(b===a){return true}}}return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){if(a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return -1}if(b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1}return sortInput?(indexOf(sortInput,a)-indexOf(sortInput,b)):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?(indexOf(sortInput,a)-indexOf(sortInput,b)):0}else{if(aup===bup){return siblingCheck(a,b)}}cur=a;while((cur=cur.parentNode)){ap.unshift(cur)}cur=b;while((cur=cur.parentNode)){bp.unshift(cur)}while(ap[i]===bp[i]){i++}return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return document};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem)}expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&!compilerCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context)}return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while((elem=results[i++])){if(elem===results[i]){j=duplicates.push(i)}}while(j--){results.splice(duplicates[j],1)}}sortInput=null;return results};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while((node=elem[i++])){ret+=getText(node)}}else{if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem)}}}else{if(nodeType===3||nodeType===4){return elem.nodeValue}}}return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" "}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+((match[7]+match[8])||match[3]==="odd")}else{if(match[3]){Sizzle.error(match[0])}}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];
25if(matchExpr.CHILD.test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||""}else{if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!="}if(!operator){return true}result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false}},CHILD:function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return !!elem.parentNode}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){if(simple){while(dir){node=elem;while((node=node[dir])){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false}}start=dir=type==="only"&&!start&&"nextSibling"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){node=parent;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if(node.nodeType===1&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break}}}else{if(useCache){node=elem;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex}if(diff===false){while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff]}if(node===elem){break}}}}}diff-=last;return diff===first||(diff%first===0&&diff/first>=0)}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if((elem=unmatched[i])){seed[i]=!(matches[i]=elem)}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return !results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if((elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===false},disabled:function(elem){return elem.disabled===true},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return(nodeName==="input"&&!!elem.checked)||(nodeName==="option"&&!!elem.selected)},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return !Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)}
25,input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},text:function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;--i>=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i)}return matchIndexes})}};Expr.pseudos.nth=Expr.pseudos.eq;for(i in {radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i)}for(i in {submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i)}function setFilters(){}setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters();tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached){return parseOnly?0:cached.slice(0)}soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar}groups.push((tokens=[]))}matched=false;if((match=rcombinators.exec(soFar))){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrim," ")});soFar=soFar.slice(matched.length)}for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length)}}if(!matched){break}}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)};function toSelector(tokens){var i=0,len=tokens.length,selector="";for(;i<len;i++){selector+=tokens[i].value}return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,checkNonElements=base&&dir==="parentNode",doneName=done++;return combinator.first?function(elem,context,xml){while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml)}}}:function(elem,context,xml){var oldCache,uniqueCache,outerCache,newCache=[dirruns,doneName];if(xml){while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true}}}}else{while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});uniqueCache=outerCache[elem.uniqueID]||(outerCache[elem.uniqueID]={});if((oldCache=uniqueCache[dir])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return(newCache[2]=oldCache[2])}else{uniqueCache[dir]=newCache;if((newCache[2]=matcher(elem,context,xml))){return true}}}}}}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){Sizzle(selector,contexts[i],results)}return results}function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if((elem=unmatched[i])){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i)}}}}return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter)}if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector)}return markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher){matcher(matcherIn,matcherOut,context,xml)}if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);i=temp.length;while(i--){if((elem=temp[i])){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem)}}}if(seed){if(postFinder||preFilter){if(postFinder){temp=[];i=matcherOut.length;while(i--){if((elem=matcherOut[i])){temp.push((matcherIn[i]=elem))}}postFinder(null,(matcherOut=[]),temp,xml)}i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){var ret=(!leadingRelative&&(xml||context!==outermostContext))||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];for(;i<len;i++){if((matcher=Expr.relative[tokens[i].type])){matchers=[addCombinator(elementMatcher(matchers),matcher)]}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break}}return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens((tokens=tokens.slice(j))),j<len&&toSelector(tokens))}matchers.push(matcher)}}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),len=elems.length;if(outermost){outermostContext=context===document||context||outermost}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!==document){setDocument(elem);xml=!documentIsHTML}while((matcher=elementMatchers[j++])){if(matcher(elem,context||document,xml)){results.push(elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if((elem=!matcher&&elem)){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;
25if(bySet&&i!==matchedCount){j=0;while((matcher=setMatchers[j++])){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&(matchedCount+setMatchers.length)>1){Sizzle.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize((selector=compiled.selector||selector));results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else{if(compiled){context=context.parentNode}}selector=selector.slice(tokens.shift().value.length)}i=matchExpr.needsContext.test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[(type=token.type)]){break}if((find=Expr.find[type])){if((seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1});if(!assert(function(div){div.innerHTML="<a href='#'></a>";return div.firstChild.getAttribute("href")==="#"})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2)}})}if(!support.attributes||!assert(function(div){div.innerHTML="<input/>";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")===""})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue}})}if(!assert(function(div){return div.getAttribute("disabled")==null})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}})}return Sizzle})(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var dir=function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched};var siblings=function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched};var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=(/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/);var risSimple=/^.[^:#\[\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return !!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return(elem===qualifier)!==not})}if(typeof qualifier==="string"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not)}qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return(indexOf.call(qualifier,elem)>-1)!==not})}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")"}return elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,len=this.length,ret=[],self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true}}}))}for(i=0;i<len;i++){jQuery.find(selector,self[i],ret)}ret=this.pushStack(len>1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return !!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector){return this}root=root||rootjQuery;if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){this.length=1;this[0]=elem}this.context=document;this.selector=selector;return this}}else{if(!context||context.jquery){return(context||root).find(selector)}else{return this.constructor(context).find(selector)}}}else{if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this}
vendor: 4,288 bytes, line 25
25else{if(jQuery.isFunction(selector)){return root.ready!==undefined?root.ready(selector):selector(jQuery)}}}if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true}}})},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],pos=rneedsContext.test(selectors)||typeof selectors!=="string"?jQuery(selectors,context||this.context):0;for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(pos?pos.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched)},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1}if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0])}return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return dir(elem,"nextSibling")},prevAll:function(elem){return dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return dir(elem,"previousSibling",until)},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem)},children:function(elem){return siblings(elem.firstChild)},contents:function(elem){return elem.contentDocument||jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until}if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched)}if(this.length>1){if(!guaranteedUnique[name]){jQuery.uniqueSort(matched)}if(rparentsprev.test(name)){matched.reverse()}}return this.pushStack(matched)}});var rnotwhite=(/\S+/g);function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true});return object}jQuery.Callbacks=function(options){options=typeof options==="string"?createOptions(options):jQuery.extend({},options);var firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){locked=options.once;fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex<list.length){if(list[firingIndex].apply(memory[0],memory[1])===false&&options.stopOnFalse){firingIndex=list.length;memory=false}}}if(!options.memory){memory=false}firing=false;if(locked){if(memory){list=[]}else{list=""}}},self={add:function(){if(list){if(memory&&!firing){firingIndex=list.length-1;queue.push(memory)}(function add(args){jQuery.each(args,function(_,arg){if(jQuery.isFunction(arg)){if(!options.unique||!self.has(arg)){list.push(arg)}}else{if(arg&&arg.length&&jQuery.type(arg)!=="string"){add(arg)}}})})(arguments);if(memory&&!firing){fire()}}return this},remove:function(){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);if(index<=firingIndex){firingIndex--}}});return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0},empty:function(){if(list){list=[]}return this},disable:function(){locked=queue=[];list=memory="";return this},disabled:function(){return !list},lock:function(){locked=queue=[];
25if(!memory){list=memory=""}return this},locked:function(){return !!locked},fireWith:function(context,args){if(!locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire()}}return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return !!fired}};return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject)}else{newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)}})});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};promise.pipe=promise.then;jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock)}deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?promise:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function(subordinate){var i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=length!==1||(subordinate&&jQuery.isFunction(subordinate.promise))?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?slice.call(arguments):value;if(values===progressValues){deferred.notifyWith(contexts,values)}else{if(!(--remaining)){deferred.resolveWith(contexts,values)}}}},progressValues,progressContexts,resolveContexts;if(length>1){progressValues=new Array(length);progressContexts=new Array(length);resolveContexts=new Array(length);for(;i<length;i++){if(resolveValues[i]&&jQuery.isFunction(resolveValues[i].promise)){resolveValues[i].promise().progress(updateFunc(i,progressContexts,progressValues)).done(updateFunc(i,resolveContexts,resolveValues)).fail(deferred.reject)}else{--remaining}}}if(!remaining){deferred.resolveWith(resolveContexts,resolveValues)}return deferred.promise()}});var readyList;jQuery.fn.ready=function(fn){jQuery.ready.promise().done(fn);return this};jQuery.extend({isReady:false,readyWait:1,holdReady:function(hold){if(hold){jQuery.readyWait++}else{jQuery.ready(true)}},ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return}jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return}readyList.resolveWith(document,[jQuery]);if(jQuery.fn.triggerHandler){jQuery(document).triggerHandler("ready");jQuery(document).off("ready")}}});function completed(){document.removeEventListener("DOMContentLoaded",completed);window.removeEventListener("load",completed);jQuery.ready()}jQuery.ready.promise=function(obj){if(!readyList){readyList=jQuery.Deferred();if(document.readyState==="complete"||(document.readyState!=="loading"&&!document.documentElement.doScroll)){window.setTimeout(jQuery.ready)}else{document.addEventListener("DOMContentLoaded",completed);window.addEventListener("load",completed)}}return readyList.promise(obj)};jQuery.ready.promise();var access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(jQuery.type(key)==="object"){chainable=true;for(i in key){access(elems,fn,i,key[i],true,emptyGet,raw)}}else{if(value!==undefined){chainable=true;if(!jQuery.isFunction(value)){raw=true}if(bulk){if(raw){fn.call(elems,value);fn=null}else{bulk=fn;
25fn=function(elem,key,value){return bulk.call(jQuery(elem),value)}}}if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)))}}}}return chainable?elems:bulk?fn.call(elems):len?fn(elems[0],key):emptyGet};var acceptData=function(owner){return owner.nodeType===1||owner.nodeType===9||!(+owner.nodeType)};function Data(){this.expando=jQuery.expando+Data.uid++}Data.uid=1;Data.prototype={register:function(owner,initial){var value=initial||{};if(owner.nodeType){owner[this.expando]=value}else{Object.defineProperty(owner,this.expando,{value:value,writable:true,configurable:true})}return owner[this.expando]},cache:function(owner){if(!acceptData(owner)){return{}}var value=owner[this.expando];if(!value){value={};if(acceptData(owner)){if(owner.nodeType){owner[this.expando]=value}else{Object.defineProperty(owner,this.expando,{value:value,configurable:true})}}}return value},set:function(owner,data,value){var prop,cache=this.cache(owner);if(typeof data==="string"){cache[data]=value}else{for(prop in data){cache[prop]=data[prop]}}return cache},get:function(owner,key){return key===undefined?this.cache(owner):owner[this.expando]&&owner[this.expando][key]},access:function(owner,key,value){var stored;if(key===undefined||((key&&typeof key==="string")&&value===undefined)){stored=this.get(owner,key);return stored!==undefined?stored:this.get(owner,jQuery.camelCase(key))}this.set(owner,key,value);return value!==undefined?value:key},remove:function(owner,key){var i,name,camel,cache=owner[this.expando];if(cache===undefined){return}if(key===undefined){this.register(owner)}else{if(jQuery.isArray(key)){name=key.concat(key.map(jQuery.camelCase))}else{camel=jQuery.camelCase(key);if(key in cache){name=[key,camel]}else{name=camel;name=name in cache?[name]:(name.match(rnotwhite)||[])}}i=name.length;while(i--){delete cache[name[i]]}}if(key===undefined||jQuery.isEmptyObject(cache)){if(owner.nodeType){owner[this.expando]=undefined}else{delete owner[this.expando]}}},hasData:function(owner){var cache=owner[this.expando];return cache!==undefined&&!jQuery.isEmptyObject(cache)}};var dataPriv=new Data();var dataUser=new Data();var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/[A-Z]/g;function dataAttr(elem,key,data){var name;if(data===undefined&&elem.nodeType===1){name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}dataUser.set(elem,key,data)}else{data=undefined}}return data}jQuery.extend({hasData:function(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem)},data:function(elem,name,data){return dataUser.access(elem,name,data)},removeData:function(elem,name){dataUser.remove(elem,name)},_data:function(elem,name,data){return dataPriv.access(elem,name,data)},_removeData:function(elem,name){dataPriv.remove(elem,name)}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=dataUser.get(elem);if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){i=attrs.length;while(i--){if(attrs[i]){name=attrs[i].name;if(name.indexOf("data-")===0){name=jQuery.camelCase(name.slice(5));dataAttr(elem,name,data[name])}}}dataPriv.set(elem,"hasDataAttrs",true)}}return data}if(typeof key==="object"){return this.each(function(){dataUser.set(this,key)})}return access(this,function(value){var data,camelKey;if(elem&&value===undefined){data=dataUser.get(elem,key)||dataUser.get(elem,key.replace(rmultiDash,"-$&").toLowerCase());if(data!==undefined){return data}camelKey=jQuery.camelCase(key);data=dataUser.get(elem,camelKey);if(data!==undefined){return data}data=dataAttr(elem,camelKey,undefined);if(data!==undefined){return data}return}camelKey=jQuery.camelCase(key);this.each(function(){var data=dataUser.get(this,camelKey);dataUser.set(this,camelKey,value);if(key.indexOf("-")>-1&&data!==undefined){dataUser.set(this,key,value)}})},null,value,arguments.length>1,null,true)},removeData:function(key){return this.each(function(){dataUser.remove(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=dataPriv.get(elem,type);if(data){if(!queue||jQuery.isArray(data)){queue=dataPriv.access(elem,type,jQuery.makeArray(data))}else{queue.push(data)}}return queue||[]}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};if(fn==="inprogress"){fn=queue.shift();startLength--}if(fn){if(type==="fx"){queue.unshift("inprogress")}delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key])})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--}if(arguments.length<setter){return jQuery.queue(this[0],type)}return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){if(!(--count)){defer.resolveWith(elements,[elements])}};if(typeof type!=="string"){obj=type;type=undefined}type=type||"fx";while(i--){tmp=dataPriv.get(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve)}}resolve();return defer.promise(obj)}});var pnum=(/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");var cssExpand=["Top","Right","Bottom","Left"];var isHidden=function(elem,el){elem=el||elem;return jQuery.css(elem,"display")==="none"||!jQuery.contains(elem.ownerDocument,elem)};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale=1,maxIterations=20,currentValue=tween?function(){return tween.cur()}:function(){return jQuery.css(elem,prop,"")},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),initialInUnit=(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){unit=unit||initialInUnit[3];valueParts=valueParts||[];initialInUnit=+initial||1;do{scale=scale||".5";initialInUnit=initialInUnit/scale;jQuery.style(elem,prop,initialInUnit+unit)}
25while(scale!==(scale=currentValue()/initial)&&scale!==1&&--maxIterations)}if(valueParts){initialInUnit=+initialInUnit||+initial||0;adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2];if(tween){tween.unit=unit;tween.start=initialInUnit;tween.end=adjusted}}return adjusted}var rcheckableType=(/^(?:checkbox|radio)$/i);var rtagName=(/<([\w:-]+)/);var rscriptType=(/^$|\/(?:java|ecma)script/i);var wrapMap={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function getAll(context,tag){var ret=typeof context.getElementsByTagName!=="undefined"?context.getElementsByTagName(tag||"*"):typeof context.querySelectorAll!=="undefined"?context.querySelectorAll(tag||"*"):[];return tag===undefined||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],ret):ret}function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){dataPriv.set(elems[i],"globalEval",!refElements||dataPriv.get(refElements[i],"globalEval"))}}var rhtml=/<|&#?\w+;/;function buildFragment(elems,context,scripts,selection,ignored){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){if(jQuery.type(elem)==="object"){jQuery.merge(nodes,elem.nodeType?[elem]:elem)}else{if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem))}else{tmp=tmp||fragment.appendChild(context.createElement("div"));tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild}jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=""}}}}fragment.textContent="";i=0;while((elem=nodes[i++])){if(selection&&jQuery.inArray(elem,selection)>-1){if(ignored){ignored.push(elem)}continue}contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains){setGlobalEval(tmp)}if(scripts){j=0;while((elem=tmp[j++])){if(rscriptType.test(elem.type||"")){scripts.push(elem)}}}}return fragment}(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue})();var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true}function returnFalse(){return false}function safeActiveElement(){try{return document.activeElement}catch(err){}}function on(elem,types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined}for(type in types){on(elem,type,selector,data,types[type],one)}return elem}if(data==null&&fn==null){fn=selector;data=selector=undefined}else{if(fn==null){if(typeof selector==="string"){fn=data;data=undefined}else{fn=data;data=selector;selector=undefined}}}if(fn===false){fn=returnFalse}else{if(!fn){return elem}}if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments)};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)}return elem.each(function(){jQuery.event.add(this,types,fn,data,selector)})}jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(!elemData){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(!handler.guid){handler.guid=jQuery.guid++}if(!(events=elemData.events)){events=elemData.events={}}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined}}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;
25if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery.event.global[type]=true}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true)}continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle)}delete events[type]}}if(jQuery.isEmptyObject(events)){dataPriv.remove(elem,"handle events")}},dispatch:function(event){event=jQuery.event.fix(event);var i,j,ret,matched,handleObj,handlerQueue=[],args=slice.call(arguments),handlers=(dataPriv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.rnamespace||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function(event,handlers){var i,matches,sel,handleObj,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(event.type!=="click"||isNaN(event.button)||event.button<1)){for(;cur!==this;cur=cur.parentNode||this){if(cur.nodeType===1&&(cur.disabled!==true||event.type!=="click")){matches=[];for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector+" ";if(matches[sel]===undefined){matches[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length}if(matches[sel]){matches.push(handleObj)}}if(matches.length){handlerQueue.push({elem:cur,handlers:matches})}}}}if(delegateCount<handlers.length){handlerQueue.push({elem:this,handlers:handlers.slice(delegateCount)})}return handlerQueue},props:("altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which").split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){if(event.which==null){event.which=original.charCode!=null?original.charCode:original.keyCode}return event}},mouseHooks:{props:("button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement").split(" "),filter:function(event,original){var eventDoc,doc,body,button=original.button;if(event.pageX==null&&original.clientX!=null){eventDoc=event.target.ownerDocument||document;doc=eventDoc.documentElement;body=eventDoc.body;event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)}if(!event.which&&button!==undefined){event.which=(button&1?1:(button&2?3:(button&4?2:0)))}return event}},fix:function(event){if(event[jQuery.expando]){return event}
25var i,prop,copy,type=event.type,originalEvent=event,fixHook=this.fixHooks[type];if(!fixHook){this.fixHooks[type]=fixHook=rmouseEvent.test(type)?this.mouseHooks:rkeyEvent.test(type)?this.keyHooks:{}}copy=fixHook.props?this.props.concat(fixHook.props):this.props;event=new jQuery.Event(originalEvent);i=copy.length;while(i--){prop=copy[i];event[prop]=originalEvent[prop]}if(!event.target){event.target=document}if(event.target.nodeType===3){event.target=event.target.parentNode}return fixHook.filter?fixHook.filter(event,originalEvent):event},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus){this.focus();return false}},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur){this.blur();return false}},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&jQuery.nodeName(this,"input")){this.click();return false}},_default:function(event){return jQuery.nodeName(event.target,"a")}},beforeunload:{postDispatch:function(event){if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result}}}}};jQuery.removeEvent=function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle)}};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props)}if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&src.returnValue===false?returnTrue:returnFalse}else{this.type=src}if(props){jQuery.extend(this,props)}this.timeStamp=src&&src.timeStamp||jQuery.now();this[jQuery.expando]=true};jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:false,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&!this.isSimulated){e.preventDefault()}},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopPropagation()}},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopImmediatePropagation()}this.stopPropagation()}};
25jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||(related!==target&&!jQuery.contains(target,related))){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix}return ret}}});jQuery.fn.extend({on:function(types,selector,data,fn){return on(this,types,selector,data,fn)},one:function(types,selector,data,fn){return on(this,types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this}if(typeof types==="object"){for(type in types){this.off(type,selector,types[type])}return this}if(selector===false||typeof selector==="function"){fn=selector;selector=undefined}if(fn===false){fn=returnFalse}return this.each(function(){jQuery.event.remove(this,types,fn,selector)})}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,rnoInnerhtml=/<script|<style|<link/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type=match[1]}else{elem.removeAttribute("type")}return elem}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType!==1){return}if(dataPriv.hasData(src)){pdataOld=dataPriv.access(src);pdataCur=dataPriv.set(dest,pdataOld);events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i])}}}}if(dataUser.hasData(src)){udataOld=dataUser.access(src);udataCur=jQuery.extend({},udataOld);dataUser.set(dest,udataCur)}}function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();if(nodeName==="input"&&rcheckableType.test(src.type)){dest.checked=src.checked}
vendor: 4,714 bytes, line 25
25else{if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue}}}function domManip(collection,args,callback,ignored){args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||(l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value))){return collection.each(function(index){var self=collection.eq(index);if(isFunction){args[0]=value.call(this,index,self.html())}domManip(self,args,callback,ignored)})}if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first}if(first||ignored){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts){jQuery.merge(scripts,getAll(node,"script"))}}callback.call(collection[i],node,i)}if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src){if(jQuery._evalUrl){jQuery._evalUrl(node.src)}}else{jQuery.globalEval(node.textContent.replace(rcleanScript,""))}}}}}}return collection}function remove(elem,selector,keepData){var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;for(;(node=nodes[i])!=null;i++){if(!keepData&&node.nodeType===1){jQuery.cleanData(getAll(node))}if(node.parentNode){if(keepData&&jQuery.contains(node.ownerDocument,node)){setGlobalEval(getAll(node,"script"))}node.parentNode.removeChild(node)}}return elem}jQuery.extend({htmlPrefilter:function(html){return html.replace(rxhtmlTag,"<$1></$2>")},clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i])}}if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i])}}else{cloneCopyEvent(elem,clone)}}destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"))}return clone},cleanData:function(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if((data=elem[dataPriv.expando])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type)}else{jQuery.removeEvent(elem,type,data.handle)}}}elem[dataPriv.expando]=undefined}if(elem[dataUser.expando]){elem[dataUser.expando]=undefined}}}}});jQuery.fn.extend({domManip:domManip,detach:function(selector){return remove(this,selector,true)},remove:function(selector){return remove(this,selector)},text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value}})},null,value,arguments.length)},append:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this)}})},after:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling)}})},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent=""}}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML}if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[
25(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value}}elem=0}catch(e){}}if(elem){this.empty().append(value)}},null,value,arguments.length)},replaceWith:function(){var ignored=[];return domManip(this,arguments,function(elem){var parent=this.parentNode;if(jQuery.inArray(this,ignored)<0){jQuery.cleanData(getAll(this));if(parent){parent.replaceChild(elem,this)}}},ignored)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get())}return this.pushStack(ret)}});var iframe,elemdisplay={HTML:"block",BODY:"block"};function actualDisplay(name,doc){var elem=jQuery(doc.createElement(name)).appendTo(doc.body),display=jQuery.css(elem[0],"display");elem.detach();return display}function defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];if(!display){display=actualDisplay(nodeName,doc);if(display==="none"||!display){iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement);doc=iframe[0].contentDocument;doc.write();doc.close();display=actualDisplay(nodeName,doc);iframe.detach()}elemdisplay[nodeName]=display}return display}var rmargin=(/^margin/);var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function(elem){var view=elem.ownerDocument.defaultView;if(!view||!view.opener){view=window}return view.getComputedStyle(elem)};var swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name]}return ret};var documentElement=document.documentElement;(function(){var pixelPositionVal,boxSizingReliableVal,pixelMarginRightVal,reliableMarginLeftVal,container=document.createElement("div"),div=document.createElement("div");if(!div.style){return}div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";container.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute";container.appendChild(div);function computeStyleTests(){div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%";div.innerHTML="";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!=="1%";reliableMarginLeftVal=divStyle.marginLeft==="2px";boxSizingReliableVal=divStyle.width==="4px";div.style.marginRight="50%";pixelMarginRightVal=divStyle.marginRight==="4px";documentElement.removeChild(container)}jQuery.extend(support,{pixelPosition:function(){computeStyleTests();return pixelPositionVal},boxSizingReliable:function(){if(boxSizingReliableVal==null){computeStyleTests()}return boxSizingReliableVal},pixelMarginRight:function(){if(boxSizingReliableVal==null){computeStyleTests()}return pixelMarginRightVal},reliableMarginLeft:function(){if(boxSizingReliableVal==null){computeStyleTests()}return reliableMarginLeftVal},reliableMarginRight:function(){var ret,marginDiv=div.appendChild(document.createElement("div"));marginDiv.style.cssText=div.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0";marginDiv.style.marginRight=marginDiv.style.width="0";div.style.width="1px";documentElement.appendChild(container);ret=!parseFloat(window.getComputedStyle(marginDiv).marginRight);documentElement.removeChild(container);div.removeChild(marginDiv);return ret}})})();function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);
25ret=computed?computed.getPropertyValue(name)||computed[name]:undefined;if((ret===""||ret===undefined)&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name)}if(computed){if(!support.pixelMarginRight()&&rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!==undefined?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}var rdisplayswap=/^(none|table(?!-c[ea]).+)/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","O","Moz","ms"],emptyStyle=document.createElement("div").style;function vendorPropName(name){if(name in emptyStyle){return name}var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name}}}function setPositiveNumber(elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i=extra===(isBorderBox?"border":"content")?4:name==="width"?1:0,val=0;for(;i<4;i+=2){if(extra==="margin"){val+=jQuery.css(elem,extra+cssExpand[i],true,styles)}if(isBorderBox){if(extra==="content"){val-=jQuery.css(elem,"padding"+cssExpand[i],true,styles)}if(extra!=="margin"){val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}else{val+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="padding"){val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}}return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=true,val=name==="width"?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";if(val<=0||val==null){val=curCSS(elem,name,styles);if(val<0||val==null){val=elem.style[name]}if(rnumnonpx.test(val)){return val}valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]);val=parseFloat(val)||0}return(val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles))+"px"}function showHide(elements,show){var display,elem,hidden,values=[],index=0,length=elements.length;for(;index<length;index++){elem=elements[index];if(!elem.style){continue}values[index]=dataPriv.get(elem,"olddisplay");display=elem.style.display;if(show){if(!values[index]&&display==="none"){elem.style.display=""}if(elem.style.display===""&&isHidden(elem)){values[index]=dataPriv.access(elem,"olddisplay",defaultDisplay(elem.nodeName))}}else{hidden=isHidden(elem);if(display!=="none"||!hidden){dataPriv.set(elem,"olddisplay",hidden?display:jQuery.css(elem,"display"))}}}for(index=0;index<length;index++){elem=elements[index];if(!elem.style){continue}if(!show||elem.style.display==="none"||elem.style.display===""){elem.style.display=show?values[index]||"":"none"}}return elements}jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret}}}},cssNumber:{animationIterationCount:true,columnCount:true,fillOpacity:true,flexGrow:true,flexShrink:true,fontWeight:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":"cssFloat"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return}var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(origName)||origName);hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);type="number"}if(value==null||value!==value){return}if(type==="number"){value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px")}if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit"}if(!hooks||!("set" in hooks)||(value=hooks.set(elem,value,extra))!==undefined){style[name]=value}}
vendor: 4,423 bytes, line 25
25else{if(hooks&&"get" in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret}return style[name]}},css:function(elem,name,extra,styles){var val,num,hooks,origName=jQuery.camelCase(name);name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(origName)||origName);hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&"get" in hooks){val=hooks.get(elem,true,extra)}if(val===undefined){val=curCSS(elem,name,styles)}if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name]}if(extra===""||extra){num=parseFloat(val);return extra===true||isFinite(num)?num||0:val}return val}});jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery.css(elem,"display"))&&elem.offsetWidth===0?swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra)}},set:function(elem,value,extra){var matches,styles=extra&&getStyles(elem),subtract=extra&&augmentWidthOrHeight(elem,name,extra,jQuery.css(elem,"boxSizing",false,styles)==="border-box",styles);if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||"px")!=="px"){elem.style[name]=value;value=jQuery.css(elem,name)}return setPositiveNumber(elem,value,subtract)}}});jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left-swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left}))+"px"}});jQuery.cssHooks.marginRight=addGetHookIf(support.reliableMarginRight,function(elem,computed){if(computed){return swap(elem,{display:"inline-block"},curCSS,[elem,"marginRight"])}});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0,expanded={},parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0]}return expanded}};if(!rmargin.test(prefix)){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber}});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(jQuery.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles)}return map}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)},show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide()}return this.each(function(){if(isHidden(this)){jQuery(this).show()}else{jQuery(this).hide()}})}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration)}else{this.pos=eased=percent}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(hooks&&hooks.set){hooks.set(this)}else{Tween.propHooks._default.set(this)}return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop]}result=jQuery.css(tween.elem,tween.prop,"");return !result||result==="auto"?0:result},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween)}else{if(tween.elem.nodeType===1&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}else{tween.elem[tween.prop]=tween.now}}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if
25(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now}}};jQuery.easing={linear:function(p){return p},swing:function(p){return 0.5-Math.cos(p*Math.PI)/2},_default:"swing"};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function createFxNow(){window.setTimeout(function(){fxNow=undefined});return(fxNow=jQuery.now())}function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type}if(includeWidth){attrs.opacity=attrs.width=type}return attrs}function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if((tween=collection[index].call(animation,prop,value))){return tween}}}function defaultPrefilter(elem,props,opts){var prop,value,toggle,tween,hooks,oldfire,display,checkDisplay,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHidden(elem),dataShow=dataPriv.get(elem,"fxshow");if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire()}}}hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire()}})})}if(elem.nodeType===1&&("height" in props||"width" in props)){opts.overflow=[style.overflow,style.overflowX,style.overflowY];display=jQuery.css(elem,"display");checkDisplay=display==="none"?dataPriv.get(elem,"olddisplay")||defaultDisplay(elem.nodeName):display;if(checkDisplay==="inline"&&jQuery.css(elem,"float")==="none"){style.display="inline-block"}}if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2]})}for(prop in props){value=props[prop];if(rfxtypes.exec(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true}else{continue}}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}else{display=undefined}}if(!jQuery.isEmptyObject(orig)){if(dataShow){if("hidden" in dataShow){hidden=dataShow.hidden}}else{dataShow=dataPriv.access(elem,"fxshow",{})}if(toggle){dataShow.hidden=!hidden}if(hidden){jQuery(elem).show()}else{anim.done(function(){jQuery(elem).hide()})}anim.done(function(){var prop;dataPriv.remove(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop])}});for(prop in orig){tween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=tween.start;if(hidden){tween.end=tween.start;tween.start=prop==="width"||prop==="height"?1:0}}}}else{if((display==="none"?defaultDisplay(elem.nodeName):display)==="inline"){style.display=display}}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=jQuery.camelCase(index);
vendor: 9,907 bytes, line 25
25easing=specialEasing[name];value=props[index];if(jQuery.isArray(value)){easing=value[1];value=props[index]=value[0]}if(index!==name){props[name]=value;delete props[index]}hooks=jQuery.cssHooks[name];if(hooks&&"expand" in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing}}}else{specialEasing[name]=easing}}}function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped){return false}var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent)}deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length){return remaining}else{deferred.resolveWith(elem,[animation]);return false}},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped){return this}stopped=true;for(;index<length;index++){animation.tweens[index].run(1)}if(gotoEnd){deferred.notifyWith(elem,[animation,1,0]);deferred.resolveWith(elem,[animation,gotoEnd])}else{deferred.rejectWith(elem,[animation,gotoEnd])}return this}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=Animation.prefilters[index].call(animation,elem,props,animation.opts);if(result){if(jQuery.isFunction(result.stop)){jQuery._queueHooks(animation.elem,animation.opts.queue).stop=jQuery.proxy(result.stop,result)}return result}}jQuery.map(props,createTween,animation);if(jQuery.isFunction(animation.opts.start)){animation.opts.start.call(elem,animation)}jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)}jQuery.Animation=jQuery.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);return tween}]},tweener:function(props,callback){if(jQuery.isFunction(props)){callback=props;props=["*"]}else{props=props.match(rnotwhite)}var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];Animation.tweeners[prop]=Animation.tweeners[prop]||[];Animation.tweeners[prop].unshift(callback)}},prefilters:[defaultPrefilter],prefilter:function(callback,prepend){if(prepend){Animation.prefilters.unshift(callback)}else{Animation.prefilters.push(callback)}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default;if(opt.queue==null||opt.queue===true){opt.queue="fx"}opt.old=opt.complete;opt.complete=function(){if(jQuery.isFunction(opt.old)){opt.old.call(this)}if(opt.queue){jQuery.dequeue(this,opt.queue)}};return opt};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||dataPriv.get(this,"finish")){anim.stop(true)}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd)};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined}if(clearQueue&&type!==false){this.queue(type||"fx",[])}return this.each(function(){var dequeue=true,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=dataPriv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index])}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index])}}}for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1)}}if(dequeue||!gotoEnd){jQuery.dequeue(this,type)}})},finish:function(type){if(type!==false){type=type||"fx"}return this.each(function(){var index,data=dataPriv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true)}for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1)}}for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this)}}delete data.finish})}});jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback)}});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=jQuery.now();for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1)}}if(!timers.length){jQuery.fx.stop()}fxNow=undefined};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);if(timer()){jQuery.fx.start()}else{jQuery.timers.pop()}};jQuery.fx.interval=13;jQuery.fx.start=function(){if(!timerId){timerId=window.setInterval(jQuery.fx.tick,jQuery.fx.interval)}};jQuery.fx.stop=function(){window.clearInterval(timerId);timerId=null};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout)}})};(function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox";support.checkOn=input.value!=="";support.optSelected=opt.selected;select.disabled=true;support.optDisabled=!opt.disabled;input=document.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t"})();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return}if(typeof elem.getAttribute==="undefined"){return jQuery.prop(elem,name,value)}if(nType!==1||!jQuery.isXMLDoc(elem)){name=name.toLowerCase();hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:undefined)}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return}if(hooks&&"set" in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}elem.setAttribute(name,value+"");return value}if(hooks&&"get" in hooks&&(ret=hooks.get(elem,name))!==null){return ret}ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val}return value}}}},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&elem.nodeType===1){while((name=attrNames[i++])){propName=jQuery.propFix[name]||name;if(jQuery.expr.match.bool.test(name)){elem[propName]=false}elem.removeAttribute(name)}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name)}else{elem.setAttribute(name,name)}return name}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle;if(!isXML){handle=attrHandle[name];attrHandle[name]=ret;ret=getter(elem,name,isXML)!=null?name.toLowerCase():null;attrHandle[name]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}});jQuery.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return}if(nType!==1||!jQuery.isXMLDoc(elem)){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name]}
25if(value!==undefined){if(hooks&&"set" in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}return(elem[name]=value)}if(hooks&&"get" in hooks&&(ret=hooks.get(elem,name))!==null){return ret}return elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex}return null},set:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex}}}}}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||""}jQuery.fn.extend({addClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)))})}if(typeof value==="string"&&value){classes=value.match(rnotwhite)||[];while((elem=this[i++])){curValue=getClass(elem);cur=elem.nodeType===1&&(" "+curValue+" ").replace(rclass," ");if(cur){j=0;while((clazz=classes[j++])){if(cur.indexOf(" "+clazz+" ")<0){cur+=clazz+" "}}finalValue=jQuery.trim(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue)}}}}return this},removeClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)))})}if(!arguments.length){return this.attr("class","")}if(typeof value==="string"&&value){classes=value.match(rnotwhite)||[];while((elem=this[i++])){curValue=getClass(elem);cur=elem.nodeType===1&&(" "+curValue+" ").replace(rclass," ");if(cur){j=0;while((clazz=classes[j++])){while(cur.indexOf(" "+clazz+" ")>-1){cur=cur.replace(" "+clazz+" "," ")}}finalValue=jQuery.trim(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue)}}}}return this},toggleClass:function(value,stateVal){var type=typeof value;if(typeof stateVal==="boolean"&&type==="string"){return stateVal?this.addClass(value):this.removeClass(value)}if(jQuery.isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal)})}return this.each(function(){var className,i,self,classNames;if(type==="string"){i=0;self=jQuery(this);classNames=value.match(rnotwhite)||[];while((className=classNames[i++])){if(self.hasClass(className)){self.removeClass(className)}else{self.addClass(className)}}}else{if(value===undefined||type==="boolean"){className=getClass(this);if(className){dataPriv.set(this,"__className__",className)}if(this.setAttribute){this.setAttribute("class",className||value===false?"":dataPriv.get(this,"__className__")||"")}}}})},hasClass:function(selector){var className,elem,i=0;className=" "+selector+" ";while((elem=this[i++])){if(elem.nodeType===1&&(" "+getClass(elem)+" ").replace(rclass," ").indexOf(className)>-1){return true}}return false}});var rreturn=/\r/g,rspaces=/[\x20\t\r\n\f]+/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get" in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret}ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret}return}isFunction=jQuery.isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return}if(isFunction){val=value.call(this,i,jQuery(this).val())}else{val=value}if(val==null){val=""}else{if(typeof val==="number"){val+=""}else{if(jQuery.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+""})}}}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set" in hooks)||hooks.set(this,val,"value")===undefined){this.value=val}})}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:jQuery.trim(jQuery.text(elem)).replace(rspace
25s," ")}},select:{get:function(elem){var value,option,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one"||index<0,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;for(;i<max;i++){option=options[i];if((option.selected||i===index)&&(support.optDisabled?!option.disabled:option.getAttribute("disabled")===null)&&(!option.parentNode.disabled||!jQuery.nodeName(option.parentNode,"optgroup"))){value=jQuery(option).val();if(one){return value}values.push(value)}}return values},set:function(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];if(option.selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1){optionSet=true}}if(!optionSet){elem.selectedIndex=-1}return values}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value)){return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1)}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value}}});var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/;jQuery.extend(jQuery.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type+jQuery.event.triggered)){return}if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem}data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return}if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window)}}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(dataPriv.get(cur,"events")||{})[event.type]&&dataPriv.get(cur,"handle");if(handle){handle.apply(cur,data)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault()}}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){if(ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery.event.triggered=type;elem[type]();jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp}}}}return event.result},simulate:function(type,elem,event){var e=jQuery.extend(new jQuery.Event(),event,{type:type,isSimulated:true});jQuery.event.trigger(e,null,elem)}});jQuery.fn.extend({trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true)}}});jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)}});support.focusin="onfocusin" in window;if(!support.focusin){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event))};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true)}dataPriv.access(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);dataPriv.remove(doc,fix)}
25else{dataPriv.access(doc,fix,attaches)}}}})}var location=window.location;var nonce=jQuery.now();var rquery=(/\?/);jQuery.parseJSON=function(data){return JSON.parse(data+"")};jQuery.parseXML=function(data){var xml;if(!data||typeof data!=="string"){return null}try{xml=(new window.DOMParser()).parseFromString(data,"text/xml")}catch(e){xml=undefined}if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data)}return xml};var rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document.createElement("a");originAnchor.href=location.href;function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*"}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func)){while((dataType=dataTypes[i++])){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func)}else{(structure[dataType]=structure[dataType]||[]).push(func)}}}}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=(structure===transports);function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false}else{if(seekingTransport){return !(selected=dataTypeOrTransport)}}});return selected}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:(deep||(deep={})))[key]=src[key]}}if(deep){jQuery.extend(true,target,deep)}return target}function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type")}}if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}}}if(dataTypes[0] in responses){finalDataType=dataTypes[0]}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}if(!firstDataType){firstDataType=type}}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType)}return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv]}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType)}prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev}else{if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2]}else{if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}}break}}}}if(conv!==true){if(conv&&s["throws"]){response=conv(response)}else{try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}}}}}}return{state:"success",data:response}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined}options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,fireGlobals,i,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2]}}match=responseHeaders[key.toLowerCase()]}return match==null?null:match},getAllResponseHeaders:function(){return state===2?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();if(!state){name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value}return this},overrideMimeType:function(type){if(!state){s.mimeType=type}return this},statusCode:function(map){var code;if(map){if(state<2){for(code in map){statusCode[code]=[statusCode[code],map[code]]}}else{jqXHR.always(map[jqXHR.status])}}return this},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText)}done(0,finalText);return this}};deferred.promise(jqXHR).complete=completeDeferred.add;jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;s.url=((url||s.url||location.href)+"").replace(rhash,"").replace(rprotocol,location.protocol+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""];if(s.crossDomain==null){urlAnchor=document.createElement("a");try{urlAnchor.href=s.url;urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==urlAnchor.protocol+"//"+urlAnchor.host}catch(e){s.crossDomain=true}}
25if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional)}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return jqXHR}fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart")}s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url;if(!s.hasContent){if(s.data){cacheURL=(s.url+=(rquery.test(cacheURL)?"&":"?")+s.data);delete s.data}if(s.cache===false){s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++}}if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL])}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType)}jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i])}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){return jqXHR.abort()}strAbort="abort";for(i in {success:1,error:1,complete:1}){jqXHR[i](s[i])}transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport")}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s])}if(state===2){return jqXHR}if(s.async&&s.timeout>0){timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout")},s.timeout)}try{state=1;transport.send(requestHeaders,done)}catch(e){if(state<2){done(-1,e)}else{throw e}}}function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(state===2){return}state=2;if(timeoutTimer){window.clearTimeout(timeoutTimer)}transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses)}response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified}modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified}}if(status===204||s.type==="HEAD"){statusText="nocontent"}else{if(status===304){statusText="notmodified"}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error}}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0}}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR])}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error])}jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error])}completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--jQuery.active)){jQuery.event.trigger("ajaxStop")}}}return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script")}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined}return jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url))}});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:false,global:false,"throws":true})};jQuery.fn.extend({wrapAll:function(html){var wrap;if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))})}if(this[0]){wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild}return elem}).append(this)}return this},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))})}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html)}else{self.append(html)}})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes)}}).end()}});jQuery.expr.filters.hidden=function(elem){return !jQuery.expr.filters.visible(elem)};jQuery.expr.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0||elem.getClientRects().length>0};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v)}else{buildParams(prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]",v,traditional,add)}})}else{if(!traditional&&jQuery.type(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add)}}else{add(prefix,obj)}}}jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():(value==null?"":value);s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)};if(traditional===undefined){traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional}if(jQuery.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){jQuery.each(a,function(){add(this.name,this.value)})}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add)}}return s.join("&").replace(r20,"+")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}
25).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest()}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&("withCredentials" in xhrSupported);support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i]}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType)}if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest"}for(i in headers){xhr.setRequestHeader(i,headers[i])}callback=function(type){return function(){if(callback){callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.onreadystatechange=null;if(type==="abort"){xhr.abort()}else{if(type==="error"){if(typeof xhr.status!=="number"){complete(0,"error")}else{complete(xhr.status,xhr.statusText)}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,(xhr.responseType||"text")!=="text"||typeof xhr.responseText!=="string"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders())}}}}};xhr.onload=callback();errorCallback=xhr.onerror=callback("error");
25if(xhr.onabort!==undefined){xhr.onabort=errorCallback}else{xhr.onreadystatechange=function(){if(xhr.readyState===4){window.setTimeout(function(){if(callback){errorCallback()}})}}}callback=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback){throw e}}},abort:function(){if(callback){callback()}}}}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){jQuery.globalEval(text);return text}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false}if(s.crossDomain){s.type="GET"}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery("<script>").prop({charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove();callback=null;if(evt){complete(evt.type==="error"?404:200,evt.type)}});document.head.appendChild(script[0])},abort:function(){if(callback){callback()}}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||(jQuery.expando+"_"+(nonce++));this[callback]=true;return callback}});jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp"){callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName)}else{if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName}}s.converters["script json"]=function(){if(!responseContainer){jQuery.error(callbackName+" was not called")}return responseContainer[0]};s.dataTypes[0]="json";overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments};jqXHR.always(function(){if(overwritten===undefined){jQuery(window).removeProp(callbackName)}else{window[callbackName]=overwritten}if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName)}if(responseContainer&&jQuery.isFunction(overwritten)){overwritten(responseContainer[0])}responseContainer=overwritten=undefined});return"script"}});jQuery.parseHTML=function(data,context,keepScripts){if(!data||typeof data!=="string"){return null}if(typeof context==="boolean"){keepScripts=context;context=false}context=context||document;var parsed=rsingleTag.exec(data),scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])]}parsed=buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove()}return jQuery.merge([],parsed.childNodes)};var _load=jQuery.fn.load;jQuery.fn.load=function(url,params,callback){if(typeof url!=="string"&&_load){return _load.apply(this,arguments)}var selector,type,response,self=this,off=url.indexOf(" ");if(off>-1){selector=jQuery.trim(url.slice(off));url=url.slice(0,off)}if(jQuery.isFunction(params)){callback=params;params=undefined}else{if(params&&typeof params==="object"){type="POST"}}if(self.length>0){jQuery.ajax({url:url,type:type||"GET",dataType:"html",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR])})})}return this};jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}});jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};function getWindow(elem){return jQuery.isWindow(elem)?elem:elem.nodeType===9&&elem.defaultView}jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};if(position==="static"){elem.style.position="relative"}curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0}if(jQuery.isFunction(options)){options=options.call(elem,i,jQuery.extend({},curOffset))}if(options.top!=null){props.top=(options.top-curOffset.top)+curTop}
25if(options.left!=null){props.left=(options.left-curOffset.left)+curLeft}if("using" in options){options.using.call(elem,props)}else{curElem.css(props)}}};jQuery.fn.extend({offset:function(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)})}var docElem,win,elem=this[0],box={top:0,left:0},doc=elem&&elem.ownerDocument;if(!doc){return}docElem=doc.documentElement;if(!jQuery.contains(docElem,elem)){return box}box=elem.getBoundingClientRect();win=getWindow(doc);return{top:box.top+win.pageYOffset-docElem.clientTop,left:box.left+win.pageXOffset-docElem.clientLeft}},position:function(){if(!this[0]){return}var offsetParent,offset,elem=this[0],parentOffset={top:0,left:0};if(jQuery.css(elem,"position")==="fixed"){offset=elem.getBoundingClientRect()}else{offsetParent=this.offsetParent();offset=this.offset();if(!jQuery.nodeName(offsetParent[0],"html")){parentOffset=offsetParent.offset()}parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",true);parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",true)}return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)}},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent;while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.offsetParent}return offsetParent||documentElement})}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win=getWindow(elem);if(val===undefined){return win?win[prop]:elem[method]}if(win){win.scrollTo(!top?val:win.pageXOffset,top?val:win.pageYOffset)}else{elem[method]=val}},method,val,arguments.length)}});jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed}})});jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type,value){var doc;if(jQuery.isWindow(elem)){return elem.document.documentElement["client"+name]}if(elem.nodeType===9){doc=elem.documentElement;return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])}return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:undefined,chainable,null)}})});jQuery.fn.extend({bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn)},size:function(){return this.length}});jQuery.fn.andSelf=jQuery.fn.addBack;if(typeof define==="function"&&define.amd){define("jquery",[],function(){return jQuery})}var _jQuery=window.jQuery,_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$}if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery}return jQuery};if(!noGlobal){window.jQuery=window.$=jQuery}return jQuery}))}
26/*!
27 * JavaScript Cookie v2.2.0
28 * https://github.com/js-cookie/js-cookie
29 *
30 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
31 * Released under the MIT license
32 */
33;(function(b){var d;if(typeof define==="function"&&define.amd){define(b);d=true}if(typeof exports==="object"){module.exports=b();d=true}if(!d){var a=window.Cookies;var c=window.Cookies=b();c.noConflict=function(){window.Cookies=a;return c}}}(function(){function b(){var f=0;var c={};for(;f<arguments.length;f++){var d=arguments[f];for(var e in d){c[e]=d[e]}}return c}function a(d){function c(r,q,m){if(typeof document==="undefined"){return}if(arguments.length>1){m=b({path:"/"},c.defaults,m);if(typeof m.expires==="number"){m.expires=new Date(new Date()*1+m.expires*86400000)}m.expires=m.expires?m.expires.toUTCString():"";try{var t=JSON.stringify(q);if(/^[\{\[]/.test(t)){q=t}}catch(o){}q=d.write?d.write(q,r):encodeURIComponent(String(q)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decode
33URIComponent);r=encodeURIComponent(String(r)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var l="";for(var p in m){if(!m[p]){continue}l+="; "+p;if(m[p]===true){continue}l+="="+m[p].split(";")[0]}return(document.cookie=r+"="+q+l)}var j={};var f=function(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)};var s=document.cookie?document.cookie.split("; "):[];var n=0;for(;n<s.length;n++){var k=s[n].split("=");var h=k.slice(1).join("=");if(!this.json&&h.charAt(0)==='"'){h=h.slice(1,-1)}try{var g=f(k[0]);h=(d.read||d)(h,g)||f(h);if(this.json){try{h=JSON.parse(h)}catch(o){}}j[g]=h;if(r===g){break}}catch(o){}}return r?j[r]:j}c.set=c;c.get=function(e){return c.call(c,e)};c.getJSON=function(e){return c.call({json:true},e)};c.remove=function(f,e){c(f,"",b(e,{expires:-1}))};c.defaults={};c.withConverter=a;return c}return a(function(){})}));jQuery.uaMatch=function(b){b=b.toLowerCase();var a=/(chrome)[ \/]([\w.]+)/.exec(b)||/(webkit)[ \/]([\w.]+)/.exec(b)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b)||/(msie) ([\w.]+)/.exec(b)||b.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b)||[];return{browser:a[1]||"",version:a[2]||"0"}};if(!jQuery.browser){var matched=jQuery.uaMatch(navigator.userAgent);var browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version}if(browser.chrome){browser.webkit=true}else{if(browser.webkit){browser.safari=true}}jQuery.browser=browser}
34/*!
35 * jQuery Transit - CSS3 transitions and transformations
36 * Copyright(c) 2011 Rico Sta. Cruz <[email protected]>
37 * MIT Licensed.
38 *
39 * http://ricostacruz.com/jquery.transit
40 * http://github.com/rstacruz/jquery.transit
41 */
42;
43/*!
44jQuery WaitForImages
45
46Copyright (c) 2012 Alex Dickson
47
48Permission is hereby granted, free of charge, to any person
49obtaining a copy of this software and associated documentation
50files (the "Software"), to deal in the Software without
51restriction, including without limitation the rights to use,
52copy, modify, merge, publish, distribute, sublicense, and/or sell
53copies of the Software, and to permit persons to whom the
54Software is furnished to do so, subject to the following
55conditions:
56
57The above copyright notice and this permission notice shall be
58included in all copies or substantial portions of the Software.
59
60THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
61EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
62OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
63NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
64HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
65WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
66FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
67OTHER DEALINGS IN THE SOFTWARE.
68
69https://github.com/alexanderdickson/waitForImages
70*/
71(function(m){function w(f){if(f in v.style){return f}var a=["Moz","Webkit","O","ms"],i=f.charAt(0).toUpperCase()+f.substr(1);if(f in v.style){return f}for(f=0;f<a.length;++f){var c=a[f]+i;if(c in v.style){return c}}}function g(a){"string"===typeof a&&this.parse(a);return this}function b(l,z,y,f){var o=[];m.each(l,function(a){a=m.camelCase(a);a=m.transit.propertyMap[a]||m.cssProps[a]||a;a=a.replace(/([A-Z])/g,function(i){return"-"+i.toLowerCase()});-1===m.inArray(a,o)&&o.push(a)});m.cssEase[y]&&(y=m.cssEase[y]);var e=""+d(z)+" "+y;0<parseInt(f,10)&&(e+=" "+d(f));var c=[];m.each(o,function(i,a){c.push(a+" "+e)});return c.join(", ")}function j(a,c){c||(m.cssNumber[a]=!0);m.transit.propertyMap[a]=q.transform;m.cssHooks[a]={get:function(e){return m(e).css("transit:transform").get(a)},set:function(l,f){var e=m(l).css("transit:transform");e.setFromString(a,f);m(l).css({"transit:transform":e})}}}function x(c,a){return"string"===typeof c&&!c.match(/^[\-0-9\.]+$/)?c:""+c+a}function d(a){m.fx.speeds[a]&&(a=m.fx.speeds[a]);return x(a,"ms")}m.transit={version:"0.9.9",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:!0,useTransitionEnd:!1};var v=document.createElement("div"),q={},k=-1<navigator.userAgent.toLowerCase().indexOf("chrome");q.transition=w("transition");q.transitionDelay=w("transitionDelay");q.transform=w("transform");q.transformOrigin=w("transformOrigin");v.style[q.transform]="";v.style[q.transform]="rotateY(90deg)";q.transform3d=""!==v.style[q.transform];var h=q.transitionEnd={transition:"transitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"}[q.transition]||null,p;for(p in q){q.hasOwnProperty(p)&&"undefined"===typeof m.support[p]&&(m.support[p]=q[p])}v=null;m.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1
71)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};m.cssHooks["transit:transform"]={get:function(a){return m(a).data("transform")||new g},set:function(c,e){var a=e;a instanceof g||(a=new g(a));c.style[q.transform]="WebkitTransform"===q.transform&&!k?a.toString(!0):a.toString();m(c).data("transform",a)}};m.cssHooks.transform={set:m.cssHooks["transit:transform"].set};"1.8">m.fn.jquery&&(m.cssHooks.transformOrigin={get:function(a){return a.style[q.transformOrigin]},set:function(c,a){c.style[q.transformOrigin]=a}},m.cssHooks.transition={get:function(a){return a.style[q.transition]},set:function(c,a){c.style[q.transition]=a}});j("scale");j("translate");j("rotate");j("rotateX");j("rotateY");j("rotate3d");j("perspective");j("skewX");j("skewY");j("x",!0);j("y",!0);g.prototype={setFromString:function(f,a){var c="string"===typeof a?a.split(","):a.constructor===Array?a:[a];c.unshift(f);g.prototype.set.apply(this,c)},set:function(c){var a=Array.prototype.slice.apply(arguments,[1]);this.setter[c]?this.setter[c].apply(this,a):this[c]=a.join(",")},get:function(a){return this.getter[a]?this.getter[a].apply(this):this[a]||0},setter:{rotate:function(a){this.rotate=x(a,"deg")},rotateX:function(a){this.rotateX=x(a,"deg")},rotateY:function(a){this.rotateY=x(a,"deg")},scale:function(c,a){void 0===a&&(a=c);this.scale=c+","+a},skewX:function(a){this.skewX=x(a,"deg")},skewY:function(a){this.skewY=x(a,"deg")},perspective:function(a){this.perspective=x(a,"px")},x:function(a){this.set("translate",a,null)},y:function(a){this.set("translate",null,a)},translate:function(c,a){void 0===this._translateX&&(this._translateX=0);void 0===this._translateY&&(this._translateY=0);null!==c&&void 0!==c&&(this._translateX=x(c,"px"));null!==a&&void 0!==a&&(this._translateY=x(a,"px"));this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var a=(this.scale||"1,1").split(",");a[0]&&(a[0]=parseFloat(a[0]));a[1]&&(a[1]=parseFloat(a[1]));return a[0]===a[1]?a[0]:a},rotate3d:function(){for(var c=(this.rotate3d||"0,0,0,0deg").split(","),a=0;3>=a;++a){c[a]&&(c[a]=parseFloat(c[a]))}c[3]&&(c[3]=x(c[3],"deg"));return c}},parse:function(c){var a=this;c.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(i,l,f){a.setFromString(l,f)})},toString:function(c){var a=[],f;for(f in this){if(this.hasOwnProperty(f)&&(q.transform3d||!("rotateX"===f||"rotateY"===f||"perspective"===f||"transformOrigin"===f))){"_"!==f[0]&&(c&&"scale"===f?a.push(f+"3d("+this[f]+",1)"):c&&"translate"===f?a.push(f+"3d("+this[f]+",0)"):a.push(f+"("+this[f]+")"))}}return a.join(" ")}};m.fn.transition=m.fn.transit=function(B,a,l,C){var A=this,r=0,y=!0;"function"===typeof a&&(C=a,a=void 0);"function"===typeof l&&(C=l,l=void 0);"undefined"!==typeof B.easing&&(l=B.easing,delete B.easing);"undefined"!==typeof B.duration&&(a=B.duration,delete B.duration);"undefined"!==typeof B.complete&&(C=B.complete,delete B.complete);"undefined"!==typeof B.queue&&(y=B.queue,delete B.queue);"undefined"!==typeof B.delay&&(r=B.delay,delete B.delay);"undefined"===typeof a&&(a=m.fx.speeds._default);"undefined"===typeof l&&(l=m.cssEase._default);a=d(a);var o=b(B,a,l,r),z=m.transit.enabled&&q.transition?parseInt(a,10)+parseInt(r,10):0;if(0===z){return a=y,l=function(c){A.css(B);C&&C.apply(A);c&&c()},!0===a?A.queue(l):a?A.queue(a,l):l(),A}var e={};a=y;l=function(f){var c=0;"MozTransition"===q.transition&&25>c&&(c=25);window.setTimeout(function(){var s=!1,n=function(){s&&A.unbind(h,n);0<z&&A.each(function(){this.style[q.transition]=e[this]||null});"function"===typeof C&&C.apply(A);"function"===typeof f&&f()};0<z&&h&&m.transit.useTransitionEnd?(s=!0,A.bind(h,n)):window.setTimeout(n,z);A.each(function(){0<z&&(this.style[q.transition]=o);
71m(this).css(B)})},c)};!0===a?A.queue(l):a?A.queue(a,l):l();return this};m.transit.getTransitionValue=b})(jQuery);(function(b,a){jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(g,d,h,f,c){return jQuery.easing[jQuery.easing.def](g,d,h,f,c)},easeInQuad:function(g,d,h,f,c){return f*(d/=c)*d+h},easeOutQuad:function(g,d,h,f,c){return -f*(d/=c)*(d-2)+h},easeInOutQuad:function(g,d,h,f,c){if((d/=c/2)<1){return f/2*d*d+h}return -f/2*(--d*(d-2)-1)+h},easeInCubic:function(g,d,h,f,c){return f*(d/=c)*d*d+h},easeOutCubic:function(g,d,h,f,c){return f*((d=d/c-1)*d*d+1)+h},easeInOutCubic:function(g,d,h,f,c){if((d/=c/2)<1){return f/2*d*d*d+h}return f/2*((d-=2)*d*d+2)+h},easeInQuart:function(g,d,h,f,c){return f*(d/=c)*d*d*d+h},easeOutQuart:function(g,d,h,f,c){return -f*((d=d/c-1)*d*d*d-1)+h},easeInOutQuart:function(g,d,h,f,c){if((d/=c/2)<1){return f/2*d*d*d*d+h}return -f/2*((d-=2)*d*d*d-2)+h},easeInQuint:function(g,d,h,f,c){return f*(d/=c)*d*d*d*d+h},easeOutQuint:function(g,d,h,f,c){return f*((d=d/c-1)*d*d*d*d+1)+h},easeInOutQuint:function(g,d,h,f,c){if((d/=c/2)<1){return f/2*d*d*d*d*d+h}return f/2*((d-=2)*d*d*d*d+2)+h},easeInSine:function(g,d,h,f,c){return -f*Math.cos(d/c*(Math.PI/2))+f+h},easeOutSine:function(g,d,h,f,c){return f*Math.sin(d/c*(Math.PI/2))+h},easeInOutSine:function(g,d,h,f,c){return -f/2*(Math.cos(Math.PI*d/c)-1)+h},easeInExpo:function(g,d,h,f,c){return d==0?h:f*Math.pow(2,10*(d/c-1))+h},easeOutExpo:function(g,d,h,f,c){return d==c?h+f:f*(-Math.pow(2,-10*d/c)+1)+h},easeInOutExpo:function(g,d,h,f,c){if(d==0){return h}if(d==c){return h+f}if((d/=c/2)<1){return f/2*Math.pow(2,10*(d-1))+h}return f/2*(-Math.pow(2,-10*--d)+2)+h},easeInCirc:function(g,d,h,f,c){return -f*(Math.sqrt(1-(d/=c)*d)-1)+h},easeOutCirc:function(g,d,h,f,c){return f*Math.sqrt(1-(d=d/c-1)*d)+h},easeInOutCirc:function(g,d,h,f,c){if((d/=c/2)<1){return -f/2*(Math.sqrt(1-d*d)-1)+h}return f/2*(Math.sqrt(1-(d-=2)*d)+1)+h},easeInElastic:function(j,f,l,h,d){var g=1.70158;var k=0;var c=h;if(f==0){return l}if((f/=d)==1){return l+h}if(!k){k=d*0.3}if(c<Math.abs(h)){c=h;var g=k/4}else{var g=k/(2*Math.PI)*Math.asin(h/c)}return -(c*Math.pow(2,10*(f-=1))*Math.sin((f*d-g)*2*Math.PI/k))+l},easeOutElastic:function(j,f,l,h,d){var g=1.70158;var k=0;var c=h;if(f==0){return l}if((f/=d)==1){return l+h}if(!k){k=d*0.3}if(c<Math.abs(h)){c=h;var g=k/4}else{var g=k/(2*Math.PI)*Math.asin(h/c)}return c*Math.pow(2,-10*f)*Math.sin((f*d-g)*2*Math.PI/k)+h+l},easeInOutElastic:function(j,f,l,h,d){var g=1.70158;var k=0;var c=h;if(f==0){return l}if((f/=d/2)==2){return l+h}if(!k){k=d*0.3*1.5}if(c<Math.abs(h)){c=h;var g=k/4}else{var g=k/(2*Math.PI)*Math.asin(h/c)}if(f<1){return -0.5*c*Math.pow(2,10*(f-=1))*Math.sin((f*d-g)*2*Math.PI/k)+l}return c*Math.pow(2,-10*(f-=1))*Math.sin((f*d-g)*2*Math.PI/k)*0.5+h+l},easeInBack:function(h,d,j,g,c,f){if(f==undefined){f=1.70158}return g*(d/=c)*d*((f+1)*d-f)+j},easeOutBack:function(h,d,j,g,c,f){if(f==undefined){f=1.70158}return g*((d=d/c-1)*d*((f+1)*d+f)+1)+j},easeInOutBack:function(h,d,j,g,c,f){if(f==undefined){f=1.70158}if((d/=c/2)<1){return g/2*d*d*(((f*=1.525)+1)*d-f)+j}return g/2*((d-=2)*d*(((f*=1.525)+1)*d+f)+2)+j},easeInBounce:function(g,d,h,f,c){return f-jQuery.easing.easeOutBounce(g,c-d,0,f,c)+h},easeOutBounce:function(g,d,h,f,c){if((d/=c)<1/2.75){return f*7.5625*d*d+h}else{if(d<2/2.75){return f*(7.5625*(d-=1.5/2.75)*d+0.75)+h}else{if(d<2.5/2.75){return f*(7.5625*(d-=2.25/2.75)*d+0.9375)+h}else{return f*(7.5625*(d-=2.625/2.75)*d+0.984375)+h}}}},easeInOutBounce:function(g,d,h,f,c){if(d<c/2){return jQuery.easing.easeInBounce(g,d*2,0,f,c)*0.5+h}return jQuery.easing.easeOutBounce(g,d*2-c,0,f,c)*0.5+f*0.5+h}});b.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]};b.expr[":"].uncached=function(c){var d=document.createElement("img");d.src=c.src;return b(c).is('img[src!=""]')&&!d.complete};b.fn.waitForImages=function(c,e,d){if(b.isPlainObject(arguments[0])){e=c.each;d=c.waitForAll;c=c.finished}c=c||b.noop;e=e||b.noop;d=!!d;if(!b.isFunction(c)||!b.isFunction(e)){throw new TypeError("An invalid callback was supplied.")}return this.each(function(){var j=b(this),k=[];if(d){var n=b.waitForImages.hasImageProperties||[],h=/url\((['"]?)(.*?)\1\)/g;j.find("*").each(function(){var f=b(this);if(f.is("img:uncached")){k.push({src:f.attr("src"),element:f[0]})}b.each(n,function(p,q){var o=f.css(q);if(!o){return true}var l;while(l=h.exec(o)){k.push({src:l[2],element:f[0]})}})})}else{j.find("img:uncached").each(function(){k.push({src:this.src,element:this})})}var m=k.length,g=0;if(m==0){c.call(j[0])}b.each(k,function(i,f){var l=new Image;b(l).bind("load error",function(o){g++;
71e.call(f.element,g,m,o.type=="load");if(g==m){c.call(j[0]);return false}});l.src=f.src})})};b.fn.swipe=function(z){if(!this){return false}var F={fingers:1,threshold:75,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,click:null,triggerOnTouchEnd:true,allowPageScroll:"auto"};var B="left";var I="right";var A="up";var D="down";var q="none";var L="horizontal";var H="vertical";var N="auto";var J="start";var C="move";var M="end";var k="cancel";var G="ontouchstart" in window,K=G?"touchstart":"mousedown",e=G?"touchmove":"mousemove",O=G?"touchend":"mouseup",j="touchcancel";var x="start";if(z.allowPageScroll==undefined&&(z.swipe!=undefined||z.swipeStatus!=undefined)){z.allowPageScroll=q}if(z){b.extend(F,z)}return this.each(function(){function y(){var t=i();if(t<=45&&t>=0){return B}else{if(t<=360&&t>=315){return B}else{if(t>=135&&t<=225){return I}else{if(t>45&&t<135){return D}else{return A}}}}}function i(){var Q=u.x-f.x;var E=f.y-u.y;var R=Math.atan2(E,Q);var P=Math.round(R*180/Math.PI);if(P<0){P=360-Math.abs(P)}return P}function r(){return Math.round(Math.sqrt(Math.pow(f.x-u.x,2)+Math.pow(f.y-u.y,2)))}function h(Q,P){if(F.allowPageScroll==q){Q.preventDefault()}else{var E=F.allowPageScroll==N;switch(P){case B:if(F.swipeLeft&&E||!E&&F.allowPageScroll!=L){Q.preventDefault()}break;case I:if(F.swipeRight&&E||!E&&F.allowPageScroll!=L){Q.preventDefault()}break;case A:if(F.swipeUp&&E||!E&&F.allowPageScroll!=H){Q.preventDefault()}break;case D:if(F.swipeDown&&E||!E&&F.allowPageScroll!=H){Q.preventDefault()}break}}}function n(P,E){if(F.swipeStatus){F.swipeStatus.call(v,P,E,direction||null,distance||0)}if(E==k){if(F.click&&(l==1||!G)&&(isNaN(distance)||distance==0)){F.click.call(v,P,P.target)}}if(E==M){if(F.swipe){F.swipe.call(v,P,direction,distance)}switch(direction){case B:if(F.swipeLeft){F.swipeLeft.call(v,P,direction,distance)}break;case I:if(F.swipeRight){F.swipeRight.call(v,P,direction,distance)}break;case A:if(F.swipeUp){F.swipeUp.call(v,P,direction,distance)}break;case D:if(F.swipeDown){F.swipeDown.call(v,P,direction,distance)}break}}}function d(t){l=0;u.x=0;u.y=0;f.x=0;f.y=0;w.x=0;w.y=0}function p(t){t.preventDefault();distance=r();direction=y();if(F.triggerOnTouchEnd){x=M;if((l==F.fingers||!G)&&f.x!=0){if(distance>=F.threshold){n(t,x);d(t)}else{x=k;n(t,x);d(t)}}else{x=k;n(t,x);d(t)}}else{if(x==C){x=k;n(t,x);d(t)}}o.removeEventListener(e,g,false);o.removeEventListener(O,p,false)}function g(E){if(x==M||x==k){return}var t=G?E.touches[0]:E;f.x=t.pageX;f.y=t.pageY;direction=y();if(G){l=E.touches.length}x=C;h(E,direction);if(l==F.fingers||!G){distance=r();if(F.swipeStatus){n(E,x,direction,distance)}if(!F.triggerOnTouchEnd){if(distance>=F.threshold){x=M;n(E,x);d(E)}}}else{x=k;n(E,x);d(E)}}function m(P){var E=G?P.touches[0]:P;x=J;if(G){l=P.touches.length}distance=0;direction=null;if(l==F.fingers||!G){u.x=f.x=E.pageX;u.y=f.y=E.pageY;if(F.swipeStatus){n(P,x)}}else{d(P)}o.addEventListener(e,g,false);o.addEventListener(O,p,false)}var o=this;var v=b(this);var c=null;var l=0;var u={x:0,y:0};var f={x:0,y:0};var w={x:0,y:0};try{this.addEventListener(K,m,false);this.addEventListener(j,d)}catch(s){}})}})(jQuery);(function(d,g){var f=d.jQuery||d.Cowboy||(d.Cowboy={}),e;f.throttle=e=function(m,l,a,b){var c,n=0;if(typeof l!=="boolean"){b=a;a=l;l=g}function k(){var p=this,h=+new Date()-n,q=arguments;function i(){n=+new Date();a.apply(p,q)}function j(){c=g}if(b&&!c){i()}c&&clearTimeout(c);if(b===g&&h>m){i()}else{if(l!==true){c=setTimeout(b?j:i,b===g?m-h:m)}}}if(f.guid){k.guid=a.guid=a.guid||f.guid++}return k};f.debounce=function(c,b,a){return a===g?e(c,b,false):e(c,a,b!==false)}})(this);(function(){var b=0;var c=["ms","moz","webkit","o"];for(var a=0;a<c.length&&!window.requestAnimationFrame;++a){window.requestAnimationFrame=window[c[a]+"RequestAnimationFrame"];window.cancelAnimationFrame=window[c[a]+"CancelAnimationFrame"]||window[c[a]+"CancelRequestAnimationFrame"]}if(!window.requestAnimationFrame){window.requestAnimationFrame=function(h,e){var d=new Date().getTime();var f=Math.max(0,16-(d-b));var g=window.setTimeout(function(){h(d+f)},f);b=d+f;return g}}if(!window.cancelAnimationFrame){window.cancelAnimationFrame=function(d){clearTimeout(d)}}}());window.Modernizr=function(an,am,al){function H(b){ae.cssText=b}function Y(d,c){return H(ab.join(d+";")+(c||""))}function W(d,c){return typeof d===c}
71function U(d,c){return !!~(""+d).indexOf(c)}function S(f,c){for(var h in f){var g=f[h];if(!U(g,"-")&&ae[g]!==al){return c=="pfx"?g:!0}}return !1}function Q(g,c,j){for(var i in g){var h=c[g[i]];if(h!==al){return j===!1?g[i]:W(h,"function")?h.bind(j||c):h}}return !1}function O(g,f,j){var i=g.charAt(0).toUpperCase()+g.slice(1),h=(g+" "+Z.join(i+" ")+i).split(" ");return W(f,"string")||W(f,"undefined")?S(h,f):(h=(g+" "+X.join(i+" ")+i).split(" "),Q(h,f,j))}var ak="2.6.2",aj={},ai=!0,ah=am.documentElement,ag="modernizr",af=am.createElement(ag),ae=af.style,ad,ac={}.toString,ab=" -webkit- -moz- -o- -ms- ".split(" "),aa="Webkit Moz O ms",Z=aa.split(" "),X=aa.toLowerCase().split(" "),V={},T={},R={},P=[],N=P.slice,M,K=function(v,u,t,s){var r,q,p,o,h=am.createElement("div"),g=am.body,b=g||am.createElement("body");if(parseInt(t,10)){while(t--){p=am.createElement("div"),p.id=s?s[t]:ag+(t+1),h.appendChild(p)}}return r=["&#173;",'<style id="s',ag,'">',v,"</style>"].join(""),h.id=ag,(g?h:b).innerHTML+=r,b.appendChild(h),g||(b.style.background="",b.style.overflow="hidden",o=ah.style.overflow,ah.style.overflow="hidden",ah.appendChild(b)),q=u(h,v),g?h.parentNode.removeChild(h):(b.parentNode.removeChild(b),ah.style.overflow=o),!!q},J={}.hasOwnProperty,I;!W(J,"undefined")&&!W(J.call,"undefined")?I=function(d,c){return J.call(d,c)}:I=function(d,c){return c in d&&W(d.constructor.prototype[c],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(a){var h=this;if(typeof h!="function"){throw new TypeError}var g=N.call(arguments,1),f=function(){if(this instanceof f){var b=function(){};b.prototype=h.prototype;var d=new b,c=h.apply(d,g.concat(N.call(arguments)));return Object(c)===c?c:d}return h.apply(a,g.concat(N.call(arguments)))};return f}),V.csstransforms=function(){return !!O("transform")},V.csstransforms3d=function(){var b=!!O("perspective");return b&&"webkitPerspective" in ah.style&&K("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(a,d){b=a.offsetLeft===9&&a.offsetHeight===3}),b},V.csstransitions=function(){return O("transition")};for(var L in V){I(V,L)&&(M=L.toLowerCase(),aj[M]=V[L](),P.push((aj[M]?"":"no-")+M))}return aj.addTest=function(e,c){if(typeof e=="object"){for(var f in e){I(e,f)&&aj.addTest(f,e[f])}}else{e=e.toLowerCase();if(aj[e]!==al){return aj}c=typeof c=="function"?c():c,typeof ai!="undefined"&&ai&&(ah.className+=" "+(c?"":"no-")+e),aj[e]=c}return aj},H(""),af=ad=null,aj._version=ak,aj._prefixes=ab,aj._domPrefixes=X,aj._cssomPrefixes=Z,aj.testProp=function(b){return S([b])},aj.testAllProps=O,aj.testStyles=K,aj.prefixed=function(e,d,f){return d?O(e,d,f):O(e,"pfx")},ah.className=ah.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(ai?" js "+P.join(" "):""),aj}(this,this.document);(function(a,b){if(typeof define==="function"&&define.amd){define(b)}else{if(typeof exports==="object"){module.exports=b()}else{a.__customEventPolyfill=b()}}}(this,function(){function a(d,f){f=f||{bubbles:false,cancelable:false,detail:undefined};var b;try{b=document.createEvent("CustomEvent");b.initCustomEvent(d,f.bubbles,f.cancelable,f.detail)}catch(c){b=document.createEvent("Event");for(var e in f){b[e]=f[e]}b.initEvent(d,f.bubbles,f.cancelable)}return b}if(typeof window.CustomEvent!=="undefined"){a.prototype=window.CustomEvent.prototype}window.CustomEvent=a}));var Base=function(){};Base.extend=function(b,e){var f=Base.prototype.extend;Base._prototyping=true;var d=new this();f.call(d,b);d.base=function(){};delete Base._prototyping;var c=d.constructor;var a=d.constructor=function(){if(!Base._prototyping){if(this._constructing||this.constructor==a){this._constructing=true;c.apply(this,arguments);delete this._constructing}else{if(arguments[0]!==null){return(arguments[0].extend||f).call(arguments[0],d)}}}};a.ancestor=this;a.extend=this.extend;a.forEach=this.forEach;a.implement=this.implement;a.prototype=d;a.toString=this.toString;a.valueOf=function(g){return(g=="object")?a:c.valueOf()};f.call(a,e);if(typeof a.init=="function"){a.init()}return a};Base.prototype={extend:function(b,h){if(arguments.length>1){var e=this[b];if(e&&(typeof h=="function")&&(!e.valueOf||e.valueOf()!=h.valueOf())&&/\bbase\b/.test(h)){var a=h.valueOf();h=function(){var k=this.base||Base.prototype.base;this.base=e;var i=a.apply(this,arguments);this.base=k;return i};h.valueOf=function(i){return(i=="object")?h:a};h.toString=Base.toString}this[b]=h}else{if(b){var g=Base.prototype.extend;if(!Base._prototyping&&typeof this!="function"){g=this.extend||g}var d={toSource:null};var f=["constructor","toString","valueOf"];var c=Base._prototyping?0:1;while(j=f[c++]){if(b[j]!=d[j]){g.call(this,j,b[j])}}for(var j in b){if(!d[j]){g.call(this,j,b[j])}}}}return this}};Base=Base.extend({constructor:function(){this.extend(arguments[0])}}
71,{ancestor:Object,version:"1.1",forEach:function(a,d,c){for(var b in a){if(this.prototype[b]===undefined){d.call(c,a[b],b,a)}}},implement:function(){for(var a=0;a<arguments.length;a++){if(typeof arguments[a]=="function"){arguments[a](this.prototype)}else{this.prototype.extend(arguments[a])}}return this},toString:function(){return String(this.valueOf())}});var FlipClock;(function(a){FlipClock=function(c,d,b){if(d instanceof Object&&d instanceof Date===false){b=d;d=0}return new FlipClock.Factory(c,d,b)};FlipClock.Lang={};FlipClock.Base=Base.extend({buildDate:"2014-12-12",version:"0.7.7",constructor:function(b,c){if(typeof b!=="object"){b={}}if(typeof c!=="object"){c={}}this.setOptions(a.extend(true,{},b,c))},callback:function(d){if(typeof d==="function"){var c=[];for(var b=1;b<=arguments.length;b++){if(arguments[b]){c.push(arguments[b])}}d.apply(this,c)}},log:function(b){if(window.console&&console.log){console.log(b)}},getOption:function(b){if(this[b]){return this[b]}return false},getOptions:function(){return this},setOption:function(b,c){this[b]=c},setOptions:function(b){for(var c in b){if(typeof b[c]!=="undefined"){this.setOption(c,b[c])}}}})}(jQuery));(function(a){FlipClock.Face=FlipClock.Base.extend({autoStart:true,dividers:[],factory:false,lists:[],constructor:function(b,c){this.dividers=[];this.lists=[];this.base(c);this.factory=b},build:function(){if(this.autoStart){this.start()}},createDivider:function(c,e,f){if(typeof e=="boolean"||!e){f=e;e=c}var g=['<span class="flex-1 justify-center center-vertically '+this.factory.classes.dot+' top" style="font-size: '+this.factory.size/2+"px; color: "+(this.factory.bgColor==="transparent"?this.factory.color:this.factory.bgColor)+';">&bull;</span>','<span class="flex-1 justify-center center-vertically '+this.factory.classes.dot+' bottom" style="font-size: '+this.factory.size/2+"px; color: "+(this.factory.bgColor==="transparent"?this.factory.color:this.factory.bgColor)+';">&bull;</span>'].join("");if(f){g=""}c=this.factory.localize(c);var d=['<span class="'+this.factory.classes.divider+" "+(e?e:"").toLowerCase()+' flex flex-col" style="height: '+(this.factory.size+10)+'px;">','<span class="'+this.factory.classes.label+'" style="font-size: '+this.factory.labelSize+"px; color: "+this.factory.labelColor+'">'+(c?c:"")+"</span>",g,"</span>"];var b=a(d.join(""));this.dividers.push(b);return b},createList:function(d,b){if(typeof d==="object"){b=d;d=0}var c=new FlipClock.List(this.factory,d,b);this.lists.push(c);return c},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0,{minimumDigits:this.factory.minimumDigits});this.flip(this.factory.original,false)},appendDigitToClock:function(b){b.$el.append(false)},addDigit:function(c){var b=this.createList(c,{classes:{active:this.factory.classes.active,before:this.factory.classes.before,flip:this.factory.classes.flip}});this.appendDigitToClock(b)},start:function(){},stop:function(){},autoIncrement:function(){if(!this.factory.countdown){this.increment()}else{this.decrement()}},increment:function(){this.factory.time.addSecond()},decrement:function(){if(this.factory.time.getTimeSeconds()==0){this.factory.stop()}else{this.factory.time.subSecond()}},flip:function(d,c){var b=this;a.each(d,function(e,g){var f=b.lists[e];if(f){if(!c&&g!=f.digit){f.play()}f.select(g)}
71else{b.addDigit(g)}})}})}(jQuery));(function(a){FlipClock.Factory=FlipClock.Base.extend({animationRate:1000,autoStart:true,callbacks:{destroy:false,create:false,init:false,interval:false,start:false,stop:false,reset:false},color:"#ffffff",bgColor:"#333333",labelColor:"#333333",labelSize:14,size:70,classes:{active:"flip-clock-active",before:"flip-clock-before",divider:"flip-clock-divider",dot:"flip-clock-dot",label:"flip-clock-label",flip:"flip",play:"play",wrapper:"flip-clock-wrapper"},clockFace:"HourlyCounter",countdown:false,defaultClockFace:"HourlyCounter",defaultLanguage:"english",$el:false,face:true,lang:false,language:"english",minimumDigits:0,original:false,running:false,time:false,timer:false,$wrapper:false,constructor:function(c,d,b){if(!b){b={}}this.lists=[];this.running=false;this.base(b);this.$el=a(c).addClass(this.classes.wrapper);this.$wrapper=this.$el;this.original=(d instanceof Date)?d:(d?Math.round(d):0);this.time=new FlipClock.Time(this,this.original,{minimumDigits:this.minimumDigits,animationRate:this.animationRate});this.timer=new FlipClock.Timer(this,b);this.loadLanguage(this.language);this.loadClockFace(this.clockFace,b);if(this.autoStart){this.start()}},loadClockFace:function(d,c){var e,f="Face",b=false;d=d.ucfirst()+f;if(this.face.stop){this.stop();b=true}this.$el.html("");this.time.minimumDigits=this.minimumDigits;if(FlipClock[d]){e=new FlipClock[d](this,c)}else{e=new FlipClock[this.defaultClockFace+f](this,c)}e.build();this.face=e;if(b){this.start()}return this.face},loadLanguage:function(b){var c;if(FlipClock.Lang[b.ucfirst()]){c=FlipClock.Lang[b.ucfirst()]}else{if(FlipClock.Lang[b]){c=FlipClock.Lang[b]}else{c=FlipClock.Lang[this.defaultLanguage]}}return this.lang=c},localize:function(b,d){var e=this.lang;if(!b){return null}var c=b.toLowerCase();if(typeof d=="object"){e=d}if(e&&e[c]){return e[c]}return b},start:function(c){var b=this;if(!b.running&&(!b.countdown||b.countdown&&b.time.time>0)){b.face.start(b.time);b.timer.start(function(){b.flip();if(typeof c==="function"){c()}})}else{b.log("Trying to start timer when countdown already at 0")}},stop:function(c){this.face.stop();this.timer.stop(c);for(var b in this.lists){if(this.lists.hasOwnProperty(b)){this.lists[b].stop()}}},reset:function(b){this.timer.reset(b);this.face.reset()},setTime:function(b){this.time.time=b;this.flip(true)},getTime:function(b){return this.time},setCountdown:function(c){var b=this.running;this.countdown=c?true:false;if(b){this.stop();this.start()}},flip:function(b){this.face.flip(false,b)}})}(jQuery));(function(a){FlipClock.List=FlipClock.Base.extend({digit:0,classes:{active:"flip-clock-active",before:"flip-clock-before",flip:"flip"},factory:false,$el:false,$obj:false,items:[],lastDigit:0,constructor:function(b,d,c){this.factory=b;this.digit=d;this.lastDigit=d;
71this.$el=this.createList();this.$obj=this.$el;if(d>0){this.select(d)}this.factory.$el.append(this.$el)},select:function(c){if(typeof c==="undefined"){c=this.digit}else{this.digit=c}if(this.digit!=this.lastDigit){var b=this.$el.find("."+this.classes.before).removeClass(this.classes.before);this.$el.find("."+this.classes.active).removeClass(this.classes.active).addClass(this.classes.before);this.appendListItem(this.classes.active,this.digit);b.remove();this.lastDigit=this.digit}},play:function(){this.$el.addClass(this.factory.classes.play)},stop:function(){var b=this;setTimeout(function(){b.$el.removeClass(b.factory.classes.play)},this.factory.timer.interval)},createListItem:function(c,d){var b=this.factory.size<40?"border-radius: 3px;":"";return['<li class="'+(c?c:"")+'" style="line-height: '+(this.factory.size+10)+'px;">','<a href="javascript: void(0);">','<div class="up">','<div class="shadow"></div>','<div class="inn" style="color: '+this.factory.color+"; background-color: "+this.factory.bgColor+"; font-size: "+this.factory.size+"px; "+b+'">'+(d?d:"")+"</div>","</div>",'<div class="down">','<div class="shadow"></div>','<div class="inn" style="color: '+this.factory.color+"; background-color: "+this.factory.bgColor+"; font-size: "+this.factory.size+"px;"+b+'">'+(d?d:"")+"</div>","</div>","</a>","</li>"].join("")},appendListItem:function(c,d){var b=this.createListItem(c,d);this.$el.append(b)},createList:function(){var c=this.getPrevDigit()?this.getPrevDigit():this.digit;var b=a(['<ul class="'+this.classes.flip+" "+(this.factory.running?this.factory.classes.play:"")+'" style="width: '+this.factory.size*0.8+"px; height: "+(this.factory.size+10)+'px;">',this.createListItem(this.classes.before,c),this.createListItem(this.classes.active,this.digit),"</ul>"].join(""));return b},getNextDigit:function(){return this.digit==9?0:this.digit+1},getPrevDigit:function(){return this.digit==0?9:this.digit-1}})}(jQuery));(function(a){String.prototype.ucfirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1)};a.fn.FlipClock=function(c,b){return new FlipClock(a(this),c,b)};a.fn.flipClock=function(c,b){return a.fn.FlipClock(c,b)}}(jQuery));(function(a){FlipClock.Time=FlipClock.Base.extend({time:0,factory:false,minimumDigits:0,constructor:function(b,d,c){if(typeof c!="object"){c={}}if(!c.minimumDigits){c.minimumDigits=b.minimumDigits}this.base(c);this.factory=b;if(d){this.time=d}},convertDigitsToArray:function(d){var c=[];d=d.toString();for(var b=0;b<d.length;b++){if(d[b].match(/^\d*$/g)){c.push(d[b])}}return c},digit:function(b){var d=this.toString();var c=d.length;if(d[c-b]){return d[c-b]}return false},digitize:function(d){var c=[];a.each(d,function(f,g){g=g.toString();if(g.length==1){g="0"+g}for(var e=0;e<g.length;e++){c.push(g.charAt(e))}});if(c.length>this.minimumDigits){this.minimumDigits=c.length}if(this.minimumDigits>c.length){for(var b=c.length;b<this.minimumDigits;b++){c.unshift("0")}}return c},getDateObject:function(){if(this.time instanceof Date){return this.time}return new Date((new Date()).getTime()+this.getTimeSeconds()*1000)},getDayCounter:function(b){var c=[this.getDays(),this.getHours(true),this.getMinutes(true)];if(b){c.push(this.getSeconds(true))}return this.digitize(c)},getDays:function(b){var c=this.getTimeSeconds()/60/60/24;if(b){c=c%7}return Math.floor(c)},getHourCounter:function(){var b=this.digitize([this.getHours(),this.getMinutes(true),this.getSeconds(true)]);return b},getHourly:function(){return this.getHourCounter()},getHours:function(c){var b=this.getTimeSeconds()/60/60;if(c){b=b%24}return Math.floor(b)},getMilitaryTime:function(c,b){if(typeof b==="undefined"){b=true}if(!c){c=this.getDateObject()}var d=[c.getHours(),c.getMinutes()];if(b===true){d.push(c.getSeconds())}return this.digitize(d)},getMinutes:function(c){var b=this.getTimeSeconds()/60;if(c){b=b%60}return Math.floor(b)},getMinuteCounter:function(){var b=this.digitize([this.getMinutes(),this.getSeconds(true)]);return b},getTimeSeconds:function(b){if(!b){b=new Date()}if(this.time instanceof Date){if(this.factory.countdown){return Math.max(this.time.getTime()/1000-b.getTime()/1000,0)}else{return b.getTime()/1000-this.time.getTime()/1000}}else{return this.time}},getTime:function(d,c){if(typeof c==="undefined"){c=true}if(!d){d=this.getDateObject()}console.log(d);var b=d.getHours();var e=b>12?"PM":"AM";var f=[b>12?b-12:(b===0?12:b),d.getMinutes()];if(c===true){f.push(d.getSeconds())}return this.digitize(f)},getSeconds:function(b){var c=this.getTimeSeconds();if(b){if(c==60){c=0}else{c=c%60}}return Math.ceil(c)},getWeeks:function(b){var c=this.getTimeSeconds()/60/60/24/7;if(b){c=c%52}return Math.floor(c)},removeLeadingZeros:function(c,e){var d=0;var b=[];a.each(e,function(f,g){if(f<c){d+=parseInt(e[f],10)}
71else{b.push(e[f])}});if(d===0){return b}return e},addSeconds:function(b){if(this.time instanceof Date){this.time.setSeconds(this.time.getSeconds()+b)}else{this.time+=b}},addSecond:function(){this.addSeconds(1)},subSeconds:function(b){if(this.time instanceof Date){this.time.setSeconds(this.time.getSeconds()-b)}else{this.time-=b}},subSecond:function(){this.subSeconds(1)},toString:function(){return this.getTimeSeconds().toString()}})}(jQuery));(function(a){FlipClock.Timer=FlipClock.Base.extend({callbacks:{destroy:false,create:false,init:false,interval:false,start:false,stop:false,reset:false},count:0,factory:false,interval:1000,animationRate:1000,constructor:function(b,c){this.base(c);this.factory=b;this.callback(this.callbacks.init);this.callback(this.callbacks.create)},getElapsed:function(){return this.count*this.interval},getElapsedTime:function(){return new Date(this.time+this.getElapsed())},reset:function(b){clearInterval(this.timer);this.count=0;this._setInterval(b);this.callback(this.callbacks.reset)},start:function(b){this.factory.running=true;this._createTimer(b);this.callback(this.callbacks.start)},stop:function(b){this.factory.running=false;this._clearInterval(b);this.callback(this.callbacks.stop);this.callback(b)},_clearInterval:function(){clearInterval(this.timer)},_createTimer:function(b){this._setInterval(b)}
71,_destroyTimer:function(b){this._clearInterval();this.timer=false;this.callback(b);this.callback(this.callbacks.destroy)},_interval:function(b){this.callback(this.callbacks.interval);this.callback(b);this.count++},_setInterval:function(c){var b=this;b._interval(c);b.timer=setInterval(function(){b._interval(c)},this.interval)}})}(jQuery));(function(a){FlipClock.TwentyFourHourClockFace=FlipClock.Face.extend({constructor:function(b,c){this.base(b,c)},build:function(d){var c=this;var b=this.factory.$el.find("ul");if(!this.factory.time.time){this.factory.original=new Date();this.factory.time=new FlipClock.Time(this.factory,this.factory.original)}var d=d?d:this.factory.time.getMilitaryTime(false,this.showSeconds);if(d.length>b.length){a.each(d,function(e,f){c.createList(f)})}this.createDivider();this.createDivider();a(this.dividers[0]).insertBefore(this.lists[this.lists.length-2].$el);a(this.dividers[1]).insertBefore(this.lists[this.lists.length-4].$el);this.base()},flip:function(c,b){this.autoIncrement();c=c?c:this.factory.time.getMilitaryTime(false,this.showSeconds);this.base(c,b)}})}(jQuery));(function(a){FlipClock.CounterFace=FlipClock.Face.extend({shouldAutoIncrement:false,constructor:function(b,c){if(typeof c!="object"){c={}}b.autoStart=c.autoStart?true:false;if(c.autoStart){this.shouldAutoIncrement=true}b.increment=function(){b.countdown=false;b.setTime(b.getTime().getTimeSeconds()+1)};b.decrement=function(){b.countdown=true;var d=b.getTime().getTimeSeconds();if(d>0){b.setTime(d-1)}};b.setValue=function(d){b.setTime(d)};b.setCounter=function(d){b.setTime(d)};this.base(b,c)},build:function(){var c=this;var b=this.factory.$el.find("ul");var d=this.factory.getTime().digitize([this.factory.getTime().time]);if(d.length>b.length){a.each(d,function(e,g){var f=c.createList(g);f.select(g)})}a.each(this.lists,function(e,f){f.play()});this.base()},flip:function(c,b){if(this.shouldAutoIncrement){this.autoIncrement()}if(!c){c=this.factory.getTime().digitize([this.factory.getTime().time])}this.base(c,b)},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0);this.flip()}})}(jQuery));(function(a){FlipClock.DailyCounterFace=FlipClock.Face.extend({showSeconds:true,constructor:function(b,c){this.base(b,c)},build:function(e){var d=this;var c=this.factory.$el.find("ul");var f=0;e=e?e:this.factory.time.getDayCounter(this.showSeconds);if(e.length>c.length){a.each(e,function(g,h){d.createList(h)})}var b=function(k,l,h){var j=k.find(".flip-clock-label").detach();k.insertBefore(l);var i=a('<div class="flip-part f-left flex flex-col"></div>');var m=a('<div class="digit-part flex-1"></div>');var g=a('<div class="label-part flex-1"></div>');i.insertBefore(l);m.append(l);m.append(h);g.append(j);i.append(m);i.append(g)};if(this.showSeconds){b(a(this.createDivider("Seconds")),this.lists[this.lists.length-2].$el,this.lists[this.lists.length-1].$el)}else{f=2}b(a(this.createDivider("Minutes")),this.lists[this.lists.length-4+f].$el,this.lists[this.lists.length-4+f+1].$el);b(a(this.createDivider("Hours")),this.lists[this.lists.length-6+f].$el,this.lists[this.lists.length-6+f+1].$el);b(a(this.createDivider("Days",true)),this.lists[0].$el,this.lists[1].$el);this.base()},flip:function(c,b){if(!c){c=this.factory.time.getDayCounter(this.showSeconds)}this.autoIncrement();this.base(c,b)}})}(jQuery));(function(a){FlipClock.HourlyCounterFace=FlipClock.Face.extend({constructor:function(b,c){this.base(b,c)},build:function(d,h){var f=this;var e=this.factory.$el.find("ul");h=h?h:this.factory.time.getHourCounter();if(h.length>e.length){a.each(h,function(j,k){f.createList(k)})}var c=function(m,n){var l=m.find(".flip-clock-label").detach();m.insertBefore(n[0]);var k=a('<div class="flip-part f-left flex flex-col"></div>');var o=a('<div class="digit-part flex-1"></div>');var j=a('<div class="label-part flex-1"></div>');k.insertBefore(n[0]);for(var i=0;i<n.length;++i){o.append(n[i])}j.append(l);k.append(o);k.append(j)};c(a(this.createDivider("Seconds")),[this.lists[this.lists.length-2].$el,this.lists[this.lists.length-1].$el]);c(a(this.createDivider("Minutes")),[this.lists[this.lists.length-4].$el,this.lists[this.lists.length-3].$el]);if(!d){var g=[];for(var b=0;b<this.lists.length-4;++b){g.push(this.lists[b].$el)}c(a(this.createDivider("Hours",true)),g)}this.base()},flip:function(c,b){if(!c){c=this.factory.time.getHourCounter()}this.autoIncrement();this.base(c,b)},appendDigitToClock:function(b){this.base(b);this.dividers[0].insertAfter(this.dividers[0].next())}})}(jQuery));
71(function(a){FlipClock.MinuteCounterFace=FlipClock.HourlyCounterFace.extend({clearExcessDigits:false,constructor:function(b,c){this.base(b,c)},build:function(){this.base(true,this.factory.time.getMinuteCounter())},flip:function(c,b){if(!c){c=this.factory.time.getMinuteCounter()}this.base(c,b)}})}(jQuery));(function(a){FlipClock.TwelveHourClockFace=FlipClock.TwentyFourHourClockFace.extend({meridium:false,meridiumText:"AM",build:function(){var b=this;var c=this.factory.time.getTime(false,this.showSeconds);this.base(c);this.meridiumText=this.getMeridium();this.meridium=a(['<ul class="flip-clock-meridium">',"<li>",'<a href="#">'+this.meridiumText+"</a>","</li>","</ul>"].join(""));this.meridium.insertAfter(this.lists[this.lists.length-1].$el)},flip:function(c,b){if(this.meridiumText!=this.getMeridium()){this.meridiumText=this.getMeridium();this.meridium.find("a").html(this.meridiumText)}this.base(this.factory.time.getTime(false,this.showSeconds),b)},getMeridium:function(){return new Date().getHours()>=12?"PM":"AM"},isPM:function(){return this.getMeridium()=="PM"?true:false},isAM:function(){return this.getMeridium()=="AM"?true:false}})}(jQuery));(function(a){FlipClock.Lang.Arabic={years:"سنوات",months:"شهور",days:"أيام",hours:"ساعات",minutes:"دقائق",seconds:"ثواني"};FlipClock.Lang.ar=FlipClock.Lang.Arabic;FlipClock.Lang["ar-ar"]=FlipClock.Lang.Arabic;FlipClock.Lang.arabic=FlipClock.Lang.Arabic}(jQuery));(function(a){FlipClock.Lang.Danish={years:"År",months:"Måneder",days:"Dage",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"};FlipClock.Lang.da=FlipClock.Lang.Danish;FlipClock.Lang["da-dk"]=FlipClock.Lang.Danish;FlipClock.Lang.danish=FlipClock.Lang.Danish}(jQuery));(function(a){FlipClock.Lang.German={years:"Jahre",months:"Monate",days:"Tage",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden"};FlipClock.Lang.de=FlipClock.Lang.German;FlipClock.Lang["de-de"]=FlipClock.Lang.German;FlipClock.Lang.german=FlipClock.Lang.German}(jQuery));(function(a){FlipClock.Lang.English={years:"Years",months:"Months",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"};FlipClock.Lang.en=FlipClock.Lang.English;FlipClock.Lang["en-us"]=FlipClock.Lang.English;FlipClock.Lang.english=FlipClock.Lang.English}(jQuery));(function(a){FlipClock.Lang.Spanish={years:"Años",months:"Meses",days:"Días",hours:"Horas",minutes:"Minutos",seconds:"Segundos"};FlipClock.Lang.es=FlipClock.Lang.Spanish;FlipClock.Lang["es-es"]=FlipClock.Lang.Spanish;FlipClock.Lang.spanish=FlipClock.Lang.Spanish}(jQuery));(function(a){FlipClock.Lang.Finnish={years:"Vuotta",months:"Kuukautta",days:"Päivää",hours:"Tuntia",minutes:"Minuuttia",seconds:"Sekuntia"};FlipClock.Lang.fi=FlipClock.Lang.Finnish;FlipClock.Lang["fi-fi"]=FlipClock.Lang.Finnish;FlipClock.Lang.finnish=FlipClock.Lang.Finnish}(jQuery));(function(a){FlipClock.Lang.French={years:"Ans",months:"Mois",days:"Jours",hours:"Heures",minutes:"Minutes",seconds:"Secondes"};FlipClock.Lang.fr=FlipClock.Lang.French;FlipClock.Lang["fr-ca"]=FlipClock.Lang.French;FlipClock.Lang.french=FlipClock.Lang.French}(jQuery));(function(a){FlipClock.Lang.Italian={years:"Anni",months:"Mesi",days:"Giorni",hours:"Ore",minutes:"Minuti",seconds:"Secondi"};FlipClock.Lang.it=FlipClock.Lang.Italian;FlipClock.Lang["it-it"]=FlipClock.Lang.Italian;FlipClock.Lang.italian=FlipClock.Lang.Italian}(jQuery));(function(a){FlipClock.Lang.Latvian={years:"Gadi",months:"Mēneši",days:"Dienas",hours:"Stundas",minutes:"Minūtes",seconds:"Sekundes"};FlipClock.Lang.lv=FlipClock.Lang.Latvian;FlipClock.Lang["lv-lv"]=FlipClock.Lang.Latvian;FlipClock.Lang.latvian=FlipClock.Lang.Latvian}(jQuery));(function(a){FlipClock.Lang.Dutch={years:"Jaren",months:"Maanden",days:"Dagen",hours:"Uren",minutes:"Minuten",seconds:"Seconden"};FlipClock.Lang.nl=FlipClock.Lang.Dutch;FlipClock.Lang["nl-be"]=FlipClock.Lang.Dutch;FlipClock.Lang.dutch=FlipClock.Lang.Dutch}(jQuery));(function(a){FlipClock.Lang.Norwegian={years:"År",months:"Måneder",days:"Dager",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"};FlipClock.Lang.no=FlipClock.Lang.Norwegian;
71FlipClock.Lang.nb=FlipClock.Lang.Norwegian;FlipClock.Lang["no-nb"]=FlipClock.Lang.Norwegian;FlipClock.Lang.norwegian=FlipClock.Lang.Norwegian}(jQuery));(function(a){FlipClock.Lang.Portuguese={years:"Anos",months:"Meses",days:"Dias",hours:"Horas",minutes:"Minutos",seconds:"Segundos"};FlipClock.Lang.pt=FlipClock.Lang.Portuguese;FlipClock.Lang["pt-br"]=FlipClock.Lang.Portuguese;FlipClock.Lang.portuguese=FlipClock.Lang.Portuguese}(jQuery));(function(a){FlipClock.Lang.Russian={years:"лет",months:"месяцев",days:"дней",hours:"часов",minutes:"минут",seconds:"секунд"};FlipClock.Lang.ru=FlipClock.Lang.Russian;FlipClock.Lang["ru-ru"]=FlipClock.Lang.Russian;FlipClock.Lang.russian=FlipClock.Lang.Russian}(jQuery));(function(a){FlipClock.Lang.Swedish={years:"År",months:"Månader",days:"Dagar",hours:"Timmar",minutes:"Minuter",seconds:"Sekunder"};FlipClock.Lang.sv=FlipClock.Lang.Swedish;FlipClock.Lang["sv-se"]=FlipClock.Lang.Swedish;FlipClock.Lang.swedish=FlipClock.Lang.Swedish}(jQuery));(function(a){FlipClock.Lang.Chinese={years:"年",months:"月",days:"日",hours:"时",minutes:"分",seconds:"秒"};FlipClock.Lang.zh=FlipClock.Lang.Chinese;FlipClock.Lang["zh-cn"]=FlipClock.Lang.Chinese;FlipClock.Lang.chinese=FlipClock.Lang.Chinese}(jQuery));!function(q){function h(){c=function(a){return p+"-"+a},k=function(a){return p+"-"+a},m=function(a){return a+"."+p},q.each([c,k,m],function(d,a){a.add=function(i){i=i.split(" ");for(var l in i){a[i[l]]=a(i[l])}}}),c.add("touch desktop scale-1 scale-2 scale-3 wrapper opened opening fixed inline hover slider slide loading noanimation fastanimation"),k.add("slide anchor"),m.add("open opening close closing prev next slideTo sliding click pinch scroll resize orientationchange load loading loaded transitionend webkitTransitionEnd"),b={complObject:function(a,d){return q.isPlainObject(a)||(a=d),a},complBoolean:function(d,a){return"boolean"!=typeof d&&(d=a),d},complNumber:function(a,d){return q.isNumeric(a)||(a=d),a},complString:function(d,a){return"string"!=typeof d&&(d=a),d},isPercentage:function(a){return"string"==typeof a&&"%"==a.slice(-1)},getPercentage:function(a){return parseInt(a.slice(0,-1))},resizeRatio:function(r,l,u,a,x){var w=l.width(),v=l.height();u&&w>u&&(w=u),a&&v>a&&(v=a),x>w/v?v=w/x:w=v*x,r.width(w).height(v)},transitionend:function(l,d,o){var a=!1,r=function(){a||d.call(l[0]),a=!0};l.one(m.transitionend,r),l.one(m.webkitTransitionEnd,r),setTimeout(r,1.1*o)},setViewportScale:function(){if(g.viewportScale){var a=g.viewportScale.getScale();"undefined"!=typeof a&&(a=1/a,g.$body.removeClass(c["scale-1"]).removeClass(c["scale-2"]).removeClass(c["scale-3"]).addClass(c["scale-"+Math.max(Math.min(Math.round(a),3),1)]))}}},g={$wndw:q(window),$html:q("html"),$body:q("body"),scrollPosition:0,viewportScale:null,viewportScaleInterval:null},g.$body.addClass(q[j].support.touch?c.touch:c.desktop),g.$wndw.on(m.scroll,function(a){g.$body.hasClass(c.opened)&&(window.scrollTo(0,g.scrollPosition),a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation())}),!g.viewportScale&&q[j].support.touch&&"undefined"!=typeof FlameViewportScale&&(g.viewportScale=new FlameViewportScale,b.setViewportScale(),g.$wndw.on(m.orientationchange+" "+m.resize,function(){g.viewportScaleInterval&&(clearTimeout(g.viewportScaleInterval),g.viewportScaleInterval=null),g.viewportScaleInterval=setTimeout(function(){b.setViewportScale()},500)})),q[j]._c=c,q[j]._d=k,q[j]._e=m,q[j]._f=b,q[j]._g=g}var j="tosrus",p="tos",f="2.4.2";if(!q[j]){var c={},k={},m={},b={},g={};q[j]=function(d,a,l){return this.$node=d,this.opts=a,this.conf=l,this.vars={},this.nodes={},this.slides={},this._init(),this},q[j].prototype={_init:function(){var d=this;this._complementOptions(),this.vars.fixed="window"==this.opts.wrapper.target,this.nodes.$wrpr=q('<div class="'+c.wrapper+'" />'),this.nodes.$sldr=q('<div class="'+c.slider+'" />').appendTo(this.nodes.$wrpr),this.nodes.$wrpr.addClass(this.vars.fixed?c.fixed:c.inline).addClass(c("fx-"+this.opts.effect)).addClass(c(this.opts.slides.scale)).addClass(this.opts.wrapper.classes),this.nodes.$wrpr.on(m.open+" "+m.close+" "+m.prev+" "+m.next+" "+m.slideTo,function(i){arguments=Array.prototype.slice.call(arguments);var i=arguments.shift(),l=i.type;i.stopPropagation(),"function"==typeof d[l]&&d[l].apply(d,arguments)}).on(m.opening+" "+m.closing+" "+m.sliding+" "+m.loading+" "+m.loaded,function(i){i.stopPropagation()}).on(m.click,function(i){switch(i.stopPropagation(),d.opts.wrapper.onClick){case"toggleUI":d.nodes.$wrpr.toggleClass(c.hover);break;
71case"close":q(i.target).is("img")||d.close()}}),this.nodes.$anchors=this._initAnchors(),this.nodes.$slides=this._initSlides(),this.slides.total=this.nodes.$slides.length,this.slides.visible=this.opts.slides.visible,this.slides.index=0,this.vars.opened=!0;for(var a=0;a<q[j].addons.length;a++){q.isFunction(this["_addon_"+q[j].addons[a]])&&this["_addon_"+q[j].addons[a]]()}for(var e=0;e<q[j].ui.length;e++){this.nodes.$wrpr.find("."+c[q[j].ui[e]]).length&&this.nodes.$wrpr.addClass(c("has-"+q[j].ui[e]))}"close"==this.opts.wrapper.onClick&&(this.nodes.$uibg||q().add(this.nodes.$capt||q()).add(this.nodes.$pagr||q()).on(m.click,function(i){i.stopPropagation()})),this.vars.fixed?(this.nodes.$wrpr.appendTo(g.$body),this.close(!0)):(this.nodes.$wrpr.appendTo(this.opts.wrapper.target),this.opts.show?(this.vars.opened=!1,this.open(0,!0)):this.close(!0))},open:function(d,l){var a=this;this.vars.opened||(this.vars.fixed&&(g.scrollPosition=g.$wndw.scrollTop(),g.$body.addClass(c.opened),b.setViewportScale()),l?this.nodes.$wrpr.addClass(c.opening).trigger(m.opening,[d,l]):setTimeout(function(){a.nodes.$wrpr.addClass(c.opening).trigger(m.opening,[d,l])},5),this.nodes.$wrpr.addClass(c.hover).addClass(c.opened)),this.vars.opened=!0,this._loadContents(),q.isNumeric(d)&&(l=l||!this.vars.opened,this.slideTo(d,l))},close:function(a){this.vars.opened&&(this.vars.fixed&&g.$body.removeClass(c.opened),a?this.nodes.$wrpr.removeClass(c.opened):b.transitionend(this.nodes.$wrpr,function(){q(this).removeClass(c.opened)},this.conf.transitionDuration),this.nodes.$wrpr.removeClass(c.hover).removeClass(c.opening).trigger(m.closing,[this.slides.index,a])),this.vars.opened=!1},prev:function(a,d){q.isNumeric(a)||(a=this.opts.slides.slide),this.slideTo(this.slides.index-a,d)},next:function(a,d){q.isNumeric(a)||(a=this.opts.slides.slide),this.slideTo(this.slides.index+a,d)},slideTo:function(o,e){if(!this.vars.opened){return !1}if(!q.isNumeric(o)){return !1}var v=!0;if(0>o){var s=0==this.slides.index;this.opts.infinite?o=s?this.slides.total-this.slides.visible:0:(o=0,s&&(v=!1))}if(o+this.slides.visible>this.slides.total){var a=this.slides.index+this.slides.visible>=this.slides.total;this.opts.infinite?o=a?0:this.slides.total-this.slides.visible:(o=this.slides.total-this.slides.visible,a&&(v=!1))}if(this.slides.index=o,this._loadContents(),v){var r=0-this.slides.index*this.opts.slides.width+this.opts.slides.offset;this.slides.widthPercentage&&(r+="%"),e&&(this.nodes.$sldr.addClass(c.noanimation),b.transitionend(this.nodes.$sldr,function(){q(this).removeClass(c.noanimation)},5));for(var u in q[j].effects){if(u==this.opts.effect){q[j].effects[u].call(this,r,e);break}}this.nodes.$wrpr.trigger(m.sliding,[o,e])}},_initAnchors:function(){var d=this,a=q();if(this.$node.is("a")){for(var e in q[j].media){a=a.add(this.$node.filter(function(){if(d.opts.media[e]&&d.opts.media[e].filterAnchors){var i=d.opts.media[e].filterAnchors.call(d,q(this));if("boolean"==typeof i){return i}}return q[j].media[e].filterAnchors.call(d,q(this))}))}}return a},_initSlides:function(){return this[this.$node.is("a")?"_initSlidesFromAnchors":"_initSlidesFromContent"](),this.nodes.$sldr.children().css("width",this.opts.slides.width+(this.slides.widthPercentage?"%":"px"))},_initSlidesFromAnchors:function(){var a=this;this.nodes.$anchors.each(function(i){var d=q(this),l=q('<div class="'+c.slide+" "+c.loading+'" />').data(k.anchor,d).appendTo(a.nodes.$sldr);d.data(k.slide,l).on(m.click,function(e){e.preventDefault(),a.open(i)})})},_initSlidesFromContent:function(){var a=this;this.$node.children().each(function(){var e=q(this);q('<div class="'+c.slide+'" />').append(e).appendTo(a.nodes.$sldr);for(var l in q[j].media){var i=null;if(a.opts.media[l]&&a.opts.media[l].filterSlides&&(i=a.opts.media[l].filterSlides.call(a,e)),"boolean"!=typeof i&&(i=q[j].media[l].filterSlides.call(a,e)),i){q[j].media[l].initSlides.call(a,e),e.parent().addClass(c(l));break}}})},_loadContents:function(){var a=this;switch(this.opts.slides.load){case"all":this._loadContent(0,this.slides.total);break;case"visible":this._loadContent(this.slides.index,this.slides.index+this.slides.visible);break;case"near-visible":default:this._loadContent(this.slides.index,this.slides.index+this.slides.visible),setTimeout(function(){a._loadContent(a.slides.index-a.slides.visible,a.slides.index),a._loadContent(a.slides.index+a.slides.visible,a.slides.index+2*a.slides.visible)},this.conf.transitionDuration)}},_loadContent:function(d,a){var e=this;this.nodes.$slides.slice(d,a).each(function(){var s=q(this);
71if(0==s.children().length){var o=s.data(k.anchor),v=o.attr("href");for(var n in q[j].media){var u=null;if(e.opts.media[n]&&e.opts.media[n].filterAnchors&&(u=e.opts.media[n].filterAnchors.call(e,o)),"boolean"!=typeof u&&(u=q[j].media[n].filterAnchors.call(e,o)),u){q[j].media[n].initAnchors.call(e,s,v),s.addClass(c(n));break}}s.trigger(m.loading,[s.data(k.anchor)])}})},_complementOptions:function(){if("undefined"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=this.$node.is("a")?"window":this.$node),"window"!=this.opts.wrapper.target&&"string"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=q(this.opts.wrapper.target)),this.opts.show=b.complBoolean(this.opts.show,"window"!=this.opts.wrapper.target),q.isNumeric(this.opts.slides.width)){this.slides.widthPercentage=!1,this.opts.slides.visible=b.complNumber(this.opts.slides.visible,1)}else{var a=b.isPercentage(this.opts.slides.width)?b.getPercentage(this.opts.slides.width):!1;this.slides.widthPercentage=!0,this.opts.slides.visible=b.complNumber(this.opts.slides.visible,a?Math.floor(100/a):1),this.opts.slides.width=a?a:Math.ceil(10000/this.opts.slides.visible)/100}this.opts.slides.slide=b.complNumber(this.opts.slides.slide,this.opts.slides.visible),this.opts.slides.offset=b.isPercentage(this.opts.slides.offset)?b.getPercentage(this.opts.slides.offset):b.complNumber(this.opts.slides.offset,0)},_uniqueID:function(){return this.__uniqueID||(this.__uniqueID=0),this.__uniqueID++,c("uid-"+this.__uniqueID)}},q.fn[j]=function(i,s,r,l){g.$wndw||h(),i=q.extend(!0,{},q[j].defaults,i),i=q.extend(!0,{},i,q[j].support.touch?r:s),l=q.extend(!0,{},q[j].configuration,l);var e=new q[j](this,i,l);return this.data(j,e),e.nodes.$wrpr},q[j].support={touch:"ontouchstart" in window.document||navigator.msMaxTouchPoints},q[j].defaults={infinite:!1,effect:"slide",wrapper:{classes:"",onClick:"toggleUI"},slides:{offset:0,scale:"fit",load:"near-visible",visible:1},media:{}},q[j].configuration={transitionDuration:400},q[j].constants={},q[j].debug=function(){},q[j].deprecated=function(d,a){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn(j+": "+d+" is deprecated, use "+a+" instead.")},q[j].effects={slide:function(a){this.nodes.$sldr.css("left",a)},fade:function(a){b.transitionend(this.nodes.$sldr,function(){q(this).css("left",a).css("opacity",1)},this.conf.transitionDuration),this.nodes.$sldr.css("opacity",0)}},q[j].version=f,q[j].media={},q[j].addons=[],q[j].ui=[]}}(jQuery);!function(k){var c,l,j,h,f,d="tosrus",g="autoplay",b=!1;k[d].prototype["_addon_"+g]=function(){b||(c=k[d]._c,l=k[d]._d,j=k[d]._e,h=k[d]._f,f=k[d]._g,j.add("mouseover mouseout"),b=!0);var a=this,e=this.opts[g];e.play&&(this.opts.infinite=!0,this.nodes.$wrpr.on(j.sliding,function(){a.autoplay()}),e.pauseOnHover&&this.nodes.$wrpr.on(j.mouseover,function(){a.autostop()}
71).on(j.mouseout,function(){a.autoplay()}),this.autoplay())},k[d].prototype.autoplay=function(){var a=this;this.autostop(),this.vars.autoplay=setTimeout(function(){a.next()},this.opts[g].timeout)},k[d].prototype.autostop=function(){this.vars.autoplay&&clearTimeout(this.vars.autoplay)},k[d].defaults[g]={play:!1,timeout:4000,pauseOnHover:!1},k[d].addons.push(g)}(jQuery);!function(v){function k(a,d){return v('<a class="'+u[a]+d+'" href="#"><span></span></a>')}function g(d,i,l,a){i.on(f.click,function(n){n.preventDefault(),n.stopPropagation(),d.trigger(f[l],[a])})}var u,j,f,m,c,h="tosrus",b="buttons",q=!1;v[h].prototype["_addon_"+b]=function(){q||(u=v[h]._c,j=v[h]._d,f=v[h]._e,m=v[h]._f,c=v[h]._g,u.add("prev next close disabled"),q=!0);var a=this,d=this.opts[b];this.nodes.$prev=null,this.nodes.$next=null,this.nodes.$clse=null,("boolean"==typeof d||"string"==typeof d&&"inline"==d)&&(d={prev:d,next:d}),"undefined"==typeof d.close&&(d.close=this.vars.fixed),this.nodes.$slides.length<2&&(d.prev=!1,d.next=!1),v.each({prev:"prev",next:"next",close:"clse"},function(e,l){d[e]&&("string"==typeof d[e]&&"inline"==d[e]?a.vars.fixed&&"close"!=e&&a.nodes.$slides.on(f.loading,function(){var i=k(e," "+u.inline)["prev"==e?"prependTo":"appendTo"](this);g(a.nodes.$wrpr,i,e,1),a.opts.infinite||("prev"==e&&v(this).is(":first-child")||"next"==e&&v(this).is(":last-child"))&&i.addClass(u.disabled)}):("string"==typeof d[e]&&(d[e]=v(d[e])),a.nodes["$"+l]=d[e] instanceof v?d[e]:k(e,"").appendTo(a.nodes.$wrpr),g(a.nodes.$wrpr,a.nodes["$"+l],e,null)))}),this.opts.infinite||(this.updateButtons(),this.nodes.$wrpr.on(f.sliding,function(){a.updateButtons()}))},v[h].prototype.updateButtons=function(){this.nodes.$prev&&this.nodes.$prev[(this.slides.index<1?"add":"remove")+"Class"](u.disabled),this.nodes.$next&&this.nodes.$next[(this.slides.index>=this.slides.total-this.slides.visible?"add":"remove")+"Class"](u.disabled)},v[h].defaults[b]={prev:!v[h].support.touch,next:!v[h].support.touch},v[h].addons.push(b),v[h].ui.push("prev"),v[h].ui.push("next"),v[h].ui.push("close")}(jQuery);!function(l){var g,m,k,h,j,f="tosrus",b="caption",c=!1;l[f].prototype["_addon_"+b]=function(){c||(g=l[f]._c,m=l[f]._d,k=l[f]._e,h=l[f]._f,j=l[f]._g,g.add("caption uibg"),m.add("caption"),c=!0);var e=this,i=this.opts[b];if(i.add){i.attributes=i.attributes||[],"string"==typeof i.target&&(i.target=l(i.target)),i.target instanceof l?this.nodes.$capt=i.target:(this.nodes.$capt=l('<div class="'+g.caption+'" />').appendTo(this.nodes.$wrpr),this.nodes.$uibg||(this.nodes.$uibg=l('<div class="'+g.uibg+'" />').prependTo(this.nodes.$wrpr)));for(var d=0,a=this.slides.visible;a>d;d++){l('<div class="'+g.caption+"-"+d+'" />').css("width",this.opts.slides.width+(this.slides.widthPercentage?"%":"px")).appendTo(this.nodes.$capt)}this.nodes.$slides.each(function(){var p=l(this),o=e.vars.fixed?p.data(m.anchor):p.children();p.data(m.caption,"");for(var q=0,r=i.attributes.length;r>q;q++){var s=o.attr(i.attributes[q]);if(s&&s.length){p.data(m.caption,s);break}}}),this.nodes.$wrpr.on(k.sliding,function(){for(var o=0,n=e.slides.visible;n>o;o++){e.nodes.$capt.children().eq(o).html(e.nodes.$sldr.children().eq(e.slides.index+o).data(m.caption)||"")}})}},l[f].defaults[b]={add:!1,target:null,attributes:["title","alt","rel"]},l[f].addons.push(b),l[f].ui.push("caption")}(jQuery);!function(h){if("function"==typeof Hammer){var f,m,l,g,b,k="tosrus",c="drag",j=!1;h[k].prototype["_addon_"+c]=function(){j||(f=h[k]._c,m=h[k]._d,l=h[k]._e,g=h[k]._f,b=h[k]._g,j=!0);var a=this;if(this.opts[c]&&"slide"==this.opts.effect){if(Hammer.VERSION<2){return h[k].deprecated("Older version of the Hammer library","version 2 or newer"),void 0}if(this.nodes.$slides.length>1){var e=0,i=!1,d=!1,n=new Hammer(this.nodes.$wrpr[0]);n.on("panstart panleft panright panend swipeleft swiperight",function(o){o.preventDefault()}).on("panstart",function(){a.nodes.$sldr.addClass(f.noanimation)}).on("panleft panright",function(o){switch(e=o.deltaX,d=!1,o.direction){case 2:i="left";break;case 4:i="right";break;default:i=!1}("left"==i&&a.slides.index+a.slides.visible>=a.slides.total||"right"==i&&0==a.slides.index)&&(e/=2.5),a.nodes.$sldr.css("margin-left",Math.round(e))}).on("swipeleft swiperight",function(){d=!0}).on("panend",function(){if(a.nodes.$sldr.removeClass(f.noanimation).addClass(f.fastanimation),g.transitionend(a.nodes.$sldr,function(){a.nodes.$sldr.removeClass(f.fastanimation)},a.conf.transitionDuration/2),a.nodes.$sldr.css("margin-left",0),"left"==i||"right"==i){if(d){var p=a.slides.visible}else{var o=a.nodes.$slides.first().width(),p=Math.floor((Math.abs(e)+o/2)/o)}p>
710&&a.nodes.$wrpr.trigger(l["left"==i?"next":"prev"],[p])}i=!1})}}},h[k].defaults[c]=h[k].support.touch,h[k].addons.push(c)}}(jQuery);!function(h){var k,f,g,l,j,b="tosrus",d="keys",i=!1;h[b].prototype["_addon_"+d]=function(){i||(k=h[b]._c,f=h[b]._d,g=h[b]._e,l=h[b]._f,j=h[b]._g,g.add("keyup"),i=!0);var a=this,e=this.opts[d];if("boolean"==typeof e&&e&&(e={prev:!0,next:!0,close:!0}),h.isPlainObject(e)){for(var c in h[b].constants[d]){"boolean"==typeof e[c]&&e[c]&&(e[c]=h[b].constants[d][c])}this.nodes.$slides.length<2&&(e.prev=!1,e.next=!1),h(document).on(g.keyup,function(n){if(a.vars.opened){var m=!1;switch(n.keyCode){case e.prev:m=g.prev;break;case e.next:m=g.next;break;case e.close:m=g.close}m&&(n.preventDefault(),n.stopPropagation(),a.nodes.$wrpr.trigger(m))}})}},h[b].defaults[d]=!1,h[b].constants[d]={prev:37,next:39,close:27},h[b].addons.push(d)}(jQuery);!function(l){var h,g,f,m,k,b="tosrus",c="pagination",j=!1;l[b].prototype["_addon_"+c]=function(){j||(h=l[b]._c,g=l[b]._d,f=l[b]._e,m=l[b]._f,k=l[b]._g,h.add("pagination selected uibg bullets thumbnails"),j=!0);var d=this,a=this.opts[c];if(this.nodes.$slides.length<2&&(a.add=!1),a.add){if("string"==typeof a.target&&(a.target=l(a.target)),a.target instanceof l?this.nodes.$pagr=a.target:(this.nodes.$pagr=l('<div class="'+h.pagination+" "+h[a.type]+'" />').appendTo(this.nodes.$wrpr),this.nodes.$uibg||(this.nodes.$uibg=l('<div class="'+h.uibg+'" />').prependTo(this.nodes.$wrpr))),"function"!=typeof a.anchorBuilder){switch(a.type){case"thumbnails":var e='<a href="#" style="background-image: url(',i=');"></a>';a.anchorBuilder=this.vars.fixed?function(){return e+l(this).data(g.anchor).attr("href")+i}:function(){return e+l(this).find("img").attr("src")+i};break;case"bullets":default:a.anchorBuilder=function(){return'<a href="#"></a>'}}}this.nodes.$slides.each(function(n){l(a.anchorBuilder.call(this,n+1)).appendTo(d.nodes.$pagr).on(f.click,function(o){o.preventDefault(),o.stopPropagation(),d.nodes.$wrpr.trigger(f.slideTo,[n])})}),this.updatePagination(),this.nodes.$wrpr.on(f.sliding,function(){d.updatePagination()})}},l[b].prototype.updatePagination=function(){this.nodes.$pagr&&this.nodes.$pagr.children().removeClass(h.selected).eq(this.slides.index).addClass(h.selected)},l[b].defaults[c]={add:!1,type:"bullets",target:null,anchorBuilder:null},l[b].addons.push(c),l[b].ui.push("pagination"),l[b].ui.push("bullets"),l[b].ui.push("thumbnails")}(jQuery);!function(a){var b="tosrus",c="html";a[b].media[c]={filterAnchors:function(d){var f=d.attr("href");return"#"==f.slice(0,1)&&a(f).is("div")},initAnchors:function(e,d){a('<div class="'+a[b]._c("html")+'" />').append(a(d)).appendTo(e),e.removeClass(a[b]._c.loading).trigger(a[b]._e.loaded)},filterSlides:function(d){return d.is("div")},initSlides:function(){}},a[b].defaults.media[c]={}}(jQuery);!function(a){var b="tosrus",c="image";a[b].media[c]={filterAnchors:function(d){return a.inArray(d.attr("href").toLowerCase().split(".").pop().split("?")[0],["jpg","jpe","jpeg","gif","png"])>-1},initAnchors:function(e,d){a('<img border="0" />').on(a[b]._e.load,function(f){f.stopPropagation(),e.removeClass(a[b]._c.loading).trigger(a[b]._e.loaded)}).appendTo(e).attr("src",d)},filterSlides:function(d){return d.is("img")},initSlides:function(){}},a[b].defaults.media[c]={}}(jQuery);!function(h){function p(e){function c(){o.length&&(o.attr("src",""),o.attr("src",i))}l||(m=h[q]._c,j=h[q]._d,f=h[q]._e,b=h[q]._f,g=h[q]._g,j.add("ratio maxWidth maxHeight"),l=!0);var o=e.children(),a=e.data(h[q]._d.anchor)||h(),i=o.attr("src"),d=a.data(j.ratio)||this.opts[k].ratio,n=a.data(j.maxWidth)||this.opts[k].maxWidth,r=a.data(j.maxHeight)||this.opts[k].maxHeight;e.removeClass(m.loading).trigger(f.loaded).on(f.loading,function(){b.resizeRatio(o,e,n,r,d)}),this.nodes.$wrpr.on(f.sliding,function(){c()}).on(f.closing,function(){c()}),g.$wndw.on(f.resize,function(){b.resizeRatio(o,e,n,r,d)})}var m,j,f,b,g,q="tosrus",k="vimeo",l=!1;h[q].media[k]={filterAnchors:function(a){return a.attr("href").toLowerCase().indexOf("vimeo.com/")>-1},initAnchors:function(c,d){var i=this._uniqueID();d=d.split("vimeo.com/")[1].split("?")[0]+"?api=1&player_id="+i,h('<iframe id="'+i+'" src="http://player.vimeo.com/video/'+d+'" frameborder="0" allowfullscreen />').appendTo(c),p.call(this,c)},filterSlides:function(a){return a.is("iframe")&&a.attr("src")?a.attr("src").toLowerCase().indexOf("vimeo.com/video/")>-1:!1},initSlides:function(a){p.call(this,a)}},h[q].defaults.media[k]={},h[q].defaults[k]={ratio:16/9,maxWidth:!1,maxHeight:!1}}(jQuery);!function(p){function j(r){function d(e){c.length&&c[0].contentWindow.postMessage('{ "event": "command", "func": "'+e+'Video" }',"*")}l||(h=p[q]._c,f=p[q]._d,m=p[q]._e,g=p[q]._f,b=p[q]._g,f.add("ratio maxWidth maxHeight"),l=!0);
71var c=r.children(),a=r.data(p[q]._d.anchor)||p(),n=a.data(f.ratio)||this.opts[k].ratio,i=a.data(f.maxWidth)||this.opts[k].maxWidth,o=a.data(f.maxHeight)||this.opts[k].maxHeight;r.removeClass(h.loading).trigger(m.loaded).on(m.loading,function(){g.resizeRatio(c,r,i,o,n)}),this.nodes.$wrpr.on(m.sliding,function(){d("pause")}).on(m.closing,function(){d("stop")}),b.$wndw.on(m.resize,function(){g.resizeRatio(c,r,i,o,n)})}var h,f,m,g,b,q="tosrus",k="youtube",l=!1;p[q].media[k]={filterAnchors:function(a){return a.attr("href").toLowerCase().indexOf("youtube.com/watch?v=")>-1},initAnchors:function(d,e){var c=e;e=e.split("?v=")[1].split("&")[0],this.opts[k].imageLink?(e="http://img.youtube.com/vi/"+e+"/0.jpg",p('<a href="'+c+'" class="'+p[q]._c("play")+'" target="_blank" />').appendTo(d),p('<img border="0" />').on(p[q]._e.load,function(a){a.stopPropagation(),d.removeClass(p[q]._c.loading).trigger(p[q]._e.loaded)}).appendTo(d).attr("src",e)):(p('<iframe src="http://www.youtube.com/embed/'+e+'?enablejsapi=1" frameborder="0" allowfullscreen />').appendTo(d),j.call(this,d))},filterSlides:function(a){return a.is("iframe")&&a.attr("src")?a.attr("src").toLowerCase().indexOf("youtube.com/embed/")>-1:!1},initSlides:function(a){j.call(this,a)}},p[q].defaults.media[k]={},p[q].defaults[k]={ratio:16/9,maxWidth:!1,maxHeight:!1,imageLink:p[q].support.touch}}(jQuery);
72/*!
73 *  CodeMirror
74   Generated on 05/03/2020
75   Version: 5.52.0
76
77   CodeMirror Library:
78   - codemirror.js
79   Modes:
80   - css.js
81   - htmlmixed.js
82   - javascript.js
83   - sql.js
84   - xml.js
85   Add-ons:
86   - match-brackets.js
87   - active-line.js
88   - fullscreen.js
89 */
90(function(b,a){typeof exports==="object"&&typeof module!=="undefined"?module.exports=a():typeof define==="function"&&define.amd?define(a):(b.CodeMirror=a())}(this,(function(){var ez=navigator.userAgent;var eK=navigator.platform;var cP=/gecko\/\d/i.test(ez);var fs=/MSIE \d/.test(ez);var b3=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ez);var c3=/Edge\/(\d+)/.exec(ez);var ef=fs||b3||c3;var n=ef&&(fs?document.documentMode||6:+(c3||b3)[1]);var dt=!c3&&/WebKit\//.test(ez);var ei=dt&&/Qt\/\d+\.\d+/.test(ez);var dJ=!c3&&/Chrome\//.test(ez);var eB=/Opera\//.test(ez);var aM=/Apple Computer/.test(navigator.vendor);var dB=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ez);var ge=/PhantomJS/.test(ez);var fM=!c3&&/AppleWebKit/.test(ez)&&/Mobile\/\w+/.test(ez);var aX=/Android/.test(ez);var eQ=fM||aX||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ez);var ct=fM||/Mac/.test(eK);var gx=/\bCrOS\b/.test(ez);var a0=/win/i.test(eK);var ba=eB&&ez.match(/Version\/(\d*\.\d*)/);if(ba){ba=Number(ba[1])}if(ba&&ba>=15){eB=false;dt=true}var cb=ct&&(ei||eB&&(ba==null||ba<12.11));var g9=cP||(ef&&n>=9);function X(i){return new RegExp("(^|\\s)"+i+"(?:$|\\s)\\s*")}var h=function(hl,i){var hm=hl.className;var hk=X(i).exec(hm);if(hk){var hn=hm.slice(hk.index+hk[0].length);hl.className=hm.slice(0,hk.index)+(hn?hk[1]+hn:"")}};function eA(hk){for(var i=hk.childNodes.length;i>0;--i){hk.removeChild(hk.firstChild)}return hk}function cd(i,hk){return eA(i).appendChild(hk)}function g0(hk,ho,hn,hm){var hp=document.createElement(hk);if(hn){hp.className=hn}if(hm){hp.style.cssText=hm}if(typeof ho=="string"){hp.appendChild(document.createTextNode(ho))}else{if(ho){for(var hl=0;hl<ho.length;++hl){hp.appendChild(ho[hl])}}}return hp}function g6(i,hm,hl,hk){var hn=g0(i,hm,hl,hk);hn.setAttribute("role","presentation");return hn}var cM;if(document.createRange){cM=function(hm,hn,hk,i){var hl=document.createRange();hl.setEnd(i||hm,hk);hl.setStart(hm,hn);return hl}}else{cM=function(hl,hn,i){var hk=document.body.createTextRange();try{hk.moveToElementText(hl.parentNode)}catch(hm){return hk}hk.collapse(true);hk.moveEnd("character",i);hk.moveStart("character",hn);return hk}}function ha(i,hk){if(hk.nodeType==3){hk=hk.parentNode}if(i.contains){return i.contains(hk)}do{if(hk.nodeType==11){hk=hk.host}if(hk==i){return true}}while(hk=hk.parentNode)}function ej(){var i;try{i=document.activeElement}catch(hk){i=document.body||null}while(i&&i.shadowRoot&&i.shadowRoot.activeElement){i=i.shadowRoot.activeElement}return i}function gn(hk,i){var hl=hk.className;if(!X(i).test(hl)){hk.className+=(hl?" ":"")+i}}function gN(hm,hk){var hl=hm.split(" ");for(var hn=0;hn<hl.length;hn++){if(hl[hn]&&!X(hl[hn]).test(hk)){hk+=" "+hl[hn]}}return hk}var eg=function(i){i.select()};if(fM){eg=function(i){i.selectionStart=0;i.selectionEnd=i.value.length}}else{if(ef){eg=function(hk){try{hk.select()}catch(i){}}}}
90function cW(hk){var i=Array.prototype.slice.call(arguments,1);return function(){return hk.apply(null,i)}}function aY(hl,hk,i){if(!hk){hk={}}for(var hm in hl){if(hl.hasOwnProperty(hm)&&(i!==false||!hk.hasOwnProperty(hm))){hk[hm]=hl[hm]}}return hk}function cc(hn,hl,hp,hq,hm){if(hl==null){hl=hn.search(/[^\s\u00a0]/);if(hl==-1){hl=hn.length}}for(var ho=hq||0,hr=hm||0;;){var hk=hn.indexOf("\t",ho);if(hk<0||hk>=hl){return hr+(hl-ho)}hr+=hk-ho;hr+=hp-(hr%hp);ho=hk+1}}var hj=function(){this.id=null;this.f=null;this.time=0;this.handler=cW(this.onTimeout,this)};hj.prototype.onTimeout=function(i){i.id=0;if(i.time<=+new Date){i.f()}else{setTimeout(i.handler,i.time-+new Date)}};hj.prototype.set=function(i,hk){this.f=hk;var hl=+new Date+i;if(!this.id||hl<this.time){clearTimeout(this.id);this.id=setTimeout(this.handler,i);this.time=hl}};function dP(hm,hk){for(var hl=0;hl<hm.length;++hl){if(hm[hl]==hk){return hl}}return -1}var ed=30;var cy={toString:function(){return"CodeMirror.Pass"}};var ag={scroll:false},R={origin:"*mouse"},dp={origin:"+move"};function e2(hn,hm,ho){for(var hp=0,hl=0;;){var hk=hn.indexOf("\t",hp);if(hk==-1){hk=hn.length}var i=hk-hp;if(hk==hn.length||hl+i>=hm){return hp+Math.min(i,hm-hl)}hl+=hk-hp;hl+=ho-(hl%ho);hp=hk+1;if(hl>=hm){return hp}}}var bb=[""];function cQ(i){while(bb.length<=i){bb.push(gt(bb)+" ")}return bb[i]}function gt(i){return i[i.length-1]}function ce(hn,hm){var hk=[];for(var hl=0;hl<hn.length;hl++){hk[hl]=hm(hn[hl],hl)}return hk}function cw(hn,hk,hl){var hm=0,i=hl(hk);while(hm<hn.length&&hl(hn[hm])<=i){hm++}hn.splice(hm,0,hk)}function gO(){}function cK(hl,i){var hk;if(Object.create){hk=Object.create(hl)}else{gO.prototype=hl;hk=new gO()}if(i){aY(i,hk)}return hk}var bo=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function gq(i){return/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||bo.test(i))}function c1(i,hk){if(!hk){return gq(i)}if(hk.source.indexOf("\\w")>-1&&gq(i)){return true}return hk.test(i)}function fE(i){for(var hk in i){if(i.hasOwnProperty(hk)&&i[hk]){return false}}return true}var fr=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function f9(i){return i.charCodeAt(0)>=768&&fr.test(i)}function eU(hk,hl,i){while((i<0?hl>0:hl<hk.length)&&f9(hk.charAt(hl))){hl+=i}return hl}function cN(i,ho,hn){var hl=ho>hn?-1:1;for(;;){if(ho==hn){return ho}var hm=(ho+hn)/2,hk=hl<0?Math.ceil(hm):Math.floor(hm);
90if(hk==ho){return i(hk)?ho:hn}if(i(hk)){hn=hk}else{ho=hk+hl}}}function eE(hk,hq,hp,ho){if(!hk){return ho(hq,hp,"ltr",0)}var hn=false;for(var hm=0;hm<hk.length;++hm){var hl=hk[hm];if(hl.from<hp&&hl.to>hq||hq==hp&&hl.to==hq){ho(Math.max(hl.from,hq),Math.min(hl.to,hp),hl.level==1?"rtl":"ltr",hm);hn=true}}if(!hn){ho(hq,hp,"ltr")}}var fO=null;function aR(hk,hm,ho){var hn;fO=null;for(var hl=0;hl<hk.length;++hl){var hp=hk[hl];if(hp.from<hm&&hp.to>hm){return hl}if(hp.to==hm){if(hp.from!=hp.to&&ho=="before"){hn=hl}else{fO=hl}}if(hp.from==hm){if(hp.from!=hp.to&&ho!="before"){hn=hl}else{fO=hl}}}return hn!=null?hn:fO}var bu=(function(){var hp="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var hn="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function hm(hs){if(hs<=247){return hp.charAt(hs)}else{if(1424<=hs&&hs<=1524){return"R"}else{if(1536<=hs&&hs<=1785){return hn.charAt(hs-1536)}else{if(1774<=hs&&hs<=2220){return"r"}else{if(8192<=hs&&hs<=8203){return"w"}else{if(hs==8204){return"b"}else{return"L"}}}}}}}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var hr=/[stwN]/,hl=/[LRr]/,hk=/[Lb1n]/,ho=/[1n]/;function hq(hu,ht,hs){this.level=hu;this.from=ht;this.to=hs}return function(hP,hv){var hE=hv=="ltr"?"L":"R";if(hP.length==0||hv=="ltr"&&!i.test(hP)){return false}var hy=hP.length,hZ=[];for(var h2=0;h2<hy;++h2){hZ.push(hm(hP.charCodeAt(h2)))}for(var hM=0,hL=hE;hM<hy;++hM){var h3=hZ[hM];if(h3=="m"){hZ[hM]=hL}else{hL=h3}}for(var hK=0,hu=hE;hK<hy;++hK){var hY=hZ[hK];if(hY=="1"&&hu=="r"){hZ[hK]="n"}else{if(hl.test(hY)){hu=hY;if(hY=="r"){hZ[hK]="R"}}}}for(var hJ=1,ht=hZ[0];hJ<hy-1;++hJ){var hW=hZ[hJ];if(hW=="+"&&ht=="1"&&hZ[hJ+1]=="1"){hZ[hJ]="1"}else{if(hW==","&&ht==hZ[hJ+1]&&(ht=="1"||ht=="n")){hZ[hJ]=ht}}ht=hW}for(var hI=0;hI<hy;++hI){var hV=hZ[hI];if(hV==","){hZ[hI]="N"}else{if(hV=="%"){var hx=(void 0);for(hx=hI+1;hx<hy&&hZ[hx]=="%";++hx){}var hC=(hI&&hZ[hI-1]=="!")||(hx<hy&&hZ[hx]=="1")?"1":"N";for(var h1=hI;h1<hx;++h1){hZ[h1]=hC}hI=hx-1}}}for(var hH=0,hB=hE;
90hH<hy;++hH){var hT=hZ[hH];if(hB=="L"&&hT=="1"){hZ[hH]="L"}else{if(hl.test(hT)){hB=hT}}}for(var hG=0;hG<hy;++hG){if(hr.test(hZ[hG])){var hQ=(void 0);for(hQ=hG+1;hQ<hy&&hr.test(hZ[hQ]);++hQ){}var hS=(hG?hZ[hG-1]:hE)=="L";var hU=(hQ<hy?hZ[hQ]:hE)=="L";var hO=hS==hU?(hS?"L":"R"):hE;for(var hA=hG;hA<hQ;++hA){hZ[hA]=hO}hG=hQ-1}}var hR=[],h0;for(var hF=0;hF<hy;){if(hk.test(hZ[hF])){var hD=hF;for(++hF;hF<hy&&hk.test(hZ[hF]);++hF){}hR.push(new hq(0,hD,hF))}else{var hN=hF,hs=hR.length,hX=hv=="rtl"?1:0;for(++hF;hF<hy&&hZ[hF]!="L";++hF){}for(var hz=hN;hz<hF;){if(ho.test(hZ[hz])){if(hN<hz){hR.splice(hs,0,new hq(1,hN,hz));hs+=hX}var hw=hz;for(++hz;hz<hF&&ho.test(hZ[hz]);++hz){}hR.splice(hs,0,new hq(2,hw,hz));hs+=hX;hN=hz}else{++hz}}if(hN<hF){hR.splice(hs,0,new hq(1,hN,hF))}}}if(hv=="ltr"){if(hR[0].level==1&&(h0=hP.match(/^\s+/))){hR[0].from=h0[0].length;hR.unshift(new hq(0,0,h0[0].length))}if(gt(hR).level==1&&(h0=hP.match(/\s+$/))){gt(hR).to-=h0[0].length;hR.push(new hq(0,hy-h0[0].length,hy))}}return hv=="rtl"?hR.reverse():hR}})();function a(hk,hl){var i=hk.order;if(i==null){i=hk.order=bu(hk.text,hl)}return i}var fR=[];var ci=function(hm,i,hl){if(hm.addEventListener){hm.addEventListener(i,hl,false)}else{if(hm.attachEvent){hm.attachEvent("on"+i,hl)}else{var hk=hm._handlers||(hm._handlers={});hk[i]=(hk[i]||fR).concat(hl)}}};function eW(hk,i){return hk._handlers&&hk._handlers[i]||fR}function eP(ho,hl,hn){if(ho.removeEventListener){ho.removeEventListener(hl,hn,false)}else{if(ho.detachEvent){ho.detachEvent("on"+hl,hn)}else{var hm=ho._handlers,i=hm&&hm[hl];if(i){var hk=dP(i,hn);if(hk>-1){hm[hl]=i.slice(0,hk).concat(i.slice(hk+1))}}}}}function aN(ho,hn){var hk=eW(ho,hn);if(!hk.length){return}var hl=Array.prototype.slice.call(arguments,2);for(var hm=0;hm<hk.length;++hm){hk[hm].apply(null,hl)}}function a2(i,hl,hk){if(typeof hl=="string"){hl={type:hl,preventDefault:function(){this.defaultPrevented=true}}}aN(i,hk||hl.type,i,hl);return b5(hl)||hl.codemirrorIgnore}function aa(hl){var hk=hl._handlers&&hl._handlers.cursorActivity;if(!hk){return}var hn=hl.curOp.cursorActivityHandlers||(hl.curOp.cursorActivityHandlers=[]);for(var hm=0;hm<hk.length;++hm){if(dP(hn,hk[hm])==-1){hn.push(hk[hm])}}}function f5(hk,i){return eW(hk,i).length>0}function bS(i){i.prototype.on=function(hk,hl){ci(this,hk,hl)};i.prototype.off=function(hk,hl){eP(this,hk,hl)}}function c7(i){if(i.preventDefault){i.preventDefault()}else{i.returnValue=false}}function dX(i){if(i.stopPropagation){i.stopPropagation()}else{i.cancelBubble=true}}function b5(i){return i.defaultPrevented!=null?i.defaultPrevented:i.returnValue==false}function e3(i){c7(i);dX(i)}function Q(i){return i.target||i.srcElement}function gE(hk){var i=hk.which;if(i==null){if(hk.button&1){i=1}else{if(hk.button&2){i=3}else{if(hk.button&4){i=2}}}}if(ct&&hk.ctrlKey&&i==1){i=3}return i}var ft=function(){if(ef&&n<9){return false}var i=g0("div");return"draggable" in i||"dragDrop" in i}();var gC;function bE(i){if(gC==null){var hl=g0("span","\u200b");cd(i,g0("span",[hl,document.createTextNode("x")]));if(i.firstChild.offsetHeight!=0){gC=hl.offsetWidth<=1&&hl.offsetHeight>2&&!(ef&&n<8)}}var hk=gC?g0("span","\u200b"):g0("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px");hk.setAttribute("cm-text","");return hk}var gD;function b8(hm){if(gD!=null){return gD}var i=cd(hm,document.createTextNode("A\u062eA"));var hl=cM(i,0,1).getBoundingClientRect();var hk=cM(i,1,2).getBoundingClientRect();eA(hm);if(!hl||hl.left==hl.right){return false}return gD=(hk.right-hl.right<3)}var gJ="\n\nb".split(/\n/).length!=3?function(ho){var hp=0,i=[],hn=ho.length;while(hp<=hn){var hm=ho.indexOf("\n",hp);if(hm==-1){hm=ho.length}var hl=ho.slice(hp,ho.charAt(hm-1)=="\r"?hm-1:hm);var hk=hl.indexOf("\r");if(hk!=-1){i.push(hl.slice(0,hk));hp+=hk+1}else{i.push(hl);hp=hm+1}}return i}:function(i){return i.split(/\r\n?|\n/)};var bK=window.getSelection?function(hk){try{return hk.selectionStart!=hk.selectionEnd}catch(i){return false}}:function(hl){var hk;try{hk=hl.ownerDocument.selection.createRange()}catch(i){}if(!hk||hk.parentElement()!=hl){return false}return hk.compareEndPoints("StartToEnd",hk)!=0};var dG=(function(){var i=g0("div");if("oncopy" in i){return true}i.setAttribute("oncopy","return;");return typeof i.oncopy=="function"})();var fS=null;function aV(hk){if(fS!=null){return fS}var hl=cd(hk,g0("span","x"));var hm=hl.getBoundingClientRect();var i=cM(hl,0,1).getBoundingClientRect();return fS=Math.abs(hm.left-i.left)>1}var dZ={},a3={};function e6(i,hk){if(arguments.length>2){hk.dependencies=Array.prototype.slice.call(arguments,2)}dZ[i]=hk}function bD(hk,i){a3[hk]=i}function hb(i){if(typeof i=="string"&&a3.hasOwnProperty(i)){i=a3[i]}else{if(i&&typeof i.name=="string"&&a3.hasOwnProperty(i.name)){var hk=a3[i.name];
90if(typeof hk=="string"){hk={name:hk}}i=cK(hk,i);i.name=hk.name}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(i)){return hb("application/xml")}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(i)){return hb("application/json")}}}}if(typeof i=="string"){return{name:i}}else{return i||{name:"null"}}}function gm(hl,hk){hk=hb(hk);var hn=dZ[hk.name];if(!hn){return gm(hl,"text/plain")}var ho=hn(hl,hk);if(dW.hasOwnProperty(hk.name)){var hm=dW[hk.name];for(var hp in hm){if(!hm.hasOwnProperty(hp)){continue}if(ho.hasOwnProperty(hp)){ho["_"+hp]=ho[hp]}ho[hp]=hm[hp]}}ho.name=hk.name;if(hk.helperType){ho.helperType=hk.helperType}if(hk.modeProps){for(var i in hk.modeProps){ho[i]=hk.modeProps[i]}}return ho}var dW={};function fj(hl,hk){var i=dW.hasOwnProperty(hl)?dW[hl]:(dW[hl]={});aY(hk,i)}function cp(hm,i){if(i===true){return i}if(hm.copyState){return hm.copyState(i)}var hl={};for(var hn in i){var hk=i[hn];if(hk instanceof Array){hk=hk.concat([])}hl[hn]=hk}return hl}function g7(hl,i){var hk;while(hl.innerMode){hk=hl.innerMode(i);if(!hk||hk.mode==hl){break}i=hk.state;hl=hk.mode}return hk||{mode:hl,state:i}}function cm(hl,hk,i){return hl.startState?hl.startState(hk,i):true}var fD=function(i,hl,hk){this.pos=this.start=0;this.string=i;this.tabSize=hl||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0;this.lineOracle=hk};fD.prototype.eol=function(){return this.pos>=this.string.length};fD.prototype.sol=function(){return this.pos==this.lineStart};fD.prototype.peek=function(){return this.string.charAt(this.pos)||undefined};fD.prototype.next=function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}};fD.prototype.eat=function(i){var hl=this.string.charAt(this.pos);var hk;if(typeof i=="string"){hk=hl==i}else{hk=hl&&(i.test?i.test(hl):i(hl))}if(hk){++this.pos;return hl}};fD.prototype.eatWhile=function(i){var hk=this.pos;while(this.eat(i)){}return this.pos>hk};fD.prototype.eatSpace=function(){var hk=this;var i=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++hk.pos}return this.pos>i};fD.prototype.skipToEnd=function(){this.pos=this.string.length};fD.prototype.skipTo=function(i){var hk=this.string.indexOf(i,this.pos);if(hk>-1){this.pos=hk;return true}};fD.prototype.backUp=function(i){this.pos-=i};fD.prototype.column=function(){if(this.lastColumnPos<this.start){this.lastColumnValue=cc(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?cc(this.string,this.lineStart,this.tabSize):0)};fD.prototype.indentation=function(){return cc(this.string,null,this.tabSize)-(this.lineStart?cc(this.string,this.lineStart,this.tabSize):0)};fD.prototype.match=function(hn,hk,i){if(typeof hn=="string"){var ho=function(hp){return i?hp.toLowerCase():hp};var hm=this.string.substr(this.pos,hn.length);if(ho(hm)==ho(hn)){if(hk!==false){this.pos+=hn.length}return true}}else{var hl=this.string.slice(this.pos).match(hn);if(hl&&hl.index>0){return null}if(hl&&hk!==false){this.pos+=hl[0].length}return hl}};fD.prototype.current=function(){return this.string.slice(this.start,this.pos)};fD.prototype.hideFirstChars=function(hk,i){this.lineStart+=hk;try{return i()}finally{this.lineStart-=hk}};fD.prototype.lookAhead=function(hk){var i=this.lineOracle;return i&&i.lookAhead(hk)};fD.prototype.baseToken=function(){var i=this.lineOracle;return i&&i.baseToken(this.pos)};function f0(hn,hp){hp-=hn.first;if(hp<0||hp>=hn.size){throw new Error("There is no line "+(hp+hn.first)+" in the document.")}var hk=hn;while(!hk.lines){for(var hl=0;;++hl){var ho=hk.children[hl],hm=ho.chunkSize();if(hp<hm){hk=ho;break}hp-=hm}}return hk.lines[hp]}function g2(hl,hn,i){var hk=[],hm=hn.line;hl.iter(hn.line,i.line+1,function(ho){var hp=ho.text;if(hm==i.line){hp=hp.slice(0,i.ch)}if(hm==hn.line){hp=hp.slice(hn.ch)}hk.push(hp);++hm});return hk}function be(hk,hm,hl){var i=[];hk.iter(hm,hl,function(hn){i.push(hn.text)});return i}function g5(hk,i){var hl=i-hk.height;if(hl){for(var hm=hk;hm;hm=hm.parent){hm.height+=hl}}}function b7(hk){if(hk.parent==null){return null}var ho=hk.parent,hn=dP(ho.lines,hk);for(var hl=ho.parent;hl;ho=hl,hl=hl.parent){for(var hm=0;;++hm){if(hl.children[hm]==ho){break}hn+=hl.children[hm].chunkSize()}}return hn+ho.first}function b0(hq,hp){var hn=hq.first;outer:do{for(var hm=0;hm<hq.children.length;
90++hm){var hl=hq.children[hm],hk=hl.height;if(hp<hk){hq=hl;continue outer}hp-=hk;hn+=hl.chunkSize()}return hn}while(!hq.lines);var ho=0;for(;ho<hq.lines.length;++ho){var hs=hq.lines[ho],hr=hs.height;if(hp<hr){break}hp-=hr}return hn+ho}function cv(hk,i){return i>=hk.first&&i<hk.first+hk.size}function e5(hk,hl){return String(hk.lineNumberFormatter(hl+hk.firstLineNumber))}function ab(i,hk,hl){if(hl===void 0){hl=null}if(!(this instanceof ab)){return new ab(i,hk,hl)}this.line=i;this.ch=hk;this.sticky=hl}function cD(hk,i){return hk.line-i.line||hk.ch-i.ch}function ac(hk,i){return hk.sticky==i.sticky&&cD(hk,i)==0}function cG(i){return ab(i.line,i.ch)}function bQ(hk,i){return cD(hk,i)<0?i:hk}function aA(hk,i){return cD(hk,i)<0?hk:i}function dy(i,hk){return Math.max(i.first,Math.min(hk,i.first+i.size-1))}function gy(hk,hl){if(hl.line<hk.first){return ab(hk.first,0)}var i=hk.first+hk.size-1;if(hl.line>i){return ab(i,f0(hk,i).text.length)}return gc(hl,f0(hk,hl.line).text.length)}function gc(hl,hk){var i=hl.ch;if(i==null||i>hk){return ab(hl.line,hk)}else{if(i<0){return ab(hl.line,0)}else{return hl}}}function ey(hm,hn){var hk=[];for(var hl=0;hl<hn.length;hl++){hk[hl]=gy(hm,hn[hl])}return hk}var aP=function(hk,i){this.state=hk;this.lookAhead=i};var af=function(hm,hl,i,hk){this.state=hl;this.doc=hm;this.line=i;this.maxLookAhead=hk||0;this.baseTokens=null;this.baseTokenPos=1};af.prototype.lookAhead=function(hk){var i=this.doc.getLine(this.line+hk);if(i!=null&&hk>this.maxLookAhead){this.maxLookAhead=hk}return i};af.prototype.baseToken=function(hl){var hk=this;if(!this.baseTokens){return null}while(this.baseTokens[this.baseTokenPos]<=hl){hk.baseTokenPos+=2}var i=this.baseTokens[this.baseTokenPos+1];return{type:i&&i.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-hl}};af.prototype.nextLine=function(){this.line++;if(this.maxLookAhead>0){this.maxLookAhead--}};af.fromSaved=function(hl,hk,i){if(hk instanceof aP){return new af(hl,cp(hl.mode,hk.state),i,hk.lookAhead)}else{return new af(hl,cp(hl.mode,hk),i)}};af.prototype.save=function(hk){var i=hk!==false?cp(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new aP(i,this.maxLookAhead):i};function gk(hp,hr,hk,hn){var hq=[hp.state.modeGen],hm={};y(hp,hr.text,hp.doc.mode,hk,function(hs,ht){return hq.push(hs,ht)},hm,hn);var i=hk.state;var ho=function(hv){hk.baseTokens=hq;var ht=hp.state.overlays[hv],hu=1,hs=0;hk.state=true;y(hp,hr.text,ht.mode,hk,function(hw,hy){var hA=hu;while(hs<hw){var hx=hq[hu];if(hx>hw){hq.splice(hu,1,hw,hq[hu+1],hx)}hu+=2;hs=Math.min(hw,hx)}if(!hy){return}if(ht.opaque){hq.splice(hA,hu-hA,hw,"overlay "+hy);hu=hA+2}else{for(;hA<hu;hA+=2){var hz=hq[hA+1];hq[hA+1]=(hz?hz+" ":"")+"overlay "+hy}}},hm);hk.state=i;hk.baseTokens=null;hk.baseTokenPos=1};for(var hl=0;hl<hp.state.overlays.length;++hl){ho(hl)}return{styles:hq,classes:hm.bgClass||hm.textClass?hm:null}}function dC(hk,hm,ho){if(!hm.styles||hm.styles[0]!=hk.state.modeGen){var hn=fH(hk,b7(hm));var hl=hm.text.length>hk.options.maxHighlightLength&&cp(hk.doc.mode,hn.state);var i=gk(hk,hm,hn);if(hl){hn.state=hl}hm.stateAfter=hn.save(!hl);hm.styles=i.styles;if(i.classes){hm.styleClasses=i.classes}else{if(hm.styleClasses){hm.styleClasses=null}}if(ho===hk.doc.highlightFrontier){hk.doc.modeFrontier=Math.max(hk.doc.modeFrontier,++hk.doc.highlightFrontier)}}return hm.styles}function fH(i,hq,hk){var ho=i.doc,hn=i.display;if(!ho.mode.startState){return new af(ho,true,hq)}var hp=cZ(i,hq,hk);var hm=hp>ho.first&&f0(ho,hp-1).stateAfter;var hl=hm?af.fromSaved(ho,hm,hp):new af(ho,cm(ho.mode),hp);ho.iter(hp,hq,function(hr){d3(i,hr.text,hl);var hs=hl.line;hr.stateAfter=hs==hq-1||hs%5==0||hs>=hn.viewFrom&&hs<hn.viewTo?hl.save():null;hl.nextLine()});if(hk){ho.modeFrontier=hl.line}return hl}function d3(i,ho,hl,hk){var hn=i.doc.mode;var hm=new fD(ho,i.options.tabSize,hl);hm.start=hm.pos=hk||0;if(ho==""){ga(hn,hl.state)}while(!hm.eol()){fh(hn,hm,hl.state);hm.start=hm.pos}}function ga(hl,hk){if(hl.blankLine){return hl.blankLine(hk)}if(!hl.innerMode){return}var i=g7(hl,hk);if(i.mode.blankLine){return i.mode.blankLine(i.state)}}function fh(hp,ho,hn,hk){for(var hl=0;hl<10;hl++){if(hk){hk[0]=g7(hp,hn).mode}var hm=hp.token(ho,hn);if(ho.pos>ho.start){return hm}}throw new Error("Mode "+hp.name+" failed to advance stream.")}var dF=function(hl,i,hk){this.start=hl.start;this.end=hl.pos;this.string=hl.current();this.type=i||null;this.state=hk};function cR(hr,hp,hm,hl){var hq=hr.doc,hn=hq.mode,i;hp=gy(hq,hp);var ht=f0(hq,hp.line),hk=fH(hr,hp.line,hm);var hs=new fD(ht.text,hr.options.tabSize,hk),ho;if(hl){ho=[]}while((hl||hs.pos<hp.ch)&&!hs.eol()){hs.start=hs.pos;i=fh(hn,hs,hk.state);if(hl){ho.push(new dF(hs,i,cp(hq.mode,hk.state)))}}return hl?ho:new dF(hs,i,hk.state)}function dQ(hl,hk){if(hl){for(;;){var i=hl.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i){break}hl=hl.slice(0,i.index)+hl.slice(i.index+i[0].length);var hm=i[1]?"bgClass":"textClass";if(hk[hm]==null){hk[hm]=i[2]}else{if(!(new RegExp("(?:^|s)"+i[2]+"(?:$|s)")).test(hk[hm])){hk[hm]+=" "+i[2]}}}}return hl}function y(ht,hv,ho,hl,hp,hm,hn){var hk=ho.flattenSpans;if(hk==null){hk=ht.options.flattenSpans}var hr=0,hq=null;
90var hu=new fD(hv,ht.options.tabSize,hl),i;var hx=ht.options.addModeClass&&[null];if(hv==""){dQ(ga(ho,hl.state),hm)}while(!hu.eol()){if(hu.pos>ht.options.maxHighlightLength){hk=false;if(hn){d3(ht,hv,hl,hu.pos)}hu.pos=hv.length;i=null}else{i=dQ(fh(ho,hu,hl.state,hx),hm)}if(hx){var hw=hx[0].name;if(hw){i="m-"+(i?hw+" "+i:hw)}}if(!hk||hq!=i){while(hr<hu.start){hr=Math.min(hu.start,hr+5000);hp(hr,hq)}hq=i}hu.start=hu.pos}while(hr<hu.pos){var hs=Math.min(hu.pos,hr+5000);hp(hs,hq);hr=hs}}function cZ(hq,hk,hn){var hl,ho,hp=hq.doc;var hm=hn?-1:hk-(hq.doc.mode.innerMode?1000:100);for(var ht=hk;ht>hm;--ht){if(ht<=hp.first){return hp.first}var hs=f0(hp,ht-1),i=hs.stateAfter;if(i&&(!hn||ht+(i instanceof aP?i.lookAhead:0)<=hp.modeFrontier)){return ht}var hr=cc(hs.text,null,hq.options.tabSize);if(ho==null||hl>hr){ho=ht-1;hl=hr}}return ho}function hd(hl,hn){hl.modeFrontier=Math.min(hl.modeFrontier,hn);if(hl.highlightFrontier<hn-10){return}var hm=hl.first;for(var i=hn-1;i>hm;i--){var hk=f0(hl,i).stateAfter;if(hk&&(!(hk instanceof aP)||i+hk.lookAhead<hn)){hm=i+1;break}}hl.highlightFrontier=Math.min(hl.highlightFrontier,hm)}var he=false,bj=false;function gl(){he=true}function bP(){bj=true}function eT(i,hl,hk){this.marker=i;this.from=hl;this.to=hk}function fV(hm,hk){if(hm){for(var hl=0;hl<hm.length;++hl){var hn=hm[hl];if(hn.marker==hk){return hn}}}}function fp(hl,hm){var hn;for(var hk=0;hk<hl.length;++hk){if(hl[hk]!=hm){(hn||(hn=[])).push(hl[hk])}}return hn}function cB(i,hk){i.markedSpans=i.markedSpans?i.markedSpans.concat([hk]):[hk];hk.marker.attachLine(i)}function a1(hl,hm,hq){var hr;if(hl){for(var ho=0;ho<hl.length;++ho){var hs=hl[ho],hp=hs.marker;var hk=hs.from==null||(hp.inclusiveLeft?hs.from<=hm:hs.from<hm);if(hk||hs.from==hm&&hp.type=="bookmark"&&(!hq||!hs.marker.insertLeft)){var hn=hs.to==null||(hp.inclusiveRight?hs.to>=hm:hs.to>hm);(hr||(hr=[])).push(new eT(hp,hs.from,hn?null:hs.to))}}}return hr}function aK(hl,hn,hq){var hr;if(hl){for(var ho=0;ho<hl.length;++ho){var hs=hl[ho],hp=hs.marker;var hm=hs.to==null||(hp.inclusiveRight?hs.to>=hn:hs.to>hn);if(hm||hs.from==hn&&hp.type=="bookmark"&&(!hq||hs.marker.insertLeft)){var hk=hs.from==null||(hp.inclusiveLeft?hs.from<=hn:hs.from<hn);(hr||(hr=[])).push(new eT(hp,hk?null:hs.from-hn,hs.to==null?null:hs.to-hn))}}}return hr}function eV(hF,hv){if(hv.full){return null}var hm=cv(hF,hv.from.line)&&f0(hF,hv.from.line).markedSpans;var ht=cv(hF,hv.to.line)&&f0(hF,hv.to.line).markedSpans;if(!hm&&!ht){return null}var hs=hv.from.ch,hA=hv.to.ch,hx=cD(hv.from,hv.to)==0;var hr=a1(hm,hs,hx);var hu=aK(ht,hA,hx);var hy=hv.text.length==1,hp=gt(hv.text).length+(hy?hs:0);if(hr){for(var hD=0;hD<hr.length;++hD){var hC=hr[hD];if(hC.to==null){var hw=fV(hu,hC.marker);if(!hw){hC.to=hs}else{if(hy){hC.to=hw.to==null?null:hw.to+hp}}}}}if(hu){for(var hq=0;hq<hu.length;++hq){var hB=hu[hq];if(hB.to!=null){hB.to+=hp}if(hB.from==null){var hl=fV(hr,hB.marker);if(!hl){hB.from=hp;if(hy){(hr||(hr=[])).push(hB)}}}else{hB.from+=hp;if(hy){(hr||(hr=[])).push(hB)}}}}if(hr){hr=t(hr)}if(hu&&hu!=hr){hu=t(hu)}var hE=[hr];if(!hy){var hz=hv.text.length-2,hk;if(hz>0&&hr){for(var ho=0;ho<hr.length;++ho){if(hr[ho].to==null){(hk||(hk=[])).push(new eT(hr[ho].marker,null,null))}}}for(var hn=0;hn<hz;++hn){hE.push(hk)}hE.push(hu)}return hE}function t(hl){for(var hk=0;hk<hl.length;++hk){var hm=hl[hk];if(hm.from!=null&&hm.from==hm.to&&hm.marker.clearWhenEmpty!==false){hl.splice(hk--,1)}}if(!hl.length){return null}return hl}function da(hw,hu,hv){var ho=null;hw.iter(hu.line,hv.line+1,function(hx){if(hx.markedSpans){for(var hy=0;hy<hx.markedSpans.length;++hy){var hz=hx.markedSpans[hy].marker;if(hz.readOnly&&(!ho||dP(ho,hz)==-1)){(ho||(ho=[])).push(hz)}}}});if(!ho){return null}var hp=[{from:hu,to:hv}];for(var hq=0;hq<ho.length;++hq){var hr=ho[hq],hm=hr.find(0);for(var hn=0;hn<hp.length;++hn){var hl=hp[hn];if(cD(hl.to,hm.from)<0||cD(hl.from,hm.to)>0){continue}var ht=[hn,1],hk=cD(hl.from,hm.from),hs=cD(hl.to,hm.to);if(hk<0||!hr.inclusiveLeft&&!hk){ht.push({from:hl.from,to:hm.from})}if(hs>0||!hr.inclusiveRight&&!hs){ht.push({from:hm.to,to:hl.to})}hp.splice.apply(hp,ht);hn+=ht.length-3}}return hp}function g8(hk){var hm=hk.markedSpans;if(!hm){return}for(var hl=0;hl<hm.length;++hl){hm[hl].marker.detachLine(hk)}hk.markedSpans=null}function dw(hk,hm){if(!hm){return}for(var hl=0;hl<hm.length;++hl){hm[hl].marker.attachLine(hk)}hk.markedSpans=hm}function x(i){return i.inclusiveLeft?-1:0}function ch(i){return i.inclusiveRight?1:0}function en(hm,hk){var ho=hm.lines.length-hk.lines.length;if(ho!=0){return ho}var hl=hm.find(),hp=hk.find();var i=cD(hl.from,hp.from)||x(hm)-x(hk);if(i){return -i}var hn=cD(hl.to,hp.to)||ch(hm)-ch(hk);if(hn){return hn}return hk.id-hm.id}function bi(hl,hp){var hk=bj&&hl.markedSpans,ho;if(hk){for(var hn=(void 0),hm=0;hm<hk.length;++hm){hn=hk[hm];if(hn.marker.collapsed&&(hp?hn.from:hn.to)==null&&(!ho||en(ho,hn.marker)<0)){ho=hn.marker}}}return ho}function fy(i){return bi(i,true)}function e9(i){return bi(i,false)}function cC(hl,hn){var hk=bj&&hl.markedSpans,hp;if(hk){for(var hm=0;hm<hk.length;++hm){var ho=hk[hm];if(ho.marker.collapsed&&(ho.from==null||ho.from<hn)&&(ho.to==null||ho.to>hn)&&(!hp||en(hp,ho.marker)<0)){hp=ho.marker}}}return hp}function B(hs,hk,hq,hr,ho){var hv=f0(hs,hk);
vendor: 4,360 bytes, line 90
90var hl=bj&&hv.markedSpans;if(hl){for(var hn=0;hn<hl.length;++hn){var hm=hl[hn];if(!hm.marker.collapsed){continue}var hu=hm.marker.find(0);var ht=cD(hu.from,hq)||x(hm.marker)-x(ho);var hp=cD(hu.to,hr)||ch(hm.marker)-ch(ho);if(ht>=0&&hp<=0||ht<=0&&hp>=0){continue}if(ht<=0&&(hm.marker.inclusiveRight&&ho.inclusiveLeft?cD(hu.to,hq)>=0:cD(hu.to,hq)>0)||ht>=0&&(hm.marker.inclusiveRight&&ho.inclusiveLeft?cD(hu.from,hr)<=0:cD(hu.from,hr)<0)){return true}}}}function A(hk){var i;while(i=fy(hk)){hk=i.find(-1,true).line}return hk}function cJ(hk){var i;while(i=e9(hk)){hk=i.find(1,true).line}return hk}function g(hl){var i,hk;while(i=e9(hl)){hl=i.find(1,true).line;(hk||(hk=[])).push(hl)}return hk}function a7(hm,hk){var i=f0(hm,hk),hl=A(i);if(i==hl){return hk}return b7(hl)}function eC(hm,hl){if(hl>hm.lastLine()){return hl}var hk=f0(hm,hl),i;if(!gg(hm,hk)){return hl}while(i=e9(hk)){hk=i.find(1,true).line}return b7(hk)+1}function gg(ho,hl){var hk=bj&&hl.markedSpans;if(hk){for(var hn=(void 0),hm=0;hm<hk.length;++hm){hn=hk[hm];if(!hn.marker.collapsed){continue}if(hn.from==null){return true}if(hn.marker.widgetNode){continue}if(hn.from==0&&hn.marker.inclusiveLeft&&Y(ho,hl,hn)){return true}}}}function Y(hp,hl,hn){if(hn.to==null){var hk=hn.marker.find(1,true);return Y(hp,hk.line,fV(hk.line.markedSpans,hn.marker))}if(hn.marker.inclusiveRight&&hn.to==hl.text.length){return true}for(var ho=(void 0),hm=0;hm<hl.markedSpans.length;++hm){ho=hl.markedSpans[hm];if(ho.marker.collapsed&&!ho.marker.widgetNode&&ho.from==hn.to&&(ho.to==null||ho.to!=hn.from)&&(ho.marker.inclusiveLeft||hn.marker.inclusiveRight)&&Y(hp,hl,ho)){return true}}}function b6(hm){hm=A(hm);var ho=0,hl=hm.parent;for(var hn=0;hn<hl.lines.length;++hn){var hk=hl.lines[hn];if(hk==hm){break}else{ho+=hk.height}}for(var hp=hl.parent;hp;hl=hp,hp=hl.parent){for(var hr=0;hr<hp.children.length;++hr){var hq=hp.children[hr];if(hq==hl){break}else{ho+=hq.height}}}return ho}function eY(hl){if(hl.height==0){return 0}var hk=hl.text.length,i,ho=hl;while(i=fy(ho)){var hm=i.find(0,true);ho=hm.from.line;hk+=hm.from.ch-hm.to.ch}ho=hl;while(i=e9(ho)){var hn=i.find(0,true);hk-=ho.text.length-hn.from.ch;ho=hn.to.line;hk+=ho.text.length-hn.to.ch}return hk}function f(i){var hl=i.display,hk=i.doc;hl.maxLine=f0(hk,hk.first);hl.maxLineLength=eY(hl.maxLine);hl.maxLineChanged=true;hk.iter(function(hn){var hm=eY(hn);if(hm>hl.maxLineLength){hl.maxLineLength=hm;hl.maxLine=hn}})}var g4=function(hl,hk,i){this.text=hl;dw(this,hk);this.height=i?i(this):1};g4.prototype.lineNo=function(){return b7(this)};bS(g4);function eZ(hk,hn,hl,i){hk.text=hn;if(hk.stateAfter){hk.stateAfter=null}if(hk.styles){hk.styles=null}if(hk.order!=null){hk.order=null}g8(hk);dw(hk,hl);var hm=i?i(hk):1;if(hm!=hk.height){g5(hk,hm)}}function bU(i){i.parent=null;g8(i)}var et={},co={};function fG(hl,hk){if(!hl||/^\s*$/.test(hl)){return null}var i=hk.addModeClass?co:et;return i[hl]||(i[hl]=hl.replace(/\S+/g,"cm-$&"))}function fB(hq,hp){var ho=g6("span",null,null,dt?"padding-right: .1px":null);var hn={pre:g6("pre",[ho],"CodeMirror-line"),content:ho,col:0,pos:0,cm:hq,trailingSpace:false,splitSpaces:hq.getOption("lineWrapping")};hp.measure={};for(var hm=0;hm<=(hp.rest?hp.rest.length:0);hm++){var hs=hm?hp.rest[hm-1]:hp.line,hl=(void 0);hn.pos=0;hn.addToken=v;if(b8(hq.display.measure)&&(hl=a(hs,hq.doc.direction))){hn.addToken=Z(hn.addToken,hl)}hn.map=[];var hk=hp!=hq.display.externalMeasured&&b7(hs);bF(hs,hn,dC(hq,hs,hk));if(hs.styleClasses){if(hs.styleClasses.bgClass){hn.bgClass=gN(hs.styleClasses.bgClass,hn.bgClass||"")}if(hs.styleClasses.textClass){hn.textClass=gN(hs.styleClasses.textClass,hn.textClass||"")}}if(hn.map.length==0){hn.map.push(0,0,hn.content.appendChild(bE(hq.display.measure)))}if(hm==0){hp.measure.map=hn.map;hp.measure.cache={}}else{(hp.measure.maps||(hp.measure.maps=[])).push(hn.map);(hp.measure.caches||(hp.measure.caches=[])).push({})}}if(dt){var hr=hn.content.lastChild;if(/\bcm-tab\b/.test(hr.className)||(hr.querySelector&&hr.querySelector(".cm-tab"))){hn.content.className="cm-tab-wrap-hack"}}aN(hq,"renderLine",hq,hp.line,hn.pre);if(hn.pre.className){hn.textClass=gN(hn.pre.className,hn.textClass||"")}return hn}function fZ(hk){var i=g0("span","\u2022","cm-invalidchar");i.title="\\u"+hk.charCodeAt(0).toString(16);i.setAttribute("aria-label",i.title);return i}function v(hw,hq,hB,hy,ht,hp,ho){if(!hq){return}
90var hA=hw.splitSpaces?c6(hq,hw.trailingSpace):hq;var i=hw.cm.state.specialChars,hk=false;var hz;if(!i.test(hq)){hw.col+=hq.length;hz=document.createTextNode(hA);hw.map.push(hw.pos,hw.pos+hq.length,hz);if(ef&&n<9){hk=true}hw.pos+=hq.length}else{hz=document.createDocumentFragment();var hm=0;while(true){i.lastIndex=hm;var hx=i.exec(hq);var hD=hx?hx.index-hm:hq.length-hm;if(hD){var hs=document.createTextNode(hA.slice(hm,hm+hD));if(ef&&n<9){hz.appendChild(g0("span",[hs]))}else{hz.appendChild(hs)}hw.map.push(hw.pos,hw.pos+hD,hs);hw.col+=hD;hw.pos+=hD}if(!hx){break}hm+=hD+1;var hC=(void 0);if(hx[0]=="\t"){var hu=hw.cm.options.tabSize,hr=hu-hw.col%hu;hC=hz.appendChild(g0("span",cQ(hr),"cm-tab"));hC.setAttribute("role","presentation");hC.setAttribute("cm-text","\t");hw.col+=hr}else{if(hx[0]=="\r"||hx[0]=="\n"){hC=hz.appendChild(g0("span",hx[0]=="\r"?"\u240d":"\u2424","cm-invalidchar"));hC.setAttribute("cm-text",hx[0]);hw.col+=1}else{hC=hw.cm.options.specialCharPlaceholder(hx[0]);hC.setAttribute("cm-text",hx[0]);if(ef&&n<9){hz.appendChild(g0("span",[hC]))}else{hz.appendChild(hC)}hw.col+=1}}hw.map.push(hw.pos,hw.pos+1,hC);hw.pos++}}hw.trailingSpace=hA.charCodeAt(hq.length-1)==32;if(hB||hy||ht||hk||hp){var hl=hB||"";if(hy){hl+=hy}if(ht){hl+=ht}var hn=g0("span",[hz],hl,hp);if(ho){for(var hv in ho){if(ho.hasOwnProperty(hv)&&hv!="style"&&hv!="class"){hn.setAttribute(hv,ho[hv])}}}return hw.content.appendChild(hn)}hw.content.appendChild(hz)}function c6(hp,ho){if(hp.length>1&&!/  /.test(hp)){return hp}var hl=ho,hk="";for(var hm=0;hm<hp.length;hm++){var hn=hp.charAt(hm);if(hn==" "&&hl&&(hm==hp.length-1||hp.charCodeAt(hm+1)==32)){hn="\u00a0"}hk+=hn;hl=hn==" "}return hk}function Z(hk,i){return function(ht,hu,hl,hq,hv,hs,hp){hl=hl?hl+" cm-force-border":"cm-force-border";var hm=ht.pos,ho=hm+hu.length;for(;;){var hn=(void 0);for(var hr=0;hr<i.length;hr++){hn=i[hr];if(hn.to>hm&&hn.from<=hm){break}}if(hn.to>=ho){return hk(ht,hu,hl,hq,hv,hs,hp)}hk(ht,hu.slice(0,hn.to-hm),hl,hq,null,hs,hp);hq=null;hu=hu.slice(hn.to-hm);hm=hn.to}}}function ak(hk,hm,i,hl){var hn=!hl&&i.widgetNode;if(hn){hk.map.push(hk.pos,hk.pos+hm,hn)}if(!hl&&hk.cm.display.input.needsContentAttribute){if(!hn){hn=hk.content.appendChild(document.createElement("span"))}hn.setAttribute("cm-marker",i.id)}if(hn){hk.cm.display.input.setUneditable(hn);hk.content.appendChild(hn)}hk.pos+=hm;hk.trailingSpace=false}function bF(hw,hE,hv){var hp=hw.markedSpans,ht=hw.text,hB=0;if(!hp){for(var hq=1;hq<hv.length;hq+=2){hE.addToken(hE,ht.slice(hB,hB=hv[hq]),fG(hv[hq+1],hE.cm.options))}return}var hI=ht.length,ho=0,hH=1,hz="",hJ,hx;var hN=0,hk,hM,hA,hm,hs;for(;;){if(hN==ho){hk=hM=hA=hx="";hs=null;hm=null;hN=Infinity;var hr=[],hu=(void 0);for(var hF=0;hF<hp.length;++hF){var hG=hp[hF],hD=hG.marker;if(hD.type=="bookmark"&&hG.from==ho&&hD.widgetNode){hr.push(hD)}else{if(hG.from<=ho&&(hG.to==null||hG.to>ho||hD.collapsed&&hG.to==ho&&hG.from==ho)){if(hG.to!=null&&hG.to!=ho&&hN>hG.to){hN=hG.to;hM=""}if(hD.className){hk+=" "+hD.className}if(hD.css){hx=(hx?hx+";":"")+hD.css}if(hD.startStyle&&hG.from==ho){hA+=" "+hD.startStyle}if(hD.endStyle&&hG.to==hN){(hu||(hu=[])).push(hD.endStyle,hG.to)}if(hD.title){(hs||(hs={})).title=hD.title}if(hD.attributes){for(var hC in hD.attributes){(hs||(hs={}))[hC]=hD.attributes[hC]}}if(hD.collapsed&&(!hm||en(hm.marker,hD)<0)){hm=hG}}else{if(hG.from>ho&&hN>hG.from){hN=hG.from}}}}if(hu){for(var hL=0;hL<hu.length;hL+=2){if(hu[hL+1]==hN){hM+=" "+hu[hL]}}}if(!hm||hm.from==ho){for(var hK=0;hK<hr.length;++hK){ak(hE,0,hr[hK])}}if(hm&&(hm.from||0)==ho){ak(hE,(hm.to==null?hI+1:hm.to)-ho,hm.marker,hm.from==null);if(hm.to==null){return}if(hm.to==ho){hm=false}}}if(ho>=hI){break}var hy=Math.min(hI,hN);while(true){if(hz){var hl=ho+hz.length;if(!hm){var hn=hl>hy?hz.slice(0,hy-ho):hz;hE.addToken(hE,hn,hJ?hJ+hk:hk,hA,ho+hn.length==hN?hM:"",hx,hs)}if(hl>=hy){hz=hz.slice(hy-ho);ho=hy;break}ho=hl;hA=""}hz=ht.slice(hB,hB=hv[hH++]);hJ=fG(hv[hH++],hE.cm.options)}}}function bN(hl,i,hk){this.line=i;this.rest=g(i);this.size=this.rest?b7(gt(this.rest))-hk+1:1;this.node=this.text=null;this.hidden=gg(hl,i)}function fF(i,hp,ho){var hn=[],hl;for(var hm=hp;hm<ho;hm=hl){var hk=new bN(i.doc,f0(i.doc,hm),hm);hl=hm+hk.size;hn.push(hk)}return hn}var bH=null;function fc(i){if(bH){bH.ops.push(i)}else{i.ownsGroup=bH={ops:[i],delayedCallbacks:[]}}}function dm(hn){var hm=hn.delayedCallbacks,hl=0;do{for(;hl<hm.length;hl++){hm[hl].call(null)}for(var hk=0;hk<hn.ops.length;hk++){var ho=hn.ops[hk];if(ho.cursorActivityHandlers){while(ho.cursorActivityCalled<ho.cursorActivityHandlers.length){ho.cursorActivityHandlers[ho.cursorActivityCalled++].call(null,ho.cm)}}}}while(hl<hm.length)}function cj(hl,hk){var i=hl.ownsGroup;if(!i){return}try{dm(i)}finally{bH=null;hk(i)}}var bR=null;function al(hq,ho){var hk=eW(hq,ho);if(!hk.length){return}var hm=Array.prototype.slice.call(arguments,2),hp;if(bH){hp=bH.delayedCallbacks}else{if(bR){hp=bR}else{hp=bR=[];setTimeout(aW,0)}}var hl=function(hr){hp.push(function(){return hk[hr].apply(null,hm)})};for(var hn=0;hn<hk.length;++hn){hl(hn)}}function aW(){var hk=bR;bR=null;for(var hl=0;hl<hk.length;++hl){hk[hl]()}}function ai(i,hl,hn,ho){for(var hk=0;hk<hl.changes.length;hk++){var hm=hl.changes[hk];if(hm=="text"){f6(i,hl)}else{if(hm=="gutter"){dM(i,hl,hn,ho)}else{if(hm=="class"){ea(i,hl)}else{if(hm=="widget"){aw(i,hl,ho)}}}}}hl.changes=null}
90function gv(i){if(i.node==i.text){i.node=g0("div",null,null,"position: relative");if(i.text.parentNode){i.text.parentNode.replaceChild(i.node,i.text)}i.node.appendChild(i.text);if(ef&&n<8){i.node.style.zIndex=2}}return i.node}function e8(i,hl){var hk=hl.bgClass?hl.bgClass+" "+(hl.line.bgClass||""):hl.line.bgClass;if(hk){hk+=" CodeMirror-linebackground"}if(hl.background){if(hk){hl.background.className=hk}else{hl.background.parentNode.removeChild(hl.background);hl.background=null}}else{if(hk){var hm=gv(hl);hl.background=hm.insertBefore(g0("div",null,hk),hm.firstChild);i.display.input.setUneditable(hl.background)}}}function es(i,hk){var hl=i.display.externalMeasured;if(hl&&hl.line==hk.line){i.display.externalMeasured=null;hk.measure=hl.measure;return hl.built}return fB(i,hk)}function f6(i,hm){var hk=hm.text.className;var hl=es(i,hm);if(hm.text==hm.node){hm.node=hl.pre}hm.text.parentNode.replaceChild(hl.pre,hm.text);hm.text=hl.pre;if(hl.bgClass!=hm.bgClass||hl.textClass!=hm.textClass){hm.bgClass=hl.bgClass;hm.textClass=hl.textClass;ea(i,hm)}else{if(hk){hm.text.className=hk}}}function ea(hk,hl){e8(hk,hl);if(hl.line.wrapClass){gv(hl).className=hl.line.wrapClass}else{if(hl.node!=hl.text){hl.node.className=""}}var i=hl.textClass?hl.textClass+" "+(hl.line.textClass||""):hl.line.textClass;hl.text.className=i||""}function dM(hr,hp,ho,hq){if(hp.gutter){hp.node.removeChild(hp.gutter);hp.gutter=null}if(hp.gutterBackground){hp.node.removeChild(hp.gutterBackground);hp.gutterBackground=null}if(hp.line.gutterClass){var hk=gv(hp);hp.gutterBackground=g0("div",null,"CodeMirror-gutter-background "+hp.line.gutterClass,("left: "+(hr.options.fixedGutter?hq.fixedPos:-hq.gutterTotalWidth)+"px; width: "+(hq.gutterTotalWidth)+"px"));hr.display.input.setUneditable(hp.gutterBackground);hk.insertBefore(hp.gutterBackground,hp.text)}var hm=hp.line.gutterMarkers;if(hr.options.lineNumbers||hm){var hs=gv(hp);var hn=hp.gutter=g0("div",null,"CodeMirror-gutter-wrapper",("left: "+(hr.options.fixedGutter?hq.fixedPos:-hq.gutterTotalWidth)+"px"));hr.display.input.setUneditable(hn);hs.insertBefore(hn,hp.text);if(hp.line.gutterClass){hn.className+=" "+hp.line.gutterClass}if(hr.options.lineNumbers&&(!hm||!hm["CodeMirror-linenumbers"])){hp.lineNumber=hn.appendChild(g0("div",e5(hr.options,ho),"CodeMirror-linenumber CodeMirror-gutter-elt",("left: "+(hq.gutterLeft["CodeMirror-linenumbers"])+"px; width: "+(hr.display.lineNumInnerWidth)+"px")))}if(hm){for(var hl=0;hl<hr.display.gutterSpecs.length;++hl){var i=hr.display.gutterSpecs[hl].className,ht=hm.hasOwnProperty(i)&&hm[i];if(ht){hn.appendChild(g0("div",[ht],"CodeMirror-gutter-elt",("left: "+(hq.gutterLeft[i])+"px; width: "+(hq.gutterWidth[i])+"px")))}}}}}function aw(i,hl,ho){if(hl.alignable){hl.alignable=null}var hk=X("CodeMirror-linewidget");for(var hn=hl.node.firstChild,hm=(void 0);hn;hn=hm){hm=hn.nextSibling;if(hk.test(hn.className)){hl.node.removeChild(hn)}}gd(i,hl,ho)}function aO(i,hl,hm,hn){var hk=es(i,hl);hl.text=hl.node=hk.pre;if(hk.bgClass){hl.bgClass=hk.bgClass}if(hk.textClass){hl.textClass=hk.textClass}ea(i,hl);dM(i,hl,hm,hn);gd(i,hl,hn);return hl.node}function gd(hk,hm,hn){g3(hk,hm.line,hm,hn,true);if(hm.rest){for(var hl=0;hl<hm.rest.length;hl++){g3(hk,hm.rest[hl],hm,hn,false)}}}function g3(hs,ht,hp,hr,hn){if(!ht.widgets){return}var hk=gv(hp);for(var hm=0,hq=ht.widgets;hm<hq.length;++hm){var ho=hq[hm],hl=g0("div",[ho.node],"CodeMirror-linewidget"+(ho.className?" "+ho.className:""));if(!ho.handleMouseEvents){hl.setAttribute("cm-ignore-events","true")}bY(ho,hl,hp,hr);hs.display.input.setUneditable(hl);if(hn&&ho.above){hk.insertBefore(hl,hp.gutter||hp.text)}else{hk.appendChild(hl)}al(ho,"redraw")}}function bY(hm,hl,i,hn){if(hm.noHScroll){(i.alignable||(i.alignable=[])).push(hl);var hk=hn.wrapperWidth;hl.style.left=hn.fixedPos+"px";if(!hm.coverGutter){hk-=hn.gutterTotalWidth;hl.style.paddingLeft=hn.gutterTotalWidth+"px"}hl.style.width=hk+"px"}if(hm.coverGutter){hl.style.zIndex=5;hl.style.position="relative";if(!hm.noHScroll){hl.style.marginLeft=-hn.gutterTotalWidth+"px"}}}function dr(hl){if(hl.height!=null){return hl.height}var i=hl.doc.cm;if(!i){return 0}if(!ha(document.body,hl.node)){var hk="position: relative;";if(hl.coverGutter){hk+="margin-left: -"+i.display.gutters.offsetWidth+"px;"}if(hl.noHScroll){hk+="width: "+i.display.wrapper.clientWidth+"px;"}cd(i.display.measure,g0("div",[hl.node],null,hk))}return hl.height=hl.node.parentNode.offsetHeight}function bn(hk,i){for(var hl=Q(i);hl!=hk.wrapper;hl=hl.parentNode){if(!hl||(hl.nodeType==1&&hl.getAttribute("cm-ignore-events")=="true")||(hl.parentNode==hk.sizer&&hl!=hk.mover)){return true}}}function fU(i){return i.lineSpace.offsetTop}function b1(i){return i.mover.offsetHeight-i.lineSpace.offsetHeight}
90function fQ(hm){if(hm.cachedPaddingH){return hm.cachedPaddingH}var hl=cd(hm.measure,g0("pre","x","CodeMirror-line-like"));var i=window.getComputedStyle?window.getComputedStyle(hl):hl.currentStyle;var hk={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};if(!isNaN(hk.left)&&!isNaN(hk.right)){hm.cachedPaddingH=hk}return hk}function dl(i){return ed-i.display.nativeBarWidth}function dS(i){return i.display.scroller.clientWidth-dl(i)-i.display.barWidth}function dn(i){return i.display.scroller.clientHeight-dl(i)-i.display.barHeight}function cF(hr,hn,hq){var hm=hr.options.lineWrapping;var ho=hm&&dS(hr);if(!hn.measure.heights||hm&&hn.measure.width!=ho){var hp=hn.measure.heights=[];if(hm){hn.measure.width=ho;var ht=hn.text.firstChild.getClientRects();for(var hk=0;hk<ht.length-1;hk++){var hs=ht[hk],hl=ht[hk+1];if(Math.abs(hs.bottom-hl.bottom)>2){hp.push((hs.bottom+hl.top)/2-hq.top)}}}hp.push(hq.bottom-hq.top)}}function cU(hm,hk,hn){if(hm.line==hk){return{map:hm.measure.map,cache:hm.measure.cache}}for(var hl=0;hl<hm.rest.length;hl++){if(hm.rest[hl]==hk){return{map:hm.measure.maps[hl],cache:hm.measure.caches[hl]}}}for(var ho=0;ho<hm.rest.length;ho++){if(b7(hm.rest[ho])>hn){return{map:hm.measure.maps[ho],cache:hm.measure.caches[ho],before:true}}}}function dv(i,hl){hl=A(hl);var hn=b7(hl);var hk=i.display.externalMeasured=new bN(i.doc,hl,hn);hk.lineN=hn;var hm=hk.built=fB(i,hk);hk.text=hm.pre;cd(i.display.lineMeasure,hm.pre);return hk}function eR(i,hk,hm,hl){return G(i,bh(i,hk),hm,hl)}function fX(i,hl){if(hl>=i.display.viewFrom&&hl<i.display.viewTo){return i.display.view[dY(i,hl)]}var hk=i.display.externalMeasured;if(hk&&hl>=hk.lineN&&hl<hk.lineN+hk.size){return hk}}function bh(i,hl){var hm=b7(hl);var hk=fX(i,hm);if(hk&&!hk.text){hk=null}else{if(hk&&hk.changes){ai(i,hk,hm,fY(i));i.curOp.forceUpdate=true}}if(!hk){hk=dv(i,hl)}var hn=cU(hk,hl,hm);return{line:hl,view:hk,rect:null,map:hn.map,cache:hn.cache,before:hn.before,hasHeights:false}}function G(i,hp,hn,hk,hm){if(hp.before){hn=-1}var hl=hn+(hk||""),ho;if(hp.cache.hasOwnProperty(hl)){ho=hp.cache[hl]}else{if(!hp.rect){hp.rect=hp.view.text.getBoundingClientRect()}if(!hp.hasHeights){cF(i,hp.view,hp.rect);hp.hasHeights=true}ho=l(i,hp,hn,hk);if(!ho.bogus){hp.cache[hl]=ho}}return{left:ho.left,right:ho.right,top:hm?ho.rtop:ho.top,bottom:hm?ho.rbottom:ho.bottom}}var fg={left:0,right:0,top:0,bottom:0};function aU(ht,hk,hq){var hm,hl,ho,hr,hn,hs;for(var hp=0;hp<ht.length;hp+=3){hn=ht[hp];hs=ht[hp+1];if(hk<hn){hl=0;ho=1;hr="left"}else{if(hk<hs){hl=hk-hn;ho=hl+1}else{if(hp==ht.length-3||hk==hs&&ht[hp+3]>hk){ho=hs-hn;hl=ho-1;if(hk>=hs){hr="right"}}}}if(hl!=null){hm=ht[hp+2];if(hn==hs&&hq==(hm.insertLeft?"left":"right")){hr=hq}if(hq=="left"&&hl==0){while(hp&&ht[hp-2]==ht[hp-3]&&ht[hp-1].insertLeft){hm=ht[(hp-=3)+2];hr="left"}}if(hq=="right"&&hl==hs-hn){while(hp<ht.length-3&&ht[hp+3]==ht[hp+4]&&!ht[hp+5].insertLeft){hm=ht[(hp+=3)+2];hr="right"}}break}}return{node:hm,start:hl,end:ho,collapse:hr,coverStart:hn,coverEnd:hs}}function fC(hl,hk){var hn=fg;if(hk=="left"){for(var hm=0;hm<hl.length;hm++){if((hn=hl[hm]).left!=hn.right){break}}}else{for(var ho=hl.length-1;ho>=0;ho--){if((hn=hl[ho]).left!=hn.right){break}}}return hn}function l(hs,hC,hv,hp){var ht=aU(hC.map,hv,hp);var hA=ht.node,ho=ht.start,hn=ht.end,hk=ht.collapse;var hl;if(hA.nodeType==3){for(var hq=0;hq<4;hq++){while(ho&&f9(hC.line.text.charAt(ht.coverStart+ho))){--ho}while(ht.coverStart+hn<ht.coverEnd&&f9(hC.line.text.charAt(ht.coverStart+hn))){++hn}if(ef&&n<9&&ho==0&&hn==ht.coverEnd-ht.coverStart){hl=hA.parentNode.getBoundingClientRect()}else{hl=fC(cM(hA,ho,hn).getClientRects(),hp)}if(hl.left||hl.right||ho==0){break}hn=ho;ho=ho-1;hk="right"}if(ef&&n<11){hl=fw(hs.display.measure,hl)}}else{if(ho>0){hk=hp="right"}var hm;if(hs.options.lineWrapping&&(hm=hA.getClientRects()).length>1){hl=hm[hp=="right"?hm.length-1:0]}else{hl=hA.getBoundingClientRect()}}if(ef&&n<9&&!ho&&(!hl||!hl.left&&!hl.right)){var hr=hA.parentNode.getClientRects()[0];if(hr){hl={left:hr.left,right:hr.left+d7(hs.display),top:hr.top,bottom:hr.bottom}}else{hl=fg}}var hy=hl.top-hC.rect.top,hw=hl.bottom-hC.rect.top;var hE=(hy+hw)/2;var hD=hC.view.measure.heights;var hB=0;for(;hB<hD.length-1;hB++){if(hE<hD[hB]){break}}var hz=hB?hD[hB-1]:0,hx=hD[hB];var hu={left:(hk=="right"?hl.right:hl.left)-hC.rect.left,right:(hk=="left"?hl.left:hl.right)-hC.rect.left,top:hz,bottom:hx};if(!hl.left&&!hl.right){hu.bogus=true}if(!hs.options.singleCursorHeightPerLine){hu.rtop=hy;hu.rbottom=hw}return hu}function fw(hl,hm){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!aV(hl)){return hm}var hk=screen.logicalXDPI/screen.deviceXDPI;var i=screen.logicalYDPI/screen.deviceYDPI;return{left:hm.left*hk,right:hm.right*hk,top:hm.top*i,bottom:hm.bottom*i}}function aD(hl){if(hl.measure){hl.measure.cache={};hl.measure.heights=null;if(hl.rest){for(var hk=0;hk<hl.rest.length;hk++){hl.measure.caches[hk]={}}}}}function aZ(hk){hk.display.externalMeasure=null;eA(hk.display.lineMeasure);for(var hl=0;hl<hk.display.view.length;hl++){aD(hk.display.view[hl])}}function aq(i){aZ(i);i.display.cachedCharWidth=i.display.cachedTextHeight=i.display.cachedPaddingH=null;if(!i.options.lineWrapping){i.display.maxLineChanged=true}i.display.lineNumChars=null}function cV(){if(dJ&&aX){return -(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft))}return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function cT(){if(dJ&&aX){return -(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop))}return window.pageYOffset||(document.documentElement||document.body).scrollTop}function ee(hl){var hk=0;if(hl.widgets){for(var hm=0;hm<hl.widgets.length;++hm){if(hl.widgets[hm].above){hk+=dr(hl.widgets[hm])}}}return hk}function fz(hp,hm,ho,hk,hl){if(!hl){var hq=ee(hm);ho.top+=hq;ho.bottom+=hq}if(hk=="line"){return ho}if(!hk){hk="local"}var hn=b6(hm);if(hk=="local"){hn+=fU(hp.display)}else{hn-=hp.display.viewOffset}if(hk=="page"||hk=="window"){var i=hp.display.lineSpace.getBoundingClientRect();hn+=i.top+(hk=="window"?0:cT());var hr=i.left+(hk=="window"?0:cV());ho.left+=hr;ho.right+=hr}ho.top+=hn;ho.bottom+=hn;return ho}function hf(hk,hn,hl){if(hl=="div"){return hn}var hp=hn.left,ho=hn.top;if(hl=="page"){hp-=cV();ho-=cT()}else{if(hl=="local"||!hl){var hm=hk.display.sizer.getBoundingClientRect();hp+=hm.left;ho+=hm.top}}var i=hk.display.lineSpace.getBoundingClientRect();return{left:hp-i.left,top:ho-i.top}}function dc(i,hn,hm,hl,hk){if(!hl){hl=f0(i.doc,hn.line)}return fz(i,hl,eR(i,hl,hn.ch,hk),hm)}function er(hu,hs,hl,hp,hw,hq){hp=hp||f0(hu.doc,hs.line);if(!hw){hw=bh(hu,hp)}function hn(hz,hy){var hx=G(hu,hw,hz,hy?"right":"left",hq);if(hy){hx.left=hx.right}else{hx.right=hx.left}return fz(hu,hp,hx,hl)}var ho=a(hp,hu.doc.direction),i=hs.ch,ht=hs.sticky;if(i>=hp.text.length){i=hp.text.length;ht="before"}else{if(i<=0){i=0;ht="after"}}if(!ho){return hn(ht=="before"?i-1:i,ht=="before")}function hv(hA,hx,hB){var hy=ho[hx],hz=hy.level==1;return hn(hB?hA-1:hA,hz!=hB)}var hk=aR(ho,i,ht);var hr=fO;var hm=hv(i,hk,ht=="before");if(hr!=null){hm.other=hv(i,hr,ht!="before")}return hm}function eb(i,hn){var hm=0;hn=gy(i.doc,hn);if(!i.options.lineWrapping){hm=d7(i.display)*hn.ch}var hk=f0(i.doc,hn.line);var hl=b6(hk)+fU(i.display);return{left:hm,right:hm,top:hl,bottom:hl+hk.height}}function gY(i,hk,hm,hl,ho){var hn=ab(i,hk,hm);hn.xRel=ho;if(hl){hn.outside=hl}return hn}function gG(hq,ho,hn){var hp=hq.doc;hn+=hq.display.viewOffset;if(hn<0){return gY(hp.first,0,null,-1,-1)}var hm=b0(hp,hn),hr=hp.first+hp.size-1;if(hm>hr){return gY(hp.first+hp.size-1,f0(hp,hr).text.length,null,1,1)}if(ho<0){ho=0}var hl=f0(hp,hm);for(;;){var hs=ds(hq,hl,hm,ho,hn);var hk=cC(hl,hs.ch+(hs.xRel>0||hs.outside>0?1:0));if(!hk){return hs}var i=hk.find(1);if(i.line==hm){return i}hl=f0(hp,hm=i.line)}}function bC(i,hl,hn,ho){ho-=ee(hl);var hk=hl.text.length;
90var hm=cN(function(hp){return G(i,hn,hp-1).bottom<=ho},hk,0);hk=cN(function(hp){return G(i,hn,hp).top>ho},hm,hk);return{begin:hm,end:hk}}function bA(i,hk,hm,hn){if(!hm){hm=bh(i,hk)}var hl=fz(i,hk,G(i,hm,hn),"line").top;return bC(i,hk,hm,hl)}function az(hk,i,hm,hl){return hk.bottom<=hm?false:hk.top>hm?true:(hl?hk.left:hk.right)>i}function ds(hm,hk,hB,hp,ho){ho-=b6(hk);var ht=bh(hm,hk);var hD=ee(hk);var hA=0,hl=hk.text.length,hx=true;var hv=a(hk,hm.doc.direction);if(hv){var hu=(hm.options.lineWrapping?gV:gA)(hm,hk,hB,ht,hv,hp,ho);hx=hu.level!=1;hA=hx?hu.from:hu.to-1;hl=hx?hu.to:hu.from-1}var hn=null,hr=null;var hs=cN(function(hE){var hF=G(hm,ht,hE);hF.top+=hD;hF.bottom+=hD;if(!az(hF,hp,ho,false)){return false}if(hF.top<=ho&&hF.left<=hp){hn=hE;hr=hF}return true},hA,hl);var i,hC,hz=false;if(hr){var hy=hp-hr.left<hr.right-hp,hq=hy==hx;hs=hn+(hq?0:1);hC=hq?"after":"before";i=hy?hr.left:hr.right}else{if(!hx&&(hs==hl||hs==hA)){hs++}hC=hs==0?"after":hs==hk.text.length?"before":(G(hm,ht,hs-(hx?1:0)).bottom+hD<=ho)==hx?"after":"before";var hw=er(hm,ab(hB,hs,hC),"line",hk,ht);i=hw.left;hz=ho<hw.top?-1:ho>=hw.bottom?1:0}hs=eU(hk.text,hs,1);return gY(hB,hs,hC,hz,hp-i)}function gA(hs,ho,i,ht,hn,hr,hq){var hp=cN(function(hw){var hu=hn[hw],hv=hu.level!=1;return az(er(hs,ab(i,hv?hu.to:hu.from,hv?"before":"after"),"line",ho,ht),hr,hq,true)},0,hn.length-1);var hm=hn[hp];if(hp>0){var hl=hm.level!=1;var hk=er(hs,ab(i,hl?hm.from:hm.to,hl?"after":"before"),"line",ho,ht);if(az(hk,hr,hq,true)&&hk.top>hq){hm=hn[hp-1]}}return hm}function gV(hx,hs,hv,hA,hp,hw,hu){var ho=bC(hx,hs,hA,hu);var hn=ho.begin;var hq=ho.end;if(/\s/.test(hs.text.charAt(hq-1))){hq--}var hm=null,hy=null;for(var hr=0;hr<hp.length;hr++){var hk=hp[hr];if(hk.from>=hq||hk.to<=hn){continue}var hl=hk.level!=1;var hz=G(hx,hA,hl?Math.min(hq,hk.to)-1:Math.max(hn,hk.from)).right;var ht=hz<hw?hw-hz+1000000000:hz-hw;if(!hm||hy>ht){hm=hk;hy=ht}}if(!hm){hm=hp[hp.length-1]}if(hm.from<hn){hm={from:hn,to:hm.to,level:hm.level}}if(hm.to>hq){hm={from:hm.from,to:hq,level:hm.level}}return hm}var aQ;function a9(hm){if(hm.cachedTextHeight!=null){return hm.cachedTextHeight}if(aQ==null){aQ=g0("pre",null,"CodeMirror-line-like");for(var hl=0;hl<49;++hl){aQ.appendChild(document.createTextNode("x"));aQ.appendChild(g0("br"))}aQ.appendChild(document.createTextNode("x"))}cd(hm.measure,aQ);var hk=aQ.offsetHeight/50;if(hk>3){hm.cachedTextHeight=hk}eA(hm.measure);return hk||1}function d7(hn){if(hn.cachedCharWidth!=null){return hn.cachedCharWidth}var i=g0("span","xxxxxxxxxx");var hm=g0("pre",[i],"CodeMirror-line-like");cd(hn.measure,hm);var hl=i.getBoundingClientRect(),hk=(hl.right-hl.left)/10;if(hk>2){hn.cachedCharWidth=hk}return hk||10}function fY(hk){var hp=hk.display,hn={},hm={};var ho=hp.gutters.clientLeft;for(var hr=hp.gutters.firstChild,hl=0;hr;hr=hr.nextSibling,++hl){var hq=hk.display.gutterSpecs[hl].className;hn[hq]=hr.offsetLeft+hr.clientLeft+ho;hm[hq]=hr.clientWidth}return{fixedPos:ev(hp),gutterTotalWidth:hp.gutters.offsetWidth,gutterLeft:hn,gutterWidth:hm,wrapperWidth:hp.wrapper.clientWidth}}function ev(i){return i.scroller.getBoundingClientRect().left-i.sizer.getBoundingClientRect().left}function bq(i){var hl=a9(i.display),hk=i.options.lineWrapping;var hm=hk&&Math.max(5,i.display.scroller.clientWidth/d7(i.display)-3);return function(ho){if(gg(i.doc,ho)){return 0}var hn=0;if(ho.widgets){for(var hp=0;hp<ho.widgets.length;hp++){if(ho.widgets[hp].height){hn+=ho.widgets[hp].height}}}if(hk){return hn+(Math.ceil(ho.text.length/hm)||1)*hl}else{return hn+hl}}}function ae(i){var hl=i.doc,hk=bq(i);hl.iter(function(hm){var hn=hk(hm);if(hn!=hm.height){g5(hm,hn)}})}function cO(hs,hn,hk,hl){var ho=hs.display;if(!hk&&Q(hn).getAttribute("cm-not-content")=="true"){return null}var hr,hp,i=ho.lineSpace.getBoundingClientRect();try{hr=hn.clientX-i.left;hp=hn.clientY-i.top}catch(hn){return null}var hq=gG(hs,hr,hp),ht;if(hl&&hq.xRel>0&&(ht=f0(hs.doc,hq.line).text).length==hq.ch){var hm=cc(ht,ht.length,hs.options.tabSize)-ht.length;hq=ab(hq.line,Math.max(0,Math.round((hr-fQ(hs.display).left)/d7(hs.display))-hm))}return hq}function dY(hk,hn){if(hn>=hk.display.viewTo){return null}hn-=hk.display.viewFrom;if(hn<0){return null}var hl=hk.display.view;for(var hm=0;hm<hl.length;hm++){hn-=hl[hm].size;if(hn<0){return hm}}}function ao(hr,hp,hq,hs){if(hp==null){hp=hr.doc.first}if(hq==null){hq=hr.doc.first+hr.doc.size}if(!hs){hs=0}var hm=hr.display;
90if(hs&&hq<hm.viewTo&&(hm.updateLineNumbers==null||hm.updateLineNumbers>hp)){hm.updateLineNumbers=hp}hr.curOp.viewChanged=true;if(hp>=hm.viewTo){if(bj&&a7(hr.doc,hp)<hm.viewTo){fa(hr)}}else{if(hq<=hm.viewFrom){if(bj&&eC(hr.doc,hq+hs)>hm.viewFrom){fa(hr)}else{hm.viewFrom+=hs;hm.viewTo+=hs}}else{if(hp<=hm.viewFrom&&hq>=hm.viewTo){fa(hr)}else{if(hp<=hm.viewFrom){var ho=dL(hr,hq,hq+hs,1);if(ho){hm.view=hm.view.slice(ho.index);hm.viewFrom=ho.lineN;hm.viewTo+=hs}else{fa(hr)}}else{if(hq>=hm.viewTo){var hk=dL(hr,hp,hp,-1);if(hk){hm.view=hm.view.slice(0,hk.index);hm.viewTo=hk.lineN}else{fa(hr)}}else{var hn=dL(hr,hp,hp,-1);var hl=dL(hr,hq,hq+hs,1);if(hn&&hl){hm.view=hm.view.slice(0,hn.index).concat(fF(hr,hn.lineN,hl.lineN)).concat(hm.view.slice(hl.index));hm.viewTo+=hs}else{fa(hr)}}}}}}var i=hm.externalMeasured;if(i){if(hq<i.lineN){i.lineN+=hs}else{if(hp<i.lineN+i.size){hm.externalMeasured=null}}}}function W(hk,hl,ho){hk.curOp.viewChanged=true;var hp=hk.display,hn=hk.display.externalMeasured;if(hn&&hl>=hn.lineN&&hl<hn.lineN+hn.size){hp.externalMeasured=null}if(hl<hp.viewFrom||hl>=hp.viewTo){return}var hm=hp.view[dY(hk,hl)];if(hm.node==null){return}var i=hm.changes||(hm.changes=[]);if(dP(i,ho)==-1){i.push(ho)}}function fa(i){i.display.viewFrom=i.display.viewTo=i.doc.first;i.display.view=[];i.display.viewOffset=0}function dL(hs,hm,ho,hl){var hp=dY(hs,hm),hr,hq=hs.display.view;if(!bj||ho==hs.doc.first+hs.doc.size){return{index:hp,lineN:ho}}var hk=hs.display.viewFrom;for(var hn=0;hn<hp;hn++){hk+=hq[hn].size}if(hk!=hm){if(hl>0){if(hp==hq.length-1){return null}hr=(hk+hq[hp].size)-hm;hp++}else{hr=hk-hm}hm+=hr;ho+=hr}while(a7(hs.doc,ho)!=ho){if(hp==(hl<0?0:hq.length-1)){return null}ho+=hl*hq[hp-(hl<0?1:0)].size;hp+=hl}return{index:hp,lineN:ho}}function dk(i,hn,hm){var hl=i.display,hk=hl.view;if(hk.length==0||hn>=hl.viewTo||hm<=hl.viewFrom){hl.view=fF(i,hn,hm);hl.viewFrom=hn}else{if(hl.viewFrom>hn){hl.view=fF(i,hn,hl.viewFrom).concat(hl.view)}else{if(hl.viewFrom<hn){hl.view=hl.view.slice(dY(i,hn))}}hl.viewFrom=hn;if(hl.viewTo<hm){hl.view=hl.view.concat(fF(i,hl.viewTo,hm))}else{if(hl.viewTo>hm){hl.view=hl.view.slice(0,dY(i,hm))}}}hl.viewTo=hm}function dI(hk){var hl=hk.display.view,ho=0;for(var hn=0;hn<hl.length;hn++){var hm=hl[hn];if(!hm.hidden&&(!hm.node||hm.changes)){++ho}}return ho}function bV(i){i.display.input.showSelection(i.display.input.prepareSelection())}function gw(hq,hk){if(hk===void 0){hk=true}var hp=hq.doc,hs={};var ho=hs.cursors=document.createDocumentFragment();var hl=hs.selection=document.createDocumentFragment();for(var hn=0;hn<hp.sel.ranges.length;hn++){if(!hk&&hn==hp.sel.primIndex){continue}var hr=hp.sel.ranges[hn];if(hr.from().line>=hq.display.viewTo||hr.to().line<hq.display.viewFrom){continue}var hm=hr.empty();if(hm||hq.options.showCursorWhenSelecting){D(hq,hr.head,ho)}if(!hm){bW(hq,hr,hl)}}return hs}function D(i,hm,hl){var ho=er(i,hm,"div",null,null,!i.options.singleCursorHeightPerLine);var hn=hl.appendChild(g0("div","\u00a0","CodeMirror-cursor"));hn.style.left=ho.left+"px";hn.style.top=ho.top+"px";hn.style.height=Math.max(0,ho.bottom-ho.top)*i.options.cursorHeight+"px";if(ho.other){var hk=hl.appendChild(g0("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"));hk.style.display="";hk.style.left=ho.other.left+"px";hk.style.top=ho.other.top+"px";hk.style.height=(ho.other.bottom-ho.other.top)*0.85+"px"}}function gQ(hk,i){return hk.top-i.top||hk.left-i.left}function bW(hp,ho,hq){var hx=hp.display,hB=hp.doc;var i=document.createDocumentFragment();var hu=fQ(hp.display),hm=hu.left;var hy=Math.max(hx.sizerWidth,dS(hp)-hx.sizer.offsetLeft)-hu.right;var hn=hB.direction=="ltr";function hv(hF,hE,hD,hC){if(hE<0){hE=0}hE=Math.round(hE);hC=Math.round(hC);i.appendChild(g0("div",null,"CodeMirror-selected",("position: absolute; left: "+hF+"px;\n                             top: "+hE+"px; width: "+(hD==null?hy-hF:hD)+"px;\n                             height: "+(hC-hE)+"px")))}function hk(hL,hD,hK){var hH=f0(hB,hL);var hI=hH.text.length;var hC,hG;function hJ(hN,hM){return dc(hp,ab(hL,hN),"div",hH,hM)}function hE(hR,hM,hN){var hP=bA(hp,hH,null,hR);var hQ=(hM=="ltr")==(hN=="after")?"left":"right";var hO=hN=="after"?hP.begin:hP.end-(/\s/.test(hH.text.charAt(hP.end-1))?2:1);return hJ(hO,hQ)[hQ]}var hF=a(hH,hB.direction);eE(hF,hD||0,hK==null?hI:hK,function(hX,hM,hS,h0){var h3=hS=="ltr";
90var hY=hJ(hX,h3?"left":"right");var hW=hJ(hM-1,h3?"right":"left");var h2=hD==null&&hX==0,hZ=hK==null&&hM==hI;var hO=h0==0,hQ=!hF||h0==hF.length-1;if(hW.top-hY.top<=3){var hP=(hn?h2:hZ)&&hO;var hR=(hn?hZ:h2)&&hQ;var hN=hP?hm:(h3?hY:hW).left;var h4=hR?hy:(h3?hW:hY).right;hv(hN,hY.top,h4-hN,hY.bottom)}else{var hU,hT,h1,hV;if(h3){hU=hn&&h2&&hO?hm:hY.left;hT=hn?hy:hE(hX,hS,"before");h1=hn?hm:hE(hM,hS,"after");hV=hn&&hZ&&hQ?hy:hW.right}else{hU=!hn?hm:hE(hX,hS,"before");hT=!hn&&h2&&hO?hy:hY.right;h1=!hn&&hZ&&hQ?hm:hW.left;hV=!hn?hy:hE(hM,hS,"after")}hv(hU,hY.top,hT-hU,hY.bottom);if(hY.bottom<hW.top){hv(hm,hY.bottom,null,hW.top)}hv(h1,hW.top,hV-h1,hW.bottom)}if(!hC||gQ(hY,hC)<0){hC=hY}if(gQ(hW,hC)<0){hC=hW}if(!hG||gQ(hY,hG)<0){hG=hY}if(gQ(hW,hG)<0){hG=hW}});return{start:hC,end:hG}}var hA=ho.from(),hz=ho.to();if(hA.line==hz.line){hk(hA.line,hA.ch,hz.ch)}else{var hl=f0(hB,hA.line),hs=f0(hB,hz.line);var hr=A(hl)==A(hs);var ht=hk(hA.line,hA.ch,hr?hl.text.length+1:null).end;var hw=hk(hz.line,hr?0:null,hz.ch).start;if(hr){if(ht.top<hw.top-2){hv(ht.right,ht.top,null,ht.bottom);hv(hm,hw.top,hw.left,hw.bottom)}else{hv(ht.right,ht.top,hw.left-ht.right,ht.bottom)}}if(ht.bottom<hw.top){hv(hm,ht.bottom,null,hw.top)}}hq.appendChild(i)}function r(i){if(!i.state.focused){return}var hl=i.display;clearInterval(hl.blinker);var hk=true;hl.cursorDiv.style.visibility="";if(i.options.cursorBlinkRate>0){hl.blinker=setInterval(function(){return hl.cursorDiv.style.visibility=(hk=!hk)?"":"hidden"},i.options.cursorBlinkRate)}else{if(i.options.cursorBlinkRate<0){hl.cursorDiv.style.visibility="hidden"}}}function u(i){if(!i.state.focused){i.display.input.focus();c2(i)}}function ar(i){i.state.delayingBlurEvent=true;setTimeout(function(){if(i.state.delayingBlurEvent){i.state.delayingBlurEvent=false;a6(i)}},100)}function c2(i,hk){if(i.state.delayingBlurEvent){i.state.delayingBlurEvent=false}if(i.options.readOnly=="nocursor"){return}if(!i.state.focused){aN(i,"focus",i,hk);i.state.focused=true;gn(i.display.wrapper,"CodeMirror-focused");if(!i.curOp&&i.display.selForContextMenu!=i.doc.sel){i.display.input.reset();if(dt){setTimeout(function(){return i.display.input.reset(true)},20)}}i.display.input.receivedFocus()}r(i)}function a6(i,hk){if(i.state.delayingBlurEvent){return}if(i.state.focused){aN(i,"blur",i,hk);i.state.focused=false;h(i.display.wrapper,"CodeMirror-focused")}clearInterval(i.display.blinker);setTimeout(function(){if(!i.state.focused){i.display.shift=false}},150)}function bl(hu){var hs=hu.display;var hm=hs.lineDiv.offsetTop;for(var hn=0;hn<hs.view.length;hn++){var hv=hs.view[hn],hp=hu.options.lineWrapping;var hw=(void 0),hk=0;if(hv.hidden){continue}if(ef&&n<8){var hr=hv.node.offsetTop+hv.node.offsetHeight;hw=hr-hm;hm=hr}else{var ho=hv.node.getBoundingClientRect();hw=ho.bottom-ho.top;if(!hp&&hv.text.firstChild){hk=hv.text.firstChild.getBoundingClientRect().right-ho.left-1}}var ht=hv.line.height-hw;if(ht>0.005||ht<-0.005){g5(hv.line,hw);cx(hv.line);if(hv.rest){for(var hl=0;hl<hv.rest.length;hl++){cx(hv.rest[hl])}}}if(hk>hu.display.sizerWidth){var hq=Math.ceil(hk/d7(hu.display));if(hq>hu.display.maxLineLength){hu.display.maxLineLength=hq;hu.display.maxLine=hv.line;hu.display.maxLineChanged=true}}}}function cx(hl){if(hl.widgets){for(var hm=0;hm<hl.widgets.length;++hm){var hk=hl.widgets[hm],hn=hk.node.parentNode;if(hn){hk.height=hn.offsetHeight}}}}function cs(hm,hq,hl){var hn=hl&&hl.top!=null?Math.max(0,hl.top):hm.scroller.scrollTop;hn=Math.floor(hn-fU(hm));var i=hl&&hl.bottom!=null?hl.bottom:hn+hm.wrapper.clientHeight;var ho=b0(hq,hn),hp=b0(hq,i);if(hl&&hl.ensure){var hk=hl.ensure.from.line,hr=hl.ensure.to.line;if(hk<ho){ho=hk;hp=b0(hq,b6(f0(hq,hk))+hm.wrapper.clientHeight)}else{if(Math.min(hr,hq.lastLine())>=hp){ho=b0(hq,b6(f0(hq,hr))-hm.wrapper.clientHeight);hp=hr}}}return{from:ho,to:Math.max(hp,ho+1)}}function eF(hk,hm){if(a2(hk,"scrollCursorIntoView")){return}var ho=hk.display,hl=ho.sizer.getBoundingClientRect(),i=null;if(hm.top+hl.top<0){i=true}else{if(hm.bottom+hl.top>(window.innerHeight||document.documentElement.clientHeight)){i=false}}if(i!=null&&!ge){var hn=g0("div","\u200b",null,("position: absolute;\n                         top: "+(hm.top-ho.viewOffset-fU(hk.display))+"px;\n                         height: "+(hm.bottom-hm.top+dl(hk)+ho.barHeight)+"px;\n                         left: "+(hm.left)+"px; width: "+(Math.max(2,hm.right-hm.left))+"px;"));hk.display.lineSpace.appendChild(hn);hn.scrollIntoView(i);hk.display.lineSpace.removeChild(hn)}}function H(hu,hr,hn,hm){if(hm==null){hm=0}var hs;if(!hu.options.lineWrapping&&hr==hn){hr=hr.ch?ab(hr.line,hr.sticky=="before"?hr.ch-1:hr.ch,"after"):hr;hn=hr.sticky=="before"?ab(hr.line,hr.ch+1,"before"):hr}for(var ho=0;ho<5;ho++){var hp=false;var ht=er(hu,hr);var i=!hn||hn==hr?ht:er(hu,hn);hs={left:Math.min(ht.left,i.left),top:Math.min(ht.top,i.top)-hm,right:Math.max(ht.left,i.left),bottom:Math.max(ht.bottom,i.bottom)+hm};var hl=M(hu,hs);var hq=hu.doc.scrollTop,hk=hu.doc.scrollLeft;if(hl.scrollTop!=null){C(hu,hl.scrollTop);if(Math.abs(hu.doc.scrollTop-hq)>1){hp=true}}if(hl.scrollLeft!=null){bX(hu,hl.scrollLeft);if(Math.abs(hu.doc.scrollLeft-hk)>1){hp=true}}if(!hp){break}}return hs}function I(i,hk){var hl=M(i,hk);if(hl.scrollTop!=null){C(i,hl.scrollTop)}if(hl.scrollLeft!=null){bX(i,hl.scrollLeft)}}function M(hs,hr){var hp=hs.display,hn=a9(hs.display);if(hr.top<0){hr.top=0}var hl=hs.curOp&&hs.curOp.scrollTop!=null?hs.curOp.scrollTop:hp.scroller.scrollTop;var hu=dn(hs),hw={};if(hr.bottom-hr.top>hu){hr.bottom=hr.top+hu}var hk=hs.doc.height+b1(hp);var i=hr.top<hn,ho=hr.bottom>hk-hn;if(hr.top<hl){hw.scrollTop=i?0:hr.top}else{if(hr.bottom>hl+hu){var hq=Math.min(hr.top,(ho?hk:hr.bottom)-hu);if(hq!=hl){hw.scrollTop=hq}}}var hv=hs.curOp&&hs.curOp.scrollLeft!=null?hs.curOp.scrollLeft:hp.scroller.scrollLeft;var ht=dS(hs)-(hs.options.fixedGutter?hp.gutters.offsetWidth:0);var hm=hr.right-hr.left>ht;if(hm){hr.right=hr.left+ht}if(hr.left<10){hw.scrollLeft=0}else{if(hr.left<hv){hw.scrollLeft=Math.max(0,hr.left-(hm?0:10))}else{if(hr.right>ht+hv-3){hw.scrollLeft=hr.right+(hm?0:10)-ht}}}return hw}function c9(i,hk){if(hk==null){return}gp(i);i.curOp.scrollTop=(i.curOp.scrollTop==null?i.doc.scrollTop:i.curOp.scrollTop)+hk}function gs(i){gp(i);var hk=i.getCursor();i.curOp.scrollToPos={from:hk,to:hk,margin:i.options.cursorScrollMargin}}function fu(hk,i,hl){if(i!=null||hl!=null){gp(hk)}if(i!=null){hk.curOp.scrollLeft=i}if(hl!=null){hk.curOp.scrollTop=hl}}function cA(i,hk){gp(i);i.curOp.scrollToPos=hk}function gp(i){var hk=i.curOp.scrollToPos;if(hk){i.curOp.scrollToPos=null;var hm=eb(i,hk.from),hl=eb(i,hk.to);ca(i,hm,hl,hk.margin)}}function ca(i,hn,hm,hl){var hk=M(i,{left:Math.min(hn.left,hm.left),top:Math.min(hn.top,hm.top)-hl,right:Math.max(hn.right,hm.right),bottom:Math.max(hn.bottom,hm.bottom)+hl});fu(i,hk.scrollLeft,hk.scrollTop)}function C(i,hk){if(Math.abs(i.doc.scrollTop-hk)<2){return}if(!cP){eq(i,{top:hk})}T(i,hk,true);if(cP){eq(i)}eO(i,100)}function T(i,hl,hk){hl=Math.max(0,Math.min(i.display.scroller.scrollHeight-i.display.scroller.clientHeight,hl));if(i.display.scroller.scrollTop==hl&&!hk){return}i.doc.scrollTop=hl;i.display.scrollbars.setScrollTop(hl);
90if(i.display.scroller.scrollTop!=hl){i.display.scroller.scrollTop=hl}}function bX(i,hm,hl,hk){hm=Math.max(0,Math.min(hm,i.display.scroller.scrollWidth-i.display.scroller.clientWidth));if((hl?hm==i.doc.scrollLeft:Math.abs(i.doc.scrollLeft-hm)<2)&&!hk){return}i.doc.scrollLeft=hm;fk(i);if(i.display.scroller.scrollLeft!=hm){i.display.scroller.scrollLeft=hm}i.display.scrollbars.setScrollLeft(hm)}function d5(i){var hm=i.display,hl=hm.gutters.offsetWidth;var hk=Math.round(i.doc.height+b1(i.display));return{clientHeight:hm.scroller.clientHeight,viewHeight:hm.wrapper.clientHeight,scrollWidth:hm.scroller.scrollWidth,clientWidth:hm.scroller.clientWidth,viewWidth:hm.wrapper.clientWidth,barLeft:i.options.fixedGutter?hl:0,docHeight:hk,scrollHeight:hk+dl(i)+hm.barHeight,nativeBarWidth:hm.nativeBarWidth,gutterWidth:hl}}var dR=function(hl,hk,i){this.cm=i;var hm=this.vert=g0("div",[g0("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");var hn=this.horiz=g0("div",[g0("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");hm.tabIndex=hn.tabIndex=-1;hl(hm);hl(hn);ci(hm,"scroll",function(){if(hm.clientHeight){hk(hm.scrollTop,"vertical")}});ci(hn,"scroll",function(){if(hn.clientWidth){hk(hn.scrollLeft,"horizontal")}});this.checkedZeroWidth=false;if(ef&&n<8){this.horiz.style.minHeight=this.vert.style.minWidth="18px"}};dR.prototype.update=function(hm){var hn=hm.scrollWidth>hm.clientWidth+1;var hl=hm.scrollHeight>hm.clientHeight+1;var ho=hm.nativeBarWidth;if(hl){this.vert.style.display="block";this.vert.style.bottom=hn?ho+"px":"0";var hk=hm.viewHeight-(hn?ho:0);this.vert.firstChild.style.height=Math.max(0,hm.scrollHeight-hm.clientHeight+hk)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(hn){this.horiz.style.display="block";this.horiz.style.right=hl?ho+"px":"0";this.horiz.style.left=hm.barLeft+"px";var i=hm.viewWidth-hm.barLeft-(hl?ho:0);this.horiz.firstChild.style.width=Math.max(0,hm.scrollWidth-hm.clientWidth+i)+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedZeroWidth&&hm.clientHeight>0){if(ho==0){this.zeroWidthHack()}this.checkedZeroWidth=true}return{right:hl?ho:0,bottom:hn?ho:0}};dR.prototype.setScrollLeft=function(i){if(this.horiz.scrollLeft!=i){this.horiz.scrollLeft=i}if(this.disableHoriz){this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")}};dR.prototype.setScrollTop=function(i){if(this.vert.scrollTop!=i){this.vert.scrollTop=i}if(this.disableVert){this.enableZeroWidthBar(this.vert,this.disableVert,"vert")}};dR.prototype.zeroWidthHack=function(){var i=ct&&!dB?"12px":"18px";this.horiz.style.height=this.vert.style.width=i;this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none";this.disableHoriz=new hj;this.disableVert=new hj};dR.prototype.enableZeroWidthBar=function(hl,i,hk){hl.style.pointerEvents="auto";function hm(){var ho=hl.getBoundingClientRect();var hn=hk=="vert"?document.elementFromPoint(ho.right-1,(ho.top+ho.bottom)/2):document.elementFromPoint((ho.right+ho.left)/2,ho.bottom-1);if(hn!=hl){hl.style.pointerEvents="none"}else{i.set(1000,hm)}}i.set(1000,hm)};dR.prototype.clear=function(){var i=this.horiz.parentNode;i.removeChild(this.horiz);i.removeChild(this.vert)};var fP=function(){};fP.prototype.update=function(){return{bottom:0,right:0}};fP.prototype.setScrollLeft=function(){};fP.prototype.setScrollTop=function(){};fP.prototype.clear=function(){};function fJ(hm,ho){if(!ho){ho=d5(hm)}var hl=hm.display.barWidth,hk=hm.display.barHeight;a5(hm,ho);for(var hn=0;hn<4&&hl!=hm.display.barWidth||hk!=hm.display.barHeight;hn++){if(hl!=hm.display.barWidth&&hm.options.lineWrapping){bl(hm)}a5(hm,d5(hm));hl=hm.display.barWidth;hk=hm.display.barHeight}}function a5(i,hk){var hm=i.display;var hl=hm.scrollbars.update(hk);hm.sizer.style.paddingRight=(hm.barWidth=hl.right)+"px";hm.sizer.style.paddingBottom=(hm.barHeight=hl.bottom)+"px";hm.heightForcer.style.borderBottom=hl.bottom+"px solid transparent";if(hl.right&&hl.bottom){hm.scrollbarFiller.style.display="block";hm.scrollbarFiller.style.height=hl.bottom+"px";hm.scrollbarFiller.style.width=hl.right+"px"}else{hm.scrollbarFiller.style.display=""}if(hl.bottom&&i.options.coverGutterNextToScrollbar&&i.options.fixedGutter){hm.gutterFiller.style.display="block";hm.gutterFiller.style.height=hl.bottom+"px";hm.gutterFiller.style.width=hk.gutterWidth+"px"}else{hm.gutterFiller.style.display=""}}var bz={"native":dR,"null":fP};function aL(i){if(i.display.scrollbars){i.display.scrollbars.clear();if(i.display.scrollbars.addClass){h(i.display.wrapper,i.display.scrollbars.addClass)}}i.display.scrollbars=new bz[i.options.scrollbarStyle](function(hk){i.display.wrapper.insertBefore(hk,i.display.scrollbarFiller);ci(hk,"mousedown",function(){if(i.state.focused){setTimeout(function(){return i.display.input.focus()},0)}});hk.setAttribute("cm-not-content","true")},function(hl,hk){if(hk=="horizontal"){bX(i,hl)}else{C(i,hl)}},i);if(i.display.scrollbars.addClass){gn(i.display.wrapper,i.display.scrollbars.addClass)}}var eJ=0;function db(i){i.curOp={cm:i,viewChanged:false,startHeight:i.doc.height,forceUpdate:false,updateInput:0,typing:false,changeOb
90js:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:false,id:++eJ};fc(i.curOp)}function av(i){var hk=i.curOp;if(hk){cj(hk,function(hm){for(var hl=0;hl<hm.ops.length;hl++){hm.ops[hl].cm.curOp=null}de(hm)})}}function de(hp){var hl=hp.ops;for(var hk=0;hk<hl.length;hk++){cr(hl[hk])}for(var hq=0;hq<hl.length;hq++){ay(hl[hq])}for(var ho=0;ho<hl.length;ho++){cn(hl[ho])}for(var hn=0;hn<hl.length;hn++){ax(hl[hn])}for(var hm=0;hm<hl.length;hm++){fL(hl[hm])}}function cr(hl){var i=hl.cm,hk=i.display;O(i);if(hl.updateMaxLine){f(i)}hl.mustUpdate=hl.viewChanged||hl.forceUpdate||hl.scrollTop!=null||hl.scrollToPos&&(hl.scrollToPos.from.line<hk.viewFrom||hl.scrollToPos.to.line>=hk.viewTo)||hk.maxLineChanged&&i.options.lineWrapping;hl.update=hl.mustUpdate&&new aT(i,hl.mustUpdate&&{top:hl.scrollTop,ensure:hl.scrollToPos},hl.forceUpdate)}function ay(i){i.updatedDisplay=i.mustUpdate&&F(i.cm,i.update)}function cn(hl){var i=hl.cm,hk=i.display;if(hl.updatedDisplay){bl(i)}hl.barMeasure=d5(i);if(hk.maxLineChanged&&!i.options.lineWrapping){hl.adjustWidthTo=eR(i,hk.maxLine,hk.maxLine.text.length).left+3;i.display.sizerWidth=hl.adjustWidthTo;hl.barMeasure.scrollWidth=Math.max(hk.scroller.clientWidth,hk.sizer.offsetLeft+hl.adjustWidthTo+dl(i)+i.display.barWidth);hl.maxScrollLeft=Math.max(0,hk.sizer.offsetLeft+hl.adjustWidthTo-dS(i))}if(hl.updatedDisplay||hl.selectionChanged){hl.preparedSelection=hk.input.prepareSelection()}}function ax(hl){var i=hl.cm;if(hl.adjustWidthTo!=null){i.display.sizer.style.minWidth=hl.adjustWidthTo+"px";if(hl.maxScrollLeft<i.doc.scrollLeft){bX(i,Math.min(i.display.scroller.scrollLeft,hl.maxScrollLeft),true)}i.display.maxLineChanged=false}var hk=hl.focus&&hl.focus==ej();if(hl.preparedSelection){i.display.input.showSelection(hl.preparedSelection,hk)}if(hl.updatedDisplay||hl.startHeight!=i.doc.height){fJ(i,hl.barMeasure)}if(hl.updatedDisplay){d4(i,hl.barMeasure)}if(hl.selectionChanged){r(i)}if(i.state.focused&&hl.updateInput){i.display.input.reset(hl.typing)}if(hk){u(hl.cm)}}function fL(hn){var hs=hn.cm,hp=hs.display,hr=hs.doc;if(hn.updatedDisplay){cI(hs,hn.update)}if(hp.wheelStartX!=null&&(hn.scrollTop!=null||hn.scrollLeft!=null||hn.scrollToPos)){hp.wheelStartX=hp.wheelStartY=null}if(hn.scrollTop!=null){T(hs,hn.scrollTop,hn.forceScroll)}if(hn.scrollLeft!=null){bX(hs,hn.scrollLeft,true,true)}if(hn.scrollToPos){var hq=H(hs,gy(hr,hn.scrollToPos.from),gy(hr,hn.scrollToPos.to),hn.scrollToPos.margin);eF(hs,hq)}var ho=hn.maybeHiddenMarkers,hk=hn.maybeUnhiddenMarkers;if(ho){for(var hm=0;hm<ho.length;++hm){if(!ho[hm].lines.length){aN(ho[hm],"hide")}}}if(hk){for(var hl=0;hl<hk.length;++hl){if(hk[hl].lines.length){aN(hk[hl],"unhide")}}}if(hp.wrapper.offsetHeight){hr.scrollTop=hs.display.scroller.scrollTop}if(hn.changeObjs){aN(hs,"changes",hs,hn.changeObjs)}if(hn.update){hn.update.finish()}}function df(i,hk){if(i.curOp){return hk()}db(i);try{return hk()}finally{av(i)}}function du(i,hk){return function(){if(i.curOp){return hk.apply(i,arguments)}db(i);try{return hk.apply(i,arguments)}finally{av(i)}}}function dE(i){return function(){if(this.curOp){return i.apply(this,arguments)}db(this);try{return i.apply(this,arguments)}finally{av(this)}}}function c5(i){return function(){var hk=this.cm;if(!hk||hk.curOp){return i.apply(this,arguments)}db(hk);try{return i.apply(this,arguments)}finally{av(hk)}}}function eO(i,hk){if(i.doc.highlightFrontier<i.display.viewTo){i.state.highlight.set(hk,cW(dj,i))}}function dj(i){var hn=i.doc;if(hn.highlightFrontier>=i.display.viewTo){return}var hl=+new Date+i.options.workTime;var hm=fH(i,hn.highlightFrontier);var hk=[];hn.iter(hm.line,Math.min(hn.first+hn.size,i.display.viewTo+500),function(hp){if(hm.line>=i.display.viewFrom){var hs=hp.styles;var ho=hp.text.length>i.options.maxHighlightLength?cp(hn.mode,hm.state):null;var hu=gk(i,hp,hm,true);if(ho){hm.state=ho}hp.styles=hu.styles;var hr=hp.styleClasses,ht=hu.classes;if(ht){hp.styleClasses=ht}else{if(hr){hp.styleClasses=null}}var hv=!hs||hs.length!=hp.styles.length||hr!=ht&&(!hr||!ht||hr.bgClass!=ht.bgClass||hr.textClass!=ht.textClass);for(var hq=0;!hv&&hq<hs.length;++hq){hv=hs[hq]!=hp.styles[hq]}if(hv){hk.push(hm.line)}hp.stateAfter=hm.save();hm.nextLine()}else{if(hp.text.length<=i.options.maxHighlightLength){d3(i,hp.text,hm)}hp.stateAfter=hm.line%5==0?hm.save():null;hm.nextLine()}if(+new Date>hl){eO(i,i.options.workDelay);return true}});hn.highlightFrontier=hm.line;hn.modeFrontier=Math.max(hn.modeFrontier,hm.line);if(hk.length){df(i,function(){for(var ho=0;ho<hk.length;ho++){W(i,hk[ho],"text")}})}}var aT=function(hk,i,hl){var hm=hk.display;this.viewport=i;this.visible=cs(hm,hk.doc,i);this.editorIsHidden=!hm.wrapper.offsetWidth;this.wrapperHeight=hm.wrapper.clientHeight;
90this.wrapperWidth=hm.wrapper.clientWidth;this.oldDisplayWidth=dS(hk);this.force=hl;this.dims=fY(hk);this.events=[]};aT.prototype.signal=function(hk,i){if(f5(hk,i)){this.events.push(arguments)}};aT.prototype.finish=function(){var hl=this;for(var hk=0;hk<this.events.length;hk++){aN.apply(null,hl.events[hk])}};function O(i){var hk=i.display;if(!hk.scrollbarsClipped&&hk.scroller.offsetWidth){hk.nativeBarWidth=hk.scroller.offsetWidth-hk.scroller.clientWidth;hk.heightForcer.style.height=dl(i)+"px";hk.sizer.style.marginBottom=-hk.nativeBarWidth+"px";hk.sizer.style.borderRightWidth=dl(i)+"px";hk.scrollbarsClipped=true}}function bB(hk){if(hk.hasFocus()){return null}var hm=ej();if(!hm||!ha(hk.display.lineDiv,hm)){return null}var i={activeElt:hm};if(window.getSelection){var hl=window.getSelection();if(hl.anchorNode&&hl.extend&&ha(hk.display.lineDiv,hl.anchorNode)){i.anchorNode=hl.anchorNode;i.anchorOffset=hl.anchorOffset;i.focusNode=hl.focusNode;i.focusOffset=hl.focusOffset}}return i}function j(i){if(!i||!i.activeElt||i.activeElt==ej()){return}i.activeElt.focus();if(i.anchorNode&&ha(document.body,i.anchorNode)&&ha(document.body,i.focusNode)){var hk=window.getSelection(),hl=document.createRange();hl.setEnd(i.anchorNode,i.anchorOffset);hl.collapse(false);hk.removeAllRanges();hk.addRange(hl);hk.extend(i.focusNode,i.focusOffset)}}function F(hs,hm){var hn=hs.display,hr=hs.doc;if(hm.editorIsHidden){fa(hs);return false}if(!hm.force&&hm.visible.from>=hn.viewFrom&&hm.visible.to<=hn.viewTo&&(hn.updateLineNumbers==null||hn.updateLineNumbers>=hn.viewTo)&&hn.renderedView==hn.view&&dI(hs)==0){return false}if(eD(hs)){fa(hs);hm.dims=fY(hs)}var hl=hr.first+hr.size;var hp=Math.max(hm.visible.from-hs.options.viewportMargin,hr.first);var hq=Math.min(hl,hm.visible.to+hs.options.viewportMargin);if(hn.viewFrom<hp&&hp-hn.viewFrom<20){hp=Math.max(hr.first,hn.viewFrom)}if(hn.viewTo>hq&&hn.viewTo-hq<20){hq=Math.min(hl,hn.viewTo)}if(bj){hp=a7(hs.doc,hp);hq=eC(hs.doc,hq)}var hk=hp!=hn.viewFrom||hq!=hn.viewTo||hn.lastWrapHeight!=hm.wrapperHeight||hn.lastWrapWidth!=hm.wrapperWidth;dk(hs,hp,hq);hn.viewOffset=b6(f0(hs.doc,hn.viewFrom));hs.display.mover.style.top=hn.viewOffset+"px";var i=dI(hs);if(!hk&&i==0&&!hm.force&&hn.renderedView==hn.view&&(hn.updateLineNumbers==null||hn.updateLineNumbers>=hn.viewTo)){return false}var ho=bB(hs);if(i>4){hn.lineDiv.style.display="none"}cL(hs,hn.updateLineNumbers,hm.dims);if(i>4){hn.lineDiv.style.display=""}hn.renderedView=hn.view;j(ho);eA(hn.cursorDiv);eA(hn.selectionDiv);hn.gutters.style.height=hn.sizer.style.minHeight=0;if(hk){hn.lastWrapHeight=hm.wrapperHeight;hn.lastWrapWidth=hm.wrapperWidth;eO(hs,400)}hn.updateLineNumbers=null;return true}function cI(hk,hn){var i=hn.viewport;for(var hm=true;;hm=false){if(!hm||!hk.options.lineWrapping||hn.oldDisplayWidth==dS(hk)){if(i&&i.top!=null){i={top:Math.min(hk.doc.height+b1(hk.display)-dn(hk),i.top)}}hn.visible=cs(hk.display,hk.doc,i);if(hn.visible.from>=hk.display.viewFrom&&hn.visible.to<=hk.display.viewTo){break}}if(!F(hk,hn)){break}bl(hk);var hl=d5(hk);bV(hk);fJ(hk,hl);d4(hk,hl);hn.force=false}hn.signal(hk,"update",hk);if(hk.display.viewFrom!=hk.display.reportedViewFrom||hk.display.viewTo!=hk.display.reportedViewTo){hn.signal(hk,"viewportChange",hk,hk.display.viewFrom,hk.display.viewTo);hk.display.reportedViewFrom=hk.display.viewFrom;hk.display.reportedViewTo=hk.display.viewTo}}function eq(hk,i){var hm=new aT(hk,i);if(F(hk,hm)){bl(hk);cI(hk,hm);var hl=d5(hk);bV(hk);fJ(hk,hl);d4(hk,hl);hm.finish()}}function cL(hv,hm,hu){var hr=hv.display,hx=hv.options.lineNumbers;var hk=hr.lineDiv,hw=hk.firstChild;function hq(hy){var i=hy.nextSibling;if(dt&&ct&&hv.display.currentWheelTarget==hy){hy.style.display="none"}else{hy.parentNode.removeChild(hy)}return i}var hs=hr.view,hp=hr.viewFrom;for(var hn=0;hn<hs.length;hn++){var ho=hs[hn];if(ho.hidden){}else{if(!ho.node||ho.node.parentNode!=hk){var hl=aO(hv,ho,hp,hu);hk.insertBefore(hl,hw)}else{while(hw!=ho.node){hw=hq(hw)}var ht=hx&&hm!=null&&hm<=hp&&ho.lineNumber;if(ho.changes){if(dP(ho.changes,"gutter")>-1){ht=false}ai(hv,ho,hp,hu)}if(ht){eA(ho.lineNumber);ho.lineNumber.appendChild(document.createTextNode(e5(hv.options,hp)))}hw=ho.node.nextSibling}}hp+=ho.size}while(hw){hw=hq(hw)}}function dx(hk){var i=hk.gutters.offsetWidth;hk.sizer.style.marginLeft=i+"px"}function d4(i,hk){i.display.sizer.style.minHeight=hk.docHeight+"px";i.display.heightForcer.style.top=hk.docHeight+"px";i.display.gutters.style.height=(hk.docHeight+i.display.barHeight+dl(i))+"px"}function fk(hs){var hq=hs.display,hr=hq.view;if(!hq.alignWidgets&&(!hq.gutters.firstChild||!hs.options.fixedGutter)){return}var ho=ev(hq)-hq.scroller.scrollLeft+hs.doc.scrollLeft;var hk=hq.gutters.offsetWidth,hl=ho+"px";for(var hn=0;hn<hr.length;hn++){if(!hr[hn].hidden){if(hs.options.fixedGutter){if(hr[hn].gutter){hr[hn].gutter.style.left=hl}
90if(hr[hn].gutterBackground){hr[hn].gutterBackground.style.left=hl}}var hp=hr[hn].alignable;if(hp){for(var hm=0;hm<hp.length;hm++){hp[hm].style.left=hl}}}}if(hs.options.fixedGutter){hq.gutters.style.left=(ho+hk)+"px"}}function eD(i){if(!i.options.lineNumbers){return false}var ho=i.doc,hk=e5(i.options,ho.first+ho.size-1),hn=i.display;if(hk.length!=hn.lineNumChars){var hp=hn.measure.appendChild(g0("div",[g0("div",hk)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var hl=hp.firstChild.offsetWidth,hm=hp.offsetWidth-hl;hn.lineGutter.style.width="";hn.lineNumInnerWidth=Math.max(hl,hn.lineGutter.offsetWidth-hm)+1;hn.lineNumWidth=hn.lineNumInnerWidth+hm;hn.lineNumChars=hn.lineNumInnerWidth?hk.length:-1;hn.lineGutter.style.width=hn.lineNumWidth+"px";dx(i.display);return true}return false}function bd(hn,hl){var hk=[],hm=false;for(var hp=0;hp<hn.length;hp++){var ho=hn[hp],hq=null;if(typeof ho!="string"){hq=ho.style;ho=ho.className}if(ho=="CodeMirror-linenumbers"){if(!hl){continue}else{hm=true}}hk.push({className:ho,style:hq})}if(hl&&!hm){hk.push({className:"CodeMirror-linenumbers",style:null})}return hk}function m(hp){var hk=hp.gutters,hr=hp.gutterSpecs;eA(hk);hp.lineGutter=null;for(var hl=0;hl<hr.length;++hl){var ho=hr[hl];var hn=ho.className;var hm=ho.style;var hq=hk.appendChild(g0("div",null,"CodeMirror-gutter "+hn));if(hm){hq.style.cssText=hm}if(hn=="CodeMirror-linenumbers"){hp.lineGutter=hq;hq.style.width=(hp.lineNumWidth||1)+"px"}}hk.style.display=hr.length?"":"none";dx(hp)}function eM(i){m(i.display);ao(i);fk(i)}function fo(hk,hn,hl,hm){var ho=this;this.input=hl;ho.scrollbarFiller=g0("div",null,"CodeMirror-scrollbar-filler");ho.scrollbarFiller.setAttribute("cm-not-content","true");ho.gutterFiller=g0("div",null,"CodeMirror-gutter-filler");ho.gutterFiller.setAttribute("cm-not-content","true");ho.lineDiv=g6("div",null,"CodeMirror-code");ho.selectionDiv=g0("div",null,null,"position: relative; z-index: 1");ho.cursorDiv=g0("div",null,"CodeMirror-cursors");ho.measure=g0("div",null,"CodeMirror-measure");ho.lineMeasure=g0("div",null,"CodeMirror-measure");ho.lineSpace=g6("div",[ho.measure,ho.lineMeasure,ho.selectionDiv,ho.cursorDiv,ho.lineDiv],null,"position: relative; outline: none");var i=g6("div",[ho.lineSpace],"CodeMirror-lines");ho.mover=g0("div",[i],null,"position: relative");ho.sizer=g0("div",[ho.mover],"CodeMirror-sizer");ho.sizerWidth=null;ho.heightForcer=g0("div",null,null,"position: absolute; height: "+ed+"px; width: 1px;");ho.gutters=g0("div",null,"CodeMirror-gutters");ho.lineGutter=null;ho.scroller=g0("div",[ho.sizer,ho.heightForcer,ho.gutters],"CodeMirror-scroll");ho.scroller.setAttribute("tabIndex","-1");ho.wrapper=g0("div",[ho.scrollbarFiller,ho.gutterFiller,ho.scroller],"CodeMirror");if(ef&&n<8){ho.gutters.style.zIndex=-1;ho.scroller.style.paddingRight=0}if(!dt&&!(cP&&eQ)){ho.scroller.draggable=true}if(hk){if(hk.appendChild){hk.appendChild(ho.wrapper)}else{hk(ho.wrapper)}}ho.viewFrom=ho.viewTo=hn.first;ho.reportedViewFrom=ho.reportedViewTo=hn.first;ho.view=[];ho.renderedView=null;ho.externalMeasured=null;ho.viewOffset=0;ho.lastWrapHeight=ho.lastWrapWidth=0;ho.updateLineNumbers=null;ho.nativeBarWidth=ho.barHeight=ho.barWidth=0;ho.scrollbarsClipped=false;ho.lineNumWidth=ho.lineNumInnerWidth=ho.lineNumChars=null;ho.alignWidgets=false;ho.cachedCharWidth=ho.cachedTextHeight=ho.cachedPaddingH=null;ho.maxLine=null;ho.maxLineLength=0;ho.maxLineChanged=false;ho.wheelDX=ho.wheelDY=ho.wheelStartX=ho.wheelStartY=null;ho.shift=false;ho.selForContextMenu=null;ho.activeTouch=null;ho.gutterSpecs=bd(hm.gutters,hm.lineNumbers);m(ho);hl.init(ho)}var f7=0,cE=null;if(ef){cE=-0.53}else{if(cP){cE=15}else{if(dJ){cE=-0.7}else{if(aM){cE=-1/3}}}}function di(hl){var hk=hl.wheelDeltaX,i=hl.wheelDeltaY;if(hk==null&&hl.detail&&hl.axis==hl.HORIZONTAL_AXIS){hk=hl.detail}if(i==null&&hl.detail&&hl.axis==hl.VERTICAL_AXIS){i=hl.detail}else{if(i==null){i=hl.wheelDelta}}return{x:hk,y:i}}function aI(i){var hk=di(i);hk.x*=cE;hk.y*=cE;return hk}function c(hu,ho){var hw=di(ho),hy=hw.x,hx=hw.y;var hq=hu.display,ht=hq.scroller;var hn=ht.scrollWidth>ht.clientWidth;var hm=ht.scrollHeight>ht.clientHeight;if(!(hy&&hn||hx&&hm)){return}if(hx&&ct&&dt){outer:for(var hv=ho.target,hs=hq.view;hv!=ht;hv=hv.parentNode){for(var hl=0;hl<hs.length;hl++){if(hs[hl].node==hv){hu.display.currentWheelTarget=hv;break outer}}}}if(hy&&!cP&&!eB&&cE!=null){if(hx&&hm){C(hu,Math.max(0,ht.scrollTop+hx*cE))}bX(hu,Math.max(0,ht.scrollLeft+hy*cE));if(!hx||(hx&&hm)){c7(ho)}hq.wheelStartX=null;return}if(hx&&cE!=null){var hk=hx*cE;var hr=hu.doc.scrollTop,hp=hr+hq.wrapper.clientHeight;if(hk<0){hr=Math.max(0,hr+hk-50)}else{hp=Math.min(hu.doc.height,hp+hk+50)}eq(hu,{top:hr,bottom:hp})}
90if(f7<20){if(hq.wheelStartX==null){hq.wheelStartX=ht.scrollLeft;hq.wheelStartY=ht.scrollTop;hq.wheelDX=hy;hq.wheelDY=hx;setTimeout(function(){if(hq.wheelStartX==null){return}var i=ht.scrollLeft-hq.wheelStartX;var hA=ht.scrollTop-hq.wheelStartY;var hz=(hA&&hq.wheelDY&&hA/hq.wheelDY)||(i&&hq.wheelDX&&i/hq.wheelDX);hq.wheelStartX=hq.wheelStartY=null;if(!hz){return}cE=(cE*f7+hz)/(f7+1);++f7},200)}else{hq.wheelDX+=hy;hq.wheelDY+=hx}}}var gZ=function(i,hk){this.ranges=i;this.primIndex=hk};gZ.prototype.primary=function(){return this.ranges[this.primIndex]};gZ.prototype.equals=function(hk){var ho=this;if(hk==this){return true}if(hk.primIndex!=this.primIndex||hk.ranges.length!=this.ranges.length){return false}for(var hm=0;hm<this.ranges.length;hm++){var hl=ho.ranges[hm],hn=hk.ranges[hm];if(!ac(hl.anchor,hn.anchor)||!ac(hl.head,hn.head)){return false}}return true};gZ.prototype.deepCopy=function(){var hm=this;var hk=[];for(var hl=0;hl<this.ranges.length;hl++){hk[hl]=new eu(cG(hm.ranges[hl].anchor),cG(hm.ranges[hl].head))}return new gZ(hk,this.primIndex)};gZ.prototype.somethingSelected=function(){var hl=this;for(var hk=0;hk<this.ranges.length;hk++){if(!hl.ranges[hk].empty()){return true}}return false};gZ.prototype.contains=function(ho,hk){var hn=this;if(!hk){hk=ho}for(var hm=0;hm<this.ranges.length;hm++){var hl=hn.ranges[hm];if(cD(hk,hl.from())>=0&&cD(ho,hl.to())<=0){return hm}}return -1};var eu=function(i,hk){this.anchor=i;this.head=hk};eu.prototype.from=function(){return aA(this.anchor,this.head)};eu.prototype.to=function(){return bQ(this.anchor,this.head)};eu.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function cX(hu,hk,ht){var hp=hu&&hu.options.selectionsMayTouch;var hm=hk[ht];hk.sort(function(hw,i){return cD(hw.from(),i.from())});ht=dP(hk,hm);for(var ho=1;ho<hk.length;ho++){var hv=hk[ho],hl=hk[ho-1];var hs=cD(hl.to(),hv.from());if(hp&&!hv.empty()?hs>0:hs>=0){var hr=aA(hl.from(),hv.from()),hq=bQ(hl.to(),hv.to());var hn=hl.empty()?hv.from()==hv.head:hl.from()==hl.head;if(ho<=ht){--ht}hk.splice(--ho,2,new eu(hn?hq:hr,hn?hr:hq))}}return new gZ(hk,ht)}function fA(i,hk){return new gZ([new eu(i,hk||i)],0)}function dq(i){if(!i.text){return i.to}return ab(i.from.line+i.text.length-1,gt(i.text).length+(i.text.length==1?i.from.ch:0))}function cl(hm,hl){if(cD(hm,hl.from)<0){return hm}if(cD(hm,hl.to)<=0){return dq(hl)}var i=hm.line+hl.text.length-(hl.to.line-hl.from.line)-1,hk=hm.ch;if(hm.line==hl.to.line){hk+=dq(hl).ch-hl.to.ch}return ab(i,hk)}function f4(hn,ho){var hl=[];for(var hm=0;hm<hn.sel.ranges.length;hm++){var hk=hn.sel.ranges[hm];hl.push(new eu(cl(hk.anchor,ho),cl(hk.head,ho)))}return cX(hn.cm,hl,hn.sel.primIndex)}function bM(hl,hk,i){if(hl.line==hk.line){return ab(i.line,hl.ch-hk.ch+i.ch)}else{return ab(i.line+(hl.line-hk.line),hl.ch)}}function am(hu,hr,hl){var hm=[];var hk=ab(hu.first,0),hv=hk;for(var ho=0;ho<hr.length;ho++){var hq=hr[ho];var ht=bM(hq.from,hk,hv);var hs=bM(dq(hq),hk,hv);hk=hq.to;hv=hs;if(hl=="around"){var hp=hu.sel.ranges[ho],hn=cD(hp.head,hp.anchor)<0;hm[ho]=new eu(hn?hs:ht,hn?ht:hs)}else{hm[ho]=new eu(ht,ht)}}return new gZ(hm,hu.sel.primIndex)}function bJ(i){i.doc.mode=gm(i.options,i.doc.modeOption);eX(i)}function eX(i){i.doc.iter(function(hk){if(hk.stateAfter){hk.stateAfter=null}if(hk.styles){hk.styles=null}});i.doc.modeFrontier=i.doc.highlightFrontier=i.doc.first;eO(i,100);i.state.modeGen++;if(i.curOp){ao(i)}}function eo(i,hk){return hk.from.ch==0&&hk.to.ch==0&&gt(hk.text)==""&&(!i.cm||i.cm.options.wholeLineUpdateBefore)}function gj(hA,ht,hn,hs){function hm(hB){return hn?hn[hB]:null}function hr(hB,hD,hC){eZ(hB,hD,hC,hs);al(hB,"change",hB,ht)}function hx(hE,hC){var hB=[];for(var hD=hE;hD<hC;++hD){hB.push(new g4(hv[hD],hm(hD),hs))}return hB}var hy=ht.from,hk=ht.to,hv=ht.text;var hu=f0(hA,hy.line),i=f0(hA,hk.line);var hl=gt(hv),hz=hm(hv.length-1),hw=hk.line-hy.line;if(ht.full){hA.insert(0,hx(0,hv.length));hA.remove(hv.length,hA.size-hv.length)}else{if(eo(hA,ht)){var hq=hx(0,hv.length-1);hr(i,i.text,hz);if(hw){hA.remove(hy.line,hw)}if(hq.length){hA.insert(hy.line,hq)}}else{if(hu==i){if(hv.length==1){hr(hu,hu.text.slice(0,hy.ch)+hl+hu.text.slice(hk.ch),hz)}else{var hp=hx(1,hv.length-1);hp.push(new g4(hl+hu.text.slice(hk.ch),hz,hs));hr(hu,hu.text.slice(0,hy.ch)+hv[0],hm(0));hA.insert(hy.line+1,hp)}}else{if(hv.length==1){hr(hu,hu.text.slice(0,hy.ch)+hv[0]+i.text.slice(hk.ch),hm(0));hA.remove(hy.line+1,hw)}else{hr(hu,hu.text.slice(0,hy.ch)+hv[0],hm(0));hr(i,hl+i.text.slice(hk.ch),hz);var ho=hx(1,hv.length-1);if(hw>1){hA.remove(hy.line+1,hw-1)}hA.insert(hy.line+1,ho)}}}}al(hA,"change",hA,ht)}function eG(hm,hl,hk){function i(hs,hq,ho){if(hs.linked){for(var hp=0;hp<hs.linked.length;++hp){var hn=hs.linked[hp];if(hn.doc==hq){continue}var hr=ho&&hn.sharedHist;if(hk&&!hr){continue}hl(hn.doc,hr);i(hn.doc,hs,hr)}}}i(hm,null,true)}function eL(i,hk){if(hk.cm){throw new Error("This document is already in use.")}i.doc=hk;hk.cm=i;ae(i);bJ(i);E(i);if(!i.options.lineWrapping){f(i)}i.options.mode=hk.modeOption;ao(i)}function E(i){(i.doc.direction=="rtl"?gn:h)(i.display.lineDiv,"CodeMirror-rtl")}function ex(i){df(i,function(){E(i);ao(i)})}function gM(i){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=this.lastSelOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=i||1}function d2(i,hl){var hk={from:cG(hl.from),to:dq(hl),text:g2(i,hl.from,hl.to)};ck(i,hk,hl.from.line,hl.to.line+1);eG(i,function(hm){return ck(hm,hk,hl.from.line,hl.to.line+1)},true);return hk}function go(hk){while(hk.length){var i=gt(hk);if(i.ranges){hk.pop()}else{break}}}
90function fv(hk,i){if(i){go(hk.done);return gt(hk.done)}else{if(hk.done.length&&!gt(hk.done).ranges){return gt(hk.done)}else{if(hk.done.length>1&&!hk.done[hk.done.length-2].ranges){hk.done.pop();return gt(hk.done)}}}}function gB(hp,hn,i,hm){var hl=hp.history;hl.undone.length=0;var hk=+new Date,hq;var hr;if((hl.lastOp==hm||hl.lastOrigin==hn.origin&&hn.origin&&((hn.origin.charAt(0)=="+"&&hl.lastModTime>hk-(hp.cm?hp.cm.options.historyEventDelay:500))||hn.origin.charAt(0)=="*"))&&(hq=fv(hl,hl.lastOp==hm))){hr=gt(hq.changes);if(cD(hn.from,hn.to)==0&&cD(hn.from,hr.to)==0){hr.to=dq(hn)}else{hq.changes.push(d2(hp,hn))}}else{var ho=gt(hl.done);if(!ho||!ho.ranges){dh(hp.sel,hl.done)}hq={changes:[d2(hp,hn)],generation:hl.generation};hl.done.push(hq);while(hl.done.length>hl.undoDepth){hl.done.shift();if(!hl.done[0].ranges){hl.done.shift()}}}hl.done.push(i);hl.generation=++hl.maxGeneration;hl.lastModTime=hl.lastSelTime=hk;hl.lastOp=hl.lastSelOp=hm;hl.lastOrigin=hl.lastSelOrigin=hn.origin;if(!hr){aN(hp,"historyAdded")}}function bT(hn,i,hl,hm){var hk=i.charAt(0);return hk=="*"||hk=="+"&&hl.ranges.length==hm.ranges.length&&hl.somethingSelected()==hm.somethingSelected()&&new Date-hn.history.lastSelTime<=(hn.cm?hn.cm.options.historyEventDelay:500)}function hc(ho,hm,i,hl){var hn=ho.history,hk=hl&&hl.origin;if(i==hn.lastSelOp||(hk&&hn.lastSelOrigin==hk&&(hn.lastModTime==hn.lastSelTime&&hn.lastOrigin==hk||bT(ho,hk,gt(hn.done),hm)))){hn.done[hn.done.length-1]=hm}else{dh(hm,hn.done)}hn.lastSelTime=+new Date;hn.lastSelOrigin=hk;hn.lastSelOp=i;if(hl&&hl.clearRedo!==false){go(hn.undone)}}function dh(hk,i){var hl=gt(i);if(!(hl&&hl.ranges&&hl.equals(hk))){i.push(hk)}}function ck(hk,ho,hn,hm){var i=ho["spans_"+hk.id],hl=0;hk.iter(Math.max(hk.first,hn),Math.min(hk.first+hk.size,hm),function(hp){if(hp.markedSpans){(i||(i=ho["spans_"+hk.id]={}))[hl]=hp.markedSpans}++hl})}function bx(hm){if(!hm){return null}var hk;for(var hl=0;hl<hm.length;++hl){if(hm[hl].marker.explicitlyCleared){if(!hk){hk=hm.slice(0,hl)}}else{if(hk){hk.push(hm[hl])}}}return !hk?hm:hk.length?hk:null}function cq(hn,ho){var hm=ho["spans_"+hn.id];if(!hm){return null}var hk=[];for(var hl=0;hl<ho.text.length;++hl){hk.push(bx(hm[hl]))}return hk}function eI(hs,hq){var hk=cq(hs,hq);var ht=eV(hs,hq);if(!hk){return ht}if(!ht){return hk}for(var hn=0;hn<hk.length;++hn){var ho=hk[hn],hp=ht[hn];if(ho&&hp){spans:for(var hm=0;hm<hp.length;++hm){var hr=hp[hm];for(var hl=0;hl<ho.length;++hl){if(ho[hl].marker==hr.marker){continue spans}}ho.push(hr)}}else{if(hp){hk[hn]=hp}}}return hk}function b9(hv,hn,hu){var hl=[];for(var hq=0;hq<hv.length;++hq){var hm=hv[hq];if(hm.ranges){hl.push(hu?gZ.prototype.deepCopy.call(hm):hm);continue}var hs=hm.changes,ht=[];hl.push({changes:ht});for(var hp=0;hp<hs.length;++hp){var hr=hs[hp],ho=(void 0);ht.push({from:hr.from,to:hr.to,text:hr.text});if(hn){for(var hk in hr){if(ho=hk.match(/^spans_(\d+)$/)){if(dP(hn,Number(ho[1]))>-1){gt(ht)[hk]=hr[hk];delete hr[hk]}}}}}}return hl}function gf(hk,hn,i,ho){if(ho){var hm=hk.anchor;if(i){var hl=cD(hn,hm)<0;if(hl!=(cD(i,hm)<0)){hm=hn;hn=i}else{if(hl!=(cD(hn,i)<0)){hn=i}}}return new eu(hm,hn)}else{return new eu(i||hn,hn)}}function gS(hm,hl,i,hk,hn){if(hn==null){hn=hm.cm&&(hm.cm.display.shift||hm.extend)}cf(hm,new gZ([gf(hm.sel.primary(),hl,i,hn)],0),hk)}function aE(hp,ho,hm){var hl=[];var hq=hp.cm&&(hp.cm.display.shift||hp.extend);for(var hn=0;hn<hp.sel.ranges.length;hn++){hl[hn]=gf(hp.sel.ranges[hn],ho[hn],null,hq)}var hk=cX(hp.cm,hl,hp.sel.primIndex);cf(hp,hk,hm)}function e(ho,hn,hl,hm){var hk=ho.sel.ranges.slice(0);hk[hn]=hl;cf(ho,cX(ho.cm,hk,ho.sel.primIndex),hm)}function K(hm,hk,hl,i){cf(hm,fA(hk,hl),i)}function b(hm,hk,i){var hl={ranges:hk.ranges,update:function(hn){var hp=this;this.ranges=[];for(var ho=0;ho<hn.length;ho++){hp.ranges[ho]=new eu(gy(hm,hn[ho].anchor),gy(hm,hn[ho].head))}},origin:i&&i.origin};aN(hm,"beforeSelectionChange",hm,hl);if(hm.cm){aN(hm.cm,"beforeSelectionChange",hm.cm,hl)}if(hl.ranges!=hk.ranges){return cX(hm.cm,hl.ranges,hl.ranges.length-1)}else{return hk}}function fT(hn,hm,hk){var i=hn.history.done,hl=gt(i);if(hl&&hl.ranges){i[i.length-1]=hm;e1(hn,hm,hk)}else{cf(hn,hm,hk)}}
90function cf(hl,hk,i){e1(hl,hk,i);hc(hl,hl.sel,hl.cm?hl.cm.curOp.id:NaN,i)}function e1(hm,hl,hk){if(f5(hm,"beforeSelectionChange")||hm.cm&&f5(hm.cm,"beforeSelectionChange")){hl=b(hm,hl,hk)}var i=hk&&hk.bias||(cD(hl.primary().head,hm.sel.primary().head)<0?-1:1);dD(hm,q(hm,hl,i,true));if(!(hk&&hk.scroll===false)&&hm.cm){gs(hm.cm)}}function dD(hk,i){if(i.equals(hk.sel)){return}hk.sel=i;if(hk.cm){hk.cm.curOp.updateInput=1;hk.cm.curOp.selectionChanged=true;aa(hk.cm)}al(hk,"cursorActivity",hk)}function fb(i){dD(i,q(i,i.sel,null,false))}function q(ht,hk,hq,hr){var hn;for(var ho=0;ho<hk.ranges.length;ho++){var hp=hk.ranges[ho];var hl=hk.ranges.length==ht.sel.ranges.length&&ht.sel.ranges[ho];var hs=cg(ht,hp.anchor,hl&&hl.anchor,hq,hr);var hm=cg(ht,hp.head,hl&&hl.head,hq,hr);if(hn||hs!=hp.anchor||hm!=hp.head){if(!hn){hn=hk.ranges.slice(0,ho)}hn[ho]=new eu(hs,hm)}}return hn?cX(ht.cm,hn,hk.primIndex):hk}function fq(hw,ht,ho,hn,hr){var hx=f0(hw,ht.line);if(hx.markedSpans){for(var hp=0;hp<hx.markedSpans.length;++hp){var hl=hx.markedSpans[hp],hm=hl.marker;var hk=("selectLeft" in hm)?!hm.selectLeft:hm.inclusiveLeft;var hv=("selectRight" in hm)?!hm.selectRight:hm.inclusiveRight;if((hl.from==null||(hk?hl.from<=ht.ch:hl.from<ht.ch))&&(hl.to==null||(hv?hl.to>=ht.ch:hl.to>ht.ch))){if(hr){aN(hm,"beforeCursorEnter");if(hm.explicitlyCleared){if(!hx.markedSpans){break}else{--hp;continue}}}if(!hm.atomic){continue}if(ho){var hs=hm.find(hn<0?1:-1),hu=(void 0);if(hn<0?hv:hk){hs=hg(hw,hs,-hn,hs&&hs.line==ht.line?hx:null)}if(hs&&hs.line==ht.line&&(hu=cD(hs,ho))&&(hn<0?hu<0:hu>0)){return fq(hw,hs,ht,hn,hr)}}var hq=hm.find(hn<0?-1:1);if(hn<0?hk:hv){hq=hg(hw,hq,hn,hq.line==ht.line?hx:null)}return hq?fq(hw,hq,ht,hn,hr):null}}}return ht}function cg(ho,hp,hm,hk,i){var hl=hk||1;var hn=fq(ho,hp,hm,hl,i)||(!i&&fq(ho,hp,hm,hl,true))||fq(ho,hp,hm,-hl,i)||(!i&&fq(ho,hp,hm,-hl,true));if(!hn){ho.cantEdit=true;return ab(ho.first,0)}return hn}function hg(hl,hm,hk,i){if(hk<0&&hm.ch==0){if(hm.line>hl.first){return gy(hl,ab(hm.line-1))}else{return null}}else{if(hk>0&&hm.ch==(i||f0(hl,hm.line)).text.length){if(hm.line<hl.first+hl.size-1){return ab(hm.line+1,0)}else{return null}}else{return new ab(hm.line,hm.ch+hk)}}}function au(i){i.setSelection(ab(i.firstLine(),0),ab(i.lastLine()),ag)}function em(hk,hm,hl){var i={canceled:false,from:hm.from,to:hm.to,text:hm.text,origin:hm.origin,cancel:function(){return i.canceled=true}};if(hl){i.update=function(hq,hp,ho,hn){if(hq){i.from=gy(hk,hq)}if(hp){i.to=gy(hk,hp)}if(ho){i.text=ho}if(hn!==undefined){i.origin=hn}}}aN(hk,"beforeChange",hk,i);if(hk.cm){aN(hk.cm,"beforeChange",hk.cm,i)}if(i.canceled){if(hk.cm){hk.cm.curOp.updateInput=2}return null}return{from:i.from,to:i.to,text:i.text,origin:i.origin}}function bs(hn,ho,hm){if(hn.cm){if(!hn.cm.curOp){return du(hn.cm,bs)(hn,ho,hm)}if(hn.cm.state.suppressEdits){return}}if(f5(hn,"beforeChange")||hn.cm&&f5(hn.cm,"beforeChange")){ho=em(hn,ho,true);if(!ho){return}}var hl=he&&!hm&&da(hn,ho.from,ho.to);if(hl){for(var hk=hl.length-1;hk>=0;--hk){P(hn,{from:hl[hk].from,to:hl[hk].to,text:hk?[""]:ho.text,origin:ho.origin})}}else{P(hn,ho)}}function P(hl,hm){if(hm.text.length==1&&hm.text[0]==""&&cD(hm.from,hm.to)==0){return}var hk=f4(hl,hm);gB(hl,hm,hk,hl.cm?hl.cm.curOp.id:NaN);eN(hl,hm,hk,eV(hl,hm));var i=[];eG(hl,function(ho,hn){if(!hn&&dP(i,ho.history)==-1){d8(ho.history,hm);i.push(ho.history)}eN(ho,hm,null,eV(ho,hm))})}function cu(hx,hu,hy){var hv=hx.cm&&hx.cm.state.suppressEdits;if(hv&&!hy){return}var ht=hx.history,hl,hn=hx.sel;var hk=hu=="undo"?ht.done:ht.undone,hw=hu=="undo"?ht.undone:ht.done;var hq=0;for(;hq<hk.length;hq++){hl=hk[hq];if(hy?hl.ranges&&!hl.equals(hx.sel):!hl.ranges){break}}if(hq==hk.length){return}ht.lastOrigin=ht.lastSelOrigin=null;for(;;){hl=hk.pop();if(hl.ranges){dh(hl,hw);if(hy&&!hl.equals(hx.sel)){cf(hx,hl,{clearRedo:false});return}hn=hl}else{if(hv){hk.push(hl);return}else{break}}}var hs=[];dh(hn,hw);hw.push({changes:hs,generation:ht.generation});ht.generation=hl.generation||++ht.maxGeneration;var hm=f5(hx,"beforeChange")||hx.cm&&f5(hx.cm,"beforeChange");var hr=function(hz){var hC=hl.changes[hz];hC.origin=hu;if(hm&&!em(hx,hC,false)){hk.length=0;return{}}hs.push(d2(hx,hC));var hB=hz?f4(hx,hC):gt(hk);eN(hx,hC,hB,eI(hx,hC));if(!hz&&hx.cm){hx.cm.scrollIntoView({from:hC.from,to:dq(hC)})}var hA=[];eG(hx,function(hD,i){if(!i&&dP(hA,hD.history)==-1){d8(hD.history,hC);hA.push(hD.history)}eN(hD,hC,null,eI(hD,hC))})};for(var ho=hl.changes.length-1;ho>=0;--ho){var hp=hr(ho);if(hp){return hp.v}}}function f8(hk,hm){if(hm==0){return}hk.first+=hm;hk.sel=new gZ(ce(hk.sel.ranges,function(hn){return new eu(ab(hn.anch
90or.line+hm,hn.anchor.ch),ab(hn.head.line+hm,hn.head.ch))}),hk.sel.primIndex);if(hk.cm){ao(hk.cm,hk.first,hk.first-hm,hm);for(var hl=hk.cm.display,i=hl.viewFrom;i<hl.viewTo;i++){W(hk.cm,i,"gutter")}}}function eN(hn,ho,hm,hk){if(hn.cm&&!hn.cm.curOp){return du(hn.cm,eN)(hn,ho,hm,hk)}if(ho.to.line<hn.first){f8(hn,ho.text.length-1-(ho.to.line-ho.from.line));return}if(ho.from.line>hn.lastLine()){return}if(ho.from.line<hn.first){var i=ho.text.length-1-(hn.first-ho.from.line);f8(hn,i);ho={from:ab(hn.first,0),to:ab(ho.to.line+i,ho.to.ch),text:[gt(ho.text)],origin:ho.origin}}var hl=hn.lastLine();if(ho.to.line>hl){ho={from:ho.from,to:ab(hl,f0(hn,hl).text.length),text:[ho.text[0]],origin:ho.origin}}ho.removed=g2(hn,ho.from,ho.to);if(!hm){hm=f4(hn,ho)}if(hn.cm){aS(hn.cm,ho,hk)}else{gj(hn,ho,hk)}e1(hn,hm,ag);if(hn.cantEdit&&cg(hn,ab(hn.firstLine(),0))){hn.cantEdit=false}}function aS(hu,hq,ho){var ht=hu.doc,hp=hu.display,hr=hq.from,hs=hq.to;var i=false,hn=hr.line;if(!hu.options.lineWrapping){hn=b7(A(f0(ht,hr.line)));ht.iter(hn,hs.line+1,function(hw){if(hw==hp.maxLine){i=true;return true}})}if(ht.sel.contains(hq.from,hq.to)>-1){aa(hu)}gj(ht,hq,ho,bq(hu));if(!hu.options.lineWrapping){ht.iter(hn,hr.line+hq.text.length,function(hx){var hw=eY(hx);if(hw>hp.maxLineLength){hp.maxLine=hx;hp.maxLineLength=hw;hp.maxLineChanged=true;i=false}});if(i){hu.curOp.updateMaxLine=true}}hd(ht,hr.line);eO(hu,400);var hv=hq.text.length-(hs.line-hr.line)-1;if(hq.full){ao(hu)}else{if(hr.line==hs.line&&hq.text.length==1&&!eo(hu.doc,hq)){W(hu,hr.line,"text")}else{ao(hu,hr.line,hs.line+1,hv)}}var hl=f5(hu,"changes"),hm=f5(hu,"change");if(hm||hl){var hk={from:hr,to:hs,text:hq.text,removed:hq.removed,origin:hq.origin};if(hm){al(hu,"change",hu,hk)}if(hl){(hu.curOp.changeObjs||(hu.curOp.changeObjs=[])).push(hk)}}hu.display.selForContextMenu=null}function bc(hm,hl,ho,hn,hk){var i;if(!hn){hn=ho}if(cD(hn,ho)<0){(i=[hn,ho],ho=i[0],hn=i[1])}if(typeof hl=="string"){hl=hm.splitLines(hl)}bs(hm,{from:ho,to:hn,text:hl,origin:hk})}function N(hm,hl,hk,i){if(hk<hm.line){hm.line+=i}else{if(hl<hm.line){hm.line=hl;hm.ch=0}}}function f2(ho,hq,hr,hs){for(var hn=0;hn<ho.length;++hn){var hk=ho[hn],hp=true;if(hk.ranges){if(!hk.copied){hk=ho[hn]=hk.deepCopy();hk.copied=true}for(var hm=0;hm<hk.ranges.length;hm++){N(hk.ranges[hm].anchor,hq,hr,hs);N(hk.ranges[hm].head,hq,hr,hs)}continue}for(var hl=0;hl<hk.changes.length;++hl){var ht=hk.changes[hl];if(hr<ht.from.line){ht.from=ab(ht.from.line+hs,ht.from.ch);ht.to=ab(ht.to.line+hs,ht.to.ch)}else{if(hq<=ht.to.line){hp=false;break}}}if(!hp){ho.splice(0,hn+1);hn=0}}}function d8(hk,hn){var hm=hn.from.line,hl=hn.to.line,i=hn.text.length-(hl-hm)-1;f2(hk.done,hm,hl,i);f2(hk.undone,hm,hl,i)}function fe(hm,hl,i,ho){var hn=hl,hk=hl;if(typeof hl=="number"){hk=f0(hm,dy(hm,hl))}else{hn=b7(hl)}if(hn==null){return null}if(ho(hk,hn)&&hm.cm){W(hm.cm,hn,i)}return hk}function fK(hl){var hn=this;this.lines=hl;this.parent=null;var hk=0;for(var hm=0;hm<hl.length;++hm){hl[hm].parent=hn;hk+=hl[hm].height}this.height=hk}fK.prototype={chunkSize:function(){return this.lines.length},removeInner:function(hk,hp){var ho=this;for(var hm=hk,hn=hk+hp;hm<hn;++hm){var hl=ho.lines[hm];ho.height-=hl.height;bU(hl);al(hl,"delete")}this.lines.splice(hk,hp)},collapse:function(i){i.push.apply(i,this.lines)},insertInner:function(hl,hm,hk){var ho=this;this.height+=hk;this.lines=this.lines.slice(0,hl).concat(hm).concat(this.lines.slice(hl));for(var hn=0;hn<hm.length;++hn){hm[hn].parent=ho}},iterN:function(i,hn,hm){var hl=this;for(var hk=i+hn;i<hk;++i){if(hm(hl.lines[i])){return true}}}};function gi(hn){var hp=this;this.children=hn;var hm=0,hk=0;for(var hl=0;hl<hn.length;++hl){var ho=hn[hl];hm+=ho.chunkSize();hk+=ho.height;ho.parent=hp}this.size=hm;this.height=hk;this.parent=null}gi.prototype={chunkSize:function(){return this.size},removeInner:function(hm,hl){var ho=this;this.size-=hl;for(var hn=0;hn<this.children.length;++hn){var hk=ho.children[hn],hq=hk.chunkSize();if(hm<hq){var hp=Math.min(hl,hq-hm),hr=hk.height;hk.removeInner(hm,hp);ho.height-=hr-hk.height;if(hq==hp){ho.children.splice(hn--,1);hk.parent=null}if((hl-=hp)==0){break}hm=0}else{hm-=hq}}if(this.size-hl<25&&(this.children.length>1||!(this.children[0] instanceof fK))){var hs=[];this.collapse(hs);this.children=[new fK(hs)];this.children[0].parent=this}},collapse:function(hk){var hm=this;for(var hl=0;hl<this.children.length;++hl){hm.children[hl].collapse(hk)}},insertInner:function(hl,ht,hs){var ho=this;this.size+=ht.length;this.height+=hs;for(var hn=0;hn<this.children.length;++hn){var hk=ho.children[hn],hq=hk.chunkSize();if(hl<=hq){hk.insertInner(hl,ht,hs);if(hk.lines&&hk.lines.length>50){var hm=hk.lines.length%25+25;for(var hr=hm;hr<hk.lines.length;){var hp=new fK(hk.lines.slice(hr,hr+=25));hk.height-=hp.height;ho.children.splice(++hn,0,hp);hp.parent=ho}hk.lines=hk.lines.slice(0,hm);ho.maybeSpill()}break}hl-=hq}},maybeSpill:function(){if(this.children.length<=10){return}var hm=this;do{var hk=hm.children.splice(hm.children.length-5,5);
90var hl=new gi(hk);if(!hm.parent){var hn=new gi(hm.children);hn.parent=hm;hm.children=[hn,hl];hm=hn}else{hm.size-=hl.size;hm.height-=hl.height;var i=dP(hm.parent.children,hm);hm.parent.children.splice(i+1,0,hl)}hl.parent=hm.parent}while(hm.children.length>10);hm.parent.maybeSpill()},iterN:function(hk,hr,hq){var hp=this;for(var hl=0;hl<this.children.length;++hl){var ho=hp.children[hl],hn=ho.chunkSize();if(hk<hn){var hm=Math.min(hr,hn-hk);if(ho.iterN(hk,hm,hq)){return true}if((hr-=hm)==0){break}hk=0}else{hk-=hn}}}};var d6=function(hm,hl,i){var hn=this;if(i){for(var hk in i){if(i.hasOwnProperty(hk)){hn[hk]=i[hk]}}}this.doc=hm;this.node=hl};d6.prototype.clear=function(){var hq=this;var hl=this.doc.cm,hn=this.line.widgets,hm=this.line,hp=b7(hm);if(hp==null||!hn){return}for(var ho=0;ho<hn.length;++ho){if(hn[ho]==hq){hn.splice(ho--,1)}}if(!hn.length){hm.widgets=null}var hk=dr(this);g5(hm,Math.max(0,hm.height-hk));if(hl){df(hl,function(){ew(hl,hm,-hk);W(hl,hp,"widget")});al(hl,"lineWidgetCleared",hl,this,hp)}};d6.prototype.changed=function(){var hn=this;var hk=this.height,i=this.doc.cm,hl=this.line;this.height=null;var hm=dr(this)-hk;if(!hm){return}if(!gg(this.doc,hl)){g5(hl,hl.height+hm)}if(i){df(i,function(){i.curOp.forceUpdate=true;ew(i,hl,hm);al(i,"lineWidgetChanged",i,hn,b7(hl))})}};bS(d6);function ew(i,hk,hl){if(b6(hk)<((i.curOp&&i.curOp.scrollTop)||i.doc.scrollTop)){c9(i,hl)}}function bZ(ho,hn,hl,hk){var hm=new d6(ho,hl,hk);var i=ho.cm;if(i&&hm.noHScroll){i.display.alignWidgets=true}fe(ho,hn,"widget",function(hq){var hr=hq.widgets||(hq.widgets=[]);if(hm.insertAt==null){hr.push(hm)}else{hr.splice(Math.min(hr.length-1,Math.max(0,hm.insertAt)),0,hm)}hm.line=hq;if(i&&!gg(ho,hq)){var hp=b6(hq)<ho.scrollTop;g5(hq,hq.height+dr(hm));if(hp){c9(i,hm.height)}i.curOp.forceUpdate=true}return true});if(i){al(i,"lineWidgetAdded",i,hm,typeof hn=="number"?hn:b7(hn))}return hm}var bg=0;var V=function(hk,i){this.lines=[];this.type=i;this.doc=hk;this.id=++bg};V.prototype.clear=function(){var hp=this;if(this.explicitlyCleared){return}var ht=this.doc.cm,hm=ht&&!ht.curOp;if(hm){db(ht)}if(f5(this,"clear")){var hu=this.find();if(hu){al(this,"clear",hu.from,hu.to)}}var hn=null,hr=null;for(var ho=0;ho<this.lines.length;++ho){var hv=hp.lines[ho];var hs=fV(hv.markedSpans,hp);if(ht&&!hp.collapsed){W(ht,b7(hv),"text")}else{if(ht){if(hs.to!=null){hr=b7(hv)}if(hs.from!=null){hn=b7(hv)}}}hv.markedSpans=fp(hv.markedSpans,hs);if(hs.from==null&&hp.collapsed&&!gg(hp.doc,hv)&&ht){g5(hv,a9(ht.display))}}if(ht&&this.collapsed&&!ht.options.lineWrapping){for(var hl=0;hl<this.lines.length;++hl){var hk=A(hp.lines[hl]),hq=eY(hk);if(hq>ht.display.maxLineLength){ht.display.maxLine=hk;ht.display.maxLineLength=hq;ht.display.maxLineChanged=true}}}if(hn!=null&&ht&&this.collapsed){ao(ht,hn,hr+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(ht){fb(ht.doc)}}if(ht){al(ht,"markerCleared",ht,this,hn,hr)}if(hm){av(ht)}if(this.parent){this.parent.clear()}};V.prototype.find=function(hn,hl){var hr=this;if(hn==null&&this.type=="bookmark"){hn=1}var hq,hp;for(var hm=0;hm<this.lines.length;++hm){var hk=hr.lines[hm];var ho=fV(hk.markedSpans,hr);if(ho.from!=null){hq=ab(hl?hk:b7(hk),ho.from);if(hn==-1){return hq}}if(ho.to!=null){hp=ab(hl?hk:b7(hk),ho.to);if(hn==1){return hp}}}return hq&&{from:hq,to:hp}};V.prototype.changed=function(){var hm=this;var hl=this.find(-1,true),hk=this,i=this.doc.cm;if(!hl||!i){return}df(i,function(){var ho=hl.line,hp=b7(hl.line);var hn=fX(i,hp);if(hn){aD(hn);i.curOp.selectionChanged=i.curOp.forceUpdate=true}i.curOp.updateMaxLine=true;if(!gg(hk.doc,ho)&&hk.height!=null){var hr=hk.height;hk.height=null;var hq=dr(hk)-hr;if(hq){g5(ho,ho.height+hq)}}al(i,"markerChanged",i,hm)})};V.prototype.attachLine=function(i){if(!this.lines.length&&this.doc.cm){var hk=this.doc.cm.curOp;if(!hk.maybeHiddenMarkers||dP(hk.maybeHiddenMarkers,this)==-1){(hk.maybeUnhiddenMarkers||(hk.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(i)};V.prototype.detachLine=function(i){this.lines.splice(dP(this.lines,i),1);if(!this.lines.length&&this.doc.cm){var hk=this.doc.cm.curOp;(hk.maybeHiddenMarkers||(hk.maybeHiddenMarkers=[])).push(this)}};bS(V);function fl(hs,hq,hr,hu,ho){if(hu&&hu.shared){return S(hs,hq,hr,hu,ho)}if(hs.cm&&!hs.cm.curOp){return du(hs.cm,fl)(hs,hq,hr,hu,ho)}var hn=new V(hs,ho),ht=cD(hq,hr);if(hu){aY(hu,hn,false)}if(ht>0||ht==0&&hn.clearWhenEmpty!==false){return hn}if(hn.replacedWith){hn.collapsed=true;
90hn.widgetNode=g6("span",[hn.replacedWith],"CodeMirror-widget");if(!hu.handleMouseEvents){hn.widgetNode.setAttribute("cm-ignore-events","true")}if(hu.insertLeft){hn.widgetNode.insertLeft=true}}if(hn.collapsed){if(B(hs,hq.line,hq,hr,hn)||hq.line!=hr.line&&B(hs,hr.line,hq,hr,hn)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}bP()}if(hn.addToHistory){gB(hs,{from:hq,to:hr,origin:"markText"},hs.sel,NaN)}var hl=hq.line,hp=hs.cm,hk;hs.iter(hl,hr.line+1,function(i){if(hp&&hn.collapsed&&!hp.options.lineWrapping&&A(i)==hp.display.maxLine){hk=true}if(hn.collapsed&&hl!=hq.line){g5(i,0)}cB(i,new eT(hn,hl==hq.line?hq.ch:null,hl==hr.line?hr.ch:null));++hl});if(hn.collapsed){hs.iter(hq.line,hr.line+1,function(i){if(gg(hs,i)){g5(i,0)}})}if(hn.clearOnEnter){ci(hn,"beforeCursorEnter",function(){return hn.clear()})}if(hn.readOnly){gl();if(hs.history.done.length||hs.history.undone.length){hs.clearHistory()}}if(hn.collapsed){hn.id=++bg;hn.atomic=true}if(hp){if(hk){hp.curOp.updateMaxLine=true}if(hn.collapsed){ao(hp,hq.line,hr.line+1)}else{if(hn.className||hn.startStyle||hn.endStyle||hn.css||hn.attributes||hn.title){for(var hm=hq.line;hm<=hr.line;hm++){W(hp,hm,"text")}}}if(hn.atomic){fb(hp.doc)}al(hp,"markerAdded",hp,hn)}return hn}var z=function(hm,hl){var hn=this;this.markers=hm;this.primary=hl;for(var hk=0;hk<hm.length;++hk){hm[hk].parent=hn}};z.prototype.clear=function(){var hl=this;if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var hk=0;hk<this.markers.length;++hk){hl.markers[hk].clear()}al(this,"clear")};z.prototype.find=function(hk,i){return this.primary.find(hk,i)};bS(z);function S(hn,hq,hp,i,hl){i=aY(i);i.shared=false;var ho=[fl(hn,hq,hp,i,hl)],hk=ho[0];var hm=i.widgetNode;eG(hn,function(hs){if(hm){i.widgetNode=hm.cloneNode(true)}ho.push(fl(hs,gy(hs,hq),gy(hs,hp),i,hl));for(var hr=0;hr<hs.linked.length;++hr){if(hs.linked[hr].isParent){return}}hk=gt(ho)});return new z(ho,hk)}function fx(i){return i.findMarks(ab(i.first,0),i.clipPos(ab(i.lastLine())),function(hk){return hk.parent})}function d9(hp,hq){for(var hn=0;hn<hq.length;hn++){var hl=hq[hn],hr=hl.find();var hk=hp.clipPos(hr.from),ho=hp.clipPos(hr.to);if(cD(hk,ho)){var hm=fl(hp,hk,ho,hl.primary,hl.primary.type);hl.markers.push(hm);hm.parent=hl}}}function e0(hm){var hk=function(hp){var hn=hm[hp],hr=[hn.primary.doc];eG(hn.primary.doc,function(i){return hr.push(i)});for(var ho=0;ho<hn.markers.length;ho++){var hq=hn.markers[ho];if(dP(hr,hq.doc)==-1){hq.parent=null;hn.markers.splice(ho--,1)}}};for(var hl=0;hl<hm.length;hl++){hk(hl)}}var cS=0;var aC=function(hn,hm,i,hl,hk){if(!(this instanceof aC)){return new aC(hn,hm,i,hl,hk)}if(i==null){i=0}gi.call(this,[new fK([new g4("",null)])]);this.first=i;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.modeFrontier=this.highlightFrontier=i;var ho=ab(i,0);this.sel=fA(ho);this.history=new gM(null);this.id=++cS;this.modeOption=hm;this.lineSep=hl;this.direction=(hk=="rtl")?"rtl":"ltr";this.extend=false;if(typeof hn=="string"){hn=this.splitLines(hn)}gj(this,{from:ho,to:ho,text:hn});cf(this,fA(ho),ag)};aC.prototype=cK(gi.prototype,{constructor:aC,iter:function(hl,hk,i){if(i){this.iterN(hl-this.first,hk-hl,i)}else{this.iterN(this.first,this.first+this.size,hl)}},insert:function(hl,hm){var hk=0;for(var hn=0;hn<hm.length;++hn){hk+=hm[hn].height}this.insertInner(hl-this.first,hm,hk)},remove:function(i,hk){this.removeInner(i-this.first,hk)},getValue:function(hk){var i=be(this,this.first,this.first+this.size);if(hk===false){return i}return i.join(hk||this.lineSeparator())},setValue:c5(function(hk){var hl=ab(this.first,0),i=this.first+this.size-1;bs(this,{from:hl,to:ab(i,f0(this,i).text.length),text:this.splitLines(hk),origin:"setValue",full:true},true);if(this.cm){fu(this.cm,0,0)}cf(this,fA(hl),ag)}),replaceRange:function(hk,hm,hl,i){hm=gy(this,hm);hl=hl?gy(this,hl):hm;bc(this,hk,hm,hl,i)},getRange:function(hm,hl,hk){var i=g2(this,gy(this,hm),gy(this,hl));if(hk===false){return i}return i.join(hk||this.lineSeparator())},getLine:function(hk){var i=this.getLineHandle(hk);return i&&i.text},getLineHandle:function(i){if(cv(this,i)){return f0(this,i)}},getLineNumber:function(i){return b7(i)},getLineHandleVisualStart:function(i){if(typeof i=="number"){i=f0(this,i)}return A(i)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(i){return gy(this,i)},getCursor:function(hl){var i=this.sel.primary(),hk;if(hl==null||hl=="head"){hk=i.head}else{if(hl=="anchor"){hk=i.anchor}
90else{if(hl=="end"||hl=="to"||hl===false){hk=i.to()}else{hk=i.from()}}}return hk},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:c5(function(i,hl,hk){K(this,gy(this,typeof i=="number"?ab(i,hl||0):i),null,hk)}),setSelection:c5(function(hk,hl,i){K(this,gy(this,hk),gy(this,hl||hk),i)}),extendSelection:c5(function(hl,i,hk){gS(this,gy(this,hl),i&&gy(this,i),hk)}),extendSelections:c5(function(hk,i){aE(this,ey(this,hk),i)}),extendSelectionsBy:c5(function(hl,i){var hk=ce(this.sel.ranges,hl);aE(this,ey(this,hk),i)}),setSelections:c5(function(hk,ho,hm){var hp=this;if(!hk.length){return}var hl=[];for(var hn=0;hn<hk.length;hn++){hl[hn]=new eu(gy(hp,hk[hn].anchor),gy(hp,hk[hn].head))}if(ho==null){ho=Math.min(hk.length-1,this.sel.primIndex)}cf(this,cX(this.cm,hl,ho),hm)}),addSelection:c5(function(hl,hm,hk){var i=this.sel.ranges.slice(0);i.push(new eu(gy(this,hl),gy(this,hm||hl)));cf(this,cX(this.cm,i,i.length-1),hk)}),getSelection:function(ho){var hp=this;var hl=this.sel.ranges,hk;for(var hm=0;hm<hl.length;hm++){var hn=g2(hp,hl[hm].from(),hl[hm].to());hk=hk?hk.concat(hn):hn}if(ho===false){return hk}else{return hk.join(ho||this.lineSeparator())}},getSelections:function(ho){var hp=this;var hn=[],hk=this.sel.ranges;for(var hl=0;hl<hk.length;hl++){var hm=g2(hp,hk[hl].from(),hk[hl].to());if(ho!==false){hm=hm.join(ho||hp.lineSeparator())}hn[hl]=hm}return hn},replaceSelection:function(hm,ho,hk){var hn=[];for(var hl=0;hl<this.sel.ranges.length;hl++){hn[hl]=hm}this.replaceSelections(hn,ho,hk||"+input")},replaceSelections:c5(function(hl,hq,hs){var hp=this;var hr=[],hn=this.sel;for(var ho=0;ho<hn.ranges.length;ho++){var ht=hn.ranges[ho];hr[ho]={from:ht.from(),to:ht.to(),text:hp.splitLines(hl[ho]),origin:hs}}var hk=hq&&hq!="end"&&am(this,hr,hq);for(var hm=hr.length-1;hm>=0;hm--){bs(hp,hr[hm])}if(hk){fT(this,hk)}else{if(this.cm){gs(this.cm)}}}),undo:c5(function(){cu(this,"undo")}),redo:c5(function(){cu(this,"redo")}),undoSelection:c5(function(){cu(this,"undo",true)}),redoSelection:c5(function(){cu(this,"redo",true)}),setExtending:function(i){this.extend=i},getExtending:function(){return this.extend},historySize:function(){var hn=this.history,hk=0,hm=0;for(var hl=0;hl<hn.done.length;hl++){if(!hn.done[hl].ranges){++hk}}for(var ho=0;ho<hn.undone.length;ho++){if(!hn.undone[ho].ranges){++hm}}return{undo:hk,redo:hm}},clearHistory:function(){var i=this;this.history=new gM(this.history.maxGeneration);eG(this,function(hk){return hk.history=i.history},true)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(i){if(i){this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(i){return this.history.generation==(i||this.cleanGeneration)},getHistory:function(){return{done:b9(this.history.done),undone:b9(this.history.undone)}},setHistory:function(hk){var i=this.history=new gM(this.history.maxGeneration);i.done=b9(hk.done.slice(0),null,true);i.undone=b9(hk.undone.slice(0),null,true)},setGutterMarker:c5(function(i,hk,hl){return fe(this,i,"gutter",function(hm){var hn=hm.gutterMarkers||(hm.gutterMarkers={});hn[hk]=hl;if(!hl&&fE(hn)){hm.gutterMarkers=null}return true})}),clearGutter:c5(function(i){var hk=this;this.iter(function(hl){if(hl.gutterMarkers&&hl.gutterMarkers[i]){fe(hk,hl,"gutter",function(){hl.gutterMarkers[i]=null;if(fE(hl.gutterMarkers)){hl.gutterMarkers=null}return true})}})}),lineInfo:function(i){var hk;if(typeof i=="number"){if(!cv(this,i)){return null}hk=i;i=f0(this,i);if(!i){return null}}else{hk=b7(i);if(hk==null){return null}}return{line:hk,handle:i,text:i.text,gutterMarkers:i.gutterMarkers,textClass:i.textClass,bgClass:i.bgClass,wrapClass:i.wrapClass,widgets:i.widgets}},addLineClass:c5(function(hl,hk,i){return fe(this,hl,hk=="gutter"?"gutter":"class",function(hm){var hn=hk=="text"?"textClass":hk=="background"?"bgClass":hk=="gutter"?"gutterClass":"wrapClass";if(!hm[hn]){hm[hn]=i}else{if(X(i).test(hm[hn])){return false}else{hm[hn]+=" "+i}}return true})}),removeLineClass:c5(function(hl,hk,i){return fe(this,hl,hk=="gutter"?"gutter":"class",function(hn){var hq=hk=="text"?"textClass":hk=="background"?"bgClass":hk=="gutter"?"gutterClass":"wrapClass";var hp=hn[hq];
90if(!hp){return false}else{if(i==null){hn[hq]=null}else{var ho=hp.match(X(i));if(!ho){return false}var hm=ho.index+ho[0].length;hn[hq]=hp.slice(0,ho.index)+(!ho.index||hm==hp.length?"":" ")+hp.slice(hm)||null}}return true})}),addLineWidget:c5(function(hl,hk,i){return bZ(this,hl,hk,i)}),removeLineWidget:function(i){i.clear()},markText:function(hl,hk,i){return fl(this,gy(this,hl),gy(this,hk),i,i&&i.type||"range")},setBookmark:function(hl,i){var hk={replacedWith:i&&(i.nodeType==null?i.widget:i),insertLeft:i&&i.insertLeft,clearWhenEmpty:false,shared:i&&i.shared,handleMouseEvents:i&&i.handleMouseEvents};hl=gy(this,hl);return fl(this,hl,hl,hk,"bookmark")},findMarksAt:function(ho){ho=gy(this,ho);var hn=[],hl=f0(this,ho.line).markedSpans;if(hl){for(var hk=0;hk<hl.length;++hk){var hm=hl[hk];if((hm.from==null||hm.from<=ho.ch)&&(hm.to==null||hm.to>=ho.ch)){hn.push(hm.marker.parent||hm.marker)}}}return hn},findMarks:function(hn,hm,hk){hn=gy(this,hn);hm=gy(this,hm);var hl=[],i=hn.line;this.iter(hn.line,hm.line+1,function(ho){var hq=ho.markedSpans;if(hq){for(var hp=0;hp<hq.length;hp++){var hr=hq[hp];if(!(hr.to!=null&&i==hn.line&&hn.ch>=hr.to||hr.from==null&&i!=hn.line||hr.from!=null&&i==hm.line&&hr.from>=hm.ch)&&(!hk||hk(hr.marker))){hl.push(hr.marker.parent||hr.marker)}}}++i});return hl},getAllMarks:function(){var i=[];this.iter(function(hl){var hk=hl.markedSpans;if(hk){for(var hm=0;hm<hk.length;++hm){if(hk[hm].from!=null){i.push(hk[hm].marker)}}}});return i},posFromIndex:function(hm){var hk,i=this.first,hl=this.lineSeparator().length;this.iter(function(hn){var ho=hn.text.length+hl;if(ho>hm){hk=hm;return true}hm-=ho;++i});return gy(this,ab(i,hk))},indexFromPos:function(hl){hl=gy(this,hl);var i=hl.ch;if(hl.line<this.first||hl.ch<0){return 0}var hk=this.lineSeparator().length;this.iter(this.first,hl.line,function(hm){i+=hm.text.length+hk});return i},copy:function(i){var hk=new aC(be(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);hk.scrollTop=this.scrollTop;hk.scrollLeft=this.scrollLeft;hk.sel=this.sel;hk.extend=false;if(i){hk.history.undoDepth=this.history.undoDepth;hk.setHistory(this.getHistory())}return hk},linkedDoc:function(i){if(!i){i={}}var hm=this.first,hl=this.first+this.size;if(i.from!=null&&i.from>hm){hm=i.from}if(i.to!=null&&i.to<hl){hl=i.to}var hk=new aC(be(this,hm,hl),i.mode||this.modeOption,hm,this.lineSep,this.direction);if(i.sharedHist){hk.history=this.history}(this.linked||(this.linked=[])).push({doc:hk,sharedHist:i.sharedHist});hk.linked=[{doc:this,isParent:true,sharedHist:i.sharedHist}];d9(hk,fx(this));return hk},unlinkDoc:function(hl){var ho=this;if(hl instanceof L){hl=hl.doc}if(this.linked){for(var hm=0;hm<this.linked.length;++hm){var hn=ho.linked[hm];if(hn.doc!=hl){continue}ho.linked.splice(hm,1);hl.unlinkDoc(ho);e0(fx(ho));break}}if(hl.history==this.history){var hk=[hl.id];eG(hl,function(i){return hk.push(i.id)},true);hl.history=new gM(null);hl.history.done=b9(this.history.done,hk);hl.history.undone=b9(this.history.undone,hk)}},iterLinkedDocs:function(i){eG(this,i)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(i){if(this.lineSep){return i.split(this.lineSep)}return gJ(i)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:c5(function(i){if(i!="rtl"){i="ltr"}if(i==this.direction){return}this.direction=i;this.iter(function(hk){return hk.order=null});if(this.cm){ex(this.cm)}})});aC.prototype.eachLine=aC.prototype.iter;var an=0;function bw(hs){var hu=this;dH(hu);if(a2(hu,hs)||bn(hu.display,hs)){return}c7(hs);if(ef){an=+new Date}var ht=cO(hu,hs,true),hl=hs.dataTransfer.files;if(!ht||hu.isReadOnly()){return}if(hl&&hl.length&&window.FileReader&&window.File){var hp=hl.length,hw=Array(hp),hm=0;var hn=function(){if(++hm==hp){du(hu,function(){ht=gy(hu.doc,ht);var i={from:ht,to:ht,text:hu.doc.splitLines(hw.filter(function(hx){return hx!=null}).join(hu.doc.lineSeparator())),origin:"paste"};bs(hu.doc,i);fT(hu.doc,fA(gy(hu.doc,ht),gy(hu.doc,dq(i))))})()}};var hv=function(hz,hy){if(hu.options.allowDropFileTypes&&dP(hu.options.allowDropFileTypes,hz.type)==-1){hn();return}var hx=new FileReader;hx.onerror=function(){return hn()};hx.onload=function(){var i=hx.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(i)){hn();return}hw[hy]=i;hn()};hx.readAsText(hz)};for(var hr=0;hr<hl.length;hr++){hv(hl[hr],hr)}}else{if(hu.state.draggingText&&hu.doc.sel.contains(ht)>-1){hu.state.draggingText(hs);setTimeout(function(){return hu.display.input.focus()},20);return}try{var hk=hs.dataTransfer.getData("Text");if(hk){var hq;if(hu.state.draggingText&&!hu.state.draggingText.copy){hq=hu.listSelections()}e1(hu.doc,fA(ht,ht));if(hq){for(var ho=0;ho<hq.length;++ho){bc(hu.doc,"",hq[ho].anchor,hq[ho].head,"drag")}}hu.replaceSelection(hk,"around","paste");hu.display.input.focus()}}catch(hs){}}}function U(i,hl){if(ef&&(!i.state.draggingText||+new Date-an<100)){e3(hl);return}if(a2(i,hl)||bn(i.display,hl)){return}hl.dataTransfer.setData("Text",i.getSelection());hl.dataTransfer.effectAllowed="copyMove";
90if(hl.dataTransfer.setDragImage&&!aM){var hk=g0("img",null,null,"position: fixed; left: 0; top: 0;");hk.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(eB){hk.width=hk.height=1;i.display.wrapper.appendChild(hk);hk._top=hk.offsetTop}hl.dataTransfer.setDragImage(hk,0,0);if(eB){hk.parentNode.removeChild(hk)}}}function hh(i,hk){var hm=cO(i,hk);if(!hm){return}var hl=document.createDocumentFragment();D(i,hm,hl);if(!i.display.dragCursor){i.display.dragCursor=g0("div",null,"CodeMirror-cursors CodeMirror-dragcursors");i.display.lineSpace.insertBefore(i.display.dragCursor,i.display.cursorDiv)}cd(i.display.dragCursor,hl)}function dH(i){if(i.display.dragCursor){i.display.lineSpace.removeChild(i.display.dragCursor);i.display.dragCursor=null}}function aJ(ho){if(!document.getElementsByClassName){return}var hn=document.getElementsByClassName("CodeMirror"),hm=[];for(var hl=0;hl<hn.length;hl++){var hk=hn[hl].CodeMirror;if(hk){hm.push(hk)}}if(hm.length){hm[0].operation(function(){for(var hp=0;hp<hm.length;hp++){ho(hm[hp])}})}}var c4=false;function bv(){if(c4){return}gr();c4=true}function gr(){var i;ci(window,"resize",function(){if(i==null){i=setTimeout(function(){i=null;aJ(a4)},100)}});ci(window,"blur",function(){return aJ(a6)})}function a4(i){var hk=i.display;hk.cachedCharWidth=hk.cachedTextHeight=hk.cachedPaddingH=null;hk.scrollbarsClipped=false;i.setSize()}var f1={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};for(var gh=0;gh<10;gh++){f1[gh+48]=f1[gh+96]=String(gh)}for(var gL=65;gL<=90;gL++){f1[gL]=String.fromCharCode(gL)}for(var gK=1;gK<=12;gK++){f1[gK+111]=f1[gK+63235]="F"+gK}var fW={};fW.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"};fW.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"};fW.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"};fW.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]};fW["default"]=ct?fW.macDefault:fW.pcDefault;function d0(hl){var hr=hl.split(/-(?!$)/);hl=hr[hr.length-1];var hq,hp,hk,ho;for(var hn=0;hn<hr.length-1;hn++){var hm=hr[hn];if(/^(cmd|meta|m)$/i.test(hm)){ho=true}else{if(/^a(lt)?$/i.test(hm)){hq=true}else{if(/^(c|ctrl|control)$/i.test(hm)){hp=true}else{if(/^s(hift)?$/i.test(hm)){hk=true}else{throw new Error("Unrecognized modifier name: "+hm)}}}}}if(hq){hl="Alt-"+hl}if(hp){hl="Ctrl-"+hl}if(ho){hl="Cmd-"+hl}if(hk){hl="Shift-"+hl}return hl}
vendor: 4,061 bytes, line 90
90function c8(hr){var hl={};for(var hq in hr){if(hr.hasOwnProperty(hq)){var hs=hr[hq];if(/^(name|fallthrough|(de|at)tach)$/.test(hq)){continue}if(hs=="..."){delete hr[hq];continue}var ht=ce(hq.split(" "),d0);for(var hp=0;hp<ht.length;hp++){var hn=(void 0),hm=(void 0);if(hp==ht.length-1){hm=ht.join(" ");hn=hs}else{hm=ht.slice(0,hp+1).join(" ");hn="..."}var ho=hl[hm];if(!ho){hl[hm]=hn}else{if(ho!=hn){throw new Error("Inconsistent bindings for "+hm)}}}delete hr[hq]}}for(var hk in hl){hr[hk]=hl[hk]}return hr}function k(hn,ho,hq,hm){ho=gR(ho);var hp=ho.call?ho.call(hn,hm):ho[hn];if(hp===false){return"nothing"}if(hp==="..."){return"multi"}if(hp!=null&&hq(hp)){return"handled"}if(ho.fallthrough){if(Object.prototype.toString.call(ho.fallthrough)!="[object Array]"){return k(hn,ho.fallthrough,hq,hm)}for(var hl=0;hl<ho.fallthrough.length;hl++){var hk=k(hn,ho.fallthrough[hl],hq,hm);if(hk){return hk}}}}function ff(hk){var i=typeof hk=="string"?hk:f1[hk.keyCode];return i=="Ctrl"||i=="Alt"||i=="Shift"||i=="Mod"}function gU(i,hk,hm){var hl=i;if(hk.altKey&&hl!="Alt"){i="Alt-"+i}if((cb?hk.metaKey:hk.ctrlKey)&&hl!="Ctrl"){i="Ctrl-"+i}if((cb?hk.ctrlKey:hk.metaKey)&&hl!="Cmd"){i="Cmd-"+i}if(!hm&&hk.shiftKey&&hl!="Shift"){i="Shift-"+i}return i}function gb(hk,hl){if(eB&&hk.keyCode==34&&hk["char"]){return false}var i=f1[hk.keyCode];if(i==null||hk.altGraphKey){return false}if(hk.keyCode==3&&hk.code){i=hk.code}return gU(i,hk,hl)}function gR(i){return typeof i=="string"?fW[i]:i}function fI(hk,hq){var hl=hk.doc.sel.ranges,ho=[];for(var hn=0;hn<hl.length;hn++){var hm=hq(hl[hn]);while(ho.length&&cD(hm.from,gt(ho).to)<=0){var hp=ho.pop();if(cD(hp.from,hm.from)<0){hm.from=hp.from;break}}ho.push(hm)}df(hk,function(){for(var hr=ho.length-1;hr>=0;hr--){bc(hk.doc,"",ho[hr].from,ho[hr].to,"+delete")}gs(hk)})}function bG(i,hl,hk){var hm=eU(i.text,hl+hk,hk);return hm<0||hm>i.text.length?null:hm}function ap(i,hm,hk){var hl=bG(i,hm.ch,hk);return hl==null?null:new ab(hm.line,hl,hk<0?"after":"before")}function fd(hk,hs,hp,ho,hm){if(hk){if(hs.doc.direction=="rtl"){hm=-hm}var hn=a(hp,hs.doc.direction);if(hn){var hl=hm<0?gt(hn):hn[0];var hu=(hm<0)==(hl.level==1);var hr=hu?"after":"before";var i;if(hl.level>0||hs.doc.direction=="rtl"){var hq=bh(hs,hp);i=hm<0?hp.text.length-1:0;var ht=G(hs,hq,i).top;i=cN(function(hv){return G(hs,hq,hv).top==ht},(hm<0)==(hl.level==1)?hl.from:hl.to-1,i);if(hr=="before"){i=bG(hp,i,1)}}else{i=hm<0?hl.to:hl.from}return new ab(ho,i,hr)}}return new ab(ho,hm<0?hp.text.length:0,hm<0?"before":"after")}function w(hu,hz,hn,hq){var hw=a(hz,hu.doc.direction);if(!hw){return ap(hz,hn,hq)}if(hn.ch>=hz.text.length){hn.ch=hz.text.length;hn.sticky="before"}else{if(hn.ch<=0){hn.ch=0;hn.sticky="after"}}var hm=aR(hw,hn.ch,hn.sticky),ho=hw[hm];if(hu.doc.direction=="ltr"&&ho.level%2==0&&(hq>0?ho.to>hn.ch:ho.from<hn.ch)){return ap(hz,hn,hq)}var hx=function(hB,hA){return bG(hz,hB instanceof ab?hB.ch:hB,hA)};var hr;var hv=function(hA){if(!hu.options.lineWrapping){return{begin:0,end:hz.text.length}}hr=hr||bh(hu,hz);return bA(hu,hz,hr,hA)};var hp=hv(hn.sticky=="before"?hx(hn,-1):hn.ch);if(hu.doc.direction=="rtl"||ho.level==1){var hy=(ho.level==1)==(hq<0);var hk=hx(hn,hy?1:-1);if(hk!=null&&(!hy?hk>=ho.from&&hk>=hp.begin:hk<=ho.to&&hk<=hp.end)){var ht=hy?"before":"after";return new ab(hn.line,hk,ht)}}var hl=function(hA,hD,hG){var hC=function(hI,hH){return hH?new ab(hn.line,hx(hI,1),"before"):new ab(hn.line,hI,"after")};for(;hA>=0&&hA<hw.length;hA+=hD){var hB=hw[hA];var hE=(hD>0)==(hB.level!=1);var hF=hE?hG.begin:hx(hG.end,-1);if(hB.from<=hF&&hF<hB.to){return hC(hF,hE)}hF=hE?hB.from:hx(hB.to,-1);if(hG.begin<=hF&&hF<hG.end){return hC(hF,hE)}}};var hs=hl(hm+hq,hq,hp);if(hs){return hs}var i=hq>0?hp.end:hx(hp.begin,-1);if(i!=null&&!(hq>0&&i==hz.text.length)){hs=hl(hq>0?0:hw.length-1,hq,hv(i));if(hs){return hs}}return null}var fi={selectAll:au,singleSelection:function(i){return i.setSelection(i.getCursor("anchor"),i.getCursor("head"),ag)},killLine:function(i){return fI(i,function(hl){if(hl.empty()){var hk=f0(i.doc,hl.head.line).text.length;
90if(hl.head.ch==hk&&hl.head.line<i.lastLine()){return{from:hl.head,to:ab(hl.head.line+1,0)}}else{return{from:hl.head,to:ab(hl.head.line,hk)}}}else{return{from:hl.from(),to:hl.to()}}})},deleteLine:function(i){return fI(i,function(hk){return({from:ab(hk.from().line,0),to:gy(i.doc,ab(hk.to().line+1,0))})})},delLineLeft:function(i){return fI(i,function(hk){return({from:ab(hk.from().line,0),to:hk.from()})})},delWrappedLineLeft:function(i){return fI(i,function(hk){var hm=i.charCoords(hk.head,"div").top+5;var hl=i.coordsChar({left:0,top:hm},"div");return{from:hl,to:hk.from()}})},delWrappedLineRight:function(i){return fI(i,function(hk){var hm=i.charCoords(hk.head,"div").top+5;var hl=i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:hm},"div");return{from:hk.from(),to:hl}})},undo:function(i){return i.undo()},redo:function(i){return i.redo()},undoSelection:function(i){return i.undoSelection()},redoSelection:function(i){return i.redoSelection()},goDocStart:function(i){return i.extendSelection(ab(i.firstLine(),0))},goDocEnd:function(i){return i.extendSelection(ab(i.lastLine()))},goLineStart:function(i){return i.extendSelectionsBy(function(hk){return bL(i,hk.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(i){return i.extendSelectionsBy(function(hk){return ec(i,hk.head)},{origin:"+move",bias:1})},goLineEnd:function(i){return i.extendSelectionsBy(function(hk){return el(i,hk.head.line)},{origin:"+move",bias:-1})},goLineRight:function(i){return i.extendSelectionsBy(function(hk){var hl=i.cursorCoords(hk.head,"div").top+5;return i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:hl},"div")},dp)},goLineLeft:function(i){return i.extendSelectionsBy(function(hk){var hl=i.cursorCoords(hk.head,"div").top+5;return i.coordsChar({left:0,top:hl},"div")},dp)},goLineLeftSmart:function(i){return i.extendSelectionsBy(function(hk){var hl=i.cursorCoords(hk.head,"div").top+5;var hm=i.coordsChar({left:0,top:hl},"div");if(hm.ch<i.getLine(hm.line).search(/\S/)){return ec(i,hk.head)}return hm},dp)},goLineUp:function(i){return i.moveV(-1,"line")},goLineDown:function(i){return i.moveV(1,"line")},goPageUp:function(i){return i.moveV(-1,"page")},goPageDown:function(i){return i.moveV(1,"page")},goCharLeft:function(i){return i.moveH(-1,"char")},goCharRight:function(i){return i.moveH(1,"char")},goColumnLeft:function(i){return i.moveH(-1,"column")},goColumnRight:function(i){return i.moveH(1,"column")},goWordLeft:function(i){return i.moveH(-1,"word")},goGroupRight:function(i){return i.moveH(1,"group")},goGroupLeft:function(i){return i.moveH(-1,"group")},goWordRight:function(i){return i.moveH(1,"word")},delCharBefore:function(i){return i.deleteH(-1,"char")},delCharAfter:function(i){return i.deleteH(1,"char")},delWordBefore:function(i){return i.deleteH(-1,"word")},delWordAfter:function(i){return i.deleteH(1,"word")},delGroupBefore:function(i){return i.deleteH(-1,"group")},delGroupAfter:function(i){return i.deleteH(1,"group")},indentAuto:function(i){return i.indentSelection("smart")},indentMore:function(i){return i.indentSelection("add")},indentLess:function(i){return i.indentSelection("subtract")},insertTab:function(i){return i.replaceSelection("\t")},insertSoftTab:function(hk){var hm=[],hl=hk.listSelections(),hp=hk.options.tabSize;for(var ho=0;ho<hl.length;ho++){var hq=hl[ho].from();var hn=cc(hk.getLine(hq.line),hq.ch,hp);hm.push(cQ(hp-hn%hp))}hk.replaceSelections(hm)},defaultTab:function(i){if(i.somethingSelected()){i.indentSelection("add")}else{i.execCommand("insertTab")}},transposeChars:function(i){return df(i,function(){var hm=i.listSelections(),hl=[];for(var hn=0;hn<hm.length;hn++){if(!hm[hn].empty()){continue}var hp=hm[hn].head,hk=f0(i.doc,hp.line).text;if(hk){if(hp.ch==hk.length){hp=new ab(hp.line,hp.ch-1)}if(hp.ch>0){hp=new ab(hp.line,hp.ch+1);i.replaceRange(hk.charAt(hp.ch-1)+hk.charAt(hp.ch-2),ab(hp.line,hp.ch-2),hp,"+transpose")}else{if(hp.line>i.doc.first){var ho=f0(i.doc,hp.line-1).text;if(ho){hp=new ab(hp.line,1);i.replaceRange(hk.charAt(0)+i.doc.lineSeparator()+ho.charAt(ho.length-1),ab(hp.line-1,ho.length-1),hp,"+transpose")}}}}hl.push(new eu(hp,hp))}i.setSelections(hl)})},newlineAndIndent:function(i){return df(i,function(){var hk=i.listSelections();for(var hl=hk.length-1;hl>=0;hl--){i.replaceRange(i.doc.lineSeparator(),hk[hl].anchor,hk[hl].head,"+input")}hk=i.listSelections();for(var hm=0;hm<hk.length;hm++){i.indentLine(hk[hm].from().line,null,true)}gs(i)})},openLine:function(i){return i.replaceSelection("\n","start")},toggleOverwrite:function(i){return i.toggleOverwrite()}};function bL(i,hl){var hk=f0(i.doc,hl);var hm=A(hk);if(hm!=hk){hl=b7(hm)}return fd(true,i,hm,hl,1)}function el(i,hl){var hk=f0(i.doc,hl);var hm=cJ(hk);if(hm!=hk){hl=b7(hm)}return fd(true,i,hk,hl,-1)}function ec(hk,hp){var ho=bL(hk,hp.line);var hl=f0(hk.doc,ho.line);var i=a(hl,hk.doc.direction);if(!i||i[0].level==0){var hn=Math.max(ho.ch,hl.text.search(/\S/));var hm=hp.line==ho.line&&hp.ch<=hn&&hp.ch;return ab(ho.line,hm?0:hn,ho.sticky)}return ho}
90function gI(hk,hn,i){if(typeof hn=="string"){hn=fi[hn];if(!hn){return false}}hk.display.input.ensurePolled();var hm=hk.display.shift,hl=false;try{if(hk.isReadOnly()){hk.state.suppressEdits=true}if(i){hk.display.shift=false}hl=hn(hk)!=cy}finally{hk.display.shift=hm;hk.state.suppressEdits=false}return hl}function eH(hl,hm,ho){for(var hn=0;hn<hl.state.keyMaps.length;hn++){var hk=k(hm,hl.state.keyMaps[hn],ho,hl);if(hk){return hk}}return(hl.options.extraKeys&&k(hm,hl.options.extraKeys,ho,hl))||k(hm,hl.options.keyMap,ho,hl)}var eh=new hj;function bp(i,hl,hn,hm){var hk=i.state.keySeq;if(hk){if(ff(hl)){return"handled"}if(/\'$/.test(hl)){i.state.keySeq=null}else{eh.set(50,function(){if(i.state.keySeq==hk){i.state.keySeq=null;i.display.input.reset()}})}if(cH(i,hk+" "+hl,hn,hm)){return true}}return cH(i,hl,hn,hm)}function cH(hk,hl,hn,hm){var i=eH(hk,hl,hm);if(i=="multi"){hk.state.keySeq=hl}if(i=="handled"){al(hk,"keyHandled",hk,hl,hn)}if(i=="handled"||i=="multi"){c7(hn);r(hk)}return !!i}function f3(i,hl){var hk=gb(hl,true);if(!hk){return false}if(hl.shiftKey&&!i.state.keySeq){return bp(i,"Shift-"+hk,hl,function(hm){return gI(i,hm,true)})||bp(i,hk,hl,function(hm){if(typeof hm=="string"?/^go[A-Z]/.test(hm):hm.motion){return gI(i,hm)}})}else{return bp(i,hk,hl,function(hm){return gI(i,hm)})}}function eS(i,hl,hk){return bp(i,"'"+hk+"'",hl,function(hm){return gI(i,hm,true)})}var dV=null;function s(hm){var i=this;i.curOp.focus=ej();if(a2(i,hm)){return}if(ef&&n<11&&hm.keyCode==27){hm.returnValue=false}var hk=hm.keyCode;i.display.shift=hk==16||hm.shiftKey;
90var hl=f3(i,hm);if(eB){dV=hl?hk:null;if(!hl&&hk==88&&!dG&&(ct?hm.metaKey:hm.ctrlKey)){i.replaceSelection("",null,"cut")}}if(cP&&!ct&&!hl&&hk==46&&hm.shiftKey&&!hm.ctrlKey&&document.execCommand){document.execCommand("cut")}if(hk==18&&!/\bCodeMirror-crosshair\b/.test(i.display.lineDiv.className)){aB(i)}}function aB(hk){var hl=hk.display.lineDiv;gn(hl,"CodeMirror-crosshair");function i(hm){if(hm.keyCode==18||!hm.altKey){h(hl,"CodeMirror-crosshair");eP(document,"keyup",i);eP(document,"mouseover",i)}}ci(document,"keyup",i);ci(document,"mouseover",i)}function bt(i){if(i.keyCode==16){this.doc.sel.shift=false}a2(this,i)}function cY(hn){var i=this;if(bn(i.display,hn)||a2(i,hn)||hn.ctrlKey&&!hn.altKey||ct&&hn.metaKey){return}var hm=hn.keyCode,hk=hn.charCode;if(eB&&hm==dV){dV=null;c7(hn);return}if((eB&&(!hn.which||hn.which<10))&&f3(i,hn)){return}var hl=String.fromCharCode(hk==null?hm:hk);if(hl=="\x08"){return}if(eS(i,hn,hl)){return}i.display.input.onKeyPress(hn)}var dz=400;var dT=function(hk,hl,i){this.time=hk;this.pos=hl;this.button=i};dT.prototype.compare=function(hk,hl,i){return this.time+dz>hk&&cD(hl,this.pos)==0&&i==this.button};var dU,dK;function J(hl,hk){var i=+new Date;if(dK&&dK.compare(i,hl,hk)){dU=dK=null;return"triple"}else{if(dU&&dU.compare(i,hl,hk)){dK=new dT(i,hl,hk);dU=null;return"double"}else{dU=new dT(i,hl,hk);dK=null;return"single"}}}function e7(hn){var i=this,hm=i.display;if(a2(i,hn)||hm.activeTouch&&hm.input.supportsTouch()){return}hm.input.ensurePolled();hm.shift=hn.shiftKey;if(bn(hm,hn)){if(!dt){hm.scroller.draggable=false;setTimeout(function(){return hm.scroller.draggable=true},100)}return}if(o(i,hn)){return}var ho=cO(i,hn),hk=gE(hn),hl=ho?J(ho,hk):"single";window.focus();if(hk==1&&i.state.selectingText){i.state.selectingText(hn)}if(ho&&dd(i,hk,ho,hl,hn)){return}if(hk==1){if(ho){aF(i,ho,hl,hn)}else{if(Q(hn)==hm.scroller){c7(hn)}}}else{if(hk==2){if(ho){gS(i.doc,ho)}setTimeout(function(){return hm.input.focus()},20)}else{if(hk==3){if(g9){i.display.input.onContextMenu(hn)}else{ar(i)}}}}}function dd(i,hl,ho,hn,hm){var hk="Click";if(hn=="double"){hk="Double"+hk}else{if(hn=="triple"){hk="Triple"+hk}}hk=(hl==1?"Left":hl==2?"Middle":"Right")+hk;return bp(i,gU(hk,hm),hm,function(hq){if(typeof hq=="string"){hq=fi[hq]}if(!hq){return false}var hp=false;try{if(i.isReadOnly()){i.state.suppressEdits=true}hp=hq(i,ho)!=cy}finally{i.state.suppressEdits=false}return hp})}function b2(i,ho,hm){var hk=i.getOption("configureMouse");var hn=hk?hk(i,ho,hm):{};if(hn.unit==null){var hl=gx?hm.shiftKey&&hm.metaKey:hm.altKey;hn.unit=hl?"rectangle":ho=="single"?"char":ho=="double"?"word":"line"}if(hn.extend==null||i.doc.extend){hn.extend=i.doc.extend||hm.shiftKey}if(hn.addNew==null){hn.addNew=ct?hm.metaKey:hm.ctrlKey}if(hn.moveOnDrag==null){hn.moveOnDrag=!(ct?hm.altKey:hm.ctrlKey)}return hn}function aF(i,hp,ho,hm){if(ef){setTimeout(cW(u,i),0)}else{i.curOp.focus=ej()}var hl=b2(i,ho,hm);var hn=i.doc.sel,hk;if(i.options.dragDrop&&ft&&!i.isReadOnly()&&ho=="single"&&(hk=hn.contains(hp))>-1&&(cD((hk=hn.ranges[hk]).from(),hp)<0||hp.xRel>0)&&(cD(hk.to(),hp)>0||hp.xRel<0)){bf(i,hm,hp,hl)}else{p(i,hm,hp,hl)}}function bf(hq,i,hn,hk){var hm=hq.display,ho=false;var hl=du(hq,function(hs){if(dt){hm.scroller.draggable=false}hq.state.draggingText=false;eP(hm.wrapper.ownerDocument,"mouseup",hl);eP(hm.wrapper.ownerDocument,"mousemove",hr);eP(hm.scroller,"dragstart",hp);eP(hm.scroller,"drop",hl);if(!ho){c7(hs);if(!hk.addNew){gS(hq.doc,hn,null,null,hk.extend)}if(dt||ef&&n==9){setTimeout(function(){hm.wrapper.ownerDocument.body.focus();hm.input.focus()},20)}else{hm.input.focus()}}});var hr=function(hs){ho=ho||Math.abs(i.clientX-hs.clientX)+Math.abs(i.clientY-hs.clientY)>=10};var hp=function(){return ho=true};if(dt){hm.scroller.draggable=true}hq.state.draggingText=hl;hl.copy=!hk.moveOnDrag;if(hm.scroller.dragDrop){hm.scroller.dragDrop()}ci(hm.wrapper.ownerDocument,"mouseup",hl);ci(hm.wrapper.ownerDocument,"mousemove",hr);ci(hm.scroller,"dragstart",hp);ci(hm.scroller,"drop",hl);ar(hq);setTimeout(function(){return hm.input.focus()},20)}function ep(hk,hm,hl){if(hl=="char"){return new eu(hm,hm)}if(hl=="word"){return hk.findWordAt(hm)}if(hl=="line"){return new eu(ab(hm.line,0),gy(hk.doc,ab(hm.line+1,0)))}var i=hl(hk,hm);return new eu(i.from,i.to)}function p(hn,hy,hl,hr){var hx=hn.display,hB=hn.doc;c7(hy);var hk,hA,ho=hB.sel,i=ho.ranges;
90if(hr.addNew&&!hr.extend){hA=hB.sel.contains(hl);if(hA>-1){hk=i[hA]}else{hk=new eu(hl,hl)}}else{hk=hB.sel.primary();hA=hB.sel.primIndex}if(hr.unit=="rectangle"){if(!hr.addNew){hk=new eu(hl,hl)}hl=cO(hn,hy,true,true);hA=-1}else{var hm=ep(hn,hl,hr.unit);if(hr.extend){hk=gf(hk,hm.anchor,hm.head,hr.extend)}else{hk=hm}}if(!hr.addNew){hA=0;cf(hB,new gZ([hk],0),R);ho=hB.sel}else{if(hA==-1){hA=i.length;cf(hB,cX(hn,i.concat([hk]),hA),{scroll:false,origin:"*mouse"})}else{if(i.length>1&&i[hA].empty()&&hr.unit=="char"&&!hr.extend){cf(hB,cX(hn,i.slice(0,hA).concat(i.slice(hA+1)),0),{scroll:false,origin:"*mouse"});ho=hB.sel}else{e(hB,hA,hk,R)}}}var hw=hl;function hv(hM){if(cD(hw,hM)==0){return}hw=hM;if(hr.unit=="rectangle"){var hE=[],hJ=hn.options.tabSize;var hD=cc(f0(hB,hl.line).text,hl.ch,hJ);var hQ=cc(f0(hB,hM.line).text,hM.ch,hJ);var hF=Math.min(hD,hQ),hO=Math.max(hD,hQ);for(var hR=Math.min(hl.line,hM.line),hH=Math.min(hn.lastLine(),Math.max(hl.line,hM.line));hR<=hH;hR++){var hP=f0(hB,hR).text,hG=e2(hP,hF,hJ);if(hF==hO){hE.push(new eu(ab(hR,hG),ab(hR,hG)))}else{if(hP.length>hG){hE.push(new eu(ab(hR,hG),ab(hR,e2(hP,hO,hJ))))}}}if(!hE.length){hE.push(new eu(hl,hl))}cf(hB,cX(hn,ho.ranges.slice(0,hA).concat(hE),hA),{origin:"*mouse",scroll:false});hn.scrollIntoView(hM)}else{var hK=hk;var hN=ep(hn,hM,hr.unit);var hI=hK.anchor,hL;if(cD(hN.anchor,hI)>0){hL=hN.head;hI=aA(hK.from(),hN.anchor)}else{hL=hN.anchor;hI=bQ(hK.to(),hN.head)}var hC=ho.ranges.slice(0);hC[hA]=at(hn,new eu(gy(hB,hI),hL));cf(hB,cX(hn,hC,hA),R)}}var ht=hx.wrapper.getBoundingClientRect();var hp=0;function hz(hE){var hC=++hp;var hG=cO(hn,hE,true,hr.unit=="rectangle");if(!hG){return}if(cD(hG,hw)!=0){hn.curOp.focus=ej();hv(hG);var hF=cs(hx,hB);if(hG.line>=hF.to||hG.line<hF.from){setTimeout(du(hn,function(){if(hp==hC){hz(hE)}}),150)}}else{var hD=hE.clientY<ht.top?-20:hE.clientY>ht.bottom?20:0;if(hD){setTimeout(du(hn,function(){if(hp!=hC){return}
90hx.scroller.scrollTop+=hD;hz(hE)}),50)}}}function hs(hC){hn.state.selectingText=false;hp=Infinity;if(hC){c7(hC);hx.input.focus()}eP(hx.wrapper.ownerDocument,"mousemove",hu);eP(hx.wrapper.ownerDocument,"mouseup",hq);hB.history.lastSelOrigin=null}var hu=du(hn,function(hC){if(hC.buttons===0||!gE(hC)){hs(hC)}else{hz(hC)}});var hq=du(hn,hs);hn.state.selectingText=hq;ci(hx.wrapper.ownerDocument,"mousemove",hu);ci(hx.wrapper.ownerDocument,"mouseup",hq)}function at(hx,hy){var hq=hy.anchor;var hu=hy.head;var ht=f0(hx.doc,hq.line);if(cD(hq,hu)==0&&hq.sticky==hu.sticky){return hy}var hn=a(ht);if(!hn){return hy}var hs=aR(hn,hq.ch,hq.sticky),hl=hn[hs];if(hl.from!=hq.ch&&hl.to!=hq.ch){return hy}var hk=hs+((hl.from==hq.ch)==(hl.level!=1)?0:1);if(hk==0||hk==hn.length){return hy}var hr;if(hu.line!=hq.line){hr=(hu.line-hq.line)*(hx.doc.direction=="ltr"?1:-1)>0}else{var hp=aR(hn,hu.ch,hu.sticky);var hm=hp-hs||(hu.ch-hq.ch)*(hl.level==1?-1:1);if(hp==hk-1||hp==hk){hr=hm<0}else{hr=hm>0}}var ho=hn[hk+(hr?-1:0)];var hw=hr==(ho.level==1);var i=hw?ho.from:ho.to,hv=hw?"after":"before";return hq.ch==i&&hq.sticky==hv?hy:new eu(new ab(hq.line,i,hv),hu)}function hi(hu,hq,hs,ht){var hl,hk;if(hq.touches){hl=hq.touches[0].clientX;hk=hq.touches[0].clientY}else{try{hl=hq.clientX;hk=hq.clientY}catch(hq){return false}}if(hl>=Math.floor(hu.display.gutters.getBoundingClientRect().right)){return false}if(ht){c7(hq)}var hr=hu.display;var hp=hr.lineDiv.getBoundingClientRect();if(hk>hp.bottom||!f5(hu,hs)){return b5(hq)}hk-=hp.top-hr.viewOffset;for(var hn=0;hn<hu.display.gutterSpecs.length;++hn){var ho=hr.gutters.childNodes[hn];if(ho&&ho.getBoundingClientRect().right>=hl){var hv=b0(hu.doc,hk);var hm=hu.display.gutterSpecs[hn];aN(hu,hs,hu,hv,hm.className,hq);return b5(hq)}}}function o(i,hk){return hi(i,hk,"gutterClick",true)}function aG(i,hk){if(bn(i.display,hk)||dN(i,hk)){return}if(a2(i,hk,"contextmenu")){return}if(!g9){i.display.input.onContextMenu(hk)}}function dN(i,hk){if(!f5(i,"gutterContextMenu")){return false}return hi(i,hk,"gutterContextMenu",false)}function dg(i){i.display.wrapper.className=i.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+i.options.theme.replace(/(^|\s)\s*/g," cm-s-");aq(i)}var cz={toString:function(){return"CodeMirror.Init"}};var fN={};var br={};function fn(i){var hl=i.optionHandlers;function hk(hm,hp,ho,hn){i.defaults[hm]=hp;if(ho){hl[hm]=hn?function(hq,hs,hr){if(hr!=cz){ho(hq,hs,hr)}}:ho}}i.defineOption=hk;i.Init=cz;hk("value","",function(hm,hn){return hm.setValue(hn)},true);hk("mode",null,function(hm,hn){hm.doc.modeOption=hn;bJ(hm)},true);hk("indentUnit",2,bJ,true);hk("indentWithTabs",false);hk("smartIndent",true);hk("tabSize",4,function(hm){eX(hm);aq(hm);ao(hm)},true);hk("lineSeparator",null,function(hm,hp){hm.doc.lineSep=hp;if(!hp){return}var ho=[],hq=hm.doc.first;hm.doc.iter(function(hr){for(var ht=0;;){var hs=hr.text.indexOf(hp,ht);if(hs==-1){break}ht=hs+hp.length;ho.push(ab(hq,hs))}hq++});for(var hn=ho.length-1;hn>=0;hn--){bc(hm.doc,hp,ho[hn],ab(ho[hn].line,ho[hn].ch+hp.length))}});hk("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(hm,ho,hn){hm.state.specialChars=new RegExp(ho.source+(ho.test("\t")?"":"|\t"),"g");if(hn!=cz){hm.refresh()}});hk("specialCharPlaceholder",fZ,function(hm){return hm.refresh()},true);hk("electricChars",true);hk("inputStyle",eQ?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},true);hk("spellcheck",false,function(hm,hn){return hm.getInputField().spellcheck=hn},true);hk("autocorrect",false,function(hm,hn){return hm.getInputField().autocorrect=hn},true);hk("autocapitalize",false,function(hm,hn){return hm.getInputField().autocapitalize=hn},true);hk("rtlMoveVisually",!a0);hk("wholeLineUpdateBefore",true);hk("theme","default",function(hm){dg(hm);eM(hm)},true);hk("keyMap","default",function(hm,hq,hn){var ho=gR(hq);var hp=hn!=cz&&gR(hn);if(hp&&hp.detach){hp.detach(hm,ho)}if(ho.attach){ho.attach(hm,hp||null)}});hk("extraKeys",null);hk("configureMouse",null);hk("lineWrapping",false,fm,true);hk("gutters",[],function(hm,hn){hm.display.gutterSpecs=bd(hn,hm.options.lineNumbers);eM(hm)},true);hk("fixedGutter",true,function(hm,hn){hm.display.gutters.style.left=hn?ev(hm.display)+"px":"0";hm.refresh()},true);hk("coverGutterNextToScrollbar",false,function(hm){return fJ(hm)},true);hk("scrollbarStyle","native",function(hm){aL(hm);fJ(hm);hm.display.scrollbars.setScrollTop(hm.doc.scrollTop);hm.display.scrollbars.setScrollLeft(hm.doc.scrollLeft)},true);hk("lineNumbers",false,function(hm,hn){hm.display.gutterSpecs=bd(hm.options.gutters,hn);eM(hm)},true);hk("firstLineNumber",1,eM,true);hk("lineNumberFormatter",function(hm){return hm},eM,true);hk("showCursorWhenSelecting",false,bV,true);hk("resetSelectionOnContextMenu",true);hk("lineWiseCopyCut",true);hk("pasteLinesPerSelection",true);hk("selectionsMayTouch",false);hk("readOnly",false,function(hm,hn){if(hn=="nocursor"){a6(hm);hm.display.input.blur()}
90hm.display.input.readOnlyChanged(hn)});hk("disableInput",false,function(hm,hn){if(!hn){hm.display.input.reset()}},true);hk("dragDrop",true,gX);hk("allowDropFileTypes",null);hk("cursorBlinkRate",530);hk("cursorScrollMargin",0);hk("cursorHeight",1,bV,true);hk("singleCursorHeightPerLine",true,bV,true);hk("workTime",100);hk("workDelay",100);hk("flattenSpans",true,eX,true);hk("addModeClass",false,eX,true);hk("pollInterval",100);hk("undoDepth",200,function(hm,hn){return hm.doc.history.undoDepth=hn});hk("historyEventDelay",1250);hk("viewportMargin",10,function(hm){return hm.refresh()},true);hk("maxHighlightLength",10000,eX,true);hk("moveInputWithCursor",true,function(hm,hn){if(!hn){hm.display.input.resetPosition()}});hk("tabindex",null,function(hm,hn){return hm.display.input.getField().tabIndex=hn||""});hk("autofocus",null);hk("direction","ltr",function(hm,hn){return hm.doc.setDirection(hn)},true);hk("phrases",null)}function gX(hk,hn,hl){var ho=hl&&hl!=cz;if(!hn!=!ho){var hm=hk.display.dragFunctions;var i=hn?ci:eP;i(hk.display.scroller,"dragstart",hm.start);i(hk.display.scroller,"dragenter",hm.enter);i(hk.display.scroller,"dragover",hm.over);i(hk.display.scroller,"dragleave",hm.leave);i(hk.display.scroller,"drop",hm.drop)}}function fm(i){if(i.options.lineWrapping){gn(i.display.wrapper,"CodeMirror-wrap");i.display.sizer.style.minWidth="";i.display.sizerWidth=null}else{h(i.display.wrapper,"CodeMirror-wrap");f(i)}ae(i);ao(i);aq(i);setTimeout(function(){return fJ(i)},100)}function L(hk,hm){var hr=this;if(!(this instanceof L)){return new L(hk,hm)}this.options=hm=hm?aY(hm):{};aY(fN,hm,false);var hq=hm.value;if(typeof hq=="string"){hq=new aC(hq,hm.mode,null,hm.lineSeparator,hm.direction)}else{if(hm.mode){hq.modeOption=hm.mode}}this.doc=hq;var hl=new L.inputStyles[hm.inputStyle](this);var hp=this.display=new fo(hk,hq,hl,hm);hp.wrapper.CodeMirror=this;dg(this);if(hm.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}aL(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,delayingBlurEvent:false,focused:false,suppressEdits:false,pasteIncoming:-1,cutIncoming:-1,selectingText:false,draggingText:false,highlight:new hj(),keySeq:null,specialChars:null};if(hm.autofocus&&!eQ){hp.input.focus()}if(ef&&n<11){setTimeout(function(){return hr.display.input.reset(true)},20)}gH(this);bv();db(this);this.curOp.forceUpdate=true;eL(this,hq);if((hm.autofocus&&!eQ)||this.hasFocus()){setTimeout(cW(c2,this),20)}else{a6(this)}for(var ho in br){if(br.hasOwnProperty(ho)){br[ho](hr,hm[ho],cz)}}eD(this);if(hm.finishInit){hm.finishInit(this)}for(var hn=0;hn<bk.length;++hn){bk[hn](hr)}av(this);if(dt&&hm.lineWrapping&&getComputedStyle(hp.lineDiv).textRendering=="optimizelegibility"){hp.lineDiv.style.textRendering="auto"}}L.defaults=fN;L.optionHandlers=br;function gH(hk){var ho=hk.display;ci(ho.scroller,"mousedown",du(hk,e7));if(ef&&n<11){ci(ho.scroller,"dblclick",du(hk,function(hs){if(a2(hk,hs)){return}var ht=cO(hk,hs);if(!ht||o(hk,hs)||bn(hk.display,hs)){return}c7(hs);var hr=hk.findWordAt(ht);gS(hk.doc,hr.anchor,hr.head)}))}else{ci(ho.scroller,"dblclick",function(hr){return a2(hk,hr)||c7(hr)})}ci(ho.scroller,"contextmenu",function(hr){return aG(hk,hr)});ci(ho.input.getField(),"contextmenu",function(hr){if(!ho.scroller.contains(hr.target)){aG(hk,hr)}});var hq,i={end:0};function hp(){if(ho.activeTouch){hq=setTimeout(function(){return ho.activeTouch=null},1000);i=ho.activeTouch;i.end=+new Date}}function hm(hr){if(hr.touches.length!=1){return false}var hs=hr.touches[0];return hs.radiusX<=1&&hs.radiusY<=1}function hl(hu,hr){if(hr.left==null){return true}var ht=hr.left-hu.left,hs=hr.top-hu.top;return ht*ht+hs*hs>20*20}ci(ho.scroller,"touchstart",function(hs){if(!a2(hk,hs)&&!hm(hs)&&!o(hk,hs)){ho.input.ensurePolled();clearTimeout(hq);var hr=+new Date;ho.activeTouch={start:hr,moved:false,prev:hr-i.end<=300?i:null};if(hs.touches.length==1){ho.activeTouch.left=hs.touches[0].pageX;ho.activeTouch.top=hs.touches[0].pageY}}});ci(ho.scroller,"touchmove",function(){if(ho.activeTouch){ho.activeTouch.moved=true}});ci(ho.scroller,"touchend",function(hs){var hu=ho.activeTouch;if(hu&&!bn(ho,hs)&&hu.left!=null&&!hu.moved&&new Date-hu.start<300){var ht=hk.coordsChar(ho.activeTouch,"page"),hr;if(!hu.prev||hl(hu,hu.prev)){hr=new eu(ht,ht)}else{if(!hu.prev.prev||hl(hu,hu.prev.prev)){hr=hk.findWordAt(ht)}else{hr=new eu(ab(ht.line,0),gy(hk.doc,ab(ht.line+1,0)))}}hk.setSelection(hr.anchor,hr.head);hk.focus();c7(hs)}hp()});ci(ho.scroller,"touchcancel",hp);ci(ho.scroller,"scroll",function(){if(ho.scroller.clientHeight){C(hk,ho.scroller.scrollTop);bX(hk,ho.scroller.scrollLeft,true);aN(hk,"scroll",hk)}});ci(ho.scroller,"mousewheel",function(hr){return c(hk,hr)});ci(ho.scroller,"DOMMouseScroll",function(hr){return c(hk,hr)});ci(ho.wrapper,"scroll",function(){return ho.wrapper.scrollTop=ho.wrapper.scrollLeft=0});ho.dragFunctions={enter:function(hr){if(!a2(hk,hr)){e3(hr)}},over:function(hr){if(!a2(hk,hr)){hh(hk,hr);e3(hr)}},start:function(hr){return U(hk,hr)},drop:du(hk,bw),leave:function(hr){if(!a2(hk,hr)){dH(hk)}}};var hn=ho.input.getField();ci(hn,"keyup",function(hr){return bt.call(hk,hr)});ci(hn,"keydown",du(hk,s));ci(hn,"keypress",du(hk,cY));
90ci(hn,"focus",function(hr){return c2(hk,hr)});ci(hn,"blur",function(hr){return a6(hk,hr)})}var bk=[];L.defineInitHook=function(i){return bk.push(i)};function aj(hz,ho,hy,hm){var hx=hz.doc,hl;if(hy==null){hy="add"}if(hy=="smart"){if(!hx.mode.indent){hy="prev"}else{hl=fH(hz,ho).state}}var hs=hz.options.tabSize;var hA=f0(hx,ho),hr=cc(hA.text,null,hs);if(hA.stateAfter){hA.stateAfter=null}var hk=hA.text.match(/^\s*/)[0],hv;if(!hm&&!/\S/.test(hA.text)){hv=0;hy="not"}else{if(hy=="smart"){hv=hx.mode.indent(hl,hA.text.slice(hk.length),hA.text);if(hv==cy||hv>150){if(!hm){return}hy="prev"}}}if(hy=="prev"){if(ho>hx.first){hv=cc(f0(hx,ho-1).text,null,hs)}else{hv=0}}else{if(hy=="add"){hv=hr+hz.options.indentUnit}else{if(hy=="subtract"){hv=hr-hz.options.indentUnit}else{if(typeof hy=="number"){hv=hr+hy}}}}hv=Math.max(0,hv);var hw="",hu=0;if(hz.options.indentWithTabs){for(var hp=Math.floor(hv/hs);hp;--hp){hu+=hs;hw+="\t"}}if(hu<hv){hw+=cQ(hv-hu)}if(hw!=hk){bc(hx,hw,ab(ho,0),ab(ho,hk.length),"+input");hA.stateAfter=null;return true}else{for(var hn=0;hn<hx.sel.ranges.length;hn++){var hq=hx.sel.ranges[hn];if(hq.head.line==ho&&hq.head.ch<hk.length){var ht=ab(ho,hk.length);e(hx,hn,new eu(ht,ht));break}}}}var by=null;function dA(i){by=i}function gT(hy,hp,hn,hm,hx){var hw=hy.doc;hy.display.shift=false;if(!hm){hm=hw.sel}var hA=+new Date-200;var ho=hx=="paste"||hy.state.pasteIncoming>hA;var hr=gJ(hp),hk=null;if(ho&&hm.ranges.length>1){if(by&&by.text.join("\n")==hp){if(hm.ranges.length%by.text.length==0){hk=[];for(var hq=0;hq<by.text.length;hq++){hk.push(hw.splitLines(by.text[hq]))}}}else{if(hr.length==hm.ranges.length&&hy.options.pasteLinesPerSelection){hk=ce(hr,function(i){return[i]})}}}var hs=hy.curOp.updateInput;for(var hl=hm.ranges.length-1;hl>=0;hl--){var hz=hm.ranges[hl];var hv=hz.from(),hu=hz.to();if(hz.empty()){if(hn&&hn>0){hv=ab(hv.line,hv.ch-hn)}else{if(hy.state.overwrite&&!ho){hu=ab(hu.line,Math.min(f0(hw,hu.line).text.length,hu.ch+gt(hr).length))}else{if(ho&&by&&by.lineWise&&by.text.join("\n")==hp){hv=hu=ab(hv.line,0)}}}}var ht={from:hv,to:hu,text:hk?hk[hl%hk.length]:hr,origin:hx||(ho?"paste":hy.state.cutIncoming>hA?"cut":"+input")};bs(hy.doc,ht);al(hy,"inputRead",hy,ht)}if(hp&&!ho){gP(hy,hp)}gs(hy);if(hy.curOp.updateInput<2){hy.curOp.updateInput=hs}hy.curOp.typing=true;hy.state.pasteIncoming=hy.state.cutIncoming=-1}function bm(hl,i){var hk=hl.clipboardData&&hl.clipboardData.getData("Text");if(hk){hl.preventDefault();if(!i.isReadOnly()&&!i.options.disableInput){df(i,function(){return gT(i,hk,0,null,"paste")})}return true}}
90function gP(hk,hn){if(!hk.options.electricChars||!hk.options.smartIndent){return}var ho=hk.doc.sel;for(var hm=ho.ranges.length-1;hm>=0;hm--){var hq=ho.ranges[hm];if(hq.head.ch>100||(hm&&ho.ranges[hm-1].head.line==hq.head.line)){continue}var hp=hk.getModeAt(hq.head);var hr=false;if(hp.electricChars){for(var hl=0;hl<hp.electricChars.length;hl++){if(hn.indexOf(hp.electricChars.charAt(hl))>-1){hr=aj(hk,hq.head.line,"smart");break}}}else{if(hp.electricInput){if(hp.electricInput.test(f0(hk.doc,hq.head.line).text.slice(0,hq.head.ch))){hr=aj(hk,hq.head.line,"smart")}}}if(hr){al(hk,"electricInput",hk,hq.head.line)}}}function dO(hk){var hp=[],hm=[];for(var hn=0;hn<hk.doc.sel.ranges.length;hn++){var hl=hk.doc.sel.ranges[hn].head.line;var ho={anchor:ab(hl,0),head:ab(hl+1,0)};hm.push(ho);hp.push(hk.getRange(ho.anchor,ho.head))}return{text:hp,ranges:hm}}function gF(hm,hk,i,hl){hm.setAttribute("autocorrect",i?"":"off");hm.setAttribute("autocapitalize",hl?"":"off");hm.setAttribute("spellcheck",!!hk)}function a8(){var i=g0("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");var hk=g0("div",[i],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");if(dt){i.style.width="1000px"}else{i.setAttribute("wrap","off")}if(fM){i.style.border="1px solid black"}gF(i);return hk}function ek(i){var hk=i.optionHandlers;
90var hl=i.helpers={};i.prototype={constructor:i,focus:function(){window.focus();this.display.input.focus()},setOption:function(ho,hp){var hn=this.options,hm=hn[ho];if(hn[ho]==hp&&ho!="mode"){return}hn[ho]=hp;if(hk.hasOwnProperty(ho)){du(this,hk[ho])(this,hp,hm)}aN(this,"optionChange",this,ho)},getOption:function(hm){return this.options[hm]},getDoc:function(){return this.doc},addKeyMap:function(hn,hm){this.state.keyMaps[hm?"push":"unshift"](gR(hn))},removeKeyMap:function(hn){var ho=this.state.keyMaps;for(var hm=0;hm<ho.length;++hm){if(ho[hm]==hn||ho[hm].name==hn){ho.splice(hm,1);return true}}},addOverlay:dE(function(hm,hn){var ho=hm.token?hm:i.getMode(this.options,hm);if(ho.startState){throw new Error("Overlays may not be stateful.")}cw(this.state.overlays,{mode:ho,modeSpec:hm,opaque:hn&&hn.opaque,priority:(hn&&hn.priority)||0},function(hp){return hp.priority});this.state.modeGen++;ao(this)}),removeOverlay:dE(function(hm){var hq=this;var ho=this.state.overlays;for(var hn=0;hn<ho.length;++hn){var hp=ho[hn].modeSpec;if(hp==hm||typeof hm=="string"&&hp.name==hm){ho.splice(hn,1);hq.state.modeGen++;ao(hq);return}}}),indentLine:dE(function(ho,hm,hn){if(typeof hm!="string"&&typeof hm!="number"){if(hm==null){hm=this.options.smartIndent?"smart":"prev"}else{hm=hm?"add":"subtract"}}if(cv(this.doc,ho)){aj(this,ho,hm,hn)}}),indentSelection:dE(function(hv){var hs=this;var hm=this.doc.sel.ranges,hp=-1;for(var hr=0;hr<hm.length;hr++){var hw=hm[hr];if(!hw.empty()){var ht=hw.from(),hu=hw.to();var hn=Math.max(hp,ht.line);hp=Math.min(hs.lastLine(),hu.line-(hu.ch?0:1))+1;for(var hq=hn;hq<hp;++hq){aj(hs,hq,hv)}var ho=hs.doc.sel.ranges;if(ht.ch==0&&hm.length==ho.length&&ho[hr].from().ch>0){e(hs.doc,hr,new eu(ht,ho[hr].to()),ag)}}else{if(hw.head.line>hp){aj(hs,hw.head.line,hv,true);hp=hw.head.line;if(hr==hs.doc.sel.primIndex){gs(hs)}}}}}),getTokenAt:function(hn,hm){return cR(this,hn,hm)},getLineTokens:function(hn,hm){return cR(this,ab(hn),hm,true)},getTokenTypeAt:function(ht){ht=gy(this.doc,ht);var hp=dC(this,f0(this.doc,ht.line));var hr=0,hs=(hp.length-1)/2,ho=ht.ch;var hn;if(ho==0){hn=hp[2]}else{for(;;){var hm=(hr+hs)>>1;if((hm?hp[hm*2-1]:0)>=ho){hs=hm}else{if(hp[hm*2+1]<ho){hr=hm+1}else{hn=hp[hm*2+2];break}}}}var hq=hn?hn.indexOf("overlay "):-1;return hq<0?hn:hq==0?null:hn.slice(0,hq-1)},getModeAt:function(hn){var hm=this.doc.mode;if(!hm.innerMode){return hm}return i.innerMode(hm,this.getTokenAt(hn).state).mode},getHelper:function(hn,hm){return this.getHelpers(hn,hm)[0]},getHelpers:function(ht,hs){var hq=this;var hv=[];if(!hl.hasOwnProperty(hs)){return hv}var ho=hl[hs],hr=this.getModeAt(ht);if(typeof hr[hs]=="string"){if(ho[hr[hs]]){hv.push(ho[hr[hs]])}}else{if(hr[hs]){for(var hp=0;hp<hr[hs].length;hp++){var hn=ho[hr[hs][hp]];if(hn){hv.push(hn)}}}else{if(hr.helperType&&ho[hr.helperType]){hv.push(ho[hr.helperType])}else{if(ho[hr.name]){hv.push(ho[hr.name])}}}}for(var hm=0;hm<ho._global.length;hm++){var hu=ho._global[hm];if(hu.pred(hr,hq)&&dP(hv,hu.val)==-1){hv.push(hu.val)}}return hv},getStateAfter:function(hn,hm){var ho=this.doc;hn=dy(ho,hn==null?ho.first+ho.size-1:hn);return fH(this,hn+1,hm).state},cursorCoords:function(hp,hn){var ho,hm=this.doc.sel.primary();if(hp==null){ho=hm.head}else{if(typeof hp=="object"){ho=gy(this.doc,hp)}else{ho=hp?hm.from():hm.to()}}return er(this,ho,hn||"page")},charCoords:function(hn,hm){return dc(this,gy(this.doc,hn),hm||"page")},coordsChar:function(hm,hn){hm=hf(this,hm,hn||"page");return gG(this,hm.left,hm.top)},lineAtHeight:function(hm,hn){hm=hf(this,{top:hm,left:0},hn||"page").top;return b0(this.doc,hm+this.display.viewOffset)},heightAtLine:function(hn,hr,hq){var hm=false,ho;if(typeof hn=="number"){var hp=this.doc.first+this.doc.size-1;if(hn<this.doc.first){hn=this.doc.first}else{if(hn>hp){hn=hp;hm=true}}ho=f0(this.doc,hn)}else{ho=hn}return fz(this,ho,{top:0,left:0},hr||"page",hq||hm).top+(hm?this.doc.height-b6(ho):0)},defaultTextHeight:function(){return a9(this.display)},defaultCharWidth:function(){return d7(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(hr,ho,ht,hp,hv){var hq=this.display;hr=er(this,gy(this.doc,hr));var hs=hr.bottom,hn=hr.left;ho.style.position="absolute";ho.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(ho);hq.sizer.appendChild(ho);if(hp=="over"){hs=hr.top}else{if(hp=="above"||hp=="near"){var hm=Math.max(hq.wrapper.clientHeight,this.doc.height),hu=Math.max(hq.sizer.clientWidth,hq.lineSpace.clientWidth);if((hp=="above"||hr.bottom+ho.offsetHeight>hm)&&hr.top>ho.offsetHeight){hs=hr.top-ho.offsetHeight}else{if(hr.bottom+ho.offsetHeight<=hm){hs=hr.bottom}}if(hn+ho.offsetWidth>hu){hn=hu-ho.offsetWidth}}}ho.style.top=hs+"px";ho.style.left=ho.style.right="";if(hv=="right"){hn=hq.sizer.clientWidth-ho.offsetWidth;ho.style.right="0px"}else{if(hv=="left"){hn=0}else{if(hv=="middle"){hn=(hq.sizer.clientWidth-ho.offsetWidth)/2}}ho.style.left=hn+"px"}if(ht){I(this,{left:hn,top:hs,right:hn+ho.offsetWidth,bottom:hs+ho.offsetHeight})}},triggerOnKeyDown:dE(s),triggerOnKeyPress:dE(cY),triggerOnKeyUp:bt,triggerOnM
90ouseDown:dE(e7),execCommand:function(hm){if(fi.hasOwnProperty(hm)){return fi[hm].call(null,this)}},triggerElectric:dE(function(hm){gP(this,hm)}),findPosH:function(ht,hp,hq,hn){var hs=this;var hm=1;if(hp<0){hm=-1;hp=-hp}var hr=gy(this.doc,ht);for(var ho=0;ho<hp;++ho){hr=bO(hs.doc,hr,hm,hq,hn);if(hr.hitSide){break}}return hr},moveH:dE(function(hm,hn){var ho=this;this.extendSelectionsBy(function(hp){if(ho.display.shift||ho.doc.extend||hp.empty()){return bO(ho.doc,hp.head,hm,hn,ho.options.rtlMoveVisually)}else{return hm<0?hp.from():hp.to()}},dp)}),deleteH:dE(function(hm,hn){var ho=this.doc.sel,hp=this.doc;if(ho.somethingSelected()){hp.replaceSelection("",null,"+delete")}else{fI(this,function(hr){var hq=bO(hp,hr.head,hm,hn,false);return hm<0?{from:hq,to:hr.head}:{from:hr.head,to:hq}})}}),findPosV:function(hs,hp,ht,hv){var ho=this;var hm=1,hr=hv;if(hp<0){hm=-1;hp=-hp}var hu=gy(this.doc,hs);for(var hn=0;hn<hp;++hn){var hq=er(ho,hu,"div");if(hr==null){hr=hq.left}else{hq.left=hr}hu=bI(ho,hq,hm,ht);if(hu.hitSide){break}}return hu},moveV:dE(function(hm,ho){var hs=this;var hq=this.doc,hp=[];var hr=!this.display.shift&&!hq.extend&&hq.sel.somethingSelected();hq.extendSelectionsBy(function(ht){if(hr){return hm<0?ht.from():ht.to()}var hv=er(hs,ht.head,"div");if(ht.goalColumn!=null){hv.left=ht.goalColumn}hp.push(hv.left);var hu=bI(hs,hv,hm,ho);if(ho=="page"&&ht==hq.sel.primary()){c9(hs,dc(hs,hu,"div").top-hv.top)}return hu},dp);if(hp.length){for(var hn=0;hn<hq.sel.ranges.length;hn++){hq.sel.ranges[hn].goalColumn=hp[hn]}}}),findWordAt:function(ht){var hr=this.doc,hp=f0(hr,ht.line).text;var hs=ht.ch,ho=ht.ch;if(hp){var hq=this.getHelper(ht,"wordChars");if((ht.sticky=="before"||ho==hp.length)&&hs){--hs}else{++ho}var hn=hp.charAt(hs);var hm=c1(hn,hq)?function(hu){return c1(hu,hq)}:/\s/.test(hn)?function(hu){return/\s/.test(hu)}:function(hu){return(!/\s/.test(hu)&&!c1(hu))};while(hs>0&&hm(hp.charAt(hs-1))){--hs}while(ho<hp.length&&hm(hp.charAt(ho))){++ho}}return new eu(ab(ht.line,hs),ab(ht.line,ho))},toggleOverwrite:function(hm){if(hm!=null&&hm==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){gn(this.display.cursorDiv,"CodeMirror-overwrite")}else{h(this.display.cursorDiv,"CodeMirror-overwrite")}aN(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==ej()},isReadOnly:function(){return !!(this.options.readOnly||this.doc.cantEdit)},scrollTo:dE(function(hm,hn){fu(this,hm,hn)}),getScrollInfo:function(){var hm=this.display.scroller;return{left:hm.scrollLeft,top:hm.scrollTop,height:hm.scrollHeight-dl(this)-this.display.barHeight,width:hm.scrollWidth-dl(this)-this.display.barWidth,clientHeight:dn(this),clientWidth:dS(this)}},scrollIntoView:dE(function(hn,hm){if(hn==null){hn={from:this.doc.sel.primary().head,to:null};if(hm==null){hm=this.options.cursorScrollMargin}}else{if(typeof hn=="number"){hn={from:ab(hn,0),to:null}}else{if(hn.from==null){hn={from:hn,to:null}}}}if(!hn.to){hn.to=hn.from}hn.margin=hm||0;if(hn.from.line!=null){cA(this,hn)}else{ca(this,hn.from,hn.to,hn.margin)}}),setSize:dE(function(hp,hm){var hq=this;var ho=function(hr){return typeof hr=="number"||/^\d+$/.test(String(hr))?hr+"px":hr};if(hp!=null){this.display.wrapper.style.width=ho(hp)}if(hm!=null){this.display.wrapper.style.height=ho(hm)}if(this.options.lineWrapping){aZ(this)}var hn=this.display.viewFrom;this.doc.iter(hn,this.display.viewTo,function(hr){if(hr.widgets){for(var hs=0;hs<hr.widgets.length;hs++){if(hr.widgets[hs].noHScroll){W(hq,hn,"widget");break}}}++hn});this.curOp.forceUpdate=true;aN(this,"refresh",this)}),operation:function(hm){return df(this,hm)},startOperation:function(){return db(this)},endOperation:function(){return av(this)},refresh:dE(function(){var hm=this.display.cachedTextHeight;ao(this);this.curOp.forceUpdate=true;aq(this);fu(this,this.doc.scrollLeft,this.doc.scrollTop);dx(this.display);if(hm==null||Math.abs(hm-a9(this.display))>0.5){ae(this)}aN(this,"refresh",this)}),swapDoc:dE(function(hn){var hm=this.doc;hm.cm=null;if(this.state.selectingText){this.state.selectingText()}eL(this,hn);aq(this);this.display.input.reset();fu(this,hn.scrollLeft,hn.scrollTop);this.curOp.forceScroll=true;al(this,"swapDoc",this,hm);return hm}),phrase:function(hn){var hm=this.options.phrases;return hm&&Object.prototype.hasOwnProperty.call(hm,hn)?hm[hn]:hn},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};bS(i);i.registerHelper=function(hn,hm,ho){if(!hl.hasOwnProperty(hn)){hl[hn]=i[hn]={_global:[]}}hl[hn][hm]=ho};i.registerGlobalHelper=function(ho,hn,hm,hp){i.registerHelper(ho,hn,hp);hl[ho]._global.push({pred:hm,val:hp})}}function bO(hA,ho,hu,ht,hq){var hv=ho;var hz=hu;var hk=f0(hA,ho.line);var hn=hq&&hA.direction=="rtl"?-hu:hu;function hy(){var hB=ho.line+hn;if(hB<hA.first||hB>=hA.first+hA.size){return false}ho=new ab(hB,ho.ch,ho.sticky);return hk=f0(hA,hB)}function hx(hC){var hB;if(hq){hB=w(hA.cm,hk,ho,hu)}else{hB=ap(hk,ho,hu)}if(hB==null){if(!hC&&hy()){ho=fd(hq,hA.cm,hk,ho.line,hn)}else{return false}}else{ho=hB}return true}if(ht=="char"){hx()}else{if(ht=="column"){hx(true)}else{if(ht=="word"||ht=="group"){var hw=null,hr=ht=="group";var i=hA.cm&&hA.cm.getHelper(ho,"wordChars");for(var hp=true;;hp=false){if(hu<0&&!hx(!hp)){break}var hl=hk.text.charAt(ho.ch)||"\n";var hm=c1(hl,i)?"w":hr&&hl=="\n"?"n":!hr||/\s/.test(hl)?null:"p";if(hr&&!hp&&!hm){hm="s"}if(hw&&hw!=hm){if(hu<0){hu=1;hx();ho.sticky="after"}break}if(hm){hw=hm}if(hu>0&&!hx(!hp)){break}}}}}var hs=cg(hA,ho,hv,hz,true);if(ac(hv,hs)){hs.hitSide=true}return hs}function bI(hs,hn,hk,hr){var hq=hs.doc,hp=hn.left,ho;if(hr=="page"){var hm=Math.min(hs.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);var i=Math.max(hm-0.5*a9(hs.display),3);ho=(hk>0?hn.bottom:hn.top)+hk*i}else{if(hr=="line"){ho=hk>0?hn.bottom+3:hn.top-3}}var hl;for(;;){hl=gG(hs,hp,ho);if(!hl.outside){break}if(hk<0?ho<=0:ho>=hq.height){hl.hitSide=true;break}ho+=hk*5}return hl}var d1=function(i){this.cm=i;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new hj();this.composing=null;this.gracePeriod=false;this.readDOMTimeout=null};d1.prototype.init=function(hm){var ho=this;var hl=this,i=hl.cm;var hn=hl.div=hm.lineDiv;gF(hn,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize);
90ci(hn,"paste",function(hp){if(a2(i,hp)||bm(hp,i)){return}if(n<=11){setTimeout(du(i,function(){return ho.updateFromDOM()}),20)}});ci(hn,"compositionstart",function(hp){ho.composing={data:hp.data,done:false}});ci(hn,"compositionupdate",function(hp){if(!ho.composing){ho.composing={data:hp.data,done:false}}});ci(hn,"compositionend",function(hp){if(ho.composing){if(hp.data!=ho.composing.data){ho.readFromDOMSoon()}ho.composing.done=true}});ci(hn,"touchstart",function(){return hl.forceCompositionEnd()});ci(hn,"input",function(){if(!ho.composing){ho.readFromDOMSoon()}});function hk(ht){if(a2(i,ht)){return}if(i.somethingSelected()){dA({lineWise:false,text:i.getSelections()});if(ht.type=="cut"){i.replaceSelection("",null,"cut")}}else{if(!i.options.lineWiseCopyCut){return}else{var hq=dO(i);dA({lineWise:true,text:hq.text});if(ht.type=="cut"){i.operation(function(){i.setSelections(hq.ranges,0,ag);i.replaceSelection("",null,"cut")})}}}if(ht.clipboardData){ht.clipboardData.clearData();var hs=by.text.join("\n");ht.clipboardData.setData("Text",hs);if(ht.clipboardData.getData("Text")==hs){ht.preventDefault();return}}var hr=a8(),hu=hr.firstChild;i.display.lineSpace.insertBefore(hr,i.display.lineSpace.firstChild);hu.value=by.text.join("\n");var hp=document.activeElement;eg(hu);setTimeout(function(){i.display.lineSpace.removeChild(hr);hp.focus();if(hp==hn){hl.showPrimarySelection()}},50)}ci(hn,"copy",hk);ci(hn,"cut",hk)};d1.prototype.prepareSelection=function(){var i=gw(this.cm,false);i.focus=this.cm.state.focused;return i};d1.prototype.showSelection=function(hk,i){if(!hk||!this.cm.display.view.length){return}if(hk.focus||i){this.showPrimarySelection()}this.showMultipleSelections(hk)};d1.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()};d1.prototype.showPrimarySelection=function(){var hm=this.getSelection(),hw=this.cm,hp=hw.doc.sel.primary();var hu=hp.from(),hv=hp.to();if(hw.display.viewTo==hw.display.viewFrom||hu.line>=hw.display.viewTo||hv.line<hw.display.viewFrom){hm.removeAllRanges();return}var hn=aH(hw,hm.anchorNode,hm.anchorOffset);var hr=aH(hw,hm.focusNode,hm.focusOffset);if(hn&&!hn.bad&&hr&&!hr.bad&&cD(aA(hn,hr),hu)==0&&cD(bQ(hn,hr),hv)==0){return}var ht=hw.display.view;var hl=(hu.line>=hw.display.viewFrom&&c0(hw,hu))||{node:ht[0].measure.map[2],offset:0};var hq=hv.line<hw.display.viewTo&&c0(hw,hv);if(!hq){var hk=ht[ht.length-1].measure;var hx=hk.maps?hk.maps[hk.maps.length-1]:hk.map;hq={node:hx[hx.length-1],offset:hx[hx.length-2]-hx[hx.length-3]}}if(!hl||!hq){hm.removeAllRanges();return}var ho=hm.rangeCount&&hm.getRangeAt(0),i;try{i=cM(hl.node,hl.offset,hq.offset,hq.node)}catch(hs){}if(i){if(!cP&&hw.state.focused){hm.collapse(hl.node,hl.offset);if(!i.collapsed){hm.removeAllRanges();hm.addRange(i)}}else{hm.removeAllRanges();hm.addRange(i)}if(ho&&hm.anchorNode==null){hm.addRange(ho)}else{if(cP){this.startGracePeriod()}}}this.rememberSelection()};d1.prototype.startGracePeriod=function(){var i=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){i.gracePeriod=false;if(i.selectionChanged()){i.cm.operation(function(){return i.cm.curOp.selectionChanged=true})}},20)};d1.prototype.showMultipleSelections=function(i){cd(this.cm.display.cursorDiv,i.cursors);cd(this.cm.display.selectionDiv,i.selection)};d1.prototype.rememberSelection=function(){var i=this.getSelection();this.lastAnchorNode=i.anchorNode;this.lastAnchorOffset=i.anchorOffset;this.lastFocusNode=i.focusNode;this.lastFocusOffset=i.focusOffset};d1.prototype.selectionInEditor=function(){var hk=this.getSelection();if(!hk.rangeCount){return false}var i=hk.getRangeAt(0).commonAncestorContainer;return ha(this.div,i)};d1.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"){if(!this.selectionInEditor()){this.showSelection(this.prepareSelection(),true)}this.div.focus()}};d1.prototype.blur=function(){this.div.blur()};d1.prototype.getField=function(){return this.div};d1.prototype.supportsTouch=function(){return true};d1.prototype.receivedFocus=function(){var i=this;if(this.selectionInEditor()){this.pollSelection()}else{df(this.cm,function(){return i.cm.curOp.selectionChanged=true})}function hk(){if(i.cm.state.focused){i.pollSelection();i.polling.set(i.cm.options.pollInterval,hk)}}this.polling.set(this.cm.options.pollInterval,hk)};d1.prototype.selectionChanged=function(){var i=this.getSelection();return i.anchorNode!=this.lastAnchorNode||i.anchorOffset!=this.lastAnchorOffset||i.focusNode!=this.lastFocusNode||i.focusOffset!=this.lastFocusOffset};d1.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged()){return}var hm=this.getSelection(),i=this.cm;if(aX&&dJ&&this.cm.display.gutterSpecs.length&&g1(hm.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs});this.blur();this.focus();return}if(this.composing){return}this.rememberSelection();var hk=aH(i,hm.anchorNode,hm.anchorOffset);var hl=aH(i,hm.focusNode,hm.focusOffset);if(hk&&hl){df(i,function(){cf(i.doc,fA(hk,hl),ag);if(hk.bad||hl.bad){i.curOp.selectionChanged=true}})}};d1.prototype.pollContent=function(){if(this.readDOMTimeout!=null){clearTimeout(this.readDOMTimeout);this.readDOMTimeout=null}var ht=this.cm,hD=ht.display,hB=ht.doc.sel.primary();var hC=hB.from(),hn=hB.to();if(hC.ch==0&&hC.line>ht.firstLine()){hC=ab(hC.line-1,f0(ht.doc,hC.line-1).length)}
90if(hn.ch==f0(ht.doc,hn.line).text.length&&hn.line<ht.lastLine()){hn=ab(hn.line+1,0)}if(hC.line<hD.viewFrom||hn.line>hD.viewTo-1){return false}var hq,ho,hs;if(hC.line==hD.viewFrom||(hq=dY(ht,hC.line))==0){ho=b7(hD.view[0].line);hs=hD.view[0].node}else{ho=b7(hD.view[hq].line);hs=hD.view[hq-1].node.nextSibling}var hA=dY(ht,hn.line);var hv,hy;if(hA==hD.view.length-1){hv=hD.viewTo-1;hy=hD.lineDiv.lastChild}else{hv=b7(hD.view[hA+1].line)-1;hy=hD.view[hA+1].node.previousSibling}if(!hs){return false}var hE=ht.doc.splitLines(gW(ht,hs,hy,ho,hv));var hx=g2(ht.doc,ab(ho,0),ab(hv,f0(ht.doc,hv).text.length));while(hE.length>1&&hx.length>1){if(gt(hE)==gt(hx)){hE.pop();hx.pop();hv--}else{if(hE[0]==hx[0]){hE.shift();hx.shift();ho++}else{break}}}var hz=0,hl=0;var hu=hE[0],hk=hx[0],i=Math.min(hu.length,hk.length);while(hz<i&&hu.charCodeAt(hz)==hk.charCodeAt(hz)){++hz}var hr=gt(hE),hF=gt(hx);var hm=Math.min(hr.length-(hE.length==1?hz:0),hF.length-(hx.length==1?hz:0));while(hl<hm&&hr.charCodeAt(hr.length-hl-1)==hF.charCodeAt(hF.length-hl-1)){++hl}if(hE.length==1&&hx.length==1&&ho==hC.line){while(hz&&hz>hC.ch&&hr.charCodeAt(hr.length-hl-1)==hF.charCodeAt(hF.length-hl-1)){hz--;hl++}}hE[hE.length-1]=hr.slice(0,hr.length-hl).replace(/^\u200b+/,"");hE[0]=hE[0].slice(hz).replace(/\u200b+$/,"");var hp=ab(ho,hz);var hw=ab(hv,hx.length?gt(hx).length-hl:0);if(hE.length>1||hE[0]||cD(hp,hw)){bc(ht.doc,hE,hp,hw,"+input");return true}};d1.prototype.ensurePolled=function(){this.forceCompositionEnd()};d1.prototype.reset=function(){this.forceCompositionEnd()};d1.prototype.forceCompositionEnd=function(){if(!this.composing){return}clearTimeout(this.readDOMTimeout);this.composing=null;this.updateFromDOM();this.div.blur();this.div.focus()};d1.prototype.readFromDOMSoon=function(){var i=this;if(this.readDOMTimeout!=null){return}this.readDOMTimeout=setTimeout(function(){i.readDOMTimeout=null;if(i.composing){if(i.composing.done){i.composing=null}else{return}}i.updateFromDOM()},80)};d1.prototype.updateFromDOM=function(){var i=this;if(this.cm.isReadOnly()||!this.pollContent()){df(this.cm,function(){return ao(i.cm)})}};d1.prototype.setUneditable=function(i){i.contentEditable="false"};d1.prototype.onKeyPress=function(i){if(i.charCode==0||this.composing){return}i.preventDefault();if(!this.cm.isReadOnly()){du(this.cm,gT)(this.cm,String.fromCharCode(i.charCode==null?i.keyCode:i.charCode),0)}};d1.prototype.readOnlyChanged=function(i){this.div.contentEditable=String(i!="nocursor")};d1.prototype.onContextMenu=function(){};d1.prototype.resetPosition=function(){};d1.prototype.needsContentAttribute=true;function c0(hp,hn){var ho=fX(hp,hn.line);if(!ho||ho.hidden){return null}var hr=f0(hp.doc,hn.line);var hk=cU(ho,hr,hn.line);var hl=a(hr,hp.doc.direction),hm="left";if(hl){var i=aR(hl,hn.ch);hm=i%2?"right":"left"}var hq=aU(hk.map,hn.ch,hm);hq.offset=hq.collapse=="right"?hq.end:hq.start;return hq}function g1(hk){for(var i=hk;i;i=i.parentNode){if(/CodeMirror-gutter-wrapper/.test(i.className)){return true}}return false}
90function e4(hk,i){if(i){hk.bad=true}return hk}function gW(hs,hq,hr,hm,hk){var hu="",hl=false,i=hs.doc.lineSeparator(),hn=false;function ho(hw){return function(hx){return hx.id==hw}}function hv(){if(hl){hu+=i;if(hn){hu+=i}hl=hn=false}}function ht(hw){if(hw){hv();hu+=hw}}function hp(hA){if(hA.nodeType==1){var hx=hA.getAttribute("cm-text");if(hx){ht(hx);return}var hz=hA.getAttribute("cm-marker"),hC;if(hz){var hB=hs.findMarks(ab(hm,0),ab(hk+1,0),ho(+hz));if(hB.length&&(hC=hB[0].find(0))){ht(g2(hs.doc,hC.from,hC.to).join(i))}return}if(hA.getAttribute("contenteditable")=="false"){return}var hw=/^(pre|div|p|li|table|br)$/i.test(hA.nodeName);if(!/^br$/i.test(hA.nodeName)&&hA.textContent.length==0){return}if(hw){hv()}for(var hy=0;hy<hA.childNodes.length;hy++){hp(hA.childNodes[hy])}if(/^(pre|p)$/i.test(hA.nodeName)){hn=true}if(hw){hl=true}}else{if(hA.nodeType==3){ht(hA.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}}}for(;;){hp(hq);if(hq==hr){break}hq=hq.nextSibling;hn=false}return hu}function aH(hk,hn,hp){var ho;if(hn==hk.display.lineDiv){ho=hk.display.lineDiv.childNodes[hp];if(!ho){return e4(hk.clipPos(ab(hk.display.viewTo-1)),true)}hn=null;hp=0}else{for(ho=hn;;ho=ho.parentNode){if(!ho||ho==hk.display.lineDiv){return null}if(ho.parentNode&&ho.parentNode==hk.display.lineDiv){break}}}for(var hm=0;hm<hk.display.view.length;hm++){var hl=hk.display.view[hm];if(hl.node==ho){return ah(hl,hn,hp)}}}function ah(hs,ho,hq){var hl=hs.text.firstChild,hn=false;if(!ho||!ha(hl,ho)){return e4(ab(b7(hs.line),0),true)}if(ho==hl){hn=true;ho=hl.childNodes[hq];hq=0;if(!ho){var hy=hs.rest?gt(hs.rest):hs.line;return e4(ab(b7(hy),hy.text.length),hn)}}var hp=ho.nodeType==3?ho:null,hw=ho;if(!hp&&ho.childNodes.length==1&&ho.firstChild.nodeType==3){hp=ho.firstChild;if(hq){hq=hp.nodeValue.length}}while(hw.parentNode!=hl){hw=hw.parentNode}var hk=hs.measure,hu=hk.maps;function hr(hA,hF,hC){for(var hE=-1;hE<(hu?hu.length:0);hE++){var hG=hE<0?hk.map:hu[hE];for(var hD=0;hD<hG.length;hD+=3){var hB=hG[hD+2];if(hB==hA||hB==hF){var hH=b7(hE<0?hs.line:hs.rest[hE]);var hz=hG[hD]+hC;if(hC<0||hB!=hA){hz=hG[hD+(hC?1:0)]}return ab(hH,hz)}}}}var hx=hr(hp,hw,hq);if(hx){return e4(hx,hn)}for(var i=hw.nextSibling,ht=hp?hp.nodeValue.length-hq:0;i;i=i.nextSibling){hx=hr(i,i.firstChild,0);if(hx){return e4(ab(hx.line,hx.ch-ht),hn)}else{ht+=i.textContent.length}}for(var hv=hw.previousSibling,hm=hq;hv;hv=hv.previousSibling){hx=hr(hv,hv.firstChild,-1);if(hx){return e4(ab(hx.line,hx.ch+hm),hn)}else{hm+=hv.textContent.length}}}var ad=function(i){this.cm=i;this.prevInput="";this.pollingFast=false;this.polling=new hj();this.hasSelection=false;this.composing=null};ad.prototype.init=function(hl){var ho=this;var hk=this,i=this.cm;this.createField(hl);var hm=this.textarea;hl.wrapper.insertBefore(this.wrapper,hl.wrapper.firstChild);if(fM){hm.style.width="0px"}ci(hm,"input",function(){if(ef&&n>=9&&ho.hasSelection){ho.hasSelection=null}hk.poll()});ci(hm,"paste",function(hp){if(a2(i,hp)||bm(hp,i)){return}i.state.pasteIncoming=+new Date;hk.fastPoll()});function hn(hq){if(a2(i,hq)){return}if(i.somethingSelected()){dA({lineWise:false,text:i.getSelections()})}else{if(!i.options.lineWiseCopyCut){return}else{var hp=dO(i);dA({lineWise:true,text:hp.text});if(hq.type=="cut"){i.setSelections(hp.ranges,null,ag)}else{hk.prevInput="";hm.value=hp.text.join("\n");eg(hm)}}}if(hq.type=="cut"){i.state.cutIncoming=+new Date}}ci(hm,"cut",hn);ci(hm,"copy",hn);ci(hl.scroller,"paste",function(hq){if(bn(hl,hq)||a2(i,hq)){return}if(!hm.dispatchEvent){i.state.pasteIncoming=+new Date;hk.focus();return}var hp=new Event("paste");hp.clipboardData=hq.clipboardData;hm.dispatchEvent(hp)});ci(hl.lineSpace,"selectstart",function(hp){if(!bn(hl,hp)){c7(hp)}});ci(hm,"compositionstart",function(){var hp=i.getCursor("from");if(hk.composing){hk.composing.range.clear()}hk.composing={start:hp,range:i.markText(hp,i.getCursor("to"),{className:"CodeMirror-composing"})}});ci(hm,"compositionend",function(){if(hk.composing){hk.poll();hk.composing.range.clear();hk.composing=null}})};ad.prototype.createField=function(i){this.wrapper=a8();this.textarea=this.wrapper.firstChild};ad.prototype.prepareSelection=function(){var hk=this.cm,ho=hk.display,hn=hk.doc;var i=gw(hk);if(hk.options.moveInputWithCursor){var hp=er(hk,hn.sel.primary().head,"div");var hl=ho.wrapper.getBoundingClientRect(),hm=ho.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(ho.wrapper.clientHeight-10,hp.top+hm.top-hl.top));i.teLeft=Math.max(0,Math.min(ho.wrapper.clientWidth-10,hp.left+hm.left-hl.left))}return i};ad.prototype.showSelection=function(hl){var i=this.cm,hk=i.display;cd(hk.cursorDiv,hl.cursors);cd(hk.selectionDiv,hl.selection);if(hl.teTop!=null){this.wrapper.style.top=hl.teTop+"px";this.wrapper.style.left=hl.teLeft+"px"}};ad.prototype.reset=function(hk){if(this.contextMenuPending||this.composing){return}var i=this.cm;if(i.somethingSelected()){this.prevInput="";var hl=i.getSelection();this.textarea.value=hl;if(i.state.focused){eg(this.textarea)}if(ef&&n>=9){this.hasSelection=hl}}else{if(!hk){this.prevInput=this.textarea.value="";if(ef&&n>=9){this.hasSelection=null}}}};ad.prototype.getField=function(){return this.textarea};ad.prototype.supportsTouch=function(){return false};
90ad.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!eQ||ej()!=this.textarea)){try{this.textarea.focus()}catch(i){}}};ad.prototype.blur=function(){this.textarea.blur()};ad.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0};ad.prototype.receivedFocus=function(){this.slowPoll()};ad.prototype.slowPoll=function(){var i=this;if(this.pollingFast){return}this.polling.set(this.cm.options.pollInterval,function(){i.poll();if(i.cm.state.focused){i.slowPoll()}})};ad.prototype.fastPoll=function(){var hk=false,i=this;i.pollingFast=true;function hl(){var hm=i.poll();if(!hm&&!hk){hk=true;i.polling.set(60,hl)}else{i.pollingFast=false;i.slowPoll()}}i.polling.set(20,hl)};ad.prototype.poll=function(){var hq=this;var i=this.cm,hl=this.textarea,hm=this.prevInput;if(this.contextMenuPending||!i.state.focused||(bK(hl)&&!hm&&!this.composing)||i.isReadOnly()||i.options.disableInput||i.state.keySeq){return false}var ho=hl.value;if(ho==hm&&!i.somethingSelected()){return false}if(ef&&n>=9&&this.hasSelection===ho||ct&&/[\uf700-\uf7ff]/.test(ho)){i.display.input.reset();return false}
90if(i.doc.sel==i.display.selForContextMenu){var hn=ho.charCodeAt(0);if(hn==8203&&!hm){hm="\u200b"}if(hn==8666){this.reset();return this.cm.execCommand("undo")}}var hp=0,hk=Math.min(hm.length,ho.length);while(hp<hk&&hm.charCodeAt(hp)==ho.charCodeAt(hp)){++hp}df(i,function(){gT(i,ho.slice(hp),hm.length-hp,null,hq.composing?"*compose":null);if(ho.length>1000||ho.indexOf("\n")>-1){hl.value=hq.prevInput=""}else{hq.prevInput=ho}if(hq.composing){hq.composing.range.clear();hq.composing.range=i.markText(hq.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"})}});return true};ad.prototype.ensurePolled=function(){if(this.pollingFast&&this.poll()){this.pollingFast=false}};ad.prototype.onKeyPress=function(){if(ef&&n>=9){this.hasSelection=null}this.fastPoll()};ad.prototype.onContextMenu=function(ho){var ht=this,hu=ht.cm,hq=hu.display,hk=ht.textarea;if(ht.contextMenuPending){ht.contextMenuPending()}var hs=cO(hu,ho),i=hq.scroller.scrollTop;if(!hs||eB){return}var hn=hu.options.resetSelectionOnContextMenu;if(hn&&hu.doc.sel.contains(hs)==-1){du(hu,cf)(hu.doc,fA(hs),ag)}var hp=hk.style.cssText,hx=ht.wrapper.style.cssText;var hw=ht.wrapper.offsetParent.getBoundingClientRect();ht.wrapper.style.cssText="position: static";hk.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(ho.clientY-hw.top-5)+"px; left: "+(ho.clientX-hw.left-5)+"px;\n      z-index: 1000; background: "+(ef?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var hv;if(dt){hv=window.scrollY}hq.input.focus();if(dt){window.scrollTo(null,hv)}hq.input.reset();if(!hu.somethingSelected()){hk.value=ht.prevInput=" "}ht.contextMenuPending=hr;hq.selForContextMenu=hu.doc.sel;clearTimeout(hq.detectingSelectAll);function hm(){if(hk.selectionStart!=null){var hy=hu.somethingSelected();var hz="\u200b"+(hy?hk.value:"");hk.value="\u21da";hk.value=hz;ht.prevInput=hy?"":"\u200b";hk.selectionStart=1;hk.selectionEnd=hz.length;hq.selForContextMenu=hu.doc.sel}}function hr(){if(ht.contextMenuPending!=hr){return}ht.contextMenuPending=false;ht.wrapper.style.cssText=hx;hk.style.cssText=hp;if(ef&&n<9){hq.scrollbars.setScrollTop(hq.scroller.scrollTop=i)}if(hk.selectionStart!=null){if(!ef||(ef&&n<9)){hm()}var hy=0,hz=function(){if(hq.selForContextMenu==hu.doc.sel&&hk.selectionStart==0&&hk.selectionEnd>0&&ht.prevInput=="\u200b"){du(hu,au)(hu)}else{if(hy++<10){hq.detectingSelectAll=setTimeout(hz,500)}else{hq.selForContextMenu=null;hq.input.reset()}}};hq.detectingSelectAll=setTimeout(hz,200)}}if(ef&&n>=9){hm()}if(g9){e3(ho);var hl=function(){eP(window,"mouseup",hl);setTimeout(hr,20)};ci(window,"mouseup",hl)}else{setTimeout(hr,50)}};ad.prototype.readOnlyChanged=function(i){if(!i){this.reset()}this.textarea.disabled=i=="nocursor"};ad.prototype.setUneditable=function(){};ad.prototype.needsContentAttribute=false;function gu(hq,hr){hr=hr?aY(hr):{};hr.value=hq.value;if(!hr.tabindex&&hq.tabIndex){hr.tabindex=hq.tabIndex}if(!hr.placeholder&&hq.placeholder){hr.placeholder=hq.placeholder}if(hr.autofocus==null){var i=ej();hr.autofocus=i==hq||hq.getAttribute("autofocus")!=null&&i==document.body}function hn(){hq.value=hp.getValue()}var ho;if(hq.form){ci(hq.form,"submit",hn);if(!hr.leaveSubmitMethodAlone){var hk=hq.form;ho=hk.submit;try{var hm=hk.submit=function(){hn();hk.submit=ho;hk.submit();hk.submit=hm}}catch(hl){}}}hr.finishInit=function(hs){hs.save=hn;hs.getTextArea=function(){return hq};hs.toTextArea=function(){hs.toTextArea=isNaN;hn();hq.parentNode.removeChild(hs.getWrapperElement());hq.style.display="";if(hq.form){eP(hq.form,"submit",hn);if(!hr.leaveSubmitMethodAlone&&typeof hq.form.submit=="function"){hq.form.submit=ho}}}};hq.style.display="none";var hp=L(function(hs){return hq.parentNode.insertBefore(hs,hq.nextSibling)},hr);return hp}function gz(i){i.off=eP;i.on=ci;i.wheelEventPixels=aI;i.Doc=aC;i.splitLines=gJ;i.countColumn=cc;i.findColumn=e2;i.isWordChar=gq;i.Pass=cy;i.signal=aN;i.Line=g4;i.changeEnd=dq;i.scrollbarModel=bz;i.Pos=ab;i.cmpPos=cD;i.modes=dZ;i.mimeModes=a3;i.resolveMode=hb;i.getMode=gm;i.modeExtensions=dW;i.extendMode=fj;i.copyState=cp;i.startState=cm;i.innerMode=g7;i.commands=fi;i.keyMap=fW;i.keyName=gb;i.isModifierKey=ff;i.lookupKey=k;i.normalizeKeyMap=c8;i.StringStream=fD;i.SharedTextMarker=z;i.TextMarker=V;i.LineWidget=d6;i.e_preventDefault=c7;i.e_stopPropagation=dX;i.e_stop=e3;i.addClass=gn;i.contains=ha;i.rmClass=h;i.keyNames=f1}fn(L);ek(L);var d="iter insert remove copy getEditor constructor".split(" ");for(var b4 in aC.prototype){if(aC.prototype.hasOwnProperty(b4)&&dP(d,b4)<0){L.prototype[b4]=(function(i){return function(){return i.apply(this.doc,arguments)}})(aC.prototype[b4])}}bS(aC);L.inputStyles={textarea:ad,contenteditable:d1};L.defineMode=function(i){if(!L.defaults.mode&&i!="null"){L.defaults.mode=i}e6.apply(this,arguments)};L.defineMIME=bD;L.defineMode("null",function(){return({token:function(i){return i.skipToEnd()}})});
90L.defineMIME("text/plain","null");L.defineExtension=function(i,hk){L.prototype[i]=hk};L.defineDocExtension=function(i,hk){aC.prototype[i]=hk};L.fromTextArea=gu;gz(L);L.version="5.52.0";return L})));(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Z,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Z.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},Y=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},X=J.counterDescriptors||{},O=J.colorKeywords||{},T=J.valueKeywords||{},M=J.allowNested,S=J.lineComment,V=J.supportsAtComponent===true;var C,N;function aa(ad,ae){C=ae;return ad}function ac(ag,af){var ae=ag.next();if(A[ae]){var ad=A[ae](ag,af);if(ad!==false){return ad}}if(ae=="@"){ag.eatWhile(/[\w\\\-]/);return aa("def",ag.current())}else{if(ae=="="||(ae=="~"||ae=="|")&&ag.eat("=")){return aa(null,"compare")}else{if(ae=='"'||ae=="'"){af.tokenize=K(ae);return af.tokenize(ag,af)}else{if(ae=="#"){ag.eatWhile(/[\w\\\-]/);return aa("atom","hash")}else{if(ae=="!"){ag.match(/^\s*\w*/);return aa("keyword","important")}else{if(/\d/.test(ae)||ae=="."&&ag.eat(/\d/)){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ae==="-"){if(/[\d.]/.test(ag.peek())){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ag.match(/^-[\w\\\-]*/)){ag.eatWhile(/[\w\\\-]/);if(ag.match(/^\s*:/,false)){return aa("variable-2","variable-definition")}return aa("variable-2","variable")}else{if(ag.match(/^\w+-/)){return aa("meta","meta")}}}}else{if(/[,+>*\/]/.test(ae)){return aa(null,"select-op")}else{if(ae=="."&&ag.match(/^-?[_a-z][_a-z0-9-]*/i)){return aa("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ae)){return aa(null,ae)}else{if(ag.match(/[\w-.]+(?=\()/)){if(/^(url(-prefix)?|domain|regexp)$/.test(ag.current().toLowerCase())){af.tokenize=ab}return aa("variable callee","variable")}else{if(/[\w\\\-]/.test(ae)){ag.eatWhile(/[\w\\\-]/);return aa("property","word")}else{return aa(null,null)}}}}}}}}}}}}}function K(ad){return function(ah,af){var ag=false,ae;while((ae=ah.next())!=null){if(ae==ad&&!ag){if(ad==")"){ah.backUp(1)}break}ag=!ag&&ae=="\\"}if(ae==ad||!ag&&ad!=")"){af.tokenize=null}return aa("string","string")}}function ab(ae,ad){ae.next();if(!ae.match(/\s*[\"\')]/,false)){ad.tokenize=K(")")}else{ad.tokenize=null}return aa(null,"(")}function R(ae,ad,af){this.type=ae;this.indent=ad;this.prev=af}function G(af,ag,ae,ad){af.context=new R(ae,ag.indentation()+(ad===false?0:Q),af.context);return ae}function U(ad){if(ad.context.prev){ad.context=ad.context.prev}return ad.context.type}function z(ad,af,ae){return F[ae.context.type](ad,af,ae)}function W(ae,ag,af,ah){for(var ad=ah||1;ad>0;ad--){af.context=af.context.prev}return z(ae,ag,af)}function H(ae){var ad=ae.current().toLowerCase();if(T.hasOwnProperty(ad)){N="atom"}else{if(O.hasOwnProperty(ad)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ad,af,ae){if(ad=="{"){return G(ae,af,"block")}else{if(ad=="}"&&ae.context.prev){return U(ae)}else{if(V&&/@component/i.test(ad)){return G(ae,af,"atComponentBlock")}else{if(/^@(-moz-)?document$/i.test(ad)){return G(ae,af,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/i.test(ad)){return G(ae,af,"atBlock")}else{if(/^@(font-face|counter-style)/i.test(ad)){ae.stateArg=ad;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(ad)){return"keyframes"}else{if(ad&&ad.charAt(0)=="@"){return G(ae,af,"at")}else{if(ad=="hash"){N="builtin"}else{if(ad=="word"){N="tag"}else{if(ad=="variable-definition"){return"maybeprop"}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}else{if(ad==":"){return"pseudo"}else{if(M&&ad=="("){return G(ae,af,"parens")}}}}}}}}}}}}}}return ae.context.type};F.block=function(ad,ag,ae){if(ad=="word"){var af=ag.current().toLowerCase();if(I.hasOwnProperty(af)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(af)){N="string-2";return"maybeprop"}else{if(M){N=ag.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ad=="meta"){return"block"}else{if(!M&&(ad=="hash"||ad=="qualifier")){N="error";return"block"}else{return F.top(ad,ag,ae)}}}};F.maybeprop=function(ad,af,ae){if(ad==":"){return G(ae,af,"prop")}return z(ad,af,ae)};F.prop=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"&&M){return G(ae,af,"propBlock")}if(ad=="}"||ad=="{"){return W(ad,af,ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(af.current())){N+=" error"}else{if(ad=="word"){H(af)}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}}}return"prop"};F.propBlock=function(ae,ad,af){if(ae=="}"){return U(af)}
90if(ae=="word"){N="property";return"maybeprop"}return af.context.type};F.parens=function(ad,af,ae){if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad==")"){return U(ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="interpolation"){return G(ae,af,"interpolation")}if(ad=="word"){H(af)}return"parens"};F.pseudo=function(ad,af,ae){if(ad=="meta"){return"pseudo"}if(ad=="word"){N="variable-3";return ae.context.type}return z(ad,af,ae)};F.documentTypes=function(ad,af,ae){if(ad=="word"&&y.hasOwnProperty(af.current())){N="tag";return ae.context.type}else{return F.atBlock(ad,af,ae)}};F.atBlock=function(ad,ag,ae){if(ad=="("){return G(ae,ag,"atBlock_parens")}if(ad=="}"||ad==";"){return W(ad,ag,ae)}if(ad=="{"){return U(ae)&&G(ae,ag,M?"block":"top")}if(ad=="interpolation"){return G(ae,ag,"interpolation")}if(ad=="word"){var af=ag.current().toLowerCase();if(af=="only"||af=="not"||af=="and"||af=="or"){N="keyword"}else{if(Y.hasOwnProperty(af)){N="attribute"}else{if(L.hasOwnProperty(af)){N="property"}else{if(P.hasOwnProperty(af)){N="keyword"}else{if(I.hasOwnProperty(af)){N="property"}else{if(B.hasOwnProperty(af)){N="string-2"}else{if(T.hasOwnProperty(af)){N="atom"}else{if(O.hasOwnProperty(af)){N="keyword"}else{N="error"}}}}}}}}}return ae.context.type};F.atComponentBlock=function(ad,af,ae){if(ad=="}"){return W(ad,af,ae)}if(ad=="{"){return U(ae)&&G(ae,af,M?"block":"top",false)}if(ad=="word"){N="error"}return ae.context.type};F.atBlock_parens=function(ad,af,ae){if(ad==")"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae,2)}return F.atBlock(ad,af,ae)};F.restricted_atBlock_before=function(ad,af,ae){if(ad=="{"){return G(ae,af,"restricted_atBlock")}if(ad=="word"&&ae.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ad,af,ae)};F.restricted_atBlock=function(ad,af,ae){if(ad=="}"){ae.stateArg=null;return U(ae)}if(ad=="word"){if((ae.stateArg=="@font-face"&&!E.hasOwnProperty(af.current().toLowerCase()))||(ae.stateArg=="@counter-style"&&!X.hasOwnProperty(af.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ad,af,ae){if(ad=="word"){N="variable";return"keyframes"}if(ad=="{"){return G(ae,af,"top")}return z(ad,af,ae)};F.at=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad=="word"){N="tag"}else{if(ad=="hash"){N="builtin"}}return"at"};F.interpolation=function(ad,af,ae){if(ad=="}"){return U(ae)}if(ad=="{"||ad==";"){return W(ad,af,ae)}if(ad=="word"){N="variable"}else{if(ad!="variable"&&ad!="("&&ad!=")"){N="error"}}return"interpolation"};return{startState:function(ad){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ad||0,null)}},token:function(af,ae){if(!ae.tokenize&&af.eatSpace()){return null}var ad=(ae.tokenize||ac)(af,ae);if(ad&&typeof ad=="object"){C=ad[1];ad=ad[0]}N=ad;if(C!="comment"){ae.state=F[ae.state](C,af,ae)}return N},indent:function(ah,af){var ae=ah.context,ag=af&&af.charAt(0);var ad=ae.indent;if(ae.type=="prop"&&(ag=="}"||ag==")")){ae=ae.prev}if(ae.prev){if(ag=="}"&&(ae.type=="block"||ae.type=="top"||ae.type=="interpolation"||ae.type=="restricted_atBlock")){ae=ae.prev;ad=ae.indent}else{if(ag==")"&&(ae.type=="parens"||ae.type=="atBlock_parens")||ag=="{"&&(ae.type=="at"||ae.type=="atBlock")){ad=Math.max(0,ae.indent-Q)}}}return ad},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:S,fold:"brace"}});function g(A){var z={};for(var y=0;y<A.length;++y){z[A[y].toLowerCase()]=true}return z}var k=["domain","regexp","url","url-prefix"],a=g(k);var b=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=g(b);var x=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],i=g(x);var l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],p=g(l);var d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","mix-blend-mode","move-to","nav-down","nav-index","
90nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=g(d);var n=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],e=g(n);var t=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=g(t);var q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],u=g(q);var c=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],m=g(c);var j=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-
90am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],s=g(j);var o=k.concat(b).concat(x).concat(l).concat(d).concat(n).concat(c).concat(j);r.registerHelper("hintWords","css",o);function w(B,A){var y=false,z;while((z=B.next())!=null){if(y&&z=="/"){A.tokenize=null;break}y=(z=="*")}return["comment","comment"]}r.defineMIME("text/css",{documentTypes:a,mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css"});r.defineMIME("text/x-scss",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,lineComment:"//",tokenHo
90oks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},":":function(y){if(y.match(/\s*\{/,false)){return[null,null]}return false},"$":function(y){y.match(/^[\w-]+/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(y){if(!y.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});r.defineMIME("text/x-less",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,lineComment:"//",tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},"@":function(y){if(y.eat("{")){return[null,"interpolation"]}if(y.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,false)){return false}y.eatWhile(/[\w\\\-]/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});r.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:v,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,supportsAtComponent:true,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css",helperType:"gss"})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a)}else{a(CodeMirror)}}})(function(d){var g={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function f(n,j,k){var m=n.current(),l=m.search(j);if(l>-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?/^\s*(.*?)\s*$/.exec(k[2])[1]:""}function i(k,j){return new RegExp((j?"^":"")+"</s*"+k+"s*>","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k<l.length;k++){var j=l[k];if(!j[0]||j[1].test(a(m,j[0]))){return j[2]}}}d.defineMode("htmlmixed",function(k,o){var q=d.getMode(k,{name:"xml",htmlMode:true,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag});var j={};var p=o&&o.tags,n=o&&o.scriptTypes;h(g,j);if(p){h(p,j)}if(n){for(var m=n.length-1;m>=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,"",""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=d.startState(q);return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(t,s,r){if(!t.localMode||/^\s*<\//.test(s)){return q.indent(t.htmlState,s,r)}else{if(t.localMode.indent){return t.localMode.indent(t.localState,s,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});
90(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(ao,aB){var p=ao.indentUnit;var G=aB.statementIndent;var aU=aB.jsonld;var D=aB.json||aU;var h=aB.typescript;var aM=aB.wordCharacters||/[\w$\xa1-\uffff]/;var aK=function(){function a9(bd){return{type:bd,style:"keyword"}}var a6=a9("keyword a"),bc=a9("keyword b"),bb=a9("keyword c"),ba=a9("keyword d");var a7=a9("operator"),a8={type:"atom",style:"atom"};return{"if":a9("if"),"while":a6,"with":a6,"else":bc,"do":bc,"try":bc,"finally":bc,"return":ba,"break":ba,"continue":ba,"new":a9("new"),"delete":bb,"void":bb,"throw":bb,"debugger":a9("debugger"),"var":a9("var"),"const":a9("var"),let:a9("var"),"function":a9("function"),"catch":a9("catch"),"for":a9("for"),"switch":a9("switch"),"case":a9("case"),"default":a9("default"),"in":a7,"typeof":a7,"instanceof":a7,"true":a8,"false":a8,"null":a8,"undefined":a8,"NaN":a8,"Infinity":a8,"this":a9("this"),"class":a9("class"),"super":a9("atom"),yield:bb,"export":a9("export"),"import":a9("import"),"extends":bb,await:bb}}();var Z=/[+\-*&%=<>!?|~^@]/;var aJ=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function K(a9){var a7=false,a6,a8=false;while((a6=a9.next())!=null){if(!a7){if(a6=="/"&&!a8){return}if(a6=="["){a8=true}else{if(a8&&a6=="]"){a8=false}}}a7=!a7&&a6=="\\"}}var ae,L;function T(a8,a7,a6){ae=a8;L=a6;return a7}function ag(ba,a8){var a6=ba.next();if(a6=='"'||a6=="'"){a8.tokenize=ad(a6);return a8.tokenize(ba,a8)}else{if(a6=="."&&ba.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)){return T("number","number")}else{if(a6=="."&&ba.match("..")){return T("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(a6)){return T(a6)}else{if(a6=="="&&ba.eat(">")){return T("=>","operator")}else{if(a6=="0"&&ba.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)){return T("number","number")}else{if(/\d/.test(a6)){ba.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/);return T("number","number")}else{if(a6=="/"){if(ba.eat("*")){a8.tokenize=aT;return aT(ba,a8)}else{if(ba.eat("/")){ba.skipToEnd();return T("comment","comment")}else{if(a2(ba,a8,1)){K(ba);ba.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);return T("regexp","string-2")}else{ba.eat("=");return T("operator","operator",ba.current())}}}}else{if(a6=="`"){a8.tokenize=aW;return aW(ba,a8)}else{if(a6=="#"){ba.skipToEnd();return T("error","error")}else{if(a6=="<"&&ba.match("!--")||a6=="-"&&ba.match("->")){ba.skipToEnd();return T("comment","comment")}else{if(Z.test(a6)){if(a6!=">"||!a8.lexical||a8.lexical.type!=">"){if(ba.eat("=")){if(a6=="!"||a6=="="){ba.eat("=")}}else{if(/[<>*+\-]/.test(a6)){ba.eat(a6);if(a6==">"){ba.eat(a6)}}}}return T("operator","operator",ba.current())}else{if(aM.test(a6)){ba.eatWhile(aM);var a9=ba.current();if(a8.lastType!="."){if(aK.propertyIsEnumerable(a9)){var a7=aK[a9];return T(a7.type,a7.style,a9)}if(a9=="async"&&ba.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,false)){return T("async","keyword",a9)}}return T("variable","variable",a9)}}}}}}}}}}}}}}function ad(a6){return function(ba,a8){var a9=false,a7;if(aU&&ba.peek()=="@"&&ba.match(aJ)){a8.tokenize=ag;return T("jsonld-keyword","meta")}while((a7=ba.next())!=null){if(a7==a6&&!a9){break}a9=!a9&&a7=="\\"}if(!a9){a8.tokenize=ag}return T("string","string")}}function aT(a9,a8){var a6=false,a7;while(a7=a9.next()){if(a7=="/"&&a6){a8.tokenize=ag;break}a6=(a7=="*")}return T("comment","comment")}function aW(a9,a7){var a8=false,a6;while((a6=a9.next())!=null){if(!a8&&(a6=="`"||a6=="$"&&a9.eat("{"))){a7.tokenize=ag;break}a8=!a8&&a6=="\\"}return T("quasi","string-2",a9.current())}var q="([{}])";function aQ(bf,a8){if(a8.fatArrowAt){a8.fatArrowAt=null}var be=bf.string.indexOf("=>",bf.start);if(be<0){return}if(h){var ba=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(bf.string.slice(bf.start,be));if(ba){be=ba.index}}var bb=0,a9=false;for(var bd=be-1;bd>=0;--bd){var a6=bf.string.charAt(bd);var a7=q.indexOf(a6);if(a7>=0&&a7<3){if(!bb){++bd;break}if(--bb==0){if(a6=="("){a9=true}break}}else{if(a7>=3&&a7<6){++bb}else{if(aM.test(a6)){a9=true}else{if(/["'\/`]/.test(a6)){for(;;--bd){if(bd==0){return}var bc=bf.string.charAt(bd-1);if(bc==a6&&bf.string.charAt(bd-2)!="\\"){bd--;break}}}else{if(a9&&!bb){++bd;break}}}}}}if(a9&&!bb){a8.fatArrowAt=bd}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function R(bb,a7,a6,ba,a8,a9){this.indented=bb;this.column=a7;this.type=a6;this.prev=a8;this.info=a9;if(ba!=null){this.align=ba}}function x(a9,a8){for(var a7=a9.localVars;a7;a7=a7.next){if(a7.name==a8){return true}}for(var a6=a9.context;a6;a6=a6.prev){for(var a7=a6.vars;a7;a7=a7.next){if(a7.name==a8){return true}}}}function g(ba,a7,a6,a9,bb){var bc=ba.cc;J.state=ba;J.stream=bb;J.marked=null,J.cc=bc;J.style=a7;if(!ba.lexical.hasOwnProperty("align")){ba.lexical.align=true}while(true){var a8=bc.length?bc.pop():D?aF:a0;
90if(a8(a6,a9)){while(bc.length&&bc[bc.length-1].lex){bc.pop()()}if(J.marked){return J.marked}if(a6=="variable"&&x(ba,a9)){return"variable-2"}return a7}}}var J={state:null,column:null,marked:null,cc:null};function aq(){for(var a6=arguments.length-1;a6>=0;a6--){J.cc.push(arguments[a6])}}function aw(){aq.apply(null,arguments);return true}function f(a7,a8){for(var a6=a8;a6;a6=a6.next){if(a6.name==a7){return true}}return false}function aP(a6){var a7=J.state;J.marked="def";if(a7.context){if(a7.lexical.info=="var"&&a7.context&&a7.context.block){var a8=aO(a6,a7.context);if(a8!=null){a7.context=a8;return}}else{if(!f(a6,a7.localVars)){a7.localVars=new a1(a6,a7.localVars);return}}}if(aB.globalVars&&!f(a6,a7.globalVars)){a7.globalVars=new a1(a6,a7.globalVars)}}function aO(a7,a8){if(!a8){return null}else{if(a8.block){var a6=aO(a7,a8.prev);if(!a6){return null}if(a6==a8.prev){return a8}return new Q(a6,a8.vars,true)}else{if(f(a7,a8.vars)){return a8}else{return new Q(a8.prev,new a1(a7,a8.vars),false)}}}}function aC(a6){return a6=="public"||a6=="private"||a6=="protected"||a6=="abstract"||a6=="readonly"}function Q(a6,a7,a8){this.prev=a6;this.vars=a7;this.block=a8}function a1(a6,a7){this.name=a6;this.next=a7}var v=new a1("this",new a1("arguments",null));function A(){J.state.context=new Q(J.state.context,J.state.localVars,false);J.state.localVars=v}function am(){J.state.context=new Q(J.state.context,J.state.localVars,true);J.state.localVars=null}function B(){J.state.localVars=J.state.context.vars;J.state.context=J.state.context.prev}B.lex=true;function aY(a7,a8){var a6=function(){var bb=J.state,a9=bb.indented;if(bb.lexical.type=="stat"){a9=bb.lexical.indented}else{for(var ba=bb.lexical;ba&&ba.type==")"&&ba.align;ba=ba.prev){a9=ba.indented}}bb.lexical=new R(a9,J.stream.column(),a7,null,bb.lexical,a8)};a6.lex=true;return a6}function i(){var a6=J.state;if(a6.lexical.prev){if(a6.lexical.type==")"){a6.indented=a6.lexical.indented}a6.lexical=a6.lexical.prev}}i.lex=true;function w(a6){function a7(a8){if(a8==a6){return aw()}else{if(a6==";"||a8=="}"||a8==")"||a8=="]"){return aq()}else{return aw(a7)}}}return a7}function a0(a6,a7){if(a6=="var"){return aw(aY("vardef",a7),c,w(";"),i)}if(a6=="keyword a"){return aw(aY("form"),aG,a0,i)}if(a6=="keyword b"){return aw(aY("form"),a0,i)}if(a6=="keyword d"){return J.stream.match(/^\s*$/,false)?aw():aw(aY("stat"),aA,w(";"),i)}if(a6=="debugger"){return aw(w(";"))}if(a6=="{"){return aw(aY("}"),am,C,i,B)}if(a6==";"){return aw()}if(a6=="if"){if(J.state.lexical.info=="else"&&J.state.cc[J.state.cc.length-1]==i){J.state.cc.pop()()}return aw(aY("form"),aG,a0,i,d)}if(a6=="function"){return aw(U)}if(a6=="for"){return aw(aY("form"),z,a0,i)}if(a6=="class"||(h&&a7=="interface")){J.marked="keyword";return aw(aY("form",a6=="class"?a6:a7),aj,i)}if(a6=="variable"){if(h&&a7=="declare"){J.marked="keyword";return aw(a0)}else{if(h&&(a7=="module"||a7=="enum"||a7=="type")&&J.stream.match(/^\s*\w/,false)){J.marked="keyword";if(a7=="enum"){return aw(aN)}else{if(a7=="type"){return aw(ap,w("operator"),k,w(";"))}else{return aw(aY("form"),j,w("{"),aY("}"),C,i,i)}}}else{if(h&&a7=="namespace"){J.marked="keyword";return aw(aY("form"),aF,a0,i)}else{if(h&&a7=="abstract"){J.marked="keyword";return aw(a0)}else{return aw(aY("stat"),a3)}}}}}if(a6=="switch"){return aw(aY("form"),aG,w("{"),aY("}","switch"),am,C,i,i,B)}if(a6=="case"){return aw(aF,w(":"))}if(a6=="default"){return aw(w(":"))}if(a6=="catch"){return aw(aY("form"),A,X,a0,i,B)}if(a6=="export"){return aw(aY("stat"),aZ,i)}if(a6=="import"){return aw(aY("stat"),ax,i)}if(a6=="async"){return aw(a0)}if(a7=="@"){return aw(aF,a0)}return aq(aY("stat"),aF,w(";"),i)}function X(a6){if(a6=="("){return aw(av,w(")"))}}function aF(a6,a7){return an(a6,a7,false)}function aX(a6,a7){return an(a6,a7,true)}function aG(a6){if(a6!="("){return aq()}return aw(aY(")"),aF,w(")"),i)}function an(a7,a8,ba){if(J.state.fatArrowAt==J.stream.start){var a6=ba?V:ak;if(a7=="("){return aw(A,aY(")"),aL(av,")"),i,w("=>"),a6,B)}else{if(a7=="variable"){return aq(A,j,w("=>"),a6,B)}}}var a9=ba?l:at;if(b.hasOwnProperty(a7)){return aw(a9)}if(a7=="function"){return aw(U,a9)}if(a7=="class"||(h&&a8=="interface")){J.marked="keyword";return aw(aY("form"),O,i)}if(a7=="keyword c"||a7=="async"){return aw(ba?aX:aF)}if(a7=="("){return aw(aY(")"),aA,w(")"),i,a9)}if(a7=="operator"||a7=="spread"){return aw(ba?aX:aF)}if(a7=="["){return aw(aY("]"),r,i,a9)}if(a7=="{"){return aR(y,"}",null,a9)}if(a7=="quasi"){return aq(aa,a9)}if(a7=="new"){return aw(N(ba))}if(a7=="import"){return aw(aF)}return aw()}function aA(a6){if(a6.match(/[;\}\)\],]/)){return aq()}return aq(aF)}function at(a6,a7){if(a6==","){return aw(aA)}return l(a6,a7,false)}function l(a6,a8,ba){var a7=ba==false?at:l;var a9=ba==false?aF:aX;
90if(a6=="=>"){return aw(A,ba?V:ak,B)}if(a6=="operator"){if(/\+\+|--/.test(a8)||h&&a8=="!"){return aw(a7)}if(h&&a8=="<"&&J.stream.match(/^([^>]|<.*?>)*>\s*\(/,false)){return aw(aY(">"),aL(k,">"),i,a7)}if(a8=="?"){return aw(aF,w(":"),a9)}return aw(a9)}if(a6=="quasi"){return aq(aa,a7)}if(a6==";"){return}if(a6=="("){return aR(aX,")","call",a7)}if(a6=="."){return aw(aD,a7)}if(a6=="["){return aw(aY("]"),aA,w("]"),i,a7)}if(h&&a8=="as"){J.marked="keyword";return aw(k,a7)}if(a6=="regexp"){J.state.lastType=J.marked="operator";J.stream.backUp(J.stream.pos-J.stream.start-1);return aw(a9)}}function aa(a6,a7){if(a6!="quasi"){return aq()}if(a7.slice(a7.length-2)!="${"){return aw(aa)}return aw(aF,u)}function u(a6){if(a6=="}"){J.marked="string-2";J.state.tokenize=aW;return aw(aa)}}function ak(a6){aQ(J.stream,J.state);return aq(a6=="{"?a0:aF)}function V(a6){aQ(J.stream,J.state);return aq(a6=="{"?a0:aX)}function N(a6){return function(a7){if(a7=="."){return aw(a6?s:ai)}else{if(a7=="variable"&&h){return aw(e,a6?l:at)}else{return aq(a6?aX:aF)}}}}function ai(a6,a7){if(a7=="target"){J.marked="keyword";return aw(at)}}function s(a6,a7){if(a7=="target"){J.marked="keyword";return aw(l)}}function a3(a6){if(a6==":"){return aw(i,a0)}return aq(at,w(";"),i)}function aD(a6){if(a6=="variable"){J.marked="property";return aw()}}function y(a7,a8){if(a7=="async"){J.marked="property";return aw(y)}else{if(a7=="variable"||J.style=="keyword"){J.marked="property";if(a8=="get"||a8=="set"){return aw(P)}var a6;if(h&&J.state.fatArrowAt==J.stream.start&&(a6=J.stream.match(/^\s*:\s*/,false))){J.state.fatArrowAt=J.stream.pos+a6[0].length}return aw(S)}else{if(a7=="number"||a7=="string"){J.marked=aU?"property":(J.style+" property");return aw(S)}else{if(a7=="jsonld-keyword"){return aw(S)}else{if(h&&aC(a8)){J.marked="keyword";return aw(y)}else{if(a7=="["){return aw(aF,af,w("]"),S)}else{if(a7=="spread"){return aw(aX,S)}else{if(a8=="*"){J.marked="keyword";return aw(y)}else{if(a7==":"){return aq(S)}}}}}}}}}}function P(a6){if(a6!="variable"){return aq(S)}J.marked="property";return aw(U)}function S(a6){if(a6==":"){return aw(aX)}if(a6=="("){return aq(U)}}function aL(a9,a6,a7){function a8(bb,bc){if(a7?a7.indexOf(bb)>-1:bb==","){var ba=J.state.lexical;if(ba.info=="call"){ba.pos=(ba.pos||0)+1}return aw(function(bd,be){if(bd==a6||be==a6){return aq()}return aq(a9)},a8)}if(bb==a6||bc==a6){return aw()}if(a7&&a7.indexOf(";")>-1){return aq(a9)}return aw(w(a6))}return function(ba,bb){if(ba==a6||bb==a6){return aw()}return aq(a9,a8)}}function aR(a9,a6,a8){for(var a7=3;a7<arguments.length;a7++){J.cc.push(arguments[a7])}return aw(aY(a6,a8),aL(a9,a6),i)}function C(a6){if(a6=="}"){return aw()}return aq(a0,C)}function af(a6,a7){if(h){if(a6==":"){return aw(k)}if(a7=="?"){return aw(af)}}}function E(a6,a7){if(h&&(a6==":"||a7=="in")){return aw(k)}}function W(a6){if(h&&a6==":"){if(J.stream.match(/^\s*\w+\s+is\b/,false)){return aw(aF,ab,k)}else{return aw(k)}}}function ab(a6,a7){if(a7=="is"){J.marked="keyword";return aw()}}function k(a6,a7){if(a7=="keyof"||a7=="typeof"||a7=="infer"){J.marked="keyword";return aw(a7=="typeof"?aX:k)}if(a6=="variable"||a7=="void"){J.marked="type";return aw(M)}if(a7=="|"||a7=="&"){return aw(k)}if(a6=="string"||a6=="number"||a6=="atom"){return aw(M)}if(a6=="["){return aw(aY("]"),aL(k,"]",","),i,M)}if(a6=="{"){return aw(aY("}"),aL(aE,"}",",;"),i,M)}if(a6=="("){return aw(aL(ar,")"),ac,M)}if(a6=="<"){return aw(aL(k,">"),k)}}function ac(a6){if(a6=="=>"){return aw(k)}}function aE(a6,a7){if(a6=="variable"||J.style=="keyword"){J.marked="property";return aw(aE)}else{if(a7=="?"||a6=="number"||a6=="string"){return aw(aE)}else{if(a6==":"){return aw(k)}else{if(a6=="["){return aw(w("variable"),E,w("]"),aE)}else{if(a6=="("){return aq(a5,aE)}}}}}}function ar(a6,a7){if(a6=="variable"&&J.stream.match(/^\s*[?:]/,false)||a7=="?"){return aw(ar)}if(a6==":"){return aw(k)}if(a6=="spread"){return aw(ar)}return aq(k)}function M(a6,a7){if(a7=="<"){return aw(aY(">"),aL(k,">"),i,M)}if(a7=="|"||a6=="."||a7=="&"){return aw(k)}if(a6=="["){return aw(k,w("]"),M)}if(a7=="extends"||a7=="implements"){J.marked="keyword";return aw(k)}if(a7=="?"){return aw(k,w(":"),k)}}function e(a6,a7){if(a7=="<"){return aw(aY(">"),aL(k,">"),i,M)}}
90function o(){return aq(k,ah)}function ah(a6,a7){if(a7=="="){return aw(k)}}function c(a6,a7){if(a7=="enum"){J.marked="keyword";return aw(aN)}return aq(j,af,au,al)}function j(a6,a7){if(h&&aC(a7)){J.marked="keyword";return aw(j)}if(a6=="variable"){aP(a7);return aw()}if(a6=="spread"){return aw(j)}if(a6=="["){return aR(F,"]")}if(a6=="{"){return aR(aV,"}")}}function aV(a6,a7){if(a6=="variable"&&!J.stream.match(/^\s*:/,false)){aP(a7);return aw(au)}if(a6=="variable"){J.marked="property"}if(a6=="spread"){return aw(j)}if(a6=="}"){return aq()}if(a6=="["){return aw(aF,w("]"),w(":"),aV)}return aw(w(":"),j,au)}function F(){return aq(j,au)}function au(a6,a7){if(a7=="="){return aw(aX)}}function al(a6){if(a6==","){return aw(c)}}function d(a6,a7){if(a6=="keyword b"&&a7=="else"){return aw(aY("form","else"),a0,i)}}function z(a6,a7){if(a7=="await"){return aw(z)}if(a6=="("){return aw(aY(")"),I,i)}}function I(a6){if(a6=="var"){return aw(c,H)}if(a6=="variable"){return aw(H)}return aq(H)}function H(a6,a7){if(a6==")"){return aw()}if(a6==";"){return aw(H)}if(a7=="in"||a7=="of"){J.marked="keyword";return aw(aF,H)}return aq(aF,H)}function U(a6,a7){if(a7=="*"){J.marked="keyword";return aw(U)}if(a6=="variable"){aP(a7);return aw(U)}if(a6=="("){return aw(A,aY(")"),aL(av,")"),i,W,a0,B)}if(h&&a7=="<"){return aw(aY(">"),aL(o,">"),i,U)}}function a5(a6,a7){if(a7=="*"){J.marked="keyword";return aw(a5)}if(a6=="variable"){aP(a7);return aw(a5)}if(a6=="("){return aw(A,aY(")"),aL(av,")"),i,W,B)}if(h&&a7=="<"){return aw(aY(">"),aL(o,">"),i,a5)}}function ap(a6,a7){if(a6=="keyword"||a6=="variable"){J.marked="type";return aw(ap)}else{if(a7=="<"){return aw(aY(">"),aL(o,">"),i)}}}function av(a6,a7){if(a7=="@"){aw(aF,av)}if(a6=="spread"){return aw(av)}if(h&&aC(a7)){J.marked="keyword";return aw(av)}if(h&&a6=="this"){return aw(af,au)}return aq(j,af,au)}function O(a6,a7){if(a6=="variable"){return aj(a6,a7)}return Y(a6,a7)}function aj(a6,a7){if(a6=="variable"){aP(a7);return aw(Y)}}function Y(a6,a7){if(a7=="<"){return aw(aY(">"),aL(o,">"),i,Y)}if(a7=="extends"||a7=="implements"||(h&&a6==",")){if(a7=="implements"){J.marked="keyword"}return aw(h?k:aF,Y)}if(a6=="{"){return aw(aY("}"),t,i)}}function t(a6,a7){if(a6=="async"||(a6=="variable"&&(a7=="static"||a7=="get"||a7=="set"||(h&&aC(a7)))&&J.stream.match(/^\s+[\w$\xa1-\uffff]/,false))){J.marked="keyword";return aw(t)}if(a6=="variable"||J.style=="keyword"){J.marked="property";return aw(h?a4:U,t)}if(a6=="number"||a6=="string"){return aw(h?a4:U,t)}if(a6=="["){return aw(aF,af,w("]"),h?a4:U,t)}if(a7=="*"){J.marked="keyword";return aw(t)}if(h&&a6=="("){return aq(a5,t)}if(a6==";"||a6==","){return aw(t)}if(a6=="}"){return aw()}if(a7=="@"){return aw(aF,t)}}function a4(a7,a9){if(a9=="?"){return aw(a4)}if(a7==":"){return aw(k,au)}if(a9=="="){return aw(aX)}var a6=J.state.lexical.prev,a8=a6&&a6.info=="interface";return aq(a8?a5:U)}function aZ(a6,a7){if(a7=="*"){J.marked="keyword";return aw(az,w(";"))}if(a7=="default"){J.marked="keyword";return aw(aF,w(";"))}if(a6=="{"){return aw(aL(ay,"}"),az,w(";"))}return aq(a0)}function ay(a6,a7){if(a7=="as"){J.marked="keyword";return aw(w("variable"))}if(a6=="variable"){return aq(aX,ay)}}function ax(a6){if(a6=="string"){return aw()}if(a6=="("){return aq(aF)}return aq(aI,n,az)}function aI(a6,a7){if(a6=="{"){return aR(aI,"}")}if(a6=="variable"){aP(a7)}if(a7=="*"){J.marked="keyword"}return aw(m)}function n(a6){if(a6==","){return aw(aI,n)}}function m(a6,a7){if(a7=="as"){J.marked="keyword";return aw(aI)}}function az(a6,a7){if(a7=="from"){J.marked="keyword";return aw(aF)}}function r(a6){if(a6=="]"){return aw()}return aq(aL(aX,"]"))}function aN(){return aq(aY("form"),j,w("{"),aY("}"),aL(aS,"}"),i,i)}function aS(){return aq(j,au)}function aH(a7,a6){return a7.lastType=="operator"||a7.lastType==","||Z.test(a6.charAt(0))||/[,.]/.test(a6.charAt(0))}function a2(a8,a7,a6){return a7.tokenize==ag&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(a7.lastType)||(a7.lastType=="quasi"&&/\{\s*$/.test(a8.string.slice(0,a8.pos-(a6||0))))}return{startState:function(a7){var a6={tokenize:ag,lastType:"sof",cc:[],lexical:new R((a7||0)-p,0,"block",fal
90se),localVars:aB.localVars,context:aB.localVars&&new Q(null,null,false),indented:a7||0};if(aB.globalVars&&typeof aB.globalVars=="object"){a6.globalVars=aB.globalVars}return a6},token:function(a8,a7){if(a8.sol()){if(!a7.lexical.hasOwnProperty("align")){a7.lexical.align=false}a7.indented=a8.indentation();aQ(a8,a7)}if(a7.tokenize!=aT&&a8.eatSpace()){return null}var a6=a7.tokenize(a8,a7);if(ae=="comment"){return a6}a7.lastType=ae=="operator"&&(L=="++"||L=="--")?"incdec":ae;return g(a7,a6,ae,L,a8)},indent:function(a6,a9){if(a6.tokenize==aT){return a.Pass}if(a6.tokenize!=ag){return 0}var bd=a9&&a9.charAt(0),be=a6.lexical,bc;if(!/^\s*else\b/.test(a9)){for(var a8=a6.cc.length-1;a8>=0;--a8){var ba=a6.cc[a8];if(ba==i){be=be.prev}else{if(ba!=d){break}}}}while((be.type=="stat"||be.type=="form")&&(bd=="}"||((bc=a6.cc[a6.cc.length-1])&&(bc==at||bc==l)&&!/^[,\.=+\-*:?[\(]/.test(a9)))){be=be.prev}if(G&&be.type==")"&&be.prev.type=="stat"){be=be.prev}var bb=be.type,a7=bd==bb;if(bb=="vardef"){return be.indented+(a6.lastType=="operator"||a6.lastType==","?be.info.length+1:0)}else{if(bb=="form"&&bd=="{"){return be.indented}else{if(bb=="form"){return be.indented+p}else{if(bb=="stat"){return be.indented+(aH(a6,a9)?G||p:0)}else{if(be.info=="switch"&&!a7&&aB.doubleIndentSwitch!=false){return be.indented+(/^(?:case|default)\b/.test(a9)?p:2*p)}else{if(be.align){return be.column+(a7?0:1)}else{return be.indented+(a7?0:p)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:D?null:"/*",blockCommentEnd:D?null:"*/",blockCommentContinue:D?null:" * ",lineComment:D?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:D?"json":"javascript",jsonldMode:aU,jsonMode:D,expressionAllowed:a2,skipExpression:function(a6){var a7=a6.cc[a6.cc.length-1];if(a7==aF||a7==aX){a6.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(c){c.defineMode("sql",function(x,p){var k=p.client||{},j=p.atoms||{"false":true,"true":true,"null":true},y=p.builtin||h(d),s=p.keywords||h(g),n=p.operatorChars||/^[*+\-%<>!=&|~^\/]/,t=p.support||{},i=p.hooks||{},r=p.dateSQL||{date:true,time:true,timestamp:true},v=p.backslashStringEscapes!==false,q=p.brackets||/^[\{}\(\)\[\]]/,l=p.punctuation||/^[;.,:]/;function z(E,C){var B=E.next();if(i[B]){var A=i[B](E,C);if(A!==false){return A}}if(t.hexNumber&&((B=="0"&&E.match(/^[xX][0-9a-fA-F]+/))||(B=="x"||B=="X")&&E.match(/^'[0-9a-fA-F]+'/))){return"number"}else{if(t.binaryNumber&&(((B=="b"||B=="B")&&E.match(/^'[01]+'/))||(B=="0"&&E.match(/^b[01]+/)))){return"number"}else{if(B.charCodeAt(0)>47&&B.charCodeAt(0)<58){E.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/);t.decimallessFloat&&E.match(/^\.(?!\.)/);return"number"}else{if(B=="?"&&(E.eatSpace()||E.eol()||E.eat(";"))){return"variable-3"}else{if(B=="'"||(B=='"'&&t.doubleQuote)){C.tokenize=o(B);return C.tokenize(E,C)}else{if((((t.nCharCast&&(B=="n"||B=="N"))||(t.charsetCast&&B=="_"&&E.match(/[a-z][a-z0-9]*/i)))&&(E.peek()=="'"||E.peek()=='"'))){return"keyword"}else{if(t.escapeConstant&&(B=="e"||B=="E")&&(E.peek()=="'"||(E.peek()=='"'&&t.doubleQuote))){C.tokenize=function(G,F){return(F.tokenize=o(G.next(),true))(G,F)};return"keyword"}else{if(t.commentSlashSlash&&B=="/"&&E.eat("/")){E.skipToEnd();return"comment"}else{if((t.commentHash&&B=="#")||(B=="-"&&E.eat("-")&&(!t.commentSpaceRequired||E.eat(" ")))){E.skipToEnd();return"comment"}else{if(B=="/"&&E.eat("*")){C.tokenize=u(1);return C.tokenize(E,C)}else{if(B=="."){if(t.zerolessFloat&&E.match(/^(?:\d+(?:e[+-]?\d+)?)/i)){return"number"}if(E.match(/^\.+/)){return null}if(t.ODBCdotTable&&E.match(/^[\w\d_]+/)){return"variable-2"}}
90else{if(n.test(B)){E.eatWhile(n);return"operator"}else{if(q.test(B)){return"bracket"}else{if(l.test(B)){E.eatWhile(l);return"punctuation"}else{if(B=="{"&&(E.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||E.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/))){return"number"}else{E.eatWhile(/^[_\w\d]/);var D=E.current().toLowerCase();if(r.hasOwnProperty(D)&&(E.match(/^( )+'[^']*'/)||E.match(/^( )+"[^"]*"/))){return"number"}if(j.hasOwnProperty(D)){return"atom"}if(y.hasOwnProperty(D)){return"builtin"}if(s.hasOwnProperty(D)){return"keyword"}if(k.hasOwnProperty(D)){return"string-2"}return null}}}}}}}}}}}}}}}}function o(A,B){return function(F,D){var E=false,C;while((C=F.next())!=null){if(C==A&&!E){D.tokenize=z;break}E=(v||B)&&!E&&C=="\\"}return"string"}}function u(A){return function(D,C){var B=D.match(/^.*?(\/\*|\*\/)/);if(!B){D.skipToEnd()}else{if(B[1]=="/*"){C.tokenize=u(A+1)}else{if(A>1){C.tokenize=u(A-1)}else{C.tokenize=z}}}return"comment"}}function m(C,B,A){B.context={prev:B.context,indent:C.indentation(),col:C.column(),type:A}}function w(A){A.indent=A.context.indent;A.context=A.context.prev}return{startState:function(){return{tokenize:z,context:null}},token:function(D,C){if(D.sol()){if(C.context&&C.context.align==null){C.context.align=false}}if(C.tokenize==z&&D.eatSpace()){return null}var B=C.tokenize(D,C);if(B=="comment"){return B}if(C.context&&C.context.align==null){C.context.align=true}var A=D.current();if(A=="("){m(D,C,")")}else{if(A=="["){m(D,C,"]")}else{if(C.context&&C.context.type==A){w(C)}}}return B},indent:function(D,B){var A=D.context;if(!A){return c.Pass}var C=B.charAt(0)==A.type;if(A.align){return A.col+(C?0:1)}else{return A.indent+(C?0:x.indentUnit)}},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:t.commentSlashSlash?"//":t.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});function b(j){var i;while((i=j.next())!=null){if(i=="`"&&!j.eat("`")){return"variable-2"}}j.backUp(j.current().length-1);return j.eatWhile(/\w/)?"variable-2":null}function f(j){var i;while((i=j.next())!=null){if(i=='"'&&!j.eat('"')){return"variable-2"}}j.backUp(j.current().length-1);return j.eatWhile(/\w/)?"variable-2":null}function a(i){if(i.eat("@")){i.match(/^session\./);i.match(/^local\./);i.match(/^global\./)}if(i.eat("'")){i.match(/^.*'/);return"variable-2"}else{if(i.eat('"')){i.match(/^.*"/);return"variable-2"}else{if(i.eat("`")){i.match(/^.*`/);return"variable-2"}else{if(i.match(/^[0-9a-zA-Z$\.\_]+/)){return"variable-2"}}}}return null}function e(i){if(i.eat("N")){return"atom"}return i.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var g="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function h(m){var k={},l=m.split(" ");for(var j=0;j<l.length;++j){k[l[j]]=true}return k}var d="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";c.defineMIME("text/x-sql",{name:"sql",keywords:h(g+"begin"),builtin:h(d),atoms:h("false true null unknown"),dateSQL:h("date time timestamp"),support:h("ODBCdotTable doubleQuote binaryNumber hexNumber")});c.defineMIME("text/x-mssql",{name:"sql",client:h("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:h(g+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:h("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:h("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:false,dateSQL:h("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":a}});c.defineMIME("text/x-mysql",{name:"sql",client:h("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:h(g+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_
90statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:h("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:h("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:h("date time timestamp"),support:h("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":a,"`":b,"\\":e}});c.defineMIME("text/x-mariadb",{name:"sql",client:h("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:h(g+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:h("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:h("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:h("date time timestamp"),support:h("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nChar
90Cast charsetCast commentHash commentSpaceRequired"),hooks:{"@":a,"`":b,"\\":e}});c.defineMIME("text/x-sqlite",{name:"sql",client:h("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:h(g+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:h("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:h("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:h("date time timestamp datetime"),support:h("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":a,":":a,"?":a,"$":a,'"':f,"`":b}});c.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:h("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:h("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:h("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:h("commentSlashSlash decimallessFloat"),hooks:{}});c.defineMIME("text/x-plsql",{name:"sql",client:h("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:h("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:h("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:h("date time timestamp"),support:h("doubleQuote nChar
90Cast zerolessFloat binaryNumber hexNumber")});c.defineMIME("text/x-hive",{name:"sql",keywords:h("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:h("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:h("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:h("date timestamp"),support:h("ODBCdotTable doubleQuote binaryNumber hexNumber")});c.defineMIME("text/x-pgsql",{name:"sql",client:h("source"),keywords:h(g
vendor: 7,038 bytes, line 90
90+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:
90h("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:h("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:false,dateSQL:h("date time timestamp"),support:h("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")});c.defineMIME("text/x-gql",{name:"sql",keywords:h("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:h("false true"),builtin:h("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/});c.defineMIME("text/x-gpsql",{name:"sql",client:h("source"),keywords:h("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlseri
90alize year yes zone"),builtin:h("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:h("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:h("date time timestamp"),support:h("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")});c.defineMIME("text/x-sparksql",{name:"sql",keywords:h("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:h("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:h("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:h("date time timestamp"),support:h("ODBCdotTable doubleQuote zerolessFloat")});c.defineMIME("text/x-esper",{name:"sql",client:h("source"),keywords:h("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:h("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:h("time"),support:h("decimallessFloat zerolessFloat binaryNumber hexNumber")})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div
90:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,allowMissingTagName:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{if(z.allowMissingTagName&&C=="endTag"){h="tag bracket";return e(C,E,D)}else{h="error";return d}}}
90function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{if(z.allowMissingTagName&&D=="endTag"){h="tag bracket";return u(D,F,E)}else{h="error";return B}}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/<!\[CDATA\[/.test(D)){return 0}var C=D&&/^<(\/)?([\w_:\.-]*)/.exec(D);if(C&&C[1]){while(F){if(F.tagName==C[2]){F=F.prev;break}else{if(z.implicitlyClosed.hasOwnProperty(F.tagName)){F=F.prev}else{break}}}}else{if(C){while(F){var E=z.contextGrabbers[F.tagName];if(E&&E.hasOwnProperty(C[2])){F=F.prev}else{break}}}}while(F&&F.prev&&!F.startOfLine){F=F.prev}if(F){return F.indent+r}else{return H.baseIndent||0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}},xmlCurrentTag:function(C){return C.tagName?{name:C.tagName,close:C.type=="closeTag"}:null},xmlCurrentContext:function(E){var D=[];for(var C=E.context;C;C=C.prev){if(C.tagName){D.push(C.tagName)}}return D.reverse()}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(e){var c=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8);var i=e.Pos;var a={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function d(j){return j&&j.bracketRegex||/[(){}[\]]/}function f(q,n,k){var t=q.getLineHandle(n.line),p=n.ch-1;var m=k&&k.afterCursor;if(m==null){m=/(^| )cm-fat-cursor($| )/.test(q.getWrapperElement().className)}var r=d(k);var o=(!m&&p>=0&&r.test(t.text.charAt(p))&&a[t.text.charAt(p)])||r.test(t.text.charAt(p+1))&&a[t.text.charAt(++p)];if(!o){return null}var l=o.charAt(1)==">"?1:-1;if(k&&k.strict&&(l>0)!=(p==n.ch)){return null}var j=q.getTokenTypeAt(i(n.line,p+1));var s=g(q,i(n.line,p+(l>0?1:0)),l,j||null,k);if(s==null){return null}return{from:i(n.line,p),to:s&&s.pos,match:s&&s.ch==o.charAt(0),forward:l>0}}function g(w,r,n,k,m){var l=(m&&m.maxScanLineLength)||10000;var t=(m&&m.maxScanLines)||1000;var v=[];var x=d(m);var q=n>0?Math.min(r.line+t,w.lastLine()+1):Math.max(w.firstLine()-1,r.line-t);for(var o=r.line;o!=q;o+=n){var y=w.getLine(o);if(!y){continue}var u=n>0?0:y.length-1,p=n>0?y.length:-1;if(y.length>l){continue}if(o==r.line){u=r.ch-(n<0?1:0)}for(;u!=p;u+=n){var j=y.charAt(u);if(x.test(j)&&(k===undefined||w.getTokenTypeAt(i(o,u+1))==k)){var s=a[j];if(s&&(s.charAt(1)==">")==(n>0)){v.push(j)}else{if(!v.length){return{pos:i(o,u),ch:j}}else{v.pop()}}}}}return o-n==(n>0?w.lastLine():w.firstLine())?false:null}function b(s,n,m){var k=s.state.matchBrackets.maxHighlightLineLength||1000;var r=[],l=s.listSelections();for(var o=0;o<l.length;o++){var q=l[o].empty()&&f(s,l[o].head,m);if(q&&s.getLine(q.from.line).length<=k){var j=q.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";r.push(s.markText(q.from,i(q.from.line,q.from.ch+1),{className:j}));if(q.to&&s.getLine(q.to.line).length<=k){r.push(s.markText(q.to,i(q.to.line,q.to.ch+1),{className:j}))}}}if(r.length){if(c&&s.state.focused){s.focus()}var p=function(){s.operation(function(){for(var t=0;t<r.length;t++){r[t].clear()}})};if(n){setTimeout(p,800)}else{return p}}}function h(j){j.operation(function(){if(j.state.matchBrackets.currentlyHighlighted){j.state.matchBrackets.currentlyHighlighted();j.state.matchBrackets.currentlyHighlighted=null}j.state.matchBrackets.currentlyHighlighted=b(j,false,j.state.matchBrackets)})}e.defineOption("matchBrackets",false,function(j,l,k){if(k&&k!=e.Init){j.off("cursorActivity",h);if(j.state.matchBrackets&&j.state.matchBrackets.currentlyHighlighted){j.state.matchBrackets.currentlyHighlighted();j.state.matchBrackets.currentlyHighlighted=null}}if(l){j.state.matchBrackets=typeof l=="object"?l:{};j.on("cursorActivity",h)}});e.defineExtension("matchBrackets",function(){b(this,true)});e.defineExtension("findMatchingBracket",function(l,k,j){if(j||typeof k=="boolean"){if(!j){k=k?{strict:true}:null}else{j.strict=k;k=j}}return f(this,l,k)});e.defineExtension("scanForBracket",function(m,k,l,j){return g(this,m,k,l,j)})});
90(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(c){var h="CodeMirror-activeline";var g="CodeMirror-activeline-background";var f="CodeMirror-activeline-gutter";c.defineOption("styleActiveLine",false,function(i,l,j){var k=j==c.Init?false:j;if(l==k){return}if(k){i.off("beforeSelectionChange",b);d(i);delete i.state.activeLines}if(l){i.state.activeLines=[];e(i,i.listSelections());i.on("beforeSelectionChange",b)}});function d(j){for(var k=0;k<j.state.activeLines.length;k++){j.removeLineClass(j.state.activeLines[k],"wrap",h);j.removeLineClass(j.state.activeLines[k],"background",g);j.removeLineClass(j.state.activeLines[k],"gutter",f)}}function a(k,j){if(k.length!=j.length){return false}for(var l=0;l<k.length;l++){if(k[l]!=j[l]){return false}}return true}function e(j,l){var p=[];for(var n=0;n<l.length;n++){var m=l[n];var o=j.getOption("styleActiveLine");if(typeof o=="object"&&o.nonEmpty?m.anchor.line!=m.head.line:!m.empty()){continue}var k=j.getLineHandleVisualStart(m.head.line);if(p[p.length-1]!=k){p.push(k)}}if(a(j.state.activeLines,p)){return}j.operation(function(){d(j);for(var q=0;q<p.length;q++){j.addLineClass(p[q],"wrap",h);j.addLineClass(p[q],"background",g);j.addLineClass(p[q],"gutter",f)}j.state.activeLines=p})}function b(i,j){e(i,j.ranges)}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineOption("fullScreen",false,function(d,f,e){if(e==a.Init){e=false}if(!e==!f){return}if(f){b(d)}else{c(d)}});function b(d){var e=d.getWrapperElement();d.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:e.style.width,height:e.style.height};e.style.width="";e.style.height="auto";e.className+=" CodeMirror-fullscreen";document.documentElement.style.overflow="hidden";d.refresh()}function c(d){var e=d.getWrapperElement();e.className=e.className.replace(/\s*CodeMirror-fullscreen\b/,"");document.documentElement.style.overflow="";var f=d.state.fullScreenRestore;e.style.width=f.width;e.style.height=f.height;window.scrollTo(f.scrollLeft,f.scrollTop);d.refresh()}});if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c,d){for(var b=(d||0),a=this.length;b<a;++b){if(this[b]===c){return b}}return -1}}if(!String.prototype.startsWith){String.prototype.startsWith=function(a){return this.indexOf(a)===0}}if(!String.prototype.trim){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}}if(!String.prototype.endsWith){String.prototype.endsWith=function(a){return this.length>=a.length&&this.substr(this.length-a.length)===a}}if(!Array.prototype.forEach){Array.prototype.forEach=function(f){var c,b;if(this==null){throw new TypeError("this is null or not defined")}var e=Object(this);var a=e.length>>>0;if(typeof f!=="function"){throw new TypeError(f+" is not a function")}if(arguments.length>1){c=arguments[1]}b=0;while(b<a){var d;if(b in e){d=e[b];f.call(c,d,b,e)}b++}}}if(!Array.prototype.map){Array.prototype.map=function(h){var d,b,c;if(this==null){throw new TypeError("this is null or not defined")}var g=Object(this);var a=g.length>>>0;if(typeof h!=="function"){throw new TypeError(h+" is not a function")}if(arguments.length>1){d=arguments[1]}b=new Array(a);c=0;while(c<a){var f,e;if(c in g){f=g[c];e=h.call(d,f,c,g);b[c]=e}c++}return b}}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function(d,e){if(this==null){throw new TypeError('"this" is null or not defined')}var f=Object(this);var a=f.length>>>0;if(a===0){return false}var g=e|0;var c=Math.max(g>=0?g:a-Math.abs(g),0);function b(h,i){return h===i||(typeof h==="number"&&typeof i==="number"&&isNaN(h)&&isNaN(i))}while(c<a){if(b(f[c],d)){return true}c++}return false}})}if(window.FileReader&&Uint8Array&&!FileReader.prototype.readAsBinaryString){FileReader.prototype.readAsBinaryString=function(b){var d="";var c=this;var a=new FileReader();a.onload=function(j){var f=new Uint8Array(a.result);var h=f.byteLength;for(var g=0;g<h;g++){d+=String.fromCharCode(f[g])}c.content=d;c.onload()};a.readAsArrayBuffer(b)}}window.nextact=window.nextact||function(a){return function(){WebPlatform.delay(50,function(){window.location.href=b64DecodeUnicode(a)})}};function b64EncodeUnicode(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(b,c){return String.fromCharCode("0x"+c)}))}function b64DecodeUnicode(a){return decodeURIComponent(atob(a).split("").map(function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var toggleDisplay=function(c,a,b){if(b){c[a?"slideDown":"slideUp"]("fast")}else{c[a?"removeClass":"addClass"]("none")}return c};var STORE_PRODUCT_TYPE={PHYSICAL_PRODUCT:"physical",DIGITAL_PRODUCT:"digital",SERVICE:"service",MEMBERSHIP:"membership"};var COUNTRY_CODES=["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","CV","KH","CM","CA","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","EL","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"];var STATES={US:["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","District of Columbia","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","N
90orth Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"],CA:["Alberta","British Columbia","Manitoba","New Brunswick","Newfoundland and Labrador","Northwest Territories","Nova Scotia","Nunavut","Ontario","Prince Edward Island","Quebec","Saskatchewan","Yukon"],NG:["Abia","Abuja","Adamawa","Akwa Ibom","Anambra","Bauchi","Bayelsa","Benue","Borno","Cross River","Delta","Ebonyi","Enugu","Edo","Ekiti","Gombe","Imo","Jigawa","Kaduna","Kano","Katsina","Kebbi","Kogi","Kwara","Lagos","Nasarawa","Niger","Ogun","Ondo","Osun","Oyo","Plateau","Rivers","Sokoto","Taraba","Yobe","Zamfara"],DZ:["Adrar","Chlef","Laghouat","Oum el-Bouaghi","Batna","Béjaïa","Biskra","Béchar","Blida","Bouïra","Tamanghasset","Tébessa","Tlemcen","Tiaret","Tizi Ouzou","Algiers","Djelfa","Jijel","Sétif","Saïda","Skikda","Sidi Bel Abbès","Annaba","Guelma","Constantine","Médéa","Mostaganem","M'sila","Mascara","Ouargla","Oran","El Bayadh","Illizi","Bordj Bou Arréridj","Boumerdès","El Taref","Tindouf","Tissemsilt","El Oued","Khenchela","Souk Ahras","Tipaza","Mila","Aïn Defla","Naâma","Aïn Témouchent","Ghardaïa","Relizane","Algérie"]};var STATES_ISO={US:[{code:"AL",name:"Alabama"},{code:"AK",name:"Alaska"},{code:"AZ",name:"Arizona"},{code:"AR",name:"Arkansas"},{code:"CA",name:"California"},{code:"CO",name:"Colorado"},{code:"CT",name:"Connecticut"},{code:"DE",name:"Delaware"},{code:"DC",name:"District of Columbia"},{code:"FL",name:"Florida"},{code:"GA",name:"Georgia"},{code:"HI",name:"Hawaii"},{code:"ID",name:"Idaho"},{code:"IL",name:"Illinois"},{code:"IN",name:"Indiana"},{code:"IA",name:"Iowa"},{code:"KS",name:"Kansas"},{code:"KY",name:"Kentucky"},{code:"LA",name:"Louisiana"},{code:"ME",name:"Maine"},{code:"MD",name:"Maryland"},{code:"MA",name:"Massachusetts"},{code:"MI",name:"Michigan"},{code:"MN",name:"Minnesota"},{code:"MS",name:"Mississippi"},{code:"MO",name:"Missouri"},{code:"MT",name:"Montana"},{code:"NE",name:"Nebraska"},{code:"NV",name:"Nevada"},{code:"NH",name:"New Hampshire"},{code:"NJ",name:"New Jersey"},{code:"NM",name:"New Mexico"},{code:"NY",name:"New York"},{code:"NC",name:"North Carolina"},{code:"ND",name:"North Dakota"},{code:"OH",name:"Ohio"},{code:"OK",name:"Oklahoma"},{code:"OR",name:"Oregon"},{code:"PA",name:"Pennsylvania"},{code:"RI",name:"Rhode Island"},{code:"SC",name:"South Carolina"},{code:"SD",name:"South Dakota"},{code:"TN",name:"Tennessee"},{code:"TX",name:"Texas"},{code:"UT",name:"Utah"},{code:"VA",name:"Virginia"},{code:"VT",name:"Vermont"},{code:"WA",name:"Washington"},{code:"WI",name:"Wisconsin"},{code:"WV",name:"West Virginia"},{code:"WY",name:"Wyoming"}],CA:[{code:"AB",name:"Alberta"},{code:"BC",name:"British Columbia"},{code:"MB",name:"Manitoba"},{code:"NB",name:"New Brunswick"},{code:"NL",name:"Newfoundland"},{code:"NT",name:"Northwest Territories"},{code:"NS",name:"Nova Scotia"},{code:"NU",name:"Nunavut"},{code:"ON",name:"Ontario"},{code:"PE",name:"Prince Edward Island"},{code:"QC",name:"Quebec"},{code:"SK",name:"Saskatchewan"},{code:"YT",name:"Yukon"}]};var dummy=function(){};var isUndefined=function(a){return typeof a==="undefined"};var isFunction=function(a){return typeof a==="function"};if(!window.mergeUnique){function mergeUnique(e,d,f,c){var a=c===true?$.extend({},e):e;for(var b in d){if(isUndefined(a[b])||(a[b]===""&&!b.endsWith("Class"))||(f===true&&a[b]===null)){a[b]=d[b]}}return a}}var Log=Log||console||{};Log.error=Log.error||dummy;Log.log=Log.log||dummy;Log.info=Log.info||dummy;function getThumbnailsFromBase(d,a,c){var b=c===false?"":content;return b+d+"thumbnails/"+a+"/"}function getFileFromBase(c,b){var a=b===false?"":content;return a+c+"uploads/"}function extend(c,b){for(var a in b){if(b.hasOwnProperty(a)&&isUndefined(c[a])){c[a]=b[a]}}}window.WebPlatform=window.WebPlatform||{};window.Simvoly=window.WebPlatform;if(!WebPlatform.onReady){WebPlatform.documentReadyRequests=[];WebPlatform.onReady=function(a){if(WebPlatform.documentReadyRequests===null){a()}else{WebPlatform.documentReadyRequests.push(a)}}}extend(WebPlatform,{_htmlSpecialChars:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},removeDiacritics:function(d,a){d=d+"";var b=[{base:"A",letters:/[\u0391\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0392\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0394\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0397\u0395\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u03A6\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0393\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u03A7\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0399\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u039A\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u039B\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u014
901\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u039C\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u039D\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u039F\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\u03A9\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u03A0\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u03A1\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u03A3\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u03A4\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TH",letters:/[\u0398]/g},{base:"TZ",letters:/[\uA728]/g},{base:"PS",letters:/[\u03A8]/g},{base:"SH",letters:/[]/g},{base:"SHT",letters:/[]/g},{base:"U",letters:/[\u03A5\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u039E\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[ѝ\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u0396\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[ა\u03B1\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[ბ\u03B2\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[დ\u03B4\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[ძ\u01F3\u01C6]/g},{base:"e",letters:/[ე\u03B7\u03B5\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u03C6\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[გ\u03B3\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[ჰ\u03C7\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[იѝ\u03B9\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[ჯ\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[ქკ\u03BA\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[ლ\u03BB\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[მ\u03BC\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[ნ\u03BD\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[ო\u03BF\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u
901ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\u03C9\uA74F]/g},{base:"p",letters:/[ფპ\u03C0\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[ყ\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[რ\u03C1\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[ს\u03C2\u03C3\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[თტ\u03C4\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"th",letters:/[\u03B8]/g},{base:"tz",letters:/[\uA729]/g},{base:"ts",letters:/[წც]/g},{base:"kh",letters:/[ხ]/g},{base:"sh",letters:/[შ]/g},{base:"ch",letters:/[ჭჩ]/g},{base:"sh",letters:/[\u03C8]/g},{base:"sht",letters:/[]/g},{base:"zh",letters:/[ჟ]/g},{base:"gh",letters:/[ღ]/g},{base:"u",letters:/[უ\u03C5\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[ვ\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u03BE\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[ზ\u03B6\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}];for(var c=0;c<b.length;c++){d=d.replace(b[c].letters,b[c].base)}if(a===true){d=d.replace(/\u0401/g,"YO").replace(/\u0419/g,"I").replace(/\u0426/g,"TS").replace(/\u0423/g,"U").replace(/\u041A/g,"K").replace(/\u0415/g,"E").replace(/\u041D/g,"N").replace(/\u0413/g,"G").replace(/\u0428/g,"SH").replace(/\u0429/g,"SCH").replace(/\u0417/g,"Z").replace(/\u0425/g,"H").replace(/\u042A/g,"").replace(/\u0451/g,"yo").replace(/\u0439/g,"i").replace(/\u0446/g,"ts").replace(/\u0443/g,"u").replace(/\u043A/g,"k").replace(/\u0435/g,"e").replace(/\u043D/g,"n").replace(/\u0433/g,"g").replace(/\u0448/g,"sh").replace(/\u0449/g,"sch").replace(/\u0437/g,"z").replace(/\u0445/g,"h").replace(/\u044A/g,"'").replace(/\u0424/g,"F").replace(/\u042B/g,"I").replace(/\u0412/g,"V").replace(/\u0410/g,"a").replace(/\u041F/g,"P").replace(/\u0420/g,"R").replace(/\u041E/g,"O").replace(/\u041B/g,"L").replace(/\u0414/g,"D").replace(/\u0416/g,"ZH").replace(/\u042D/g,"E").replace(/\u0444/g,"f").replace(/\u044B/g,"i").replace(/\u0432/g,"v").replace(/\u0430/g,"a").replace(/\u043F/g,"p").replace(/\u0440/g,"r").replace(/\u043E/g,"o").replace(/\u043B/g,"l").replace(/\u0434/g,"d").replace(/\u0436/g,"zh").replace(/\u044D/g,"e").replace(/\u042F/g,"Ya").replace(/\u0427/g,"CH").replace(/\u0421/g,"S").replace(/\u041C/g,"M").replace(/\u0418/g,"I").replace(/\u0422/g,"T").replace(/\u042C/g,"'").replace(/\u0411/g,"B").replace(/\u042E/g,"YU").replace(/\u044F/g,"ya").replace(/\u0447/g,"ch").replace(/\u0441/g,"s").replace(/\u043C/g,"m").replace(/\u0438/g,"i").replace(/\u0442/g,"t").replace(/\u044C/g,"'").replace(/\u0431/g,"b").replace(/\u044E/g,"yu")}return d},preventDefault:function(a){a.stopPropagation();a.preventDefault();return false},escapeHtml:function(a){return String(a).replace(/[&<>"']/g,function(b){return WebPlatform._htmlSpecialChars[b]})},tick:function(){return new Date().getTime()%100000000},random:function(a){return Math.floor(Math.random()*a)},equals:function(c,a){if(c===a){return true}for(var b in c){if(isUndefined(a[b])||c[b]!==a[b]){return false}}for(var b in a){if(isUndefined(c[b])||c[b]!==a[b]){return false}}return true},addrToStr:function(c,b){var a="";if(c){a=WebPlatform.escapeHtml(c)}if(b.phone){a+=(a===""?"":", ")+WebPlatform.escapeHtml(b.phone)}if(a){a+="<br />"}if(b.companyName){a+=WebPlatform.escapeHtml(b.companyName)+"<br />"}if(b.companyName&&b.companyId){a+=WebPlatform.escapeHtml(b.companyId)+"<br />"}if(b.city||b.address||b.state||b.zipCode){if(b.address){a+=WebPlatform.escapeHtml(b.address)+"<br />"}if(b.address2){a+=WebPlatform.escapeHtml(b.address2)+"<br />"}if(b.city){a+=WebPlatform.escapeHtml(b.city)+"<br />"}if(b.state){a+=WebPlatform.escapeHtml(b.state)}if(b.zipCode){a+=(b.state?", ":"")+WebPlatform.escapeHtml(b.zipCode)}
90if(b.state||b.zipCode){a+="<br />"}if(b.country){a+=((COUNTRIES?COUNTRIES[COUNTRY_CODES.indexOf(b.country)]:b.country)||"")}}return a},ddmmyyStringToDate:function(b){b=$.trim(b||"");if(b===""){return null}var a=b.split("/");return new Date(WebPlatform.parse(a[2],2016),WebPlatform.parse(a[1],1)-1,WebPlatform.parse(a[0],1))},yyyymmddStringToDate:function(b){b=$.trim(b||"");if(b===""){return null}var a=b.split("-");return new Date(WebPlatform.parse(a[0],2020),WebPlatform.parse(a[1],1)-1,WebPlatform.parse(a[2],1))},mmddyyStringToDate:function(b){b=$.trim(b||"");if(b===""){return null}var a=b.split("/");return new Date(WebPlatform.parse(a[2],2016),WebPlatform.parse(a[0],1)-1,WebPlatform.parse(a[1],1))},ukDateTimeStringToDate:function(a){a=$.trim(a||"");if(a===""){return null}var h=a.split(" ");if(h.length<2){return null}var i=h[0];var e=h[1];if(!e){return null}var f=e.split(":");if(f.length<2){return null}var d=WebPlatform.parse(f[0],0);var c=WebPlatform.parse(f[1],0);var g=f.length>2?WebPlatform.parse(f[2],0):0;var b=WebPlatform.ddmmyyStringToDate(i);if(b===null){return null}b.setHours(d,c,g);return b},capitalizeFirstLetter:function(a){if(a.length===0){return a}return a.charAt(0).toUpperCase()+a.slice(1)},usDateTimeStringToDate:function(a){a=$.trim(a||"");if(a===""){return null}var i=a.split(" ");if(i.length<3){return null}var j=i[0];var e=i[1];var f=i[2].toUpperCase()==="AM";if(!e){return null}var g=e.split(":");if(g.length<2){return null}var d=WebPlatform.parse(g[0],0);var c=WebPlatform.parse(g[1],0);var h=g.length>2?WebPlatform.parse(g[2],0):0;if(!f&&d<12){d=d+12}if(f&&d===12){d=0}var b=WebPlatform.mmddyyStringToDate(j);if(b===null){return null}b.setHours(d,c,h);return b},ddmmyyyyDateToStrWithMonth:function(b,f,a){var d=WebPlatform.ddmmyyStringToDate(b);var h=[WebPlatform.Phrases["label.january"],WebPlatform.Phrases["label.february"],WebPlatform.Phrases["label.march"],WebPlatform.Phrases["label.april"],WebPlatform.Phrases["label.may"],WebPlatform.Phrases["label.june"],WebPlatform.Phrases["label.july"],WebPlatform.Phrases["label.august"],WebPlatform.Phrases["label.september"],WebPlatform.Phrases["label.october"],WebPlatform.Phrases["label.november"],WebPlatform.Phrases["label.december"]];var g=d.getDate();var c=d.getMonth();var e=d.getFullYear();if(f===true){return g+" "+h[c]+(a!==false?(", "+e):"")}return h[c]+" "+g+(a!==false?(", "+e):"")},yyyymmddDateToStrWithMonth:function(d,f,a){var c=WebPlatform.yyyymmddStringToDate(d);var h=[WebPlatform.Phrases["label.january"],WebPlatform.Phrases["label.february"],WebPlatform.Phrases["label.march"],WebPlatform.Phrases["label.april"],WebPlatform.Phrases["label.may"],WebPlatform.Phrases["label.june"],WebPlatform.Phrases["label.july"],WebPlatform.Phrases["label.august"],WebPlatform.Phrases["label.september"],WebPlatform.Phrases["label.october"],WebPlatform.Phrases["label.november"],WebPlatform.Phrases["label.december"]];var g=c.getDate();var b=c.getMonth();var e=c.getFullYear();if(f===true){return g+" "+h[b]+(a!==false?(", "+e):"")}return h[b]+" "+g+(a!==false?(", "+e):"")},isTouchSupported:function(){return !!("ontouchstart" in window||navigator.maxTouchPoints||navigator.msMaxTouchPoints)},intersect:function(g,c,f,d){f=f===true;d=d||dummy;var b=[];for(var a=0;a<g.length;++a){var h=g[a];for(var e=0;e<c.length;++e){if(d(h,c[e])===true){b.push(f?h:c[e]);break}}}return b},hexToRgba:function(d,c){c=c||0;if(d.indexOf("#")!==0){return d}var b=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;d=d.replace(b,function(f,i,h,e){return i+i+h+h+e+e});var a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(d);if(a){return"rgba("+parseInt(a[1],16)+", "+parseInt(a[2],16)+", "+parseInt(a[3],16)+", "+c+")"}return d},transitionsSupported:function(){var a=(document.body||document.documentElement).style;return a.transition!==undefined||a.WebkitTransition!==undefined||a.MozTransition!==undefined||a.MsTransition!==undefined||a.OTransition!==undefined}(),onTransitionEnd:function(b,c,a){a=a||300;if(WebPlatform.transitionsSupported){b.on("webkitTransitionEnd.trans mozTransitionend.trans oTransitionEnd.trans msTransitionEnd.trans transitionend.trans",function(){b.off(".trans");c()})}else{WebPlatform.delay(a,c)}},onAnimationEnd:function(b,c,a){if(WebPlatform.transitionsSupported){b.on("webkitAnimationEnd.trans mozAnimationEnd.trans oAnimationEnd.trans msAnimationEnd.trans animationend.trans",function(){b.off(".trans");c()})}else{WebPlatform.delay(a||50,c)}}
90,clearDelay:function(a){if(a!==null){clearTimeout(a)}},getCookieName:function(a){return"wplatform-"+a},delay:function(a,b){return setTimeout(b,a)},onImagesLoaded:function(b,a){b.waitForImages(a)},showClientError:function(a,b){b=b||3000;var c=$('<div class="live-theme-message">'+a+"</div>");c.appendTo(".theme");WebPlatform.delay(50,function(){c.addClass("show-message");WebPlatform.delay(b,function(){WebPlatform.onTransitionEnd(c,function(){c.remove()},300);c.removeClass("show-message")})})},showClientMessage:function(a,b){b=b||3000;var c=$('<div class="live-theme-message info-message">'+a+"</div>");c.appendTo(".theme");WebPlatform.delay(50,function(){c.addClass("show-message");WebPlatform.delay(b,function(){WebPlatform.onTransitionEnd(c,function(){c.remove()},300);c.removeClass("show-message")})})},parse:function(c,a,b){b=b===true;a=a||0;c=parseInt(c,10);if(isNaN(c)){c=a}if(!b&&c<0){return a}return c},sharePage:function(c,e,d){var a=d||window.location.href;if(a.indexOf("?")>=0){a+="&_share="+WebPlatform.tick()}
90else{a+="?_share="+WebPlatform.tick()}var b=encodeURIComponent(a);var f=encodeURIComponent(document.title);if(c==="facebook"){window.open("https://www.facebook.com/sharer/sharer.php?u="+b,"_blank","width=600, height=600")}else{if(c==="google-plus"){window.open("https://plus.google.com/share?url="+b,"_blank","width=500, height=600")}else{if(c==="twitter"){window.open("https://twitter.com/intent/tweet?url="+b,"_blank","width=500, height=300")}else{if(c==="linkedin"){window.open("https://www.linkedin.com/shareArticle?mini=true&url="+b+"&title="+f,"_blank","width=500, height=300")}else{if(c==="tumblr"){window.open("http://www.tumblr.com/share/link?url="+b,"_blank","width=500, height=300")}else{if(c==="pinterest"){window.open("https://www.pinterest.com/pin/create/button/?url="+b,"_blank","width=800, height=500")}else{if($.trim(e)!==""){e=encodeURIComponent($.trim(e));window.open(e)}}}}}}}},makeClientWebsiteRequestWithFile:function(f,b){if(b){mergeUnique(f,{url:"",data:{},onOk:dummy,action:"Invalid Action!",method:"getJSON",onRequestError:function(i,h,g){Log.log(g);WebPlatform.showClientError(g)},_onNotOk:function(g){Log.error("Action: "+f.action);WebPlatform.showClientError(g.message)},always:dummy});f.onNotOk=f.onNotOk||f._onNotOk;var e={action:f.action,_csrfToken:WebPlatform.getCSRFToken(),r:Math.random()};mergeUnique(e,f.data);var d=new FormData();if(!$.isArray(b)){b=[b]}b.forEach(function(h,g){d.append("_file_"+(g>0?g:""),h);d.append("_file_name_"+(g>0?g:""),h.name||"")});d.append("_has_file_",true);d.append("_file_number",b.length);for(var a in e){var c=e[a];if($.isArray(c)){c=JSON.stringify(c)}d.append(a,c)}$.ajax({url:"/clientRequestHandler/"+f.url,type:"POST",data:d,cache:false,contentType:false,processData:false},"json").done(function(g){if(g.ok){f.onOk(g)}else{if(isUndefined(g.ok)){Log.error("Response doesn't include status infurmation! {ok: true}");Log.error(g)}f.onNotOk(g)}}).fail(f.onRequestError).always(f.always)}else{WebPlatform.makeClientWebsiteRequest(f)}},makeClientWebsiteRequest:function(c){mergeUnique(c,{url:"",data:{},onOk:dummy,action:"Invalid Action!",method:"getJSON",onRequestError:function(f,e,d){Log.log(d);WebPlatform.showClientError(d)},_onNotOk:function(d){Log.error("Action: "+c.action);WebPlatform.showClientError(d.message)},always:dummy});c.onNotOk=c.onNotOk||c._onNotOk;var b={action:c.action,_csrfToken:WebPlatform.getCSRFToken(),r:Math.random()};mergeUnique(b,c.data);var a=c.method==="getJSON"?$.getJSON:(c.method==="post"?$.post:$.get);a("/clientRequestHandler/"+c.url,b).done(function(d){if(d.ok){c.onOk(d)}else{if(isUndefined(d.ok)){Log.error("Response doesn't include status infurmation! {ok: true}");Log.error(d)}c.onNotOk(d)}}).fail(c.onRequestError).always(c.always)},format:function(){var b=arguments;if((b.length%2)!==1){throw"Invalid number of arguments! Usage: format(formatString, key, value, key, value...)"}var a=b[0];for(var c=1;c<b.length;c+=2){var d=new RegExp("%"+b[c]+"%","g");a=a.replace(d,b[c+1])}return a},escapeFormat:function(){var b=arguments;if((b.length%2)!==1){throw"Invalid number of arguments! Usage: format(formatString, key, value, key, value...)"}var a=b[0];for(var c=1;c<b.length;c+=2){var d=new RegExp("%"+b[c]+"%","g");a=a.replace(d,WebPlatform.escapeHtml(b[c+1]))}return a},isMobile:function(){return $window.width()<=1024},removeLightbox:function(a){if(!isUndefined(window.TmdpLightbox)){TmdpLightbox.removeLightbox(a)}},refreshInlineGallery:function(b){if(!$.tosrus){return}b.removeClass("none");var d={autoplay:{play:b.data("autoplay")!==false,pauseOnHover:b.data("pauseonhover")===true,timeout:b.data("timeout")||4000},slides:{scale:b.data("scale")||"fill"},buttons:{prev:b.data("arrows")!==false,next:b.data("arrows")!==false},pagination:{add:b.data("pagination")===true}};var c=window.innerWidth<768?1:WebPlatform.parse(b.data("items"),1);var e=b.data("width");if(c){d.slides.visible=c}var a=b.data("itemsPerSlide");if(a){d.slides.slide=a}if(e){d.slides.width=e}b.addClass("with-gallery").tosrus(d)},refreshLightboxes:function(a,b){if(!isUndefined(window.TmdpLightbox)){TmdpLightbox.refreshLightboxes(a)}if(b!==true&&$.tosrus){$(".inline-gallery:not(.with-gallery)").each(function(){WebPlatform.refreshInlineGallery($(this))})}},_accumulatedRequests:[],addAccumulatedRequest:function(a){WebPlatform._accumulatedRequests.push({action:a.action||"",params:a.params||{},onOk:a.onOk||dummy})},processAccumulatedRequests:function(){if(WebPlatform._accumulatedRequests.length>0){var b=WebPlatform._accumulatedRequests;var c=[];WebPlatform._accumulatedRequests=[];for(var a=0;a<b.length;
90++a){c.push({action:b[a].action,params:b[a].params})}WebPlatform.makeClientWebsiteRequest({action:"accumulatedRequests",method:"post",data:{requests:JSON.stringify(c)},onOk:function(f){var h=f.data;for(var d=0;d<b.length;++d){var g=h[b[d].action];if(g){try{(b[d].onOk||dummy)(g)}catch(i){Log.error(i)}}}b=null;c=null}})}},parseSimpleShare:function(h,j,g){var i="",e=(g===true)?(h>0):((h&1)===1),c=2,f=4,a=8,d=16;if(g){c=1;f=2;a=4;d=8}j=(j||"").toString();if(e){i+='<div class="sharer">';if(j.indexOf("?")>=0){j+="&_share="+WebPlatform.tick()}else{j+="?_share="+WebPlatform.tick()}var b=encodeURIComponent(j);if((h&c)===c){i+='<a href="javascript: void(0)" class="fb-icon" onclick="window.open(\'https://www.facebook.com/sharer/sharer.php?u='+b+"', '_blank', 'width=600, height=600');\"><i class=\"fa fa-facebook\"></i></a>"}if((h&a)===a){i+='<a href="javascript: void(0)" class="tw-icon" onclick="window.open(\'https://twitter.com/intent/tweet?url='+b+"', '_blank', 'width=500, height=300');\"><i class=\"fa fa-twitter\"></i></a>"}if((h&f)===f){i+='<a href="javascript: void(0)" class="gp-icon" onclick="window.open(\'https://plus.google.com/share?url='+b+"', '_blank', 'width=500, height=600');\"><i class=\"fa fa-google-plus\"></i></a>"}if((h&d)===d){i+='<a href="javascript: void(0)" class="ln-icon" onclick="window.open(\'https://www.linkedin.com/shareArticle?mini=true&url='+b+"', '_blank', 'width=500, height=300');\"><i class=\"fa fa-linkedin\"></i></a>"}i+="</div>"}return i},URL_PARAM_INT:"\\d+",URL_PARAM_ANY:"[^/]+",URL_PARAM_ANY_WITH_EMPTY:"[^/]*",getUrlParameterMap:function(b){b=b||document.location.href;var c=b.indexOf("?");var a=b.indexOf("#");if(a<0){a=b.length}if(c<0||c>=b.length||a<c){return{}}var g=b.substring(c+1,a).split("+").join(" ");var f={},e,d=/[?&]?([^=]+)=([^&]*)/g;while(e=d.exec(g)){f[decodeURIComponent(e[1])]=decodeURIComponent(e[2])}return f},getUrlParameter:function(c,d,a){var f=new RegExp("(/"+d+"/"+a+"$)|(/"+d+"/"+a+"/)","");var b=c.match(f);if(b===null||b.length<1||!b[0]){return""}b=b[0];var e=b.substring(b.indexOf("/",b[0]==="/"?1:0)+1,b.endsWith("/")?b.length-1:b.length);return e},clearUrlParameter:function(b,c,a){var d=new RegExp("(/"+c+"/"+a+"$)|(/"+c+"/"+a+"/)","");return b.replace(d,"/")},getUrlQueryParameter:function(c,d){var g=c.indexOf("?");if(g<0){return""}var b=c.indexOf("#");if(b<0){b=c.length}c=c.substring(g+1,b);var e=c.split("&");for(var a=0;a<e.length;++a){var f=e[a].split("=");if(f[0]===d){return f.length>0?f[1]:""}}return""},tr:function(b,a){return(((b||{})[locale]||{})[a]||a)},cartesianProduct:function(e,h){var d=[],a=e.length-1,g=[],c=false;for(var b=e.length;b--;){g[b]=e[b].length}function f(l){var m=e[l],j=g[l];if(l===a){for(var k=0;k<j;++k){d[l]=m[k];c=h.call(WebPlatform,d)===false;if(c){return}}}else{for(var k=0;k<j;++k){d[l]=m[k];f(l+1);if(c){return}}}d.pop()}f(0)},getRandomString:function(b){var d="";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var c=0;c<b;++c){d+=a.charAt(Math.floor(Math.random()*a.length))}return d},getCSRFToken:function(){var a=Cookies.get("_csrfToken")||null;if(a===null){a=WebPlatform.getRandomString(6)+"-"+WebPlatform.getRandomString(6)+"-"+WebPlatform.getRandomString(6);var b=new Date();b.setTime(b.getTime()+(5*60*1000));var c={expires:b,path:"/"};if(window.location.protocol==="https:"){c.samesite="none";c.secure=true}Cookies.set("_csrfToken",a,c)}return a},shuffle:function(d){var b,a,c;for(c=d.length;c;c--){b=Math.floor(Math.random()*c);a=d[c-1];d[c-1]=d[b];d[b]=a}},getVatRate:function(a){switch(a){case"BE":return 21;case"BG":return 20;case"CZ":return 21;case"DK":return 25;case"DE":return 19;case"EE":return 20;case"GR":return 24;case"ES":return 21;case"FR":return 20;case"HR":return 25;case"IE":return 23;case"IT":return 22;case"CY":return 19;case"LV":return 21;case"LT":return 21;case"LU":return 17;case"HU":return 27;case"MT":return 18;case"NL":return 21;case"AT":return 20;case"PL":return 23;case"PT":return 23;case"RO":return 19;case"SI":return 22;case"SK":return 20;case"FI":return 24;case"SE":return 25;case"GB":case"UK":return 20;case"EL":case"GR":return 24;case"NO":return 25;default:return 0}},currencyWithCodeToStr:function(b,a){switch(a){case"USD":return WebPlatform.currToStr(b,"$",true,a);case"EUR":return WebPlatform.currToStr(b,"€",true,a);case"BGN":return WebPlatform.currToStr(b,"лв",false,a);case"AUD":return WebPlatform.currToStr(b,"$",true,a);case"BRL":return WebPlatform.currToStr(b,"R$",true,a);case"CAD":return WebPlatform.currToStr(b,"$",true,a);case"CHF":return WebPlatform.currToStr(b,"CHF",false,a);case"CZK":return WebPlatform.currToStr(b,"Kč",false,a);case"DKK":return WebPlatform.currToStr(b,"kr",false,a);case"GBP":return WebPlatform.currToStr(b,"£",true,a);case"HKD":return WebPlatform.currToStr(b,"$",true,a);case"HUF":return WebPlatform.currToStr(b,"Ft",false,a);case"ILS":return WebPlatform.currToStr(b,"₪",false,a);case"INR":return WebPlatform.currToStr(b,"₹",true,a);case"JPY":case"CNY":return WebPlatform.currToStr(b,"¥",true,a);case"MXN":return WebPlatform.currToStr(b,"$",true,a);case"MYR":return WebPlatform.currToStr(b,"RM",false,a);case"NOK":return WebPlatform.currToStr(b,"kr",false,a);case"NZD":return WebPlatform.currToStr(b,"NZ$",true,a);case"PHP":return WebPlatform.currToStr(b,"₱",true,a);case"PLN":return WebPlatform.currToStr(b,"zł",false,a);case"RUB":return WebPlatform.currToStr(b,"RUB",false,a);case"SEK":return WebPlatform.currToStr(b,"kr",false,a);case"SGD":return WebPlatform.currToStr(b,"S$",true,a);case"THB":return WebPlatform.currToStr(b,"฿",true,a);case"TWD":return WebPlatform.currToStr(b,"NT$",true,a);case"ZAR":return WebPlatform.currToStr(b,"R",true,a);default:return WebPlatform.currToStr(b,a,false,a)}}
90,hasCents:function(a){if(a===null){return true}switch(a){case"JPY":case"CNY":case"BIF":case"CLP":case"DJF":case"GNF":case"ISK":case"KMF":case"KRW":case"PYG":case"RWF":case"UGX":case"UYI":case"VND":case"VUV":case"XAF":case"XOF":case"XPF":case"COP":case"HUF":return false}return true},getStripeLocale:function(){var a=window.locale||"auto";switch(a){case"pt_BR":return"pt-BR";case"pt_PT":return"pt";case"ar":case"bg":case"cs":case"da":case"de":case"el":case"et":case"en":case"es":case"fi":case"fr":case"he":case"id":case"it":case"ja":case"lt":case"lv":case"ms":case"nb":case"nl":case"pl":case"pt-BR":case"pt":case"ru":case"sk":case"sl":case"sv":case"zh":return a}return"auto"},currToStr:function(e,c,f,a){f=f===true;var b=e<0;if(b){e=-e}var d=e.toFixed?e.toFixed(WebPlatform.hasCents(a)?2:0):(""+e);if(c!==""){d=d.replace(/\B(?=(\d{3})+(?!\d))/g,",")}return(b?"-":"")+(f?(c+d):(d+c))},_requestedResources:[],requestScripts:function(d,b){d=d||[];b=b||dummy;if(d.length===0){b();return}var c=document.getElementsByTagName("script")[0];d.forEach(function(h){var g=false;for(var e=0;e<WebPlatform._requestedResources.length;++e){if(WebPlatform._requestedResources[e]===h.script){g=true;break}}if(!g&&!h.check()){WebPlatform._requestedResources.push(h.script);var f=document.createElement("script");f.type="text/javascript";f.async=1;f.src=h.script;c.parentNode.insertBefore(f,c)}});var a=function(){var e=0;d.forEach(function(f){if(!f.check()){++e}});if(e>0){WebPlatform.delay(50,a)}else{b()}};a()},requestResource:function(d,g,e,f){e=e||function(){return true};f=f||dummy;if(e()){f();return}var c=document.getElementsByTagName("script")[0];if(d){var h=false;for(var j=0;j<WebPlatform._requestedResources.length;++j){if(WebPlatform._requestedResources[j]===d){h=true;break}}if(!h){WebPlatform._requestedResources.push(d);var i=document.createElement("script");i.type="text/javascript";i.async=1;i.src=d;c.parentNode.insertBefore(i,c)}}if(g){var a=document.createElement("link");a.type="text/css";a.rel="stylesheet";a.href=g;c.parentNode.insertBefore(a,c)}var b=function(){if(!e()){WebPlatform.delay(50,b)}else{f()}};WebPlatform.delay(50,b)},initFixedHeader:function(e,b){var a=e.find(".fixed-header-wrapper");if(a.length===0||a.hasClass("initiated")||a.hasClass("header-hidden")){return}a.addClass("initiated");var c=e.find(".main-header-wrapper");if(b===true){var d=c.offset();a.css({top:d.top+"px"})}e.scroll($.throttle(150,function(){var f=e.scrollTop();if(c.height()<=f){a.addClass("visible")}else{a.removeClass("visible")}})).scroll()},getObjectFromLocalStorage:function(b,a){try{var c=window.localStorage.getItem(b);if(c){return JSON.parse(c+"")}return a}catch(d){Log.error(d);return a}},setObjectToLocalStorage:function(a,b){try{window.localStorage.setItem(a,JSON.stringify(b))}catch(c){Log.error(c)}},removeFromLocalStorage:function(a){try{window.localStorage.removeItem(a)}catch(b){Log.error(b)}},initiateBraintree3DSecureIfEnabled:function(b,c,a){window.braintree.threeDSecure.create({client:b,version:2},function(d,e){if(d){if(d.code==="THREEDS_NOT_ENABLED"){Log.info("3DS not supported");c(null)}else{if(d.code==="THREEDS_NOT_ENABLED_FOR_V2"){window.braintree.threeDSecure.create({client:b,version:1},function(f,g){if(f){if(f.code==="THREEDS_NOT_ENABLED"){Log.info("3DS not supported");c(null)}else{a(f)}}else{c(g)}})}else{a(d)}}}else{c(e)}})},getLocaleName:function(a){switch(a){case"en":return"en_US";case"bg":return"bg_BG";case"da":case"da_JK":return"da_DK";case"de":return"de_DE";case"el":case"gr":return"el_GR";case"es":return"es_ES";case"fr":return"fr_FR";case"it":return"it_IT";case"nb":return"nb_NO";case"nl_NL":return"nl_NL";case"pt_PT":return"pt_PT";case"pt_BR":return"pt_BR";case"ro":return"ro_RO";case"sv_SE":return"sv_SE";case"pl":return"pl_PL";case"zh":case"zh_JO":return"zh_CN";case"iw":return"he_IL";case"ar":return"ar_EG";case"hu":return"hu_HU";case"hr":return"hr_HR";case"th":return"th_TH";case"kr":case"ko":return"ko_KR";case"vn":return"vi_VN";case"ru":return"ru_RU";case"is":return"is_IS";case"jp":return"ja_JP";default:return a}},scrollIntoView:function(a){WebPlatform.delay(50,function(){if(a[0].scrollIntoView){a[0].scrollIntoView({behavior:"smooth"})}})},extractYoutubeVideoId:function(b){var c;b=b.replace("://www.","://");var a=b.toLowerCase().indexOf("://youtu.be");
90if(a>-1){c=b.substring(a+12);if(c.indexOf("?")>-1){c=c.substring(0,c.indexOf("?"))}}else{c=WebPlatform.getUrlQueryParameter(b,"v",WebPlatform.URL_PARAM_ANY_WITH_EMPTY)}return c}});WebPlatform.Phrases=mergeUnique(WebPlatform.Phrases||{},{"client.by":"by","client.on":"on","client.in":"in","client.comment":"Comment","client.comments":"Comments","client.read_more":"Read more","client.load_more":"Load more","label.view":"View","label.years":"Years","label.months":"Months","label.month":"month","label.year":"year","label.months_lower":"months","label.years_lower":"years","label.week_lower":"week","label.weeks_lower":"weeks","label.saving":"Saving","label.days":"Days","label.hours":"Hours","label.seconds":"Seconds","label.shipping_address":"Shipping Address","label.billing_address":"Billing Address","label.january":"January","label.february":"February","label.march":"March","label.april":"April","label.may":"May","label.june":"June","label.july":"July","label.august":"August","label.september":"September","label.october":"October","label.november":"November","label.december":"December","label.jan":"Jan","label.feb":"Feb","label.mar":"Mar","label.apr":"Apr","label.may_short":"May","label.jun":"Jun","label.jul":"July","label.aug":"Aug","label.sep":"Sep","label.oct":"Oct","label.nov":"Nov","label.dec":"Dec","label.add_to_cart":"Add To Cart","label.buy_now":"Buy Now","label.update":"Update","label.change":"change","label.select_product_variant":"Choose variation for each item in your order","err.select_product_variants":"Select variant","label.checkout_now":"Checkout Now","label.cod":"Pay on delivery","label.bank":"Bank Transfer","label.yes":"YES","label.no":"NO","label.contact_booked_error":"You already booked a spot in this group event","label.already_booked_time_error":"Selected time is not available, please select different time","label.booking_notice_error":"Booking too close to current time, please reload the page","label.slots_left":"slots left"});WebPlatform.Widgets={};WebPlatform.defaultPagePagination='<a class="none arrow-nav" rel="client-tab" title="" data-role="-1"> <i class="fa fa-angle-left fa-2x"></i></a><a class="none" rel="client-tab" title="" data-role="-2"></a><a class="none" rel="client-tab" title="" data-role="-1"></a><a rel="client-tab" title="" data-role="0"></a><a class="none" rel="client-tab" title="" data-role="+1"></a><a class="none" rel="client-tab" title="" data-role="+2"></a><a class="none arrow-nav" rel="client-tab" title="" data-role="+1"> <i class="fa fa-angle-right fa-2x"></i></a>';WebPlatform.defaultOnePagePagination='<a rel="client-tab" title="" data-role="more">%more%</a>';WebPlatform.Widgets.Blog=function(e){var k=e.id,b=e.baseNavigationUrl,t=e.listType,a=e.paginationType,g=e.blogCategory,h=e.itemsCount,p=!!e.disqusEnabled,f=e.author,l=e.ids||null,u=e.tag,i=e.socialNetworksSum||0,q=1,j=0,c=t==="masonry",m=e.root||$("#blog-widget-"+k),s=e.pagination||m.find(".pagination"),d=t==="carousel";if(m[0].offsetParent===null){return{loadPage:dummy,destroy:dummy}}if(d){a="none"}function r(){if(!e.baseNavigationUrl){s.on("click","[data-role]",function(w){var y=$(w.currentTarget).data("role");var x;if(y==="more"){x=1}else{if(y==="0"){return}else{x=parseInt(y)}}if(q+x>j||q+x<0){return}o(q+x,true);w.stopPropagation();return false})}if(a==="pagination"){s.append(WebPlatform.defaultPagePagination)}else{s.append(WebPlatform.format(WebPlatform.defaultOnePagePagination,"more",WebPlatform.Phrases["client.load_more"]))}if(c){var v=m.find(".posts-list-wrapper");v.shuffle({itemSelector:".blog-post-article",sizer:m.find(".blog-post-sizer")})}if(e.page){o(e.page,false)}}function n(){if(a==="none"||j===0){s.hide().find("a").removeAttr("href")}else{if(a==="pagination"){var z=s.find('[data-role="0"]');var w=s.find('[data-role="-1"]');var v=s.find('[data-role="-2"]');var y=s.find('[data-role="+1"]');var x=s.find('[data-role="+2"]');z.text(q);if(e.baseNavigationUrl){w.attr("href",b+"page/"+(q-1));v.attr("href",b+"page/"+(q-2));y.attr("href",b+"page/"+(q+1));x.attr("href",b+"page/"+(q+2))}w[q<2?"addClass":"removeClass"]("none").not(".arrow-nav").text(q-1);v.text(q-2)[q<3?"addClass":"removeClass"]("none");y[q<j?"removeClass":"addClass"]("none").not(".arrow-nav").text(q+1);x.text(q+2)[(q+1)<j?"removeClass":"addClass"]("none");s.show();s.find("a.none").removeAttr("href")}else{if(q===j){s.hide().find("a").removeAttr("href")}else{if(e.baseNavigationUrl){s.find('[data-role="more"]').attr("href",b+"page/"+(q+1))}s.show()}}}}function o(w,v){WebPlatform.addAccumulatedRequest({action:"getPostsInfo_"+k,params:{items:h,category:g,page:w,tag:u,author:f,ids:l||null},onNotOk:e.onFailed||dummy,onOk:function(Z){var U=WebPlatform.Phrases["client.by"],K=WebPlatform.Phrases["client.on"],A=WebPlatform.Phrases["client.in"],D=WebPlatform.Phrases["client.comment"],x=WebPlatform.Phrases["client.comments"],I=WebPlatform.Phrases["client.read_more"],Y=d?'<div %style% data-sli
90de="" data-index="%idx%">':"";Y+='<article class="blog-post-article %blogPostDelayed%" data-animation="blogPostAnimation" data-delay="0.05">   <a href="/'+e.blogUrl+'/%url%" title="" class="post-featured post-featured-%featuredtype%">%featured%</a>   <div class="post-summary">      <header>        <div class="post-header">        <h2 class="post-title"><a href="/'+e.blogUrl+'/%url%" class="highlightColor">%title%</a></h2>         <span class="post-meta">           <span class="post-author"><a href="/'+e.blogUrl+'/author/%author%">%author%</a></span>          <span class="post-category">%categories%</span>           <span class="post-time"><p>%created%</p></span>  '+(p?"":'<span class="post-comments">%comments%</span>  ')+'       </span>        </div>  %share%     </header>      <span class="post-description">%description%</span>      <div class="read-more-wrapper"><a href="/'+e.blogUrl+'/%url%" class="read-more primaryColor-bg">'+I+"</a></div>    </div>  </article>";if(d){Y+="</div>"}var H=Z.posts;j=Math.floor(Z.allPostsCount/h)+((Z.allPostsCount%h)>0?1:0);q=Z.page;if(H.length===0){return}var E=m.find(".posts-list-wrapper");if(a==="pagination"&&!(c)){E.find("article").remove()}if(d){E.addClass("inline-gallery");E.find(".blog-post-sizer").remove()}var M=$([]);for(var T=0;T<H.length;++T){var X=H[T];var P="";var Q="";var V="";if(d){var J=1;var L=0;var B=(100-((J-1)*L))/J;V='style="width: '+(B*J)+'%; margin: 0 auto; float: none;"'}if(X.featured.type===0){var O=X.featured.data;var z=X.featured.dataBase;if(t==="large"||d){P+="<span style='background-image: url(\""+getFileFromBase(z)+O+"\");'></span>"}else{if(t==="medium"){P+="<span style='background-image: url(\""+getThumbnailsFromBase(z,"640x480")+O+"\");'></span>"}else{P+='<img src="'+getThumbnailsFromBase(z,"640x480")+O+'" alt="" />'}}}else{if(X.featured.type===1){P+='<div class="inline-gallery">';for(var R=0;R<X.featured.data.length;++R){var C;if(t==="large"||d){C=getFileFromBase(X.featured.dataBase[R])+X.featured.data[R]}else{C=getThumbnailsFromBase(X.featured.dataBase[R],"640x480")+X.featured.data[R]}P+='<img src="'+C+'" alt="" />'}P+="</div>"}else{if(X.featured.type===2){P+='<div class="fluid-video-wrapper">'+X.featured.data+"</div>"}else{if(X.featured.type===3){P+='<h1 class="primaryColor-bg2">'+X.featured.data+"</h1>"}else{if(X.featured.type===4){}}}}}for(var R=0;R<X.categories.length;++R){if(R===0){Q+=A+"&nbsp;"}else{Q+=" / "}Q+='<a href="/'+e.blogUrl+"/category/"+X.categories[R].second+'" title="">'+X.categories[R].first+"</a>"}var N=window.location.protocol||"https:";var G=X.created||" ";G=G.split(" ")[0];var S=WebPlatform.parseSimpleShare(i,N+"//"+location.hostname+"/"+e.blogUrl+"/"+X.url);var W=WebPlatform.format(Y,"featured",P,"featuredtype",X.featured.type,"comments",X.approvedCommentsCount+" "+(X.approvedCommentsCount!==1?x:D),"blogPostDelayed",(c||d)?"":"anim-delayed-item","share",S,"categories",Q,"url",X.url,"title",X.title,"created",G,"description",X.description,"author",X.author,"idx",T,"style",V);W=$(W);E.append(W);if(c){M=M.add(W)}}if(c&&H.length>0){if(a==="pagination"){E.shuffle("remove",m.find(".shuffle-item"))}E.data("shuffle").appended(M,true,true);WebPlatform.onImagesLoaded(E,function(){E.shuffle("update")})}else{if(a==="pagination"){var y=$window.scrollTop();var F=m.offset().top;if(F<y){$window.scrollTop(F)}}}n();$window.scroll();WebPlatform.refreshLightboxes();(e.onLoaded||dummy)()}});if(v){WebPlatform.processAccumulatedRequests()}}r();return{loadPage:function(v){o(v,true)},destroy:function(){if(c){var v=m.find(".posts-list-wrapper");if(v.shuffle){v.shuffle("destroy")}}}}};WebPlatform.Widgets.SimpleBlog=function(b){var g=b.id,f=b.blogUrl,e=b.blogType,d=b.blogCategory,a=b.itemsCount;var c="posts";if(e==="posts"){c=d===""?"getRecentPosts":"getRecentPostsByCategory"}else{c=e==="categories"?"getCategories":"getTags"}WebPlatform.addAccumulatedRequest({action:c,params:{items:a,category:d},onNotOk:b.onFailed||dummy,onOk:function(j){var l=b.widget?b.widget:$("#blog-widget-"+g);var n=l.find(".blog-items-wrapper").removeClass("visible");var i="";for(var h=0;h<Math.min(j.length,a)||0;++h){var k=j[h];if(e==="posts"){if(k.category===d){var m=k.created||" ";m=m.split(" ")[0];i+='<div class="blog-widget-item recent-post"><a href="/'+f+"/"+k.url+'" class="highlightColor">'+k.title+"</a><span>"+m+"</span></div>"}}else{if(e==="categories"){i+='<div class="blog-widget-item blog-categories"><a href="/'+f+"/category/"+k.url+'" class="highlightColor">'+k.category+"</a></div>"}else{if(e==="tags"){i+='<a href="/'+f+"/tag/"+k.url+'" class="highlightBg">'+k.tag+"</a>"}}}}n.append(i).addClass("visible");(b.onLoaded||dummy)()}})};WebPlatform.Widgets.Store=function(a){mergeUnique(a,{maxItemsCount:10,exclude:-1,root:null,labelFrom
90:"From&nbsp;",labelSale:"Sale",labelQuickView:"Quick View",labelAddBtn:a.storeProcess==="cart"?"Add To Cart":"Buy Now",labelSoldOut:"Sold Out",baseUrl:"",itemsPerRow:4,itemGap:1,showProductName:true,showProductPrice:true,hasProductQuickView:false,autoChangeSlides:false,autoChangeSlidesTimeout:4000,layout:"grid",fakeGallery:false,productLayout:"text-boxed",itemsType:"products",storeItems:[],discountBadgeType:"none",currency:WebPlatform.Store.currency,currencySymbol:WebPlatform.Store.currencySymbol,currencySymbolAtLeft:WebPlatform.Store.currencySymbolAtLeft,imageSize:80,imageSizeType:"",storeProcess:"buy",includeAddToCartButton:false,sort:""});if(a.root===null){a.root=$([])}if(a.root[0].offsetParent===null){return}a.fakeGallery=a.fakeGallery&&a.layout!=="grid";if(a.fakeGallery){a.itemWidth=(100-a.itemsPerRow*a.itemGap)/a.itemsPerRow}else{a.itemWidth=(100-((a.itemsPerRow-1)*a.itemGap))/a.itemsPerRow}WebPlatform.addAccumulatedRequest({action:a.itemsType==="latest"?"getLatestStoreItems":a.itemsType==="products"?"getStoreItems":"getStoreItemsByCategory",params:{itemIds:a.storeItems,items:a.itemsType==="latest"?a.maxItemsCount:0,sort:a.sort},onOk:function(h){var m=a.layout==="grid"||a.fakeGallery,e=[],j=a.itemsType!=="products",t=a.itemsType==="latest";for(var g=0;g<h.length;++g){var b=h[g];if(a.maxItemsCount>0&&e.length>=a.maxItemsCount){break}if(b.id===a.exclude){continue}if(t){e.push(b)}else{if(j){for(var o=0;o<b.categories.length;++o){if(a.storeItems.indexOf(b.categories[o].id)>-1){e.push(b);break}}}else{if(a.storeItems.indexOf(b.id)>-1){e.push(b)}}}}var d=e.length;if(a.fakeGallery){d=Math.min(a.itemsPerRow,e.length)}if(m){var q='<div class="products-list">'}else{var q='<div class="products-list inline-gallery" data-autoplay="true" data-pauseonhover="true" data-arrows="true" data-items="'+a.itemsPerRow+'" data-timeout="'+(a.autoChangeSlides?a.autoChangeSlidesTimeout:"86400000")+'" data-pagination="false">'}var k=a.root.closest(".grid-row").hasClass("grid-row-fullwidth")?4:3;for(var g=0;g<d;++g){var b=e[g],c=(g<a.itemsPerRow?0:(a.itemGap+"%")),l=0,f=((g+1)%a.itemsPerRow===0?0:(a.itemGap+"%"));if(a.fakeGallery){c=0;l=f=(a.itemGap/2)+"%"}var p;if(m){p="width: "+a.itemWidth+"%; margin: "+c+" "+f+" 0 "+l+"; "}else{p="width: "+(a.itemWidth*a.itemsPerRow)+"%; margin: 0 auto; float: none;"}q+='<div class="product-item '+a.imageSizeType+" "+(a.hasProductQuickView?" with-quick-view ":"")+'" data-slide="" data-idx="'+g+'" data-id="'+b.id+'" style="'+p+'">';var s=resources+"../images/product-avatar.svg";if(b.images!==null&&b.images.length>0){if(a.itemsPerRow<k){s=getFileFromBase(b.images[0].base)+b.images[0].name}else{s=getThumbnailsFromBase(b.images[0].base,"640x480")+b.images[0].name}}var r="";if(a.imageSizeType!==""){r+="padding-bottom: "+a.imageSize+"%;";if(a.imageSizeType==="cover-image"){r+="background: url('"+s+"') no-repeat center center;";r+="background-size: cover;"}}q+='<div class="product-main-photo has-badge" style="'+r+'"><div class="product-photo-inner-wrapper">';var n=' href="'+a.baseUrl+b.url+'" ';if(WebPlatform.Funnels.isInFunnel()&&WebPlatform.Funnels.hideProductLinks){n=""}q+="<a"+n+">";if(a.discountBadgeType!=="none"&&b.onSale&&b.price>0){q+='<div class="product-badge">';if(a.discountBadgeType==="text"){q+=a.labelSale}else{if(a.discountBadgeType==="percent"){q+=-b.roundedDiscountInPercent+"%"}else{q+=WebPlatform.currToStr(-b.roundedDiscount,a.currencySymbol,a.currencySymbolAtLeft,a.currency)}}q+="</div>"}q+='<img src="'+s+'" alt="'+WebPlatform.escapeHtml(b.name)+'" />';q+="</a></div>";q+="</div>";if(a.showProductName||a.showProductPrice){q+='<div class="product-item-description"><div><div>';if(a.showProductName){q+="<h3><a"+n+' class="highlightColor">'+WebPlatform.escapeHtml(b.title)+"</a></h3>"}if(a.showProductPrice){q+='<span class="product-item-price"><a'+n+">";if(b.priceComposite){q+=a.labelFrom}q+=WebPlatform.currToStr(b.onSale?b.salePrice:b.price,a.currencySymbol,a.currencySymbolAtLeft,a.currency);if(b.onSale){q+='<span class="scratched">'+WebPlatform.currToStr(b.price,a.currencySymbol,a.currencySymbolAtLeft,a.currency)+"</span>"}
90if(b.subscriptionPeriod){q+=' <span style="font-size: 0.9em">/ '+b.subscriptionPeriod+"</span>"}q+="</a></span>"}q+="</div></div></div>"}if(a.hasProductQuickView){q+='<div class="quick-view-btn" data-role="viewProduct"><a>'+a.labelQuickView+"</a></div>"}if(a.includeAddToCartButton){q+='<div class="add-to-btn-wrapper col20 f-left">';if(b.type==="digital"||b.variations.length>0||b.quantity===null||b.quantity===""||b.quantity>0){q+='<a data-role="'+(b.variations.length>0?"viewProduct":"addToCart")+'" data-process="'+a.storeProcess+'" class="primaryColor-bg2 add-to-cart">';q+=a.labelAddBtn;q+="</a>"}else{q+='<div class="sold-out-btn">'+a.labelSoldOut+"</div>"}q+="</div>"}q+="</div>"}if(a.fakeGallery){q+='<a class="tos-prev" style="opacity: 1"><span></span></a>';q+='<a class="tos-next" style="opacity: 1"><span></span></a>'}q+="</div>";a.root.find(".product-list-wrapper").attr("class","product-list-wrapper full-width-layout col20 f-left products-per-row-"+a.itemsPerRow+" product-list-style-"+a.productLayout+(a.imageSizeType!==""?" image-positioned":"")).html(q);if(a.hasProductQuickView||a.includeAddToCartButton){a.root.on("mousedown",'[data-role="viewProduct"]',function(){var i=$(this).closest(".product-item").data("id");WebPlatform.Store.showProductInQuickView(i);return false})}if(a.includeAddToCartButton){a.root.on("mousedown",'[data-role="addToCart"]',function(){var i=$(this);var u=i.closest(".product-item");var w=u.data("id");var v=i.data("process");WebPlatform.Store.addProductToCart(w,v);return false})}if(!m){WebPlatform.refreshInlineGallery(a.root.find(".inline-gallery"))}}})};WebPlatform.Members=WebPlatform.Members||{};WebPlatform.Store=WebPlatform.Store||{};extend(WebPlatform.Store,{hideUnavailableVariations:false,activePage:"",editable:true,cart:undefined,cartTargets:null,quickViewProductRowTemplate:'<div class="cart-row %editableClass% %notAvailableClass%" data-index="%index%" data-product="%productId%">         <div class="image">           <a href="%baseUrl%/%url%" class="highlightColor">%image%</a>         </div>          <div class="product-summary">           <div class="product-info">             <h4 class="col20 f-left"><a href="%baseUrl%/%url%" class="highlightColor">%title%</a></h4>             <span class="col20 f-left %variationsCls%">%variation%</span>             <div class="qty f-left col20 %quantityWrapperClass%">               <div class="number-selector f-left flex align-center">                 <a class="number-pad" data-role="-1" style="line-height: 23px;">-</a>                 <input %disabledAttr% class="cart-row-quantity" type="number" size="4" step="1" max="9999" min="1" value="%quantity%" />                 <a class="number-pad" data-role="+1">+</a>               </div>             </div>           </div>           <span class="row-total">%price%</span>           <a class="row-delete %deleteClass%"><i class="fa fa-trash-o"></i></a>        </div>     </div>',storeProductRowTemplate:'<div class="cart-row cart-row-new %editableClass% %notAvailableClass% %additionalClz%" data-index="%index%" data-product="%productId%">         <div class="image">           <a href="%baseUrl%/%url%" class="highlightColor">%image%</a>         </div>         <div class="product-info">           <h4 class="col20 f-left"><a href="%baseUrl%/%url%" class="highlightColor">%title%</a></h4>           <span class="col20 f-left %variationsCls%">%variation% <a class="variations-update f-none">%changeText%</a></span>           <div class="qty f-left col20 %quantityWrapperClass%">             <div class="number-selector f-left flex align-center">               <a class="number-pad" data-role="-1" style="line-height: 23px;">-</a>               <input %disabledAttr% class="cart-row-quantity" type="number" size="4" step="1" max="9999" min="1" value="%quantity%" />               <a class="number-pad" data-role="+1">+</a>             </div>           </div>         </div>         <span class="row-total">%price%</span>         <a class="row-delete %deleteClass%"><i class="fa fa-trash-o"></i></a>    </div>',storeProductRowTemplateNoLinks:'<div class="cart-row cart-row-new %editableClass% %notAvailableClass% %additionalClz%" data-index="%index%" data-product="%productId%">         <div class="image">%image%</div>         <div class="product-info">           <h4 class="col20 f-left">%title%</h4>
90           <span class="col20 f-left %variationsCls%">%variation% <a class="variations-update f-none">%changeText%</a></span>           <div class="qty f-left col20 %quantityWrapperClass%">             <div class="number-selector f-left flex align-center">               <a class="number-pad" data-role="-1" style="line-height: 23px;">-</a>               <input %disabledAttr% class="cart-row-quantity" type="number" size="4" step="1" max="9999" min="1" value="%quantity%" />               <a class="number-pad" data-role="+1">+</a>             </div>           </div>         </div>         <span class="row-total">%price%</span>         <a class="row-delete %deleteClass%"><i class="fa fa-trash-o"></i></a>    </div>',storeTaxRowTemplate:'<div class="subtotal-wrapper tax-wrapper">       <span class="subtotal"></span>       <span class="subtotal-price tax-value"></span>     </div>',Orders:(function(){var c={};var b={};var d={};var a=function(f,h){if(h.hasClass("order-rendered")){return}var j=f.id;var i=function(k){k=k||{};k.orderId=f.id;k.products=JSON.stringify(f.products||[]);k.funnel=f.funnelId;k.funnelStep=f.funnelStepId;k.funnelStepVariant=f.funnelStepVariantId;return k};h.on("click",".checkout-item-cbx:not(.checked)",function(k){k.stopPropagation();k.preventDefault();return false});var e=function(n){if(n<0){return -1}var m=h.find(".cart-table .fake-checkbox").length>0;if(!m){return n}var k=(c[j]||{}).items||[];for(var l=0;l<=n;++l){if(l>=k.length){break}if(k[l].bump){++n}}if(n>=k.length){return -1}return n};var g=function(k,l){k=e(k);if(k<0){return}WebPlatform.makeClientWebsiteRequest({action:"updateCart",data:i({type:"update",index:k,quantity:l}),onOk:function(n){if(n.data.error){WebPlatform.showClientError(n.data.error)}var m=n.data.cart;WebPlatform.Store.Orders.set(j,m);WebPlatform.Store.updateCartNumber(m.size,false);WebPlatform.Events.trigger(document,WebPlatform.Events.ORDER_CHANGED,{id:j,order:m})}})};h.on("click",".row-delete",function(n){var o=$(this).closest(".cart-row");if(o.hasClass("update-disabled")){return}var k=e(o.data("index"));if(k<0){return}var l=(c[j]||{}).items||[];var m=k<l.length?l[k]:null;WebPlatform.makeClientWebsiteRequest({action:"updateCart",data:i({type:"remove",index:k}),onOk:function(q){if(m){WebPlatform.Store.reportRemoveFromCart(m,WebPlatform.Store.currency)}var p=q.data;WebPlatform.Store.Orders.set(j,p);WebPlatform.Store.updateCartNumber(p.size,false);WebPlatform.Events.trigger(document,WebPlatform.Events.ORDER_CHANGED,{id:j,order:p})}});n.stopPropagation();n.preventDefault();return false}).on("click",".number-pad",function(){var n=$(this);var o=n.closest(".cart-row");if(o.hasClass("update-disabled")){return}var k=o.data("index");if(k<0){return}var m=WebPlatform.parse(o.find(".cart-row-quantity").val(),0,false);var l=m+(n.data("role")===-1?-1:1);if(l<1){return}g(k,l)}).on("change",".cart-row-quantity",function(){var m=$(this);var n=m.closest(".cart-row");if(n.hasClass("update-disabled")){return}var k=n.data("index");if(k<0){return}var l=WebPlatform.parse(m.val(),0,false);g(k,l)}).on("click",".discount-code-btn",function(){var k=h.find(".apply-code-input").val();WebPlatform.makeClientWebsiteRequest({action:"applyDiscountCode",data:i({code:k}),onOk:function(l){WebPlatform.Store.Orders.set(j,l.data);WebPlatform.Events.trigger(document,WebPlatform.Events.ORDER_CHANGED,{id:j,order:l.data})}})}).on("click",".promo-code-toggle-btn",function(){h.find(".coupon-code-wrapper").toggleClass("none")}).on("click",".remove-discount-btn",function(){if($(this).hasClass("none")){return}WebPlatform.makeClientWebsiteRequest({action:"removeDiscount",data:i({}),onOk:function(k){WebPlatform.Store.Orders.set(j,k.data);WebPlatform.Events.trigger(document,WebPlatform.Events.ORDER_CHANGED,{id:j,order:k.data})}})})};return{get:function(e,f){if(typeof e==="string"){e={orderId:e}}var g=e.orderId||"cart";if(isUndefined(c[g])){WebPlatform.makeClientWebsiteRequest({action:"getOrder",data:e,onOk:function(j){var i=j.data.order;c[g]=i;if(g==="cart"){WebPlatform.Store.cart=i}var h={};if(e.policies){h.policies=j.data.policies}if(e.paymentOptions){h.paymentOptions=j.data.paymentOptions}if(e.pickProducts){h.pickProducts=j.data.pickProducts}f(i,h)}})}else{f(c[g])}},reset:function(e){delete c[e]},set:function(i,f){c[i]=f;if(i==="cart"){WebPlatform.Store.cart=f}var h=b[i]||[];for(var e=0;e<h.length;++e){var g=h[e];if(g&&$.contains(document,g[0])){WebPlatform.Store.renderOrder(f,g,d[i]||[])}else{h.splice(e--,1)}}},bind:function(g,f){if(f.hasClass("order-rendered")){return}if(typeof g==="string"){g={orderId:g}}g=mergeUnique(g||{},{id:"cart",products:[],funnelId:-1,stepId:-1,variantId:-1});var i=g.id;var h=b[i];if(!h){b[i]=h=[]}if(g.pickProducts&&g.pickProducts.length>0){d[i]=g.pickProducts}h.push(f);a(g,f);var e=c[i];if(!isUndefined(e)){WebPlatform.Store.renderOrder(e,f,d[i]||[])}f.addClass("order-rendered")}}})(),renderCart:function(){var b=$('div[data-role="cart-box"]').not(".order-rendered");var a=b.find(".loader").addClass("active-loading").removeClass("none");WebPlatform.Store.Orders.get("cart",function(d){a.removeClass("active-loading").addClass("none");var c=0;
90if(d!==null&&d.items&&d.items.length){d.items.forEach(function(e){c+=e.quantity})}b.each(function(e,f){WebPlatform.Store.Orders.bind({id:"cart"},$(f))});WebPlatform.Store.updateCartNumber(c,false)})},subscriptionToStr:function(b){if(b!==null){var c=b.period;var a=b.periodUnit;if((c%12===0)&&a===1){c=c/12;return c==1?WebPlatform.Phrases["label.year"]:(c+"-"+WebPlatform.Phrases["label.years_lower"])}else{if(a===0){return c==1?WebPlatform.Phrases["label.week_lower"]:(c+"-"+WebPlatform.Phrases["label.weeks_lower"])}else{return c==1?WebPlatform.Phrases["label.month"]:(c+"-"+WebPlatform.Phrases["label.months_lower"])}}}},renderOrder:function(K,a,Z){var y=a;var b=y.hasClass("cart-preview");var N=!!y.data("showOldPrices");var k=!!y.data("inFunnel");var A=false;var C=y.find(".checkouts-wrapper").data("pickQuantity")===true;Z=Z||[];if(K===null||K.items.length===0){y.find(".cart-items-wrapper").addClass("none");y.find(".cart-empty-wrapper").removeClass("none")}else{var x=y.find(".cart-table");var r=x.hasClass("simple-table");x.empty();var O="";var I=0;var S=K.id!=="cart"&&Z.length>1;var w=[];if(S){Z.forEach(function(aa){var ab=false;for(var i=0;i<K.items.length;++i){if(K.items[i].productId===aa.productId){aa=K.items[i];ab=true;break}}w.push({item:aa,inOrder:ab})})}else{K.items.forEach(function(i){w.push({item:i,inOrder:true})})}var Q=0;for(var W=0;W<w.length;++W){var E=w[W].item;var g=w[W].inOrder;var e;if(E.images===null||E.images.length===0){e='<img src="'+resources+'../images/product-avatar.svg" alt="">'}else{e='<img src="'+getThumbnailsFromBase(E.images[0].base,"640x480")+E.images[0].name+'" alt="" />'}var R="";for(var T=0;T<E.variation.length;++T){if(T>0){R+=", "}R+=WebPlatform.escapeHtml(E.variation[T].value)}for(var T=0;T<E.additions.length;++T){R+=(R===""?"":", ")+WebPlatform.escapeHtml(E.additions[T].name)+": "+WebPlatform.escapeHtml(E.additions[T].value)}var L=E.quantityAvailable===true;if(!L){A=true}var X=WebPlatform.currToStr(E.price,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency);if(N&&E.onSale){var Y=WebPlatform.currToStr(E.basePrice,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency);X='<span class="checkout-old-price">'+Y+"</span>"+X;if(g){I+=(E.basePrice-E.price)}}if(E.subscription){if(r){X+=" / "+WebPlatform.Store.subscriptionToStr(E.subscription)}else{X+='<span class="item-subscription-period"> / '+WebPlatform.Store.subscriptionToStr(E.subscription)+"</span>"}}var h=E.productWithVariations&&(!E.variation||E.variation.length===0);var D=h?"incomplete-item":"";var M=h?WebPlatform.Phrases["label.select_product_variant"]:(WebPlatform.Phrases["label.change"]||"change").toUpperCase();var B=!(E.isSubscription||E.type==="MEMBERSHIP"||window.noStoreQuantityChange);var v=!E.productWithVariations;if(S){D+=" fake-checkbox checkout-item-cbx";if(g){D+=" checked"}}var j=K.clientSessionId!=="cart";var o=j||WebPlatform.Funnels&&WebPlatform.Funnels.hideProductLinks;var G=!j;var t=E.quantity>1||B&&(!j||C);var u;if(o){u=WebPlatform.Store.storeProductRowTemplateNoLinks}else{if(b){u=WebPlatform.Store.quickViewProductRowTemplate}else{u=WebPlatform.Store.storeProductRowTemplate}}O+=WebPlatform.format(u,"baseUrl",WebPlatform.Store.baseUrl,"editableClass",G||t?"":"update-disabled","deleteClass",G?"":"none","disabledAttr",t?"":"disabled","quantityWrapperClass",t?"":"none","notAvailableClass",L?"":"not-available","index",g?Q++:-1,"url",E.url,"productId",E.productId,"title",WebPlatform.escapeHtml(E.title),"additionalClz",D,"changeText",M,"variationsCls",v?"none":"","image",e,"variation",R,"quantity",E.quantity,"price",X)}x.append(O);if(A){x.append($('<span class="error-message"></span>').text(WebPlatform.Store.notEnoughQuantityMessage))}y.find(".remove-discount-btn, .promo-code-toggle-btn").removeClass("none");var q=y.find(".no-discount-wrapper");var l=y.find(".subtotal-value");l.text(WebPlatform.currToStr(K.subTotalNoDiscount,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency));var c=false;if(K.discount!==null){q.hide()}else{if(q.length>0){q.show()}else{c=true}}var n=y.find(".product-discount-wrapper");if(K.discount!==null&&K.discount.type!=="FREE_SHIPPING"&&K.subTotalNoDiscount!==K.subTotal){n.find(".subtotal-price").text(WebPlatform.currToStr(K.subTotal-K.subTotalNoDiscount,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency));n.find(".subtotal>span").text(K.discount.name+(" ("+K.discount.code+")")+":");n.show();c=false}else{n.hide();c=c&&true}if(K.preShippingTaxes!==null&&K.preShippingTaxes.length>0){var d=y.find(".pre-shipping-tax-wrapper").empty();for(var T=0;T<K.preShippingTaxes.length;++T){var H=K.preShippingTaxes[T],p=H.type,U=p===0?(H.amount+"%"):WebPlatform.currToStr(H.amount,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency),J=H.name+(p===0?(" ("+U+")"):"")+":",F=WebPlatform.currToStr(H.total,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency),O=$(WebPlatform.Store.storeTaxRowTemplate);O.find(".subtotal").text(J);O.find(".tax-value").text(F);d.append(O)}d.show();c=false}else{y.find(".pre-shipping-tax-wrapper").hide();c=c&&true}if(K.shipping!==null){var f=y.find(".shipping-wrapper");f.find(".shipping > span").text("("+K.shipping.name+")");f.find(".shipping-value").text(WebPlatform.currToStr(K.shipping.cost,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency));f.show();c=false}else{y.find(".shipping-wrapper").hide();c=c&&true}var z=y.find(".shipping-discount-wrapper");if(K.discount!==null&&K.discount.type==="FREE_SHIPPING"){var s=K.shipping!==null?WebPlatform.currToStr(K.shipping.cost,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency):"-";z.find(".subtotal-price").text(s);z.find(".subtotal>span").text(K.discount.name+(" ("+K.discount.code+")")+":");z.show();c=false}else{z.hide();c=c&&true}if(K.postShippingTaxes!==null&&K.postShippingTaxes.length>0){var m=y.find(".post-shipping-tax-wrapper").empty();for(var T=0;T<K.postShippingTaxes.length;++T){var H=K.postShippingTaxes[T],p=H.type,U=p===0?(H.amount+"%"):WebPlatform.currToStr(H.amount,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency),J=H.name+(p===0?(" ("+U+")"):"")+":",F=WebPlatform.currToStr(H.total,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency),O=$(WebPlatform.Store.storeTaxRowTemplate);O.find(".subtotal").text(J);O.find(".tax-value").text(F);m.append(O)}m.show();c=false}else{y.find(".post-shipping-tax-wrapper").hide();c=c&&true}if(h&&r){c=false}
90if(r){if(c){l.closest(".no-discount-wrapper, .subtotal-wrapper").addClass("none");l.closest(".checkout-totals").find(".simple-table").css("border","none")}else{l.closest(".no-discount-wrapper, .subtotal-wrapper").removeClass("none");l.closest(".checkout-totals").find(".simple-table").css("border","")}}else{l.closest(".checkout-totals")[c?"hide":"show"]()}var P=WebPlatform.currToStr(K.total,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency);if(N&&I>0){var V=WebPlatform.currToStr(K.total+I,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency,WebPlatform.Store.currency);P='<span class="checkout-old-price old-grand-total">'+V+"</span>"+P}y.find(".grand-total").html(P);y.find(".cart-empty-wrapper").addClass("none");y.find(".cart-items-wrapper").removeClass("none")}},updateCartNumber:function(b,e){var d=$(".cart-button, .shopping-cart");var a=d.find(".cart-items-number");if(b===0){a.addClass("none");d.filter(".shopping-cart-mobile, .shopping-cart-smaller").addClass("none")}else{d.removeClass("none");a.text(b).removeClass("none pulse")}if(e&&!WebPlatform.Store.atCheckout){var f=WebPlatform.Funnels.isInFunnel();var g;if(f){g="javascript: WebPlatform.Funnels.showNextStepOrCheckout();"}else{g=WebPlatform.Store.baseUrl+"/cart"}if(b>0&&f&&!!WebPlatform.Funnels.showCheckoutButton){$(".next-step-popup").removeClass("none");if(WebPlatform.Funnels.checkoutButtonTarget){g=WebPlatform.Funnels.checkoutButtonTarget}}else{$(".next-step-popup").addClass("none")}var c='<a href="'+g+'">'+WebPlatform.Phrases["label.checkout_now"]+"</a>";WebPlatform.showClientMessage(WebPlatform.Store.productAddedToCart+c,6000);WebPlatform.delay(10,function(){a.addClass("pulse");a=null})}},initOrderUI:function(b,a){},removeProductFromCart:function(a,b){WebPlatform.Store.Orders.get("cart",function(f){if(f&&f.items){var e=null;var d=-1;for(var c=0;c<f.items.length;++c){if(f.items[c].productId===a){d=c;e=f.items[c];break}}if(d>=0){WebPlatform.makeClientWebsiteRequest({action:"updateCart",data:{orderId:"cart",products:"[]",type:"remove",index:d},onOk:function(h){WebPlatform.Store.reportRemoveFromCart(e,WebPlatform.Store.currency);var g=h.data;WebPlatform.Store.Orders.set("cart",g);WebPlatform.Store.updateCartNumber(g.size,false);WebPlatform.Events.trigger(document,WebPlatform.Events.ORDER_CHANGED,{id:"cart",order:g});if(b){b()}}})}}})},addProductToOrder:function(a,c,b,d){WebPlatform.makeClientWebsiteRequest({action:"getStoreProduct",data:{id:a},onOk:function(e){var h=e.data;if(h.variations.length>0){WebPlatform.Store.showLoadedProductInQuickView({product:h,activeOrderDetails:b,onAddedToOrder:function(){if(d){d()}},storeProcess:c})}else{var f={productId:h.id,quantity:1,combination:-1,variation:[],price:h.onSale?h.salePrice:h.price};var g=b||{};g.orderId=g.orderId||"cart";g.option=JSON.stringify(f);g.process=c;WebPlatform.makeClientWebsiteRequest({action:"addToCart",data:g,onOk:function(j){WebPlatform.Store.reportAddToCart(h,f,WebPlatform.Store.currency);var i=j.data;if(c==="buy"){var k=WebPlatform.Funnels.isInFunnel()&&WebPlatform.Funnels.show("next",true);if(!k){window.location.href=(WebPlatform.Store.baseUrl||"/store")+"/checkout"}}else{WebPlatform.Store.Orders.set(g.orderId,i);if(g.orderId==="cart"){WebPlatform.Store.updateCartNumber(i.size,true)}}if(d){d()}WebPlatform.Events.trigger(document,WebPlatform.Events.ORDER_CHANGED,{id:g.orderId,order:i})}})}}})},addProductToCart:function(a,b,c){WebPlatform.Store.addProductToOrder(a,b,null,c)},showLoadedProductInQuickView:function(a){mergeUnique(a,{product:null,activeOrderDetails:null,activeOrderItem:null,activeOrderItemIdx:-1,onAddedToOrder:dummy,storeProcess:"",noQuantity:false});var c=$(".quick-view-overlay");var b=function(e,d){c.removeClass("animate");WebPlatform.delay(300,function(){c.removeClass("visible").off(".product");c=null;if(d){d()}});if(e){e.stopPropagation();e.preventDefault()}b=null;return false};c.on("click.product",function(d){if(!$(d.target).hasClass("quick-view-overlay")){return}b(d)});c.on("click.product",'[data-role="close"]',b);c.addClass("visible");WebPlatform.delay(20,function(){c.addClass("animate");var d={view:c,product:a.product,populateStaticData:true,activeOrderDetails:a.activeOrderDetails,selectedOrderItem:a.activeOrderItem,selectedOrderItemIdx:a.activeOrderItemIdx,storeProcess:a.storeProcess,noQuantity:a.noQuantity,onAddedToCart:function(){var e=function(){if(a.onAddedToOrder){a.onAddedToOrder()}};if(b){b(null,e)}else{e()}}};if(a.onOptionSelected){d.onOptionSelected=a.onOptionSelected}if(!isUndefined(a.forcePrice)){d.forcePrice=a.forcePrice}WebPlatform.Store.showProductDetailsInView(d)})},showProductInQuickView:function(d,b,e,c,a){if(isUndefined(c)){c=-1}WebPlatform.makeClientWebsiteRequest({action:"getStoreProduct",data:{id:d},onOk:function(f){WebPlatform.Store.showLoadedProductInQuickView({product:f.data,activeOrderDetails:b,activeOrderItem:e,activeOrderItemIdx:c,onAddedToOrder:a})}})},renderProduct:function(a,c,b){WebPlatform.Store.showProductDetailsInView({view:a,product:c,populateStaticData:b})}
90,showProductPopupDetails:function(c,g,e,d,b,a,h,f){WebPlatform.Store.showProductDetailsInView({view:c,product:g,populateStaticData:e,activeOrderDetails:d,selectedOrderItem:b,selectedOrderItemIdx:a,onAddedToCart:h,storeProcess:f})},showProductDetailsInView:function(w){mergeUnique(w,{root:null,product:null,populateStaticData:true,activeOrderDetails:null,selectedOrderItem:null,selectedOrderItemIdx:-1,onAddedToCart:dummy,storeProcess:"",noQuantity:false});var b=w.view,J=w.product,y=w.populateStaticData,T=w.activeOrderDetails,r=w.selectedOrderItem,d=w.selectedOrderItemIdx,O=w.onAddedToCart,a=w.storeProcess;var g,p,h,D,F,q,c,S=J.sku,H=J.price,s=J.salePrice||0,C=J.onSale,x=J.quantity===""||J.quantity===null?null:J.quantity,u=J.variations||[],f=J.combinations,z=[],t=WebPlatform.Store.hideUnavailableVariations,n=null,j=false;var m=function(){var Y,ab,X=false,aa;n={productId:J.id,quantity:parseInt(b.find('[name="orderQuantity"]').val())||1,combination:-1,variation:[],additions:[],price:null};b.find(".product-additional-field input").each(function(ae,af){n.additions.push({name:J.additions.fields[ae].name,value:af.value})});var i=[];for(var ad=0;ad<u.length;++ad){var W=u[ad];var ac=g.find('[name="'+W.name.replace('"','\\"')+'"]').val();n.variation.push({name:W.name,value:ac});if(W.advanced){i.push(ac)}}if(f.length===0){Y=C?s:H;ab=C?H:null;aa=S;X=x===null||x>0}else{var V=-1;WebPlatform.cartesianProduct(z,function(af){++V;for(var ae=0;ae<af.length;++ae){if(af[ae]!==i[ae]){return true}}return false});var Z=f[V];Y=Z.onSale?Z.salePrice:Z.price;ab=Z.onSale?Z.price:null;X=Z.quantity===null||Z.quantity>0;aa=Z.sku;n.combination=Z.combination}if(X){h.removeClass("none");D.addClass("none")}else{h.addClass("none");D.removeClass("none")}if(!isUndefined(w.forcePrice)){if(ab!==null&&w.forcePrice>=ab){ab=null}Y=w.forcePrice}if(ab===null){F.addClass("none")}else{F.text(WebPlatform.currToStr(ab,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency)).removeClass("none")}c.text(WebPlatform.currToStr(Y,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency));q.closest(".product-sku")[aa===""?"addClass":"removeClass"]("none");q.text(aa);n.price=Y;return X};var l=function(){if(n===null||h.hasClass("disabled")){return}if(w.onOptionSelected){O();w.onOptionSelected(n);return}h.addClass("disabled");var i=T||{};if(d>-1){i.replaceIdx=d}i.orderId=i.orderId||"cart";i.option=JSON.stringify(n);i.process=a;WebPlatform.makeClientWebsiteRequest({action:"addToCart",data:i,onOk:function(W){var V=W.data;WebPlatform.Store.reportAddToCart(J,n,WebPlatform.Store.currency);if(j&&!T){var X=WebPlatform.Funnels.isInFunnel()&&WebPlatform.Funnels.show("next",true);if(!X){window.location.href=(WebPlatform.Store.baseUrl||"/store")+"/checkout"}}else{WebPlatform.Store.Orders.set(i.orderId,V);if(i.orderId==="cart"){WebPlatform.Store.updateCartNumber(V.size,true)}}WebPlatform.Events.trigger(document,WebPlatform.Events.ORDER_CHANGED,{id:i.orderId,order:V});O()},always:function(){h.removeClass("disabled")}})};var L=function(X){var Y=b.find('[data-role="images"]');var i=Y.find(".product-main-photo").hasClass("with-lens-zoom");WebPlatform.removeLightbox(Y);if(X===null||X.length===0){Y.removeAttr("data-rel").html('<div class="product-main-photo"><img src="'+resources+"/images/product-avatar-big.svg?v="+resourcesVersion+'" alt=""></div>')}else{var ad=Y.data("images")||[];if(X.length===ad.length){var V=false;for(var aa=0;aa<X.length;++aa){if(X[aa].name!==ad[aa].name||X[aa].base!==ad[aa].base){V=true;break}}if(!V){return}}var Z="";var ac="";for(var aa=0;aa<X.length;++aa){var W=X[aa];ac+='<div class="none" data-slide="'+getFileFromBase(W.base)+W.name+'"></div>';Z+="<li>";Z+='<a class="product-image '+(aa===0?"active":"")+'" data-name="'+W.name+'" data-base="'+W.base+'">';Z+=' <img src="'+getThumbnailsFromBase(W.base,"72x50")+W.name+'" alt="" />';Z+="</a>";Z+="</li>"}ac+='<div class="product-main-photo cursor-zoom'+(i?" with-lens-zoom":"")+'" data-idx="0"><div class="loader"></div>';ac+='<img src="'+getFileFromBase(X[0].base)+X[0].name+'" alt="" /></div>';if(X.length>1){ac+='<ul class="product-photo-list">';ac+=Z;ac+="</ul>"}Y.attr("data-rel","lightbox");Y.html(ac);if(i){p=Y.find(".product-main-photo.with-lens-zoom");var ab=p.children("img");ab.ezPlus({zoomType:"lens",lensShape:"round",lensSize:250,containLensZoom:true,cursor:"pointer"});p.data("ez",ab.data("ezPlus"))}else{Y.removeClass(".with-tmdp-lightbox");WebPlatform.refreshLightboxes(Y,true)}}Y.data("images",X)};if(y){b.find('[data-role="title"]').text(J.title);L(J.images);var g=b.find('[data-role="variations"]');var E="";for(var U=0;U<u.length;++U){var P=u[U];var A=WebPlatform.escapeHtml(P.name);var I=null;if(r&&r.variation&&r.variation[U]){I=r.variation[U].value}E+='<div class="variation-wrapper" data-name="'+A+'">';E+="<label>"+A+"</label>";E+='<select class="product-variation'+(P.advanced?" advanced-variation":"")+'" name="'+A+'">';
90for(var R=0;R<P.values.length;++R){var K=WebPlatform.escapeHtml(P.values[R]);E+='<option value="'+K+'" '+(K===I?'selected="selected"':"")+">"+K+"</option>"}E+="</select></div>"}if(J.additions&&J.additions.fields&&J.additions.fields.length>0){for(var U=0;U<J.additions.fields.length;++U){var N=null;if(r&&r.additions&&r.additions[U]){N=r.additions[U].value}var k=J.additions.fields[U];E+='<div class="variation-wrapper product-additional-field"><label>'+WebPlatform.escapeHtml(k.name)+'</label><input type="text" '+(N?('value="'+WebPlatform.escapeHtml(N)+'"'):"")+" /></div>"}}g.html(E);var o=r||(WebPlatform.Funnels.isInFunnel()&&WebPlatform.Funnels.hideProductLinks);if(!o){b.find('[data-add="url"]').css("visibility","visible").attr("href",WebPlatform.Store.baseUrl+"/"+J.url)}else{b.find('[data-add="url"]').removeAttr("href");b.find(".view-details-btn").css("visibility","hidden")}}var e=b.find(".product-photo-container");p=b.find(".product-main-photo.with-lens-zoom");if(p.length>0){var B=p.children("img");B.ezPlus({zoomType:"lens",lensShape:"round",lensSize:250,containLensZoom:true,cursor:"pointer"});p.data("ez",B.data("ezPlus"))}b.on("click.product",".product-image",function(){var aa=$(this);var V=aa.parent().index();if(aa.hasClass("active")){return}var i=e.find(".loader");var Z=aa.data("base");var X=aa.data("name");var Y=e.find(".product-main-photo");Y.data("idx",V);var W=Y.find("img");W.attr("src",getFileFromBase(Z)+X);if(p.length>0){p.data("ez").swaptheimage(getFileFromBase(Z)+X,getFileFromBase(Z)+X)}i.addClass("active-loading");e.find(".active").removeClass("active");aa.addClass("active");WebPlatform.onImagesLoaded(Y,function(){i.removeClass("active-loading")})});g=b.find(".product-variations");h=b.find('[data-role="addToCart"]');D=b.find('[data-role="soldOut"]');F=b.find('[data-role="oldPrice"]');c=b.find('[data-role="currentPrice"]');if(J.subscriptionPeriod){b.find('[data-role="subPeriod"]').removeClass("none").text("/ "+J.subscriptionPeriod)}else{b.find('[data-role="subPeriod"]').addClass("none")}q=b.find('[data-role="sku"]');for(var R=0;R<u.length;++R){if(u[R].advanced){z.push(u[R].values)}}b.on("click.product",'[data-role="addToCart"]',l);b.on("change.product",'select, input, [name="orderQuantity"]',m);b.on("change.product","select",$.debounce(100,function(){var i=$(this);m();G(i.attr("name"),i.val())}));var Q=function(X,V){for(var i=0;i<u.length;++i){var W=u[i];if(W.name===X){if(W.images&&W.images[V]&&W.images[V].length){return W.images[V]}break}}return[]};var G=function(Y,W){var V=Q(Y,W);if(V.length===0){for(var i=0;i<n.variation.length;++i){var X=n.variation[i];V=Q(X.name,X.value);if(V.length){break}}}if(V.length===0){V=J.images}L(V)};if(t){var v=false;for(var U=0;U<f.length;++U){v=f[U].quantity!==0;if(v){break}}t=v}if(w.noQuantity||J.withSubscription||J.type==="membership"||J.type==="digital"){b.find(".qty-wrapper").hide()}j=(a||h.data("process"))==="buy";h.text(r?WebPlatform.Phrases["label.update"]:(!j?WebPlatform.Phrases["label.add_to_cart"]:WebPlatform.Phrases["label.buy_now"]));if(r){b.find('[name="orderQuantity"]').val(r.quantity||1)}if(t){var M=g.find(".advanced-variation");M.each(function(V,W){var i=$(this).data("idx",V);i.change(function(){var Y=$(this);var X=Y.data("idx");if((X+1)<M.length){var ac="";for(var aa=0;aa<=X;++aa){if(ac!==""){ac+=" \u25CF "}ac+=M.eq(aa).val()}if(ac!==""){ac+=" \u25CF "}var ab=M.eq(X+1);var Z=ab.find("option").prop("hidden",true);Z.each(function(){var ae=ac+this.value;for(var ad=0;ad<f.length;++ad){if(f[ad].quantity!==0){if(f[ad].name.indexOf(ae+" \u25CF ")===0||f[ad].name===ae){this.hidden=false}}}});if(ab.find("option:selected").is("[hidden]")){ab.find("option:not([hidden])").eq(0).prop("selected",true)}ab.change()}if(X===0&&!m()){var ab=M.eq(0);ab.find("option:selected").prop("hidden",true);ab.find("option:not([hidden])").eq(0).prop("selected",true);ab.change();m()}})});if(M.length>0){M.eq(0).change()}}m()},getOrderItemsToReport:function(b){var a=[];b.forEach(function(c){a.push({id:c.productId,quantity:c.quantity,item_price:c.price})});return a},getOrderProductIds:function(b){var a=[];b.forEach(function(c){a.push(c.productId)});return a},reportPurchase:function(a,g,f,e,c){var d=WebPlatform.Store.getOrderItemsToReport(g);WebPlatform.Events.trigger($("body"),WebPlatform.Events.ORDER_COMPLETED,{currency:(c||WebPlatform.Store.currency),total:f,items:d});if(WebPlatform.Store.fbPxId){var b=WebPlatform.Store.getOrderProductIds(g);
90window.fbq("track",(e||"Purchase"),{contents:d,content_ids:b,currency:(c||WebPlatform.Store.currency),value:f,content_type:"product",num_items:d.length})}if(window.gtag){gtag("event","purchase",{transaction_id:a+"",value:f,currency:(c||WebPlatform.Store.currency),items:WebPlatform.Store._getOrderProductsForGA(g)})}else{if(window.dataLayer&&window.dataLayer.push){window.dataLayer.push({event:"ecommerce",ecommerce:{purchase:{actionField:{id:a+"",revenue:f},products:WebPlatform.Store._getOrderProductsForGA(g)}}})}}},reportRemoveFromCart:function(b,a){var c=[];if(b.variation&&b.variation.length){b.variation.forEach(function(d){c.push(d.value)})}WebPlatform.Events.trigger($("body"),WebPlatform.Events.ORDER_REMOVE_FROM_CART,{currency:(a||WebPlatform.Store.currency),items:[{id:b.productId,name:b.title,price:b.price/b.quantity,variant:c.length?c.join(", "):"",quantity:b.quantity}]});if(window.gtag){gtag("event","remove_from_cart",{currency:a||WebPlatform.Store.currency,items:[{id:b.productId,name:b.title,price:b.price/b.quantity,variant:c.length?c.join(", "):"",quantity:b.quantity}]})}else{if(window.dataLayer&&window.dataLayer.push){window.dataLayer.push({event:"ecommerce",ecommerce:{currencyCode:(a||WebPlatform.Store.currency).toUpperCase(),remove:{products:[{id:b.productId,name:b.title,price:b.price/b.quantity,variant:c.length?c.join(", "):"",quantity:b.quantity}]}}})}}},reportAddToCart:function(d,c,a){var b=[];if(c.variation&&c.variation.length){c.variation.forEach(function(e){b.push(e.value)})}WebPlatform.Events.trigger($("body"),WebPlatform.Events.ORDER_ADD_TO_CART,{currency:(a||WebPlatform.Store.currency),items:[{id:d.id,name:d.title,price:c.price,variant:b.length?b.join(", "):"",quantity:c.quantity}]});if(WebPlatform.Store.fbPxId){window.fbq("track","AddToCart",{content_ids:[""+d.id],content_type:"product",content_name:d.title,currency:(a||WebPlatform.Store.currency),value:c.price,num_items:c.quantity})}if(window.gtag){gtag("event","add_to_cart",{currency:a||WebPlatform.Store.currency,items:[{id:d.id,name:d.title,price:c.price,variant:b.length?b.join(", "):"",quantity:c.quantity}]})}else{if(window.dataLayer&&window.dataLayer.push){window.dataLayer.push({event:"ecommerce",ecommerce:{currencyCode:(a||WebPlatform.Store.currency).toUpperCase(),add:{products:[{id:d.id,name:d.title,price:c.price,variant:b.length?b.join(", "):"",quantity:c.quantity}]}}})}}},_getOrderProductsForGA:function(a){var b=[];a.forEach(function(d){var c=[];if(d.variation&&d.variation.length){d.variation.forEach(function(e){c.push(e.value)})}b.push({id:d.productId,name:d.title,price:d.price/d.quantity,variant:c.length?c.join(", "):"",quantity:d.quantity})});return b},reportInitiateCheckout:function(a,b){if(a===null||!a.items||a.items.length===0){return}WebPlatform.Events.trigger($("body"),WebPlatform.Events.ORDER_INITIATE_CHECKOUT,{currency:(b||WebPlatform.Store.currency),items:WebPlatform.Store._getOrderProductsForGA(a.items)});if(WebPlatform.Store.fbPxId){window.fbq("track","InitiateCheckout",{content_type:"product",contents:WebPlatform.Store.getOrderItemsToReport(a.items),content_ids:WebPlatform.Store.getOrderProductIds(a.items),currency:b||WebPlatform.Store.currency,value:a.total,num_items:a.items.length})}if(window.gtag){gtag("event","begin_checkout",{currency:b||WebPlatform.Store.currency,items:WebPlatform.Store._getOrderProductsForGA(a.items)})}else{if(window.dataLayer&&window.dataLayer.push){window.dataLayer.push({event:"ecommerce",ecommerce:{checkout:{actionField:{step:1},products:WebPlatform.Store._getOrderProductsForGA(a.items)}}})}}},reportAddPaymentDetails:function(a,b){if(WebPlatform.Store.fbPxId){window.fbq("track","AddPaymentInfo",{content_type:"product",contents:WebPlatform.Store.getOrderItemsToReport(a.items),content_ids:WebPlatform.Store.getOrderProductIds(a.items),currency:b||WebPlatform.Store.currency,value:a.total})}if(window.gtag){gtag("event","add_payment_info",{currency:b||WebPlatform.Store.currency,items:WebPlatform.Store._getOrderProductsForGA(a.items)})}else{if(window.dataLayer&&window.dataLayer.push){window.dataLayer.push({event:"ecommerce",ecommerce:{checkout:{actionField:{step:2},products:WebPlatform.Store._getOrderProductsForGA(a.items)}}})}}},goToThankYouPage:function(a,b){a=WebPlatform.parse(a);var c=function(d){if(d.toLowerCase().trim().indexOf("http")===0){ClientTools.showLoader()}window.location.href=d};b=(b||"").trim();if(b.toLowerCase().indexOf("javascript:")===0){if(b.toLowerCase().replace(/'"/g,"").indexOf("webplatform.funnels.show(next)")>-1){b="javascript:WebPlatform.Funnels.show('next', false, false)"}}if(WebPlatform.Funnels.isInFunnel()){WebPlatform.Funnels.tryShowNextUpsell(a||0,function(){c(b)})}else{c(b)}}});WebPlatform.Popups=WebPlatform.Popups||{};WebPlatform.Popups.POPUP_MARKUP='<div data-id="%id%" id="platform-popup-%id%" class="popup-wrapper %animationClass% %bgClass% %positionClass% %overlayBgClass%"><div class="popup-overlay" style="%overlayBg%;"></div></div>';WebPlatform.Popups.POPUP_BOX_MARKUP='<div class="wrapping-table">     <div class="popup-container" style="width: %width%;">       <div class="popup-container-inner">         <a class="popup-close-btn %btnColorClass%" style="%btnColor%;">&#10005;</a>         <div class="popup-content-wrapper %contentBgColorClass%" style="%contentBgColor%; padding: %contentPadding%px; %contentSize%"><div class="popup-content"></div></div>         <div class="popup-background-wrapper" style="%bgSize%"></div>       </div>
90     </div>   </div>';WebPlatform.Popups.prompt=function(d,c,b,e){var a='            <div class="simple-client-popup">              <h4>'+d+'</h4>              <div class="col20 f-left text-center mt-45">                <a data-role="close" class="inline-block text-btn" style="margin-right: auto; font-size: 14px;">'+(e||WebPlatform.Phrases["label.no"])+'</a>                <button data-role="confirm" class="save-changes inline-block mt-0" data-role="confirm">'+(b||WebPlatform.Phrases["label.yes"])+"</button>              </div>            </div>";WebPlatform.Popups.showSimplePopup(a,400,function(f,g){g.find('[data-role="confirm"]').click(function(){f.close();(c||dummy)()})})};WebPlatform.Popups.showSimplePopup=function(c,b,e){var a=$('<div class="popup-wrapper at-center simple-popup">         <div class="popup-overlay" style="background: rgba(0, 0, 0, 0.7);"></div>           <div class="popup-container" style="width: '+b+'px;">             <a class="close-btn"></a>'+c+"</div>       </div>");var d=function(){a.removeClass("visible");WebPlatform.onTransitionEnd(a,function(){a.remove();a=null},300)};a.one("click",'.close-btn, [data-role="close"]',d);$("body").append(a);WebPlatform.delay(20,function(){a.addClass("visible");(e||dummy)({close:d},a)})};WebPlatform.Popups.setDefaults=function(a){mergeUnique(a,{name:"",pages:[],showOnExit:false,animationType:"popup-fade",showPopupWithDelay:false,popupDelay:3,showPopupOnScroll:false,scrollDistance:15,popupShowFrequency:"once",size:50,overlayColor:"#000000",overlayColorClass:"",overlayTransparency:30,closeBtnColor:"#000000",closeBtnColorClass:"",contentBgColor:"#ffffff",contentBgColorClass:"",contentPadding:30,backgroundType:"background-none",position:"at-center",width:500,height:300,bgImage:"none",bgImageBase:"",bgColor:"#333333",bgRepeat:"no-repeat",bgSize:"cover",bgPosition:"center center",showOnMobile:false,thumbImage:"none",thumbImageBase:"",visibleAsTemplate:false});return a};WebPlatform.Popups.setBackground=function(b,d){var h=b.find(".popup-background-wrapper");var f=d.bgRepeat;var e=d.bgSize;var a=d.bgPosition;var g=d.bgImage==="none"?"none":"url("+getFileFromBase(d.bgImageBase)+d.bgImage+")";var c=d.bgColor;h.css({backgroundColor:c,backgroundPosition:a,backgroundImage:g,backgroundRepeat:f,backgroundSize:e})};WebPlatform.Popups.show=function(c,f,g,e){var h,a,d,b=false;if(typeof c==="object"){h=c.id;a=c.funnelId;d=c.variant;b=c.isTemplate===true}else{h=c}if($("#platform-popup-"+h).length>0){return}WebPlatform.makeClientWebsiteRequest({action:"getPopup",data:{id:h,funnelId:a,variant:d,preview:f?"":WebPlatform.getUrlQueryParameter(window.location.href,"preview"),edit:!!f,isTemplate:b},onOk:function(n){var m=n.data.settings||{};var p=n.data.content||"";m.name=n.data.name;WebPlatform.Popups.setDefaults(m);var k,o,r=m.backgroundType==="background-top"||m.backgroundType==="background-bottom";if(r){k="";o="height: "+m.size+"px;"}else{k="width: "+m.size+"%;";o="width: "+(100-m.size)+"%;"}var q,l="";if(m.overlayColor.startsWith("#")){q="background: "+WebPlatform.hexToRgba(m.overlayColor,(100-m.overlayTransparency)/100)}else{q="background: "+m.overlayColor;if(m.overlayColorClass){l="bg-color-"+m.overlayColorClass;q=""}}var i=$(WebPlatform.format(WebPlatform.Popups.POPUP_MARKUP,"id",h,"bgClass",m.backgroundType,"positionClass",m.position,"animationClass",m.animationType,"overlayBg",q,"overlayBgClass",l));i.append(WebPlatform.format(WebPlatform.Popups.POPUP_BOX_MARKUP,"width",m.width+"px","height",m.height+"px","btnColor",m.closeBtnColorClass?"":("color: "+m.closeBtnColor+";"),"btnColorClass",m.closeBtnColorClass?"color-"+m.closeBtnColorClass:"","contentBgColor",m.contentBgColorClass?"":("background: "+m.contentBgColor+";"),"contentBgColorClass",m.contentBgColorClass?"bg-color-"+m.contentBgColorClass:"","contentPadding",m.contentPadding,"contentSize",k,"bgSize",o));var j=$(".theme");j.append(i);i.find(".popup-content").html(p);WebPlatform.Popups.setBackground(i,m);i.data("popupShowFrequency",m.popupShowFrequency);i.data("editing",f);if(!f){i.find(".popup-close-btn").click(function(){var s=$(this).closest(".popup-wrapper").data("id");WebPlatform.Popups.hide(s,e||dummy)})}WebPlatform.processAccumulatedRequests();i.on(WebPlatform.Events.FORM_SUBMITTED,function(s,t){WebPlatform.delay(3500,function(){WebPlatform.Popups.hide(h,e||dummy)})});WebPlatform.delay(30,function(){i.addClass("visible");WebPlatform.onTransitionEnd(i,function(){i.addClass("displayed");if(window.ClientTools){window.ClientTools.refreshForms();window.ClientTools.refreshLightboxes();window.ClientTools.refreshCountdowns();window.ClientTools.refreshToggles();window.ClientTools.refreshDelayedWidgets();$window.scroll()}(g||dummy)(h,m,i)},300)})}})};WebPlatform.Popups.hidden=[];WebPlatform.Popups.hide=function(e,c){var b=$("#platform-popup-"+e);
90if(b.length>0&&!b.hasClass("is-hiding")){b.addClass("is-hiding");var a=b.data("editing")===true,d=b.data("popupShowFrequency");b.off(WebPlatform.Events.FORM_SUBMITTED);WebPlatform.Popups.hidden.push(e);b.removeClass("visible displayed");WebPlatform.onTransitionEnd(b,function(){b.remove();(c||dummy)()},300);if(!a&&d!=="always"){if(d==="once"){Cookies.set("platform-popup-"+e,1,{expires:365,path:"/"})}else{Cookies.set("platform-popup-"+e,1,{path:"/"})}}}};WebPlatform.Popups.registerPagePopups=function(c){var d=[];var e=[];for(var a=0;a<c.length;++a){var b=c[a];b.settings=b.settings||{};WebPlatform.Popups.setDefaults(b.settings);if(b.settings.popupShowFrequency!=="always"&&Cookies.get("platform-popup-"+b.id)||WebPlatform.isMobile()&&!b.settings.showOnMobile){continue}Cookies.remove("platform-popup-"+b.id);if(b.settings.showOnExit){d.push(b)}if(b.settings.showPopupWithDelay){WebPlatform.delay(b.settings.popupDelay*1000,(function(f){return function(){if(WebPlatform.Popups.hidden.indexOf(f)===-1){WebPlatform.Popups.show(f,false,dummy)}}})(b.id))}if(b.settings.showPopupOnScroll){e.push(b)}}if(d.length>0){$document.on("mouseout.popups",function(g){if(g.clientY>=50||g.target.tagName.toLowerCase()==="input"||g.clientX>=($(window).innerWidth()-50)||g.relatedTarget||g.toElement){return}$document.off("mouseout.popups");for(var f=0;f<d.length;++f){if(WebPlatform.Popups.hidden.indexOf(d[f].id)===-1){WebPlatform.Popups.show(d[f].id,false,dummy)}}})}if(e.length>0&&window.ClientTools){window.ClientTools.addOnScrollListener($.debounce(300,function(){var j=$window.scrollTop(),k=$document.height(),i=$window.height();var g=(j/(k-i))*100;for(var f=0;f<e.length;++f){var h=e[f];var l=h.settings.scrollDistance||101;if(g>=l&&(WebPlatform.Popups.hidden.indexOf(h.id)===-1)){WebPlatform.Popups.show(h.id,false,dummy)}}}))}};WebPlatform.Events=WebPlatform.Events||{};WebPlatform.Events.ORDER_COMPLETED="platform.events.order_completed";WebPlatform.Events.ORDER_CHANGED="platform.events.order_changed";WebPlatform.Events.ORDER_ADD_TO_CART="platform.events.order_add_to_cart";WebPlatform.Events.ORDER_REMOVE_FROM_CART="platform.events.order_remove_from_cart";WebPlatform.Events.ORDER_INITIATE_CHECKOUT="platform.events.order_initiate_checkout";WebPlatform.Events.FORM_SUBMITTED="platform.events.client_form_submited";WebPlatform.Events.PAGE_LOADED="platform.events.page_loaded";WebPlatform.Events.CONFIGURATION_CHANGED="platform.events.configuration_changed";WebPlatform.Events.WEBSITE_SUBSCRIBED="platform.events.website_subscribed";WebPlatform.Events.WEBSITE_CANCELED="platform.events.website_canceled";WebPlatform.Events.NEW_REGISTRATION="platform.events.new_registration";WebPlatform.Events.trigger=function(f,a,c){try{if(f instanceof jQuery){f=f[0]}var b=new CustomEvent(a,{bubbles:true,cancelable:true,detail:c});f.dispatchEvent(b)}catch(d){Log.error("Unable to dispatch event "+a+"!");Log.error(d)}};WebPlatform.Countdown=WebPlatform.Countdown||{};WebPlatform.Countdown.create=function(a){if(a.length<0||a.hasClass("with-countdown")){return}a.each(function(H,E){var E=$(E),L=E.data("type"),F=WebPlatform.parse(E.data("date"),0),g=WebPlatform.parse(E.data("hours"),1),B=WebPlatform.parse(E.data("minutes"),0),k=WebPlatform.parse(E.data("seconds"),0),p=WebPlatform.parse(E.data("start"),100),l=WebPlatform.parse(E.data("end"),0),d=WebPlatform.parse(E.data("interval"),1),A=E.data("reset")===true,h=E.data("link")||"",b=E.data("target")||"_self",D=E.data("onend")||"",J=E.data("showdays")!==false,t=E.data("showseconds")!==false,q=E.data("color")||"#ffffff",w=E.data("bgcolor")||"#333333",i=WebPlatform.parse(E.data("size"),70),x=E.data("labelcolor")||"#333333",o=WebPlatform.parse(E.data("labelsize"),14),v=WebPlatform.parse(E.data("uid"),7),I=null;E.addClass("with-countdown");var n=$(".theme").width();var j=function(){I.timer._destroyTimer();if(D==="link"){if(window.ClientTools){window.location.href=h}}else{if(D==="message"){E.slideUp("fast",function(){E.closest(".widget").find(".flip-countdown-end").slideDown("fast")})}}};var r=WebPlatform.getCookieName("time-cd-"+v);if(L==="number"){var m=p;if(A){Cookies.remove(r,{path:"/"})}else{var C=new Date().getTime();var u=C;var s=Cookies.get(r)||"";if(s){var G=s.split(":");if(G.length===2){var K=p+"|"+l+"|"+d;if(K===G[0]){u=WebPlatform.parse(G[1])||0;if(u===0){u=C}}}}if(s!==(p+"|"+l+"|"+d+":"+u)){Cookies.set(r,p+"|"+l+"|"+d+":"+u,{expires:7,path:"/"})}if(u>0){var e=Math.floor(((C-u)/1000)/d);m=p+(p>l?-1:1)*e}}var z=p>l;var y=z&&m<=l||(!z)&&m>=l;if(y){m=l}I=E.FlipClock(m,{clockFace:"Counter",color:q,bgColor:w,size:i,labelColor:x,labelSize:o});E.data("clock",I);if(y){j()}else{var c=function(){if(z){--m;
90I.decrement()}else{++m;I.increment()}if(z&&m<=l||(!z)&&m>=l){j()}else{WebPlatform.delay(d*1000,c)}};WebPlatform.delay(d*1000,c)}}else{var f=0;if(L==="date"){var f=(F-(new Date().getTime()))/1000;if(f<0){f=0}}else{f=k+B*60+g*60*60;if(A){Cookies.remove(r,{path:"/"})}else{var C=new Date().getTime();var u=C;var s=Cookies.get(r)||"";if(s){var G=s.split(":");if(G.length===2){var K=WebPlatform.parse(G[0])||0;if(K===f){u=WebPlatform.parse(G[1])||0;if(u===0){u=C}}}}if(s!==(f+":"+u)){Cookies.set(r,f+":"+u,{expires:7,path:"/"})}f=f-(C-u)/1000}if(f<0){f=0}}if(f===0){WebPlatform.delay(1000,j)}I=E.FlipClock(f,{clockFace:J?"DailyCounter":"HourlyCounter",showSeconds:t,countdown:true,defaultLanguage:"custom",color:q,bgColor:w,size:i,labelColor:x,labelSize:o,callbacks:{stop:function(){j()}},localize:function(M,N){return WebPlatform.Phrases["label."+M.toLowerCase()]||M}});E.data("clock",I)}})};WebPlatform.Countdown.destroy=function(b){if(!(b instanceof jQuery)){return}if(!b.hasClass("flip-countdown")){b=b.find("flip-countdown")}if(!b.hasClass("with-countdown")){return}b.removeClass("with-countdown");var a=b.data("clock")||null;if(a===null){return}a.timer._destroyTimer()};WebPlatform.Countdown.get=function(a){if(a.hasClass("with-countdown")){return a.data("clock")||null}return a.find(".with-countdown").data("clock")||null};WebPlatform.Funnels=WebPlatform.Funnels||{};WebPlatform.Funnels.currentStep=null;WebPlatform.Funnels.currentStepVariant=null;WebPlatform.Funnels.isInFunnel=function(){return WebPlatform.Funnels.steps&&WebPlatform.Funnels.steps.length>0};WebPlatform.Funnels.showNextStepOrCheckout=function(){if(!WebPlatform.Funnels.show("next",true)){window.location.href=WebPlatform.Store.baseUrl+"/cart"}};WebPlatform.Funnels.showNextStepOrDownsell=function(j,b,i){var g=WebPlatform.Funnels.steps||[];if(!g.length){return}var c=null,a=-1;for(var h=0;h<g.length;++h){if(g[h].id===j){c=g[h];a=h;break}}if(c!==null){var d=a+1;var e=g.length>d?g[d]:null;if(e!==null){if(c.kind==="UPSELL"&&e.kind==="DOWNSELL"&&i){return WebPlatform.Funnels.show(e.funnelId+"|"+e.id,b)}else{var f=c.kind==="UPSELL"||c.kind==="DOWNSELL";while(e!==null&&((!f&&e.kind==="UPSELL")||e.kind==="DOWNSELL")){++d;e=g.length>d?g[d]:null}if(e!==null){return WebPlatform.Funnels.show(e.funnelId+"|"+e.id,b)}}}}};WebPlatform.Funnels.tryShowNextUpsell=function(h,d){var c=WebPlatform.Funnels.steps||[];if(!c.length){return}var f=null,e=-1;for(var b=0;b<c.length;++b){if(c[b].id===h){f=c[b];e=b;break}}if(f===null){d();return}var g=e+1;var a=c.length>g?c[g]:null;while(a!==null&&a.kind==="DOWNSELL"){++g;a=c.length>g?c[g]:null}if(a!==null&&a.kind==="UPSELL"){WebPlatform.Funnels.show(a.funnelId+"|"+a.id)}else{d()}};WebPlatform.Funnels.show=function(d,b,l){var j=WebPlatform.Funnels.steps||[];if(!j.length){return}if(d==="next"){if(WebPlatform.Funnels.currentStep){return WebPlatform.Funnels.showNextStepOrDownsell(WebPlatform.Funnels.currentStep.id,b,l)}else{var f=window.location.pathname.substring(1).split(/\//g);var m=decodeURIComponent(f[f.length-1]);if((f.length===1||f.length===2&&f[1]==="")&&(decodeURIComponent(f[0])===j[0].base||f[0]==="")){m=j[0].url}for(var k=0;k<j.length;++k){if(j[k].url===m){return WebPlatform.Funnels.showNextStepOrDownsell(j[k].id,b,l)}}}}else{var f=d.split(/\|/g);if(f.length<2){return}var i=WebPlatform.parse(f[0],-1,false);var g=WebPlatform.parse(f[1],-1,false);
90if(i<0||g<0||j[0].funnelId!==i){return}var d=null;for(var k=0;k<j.length;++k){if(j[k].id===g){d=j[k];break}}if(d===null){return}if(d.type==="POPUP"){WebPlatform.Popups.show({id:g,funnelId:i},false,function(){WebPlatform.Funnels.currentStep=d},(function(o,n){return function(){WebPlatform.Funnels.currentStep=o}})(WebPlatform.Funnels.currentStep,WebPlatform.Funnels.currentStepVariant))}else{var h=WebPlatform.getUrlQueryParameter(window.location.href,"preview");var e=d.host&&d.host===window.location.hostname;var c=e?"":("/"+(d.base||"")+"/");ClientTools.showLoader();var a=c+d.url;if(WebPlatform.lastFormParams){a+="?"+WebPlatform.lastFormParams}if(h){a+=(a.indexOf("?")>-1?"&":"?")+"preview="+h}window.location.href=a}if(b){return true}}};WebPlatform.Widgets.Checkout=function(u){if(!u.root||!u.root.length||u.root[0].offsetParent===null){return null}var o=null;var C=u.id||"cart";var K=u.layout==="1-step";var B=null;var b=(u.fields||[]).indexOf("billing")>-1;var v=u.root;var r=null,L={};var G=v.find('div[data-role="addressWrapper"]');var m=v.find(".store-policies");var F="address";var s=null,i=null,d=null;var k=null;var H=null;var l="";var J=false;v.data("inFunnel",!!u.funnel);var g=v.find('[name="additionalInfo"]');if(g.length>0&&g.hasClass("with-date")&&window.ClientTools){ClientTools.requestResource(resources+"/scripts/jquery-ui.js?v="+resourcesVersion,resources+"/styles/jquery-ui.min.css?v="+resourcesVersion,function(){return !!$.datepicker},function(){g.datepicker({dateFormat:WebPlatform.dateFormat})})}var A=function(M){M=M||{};M.orderId=C;M.products=JSON.stringify(u.products||[]);M.funnel=u.funnel;M.funnelStep=u.funnelStep;M.funnelStepVariant=u.funnelStepVariant;M.fields=(u.fields||[]).join(",");return M};var e=0;var E=function(){++e;if(e>1){return}if(window.ClientTools){ClientTools.showHideAjaxLoadingIndicator(false)}v.addClass("checkout-loading")};var h=function(){--e;if(e<0){e=0}if(e===0){if(window.ClientTools){ClientTools.showHideAjaxLoadingIndicator(true)}v.removeClass("checkout-loading")}};var c=function(O){var M={};O.find("input:not(:checkbox), select").each(function(){if(this.name!=="new_password"&&this.name!=="new_password_repeat"&&this.name!=="password"){M[this.name]=this.value}});if(O.find('input[name="useDifferentBillingAddress"]').is(":checked")){M.useDifferentBillingAddress=true}if(O.find('input[name="createAccount"]').is(":checked")){M.createAccount=true}var N=O.find(B.loginRequired?'[data-role="member-login"]':'[data-role="password"]');M.new_password=N.find('[name="new_password"]').val();M.new_password_repeat=N.find('[name="new_password_repeat"]').val();return M};var a=function(N,M){N.each(function(){var O=$(this);if(O.hasClass(M)){return}O.addClass(M).after('<i class="error-notification fa fa-exclamation-triangle" aria-hidden="true"></i>')})};var q=function(M){M.each(function(){var O=$(this);var N=O.next();if(N.hasClass("error-notification")){N.remove()}O.removeClass("field-invalid field-with-error")})};var z=function(Q,R){if(B.isSampleOrder){return}E();var P=c(R);var N=R.find(".form-field").not('[data-type="section"]');var M=ClientTools.readFormFields(N);if(M.hasErrors){h();return}else{P.values=M.values}P.order_extra=u.extra||"";var O={action:"orderEnterAddress",method:"post",data:A(P),onOk:function(U){var V=Q.find('[data-role="error-message"]');q(R.find(".field-with-error"));toggleDisplay(V,!!U.data.errors);if(U.data&&U.data.message){if(U.data.errors){var W=U.data.errors;for(var T=0;T<W.length;++T){a(R.find('[name="'+W[T]+'"]'),"field-with-error")}}else{var W=U.data.additionalFieldsErrors||[];var S=R.find(".form-field").not('[data-type="section"]');for(var T=0;T<W.length;++T){if(W[T]){a(S.eq(T),"field-invalid")}}}V.text(U.data.message).removeClass("none");h()}else{F="billing";if(P.createAccount&&U.data.member){WebPlatform.Members=WebPlatform.Members||{};WebPlatform.Members.current=U.data.member;WebPlatform.reportMemberRegistration()}B=U.data.order;WebPlatform.Store.Orders.set(C,B);t();x()}}};if(M.file){WebPlatform.makeClientWebsiteRequestWithFile(O,M.file)}else{WebPlatform.makeClientWebsiteRequest(O)}};var y=function(V,X,R,Q){if(B.isSampleOrder){return}if(R.hasClass("disabled")){return}R.addClass("disabled");var N="";var S=X.find('[name="paymentOption"]:checked');if(S.length>0){N=S.val()}
90var P=Q?c(Q):null;var T=function(Y){ClientTools.resetRecaptcha(V,R);ClientTools.showMessageBox(Y,R,"before",true,10000)};var M=function(ab,ad){E();var af=A({method:N,token:ab,order_extra:u.extra||"",resubmit:ad===true});if(P){af.withAddress=true;$.extend(af,P)}v.removeClass("has-incomplete-items");var ae={action:"completeOrder",method:"post",data:af,onOk:function(ag){var aq=ag.data;var aw=Q&&af.createAccount&&aq.member;if(Q){q(Q.find(".field-with-error"))}if(aq.order){B=aq.order;WebPlatform.Store.Orders.set(C,B)}if(aw){WebPlatform.Members=WebPlatform.Members||{};WebPlatform.Members.current=aq.member;WebPlatform.reportMemberRegistration();j(Q)}if(aq.message){R.removeClass("disabled");if(aq.message==="HAS_INCOMPLETE_ITEMS"){T(WebPlatform.Phrases["err.select_product_variants"]);v.addClass("has-incomplete-items")}else{if(aq.message==="HAS_INVALID_PAYMENT_METHOD"){T("Selected payment method is not supported for subscriptions!")}else{if(aq.message==="INITIATE_PAYSTACK_PAYMENT"){R.addClass("disabled");var an=Math.round(B.total*100);var ai=PaystackPop.setup({key:L.paystackPublicKey,email:B.customerEmail,amount:an,currency:WebPlatform.Store.currency,callback:function(aE){M(aE.reference,true)},onClose:function(){R.removeClass("disabled")}});ai.openIframe()}else{if(N==="stripe"&&aq.payload&&aq.payload.extra&&(aq.message==="requires_action"||aq.message==="requires_payment_method")){R.addClass("disabled");var aj=aq.payload.extra||[];var aB=aj.length?aj[0]:"";var am={payment_method:{card:d.elements}};if(P&&P.name||B.customerName){am.payment_method.billing_details={name:P&&P.name?P.name:B.customerName}}E();d.stripe.confirmCardPayment(aB,am).then(function(aE){h();if(aE.error){Log.error(aE.error);message=aE.error.message||aE.error;T(message);R.removeClass("disabled")}else{M(aE.paymentIntent.id,true)}})}else{T(aq.message)}}}}var aC=null;if(Q&&aq.errors&&aq.errors.length){for(var av=0;av<aq.errors.length;++av){var aA=Q.find('[name="'+aq.errors[av]+'"]');a(aA,"field-with-error");if(aC===null){aC=aA}}}else{if(aq.additionalFieldsErrors&&aq.additionalFieldsErrors.length){var ap=aq.additionalFieldsErrors;var az=V.find(".form-field").not('[data-type="section"]');for(var av=0;av<ap.length;++av){if(ap[av]){var aA=az.eq(av);a(aA,"field-invalid");if(aC===null){aC=aA}}}}}if(aA){WebPlatform.scrollIntoView(aC.parent())}return}var ax=aq.payload;var ay=function(aE){if(WebPlatform.forceCheckoutThankYouPage){aE=WebPlatform.forceCheckoutThankYouPage()}WebPlatform.Store.reportPurchase(B.id,B.items,B.total);WebPlatform.delay(80,function(){WebPlatform.Store.goToThankYouPage(u.funnelStep,aE);toggleDisplay(v.find(".checkout-info"),false);toggleDisplay(v.find(".checkout-summary"),false);toggleDisplay(v.find('[data-step="complete"]'),true)})};var at=function(aE){aE=aE||"";if(aE.toLowerCase().trim().indexOf("http")===0){ClientTools.showLoader()}toggleDisplay(v.find(".checkout-info"),false);toggleDisplay(v.find(".checkout-summary"),false);toggleDisplay(v.find('[data-step="complete"]'),true);window.location.href=aE};if(ax.review){if(ax.cartUpdatedMessage){T(ax.cartUpdatedMessage)}R.removeClass("disabled")}else{if(!ax.redirect){ay(WebPlatform.Store.baseUrl+"/checkout/completed?m="+ax.method)}else{if(N==="paypal"||N==="stripe-ideal"||N==="klarna"||N==="unipay"||N==="mollie"){at(ax.redirect)}else{if(N==="twispay"){var al=$('<div class="hidden"></div>');var ah=$('<form method="POST" action="'+ax.redirect+'"></form>');for(var aD in ax.data){var ar=$('<input type="hidden" />').attr("name",aD).attr("value",ax.data[aD]);ah.append(ar)}al.append(ah);$(document.body).append(al);ah.submit();ClientTools.showLoader()}else{if(N==="payfast"){var ak="https://"+(L.payfastInSandbox?"sandbox":"www")+".payfast.co.za/eng/process";var al=$('<div class="hidden"></div>');var ah=$('<form method="POST" action="'+ak+'"></form>');for(var aD in ax.data){var ar=$('<input type="hidden" />').attr("name",aD).attr("value",ax.data[aD]);ah.append(ar)}al.append(ah);$(document.body).append(al);ah.submit();ClientTools.showLoader()}else{if(N==="afterpay"){AfterPay.redirect({token:ax.redirect})}else{if(N==="mobilpay"||N==="mobilpay-btc"||N==="mobilpay-sms"){var al=$('<div class="hidden"></div>');var ah=$('<form method="POST" action="'+ax.redirect+'"></form>');ah.append('<input type="hidden" name="env_key" value="'+ax.envKey+'" />');ah.append('<input type="hidden" name="data" value="'+ax.data+'" />');al.append(ah);$(document.body).append(al);ah.submit();ClientTools.showLoader()}else{if(N==="payulatam"){var au=ax.data;var ao=WebPlatform.Store.PayULatamInTestMode===true;var ak=ao?"https://sandbox.checkout.payulatam.com/ppp-web-gateway-payu/":"https://checkout.payulatam.com/ppp-web-gateway-payu/";var ah='<form method="post" action="'+ak+'">                       <input name="merchantId"    type="hidden"  value="'+au.merchantId+'" />                       <input name="accountId"     type="hidden"  value="'+au.accountId+'" />                       <input name="description"   type="hidden"  value="'+au.description+'" />                       <input name="referenceCode" type="hidden"  value="'+au.referenceCode+'" />                       <input name="amount"        type="hidden"  value="'+au.amount+'" />                       <input name="tax"           type="hidden"  value="'+au.tax+'" />                       <input name="taxReturnBase" type="hidden"  value="'+au.taxReturnBase+'" />                       <input name="currency"      type="hidden"  value="'+au.currency+'" />                       <input name="signature"     type="hidden"  value="'+au.signature+'" />                       <input name="algorithmSignature" type="hidden"  value="'+au.algorithmSignature+'" />';if(ao){ah+='<input name="test" type="hidden"  value="1" />'}ah+='<input name="buyerFullName" type="hidden"  value="'+au.buyerFullName+'" />                       <input name="buyerEmail"    type="hidden"  value="'+au.buyerEmail+'" />                       <input name="responseUrl"   type="hidden"  value="'+au.responseUrl+'" />                       <input name="confirmationUrl" type="hidden"  value="'+au.confirmationUrl+'" />';if(au.hasShipping){ah+='<input name="shippingAddress"   type="hidden"  value="'+au.shippingAddress+'" />                           <input name="shippingCity" type="hidden"  value="'+au.shippingCity+'" />                           <input name="shippingCountry" type="hidden"  value="'+au.shippingCountry+'" />'}ah+='<input name="Submit" type="submit" value="" />                     </form>';var al=$('<div class="hidden"></div>');al.append(ah);$(document.body).append(al);al.find("form").submit();ClientTools.showLoader()}else{ay(ax.redirect)}}}}}}}}},always:function(){h()},onNotOk:function(ag){Log.error("Action: "+af.action);R.removeClass("disabled");T((ag||{}).message||"There was an error processing your request!")}};var Y=V.find('[name="additionalInfo"]');var aa=null;if(Y.length){if(Y.attr("type")==="file"){aa=Y[0].files.length>0?Y[0].files[0]:null}else{af.additionalInfo=Y.val()}}else{var ac=V.find(".form-field").not('[data-type="section"]');var Z=ClientTools.readFormFields(ac);if(Z.hasErrors){R.removeClass("disabled");h();return}af.values=Z.values;aa=Z.file}if(aa===null){ClientTools.makeWebsiteRequest(ae)}else{WebPlatform.makeClientWebsiteRequestWithFile(ae,aa)}};if(N==="stripe"){M("")}else{if(N==="braintree"){R.addClass("disabled");E();s.requestPaymentMethod({threeDSecure:{amount:WebPlatform.currToStr(B.total<0.1?1:B.total,"",true,WebPlatform.Store.currency)}},function(Z,aa){h();R.removeClass("disabled");if(Z){var Y=(((Z.details||{}).originalError||{}).description||"");T((Z.message||Z)+(Y===""?"":(" - "+Y)))}else{if(aa.liabilityShiftPossible&&aa.liabilityShifted||!aa.liabilityShiftPossible){R.removeClass("disabled");M(aa.nonce)}else{T("Card authorization failed. Please try again")}}})}else{if(N==="2checkout"){R.addClass("disabled");TCO.loadPubKey("production",function(){var Y=function(ab){M(ab.response.token.token)};var aa=function(ab){R.removeClass("disabled");T(ab.errorMsg)};var Z={sellerId:L.twocheckoutSellerId,publishableKey:L.twocheckoutPublicKey,ccNo:X.find('input[data-twocheckout="card-number"]').val(),cvv:X.find('input[data-twocheckout="cvc"]').val(),expMonth:X.find('input[data-twocheckout="exp_month"]').val(),expYear:X.find('input[data-twocheckout="exp_year"]').val()};if(L.twocheckoutInSandbox){Z.demo="Y"}TCO.requestToken(Y,aa,Z)})}else{if(N==="afterpay"){AfterPay.init();M(N)}else{if(N==="paystack"){M("")}else{if(N==="authorize.net"){var O=X.find('[data-payment="authorize.net"]');var U=WebPlatform.parse(O.find('input[data-type="yyyy"]').val());if(U<100){U+=2000}var W={authData:{clientKey:L.authorizePublicClientKey,apiLoginID:L.authorizeApiLoginId},cardData:{cardNumber:O.find('input[data-type="card-number"]').val(),month:O.find('input[data-type="mm"]').val(),year:U,cardCode:O.find('input[data-type="cvc"]').val()}};window.Accept.dispatchData(W,function(Z){if(Z.messages.resultCode==="Error"){R.removeClass("disabled");var aa=Z.messages.message.length?Z.messages.message[0].text:Z.messages.message[0].text;for(var Y=0;Y<Z.messages.message.length;++Y){Log.error("Error auhtorizing payment with Authorize.net: "+Z.messages.message[Y].code+": "+Z.messages.message[Y].text)}T(aa)}else{M(JSON.stringify(Z.opaqueData))}})}else{M(N)}}}}}}};var w=function(T,M){toggleDisplay(G.children('[data-role="address-part"]'),B.shippingInfoRequired||!b);var N=T.find('[data-step="address"]').removeClass("none");var Q=T.find('[data-step="shipping"]');var P=T.find('[data-step="billing"]').removeClass("none");var S=T.find('[data-role="next-step"]');var R=T.find('[data-role="back"]');var O=T.find('[data-role="continue"]');toggleDisplay(S,false);toggleDisplay(R,false);toggleDisplay(O,false);toggleDisplay(N,false);toggleDisplay(Q,false);toggleDisplay(P,false);var U=u.layout!=="1-step";toggleDisplay(T.find('[data-role="second-step-items"]'),!U||U&&F!=="address");if(U){toggleDisplay(M,true);M.find(".checkout-step").removeClass("active").eq(F==="address"?0:1).addClass("active");if(F==="address"){toggleDisplay(S,true);toggleDisplay(N,true);f(N,Q);T.on("click.checkout",'a[data-role="next-step"]',function(){z(T,N)})}else{toggleDisplay(R,true);toggleDisplay(O,true);if(B.shippingInfoRequired){toggleDisplay(Q,true);n(Q)}toggleDisplay(P,true);p(P);T.on("click.checkout",'a[data-role="continue"]',function(){var V=$(this);y(T,P,V,null)});T.on("click.checkout",'a[data-role="back"]',function(){E();F="address";x()})}}else{toggleDisplay(O,true);toggleDisplay(N,true);f(N,Q);if(B.shippingInfoRequired){n(Q);toggleDisplay(Q,true)}toggleDisplay(P,true);p(P);T.on("click.checkout",'a[data-role="continue"]',function(){var V=$(this);y(T,P,V,N)})}};var j=function(W){var S=!!WebPlatform.Members.current;var T=W.find('[data-role="member-login"]');var X=W.find('[data-role="password"]');toggleDisplay(T,!S);toggleDisplay(X,!B.loginRequired&&!S);if(S){return}var P=B.loginRequired||(u.fields||[]).indexOf("registration")>-1;var V=T.find('[data-role="password-fields"]');var Z=W.find('input[name="name"]');var O=T.find('[data-role="login-btn"]');var N=O.find('a[data-role="showRegControls"]');var Q=O.find('a[data-role="showLoginControls"]');var Y=O.find('a[data-role="hideLoginControls"]');var M=O.find(".error-message");var U=T.find('[data-role="prompt-login"]');if(B.loginRequired){X.hide();V.show();U.show();Q.hide();N.show();Y.hide()}else{if(P){X.show();N.hide();Y.show();Q.show();V.hide();U.show()}else{X.hide();V.hide();U.hide()}}O.hide();if(W.hasClass("registration-initiated")){return}W.addClass("registration-initiated");var R=function(aa){E();WebPlatform.makeClientWebsiteRequest({action:"loginMember",data:{email:W.find('input[name="email"]').val(),password:W.find('input[name="password"]').val()},onOk:function(ab){toggleDisplay(M,!!ab.data.error);if(ab.data.error){M.text(ab.data.error).removeClass("none");h()}else{WebPlatform.Members=WebPlatform.Members||{};WebPlatform.Members.current=ab.data.member;WebPlatform.Store.Orders.reset(C);WebPlatform.Store.Orders.get(A({}),function(ac){B=ac;x()})}}})};W.on("click",'a[data-role="showRegControls"]',function(){U.slideDown("fast");O.slideUp("fast");V.slideDown("fast");Z.slideDown("fast")}).on("click",'a[data-role="hideLoginControls"]',function(){U.slideDown("fast");O.slideUp("fast");M.addClass("none");V.slideUp("fast");
90Z.slideUp("fast")}).on("click",'a[data-role="showLoginControls"]',function(){U.slideUp("fast");O.slideDown("fast");M.addClass("none");V.slideUp("fast");Z.slideUp("fast")}).on("change",'input[name="createAccount"]',function(){toggleDisplay(X.find(".password-fields-wrapper"),this.checked,true)}).on("click.checkout",'a[data-role="login"]',R).on("keyup.checkout",'input[name="password"]',function(aa){if(aa.which===13){R(aa)}})};var f=function(O,Q){var P=O.find(".address-title");if(B.shippingInfoRequired){P.text(P.data("shippingLabel")||WebPlatform.Phrases["label.shipping_address"])}else{P.text(P.data("billingLabel")||WebPlatform.Phrases["label.billing_address"])}toggleDisplay(O.find('[data-role="billing-info"]'),B.shippingInfoRequired);j(O);if(!window.ClientTools){h();return}var N=B.customerName?B.customerName:WebPlatform.Members.current?WebPlatform.Members.current.name:"";O.find('input[name="name"]').val(N);var M=O.find('input[name="email"]');M.val(B.customerEmail);if(WebPlatform.Members.current){M.prop("disabled",true)}if(B.shippingInfoRequired){O.find('input[name="useDifferentBillingAddress"]').prop("checked",B.shippingAddress&&!ClientTools.isAddressTheSame(B.shippingAddress,B.billingAddress))}if(O.hasClass("address-initiated")){h();return}O.addClass("address-initiated");WebPlatform.requestResource(resources+"/scripts/i18n/countries/"+locale+".js",null,function(){return window.COUNTRIES&&window.COUNTRIES.length},function(){var R=B.shippingAddress&&B.shippingAddress.country?B.shippingAddress.country:WebPlatform.Store.country.toUpperCase();var S=B.billingAddress&&B.billingAddress.country?B.billingAddress.country:WebPlatform.Store.country.toUpperCase();if(R==="EN"){R="US"}if(S==="EN"){S="US"}if(B.shippingAddress){for(var T in B.shippingAddress){O.find('input[name="shipping'+WebPlatform.capitalizeFirstLetter(T)+'"]').val(B.shippingAddress[T])}}if(B.billingAddress){for(var T in B.billingAddress){O.find('input[name="billing'+WebPlatform.capitalizeFirstLetter(T)+'"]').val(B.billingAddress[T])}}if(H){H.setCountry(R)}ClientTools.bindMemberAddressForm(O,R,S,function(W,V){return !B.shippingCountries||B.shippingCountries.length===0||V==="billing"||B.shippingCountries.indexOf(W)>-1},function(Y){var V=Y.attr("name");if(V==="shippingCountry"||V==="shippingState"||V==="shippingCompanyName"||V==="shippingZipCode"||V==="shippingCompanyId"){var Z=Y.val();if(!B.isSampleOrder){var X=function(){if(H){switch(V){case"shippingCountry":H.setCountry(Z.trim());break;case"shippingState":H.setState(Z.trim());break;case"shippingZipCode":H.setZip(Z.trim());break}}};var W=!B.shippingAddress||B.shipping===null&&B.shippingOptions&&B.shippingOptions.length||V==="shippingCountry"&&B.shippingAddress.country!==Z||V==="shippingState"&&B.shippingAddress.state!==Z||V==="shippingCompanyName"&&B.shippingAddress.companyName!==Z||V==="shippingCompanyId"&&B.shippingAddress.companyId!==Z;if(W){WebPlatform.makeClientWebsiteRequest({action:"orderEnterShippingDetails",method:"post",data:A({type:V,value:Z}),onOk:function(aa){B=aa.data;WebPlatform.Store.Orders.set(C,B);n(Q);X()}})}else{X()}}}});var U=$.debounce(250,function(){if(B.isSampleOrder||WebPlatform.Members.current){return}var W=$(this);var V=W.val().trim();if(V===""){q(W);return}WebPlatform.makeClientWebsiteRequest({action:"setOrderEmail",method:"post",data:A({email:V}),onOk:function(X){B=X.data;q(W)},onNotOk:function(){a(W,"field-with-error")}})});M.blur(U);h()})};var n=function(P){var O=B.shippingOptions||[];var M=P.find('div[data-role="shipping-methods"]');toggleDisplay(M.find(".error-message"),O.length===0);var N='<label class="tick-wrapper col20 f-left">             <input type="radio" name="shippingOption" data-country="%country%" data-order="%order%" data-kind="%kind%" %checked%>             <span><i class="fa fa-truck"></i>%name%</span>             <span class="price"> %price% </span>           </label>';var Q=false;M.find(".tick-wrapper").remove();O.forEach(function(S,R){var U="";if(B.shipping&&B.shipping.countryCode===S.countryCode&&B.shipping.order===S.order){U="checked";Q=true}var T="";if(S.kind==="system"||U&&S.calculated){T=WebPlatform.currToStr(S.cost,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency)}var V=$(WebPlatform.escapeFormat(N,"country",S.countryCode,"order",S.order,"checked",U,"name",S.name,"price",T,"kind",S.kind));M.append(V);if(U&&S.kind!=="system"&&H){H.renderOption(V,S)}});if(!Q){M.find('input[type="radio"]').eq(0).prop("checked",true).change()}};var p=function(af){var ae=B.total>=0.01;af.find(".tick-wrapper").addClass("none");var ai=false;
90B.items.forEach(function(au){if(au.isSubscription){ai=true}});var T=v.find(".recaptcha-target");var aq=T.length>0&&k===null;var W=ae&&!!L.stripeEnabled;var ao=ae&&L.stripeEnabled&&L.stripeIdealEnabled&&!ai;var ah=ae&&L.twispayEnabled;var Z=ae&&L.braintreeEnabled;var an=ae&&L.unipayEnabled;var al=ae&&L.mollieEnabled&&!ai;var at=ae&&L.authorizeEnabled;var O=ae&&L.twocheckoutEnabled&&!ai;var ak=ae&&L.payulatamEnabled&&!ai;var P=ae&&L.paypalEnabled&&!ai;var Q=ae&&L.klarnaEnabled&&!ai;var ap=ae&&L.afterpayEnabled&&!ai;var ad=ae&&L.mobilpayEnabled&&!ai;var U=ad&&L.mobilpayBitcoinEnabled&&!ai;var ab=ae&&L.paystackEnabled;var ar=ae&&L.payfastEnabled;var Y=!!L.afterpayInSandbox;var aj=!!L.authorizeInSandbox;var aa=!!L.payfastInSandbox;var V=L.bankEnabled&&!ai;var R=ae&&!L.codEnabled&&!V&&!W&&!L.paypalEnabled&&!L.klarnaEnabled&&!Z&&!O&&!ap&&!ad&&!ab&&!at&&!L.payulatamEnabled&&!ar&&!ah&&!an&&!al;toggleDisplay(af.find('[data-role="no-methods"]'),R);toggleDisplay(af.find(".payment-mehtods-wrapper"),!R);if(!ae){toggleDisplay(af.find('[data-payment="no-payment"]'),true)}else{toggleDisplay(af.find('[data-payment="no-payment"]'),false);toggleDisplay(af.find('[data-payment="stripe"]'),W);toggleDisplay(af.find('[data-payment="ideal"]'),ao);toggleDisplay(af.find('[data-payment="twispay"]'),ah);toggleDisplay(af.find('[data-payment="unipay"]'),an);toggleDisplay(af.find('[data-payment="mollie"]'),al);toggleDisplay(af.find('[data-payment="braintree"]'),Z);toggleDisplay(af.find('[data-payment="authorize.net"]'),at);toggleDisplay(af.find('[data-payment="2checkout"]'),O);toggleDisplay(af.find('[data-payment="payulatam"]'),ak);toggleDisplay(af.find('[data-payment="paypal"]'),P);toggleDisplay(af.find('[data-payment="klarna"]'),Q);toggleDisplay(af.find('[data-payment="afterpay"]'),ap);toggleDisplay(af.find('[data-payment="mobilpay"]'),ad);toggleDisplay(af.find('[data-payment="mobilpay-btc"]'),U);toggleDisplay(af.find('[data-payment="paystack"]'),ab);toggleDisplay(af.find('[data-payment="payfast"]'),ar);toggleDisplay(af.find('[data-payment="cod"]'),L.codEnabled);toggleDisplay(af.find('[data-payment="bank"]'),V);if(L.codEnabled){var ag=af.find('[data-payment="cod"]');ag.find('[data-role="button-label"]').text(L.codLabel||WebPlatform.Phrases["label.cod"]);var ac=ag.find('[data-role="codInfo"]');toggleDisplay(ac,L.codInfo);if(L.codInfo){ac.text(L.codInfo)}}if(V){var am=af.find('[data-payment="bank"]');am.find('[data-role="button-label"]').text(L.bankLabel||WebPlatform.Phrases["label.bank"]);var X=am.find('[data-role="bankInfo"]');toggleDisplay(X,V);if(L.bankInfo){X.text(L.bankInfo)}}}var N=af.find(".payment-mehtods-wrapper .tick-wrapper").not(".none");var M=N.find('input[name="paymentOption"]:checked');if(M.length){l=M.val()}else{l=N.first().find('input[name="paymentOption"]').prop("checked",true).val()}if(!ae&&!aq||!window.ClientTools||af.data("initialized")==="yes"){h();return}af.data("initialized","yes");var S=[];if(W){S.push({script:"https://js.stripe.com/v3/",check:function(){return !!window.Stripe}})}if(Z){S.push({script:"https://js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js",check:function(){return window.braintree&&window.braintree.dropin}})}if(O){S.push({script:"https://www.2checkout.com/checkout/api/2co.min.js",check:function(){return !!window.TCO}})}if(at){S.push({script:"https://"+(aj?"jstest":"js")+".authorize.net/v1/Accept.js",check:function(){return !!window.Accept}})}if(ap){S.push({script:"https://"+(Y?"portal-sandbox":"portal")+".afterpay.com/afterpay.js",check:function(){return !!window.AfterPay}})}if(ab){S.push({script:"https://js.paystack.co/v1/inline.js",check:function(){return !!window.PaystackPop}})}WebPlatform.requestScripts(S,function(){WebPlatform.Store.reportAddPaymentDetails(B,WebPlatform.Store.currency);if(aq){E();ClientTools.setupRecaptcha({ui:T,button:v.find('a[data-role="continue"]'),onLoaded:function(aw){h()}})}if(W){E();d={};d.stripe=Stripe(L.stripePublishableKey.trim());d.elements=d.stripe.elements({locale:WebPlatform.getStripeLocale()}).create("card",{hidePostalCode:window.stripeElementsHidePostalCode===false?false:true});var au=af.find(".stripe-card-element");
90d.elements.mount(au[0]);d.elements.addEventListener("change",function(aw){if(aw.error){WebPlatform.showClientError(aw.error.message,4000)}});h()}if(Z||O||at){var av=af.find(".ccv-pop");af.on("mouseover",".ccv-info",function(){av.fadeIn("fast")}).on("mouseout",".ccv-info",function(){av.fadeOut("fast")})}if(Z){E();s=null;i=null;WebPlatform.makeClientWebsiteRequest({action:"getClientPaymentToken",data:{type:"braintree"},onOk:function(aw){var ay=aw.data.token;var aA=v.closest(".widget").attr("id");var ax={authorization:ay,container:"#"+aA+" .braintree-element",threeDSecure:true,locale:WebPlatform.getLocaleName(locale)};if(L.braintreePayPalEnabled){ax.paypal={flow:"vault"};var az=v.find('[data-role="bt-payment-title"]');az.text(az.text()+" & PayPal")}window.braintree.dropin.create(ax,function(aB,aC){if(aB){WebPlatform.showClientError(aB.message||aB,4000);Log.error(aB);return}else{s=aC}})},always:function(){h()}})}h()})};var x=function(){var N=v.find('div[data-role="steps-breadcrumbs"]');toggleDisplay(N,false);m.find(".active").removeClass("active");m.find(".visible").removeClass("visible");var M=v.find(".checkout-info");M.addClass("none").off(".checkout");if(B===null||B.items.length===0){M.filter('[data-step="empty"]').removeClass("none");h()}else{var O=M.filter('[data-step="info"]').removeClass("none");w(O,N)}};var D=function(){var N=r&&r.termsOfService&&r.termsOfService.trim()!=="";var P=r&&r.refundPolicy&&r.refundPolicy.trim()!=="";var O=r&&r.privacyPolicy&&r.privacyPolicy.trim()!=="";if(!N&&!P&&!O){m.remove()}else{function M(Q,S,T,R){T=m.find('[data-type="'+T+'"]');S=m.find('[data-type="'+S+'"]');if(Q){T.children().html(R);S.click(function(){var U=!S.hasClass("active");m.find(".active").removeClass("active");m.find(".visible").removeClass("visible");if(U){S.addClass("active");T.addClass("visible")}})}else{S.remove();T.remove()}}M(N,"tos","tos-target",r.termsOfService.replace(/\n/g,"<br />"));M(O,"privacy","privacy-target",r.privacyPolicy.replace(/\n/g,"<br />"));M(P,"refunds","refunds-target",r.refundPolicy.replace(/\n/g,"<br />"))}};var t=$.debounce(150,function(N,O){var M=H&&B.shipping&&B.shipping.kind!=="system";if(!M&&(u.layout==="1-step"||F!=="address")){return}WebPlatform.makeClientWebsiteRequest({action:"shippingServiceRequest",method:"post",data:A({provider:H.getType(),type:"price",isCod:l==="cod",serviceId:N,officeId:O}),onOk:function(Q){var P=Q.data;WebPlatform.Store.Orders.set(C,P);WebPlatform.Events.trigger(document,WebPlatform.Events.ORDER_CHANGED,{id:C,order:P,withShippingPrice:true})}})});var I=function(){E();var M=u.pick&&u.products.length>1&&u.id!=="cart";var N=[];v.find('.bump-wrapper[data-default="true"]').each(function(){var O=$(this).find("input").data("bump");if(O){N.push(O)}});WebPlatform.Store.Orders.reset(C);WebPlatform.Store.Orders.get(A({policies:window.location.pathname===(WebPlatform.Store.baseUrl+"/checkout"),paymentOptions:true,pickProducts:M,pickProductIds:JSON.stringify(u.products),bumps:N.length?JSON.stringify(N):null}),function(R,P){B=R;r=P.policies||null;L=P.paymentOptions||{};D();WebPlatform.Store.Orders.bind({id:C,products:u.products,funnelId:u.funnel,funnelStepId:u.funnelStep,funnelStepVariantId:u.funnelStepVariant,pickProducts:M&&P.pickProducts&&P.pickProducts.length>0?P.pickProducts:[]},v);if(B){var Q=B.shippingOptions||[];if(Q.length>0){for(var O=0;O<Q.length;++O){if(Q[O].kind.startsWith("speedy-")){H=WebPlatform.Widgets.Speedy(o,u.root);break}}}}WebPlatform.Store.reportInitiateCheckout(B,WebPlatform.Store.currency);x();if(B&&B.items){B.items.forEach(function(S){if(S.bump){v.find('input[name="bump'+S.productId+'"]').prop("checked",true).closest(".bump-wrapper").addClass("bump-active")}})}if(window.ClientTools){ClientTools.setupFormFields(v)}v.on("change",".bump-wrapper input",function(){if(B.isSampleOrder){return}var V=$(this);var U=V.is(":checked");var T=V.data("bump");var S=B.total;WebPlatform.makeClientWebsiteRequest({action:"setOrderBump",data:A({product:T,add:U}),onOk:function(X){var W=X.data;WebPlatform.Store.Orders.set(C,W);WebPlatform.Events.trigger(document,WebPlatform.Events.ORDER_CHANGED,{id:C,order:W});V.closest(".bump-wrapper")[U?"addClass":"removeClass"]("bump-active")}})});v.on("click",".variations-update",function(V){var W=$(this).closest("[data-index]");var S=W.data("index");if(S<0){return}if(M&&P.pickProducts&&P.pickProducts.length){for(var U=0;U<B.items.length;++U){if(!B.items[U].bump){S=U;break}}}var T=B.items[S];if(T){WebPlatform.Store.showProductInQuickView(T.productId,A(),T,S)}});v.on("click",".checkout-item-cbx:not(.checked)",function(T){T.stopPropagation();T.preventDefault();var U=$(this).closest("[data-product]");var S=U.data("product");
90if(S<1){return}WebPlatform.Store.addProductToOrder(S,"replace",A())});v.on("change.checkout",'input[name="shippingOption"]',function(){if(B.isSampleOrder){return}var U=$(this);var W=U.data("country");var T=U.data("order");var V=!B.shipping||B.shipping.countryCode!==W||B.shipping.order!==T;if(V){var S=B.total;WebPlatform.makeClientWebsiteRequest({action:"orderSetShippingOption",method:"post",data:A({country:W,order:T,isCod:l==="cod"}),onOk:function(Y){var X=Y.data;WebPlatform.Store.Orders.set(C,X);WebPlatform.Events.trigger(document,WebPlatform.Events.ORDER_CHANGED,{id:C,order:X,withShippingPrice:true})}})}}).on("change.checkout",'input[name="paymentOption"]',function(){var T=l==="cod";l=this.value;var S=this.value==="cod";if(H&&(T&&!S||!T&&S)){t()}}).on("keypress.checkout",'input[name="shippingPhone"], input[name="billingPhone"]',function(T){var S=String.fromCharCode(T.which);if("01234567890+".indexOf(S)<0){return false}});document.addEventListener(WebPlatform.Events.ORDER_CHANGED,function(U,V){if(U.detail.id===C){var S=U.detail.order;var T=U.detail.withShippingPrice!==true;B=S;x();if(B.shippingInfoRequired&&T){t()}}})})};return{_init:function(){o=this;I();delete this._init;return this},getOrder:function(){return B}
90,recalculateShippingPrice:t,setOrderRequestParams:A,destroy:function(){}}._init()};WebPlatform.Widgets.Speedy=function(u,k){var l={BG:{id:100,requireState:false,addressType:1,siteNomen:1},RO:{id:642,requireState:false,addressType:1,siteNomen:1},GR:{id:300,requireState:false,addressType:2,siteNomen:0},TR:{id:792,requireState:false,addressType:2,siteNomen:0},RS:{id:688,requireState:false,addressType:2,siteNomen:0},GB:{id:826,requireState:false,addressType:2,siteNomen:0},DE:{id:276,requireState:false,addressType:2,siteNomen:0},FR:{id:250,requireState:false,addressType:2,siteNomen:0},IT:{id:380,requireState:false,addressType:2,siteNomen:0},US:{id:840,requireState:true,addressType:2,siteNomen:0}};var a={};var g=null;var h,p,f;var o=null;var q=null;var c=null;var s=null;var r=function(){var w=b();var v=o&&o.id?o.id:null;if(w.countryId===v&&w.siteId===q&&w.state===c&&w.zip===s){return}m({action:"shippingServiceRequest",method:"post",data:u.setOrderRequestParams({provider:g.getType(),type:"location",locationType:"setLocation",site:q,country:v,state:c,zip:s}),onOk:function(y){var x=u.getOrder();x.extra=x.extra||{};x.extra.speedy=y.data;u.recalculateShippingPrice()}})};var m=function(x){var w=WebPlatform.disableAjaxLoader;WebPlatform.disableAjaxLoader=true;var v=x.always||dummy;x.always=function(){WebPlatform.disableAjaxLoader=w;v()};WebPlatform.makeClientWebsiteRequest(x)};var n=function(){h=k.find('[data-step="address"]');p=h.find('[name="shippingCity"]');stateUi=h.find('[name="shippingState"]');f=h.find('[name="shippingZipCode"]');p.autocomplete({highlightClass:"ui-autocomplete-match",delay:100,minLength:1,autoFocus:true,source:function(x,v){if(o===null||o.siteNomen!==1){return}var w=x.term.trim();if(w.toLowerCase().startsWith("с.")||w.toLowerCase().startsWith("с ")||w.toLowerCase().startsWith("s ")||w.toLowerCase().startsWith("s.")){w=w.substr(2)}else{if(w.toLowerCase().startsWith("гр.")||w.toLowerCase().startsWith("гр ")||w.toLowerCase().startsWith("gr.")||w.toLowerCase().startsWith("gr ")){w=w.substr(3)}}m({action:"shippingServiceRequest",method:"post",data:{provider:g.getType(),type:"location",locationType:"site",country:o?o.id:null,name:w.trim()},onOk:function(y){var z=y.data;z.forEach(function(B){var A="";if(B.type){A=B.type+" "}A+=B.name;if(B.postCode){A+=", "+B.postCode}var C="общ. "+B.municipality+", обл. "+B.region;B.rowTop=A;B.rowBottom=C;B.value=B.name});v(z)}})},select:function(v,w){p.val(w.item.name);f.val(w.item.postCode);q=w.item.id;s=w.item.postCode||"";s.replace(/ /g,"");r();return false}}).attr("autocomplete","no").autocomplete("instance")._renderItem=function(v,w){return $("<li>").append("<div>"+w.rowTop+"<br>"+w.rowBottom+"</div>").appendTo(v)}};var b=function(){return mergeUnique((u.getOrder().extra||{}).speedy||{},{countryId:null,siteId:null,state:"",zip:""})};var j=function(v){v=(v||"").trim();if(v!==c){c=v;if(!o||!o.siteNomen){r()}}};var t=function(v){v=(v||"").trim();if(v!==s){s=v||"";s.replace(/ /g,"");if(!o||!o.siteNomen){r()}}};var e=null;var d=function(x){if(x==="EL"){x="GR"}var w=function(y){o=y;if(b().countryId!=y.id){q=null;c=null;s=null;p.val("");stateUi.val("");f.val("");r()}};var v=function(y){e=y;if(l[y]){w(l[y],y)}else{m({action:"shippingServiceRequest",method:"post",data:{locationType:"country",provider:g.getType(),type:"location",name:y},onOk:function(z){var A=z.data;if(A.length){l[y]=A[0];if(e!==y){d(e)}else{w(A[0])}}}})}};v(x)};var i=function(B,y){var v=(y.extra||{}).speedy||{};var A=b();var C=A.siteId;var z=y.kind==="speedy-office";var x=function(F){var D='<div class="col20 f-left speedy">';var E=!y.calculated&&(o===null||o.siteNomen===1&&C===0||o.siteNomen===0&&A.zip==="");if(E){D+='<span class="col20 f-left mt-15">'+WebPlatform.Phrases["label.enter_delivery_address"]+"</span>"}else{if(z){var H='<select class="col20 f-left mt-5" name="shippingOffice">';if(F.length===0){H+="<option selected disabled readonly>"+WebPlatform.Phrases["label.no_delivery_offices"]+"</option>"}else{F.forEach(function(L){var K=v.officeId===L.id?"selected":"";var J=L.name;if(L.address&&L.address.localAddressString){J+=" - "+L.address.localAddressString}H+=('<option value="'+L.id+'"'+K+">
90"+J+"</option>")})}H+="</select>";D+='<div class="col20 f-left mt-15"><span>'+WebPlatform.Phrases["label.select_speedy_office"]+"</span>"+H+"</div>"}if(!v.fixedPrice){var G=v.services||[];if(G.length===0||G.length>1){var I='<select class="col20 f-left mt-5" name="shippingService">';if(G.length===0){I+="<option selected disabled readonly>"+WebPlatform.Phrases["label.no_shipping_services"]+"</option>"}else{G.forEach(function(J){var K=v.serviceId===J.id?"selected":"";var L=WebPlatform.currToStr(J.cost,WebPlatform.Store.currencySymbol,WebPlatform.Store.currencySymbolAtLeft,WebPlatform.Store.currency);I+=('<option value="'+J.id+'"'+K+">"+J.name+" - "+L+"</option>")})}I+="</select>";D+='<div class="col20 f-left mt-15"><span>'+WebPlatform.Phrases["label.select_delivery_type"]+"</span>"+I+"</div>"}}}D+="</div>";B.find(".speedy").remove();B.append(D);B.find('select[name="shippingService"]').change(function(){u.recalculateShippingPrice(this.value,null)});if(z){B.find('select[name="shippingOffice"]').change(function(){u.recalculateShippingPrice(null,this.value)})}};if(z){var w=[];if(C){w=a[C];if(w&&w.length>0){x(w)}else{m({action:"shippingServiceRequest",method:"post",data:{provider:g.getType(),locationType:"office",type:"location",country:A.countryId,site:C},onOk:function(D){var E=D.data;a[C]=E;x(E)}})}}else{x([])}}else{x(null)}};return{_init:function(){g=this;n();delete this._init;return this},setCountry:d,setState:j,setZip:t,getCountryId:function(){return o&&o.id?o.id:null},getCityId:function(){return q},renderOption:i,getType:function(){return"speedy"}}._init()};(function(){var a=function(c){var b=this;var h=function(j){if(j.hasClass("initialized")){return}j.addClass("initialized");ClientTools.setupFormFields(j);var k=j.find(".recaptcha-target");if(k.length){var i=j.find('[data-role="submit"]');ClientTools.setupRecaptcha({ui:k,button:i})}};var d=function(k){var i=b.root.find("div[data-tab]");var j=i.filter('div[data-tab="'+k+'"]');if(b.activeTabUI===null){b.activeTabUI=j;b.activeTab=k;b.activeTabUI.addClass("active").removeClass("none-soft");h(b.activeTabUI)}else{b.activeTabUI.fadeOut(150,function(){b.activeTab=k;b.activeTabUI.removeClass("active");b.activeTabUI=j;b.activeTabUI.addClass("active").fadeIn(150);h(b.activeTabUI)})}};var e=function(i){var k=i.data||{};var j=this.activeTabUI.find(".error-wrapper").empty();k.act=i.action||"";var l={action:b.getBaseAction(),method:"post",data:k,onOk:function(m){(i.onSuccess||dummy)(m)},onNotOk:function(m){if(i.onError){i.onError(m)}else{ClientTools.showMessageBox(m.message,j,"html",true);ClientTools.hideLoader()}}};ClientTools.showLoader();if(i.file){WebPlatform.makeClientWebsiteRequestWithFile(l,i.file)}else{WebPlatform.makeClientWebsiteRequest(l)}};var f=function(){switch(b.activeTab){case"login":b.login();break;case"recover-password":b.recoverPassword();break;case"recover-password-finish":b.newPassword();break;case"register":b.register();break}};var g=function(i){if(!i.root||!i.root.length){return null}b.options=i;b.root=i.root;b.activeTab=i.activeTab||ClientTools.getUrlQueryParameter(window.location.href,"tab")||"login";b.activeTabUI=null;b.options=null;var j=["login","recover-password","register"];if(j.indexOf(b.activeTab)===-1){b.activeTab="login"}if(b.activeTab==="recover-password"&&ClientTools.getUrlQueryParameter(window.location.href,"t")){b.activeTab="recover-password-finish"}b.root.on("click","a[data-show]",function(){d($(this).data("show"))}).on("keyup",'input[name="password"]',function(k){if(k.keyCode===13){$(this).closest("[data-tab]").find('[data-role="submit"]').trigger("click")}}).on("click",'a[data-role="submit"]',function(){if($(this).hasClass("disabled")){return}f()});d(b.activeTab)};return{root:null,activeTab:null,activeTabUI:null,options:null,_init:function(i){b=this;g(i);delete this._init;return this},request:e,login:dummy,register:dummy,recoverPassword:dummy,newPassword:dummy,getBaseAction:function(){return"memberRequest"},showTab:d}._init(c)};WebPlatform.Widgets.MemberAuthForm=function(b){var c=$.extend(a(b),{login:function(){var e=this.activeTabUI.find('input[name="email"]').val();var d=this.activeTabUI.find('input[name="password"]').val();var f=this.activeTabUI.find('input[name="backTo"]').val();ClientTools.showLoader();this.request({action:"login",data:{email:e,password:d,backTo:f},onSuccess:function(g){var h=b.nextPage?b.nextPage:g.data;if(g.data&&b.nextPage&&b.nextPage.startsWith("javascript:")){h=g.data}window.location.href=h||"/"}})},register:function(){var n=this;var g=this.activeTabUI.find('input[name="name"]').val();var k=this.activeTabUI.find('input[name="email"]').val();var m=this.activeTabUI.find('input[name="password"]').val();var e=this.activeTabUI.find('input[name="backTo"]').val();var f=this.activeTabUI.find(".recaptcha-target").data("captcharesponse");var l=this.activeTabUI.find('input[name="formid"]').val();var j=this.activeTabUI.find(".error-wrapper").empty();var i=this.activeTabUI.find(".form-field").not('[data-type="section"]');var h=ClientTools.readFormFields(i);if(h.hasErrors){return}var d=h.values||[];if(d.length>2){d.splice(0,3)}ClientTools.showLoader();this.request({action:"register",file:h.file,data:{name:g,email:k,password:m,validator:f,backTo:e,values:d,formId:l},onSuccess:function(p){var o=p.data;if(o.approve){n.showTab("register-approve");ClientTools.hideLoader()}else{WebPlatform.reportMemberRegistration();WebPlatform.delay(80,function(){var q=b.nextPage?b.nextPage:o.redirect;window.location.href=q||"/"})}},onError:function(o){ClientTools.showMessageBox(o.message,j,"html",true);ClientTools.resetRecaptcha(n.activeTabUI,n.activeTabUI.find('a[data-role="submit"]'));ClientTools.hideLoader()}})},recoverPassword:function(){var d=this;var e=this.activeTabUI.find('input[name="email"]').val();var f=this.activeTabUI.find(".recaptcha-target").data("captcharesponse");this.request({action:"recover-pass",data:{email:e,validator:f},onSuccess:function(g){ClientTools.hideLoader();d.showTab("recover-password-message")}})},newPassword:function(){var d=this;var e=this.activeTabUI.find('input[name="password"]').val();var g=this.activeTabUI.find('input[name="repeatPassword"]').val();var f=this.activeTabUI.find('input[name="t"]').val();this.request({action:"recover-pass-set-new",data:{password:e,repeatPassword:g,t:f},onSuccess:function(h){ClientTools.hideLoader();d.showTab("recover-password-success")}})}});return c};WebPlatform.Widgets.BuilderAuthForm=function(b){var c=$.extend(a(b),{getBaseAction:function(){return"builderAuthRequest"},login:function(){var f=this.activeTabUI.find('input[name="email"]').val();var e=this.activeTabUI.find('input[name="password"]').val();var d=this.activeTabUI.find('input[name="backto"]').val();var h=this.activeTabUI.find('input[name="wizard"]').val();var j=this.activeTabUI.find('input[name="cc"]').val();var g=this.activeTabUI.find('input[name="category"]').val();var i=this.activeTabUI.find('input[name="sub"]').val();ClientTools.showLoader();this.request({action:"login",data:{email:f,password:e,backto:d,wizard:h,cc:j,category:g,sub:i},onSuccess:function(k){var l=k.data;if(b.nextPage&&b.nextPage.trim()!=="/"&&b.nextPage.trim()!=="/me/website"){l=b.nextPage}window.location.href=l||"/me/website"}})},register:function(){var j=this;var u=this.activeTabUI.find('input[name="name"]').val();var l=this.activeTabUI.find('input[name="email"]').val();var d=this.activeTabUI.find('input[name="password"]').val();var p=this.activeTabUI.find('input[name="backto"]').val();var g=this.activeTabUI.find(".recaptcha-target").data("captcharesponse");var s=this.activeTabUI.find('input[name="formid"]').val();var r=this.activeTabUI.find('input[name="template"]').val();var t=this.activeTabUI.find('input[name="funnel"]').val();var m=this.activeTabUI.find('input[name="category"]').val();var f=this.activeTabUI.find('input[name="promo"]').val();var o=this.activeTabUI.find('input[name="locale"]').val();var q=this.activeTabUI.find('input[name="wizard"]').val();var k=this.activeTabUI.find('input[name="cc"]').val();var i=this.activeTabUI.find(".error-wrapper").empty();var e=this.activeTabUI.find(".form-field").not('[data-type="section"]');var h=ClientTools.readFormFields(e);if(h.hasErrors){return}var n=h.values||[];if(n.length>2){n.splice(0,3)}ClientTools.showLoader();this.request({action:"register",file:h.file,data:{name:u,email:l,password:d,validator:g,backto:p,values:n,formId:s,template:r,funnel:t,category:m,promo:f,locale:o,wizard:q,cc:k,timezone:window.jstz?window.jstz.determine().name():""},onSuccess:function(v){var w=v.data;if(b.nextPage&&b.nextPage!=="/"&&b.nextPage!==""){w=b.nextPage}window.location.href=w},onError:function(v){ClientTools.showMessageBox(v.message,i,"html",true);ClientTools.resetRecaptcha(j.activeTabUI,j.activeTabUI.find('a[data-role="submit"]'));ClientTools.hideLoader()}})},recoverPassword:function(){var d=this;var e=this.activeTabUI.find('input[name="email"]').val();var f=this.activeTabUI.find(".recaptcha-target").data("captcharesponse");this.request({action:"recover-pass",data:{email:e,validator:f},onSuccess:function(g){ClientTools.hideLoader();d.showTab("recover-password-message")}})},newPassword:function(){var d=this;var e=this.activeTabUI.find('input[name="password"]').val();var g=this.activeTabUI.find('input[name="repeatPassword"]').val();var f=this.activeTabUI.find('input[name="t"]').val();this.request({action:"recover-pass-set-new",data:{password:e,passwordRepeat:g,t:f},onSuccess:function(h){ClientTools.hideLoader();d.showTab("recover-password-success")}})}});return c}})();WebPlatform.Widgets.UpsellButton=function(i){if(!i.root||!i.root.length){return}
90var g=function(k,l,j){WebPlatform.Popups.showSimplePopup(i.root.find(".member-template").html(),500,function(m,p){p.find('[name="email"]').val(l);var r=p.find('[data-role="login-view"]');var t=p.find('[data-role="register-view"]');var o=p.find("button");var s=p.find('input[name="password"]');var q=p.find('input[name="new_password_repeat"]');var n=p.find(".error-message");p.on("click",'[data-role="register-btn"]',function(){r.slideUp("fast",function(){t.slideDown("fast")});o.data("action","register")});p.on("click",'[data-role="cancel-btn"]',function(){t.slideUp("fast",function(){r.slideDown("fast")});o.data("action","login")});o.click(function(){var w=o.data("action")||"login";var u="loginMember";var v={email:l,password:s.val()};if(w==="register"){u="registerMember";v.passwordRepeat=q.val();v.name=j}n.addClass("none");WebPlatform.makeClientWebsiteRequest({action:u,data:v,onOk:function(x){var y=x.data;if(y.error){n.removeClass("none").text(y.error)}else{m.close();WebPlatform.Members=WebPlatform.Members||{};WebPlatform.Members.current=y.member;a(k)}}})})})};var f=function(k){var m=WebPlatform.Store.PayULatamInTestMode===true;var j=m?"https://sandbox.checkout.payulatam.com/ppp-web-gateway-payu/":"https://checkout.payulatam.com/ppp-web-gateway-payu/";var l='<form method="post" action="'+j+'">                       <input name="merchantId"    type="hidden"  value="'+k.merchantId+'" />                       <input name="accountId"     type="hidden"  value="'+k.accountId+'" />                       <input name="description"   type="hidden"  value="'+k.description+'" />                       <input name="referenceCode" type="hidden"  value="'+k.referenceCode+'" />                       <input name="amount"        type="hidden"  value="'+k.amount+'" />                       <input name="tax"           type="hidden"  value="'+k.tax+'" />                       <input name="taxReturnBase" type="hidden"  value="'+k.taxReturnBase+'" />                       <input name="currency"      type="hidden"  value="'+k.currency+'" />                       <input name="signature"     type="hidden"  value="'+k.signature+'" />                       <input name="algorithmSignature" type="hidden"  value="'+k.algorithmSignature+'" />';if(m){l+='<input name="test" type="hidden"  value="1" />'}l+='<input name="buyerFullName" type="hidden"  value="'+k.buyerFullName+'" />                       <input name="buyerEmail"    type="hidden"  value="'+k.buyerEmail+'" />                       <input name="responseUrl"   type="hidden"  value="'+k.responseUrl+'" />                       <input name="confirmationUrl" type="hidden"  value="'+k.confirmationUrl+'" />';if(k.hasShipping){l+='<input name="shippingAddress"   type="hidden"  value="'+k.shippingAddress+'" />                           <input name="shippingCity" type="hidden"  value="'+k.shippingCity+'" />                           <input name="shippingCountry" type="hidden"  value="'+k.shippingCountry+'" />'}l+='<input name="Submit" type="submit" value="" />                     </form>';var n=$('<div class="hidden"></div>');n.append(l);$(document.body).append(n);n.find("form").submit();ClientTools.showLoader()};var d=function(k,j){;if(!j.paymentMethod){ClientTools.showError(j.status);return}WebPlatform.requestResource("https://js.stripe.com/v3/",null,function(){return !!window.Stripe},function(){if(!window.stripeInstance){window.stripeInstance=Stripe(j.stripePublishableKey.trim())}window.stripeInstance.confirmCardPayment(j.secret,{payment_method:j.paymentMethod}).then(function(l){if(l.error){Log.error(l.error);message=l.error.message||l.error;ClientTools.showError(message)}else{a(k,l.paymentIntent.id)}})})};var b=function(k,j){WebPlatform.Popups.showSimplePopup(i.root.find(".card-template").html(),500,function(l,m){WebPlatform.requestResource("https://"+(j.authorizeInSandbox?"jstest":"js")+".authorize.net/v1/Accept.js",null,function(){return !!window.Accept},function(){var n=m.find("button");var o=m.find(".ccv-pop");m.on("mouseover",".ccv-info",function(){o.fadeIn("fast")}).on("mouseout",".ccv-info",function(){o.fadeOut("fast")});n.on("click",function(){if(n.hasClass("disabled")){return}n.addClass("disabled");var q=WebPlatform.parse(m.find('input[data-role="year"]').val());if(q<100){q+=2000}var p={authData:{clientKey:j.authorizePublicClientKey,apiLoginID:j.authorizeApiLoginId},cardData:{cardNumber:m.find('input[data-role="number"]').val(),month:m.find('input[data-role="month"]').val(),year:q,cardCode:m.find('input[data-role="cvc"]').val()}};window.Accept.dispatchData(p,function(s){if(s.messages.resultCode==="Error"){n.removeClass("disabled");var t=s.messages.message.length?s.messages.message[0].text:s.messages.message[0].text;for(var r=0;r<s.messages.message.length;++r){Log.error("Error auhtorizing payment with Authorize.net: "+s.messages.message[r].code+": "+s.messages.message[r].text)}ClientTools.showMessageBox(t,n,"before",true,10000)}else{n.removeClass("disabled");a(k,JSON.stringify(s.opaqueData))}})})})})};var c=function(l,j,k){WebPlatform.Popups.showSimplePopup(i.root.find(".card-template").html(),500,function(m,n){WebPlatform.requestResource("https://www.2checkout.com/checkout/api/2co.min.js",null,function(){return !!window.TCO},function(){TCO.loadPubKey("production",function(){var o=n.find("button");var p=n.find(".ccv-pop");n.on("mouseover",".ccv-info",function(){p.fadeIn("fast")}).on("mouseout",".ccv-info",function(){p.fadeOut("fast")});o.on("click",function(){if(o.hasClass("disabled")){return}o.addClass("disabled");var q=function(t){o.removeClass("disabled");a(l,t.response.token.token)};var s=function(t){o.removeClass("disabled");ClientTools.showMessageBox(t.errorMsg,o,"before",true,10000)};var r={sellerId:k.twocheckoutSellerId,publishableKey:k.twocheckoutPublicKey,ccNo:n.find('input[data-role="number"]').val(),cvv:n.find('input[data-role="cvc"]').val(),expMonth:n.find('input[data-role="month"]').val(),expYear:n.find('input[data-role="year"]').val()};if(k.twocheckoutInSandbox){r.demo="Y"}TCO.requestToken(q,s,r)})})})})};var e=function(p,m,n,r){if(n==="unipay"||n==="mollie"){window.location.href=r.redirect}else{if(n==="payulatam"){f(r)}else{if(n==="authorize.net"){b(p,r)}else{if(n==="stripe"){d(p,r)}else{if(n==="2checkout"){c(p,m,r)}else{if(n==="paystack"){WebPlatform.requestResource("https://js.paystack.co/v1/inline.js",null,function(){return !!window.PaystackPop},function(){m=Math.round(m*100);var s=PaystackPop.setup({key:r.paystackPublicKey,email:r.customerEmail,amount:m,currency:WebPlatform.Store.currency,callback:function(t){a(p,t.reference)},onClose:function(){}});s.openIframe()})}else{if(n==="payfast"){var k="https://"+(r.sandbox?"sandbox":"www")+".payfast.co.za/eng/process";var j=$('<div class="hidden"></div>');var l=$('<form method="POST" action="'+k+'"></form>');for(var q in r){if(q==="sandbox"){continue}var o=$('<input type="hidden" />').attr("name",q).attr("value",r[q]);l.append(o)}j.append(l);$(document.body).append(j);l.submit();ClientTools.showLoader()}else{if(n==="mobilpay"){var j=$('<div class="hidden"></div>');var l=$('<form method="POST" action="'+r.redirect+'"></form>');l.append('<input type="hidden" name="env_key" value="'+r.envKey+'" />');l.append('<input type="hidden" name="data" value="'+r.data+'" />');j.append(l);$(document.body).append(j);l.submit();ClientTools.showLoader()}}}}}}}}};var a=function(j,k){ClientTools.showLoader();WebPlatform.makeClientWebsiteRequest({action:"approveUpsell",method:"post",data:{extra:i.extra,orderToken:i.lastOrderToken,funnel:i.funnel,step:i.funnelStep,variant:i.funnelStepVariant,selectedOption:j===null?null:JSON.stringify(j),token:k},always:function(){ClientTools.hideLoader()},onOk:function(l){var n=l.data;if(n.hasOptions){var m={product:n.product,storeProcess:"buy",noQuantity:true,onOptionSelected:function(o){a(o,null)}};if(i.sellFor){m.forcePrice=i.sellFor}WebPlatform.Store.showLoadedProductInQuickView(m)}else{if(n.requestLogin){g(j,n.customerEmail,n.customerName)}
90else{if(n.requestPayment){e(j,n.amount,n.paymentMethod,n.options)}else{if(n.completed){WebPlatform.Store.reportPurchase(n.order.id,n.purchasedItems,n.total);WebPlatform.delay(50,function(){WebPlatform.Store.goToThankYouPage(i.funnelStep,n.next)})}else{if(n.redirect){ClientTools.showLoader();window.location.href=n.redirect}else{}}}}}}})};var h=function(){if(i.lastOrderToken){Cookies.set("last-order-token",i.lastOrderToken,{expires:30,path:"/"})}else{i.lastOrderToken=Cookies.get("last-order-token")||""}i.funnelStep=WebPlatform.parse(i.funnelStep);i.root.on("click",".upsell-positive-action",function(){a(null,null)}).on("click",".upsell-negative-action",function(){WebPlatform.Funnels.show("next",false,true)})};h()};WebPlatform.Widgets.WebsiteSubscription=function(N){if(!N.root||!N.root.length||N.root[0].offsetParent===null){return null}var b='    <div class="subtotal-wrapper">       <span class="subtotal">         <span class="col20 f-left">%title%</span>       </span>       <mark class="subtotal-price subtotal-value">%price%</mark>     </div>';var I='    <div class="subtotal-wrapper">       <span class="subtotal flex flex-row" style="line-height: 30px">         <a class="remove-discount-btn"><i class="fa fa-trash-o"></i></a>        <span class="col20 f-left">%title%</span>       </span>       <mark class="subtotal-price subtotal-value">%price%</mark>     </div>';var P=N.root,t=P.find('[data-role="error-message"]'),j=P.find('input[name="formid"]').val(),ai=N.layout==="1-step",Q=[],Z=N.subscriptionType==="regular",af=0,e="yearly",o="",n,H,A,ag=N.applyTax?WebPlatform.getVatRate(WebPlatform.ipCountryCode||N.invCountry||"US"):0,ad=0,h=0,y="",ab=0,s=0,ak=ai?null:P.find('[data-role="steps-breadcrumbs"]'),D,K,T,v,B=null,x=null,m=null,am=P.find('[data-role="next-step"]'),al=P.find('[data-role="continue"]'),L=P.find('[data-role="back"]'),z=P.find('[data-role="toggleLoginControls"]'),S=N.user&&N.user.email?N.user:null,u=S===null,a={cardType:"",nonce:"",paypalEmail:"",payp
90alCountry:"",lastTwo:""};var c=0;var aa=function(){++c;if(c>1){return}if(window.ClientTools){ClientTools.showHideAjaxLoadingIndicator(false)}P.addClass("checkout-loading")};var l=function(){--c;if(c<0){c=0}if(c===0){if(window.ClientTools){ClientTools.showHideAjaxLoadingIndicator(true)}P.removeClass("checkout-loading")}};var k=function(an){t.text(an).removeClass("none")};var r=function(){t.addClass("none").text("")};var J=function(ao,an){ao=ao.toUpperCase();an=(an||"").trim().toUpperCase().replace(/[^0-9A-Z]/g,"");if(an.length>7&&an.indexOf(ao)===0&&ao!==N.invCountry){ag=0}else{if(N.applyTax){ag=WebPlatform.getVatRate(ao)}}X()};var X=function(){var ao=ad;s=h*(1+Math.max(0,ag)/100);var an=P.find('[data-role="vatRow"]');if(ag>0&&ad>0.01){ao=ad*(1+ag/100);vatAmount=ao-ad;an.removeClass("none");an.find('[data-role="vat-percent"]').text(ag+"%");an.find(".subtotal-value").text(WebPlatform.currencyWithCodeToStr(vatAmount,N.currency))}else{an.addClass("none")}if(s<0.01){P.find('[data-role="next-billing-details"]').hide()}else{var ap=y+" - "+WebPlatform.currencyWithCodeToStr(s,N.currency);P.find('[data-role="nextBillingInfo"]').text(ap);P.find('[data-role="next-billing-details"]').show()}P.find(".trial-message")[N.trial?"removeClass":"addClass"]("none");P.find(".final-cost")[ao<0.01?"addClass":"removeClass"]("none");if(ao>=0.01){P.find('[data-role="total-price"]').text(WebPlatform.currencyWithCodeToStr(ao,N.currency))}ab=ao};var Y=function(){var ao=[];var an=P.find(".bump-wrapper").removeClass("bump-active");an.find('input[type="checkbox"]:checked').each(function(){var ap=$(this);ao.push(WebPlatform.parse($(this).data("bump")));ap.closest(".bump-wrapper").addClass("bump-active")});return ao};var F=function(){aa();var an=Y();WebPlatform.makeClientWebsiteRequest({action:"subscriptionWidgetReq",method:"post",data:{widgetAction:"calculatePrice",form:j,bumps:JSON.stringify(an),selectedPeriod:e,selectedPlan:af,selectedDiscount:o},onOk:function(aD){var av=aD.data;ad=av.totalNoVat;y=WebPlatform.ddmmyyyyDateToStrWithMonth(av.nextBillingDate);h=av.nextBillingPriceNoVat;if(av.discountCode.toUpperCase()!==o.toUpperCase()){o="";if(window.ClientTools){ClientTools.showError("Invalid Promo Code")}}o=av.discountCode;var aq=P.find('[data-role="discount-row"]');if(o){var aw=av.basePlanPrice-(e==="monthly"?av.monthlyPrice:av.yearlyPrice);var ar=WebPlatform.currencyWithCodeToStr(aw,N.currency);P.find(".no-discount-wrapper").addClass("none");var aB=WebPlatform.escapeFormat(I,"title",o+" (-"+av.discount+"%)","price",ar);aq.html(aB).removeClass("none")}else{P.find(".no-discount-wrapper").removeClass("none");aq.html("").addClass("none")}var ay=av.bumps||[];var az=P.find('[data-role="bump-prices"]');if(ay.length){var ao="";ay.forEach(function(aE){var aF=WebPlatform.currencyWithCodeToStr(aE.price,N.currency);if(aE.isSubscription){aF+=" / "+WebPlatform.Store.subscriptionToStr(aE.subscription)}ao+=WebPlatform.escapeFormat(b,"title",aE.name,"price",aF)});az.html(ao).removeClass("none")}else{az.addClass("none")}if(Z){var aC="";for(var aA=0;aA<Q.length;++aA){if(Q[aA].id===af){aC=Q[aA].name;break}}n.val(af);H.val(e);A.find('[data-role="plan-name"]').text(aC);var ap=av.monthlyPrice;var at=av.yearlyPrice;var ax="";if(e==="monthly"){ax=WebPlatform.currencyWithCodeToStr(ap,N.currency)+"/"+WebPlatform.Phrases["label.month"]}else{var au=Math.round(100-at/(ap*12)*100);ax=WebPlatform.currencyWithCodeToStr(at,N.currency)+"/"+WebPlatform.Phrases["label.year"];if(au>0){ax+=" <span>("+WebPlatform.Phrases["label.saving"]+" "+au+"%)</span>"}}P.find('[data-role="plan-period-price"]').html(ax)}X()},always:function(){l()}})};var i=function(){var ao=P.find(".connected-paypal-account");var an=P.find(".card-form");if(a.nonce===""){toggleDisplay(an,true);toggleDisplay(ao,false)}else{if(a.cardType==="PayPal"){ao.find('[data-role="paypal-account"]').text(a.paypalEmail);toggleDisplay(ao,true);toggleDisplay(an,false)}}};var O=function(){if(x===null){return}x.tokenize({flow:"vault"},function(an,ao){if(an){if(an.type!=="CUSTOMER"){k(an.message||"Unknown error")}return}a.cardType="PayPal";a.nonce=ao.nonce;a.paypalEmail=ao.details.email;a.paypalCountry=ao.details.countryCode;i()})};var p=function(){aa();WebPlatform.requestResource("https://js.stripe.com/v3/",null,function(){return !isUndefined(window.Stripe)},function(){B={};B.stripe=Stripe(N.stripePK);B.elements=B.stripe.elements({locale:WebPlatform.getStripeLocale()}).create("card",{hidePostalCode:true});var an=P.find('[data-name="card-number"]');
90B.elements.mount(an[0]);B.elements.addEventListener("change",function(ao){if(ao.error){k(ao.error.message)}else{r()}});l()})};var V=function(ao,an){WebPlatform.makeClientWebsiteRequest({action:"subscriptionWidgetReq",method:"post",data:{widgetAction:"getStripeToken",form:j},onOk:function(ap){B.stripe.handleCardSetup(ap.data,B.elements,{payment_method_data:{}}).then(function(aq){if(aq.error){k(aq.error.message);an()}else{a.paypalEmail="";a.paypalCountry="";a.cardType="";a.lastTwo="";a.nonce=aq.setupIntent.id;r();ao()}})}})};var C=function(ao){aa();var an=[{script:"https://js.braintreegateway.com/web/3.68.0/js/client.js",check:function(){return window.braintree&&window.braintree.client}}];if(ao==="braintree"){an.push({script:"https://js.braintreegateway.com/web/3.68.0/js/three-d-secure.min.js",check:function(){return window.braintree&&window.braintree.threeDSecure}});an.push({script:"https://js.braintreegateway.com/web/3.68.0/js/hosted-fields.js",check:function(){return window.braintree&&window.braintree.hostedFields}})}if(window.paypalDisabled){}else{an.push({script:"https://js.braintreegateway.com/web/3.68.0/js/paypal.js",check:function(){return window.braintree&&window.braintree.paypal}})}WebPlatform.requestScripts(an,function(){WebPlatform.makeClientWebsiteRequest({action:"subscriptionWidgetReq",method:"post",data:{widgetAction:"getBTToken",form:j},onOk:function(ap){var aq=ap.data;window.braintree.client.create({authorization:aq},function(ar,at){if(ar){k(ar)}else{if(ao==="braintree"){aa();window.braintree.hostedFields.create({client:at,styles:{input:{color:"#898989","font-family":"Arial, sans-serif"}},fields:{number:{selector:N.rootSelector+" [data-name='card-number']",placeholder:"Card number"},cvv:{selector:N.rootSelector+" [data-name='card-cvv']",placeholder:"CVV"},expirationDate:{selector:N.rootSelector+" [data-name='card-expiration']",placeholder:"MM/YYYY"}}},function(av,au){l();if(av){k(av.message);return}WebPlatform.initiateBraintree3DSecureIfEnabled(at,function(aw){B=au;m=aw},function(aw){k(av.message)})})}if(window.paypalDisabled){}else{aa();window.braintree.paypal.create({client:at},function(av,au){l();if(av){k(av);return}x=au})}}l()})}})});P.find('[data-role="connectPayPal"]').click(O);P.find('[data-role="disconnectPayPal"]').click(function(){a.cardType="";a.nonce="";a.paypalEmail="";a.paypalCountry="";i()})};var aj=function(ao,an){if(B===null&&x===null){an();return}if(a.cardType==="PayPal"){ao();return}else{if(B===null){an();return}}B.tokenize(function(aq,ar){if(aq){var ap=null;switch(aq.code){case"HOSTED_FIELDS_FIELDS_EMPTY":case"HOSTED_FIELDS_FIELDS_INVALID":ap="Please fill all card fields";break;default:ap="There was an error processing your request - "+aq.message}k(ap);an();return}if(m){m.verifyCard({challengeRequested:true,onLookupComplete:function(au,at){at()},amount:WebPlatform.currToStr(ab<0.1?(s<0.1?1:s):ab,"",true,N.currency),nonce:ar.nonce,bin:ar.details.bin},function(av,au){if(av){var at=(((av.details||{}).originalError||{}).description||"");k(av.message+(at===""?"":(" - "+at)));an();return}if(au.liabilityShiftPossible&&au.liabilityShifted||!au.liabilityShiftPossible){a.paypalEmail="";a.paypalCountry="";a.nonce=au.nonce;a.cardType=au.details.cardType;a.lastTwo=au.details.lastTwo;ao()}else{k("Card authorization failed. Please try again");an()}})}else{a.paypalEmail="";a.paypalCountry="";a.nonce=ar.nonce;a.cardType=ar.details.cardType;a.lastTwo=ar.details.lastTwo;ao()}})};var W=function(){aa();var an="https://"+(N.authorizeInSandbox?"jstest":"js")+".authorize.net/v1/Accept.js";WebPlatform.requestResource(an,null,function(){return !!window.Accept},function(){B={};P.on("keyup.cardEvents",".card-cvc",function(ap){var ao=$(this);ao.val(ao.val().replace(/[^0-9]/g,"").substring(0,4))});P.on("keyup.cardEvents",".card-date",function(ap){if((ap.which||ap.keyCode)===9){return false}var ao=$(this);var aq=ao.val().replace(/[^0-9]/g,"");if(aq.length>4){aq=aq.substring(0,4)}var ar=aq.length>2?aq.substring(2):"";if(aq.length>1){aq=aq.substring(0,2)+" / "+ar}ao.val(aq);if(aq.length===7){ao.next().focus()}});l()})};var G=function(av,at){var ar=P.find(".card-number").val().trim();var aq=P.find(".card-date").val().split("/");var ao=P.find(".card-cvc").val();var au=aq[0].trim();var ap=WebPlatform.parse(aq.length>1?aq[1].trim():"",2018);if(ap<100){ap+=2000}var an={authData:{clientKey:N.authorizePK,apiLoginID:N.authorizeApiLoginId}
90,cardData:{cardNumber:ar,month:au,year:ap,cardCode:ao.trim()}};window.Accept.dispatchData(an,function(ax){if(ax.messages.resultCode==="Error"){var ay=ax.messages.message.length?ax.messages.message[0].text:ax.messages.message[0].text;for(var aw=0;aw<ax.messages.message.length;++aw){Log.error("Error auhtorizing payment with Authorize.net: "+ax.messages.message[aw].code+": "+ax.messages.message[aw].text)}k(ay);at()}else{a.paypalEmail="";a.paypalCountry="";a.nonce=JSON.stringify(ax.opaqueData);a.cardType="card";a.lastTwo=ar.length>1?ar.substring(ar.length-2,ar.length):"";av()}})};var g=function(){aa();WebPlatform.requestResource("https://js.paystack.co/v1/inline.js",null,function(){return !isUndefined(window.PaystackPop)},function(){B={};l()})};var f=function(ao,an){if(!a.nonce){M(function(ap){if(ap===null){var aq=Math.round(ab*100);var ar=PaystackPop.setup({key:N.paystackPK,email:K,channels:["card"],amount:aq,currency:N.currency,metadata:{custom_fields:[{display_name:"Website Subscription",variable_name:"website",value:window.location.href}]},callback:function(at){a.paypalEmail="";a.paypalCountry="";a.nonce=at.reference;a.cardType="card";a.lastTwo="";ao()},onClose:function(){a.nonce=null;a.cardType="";an()}});ar.openIframe()}else{k(ap);an()}})}else{ao()}};var ac=function(){var an=P.find('[data-role="project-select"]');if(S&&!N.trial){var ao=function(ar){var ap=an.find("select");ap.find("option").not(":first").remove();var aq=null;ar.forEach(function(au){if(aq===null&&au.status!=="ACTIVE"){aq=au}var at=$("<option />").attr("value",au.id).text(au.name||"Project");ap.append(at)});if(aq){ap.val(aq.id)}else{if(ar.length===0){ap.val("")}else{ap.val(ar[0].id)}}};if(S.projects&&S.projects.length){ao(S.projects)}else{WebPlatform.makeClientWebsiteRequest({action:"subscriptionWidgetReq",method:"post",data:{widgetAction:"listProjects",form:j},onOk:function(ap){S.projects=ap.data||[];ao(S.projects)},onNotOk:function(ap){}})}an.show()}else{an.hide()}};var E=function(){var an=P.find('[data-role="logged-info"]');var ao=P.find('[data-role="guest-info"]');if(S){an.show();ao.hide();an.find(".logged-in-name").html(S.name);an.find(".logged-in-email").html(S.email)}else{ao.show();an.hide()}ac()};var d=function(){aa();M(function(an){if(an===null){E();if(!ai){ak.find("a").removeClass("active").eq(1).addClass("active");P.find('[data-step="final"]').removeClass("none");P.find('[data-step="initial"]').addClass("none")}r()}else{k(an)}l()})};var M=function(an){if(S){an(null)}else{D=P.find('[name="name"]').val();K=P.find('[name="email"]').val();T=P.find('[name="password"]').val();v=P.find('[name="phone"]').val();WebPlatform.makeClientWebsiteRequest({action:"subscriptionWidgetReq",method:"post",data:{widgetAction:"checkAccountDetails",form:j,name:D,email:K,password:T,phone:v,login:!u},onOk:function(ao){if(!u){S=ao.data}an(null)},onNotOk:function(ao){an(ao.message)}})}};var q=function(){P.find('[data-role="prompt-register"]')[!u?"slideDown":"slideUp"]("fast");P.find('[data-role="prompt-login"]')[u?"slideDown":"slideUp"]("fast");P.find('input[name="name"], input[name="phone"]')[u?"slideDown":"slideUp"]("fast")};var w=function(){ak.find("a").removeClass("active").eq(0).addClass("active");P.find('[data-step="initial"]').removeClass("none");P.find('[data-step="final"]').addClass("none");r()};var U=function(){if(al.hasClass("disabled")){return}aa();D=P.find('[name="name"]').val();K=P.find('[name="email"]').val();T=P.find('[name="password"]').val();v=P.find('[name="phone"]').val();R(function(){r();var at=WebPlatform.parse(WebPlatform.getUrlQueryParameter(window.location.href,"template"),0);var aA=WebPlatform.parse(WebPlatform.getUrlQueryParameter(window.location.href,"funnel"),0);var av=WebPlatform.getUrlQueryParameter(window.location.href,"cc");var aq=WebPlatform.getUrlQueryParameter(window.location.href,"category");var az=window.jstz?(jstz.determine().name()||"GMT"):"GMT";var aD=P.find('[name="companyName"]').val();var aC=P.find('[name="companyId"]').val();var au=P.find('[name="country"]').val();var ax=P.find('[name="city"]').val();var an=P.find('[name="state"]').val();var ap=P.find('[name="zip"]').val();var aB=P.find('[name="address"]').val();var ay=u?-1:P.find('[name="project"]').val()||-1;var ar=P.find(".form-field").not('[data-type="section"]');var ao=ClientTools.readFormFields(ar);if(ao.hasErrors){l();return}var aw={action:"subscriptionWidgetReq",method:"post",data:{widgetAction:"subscribe",form:j,bumps:JSON.stringify(Y()),selectedPeriod:e,selectedPlan:af,selectedDiscount:o,templateId:at,funnelId:aA,cc:av,category:aq,timezone:az,total:ab,vatPercent:ag,paymentData:JSON.stringify(a),name:D,email:K,phone:v,password:T,companyName:aD,companyId:aC,countryCode:au,city:ax,state:an,zip:ap,address:aB,currentFunnel:N.funnel,currentFunnelStep:N.funnelStep,currentFunnelStepVariant:N.funnelStepVariant,locale:WebPlatform.getUrlQueryParameter(window.location.href,"locale")||"",project:ay,values:ao.values},onOk:function(aI){var aG=aI.data;if(aG.errors&&aG.errors.length){var aF=P.find(".form-field").not('[data-type="section"]');for(var aE=0;aE<aG.errors.length;++aE){if(aG.errors[aE]){aF.eq(aE).addClass("field-invalid").find(".field-error").text(aG.errors[aE])}}ClientTools.resetRecaptcha(P,al);k(aG.message)}else{if(aG.recalculateTax){ag=aG.tax;k("We've updated your total price. Please confirm your new price and try again.");ClientTools.resetRecaptcha(P,al);X()}else{if(aG.redirectUrl){var aH=[{id:0,quantity:1,price:ab}];WebPlatform.Store.reportPurchase((new Date()).getTime(),aH,ab,"NewSubscription",N.currency);WebPlatform.delay(50,function(){window.location=aG.redirectUrl;toggleDisplay(P,false)})}}}l()},onNotOk:function(aE){k(aE.message);ClientTools.resetRecaptcha(P,al);l()}};if(ao.file){WebPlatform.makeClientWebsiteRequestWithFile(aw,ao.file)}else{WebPlatform.makeClientWebsiteRequest(aw)}},function(){l()})};var ae=function(){switch(N.processor){case"braintree":case"paypal-bt":C(N.processor);break;case"stripe":p();break;case"authorize.net":W();break;case"paystack":g();break}};var R=function(ao,an){switch(N.processor){case"braintree":case"paypal-bt":aj(ao,an);break;case"stripe":V(ao,an);break;case"authorize.net":G(ao,an);break;case"paystack":f(ao,an);break;default:k("Payment processor not supported");an()}};
90var ah=function(){if(ai){P.find('[data-step="initial"], [data-step="final"]').removeClass("none")}else{w()}L.click(w);z.click(function(){u=!u;q()});am.click(d);al.click(U);if(Z){var ap=P.find(".plan-select");A=ap.find('[data-role="plan-selected"]');n=ap.find('[data-role="available-plans"]');H=ap.find('[data-role="plan-period"]');n.find("option").each(function(){var av=$(this);Q.push({id:WebPlatform.parse(av.attr("value")),name:av.text()})});H.change(function(){e=this.value.toLowerCase()==="monthly"?"monthly":"yearly";F()});if(Q.length<2){ap.find(".plan-change").remove()}else{ap.on("click",".plan-change",function(){A.addClass("none");n.removeClass("none")})}n.change(function(){af=WebPlatform.parse($(this).val(),0);n.addClass("none");A.removeClass("none");F()});af=WebPlatform.parse(WebPlatform.getUrlQueryParameter(window.location.href,"plan"),Q.length>0?Q[0].id:0);e=(WebPlatform.getUrlQueryParameter(window.location.href,"period")||"yearly").toLowerCase()==="monthly"?"monthly":"yearly";o=WebPlatform.getUrlQueryParameter(window.location.href,"discount");var au=false;for(var an=0;an<Q.length;++an){if(Q[an].id===af){au=true;break}}if(!au){af=Q.length>0?Q[0].id:0}n.val(af)}var at=P.find('[name="country"]');var aq=P.find('[name="state"]');var ao=P.find('[name="companyId"]');if(window.ClientTools){ao.keyup(function(){J(at.val(),ao.val())});WebPlatform.requestResource(resources+"/scripts/i18n/countries/"+locale+".js",null,function(){return window.COUNTRIES&&window.COUNTRIES.length},function(){ClientTools.bindCountryAndState(at,aq,WebPlatform.ipCountryCode||N.invCountry||"US",function(){J(at.val(),ao.val())})})}else{J(N.invCountry||"US",ao.val())}P.on("click",'a[data-role="toggle-billing-info"]',function(){P.find('div[data-role="billing-form"]').slideToggle("fast")}).on("click",".promo-code-toggle-btn",function(){P.find(".coupon-code-wrapper").toggleClass("none")}).on("click",".discount-code-btn",function(){var av=P.find(".apply-code-input").val().trim();if(av!==""){o=av;F()}}).on("click",".remove-discount-btn",function(){o="";F()}
90).on("keyup",".apply-code-input",function(av){if(av.keyCode===13){P.find(".discount-code-btn").click()}});P.find(".bump-wrapper input").change(F);if(window.ClientTools){var ar=P.find(".recaptcha-target");if(ar.length>0){ClientTools.setupRecaptcha({ui:ar,button:P.find('a[data-step="final"][data-role="continue"]'),onLoaded:function(av){l()}})}ClientTools.setupFormFields(P)}E();F();ae()};ah();return{destroy:function(){if(x!==null){x.teardown()}x=null;if(N.processor==="braintree"&&B!==null){B.teardown()}if(N.processor==="stripe"&&B!==null){B.destroy()}}}};WebPlatform.Widgets.WebsiteSubscriptionUpsell=function(e){if(!e.root||!e.root.length){return null}var d=e.root,f=d.find('input[name="formid"]').val(),c=d.find('[data-role="continue"]'),g=0;var b=function(){ClientTools.showLoader();WebPlatform.makeClientWebsiteRequest({action:"subscriptionWidgetReq",method:"post",data:{widgetAction:"upsell",form:f,project:e.project,currentFunnel:e.funnel,currentFunnelStep:e.funnelStep,currentFunnelStepVariant:e.funnelStepVariant},onOk:function(k){var i=k.data;if(i.redirectUrl){window.location.href=i.redirectUrl;var j=[{id:0,quantity:1,price:g}];WebPlatform.Store.reportPurchase((new Date()).getTime(),j,g,"NewSubscription",e.currency);WebPlatform.delay(50,function(){window.location=i.redirectUrl;toggleDisplay(d,false)})}ClientTools.showLoader()},onNotOk:function(i){ClientTools.hideLoader();ClientTools.showError(i.message)}})};var a=function(){WebPlatform.makeClientWebsiteRequest({action:"subscriptionWidgetReq",method:"post",data:{widgetAction:"calculatePrice",form:f,bumps:JSON.stringify([]),selectedPeriod:"yearly",selectedPlan:0},onOk:function(q){var k=q.data;var n=k.totalNoVat;var j=WebPlatform.ddmmyyyyDateToStrWithMonth(k.nextBillingDate);var o=k.nextBillingPriceNoVat;var p=e.tax||0;var m=n;nextBillingPrice=o;var l=d.find('[data-role="vatRow"]');if(p>0&&n>0.01){m=n*(1+p/100);vatAmount=m-n;nextBillingPrice=o*(1+p/100);l.removeClass("none");l.find('[data-role="vat-percent"]').text(p+"%");l.find(".subtotal-value").text(WebPlatform.currencyWithCodeToStr(vatAmount,e.currency))}else{l.addClass("none");d.find(".final-cost").addClass("none")}if(nextBillingPrice<0.01){d.find('[data-role="next-billing-details"]').hide()}else{var i=j+" - "+WebPlatform.currencyWithCodeToStr(nextBillingPrice,e.currency);d.find('[data-role="nextBillingInfo"]').text(i);d.find('[data-role="next-billing-details"]').show()}d.find('[data-role="total-price"]').text(WebPlatform.currencyWithCodeToStr(m,e.currency));g=m}})};var h=function(){c.click(b);if(e.project){Cookies.set("last-subscribed-project",e.project,{expires:7,path:"/"})}
90else{e.project=Cookies.get("last-subscribed-project")||""}if(e.projectUrl){$('a[href="/me/website"], a[href="https://'+e.platformUrl+'/me/website"]').attr("href",e.projectUrl)}a()};h()};var $document=$(document);var $window=$(window);var windowHeight=0;var windowWidth=0;var TMDP_SLIDERS=[];var resources="";var locale="en";var content="";var resourcesVersion=0;var recaptchaLoaded=false;var onRecaptchaLoaded=function(){recaptchaLoaded=true};var ClientTools=function(){var p=[],e=[],i=[],q=[],j=null,l=false;var d=function(s){for(var r=0;r<s.length;++r){try{s[r]()}catch(t){Log.error(t)}}};var f=function(r){if(p===null){r()}else{p.push(r)}};var g=function(){l=!!(window.history&&window.history.pushState);if(l){$("body").on("click","a[rel='client-tab']",function(s){var r=$(this).attr("href");ClientTools.goToUrl(r);return false});$window.bind("popstate",function(r){if(window.location.pathname!==ClientTools.currentPage){ClientTools.currentPage=window.location.pathname;d(q)}})}};var k=true;var m=true;var h=function(){var r=$('<div id="client-ajax-overlay"><div id="client-ajax-message"></div></div>');$("body").append(r);$document.ajaxStart(function(){var s=WebPlatform.disableAjaxLoader?300000:(m?(k?5000:1000):30000);r.addClass("client-ajax-in-progress").delay(s).queue(function(t){r.addClass("client-slow-ajax");t()});k=false}).ajaxStop(function(){if(r.hasClass("client-slow-ajax")){WebPlatform.delay(350,function(){r.removeClass("client-ajax-in-progress")});r.removeClass("client-slow-ajax").clearQueue()}else{r.removeClass("client-ajax-in-progress").clearQueue()}})};var n=function(){var r=$('<div id="client-ajax-overlay" class="client-ajax-in-progress"><div id="client-ajax-message"></div></div>');$("body").append(r);WebPlatform.delay(20,function(){r.addClass("client-slow-ajax");r=null})};var a=function(){var r=$("#client-ajax-overlay");while(r.length){r.remove();r=$("#client-ajax-overlay")}};var o=function(){f(g);$(function(){h();$window.scroll(function(){d(i)}).resize(function(){windowHeight=$window.height();windowWidth=$window.width();d(e)});windowHeight=$window.height();windowWidth=$window.width();var r=p;p=null;d(r);r=WebPlatform.documentReadyRequests||[];WebPlatform.documentReadyRequests=null;if(r.length>0){d(r)}if(j){j()}d(q);$window.scroll();WebPlatform.processAccumulatedRequests()})};var c=function(s){var D=s.hasClass("payment-form");var t=s.data("processor");var C=s.hasClass("widget-form-light");var B=false;var v=null;var E=null;ClientTools.setupFormFields(s);if(D){var x=s.find('[name="payment-authorization"]').val();if(x===""){WebPlatform.showClientError("Invalid payment form settings!",3000);return}var w=s.find(".payment-form-target");if(w.length===0){return}if(t==="stripe"){B=true;var r={base:{color:"#32325d",backgroundColor:"#ffffff",lineHeight:"56px",fontFamily:'"Helvetica Neue", Helvetica, sans-serif',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#aab7c4"}},invalid:{color:"#fa755a",iconColor:"#fa755a"}};E=Stripe(x.trim());v=E.elements({locale:WebPlatform.getStripeLocale()}).create("card",{style:r});v.mount(w[0]);v.addEventListener("change",function(G){if(G.error){WebPlatform.showClientError(G.error.message,3000)}else{B=false}})}else{var y=!!w.data("paypalEnabled");var z=w.data("amount")||0;var F={authorization:x,container:w[0],threeDSecure:true};if(y){F.paypal={flow:"checkout",amount:z+"",currency:"USD"}}B=true;window.braintree.dropin.create(F,function(H,G){if(H){WebPlatform.showClientError(H,3000)}else{v=G}B=false})}}var u=s.find('[data-role="submit"]');var A=s.find(".recaptcha-target");if(A.length>0){ClientTools.setupRecaptcha({ui:A,button:u,useDarkTheme:C})}u.click(function(){if(u.hasClass("disabled")){return}if(B||D&&v===null){return}u.addClass("disabled");if(D){if(t==="stripe"){b(s,u,"form","",function(I){E.confirmCardPayment(I,{payment_method:{card:v}}).then(function(J){if(J.error){var K=J.error||"Unable to setup payment intent";Log.error(K);ClientTools.showError(K.message||K,3000);u.removeClass("disabled")}else{b(s,u,"payment-confirmed",J.paymentIntent.id)}})})}else{var H=s.find('input[name="__amount"]');var G;if(H.length){G=WebPlatform.parse(H.val())}else{G=s.find(".payment-form-target").data("amount")||0}v.requestPaymentMethod({threeDSecure:{amount:WebPlatform.currToStr(G<0.1?1:G,"",true,WebPlatform.Store.currency)}},function(K,L){if(K){var J=K.message||K;var I=(((K.details||{}).originalError||{}).description||"");ClientTools.showError(J+(I===""?"":(" - "+I)),3000);u.removeClass("disabled")}else{if(L.liabilityShiftPossible&&L.liabilityShifted||!L.liabilityShiftPossible){b(s,u,"form",L.nonce)}u.removeClass("disabled")}})}}else{b(s,u,"form",null)}})};var b=function(s,x,t,r,z){var A=s.find('input[name="formid"]').val();var y=s.find(".form-field").not('[data-type="section"]');var u=ClientTools.readFormFields(y);var w=u.hasOwnProperty("amount")?u.amount:0;
90if(u.hasErrors){x.removeClass("disabled");return}var v={action:"submitForm",method:"post",data:{values:u.values,form:A,amount:w,nonce:r,step:t},onOk:function(C){x.removeClass("disabled");var F=C.data;if(F.errors){for(var B=0;B<F.errors.length;++B){var E=F.errors[B];if(E!==null){y.eq(B).addClass("field-invalid").find(".field-error").text(E)}}ClientTools.resetRecaptcha(s,x)}else{if(F.paymentError){if(F.paymentError.error==="confirm_payment"&&z){x.addClass("disabled");z(F.paymentError.extra)}else{WebPlatform.showClientError(F.paymentError.error,3000);ClientTools.resetRecaptcha(s,x)}}else{var G=s.data("onSubmit")==="page"?s.data("onSubmitPage"):null;WebPlatform.Events.trigger(s,WebPlatform.Events.FORM_SUBMITTED,{formId:A,values:u.values});if(G===null){ClientTools.showMessageBox(F.message,s,"before");s.slideUp("fast")}else{G=G.trim();WebPlatform.lastFormParams="";var D=s.data("passValues")===true;if(u.urlFields.length>0){u.urlFields.forEach(function(H){if((D||H.type==="hidden")&&H.value){if(WebPlatform.lastFormParams!==""){WebPlatform.lastFormParams+="&"}WebPlatform.lastFormParams+=encodeURIComponent(H.name)+"="+encodeURIComponent(H.value)}})}WebPlatform.delay(80,function(){var H=G.toLowerCase().trim().indexOf("javascript:")!==0&&WebPlatform.lastFormParams!=="";if(H){window.location.href=G+(G.indexOf("?")===-1?"?":"&")+WebPlatform.lastFormParams}else{window.location.href=G}})}}}},onNotOk:function(B){x.removeClass("disabled");ClientTools.resetRecaptcha(s,x);this._onNotOk(B)}};if(u.file===null){ClientTools.makeWebsiteRequest(v)}else{WebPlatform.makeClientWebsiteRequestWithFile(v,u.file)}};o();return{currentPage:window.location.pathname,showLoader:n,hideLoader:a,showHideAjaxLoadingIndicator:function(r){m=!!r},goToUrl:function(r,s){var t=s===true;if(!t&&(r===ClientTools.currentPage)){return}if(l){window.history.propertyIsEnumerable({path:r},"",r);ClientTools.currentPage=r;d(q)}else{window.location=r}},refreshLightboxes:WebPlatform.refreshLightboxes,refreshCountdowns:function(){$(".flip-countdown:not(.with-countdown)").each(function(){var r=$(this);WebPlatform.Countdown.create(r)})},refreshToggles:function(){$(".toggle-widget").not(".with-toggle").each(function(){var r=$(this).addClass("with-toggle");r.on("click",".toggle-header",function(){var s=$(this).closest("section");if(s.hasClass("open")){s.removeClass("open")}else{s.parent().children(".open").removeClass("open");s.addClass("open")}})})},onSetupMenu:function(r){j=r},transitionsSupported:WebPlatform.transitionsSupported,onDocumentReady:f,addOnLocationChangeListener:function(r){q.push(r)},addOnScrollListener:function(r){i.push(r)},addOnResizeListener:function(r){e.push(r)},dateToString:function(t){var s=t.getDate();var x=t.getMonth()+1;var v=t.getFullYear();var r=t.getHours();var w=t.getMinutes();var u=t.getSeconds();return(s<10?"0"+s:s)+"/"+(x<10?"0"+x:x)+"/"+v+" "+(r<10?"0"+r:r)+":"+(w<10?"0"+w:w)},isUndefined:function(r){return typeof r==="undefined"},escapeHtml:WebPlatform.escapeHtml,format:WebPlatform.format,escapeFormat:function(){var s=arguments;if((s.length%2)!==1){throw"Invalid number of arguments! Usage: format(formatString, key, value, key, value...)"}var r=s[0];for(var t=1;t<s.length;t+=2){var u=new RegExp("%"+s[t]+"%","g");r=r.replace(u,ClientTools.escapeHtml(s[t+1]))}return r},delay:WebPlatform.delay,showMessageBox:function(v,w,y,t,r){r=ClientTools.isUndefined(r)?6000:r;y=y||"append";var u=$('<div class="message-box"><span class="message"></span><a href="javascript: void(0)" title="" class="close"><i class="fa fa-times"></i></a></div>');if(t){u.addClass("error-box")}u.find(".message").html(v);w[y](u);u.slideDown("fast");var s=false;var x=function(){if(s){return}s=true;u.slideUp("fast",function(){u.remove();u=null})};u.find(".close").one("click",x);if(r>100){ClientTools.delay(r,x)}},showError:WebPlatform.showClientError,parse:WebPlatform.parse,getUrlParameter:WebPlatform.getUrlParameter,getUrlQueryParameter:WebPlatform.getUrlQueryParameter,scrollToTop:function(){$("html, body").animate({scrollTop:0},500);return false},onImagesLoaded:WebPlatform.onImagesLoaded,mergeUnique:function(t,s){for(var r in s){if(ClientTools.isUndefined(t[r])){t[r]=s[r]}}return t},sharePage:WebPlatform.sharePage,makeWebsiteRequest:WebPlatform.makeClientWebsiteRequest,highlightMarkup:function(){if(window.CodeMirror){var r=$(".code:not(.code-formatted)").addClass("code-formatted");if(r.length>0){r.each(function(s,u){var t=$(u);var v=t.data("theme");switch(v){case"dark":v="ambiance";break;case"material":v="material-darker";break;case"monokai":v="monokai";break;default:v="eclipse";break}CodeMirror.fromTextArea(u,{lineNumbers:t.data("rows")===true,styleActiveLine:true,matchBrackets:true,readOnly:true,mode:t.data("language")||"text/html",theme:v})})}}},repaintParallaxes:function(){for(var B=0;B<ClientTools._parallaxes.length;++B){var E=E=ClientTools._parallaxes[B];
90if(E.recalculateDimensions){var t=E.image[0].naturalWidth,D=E.image[0].naturalHeight,C=E.parent.outerWidth(),A=t/D;E.parentTop=E.parent.offset().top;E.parentHeight=E.parent.outerHeight();if(t!=C){t=C;D=t/A}if(D<E.parentHeight){D=E.parentHeight;t=D*A}E.image.css({width:t+"px",height:D+"px"});E.imageHeight=D}var w=E.imageHeight-E.parentHeight,s=E.parentTop+E.parentHeight,z=E.parentTop,v=$(window).scrollTop(),r=window.innerHeight,u=v+r,y=(u-z)/(E.parentHeight+r),x=Math.round((w*y*(E.speed==="slow"?0.5:1)));if((s>v)&&(z<(v+r))){E.image.css("transform","translate3D(-50%,"+x+"px, 0)")}}},refreshDelayedWidgets:function(){$('div.with-delay:not("with-delay-initialized")').each(function(s,w){w=$(w);w.addClass("with-delay-initialized");var v=$window.width();var u=v<=480;var r=!u&&v<=1024;if(!u&&!r&&w.hasClass("mobile-only")){return}if(u&&w.hasClass("phone-hidden")){return}if(r&&w.hasClass("tablet-hidden")){return}var t=WebPlatform.parse(w.data("delay"))||0;WebPlatform.delay(t*1000,function(){w.addClass("delay-ended")})})},_parallaxes:[],refreshParallaxes:function(){$("body").find('[data-parallax]:not(".with-parallax")').each(function(r,u){u=$(u).addClass("with-parallax");var v=u.data("speed")||"normal",x=u.data("parallax"),w=u.data("alt")||"",s,t;if(v==="fixed"){t=windowWidth<=768?"fixed-mobile-parallax":"fixed-parallax"}else{t="moving-parallax"}s=$('<div class="parallax-bg '+t+'"><img src="'+x+'" alt="'+WebPlatform.escapeHtml(w)+'"/></div>');s.prependTo(u);ClientTools.onImagesLoaded(s,function(){var y=s.find("img");y.css("display","block");if(v==="fixed"){s.css("background-image",'url("'+x+'")')}else{ClientTools._parallaxes.push({parent:u,image:y,speed:v,recalculateDimensions:true});window.requestAnimationFrame(ClientTools.repaintParallaxes)}x=null;u=null;v=null;s=null})})},tick:function(){return new Date().getTime()},portfolioPopup:(function(){var r=300,s=null,y=null,w=null,t=null,v=null,u=null,z=function(){y='<div class="portfolio-item-detail show" data-role="close">             <div class="preview" data-role="close"></div>             <div class="details">               <div class="content">                 <div class="post-summary">                   <h5 class="post-title"></h5>                   <div class="categories"></div>                   <span class="post-description"></span>                 </div>               </div>               <div class="buttons">                 <a title="" class="view primaryColor-bg2">'+WebPlatform.Phrases["label.view"]+"</a>               </div>             </div>           </div>";$("body").append('<div id="portfolio-popups-overlay"></div>             <div id="portfolio-popups" data-role="close">               <a class="close" title="" data-role="close"> X </a>               <a class="prev" title=""> &lt; </a>               <a class="next" title=""> &gt; </a>               <div id="portfolio-popup-content" data-role="close">               </div>             </div>');w=$("#portfolio-popups-overlay");t=$("#portfolio-popup-content");s=$("#portfolio-popups");v=s.find(".prev");u=s.find(".next");w.add(s).on("click",'[data-role="close"]',function(B){if($(B.target).data("role")!=="close"){return}$("body").removeClass("with-popup");var A=s.find(".active").add(s).add(w).add(t);A.removeClass("active");v.add(u).removeClass("visible").off("click");ClientTools.delay(r,function(){A.removeClass("show");t.find(".portfolio-item-detail").remove()})})},x=function(F,G){if(G<=0){v.removeClass("visible")}else{v.addClass("visible")}if(G>=(F.length-1)){u.removeClass("visible")}else{u.addClass("visible")}if(G<0||G>=F.length){return}var I=F.data("showingInPopup");F.data("currentItem",G);var H=F.filter('[data-index="'+G+'"]');var E=H.find(".zoom").length>0;var C=H.find(".popup").length>0;if(!E&&!C){I=false}else{if(I&&!C){I=false}else{if(!I&&!E){I=true}}}var D=$(y);var A=H.data("featured");var N="";if(A===0){N="<div style=\"background-image: url('"+H.find("[data-image]").data("image")+"')\"></div>";N+='<img class="hide-in-popup" src="'+H.find("[data-image]").data("image")+'" alt="" />'}else{if(A===1){var J=H.find("[data-image]");var M=J.eq(0).data("image");N+='<img src="'+M+'" alt="" style="opacity: 0; visibility: hidden" />';N+='<div class="inline-gallery">';J.each(function(){N+='<div class="inline-gallery-item" style="background-image: url(\''+$(this).data("image")+"')\"></div>"});N+="</div>"}else{N=H.find('[data-image="video"]').html()}}D.find(".preview").html(N);var L=H.find('[data-type="url"]');var B=D.find(".view");if(L.length>0){B.attr("href",L.attr("href"))}else{B.remove()}D.find(".categories").html(H.find('[data-type="categories"]').html());D.find(".post-title").html(H.find('[data-type="title"]').html());D.find(".post-description").html(H.find('[data-type="description"]').html());t.append(D);D.removeClass("in-popup in-lightbox").addClass(I?"in-popup":"in-lightbox");var K=t.find(".active");K.removeClass("active");ClientTools.delay(r,function(){K.remove()});t.addClass("active-loading");ClientTools.onImagesLoaded(D,function(){t.removeClass("active-loading");var P=I?D.width():D.find(".preview").width();var R=$window.width()*0.9;var O=D.height();var Q=$window.height();D.css({left:((R-P)/2)+"px",top:(Q>O?((Q-O)/2):-((O-Q)/2))+"px"});ClientTools.refreshLightboxes();D.addClass("active").data("lastshowtype",I)})};return{setup:function(A){if(s===null){z()}A.data("currentItem",0);
90A.data("showingInPopup",false);A.find(".zoom, .popup").click(function(){v.click(function(){x(A,A.data("currentItem")-1)});u.click(function(){x(A,A.data("currentItem")+1)});var C=$(this);$("body").addClass("with-popup");var B=C.closest("[data-index]").data("index");$("#portfolio-popup-content").addClass("show active").find(".portfolio-item-detail").addClass("show");s.addClass("show active");w.addClass("show active");A.data("showingInPopup",C.hasClass("popup"));x(A,B);return false})}}})(),setupPortfolioPopup:function(r){ClientTools.portfolioPopup.setup(r)},bindCountryAndState:function(v,t,w,s){var x="";for(var r=0;r<COUNTRY_CODES.length;++r){var u=COUNTRY_CODES[r];x+='<option value="'+u+'">'+((COUNTRIES||COUNTRY_CODES)[r]||u)+"</option>"}v.empty().append(x).val(w).change(function(){var y=$(this);var B=y.val();var F=t.val();if(B==="US"||B==="CA"||B==="DZ"||B==="NG"){var D=t;var E="",A="";if(t.is("input")){E=t.attr("placeholder")||"State";A=t.attr("name")||"state";D=$('<select name="'+A+'"></select>');t.replaceWith(D);t=D}else{E=D.data("placeholder");D.empty()}var z=STATES[B];markup="";markup+='<option value="" disabled selected="selected">'+E+"</option>";for(var G=0;G<z.length;++G){markup+='<option value="'+z[G]+'">'+z[G]+"</option>"}D.data("placeholder",E).html(markup);var C=D.find('option[value="'+(F||"")+'"]');if(C.length>0){C.prop("selected",true)}}else{if(t.is("select")){var E=t.data("placeholder")||"State";var A=t.attr("name")||"state";var D=$('<input value="" type="text" placeholder="'+E+'" name="'+A+'" />');t.replaceWith(D);t=D}}(s||dummy)(y)}).change()},isAddressTheSame:function(s,r){if(s===r){return true}s=s||{};r=r||{};if(!r.name&&!r.companyName&&!r.companyId&&!r.phone&&!r.vatId&&!r.state&&!r.city&&!r.zipCode&&!r.address&&!r.address2){return true}return(s.name||"")===(r.name||"")&&(s.companyName||"")===(r.companyName||"")&&(s.companyId||"")===(r.companyId||"")&&(s.phone||"")===(r.phone||"")&&(s.vatId||"")===(r.vatId||"")&&(s.country||"")===(r.country||"")&&(s.state||"")===(r.state||"")&&(s.city||"")===(r.city||"")&&(s.zipCode||"")===(r.zipCode||"")&&(s.address||"")===(r.address||"")&&(s.address2||"")===(r.address2||"")},bindMemberAddressForm:function(A,u,y,D,z){D=D||false;var x=A.find('select[name="shippingCountry"]');var w=A.find('select[name="billingCountry"]');var B="";var v=null;for(var C=0;C<COUNTRY_CODES.length;++C){var s=COUNTRY_CODES[C];if(!D||D(s,"shipping")){if(s===u||v===null){v=s}B+='<option value="'+s+'">'+((COUNTRIES||COUNTRY_CODES)[C]||s)+"</option>"}}x.empty().append(B).val(v);B="";v=null;for(var C=0;C<COUNTRY_CODES.length;++C){var s=COUNTRY_CODES[C];if(!D||D(s,"billing")){if(s===y||v===null){v=s}B+='<option value="'+s+'">'+((COUNTRIES||COUNTRY_CODES)[C]||s)+"</option>"}}w.empty().append(B).val(v);B=null;var t=A.find(".billing-address-wrapper");var r=A.find('input[name="useDifferentBillingAddress"]');r.change(function(){t[this.checked?"slideDown":"slideUp"]("fast")}).change();A.find('input[name="shippingCompanyName"], input[name="billingCompanyName"]').keyup(function(){$(this).next()[this.value.trim()===""?"slideUp":"slideDown"]("fast")}).keyup();A.on("change",'select[name="shippingState"], select[name="billingState"]',function(){(z||dummy)($(this))});A.on("change",'input[name="shippingCompanyName"], input[name="shippingCompanyId"], input[name="shippingZipCode"], input[name="shippingState"]',function(){(z||dummy)($(this))});A.find('select[name="shippingCountry"], select[name="billingCountry"]').change(function(){var F=$(this);var G=F.val();var I=this.name.indexOf("shipping")===0?"shipping":"billing";var N=F.parent();var J=N.find('[name="'+I+'State"]');var O=J.val();if(G==="US"||G==="CA"||G==="DZ"||G==="NG"){var K=J;var M="";if(J.is("input")){M=J.attr("placeholder")||"State";K=$('<select name="'+I+'State"></select>');J.replaceWith(K)}else{M=K.data("placeholder");K.empty()}var E=STATES[G];markup="";markup+='<option value="" disabled selected="selected">'+M+"</option>";for(var L=0;L<E.length;++L){markup+='<option value="'+E[L]+'">'+E[L]+"</option>"}K.data("placeholder",M).html(markup);var H=K.find('option[value="'+(O||"")+'"]');if(H.length>0){H.prop("selected",true)}}else{if(J.is("select")){var M=J.data("placeholder")||"State";J.replaceWith('<input value="" type="text" placeholder="'+M+'" name="'+I+'State" />')}}(z||dummy)(F)}).change()},isMobile:WebPlatform.isMobile,requestResource:WebPlatform.requestResource,setupFormFields:function(u){var t=u.find(".date-pick");if(t.length>0){ClientTools.requestResource(resources+"/scripts/jquery-ui.min.js?v="+resourcesVersion,resources+"/styles/jquery-ui.min.css?v="+resourcesVersion,function(){return !!$.datepicker},function(){t.datepicker({dateFormat:WebPlatform.dateFormat})})}var s=u.find(".with-countries");if(s.length>0){WebPlatform.requestResource(resources+"/scripts/i18n/countries/"+locale+".js",null,function(){return window.COUNTRIES&&window.COUNTRIES.length},function(){var y="";for(var v=0;v<COUNTRY_CODES.length;++v){var x=COUNTRY_CODES[v];var w=x===(WebPlatform.ipCountryCode||"");y+='<option value="'+x+'"'+(w?' selected="selected"':"")+">"+((COUNTRIES||COUNTRY_CODES)[v]||x)+"</option>"}s.html(y)})}var r=WebPlatform.getUrlParameterMap(window.location.href)||{};if(Object.keys&&Object.keys(r).length){u.find("[data-name]").each(function(){try{var x=$(this);var v=x.data("name");if(r[v]){x.val(r[v])}else{if(r[v.toLowerCase()]){x.val(r[v.toLowerCase()])}else{urlKey=WebPlatform.removeDiacritics(v,false).toLowerCase().replace(/[^a-zа-я0-9_\s]|_/g,"").replace(/\s+/g," ").trim().replace(/ /g,"-");if(r[urlKey]){x.val(r[urlKey])}}}}catch(w){}})}},readFormFields:function(s){var r={hasErrors:false,values:[],urlFields:[],file:null};s.each(function(E,B){var B=$(B);var y=B.hasClass("required-field");var z=B.data("type");var t="",D="";var F=false;if(z==="text"||z==="password"||z==="date"||z==="hidden"){var C=B.find("input");t=C.data("name");D=C.val()}else{if(z==="textarea"){D=B.find("textarea").val()}else{if(z==="radio"||z==="range"||z==="select"&&B.children(".select-wrapper").length>0){var u=B.find("input:checked");D=u.length>0?u.val():"";t=u.data("name")}else{if(z==="select"){var A=B.find("select");D=A.val();t=A.data("name")}else{if(z==="checkbox"){D=[];var x=B.find("input:checked");x.each(function(G,H){D.push(H.value)});D=D.join("\n");if(x.length){t=x.eq(0).data("name")}}else{if(z==="recaptcha"){D=B.find(".recaptcha-target").data("captcharesponse")}else{if(z==="amount"){var v=B.find("input");D=v.val();r.amount=D;F=true;t=v.data("name")}else{if(z==="file"){var w=B.find('input[type="file"]');
90if(w.length>0){w=w[0];r.file=w.files.length>0?w.files[0]:null}}else{F=true}}}}}}}}if(y&&(z==="file"&&r.file===null||z!=="file"&&$.trim(D)==="")){B.addClass("field-invalid");r.hasErrors=true}else{B.removeClass("field-invalid")}if(!F){r.values.push(D)}if(t&&(t+"").trim()){r.urlFields.push({name:t,value:D,type:z})}});return r},setupRecaptcha:function(r){r=$.extend({ui:null,button:null,onLoaded:dummy,onVerified:dummy,onExpired:dummy,useDarkTheme:false},r);if(r.button){r.button.addClass("disabled")}var s=r.ui.eq(0);ClientTools.requestResource("https://www.google.com/recaptcha/api.js?onload=onRecaptchaLoaded&render=explicit",null,function(){return recaptchaLoaded&&window.grecaptcha},function(){var t=window.grecaptcha.render(s[0],{sitekey:window.recaptchaSiteKey||"6LfMvTYUAAAAAG_8FphtAIqzNpbKW4UWV3IH0mg0",callback:function(u){s.data("captcharesponse",u);if(r.button){r.button.removeClass("disabled")}r.onVerified()},"expired-callback":function(){if(r.button){r.button.addClass("disabled")}r.onExpired()},theme:r.useDarkTheme?"dark":"light"});s.data("recaptchaid",t);r.onLoaded(t)})},resetRecaptcha:function(s,r){var t=s;if(s instanceof jQuery){if(s.hasClass("recaptcha-target")){t=s.data("recaptchaid")}else{t=s.find(".recaptcha-target").data("recaptchaid")}}if(window.grecaptcha&&!isUndefined(t)){window.grecaptcha.reset(t);if(r){r.addClass("disabled")}}},refreshForms:function(){var t=$document.find('div[data-role="form"]:not(.form-initialized)');var s=t.filter(".payment-form").length>0;var w=false;var v=false;if(s){t.each(function(){var y=$(this);if(y.hasClass("payment-form")){var x=$(this).data("processor")||"braintree";v=v||x==="stripe";w=w||x==="braintree"}})}var r=function(){t.addClass("form-initialized").each(function(x,y){c($(this))})};if(s){var u=0;if(v){++u}if(w){++u}if(v){WebPlatform.requestResource("https://js.stripe.com/v3/",null,function(){return !!window.Stripe},function(){if(--u===0){r()}})}if(w){WebPlatform.requestResource("https://js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js",null,function(){return !!window.braintree},function(){if(--u===0){r()}})}}else{r()}}}}();ClientTools.onDocumentReady(ClientTools.refreshLightboxes);ClientTools.onDocumentReady(function(){var a=0;for(a=0;a<TMDP_SLIDERS.length;++a){var b=TMDP_SLIDERS[a++];var c=$(b.sliderSelector);b.preprocess(b,c)}a=0;var d=function(){if(a>=TMDP_SLIDERS.length){return}var f=TMDP_SLIDERS[a++];var g=$(f.sliderSelector);try{g.tmdpSlide(f)}catch(h){Log.error(h)}ClientTools.delay(1000,d)};d()});ClientTools.onDocumentReady(function(){ClientTools.addOnScrollListener(function(){$document.find(".anim-delayed-item:not(.anim-displayed)").each(function(){var f=$(this);var b=f.data("animation");var g=f.data("animationDuration")||1100;var d=f.data("animationDelay")||0;var h=parseFloat(f.data("delay"))||0.5;var i=$window.scrollTop();var a=i+$window.height();var c=f.offset().top;var e=c+f.outerHeight(true);c=c+h*f.outerHeight(true);if(c<=a&&e>=i){f.css({"animation-delay":d+"ms","animation-duration":g+"ms"}).addClass("anim-displayed "+b)}})})});ClientTools.onDocumentReady(function(){if(!ClientTools.isMobile()||window.scrollToTopEnabledOnMobile===true){var a=$document.find(".scrollToTop");if(a.length>0){ClientTools.addOnScrollListener(function(){if($window.scrollTop()>500){a.fadeIn()}else{a.fadeOut()}});a.click(ClientTools.scrollToTop)}}else{$document.find(".scrollToTop").addClass("none")}});ClientTools.onDocumentReady(ClientTools.highlightMarkup);ClientTools.onDocumentReady(ClientTools.refreshParallaxes);ClientTools.onDocumentReady(ClientTools.refreshDelayedWidgets);ClientTools.addOnScrollListener(function(){window.requestAnimationFrame(ClientTools.repaintParallaxes)});ClientTools.addOnResizeListener(function(){for(var a=0;a<ClientTools._parallaxes.length;++a){var b=ClientTools._parallaxes[a];b.recalculateDimensions=true;window.requestAnimationFrame(ClientTools.repaintParallaxes)}});ClientTools.onDocumentReady(function(){$(document).on("click",".player-icon",function(){var a=$(this);var b=$(a.parent().find(".source").text());b.andSelf().filter("[src]").each(function(c,d){d=$(d);var e=d.attr("src");if(e.indexOf("autoplay")<0){e+=(e.indexOf("?")>=0?"&":"?")+"autoplay=1"}else{e=e.replace(/autoplay=0/ig,"autoplay=1")}d.attr("src",e)});a.replaceWith(b)})});ClientTools.onDocumentReady(ClientTools.refreshForms);ClientTools.onSetupMenu(function(){var a=$document.find(".navigation-wrapper"),e=a.hasClass("navigation-wrapper-fixed"),j=a.find(".navToggle");
90$document.on("click",".burger-menu-trigger, .burger-menu-visible .website-nav-link",function(){$(this).closest(".menu-widget").toggleClass("burger-menu-visible");$(this).closest(".grid-row").toggleClass("burger-menu-visible");$(this).closest(".header-row").toggleClass("burger-menu-visible");$(document.body).toggleClass("no-overflow")}).on("click",".mobile-burger, .mobile-header-overlay",function(){$(this).closest(".page-layout").toggleClass("open")});WebPlatform.initFixedHeader($document);if(j.length>0){var i=$document.find(".slide"),k=i.filter("nav"),g=$document.find(".content"),f=$(document.body);var h=function(){f.removeClass("nav-open");i.removeClass("open");WebPlatform.onTransitionEnd(k,function(){f.removeClass("visible-nav")},500)};j.click(function(n){if(f.hasClass("nav-open")){h()}else{f.addClass("nav-open visible-nav");i.addClass("open")}n.stopPropagation();n.preventDefault();return false});g.click(function(){if(f.hasClass("nav-open")){h()}})}setupMegaMenu(a);var d=$(".with-submenu");if(d.length>0){var m=a.hasClass("sidenav-dropdown");if(!m){if(windowWidth<=768){a.addClass("sidenav-dropdown")}ClientTools.addOnResizeListener(function(){if(windowWidth>768){a.removeClass("sidenav-dropdown");a.find(".with-submenu>div").show()}else{a.addClass("sidenav-dropdown")}})}d.on("click",".submenu-arrow",function(o){if(windowWidth>768&&a.length&&!m){return}var n=$(this).closest(".with-submenu");n.toggleClass("visible");n.find(">div")[n.hasClass("visible")?"slideDown":"slideUp"]("fast");o.stopPropagation();o.preventDefault();return false})}if(windowWidth>768){var l=$(".page-layout"),c=l.hasClass("style-boxed-layout"),b=false;enableStickyNavRight=false;if(e||b||enableStickyNavRight){WebPlatform.onImagesLoaded(a.find('[data-role="logo"]'),function(){if(b||enableStickyNavRight){if(c){var r=function(){var u=a.closest(".page-layout");var x=a.find("nav");if(b){var w=u.offset().left;x.css("left",(w-x.outerWidth(true))+"px")}else{var v=windowWidth-u.offset().left-u.width()-x.outerWidth(true);x.css({right:v+"px",left:"auto"})}};ClientTools.addOnResizeListener(r);r()}}if(e){var p=0,t=a.height(),s=a.find(a.data("fixed"))||[],o=(s.length===0?a:s).offset().top,q=false,n=a.hasClass("is-absolute")?null:a.closest(".page-layout");ClientTools.addOnScrollListener(function(){if(windowWidth<=768&&!q){return}var u=window.pageYOffset||$document.scrollTop();if(u>o&&!q&&p<u){a.addClass("smaller");q=true;if(n!==null){n.css("padding-top",t+"px")}}else{if(q&&u<=o&&p>u){a.removeClass("smaller");q=false;if(n!==null){n.css("padding-top","0px")}}}p=u})}})}}$('a[href*="#"]:not([href="#"])').click(function(){if(window.location.pathname.replace(/^\//,"")===this.pathname.replace(/^\//,"")&&window.location.hostname===this.hostname){var n=this.hash.slice(1);if(n.indexOf("/")>0){return}var o=$('[name="'+n+'"]');if(o.length){$(".page-layout").removeClass("open");$("html, body").animate({scrollTop:o.offset().top-(e?a.height():0)},1000)}}})});var setupMegaMenu=function(a){var b=function(e){var c=$(this).data("megaId"),d=c?$("#"+c):null;if(d===null||d.length===0){return}WebPlatform.delay(300,function(){if(d.hasClass("over")){return}d.removeClass("visible").css("top","400px")});d.removeClass("over")};$("li[data-mega]").mouseenter(function(){var j=$(this),e=j.closest(".header-row"),d=j.closest(".container");if(e.length===0){e=j.closest(".navigation-wrapper")}if(e.length===0||d.length===0){return}var c=j.data("megaId");var h;if(c){h=$("#"+c);if(h.length===0){return}}else{h=j.children(".mega-menu-wrapper");if(h.length===0){return}c=h.attr("id");j.data("megaId",c);h.data("megaId",c);h.appendTo($(".page-layout"));h.mouseenter(function(){$(this).addClass("over")}).mouseleave(b)}var g=$(".mega-menu-wrapper.visible").not(h);if(g.length>0){g.removeClass("over visible")}var i=e[0].getBoundingClientRect();var f=d[0].getBoundingClientRect();h.css({top:i.bottom,left:f.left,width:f.right-f.left});h.addClass("over");WebPlatform.delay(10,function(){h.addClass("visible");$(window).scroll()})}).mouseleave(b)};var TmdpLightbox=function(){var a=300,f=false,c=null,k=0,o=[],i,j,d,g,b,p='<div class="tmdp-simple-lightbox-detail in-lightbox show" data-role="close">  <div class="preview" data-role="close">
90   <div style="background-image: url(\'%image%\')"></div>   <img class="hide-in-popup" src="%image%" alt="" />  </div></div>',h='<div class="tmdp-simple-lightbox-detail in-lightbox show" data-role="close">  <div class="preview" data-role="close">%data%</div></div>';var n=function(u){if(u<=0){g.removeClass("visible")}else{g.addClass("visible")}if(u>=(o.length-1)){b.removeClass("visible")}else{b.addClass("visible")}if(u<0||u>=o.length){return}var s;var t=o[u];if($.isArray(t)&&t.length===1){t=t[0]}var w=false;if(t.isVideo){s=$(WebPlatform.format(h,"data",t.video))}else{if($.isArray(t)){var r='<img src="'+t[0]+'" alt="" style="opacity: 0; visibility: hidden" />';r+='<div class="inline-gallery full-size absolute">';for(var v=0;v<t.length;++v){r+='<div class="inline-gallery-item" style="background-image: url(\''+t[v]+"')\"></div>"}r+="</div>";s=$(WebPlatform.format(h,"data",r));w=true}else{s=$(WebPlatform.format(p,"image",t))}}k=u;var q=d.find(".active");q.removeClass("active");WebPlatform.delay(a,function(){q.remove()});d.addClass("active-loading");d.append(s);if(w){ClientTools.refreshLightboxes()}WebPlatform.onImagesLoaded(s,function(){d.removeClass("active-loading");var y=s.find(".preview").width();var A=$window.width()*0.9;var x=s.height();var z=$window.height();s.css({left:((A-y)/2)+"px",top:(z>x?((z-x)/2):-((x-z)/2))+"px"});s.addClass("active")})};var l=function(r){if($(r.target).data("role")!=="close"){return}i.removeClass("with-popup");var q=c.find(".active").add(c).add(j).add(d);q.removeClass("active");g.add(b).removeClass("visible");ClientTools.delay(a,function(){q.removeClass("show");d.find(".tmdp-simple-lightbox-detail").remove()})};var m=function(){if(f){return}f=true;i=$("body");resources=i.data("resources");locale=i.data("locale");
90content=i.data("content");resourcesVersion=WebPlatform.parse(i.data("ver"),0,true);i.append('<div id="tmdp-simple-lightbox-overlay"></div><div id="tmdp-simple-lightbox" data-role="close">  <a class="close" style="cursor: pointer" title="" data-role="close"> X </a>  <a class="prev" style="cursor: pointer" title=""> &lt; </a>  <a class="next" style="cursor: pointer" title=""> &gt; </a>  <div id="tmdp-simple-lightbox-content" data-role="close"></div></div>');c=$("#tmdp-simple-lightbox");j=$("#tmdp-simple-lightbox-overlay");d=$("#tmdp-simple-lightbox-content");g=c.find(".prev").click(function(){n(k-1)});b=c.find(".next").click(function(){n(k+1)});j.add(c).on("click",'[data-role="close"]',l).click(l)};var e=function(q,v){v=$(v);v.addClass("with-tmdp-lightbox");var u=[];var s=v.attr("data-trigger");var r=v[0].hasAttribute("data-manual-trigger");var t=!!s;if(!t){s="[data-slide]"}if(r){v.find(s).data("manual",true)}v.children("[data-slide]").each(function(){var x=$(this);if(!r&&t){if(x.find(s).length===0){return}}var y=x.addClass("tmdp-simple-lightbox-slide").attr("data-slide");if(!x.hasClass("no-lightbox-hover")){x.addClass("with-hover")}x.data("idx",u.length);if(y===""){var w=[];x.find("[data-image]").each(function(){var A=$(this);var z=A.attr("data-image");if(z==="video"){w.push({isVideo:true,video:A.html()})}else{w.push(z)}});y=w}u.push(y)});v.on("mousedown.lightbox",s,function(y){var x=$(this);if(!x.attr("data-slide")&&(x.data("manual")!==true)){x=x.closest("[data-slide]")}i.addClass("with-popup");c.add(j).add(d).addClass("show active");var w=x.data("idx");o=u;n(w);y.stopPropagation();y.preventDefault();return false})};return{refreshLightboxes:function(q){if(!f){m()}if(q){e(0,q)}else{i.find('[data-rel="lightbox"]:not(".with-tmdp-lightbox")').each(e)}},removeLightbox:function(q){if(!q.hasClass("with-tmdp-lightbox")){return}q.removeClass("with-tmdp-lightbox").off(".lightbox")}}}();ClientTools.onDocumentReady(function(){var a=WebPlatform.getUrlQueryParameter(window.location.href,"preview")!=="";if(!WebPlatform.areSystemAnalyticsEnabled()||window.location.pathname.indexOf("/_preview")===0||a||WebPlatform.pageForbidden===true){return}var b=(function(){var f=navigator.userAgent,d,g=f.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];if(/trident/i.test(g[1])){d=/\brv[ :]+(\d+)/g.exec(f)||[];return["Internet Explorer",(d[1]||"")]}if(g[1]==="Chrome"){d=f.match(/\b(OPR|Edge)\/(\d+)/);if(d!==null){d=d.slice(1);for(var e=0;e<d.length;++e){d[e]=d[e].replace("OPR","Opera")}return d}}g=g[2]?[g[1],g[2]]:[navigator.appName,navigator.appVersion,"-?"];d=f.match(/version\/(\d+)/i);if(d!==null){g.splice(1,1,d[1])}return g})();var c={browser:b[0],browserVersion:b[1],url:window.location.pathname,query:window.location.search,title:document.title,referrer:document.referrer.indexOf(location.protocol+"//"+location.host)===0?"":document.referrer,screenWidth:screen.width||windowWidth,screenHeight:screen.height||windowHeight,funnelVar:WebPlatform.Funnels&&WebPlatform.Funnels.variant?WebPlatform.Funnels.variant:"",_r:(new Date()).getTime()};$.post("/hit",c).done(dummy).fail(dummy)});ClientTools.onDocumentReady(function(){$document.on("click",".css-toggle",function(){$(this).toggleClass("toggle-visible").nextAll(".css-toggle-target").slideToggle("fast")})});ClientTools.onDocumentReady(function(){if(WebPlatform.cookiesDisclaimer===""||WebPlatform.ipCountryCode===""||Cookies.get("dismiss-cookie-disclaimer")){return}if(WebPlatform.getUrlQueryParameter(window.location.href,"dismiss-cookies-disclaimer")==="yes"){return}var b=function(){var c=$('<div id="cookie-disclaimer-box"><div></div><a class="cookie-info"></a><a class="cookies-accept"></a></div>');c.children("div").html(WebPlatform.cookiesDisclaimer);var d=c.find(".cookie-info");if(WebPlatform.cookiesInfoBtn){d.html(WebPlatform.cookiesInfoBtn).attr("href",WebPlatform.cookiesInfoBtnLink)}else{d.remove()}c.children(".cookies-accept").html(WebPlatform.cookiesAcceptBtnText).click(function(){c.removeClass("visible");Cookies.set("dismiss-cookie-disclaimer","1",{expires:5*365,path:"/"});c=null});c.appendTo(document.body);ClientTools.delay(200,function(){c.addClass("visible")})};Log.log("Located in "+WebPlatform.ipCountryCode+"!");var a=true;if(a){b()}else{Cookies.set("dismiss-cookie-disclaimer","1",{expires:5*365,path:"/"})}});ClientTools.onDocumentReady(function(){var d=$("body").find(".grid-row[data-video]:not(.with-video)").addClass("with-video");if(d.length===0){return}var a=document.createElement("script");a.src="https://www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);var e=function(h,k,i,j,f,g){if(f<=j){f=9999999999}h.target.loadVideoById({videoId:i,startSeconds:j,endSeconds:f,suggestedQuality:"large"});if(g>=10){h.target.setVolume(g)}else{h.target.mute()}};var c=function(f,h,g){switch(f.data){case YT.PlayerState.UNSTARTED:break;case YT.PlayerState.PLAYING:$("#"+h).addClass("active");break;case YT.PlayerState.ENDED:if(g>f.target.getDuration()){g=0}f.target.seekTo(g);break}};window.onYouTubePlayerAPIReady=function(){d.each(function(){var g=$(this),l="video-"+g.attr("id"),k=ClientTools.parse(g.data("videoStart"),0),f=ClientTools.parse(g.data("videoEnd"),0),i=Cl
90ientTools.parse(g.data("videoVolume"),0);if(window.getComputedStyle(g[0]).display==="none"){return}g.append('<div class="full-size-abs container-video"><div id="'+l+'" class="container-video-wrapper slow-transition-opacity"></div><div class="full-size-abs"></div></div>');var j=WebPlatform.extractYoutubeVideoId(g.data("video")||"");var h=new YT.Player(l,{events:{onReady:function(m){e(m,l,j,k,f,i)},onStateChange:function(m){c(m,l,k)},onError:function(m){Log.error("Unable to load video background");Log.error(m)}},playerVars:{autoplay:0,autohide:1,modestbranding:1,rel:0,mute:i<10?1:0,showinfo:0,controls:0,disablekb:0,enablejsapi:0,iv_load_policy:3,playsinline:1,origin:window.location.origin||(window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""))}});g.data("player",h)})};$window.on("load resize",function(){d.each(function(){var i=$(this),g=i.width(),k=i.height(),j=i.data("player"),f=i.find(".video-wrapper");if(j){if(g/k>16/9){j.setSize(g,g/16*9);f.css("left","0px")}else{j.setSize(k/9*16,k);f.css({left:-(f.outerWidth()-g)/2})}}})})});ClientTools.onDocumentReady(function(){if(ClientTools.isMobile()||WebPlatform.Store.activePage==="checkout"||WebPlatform.Store.activePage==="cart"){return}var f=$(".with-quick-cart");if(f.length>0){var b=$(".cart-preview-popup"),d=false,c=false,e=null;var a=function(){if(d||c||!b.hasClass("visible")){return}WebPlatform.onTransitionEnd(b.removeClass("animate"),function(){b.removeClass("visible")},300)};b.mouseover(function(){d=true}).mouseout(function(){d=false;WebPlatform.clearDelay(e);e=WebPlatform.delay(500,a)});f.mouseover(function(){var g=this.getBoundingClientRect();c=true;WebPlatform.Store.renderCart();b.css({top:(g.bottom+10)+"px",right:(windowWidth-g.right)+"px"}).addClass("visible");WebPlatform.delay(10,function(){b.addClass("animate")})}).mouseout(function(){c=false;WebPlatform.clearDelay(e);e=WebPlatform.delay(500,a)})}});ClientTools.onDocumentReady(function(){$document.on("click",".plan-get-started",function(){var g=$(this);var f=g.data("link")||"";var e=g.data("plan");var h=g.data("period");var b=f.indexOf("?")>-1?"&":"?";var c=WebPlatform.getUrlQueryParameter(window.location.href,"template");var d=WebPlatform.getUrlQueryParameter(window.location.href,"category");var a=WebPlatform.getUrlQueryParameter(window.location.href,"funnel");f+=b+"plan="+e+"&period="+h;if(c){f+="&template="+c}if(d){f+="&category="+d}if(a){f+="&funnel="+a}window.location.href=f});$document.on("click",".plan-switch a",function(){var a=$(this),c=a.closest(".widget"),b=a.data("role");a.parent().find(".primaryColor-bg2").removeClass("primaryColor-bg2");a.addClass("primaryColor-bg2");c.find(".pricing-table").each(function(d,e){e=$(e);var f=b==="monthly"?e.data("monthly"):e.data("yearly");e.find('[data-role="price"]').contents().filter(function(){return this.nodeType===3&&this.textContent.trim()!==""}).each(function(){this.textContent=f})}).removeClass("price-monthly price-yearly").addClass("price-"+b);c.find(".plan-get-started").data("period",b)})});ClientTools.onDocumentReady(ClientTools.refreshCountdowns);ClientTools.onDocumentReady(ClientTools.refreshToggles);ClientTools.onDocumentReady(function(){window.addEventListener(WebPlatform.Events.FORM_SUBMITTED,function(a,b){if(WebPlatform.Store.fbPxId){window.fbq("track","Lead")}if(window.gtag){gtag("event","generate_lead")}else{if(window.dataLayer&&window.dataLayer.push){window.dataLayer.push({event:"Lead"})}}},false)});ClientTools.onDocumentReady(function(){var a=/Chrome/.test(navigator.userAgent);if(window.location.hash&&a){setTimeout(function(){var c=window.location.hash;if(c){var b=$('[name="'+c.replace("#","")+'"]');if(b.length){$("html, body").scrollTop(b.offset().top)}}},300)}});if(isUndefined(window.WebPlatform)){window.WebPlatform={}}WebPlatform.reportMemberRegistration=function(){if(WebPlatform.Store.fbPxId&&window.fbq){window.fbq("track","CompleteRegistration",{currency:WebPlatform.Store.currency,value:0})}if(window.gtag){gtag("event","sign_up")}else{if(window.dataLayer&&window.dataLayer.push){window.dataLayer.push({event:"SignUp"})}}};WebPlatform.areSystemAnalyticsEnabled=function(){var a=WebPlatform.getCookieName("analytics-enabled");try{if(window.localStorage.getItem(a)==="no"){return false}}catch(b){Log.error(b)}if(Cookies.get(WebPlatform.getCookieName("analytics-enabled"))==="no"){return false}return true};WebPlatform.setSystemAnalyticsEnabled=function(a){var b=WebPlatform.getCookieName("analytics-enabled");if(a){window.localStorage.removeItem(b);Cookies.remove(b,{path:"/"})}else{try{window.localStorage.setItem(b,"no")}catch(c){Log.error(c)}
90Cookies.set(b,"no",{expires:365,path:"/"});Cookies.remove("tmdp_stats",{path:"/"})}};WebPlatform.ChangeSystemAnalyticsSettings=function(){var c=$("#analyticsSettings");var a=function(){c.removeClass("visible").addClass("none")};var b=$("#analyticsTracking").prop("checked",WebPlatform.areSystemAnalyticsEnabled());c.removeClass("none").addClass("visible");c.one("click",".close-btn",a);c.one("click",".save-changes",function(){WebPlatform.setSystemAnalyticsEnabled(b.is(":checked"));a()})};WebPlatform.CloseActivePopup=function(){var a=$(".popup-wrapper.visible");if(a.length<1){return}var b=a.last().data("id");if(b){WebPlatform.Popups.hide(b)}};if(window.addEventListener){window.addEventListener("message",function(b){if(b.data&&b.data.startsWith&&b.data.startsWith("showstep|")){var a=b.data.substring("showstep|".length);WebPlatform.Funnels.show(a)}})}var inAnimations={bounceIn:"bounceOut",bounceInDown:"bounceOutDown",bounceInLeft:"bounceOutLeft",bounceInRight:"bounceOutRight",bounceInUp:"bounceOutUp",fadeIn:"fadeOut",fadeInUp:"fadeOutUp",fadeInDown:"fadeOutDown",fadeInLeft:"fadeOutLeft",fadeInRight:"fadeOutRight",flipInX:"flipOutX",flipInY:"flipOutY",lightSpeedIn:"lightSpeedOut",rotateIn:"rotateOut",rotateInDownLeft:"rotateOutDownLeft",rotateInDownRight:"rotateOutDownRight",rotateInUpLeft:"rotateOutUpLeft",rotateInUpRight:"rotateOutUpRight",rollIn:"rollOut",zoomIn:"zoomOut",zoomInDown:"zoomOutDown",zoomInLeft:"zoomOutLeft",zoomInRight:"zoomOutRight",zoomInUp:"zoomOutUp",slideInDown:"slideOutDown",slideInLeft:"slideOutLeft",slideInRight:"slideOutRight",slideInUp:"slideOutUp"};$.fn.extend({animateCss:function(d,b){b=b||function(){};var a="webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";var c=$(this);c.addClass("animated "+d).one(a,function(){c.removeClass("animated "+d);b()})}});$.fn.swipeX=function(a,b){a=a||function(){};b=b||function(){};this.each(function(){var c=null;function e(f){if(f.touches&&f.touches.length===1){c=f.touches[0].pageX;this.addEventListener("touchmove",d,false)}}function d(g){g.preventDefault();if(c!==null){var f=c-g.touches[0].pageX;if(Math.abs(f)>=25){this.removeEventListener("touchmove",d);c=null;if(f>0){a()}else{b()}}}}if("ontouchstart" in document.documentElement){this.addEventListener("touchstart",e,false)}});return this};$.fn.webPlatformSlider=function(b){var d=$.extend({},{slideDuration:1000,slideAnimationType:"fade",slideTransitionTime:1000,stopOnHover:false,showArrows:true,showBullets:true,showProgress:true,layerAreaStartWidth:1100,layerAreaBaseFontSize:14},b);var a=function(){var f=(document.body||document.documentElement).style;return f.transition!==undefined||f.WebkitTransition!==undefined||f.MozTransition!==undefined||f.MsTransition!==undefined||f.OTransition!==undefined}();var c=function(g,h,f){if(a){g.on("webkitTransitionEnd.trans mozTransitionend.trans oTransitionEnd.trans msTransitionEnd.trans transitionend.trans",function(){g.off(".trans");h()})}else{setTimeout(h,f||50)}};var e=function(x,u){var r=null,n=null,i=null,o=null,f=null,m=-1,y=-1,C=0,v=true,j=u.find(".tmdp-slide"),F=j.length,z=null,A=null,O=false,g=x.slideDuration;var G=function(){if(f===null||!v){return}clearInterval(f);f=null;if(z!==null){z.stop()}g=C-new Date().getTime()};var L=function(){if(f!==null||!v){return}if(g<50){M()}else{C=new Date().getTime()+g;h(false);f=setTimeout(M,g)}};var l=function(S,R,T){var Q=[];for(var w=S;w<R;++w){Q.push(w)}return T(Q)};var K=function(S,ac){var W=r==="image"?"url('"+n+"') no-repeat center center":n;var R=u.width(),ab=u.height(),X,V,Z=[],Y;if(ac.slice){V=1;X=10}else{X=Math.min(R/100,10);V=Math.max(ab/(R/X),1)}X=Math.round(X);V=Math.round(V);var w=X*V;var Z="";for(var U=0;U<w;U++){Z+='<div class="tmdp-tile tmdp-tile-'+ac.animationType+'"><div class="tmdp-tile-inner" style="width: '+R+"px; height: "+ab+"px; background: "+W+'"></div></div>'}u.append(Z);Y=u.find(".tmdp-tile");Y.css({width:R/X,height:ab/V});Y.each(function(){var ad=$(this).position();$(this).children().css({left:-ad.left+"px ",top:-ad.top+"px"})});var Q=l(0,w,ac.arrange),aa=ac.speed/w;var T=Y.eq(Q[Q.length-1]);c(T,function(){p(false,"none");Y.remove();S()},ac.speed+aa);Q.forEach(function(ae,ad){setTimeout(function(){Y.eq(ae).toggleClass("tmdp-tile-animated")},ad*aa)})};var J=function(V,W){var R=r==="image"?'url("'+n+'") no-repeat center center':n;var T=i==="image"?'url("'+o+'") no-repeat center center':o;var Q,U;if(O){Q=W?"slide-to-right":"slide-to-bottom";U=W?"slide-from-left":"slide-from-top"}else{Q=W?"slide-to-left":"slide-to-top";U=W?"slide-from-right":"slide-from-bottom"}var w=$('<div class="tmdp-slide-layer tmdp-animation-'+Q+'"></div>').css({"transition-duration":(x.slideTransitionTime/1000)+"s",background:T});var S=$('<div class="tmdp-slide-layer tmdp-animation-'+U+'"></div>').css({"transition-duration":(x.slideTransitionTime/1000)+"s",background:R});if(y>=0){w.appendTo(u)}S.appendTo(u);c(S,function(){p(false,"none");if(y>=0){w.remove()}S.remove();V()},x.slideTransitionTime);setTimeout(function(){if(y>=0){w.addClass("tmdp-anim-end")}S.addClass("tmdp-anim-end")},10)};var P=function(S,R){var w=r==="image"?'url("'+n+'") no-repeat center center':n;var Q=$('<div class="tmdp-slide-layer tmdp-animation-'+R+'"></div>').css({"transition-duration":(x.slideTransitionTime/1000)+"s",background:w});Q.appendTo(u);c(Q,function(){p(false,"none");Q.remove();S()},x.slideTransitionTime);setTimeout(function(){Q.addClass("tmdp-anim-end")},10)};var p=function(R,Q){if(Q==="none"){var w=r==="image"?'url("'+n+'") no-repeat center center':n;u.css("background",w);if(R){R()}}else{if(Q==="fade"||Q==="slide-from-left"||Q==="slide-from-top"||Q==="slide-from-right"||Q==="slide-from-bottom"){P(R,Q)}else{if(Q==="slide-horizontal"||Q==="slide-vertical"){J(R,Q==="slide-horizontal")}else{if(Q==="box-fade"||Q==="box-fade-random"){K(R,{slice:false,animationType:Q,speed:x.slideTransitionTime,arrange:function(S){return Q==="box-fade-random"?S.map(function(T){return[Math.random(),T]}).sort().map(function(T){return T[1]}):S}})}else{if(Q==="slice-from-left"||Q==="slice-from-right"){K(R,{slice:true,animationType:Q,speed:x.slideTransitionTime,arrange:function(S){return Q==="slice-from-left"?S:S.reverse()}})}}}}}};var t=function(){var w=j.eq(m).addClass("tmdp-show").find(".tmdp-layer");if(w.length===0){v=true}else{w.each(function(){var Q=$(this);var T=Q.data("start");var S=Q.data("speed");var R=Q.data("animationType");Q.css({"animation-duration":(S/1000)+"s","animation-delay":(T/1000)+"s","animation-timing-function":"cubic-bezier(0.215, 0.610, 0.355, 1.000)"}).animateCss(R||"fadeIn",function(){Q.addClass("tmdp-layer-show");v=true})})}};var D=function(S){v=false;if(y<0){S();return}var w=j.eq(y);var R=w.addClass("tmdp-show").find(".tmdp-layer");var Q=R.length;if(Q===0){w.removeClass("tmdp-show");
90w=null;S()}else{R.css("animation-delay","0s").each(function(){var T=$(this);var U=inAnimations[T.data("animationType")||"fadeIn"];T.animateCss(U,function(){T.removeClass("tmdp-layer-show");if(--Q===0){w.removeClass("tmdp-show");w=null;S()}})})}};var h=function(w){if(z===null){return}z.stop();if(w){z.css("width","0%")}z.animate({width:"100%"},g,"linear")};var B=function(w){y=m;m=w;if(A!==null){A.find(".active").removeClass("active");A.find(".tmdp-bullet").eq(m).addClass("active")}window.requestAnimationFrame(function(){D(function(){p(function(){C=new Date().getTime()+x.slideDuration;t();h(true);if(f!==null){clearTimeout(f)}f=setTimeout(M,x.slideDuration);O=false},x.slideAnimationType)})})};var q=function(w){if(w>=F){w=0}if(w<0){w=F-1}g=x.slideDuration;var Q=j.eq(w);i=r;o=n;r=Q.data("bgType");n=Q.data("bg");if(r==="image"&&Q.data("loaded")!==1){u.addClass("tmdp-slides-loading");$("<img />").attr("src",n).addClass("none tmdp-img-load").appendTo(Q);Q.waitForImages(function(){Q.data("loaded",1).find(".tmdp-img-load").remove();B(w);u.removeClass("tmdp-slides-loading")})}else{B(w)}};var M=function(){if(v){q(m+1)}};var s=function(){if(v){q(m-1)}};var k=function(){var w=$(this).index();O=w<m;if(v&&m!==w){q(w)}};var I=function(){if(F===0){return}var w=u.width(),S=u.height(),R=w/S,Q=j.eq(0).find(".tmdp-layers"),T=Q.width(),U=T/R;j.css("font-size",(T/x.layerAreaStartWidth*x.layerAreaBaseFontSize)+"px").find(".tmdp-layers").css({height:U+"px",marginTop:(-U/2)+"px"})};$(window).resize(I);if(F>0){var H=windowWidth||$(window).width();if(x.showProgress){z=$('<div class="tmdp-progress"><div class="tmdp-progress-inner"></div></div>').appendTo(u).find(".tmdp-progress-inner")}if(H>768){if(x.showArrows){$('<div class="tmdp-nav-arrow tmdp-leftarrow"><i class="fa fa-angle-left fa-2x"></i></div>').appendTo(u).click($.throttle(1500,function(){O=true;s()}));$('<div class="tmdp-nav-arrow tmdp-rightarrow"><i class="fa fa-angle-right fa-2x"></i></div>').appendTo(u).click($.throttle(1500,M))}}else{u.swipeX($.throttle(1500,M),$.throttle(1500,function(){O=true;s()}))}if(x.showBullets){var E='<div class="tmdp-bullets">';for(var N=0;N<F;++N){E+='<div class="tmdp-bullet"></div>'}E+="</div>";A=$(E);A.appendTo(u).on("click",".tmdp-bullet",$.throttle(1500,k))}if(x.stopOnHover){u.hover(G,L)}I();q(0)}};this.each(function(){e(d,$(this).find(".tmdp-slider"))});return this};function showSimpleLoadingBar(b,c){var a=$('<div class="loadingBarContainer"></div>');b.append(a);a.append('<div class="loadingBarOverlay"></div><div class="loadingBarContent"></div>');a.show();if(c){c()}}function hideSimpleLoadingBar(b){var a=b.find(".loadingBarContainer");a.fadeOut("fast",function(){a.remove();a=null})}function setupThemesDemo(e){if($("#themeOverlay").length>0){return}e=e||"Start with this theme";var b='<div class="themes-overlay" id="themeOverlay" style="display: none;">       <a class="close-btn close-popup"></a>      <div class="overlay-content theme-preview">        <section>          <div class="current-theme">            <div class="button-wrapper">              <a href="/Register" class="templateChooserBtn middle-button theme-select-blue" target="_top">'+e+'</a>              <div class="viewport-buttons">                <ul>                  <li>                    <a class="viewport-button button-tooltip active" data-size="desktop" data-tooltip="desktopView" title=""><img src="'+resources+'/images/small-icons/desktop-white.png"></a>                  </li>                  <li>                    <a class="viewport-button button-tooltip" data-size="tablet" data-tooltip="tabletView" title=""><img src="'+resources+'/images/small-icons/tablet-white.png"></a>                  </li>                  <li>                    <a class="viewport-button button-tooltip" data-size="mobile" data-tooltip="phoneView" title=""><img src="'+resources+'/images/small-icons/phone-white.png"></a>                  </li>                </ul>              </div>            </div>            <div class="iframe-content desktop-preview" style="overflow-y: auto; -webkit-overflow-scrolling: touch;">              <div class="iframe">                <iframe src="javascript: void(0)"></iframe>              </div>            </div>          </div>        </section>      </div>    </div>';var a=$(document.body);a.append(b);var c=$("#themeOverlay");var d=c.find("iframe");c.find(".close-popup").click(function(){c.fadeOut("fast",function(){a.removeClass("no-overflow");c.find("iframe").attr("src","javascript: var s = "+ClientTools.tick()+";")})});c.find(".viewport-button ").click(function(){var g=$(this);var f="fa-"+g.data("size");var i=c.find(".viewport-buttons");i.find(".active").removeClass("active");g.addClass("active");c.removeClass("fa-tablet fa-mobile fa-desktop").addClass(f);var h=c.find("iframe");showSimpleLoadingBar(h.parent(),function(){h.attr("src",h.attr("src")+"1")})});a.on("mousedown",'a[data-action="showDemo"]',function(){var k=$(this).closest(".active-theme");var i=k.data("category")||"";var g=k.data("url");var j=k.data("id");var h=k.data("selectUrl")||"/register";var f=h.indexOf("?")>-1?"&":"?";h+=f+"template="+j;if(i){h+="&category="+i}c.find(".templateChooserBtn").attr("href",h);a.addClass("no-overflow");showSimpleLoadingBar(d.parent(),function(){c.removeClass("fa-tablet fa-mobile").addClass("fa-desktop").fadeIn("fast");var l=d.parent();d.remove();d=$('<iframe src="//'+g+"?v="+ClientTools.tick()+'"></iframe>');d.load(function(){hideSimpleLoadingBar(d.parent())});l.append(d)})})}function setupFunnelsDemo(c){var f=c.buttonLabel||"Start with this funnel";var e=c.stepLabel||"Step";var d=c.popupLabel||"Popup";var a=$(document.body);var b='<div class="themes-overlay funnel-overlay" id="funnelOverlay" style="display: none;">       <a class="close-btn close-popup"></a>      <div class="overlay-content theme-preview funnel-preview">        <section>          <div class="current-theme">            <div class="">              <div class="funnel-preview">                 <div class="button-wrapper">                  <select class="funnel-step-select"></select>                   <a class="middle-button main-action-btn big-button blue mobile-only-btn">'+f+'</a>                  <div class="viewport-buttons">                    <ul>                      <li>                        <a class="viewport-button button-tooltip active" data-size="desktop" data-tooltip="desktopView" title=""><img src="'+resources+'/images/small-icons/desktop-white.png"></a>                      </li>                      <li>                        <a class="viewport-button button-tooltip" data-size="tablet" data-tooltip="tabletView" title=""><img src="'+resources+'/images/small-icons/tablet-white.png"></a>                      </li>                      <li>                        <a class="viewport-button button-tooltip" data-size="mobile" data-tooltip="phoneView" title=""><img src="'+resources+'/images/small-icons/phone-white.png"></a>                      </li>                    </ul>                  </div>                </div>                <div class="iframe-content desktop-preview" style="overflow: hidden; -webkit-overflow-scrolling: touch; width: 55%;">                  <div class="iframe">                    <iframe src="javascript: void(0)"></iframe>                  </div>                </div>              </div>               <div class="funnel-right-content center-vertically flex-column" style="position: absolute; width: 40%; right: 0;">                 <div class="funnel-right-content-inner">                   <h2 class="f-left col20 roboto" data-role="name"></h2>
90                   <span class="f-left col20 mt-45" data-role="description"></span>                   <a class="main-action-btn big-button blue mt-25">'+f+"</a>                </div>               </div>             </div>          </div>        </section>      </div>     </div>";a.on("click",".funnel-demo-trigger",function(){a.append(b);var l=$("#funnelOverlay");l.fadeIn("fast");l.find(".close-popup").click(function(){l.fadeOut("fast",function(){a.removeClass("no-overflow");l.remove();l.find("iframe").attr("src","javascript: var s = "+ClientTools.tick()+";")})});var m=$(this).closest(".active-theme");var o=m.data("funnel");var g=o.settings.name[locale]||o.settings.name.en;var p=o.settings.longDescription[locale]||o.settings.longDescription.en;l.find('[data-role="name"]').text(g);l.find('[data-role="description"]').text(p);var h=m.data("category")||"";var i=null;var k=l.find("iframe");var q=l.find(".iframe-content");var r=l.find(".funnel-step-select");r.empty();r.change(function(){var s=$(this).find(":selected").data("step");var t="showstep|"+i.id+"|"+s.id;k[0].contentWindow.postMessage(t,i.url)});l.find(".viewport-button").click(function(){var u=$(this);var t=u.data("size");var s="fa-"+t;var v=l.find(".viewport-buttons");v.find(".active").removeClass("active");u.addClass("active");l.removeClass("fa-tablet fa-mobile fa-desktop").addClass(s);q.removeClass("desktop-preview tablet-preview mobile-preview").addClass(t+"-preview");showSimpleLoadingBar(k.parent(),function(){k.attr("src",k.attr("src"))})});l.find(".viewport-item").click(function(){var t=$(this);var s=t.data("size");t.closest("ul").find(".active").removeClass("active");t.tooltip("hide").addClass("active");q.removeClass("desktop-preview tablet-preview mobile-preview").addClass(s+"-preview");k.attr("src",k.attr("src"))});a.addClass("no-overflow");var n=m.data("selectUrl")||"/register";var j=n.indexOf("?")>-1?"&":"?";n+=j+"funnel="+o.id+"&category=funnels";l.find(".main-action-btn").attr("href",n);showSimpleLoadingBar(k.parent(),function(){ClientTools.showHideAjaxLoadingIndicator(false);WebPlatform.makeClientWebsiteRequest({action:"getFunnelTemplateDetails",data:{templateId:o.id},onOk:function(s){ClientTools.showHideAjaxLoadingIndicator(true);i=s.data;(i.steps||[]).forEach(function(v,u){var w=v.type==="PAGE"?"":(" ("+d+")");$("<option />").text(e+" "+(u+1)+": "+v.name+w).data("step",v).prop("selected",u===0).appendTo(r)});l.removeClass("fa-tablet fa-mobile").addClass("fa-desktop").fadeIn("fast");var t=k.parent();k.remove();k=$('<iframe src="'+i.url+'"></iframe>');k.load(function(){hideSimpleLoadingBar(k.parent())});t.append(k)}})})})}WebPlatform.Widgets.Booking=function(E){if(!E.container||!E.container.length||E.container[0].offsetParent===null){return null}var j={};var aj=[];var ai,ae,r;var U,v,c;var Q=E.container;var Y=Q.find(".booking-datepicker");var ac=Q.find(".time-select");var X=Q.find(".calendar-section");var a=Q.find(".form-section");var n=Q.find(".confirmation-section");var l=Q.find(".selected-date-label");var O=Q.find(".selected-time-label");var Z=Q.find(".service-section");var V=Q.find(".operator-section");var I=Q.find(".selected-service-name");var z=Q.find(".selected-operator-name");var o=Q.find(".submit-button");var h,m;var f,q;var t,N;var ad=false;var g=0;var ab=function(){ai=E.booking||null;if(ai===null){return}if(!!E.preview){ai.name=encodeURIComponent(ai.name);ai.location=encodeURIComponent(ai.location);ai.description=encodeURIComponent(ai.description)}var am=function(){var ao=[];var an=[];(ai.operators||[]).forEach(function(ap){ao.push(ap.id);if(ap.services&&ap.services.length){Array.prototype.push.apply(an,ap.services)}});WebPlatform.makeClientWebsiteRequest({action:"getBookingOperatorsAndServices",data:{operators:JSON.stringify(ao),services:JSON.stringify(an)},onOk:function(ap){var aq=ap.data;ae=aq.operators;r=aq.services;if((ae||[]).length===0){Q.find('[data-role="no-operators"]').removeClass("none");return}G()}})};if(window.ClientTools){var al=2;ClientTools.requestResource(resources+"/scripts/jquery-ui.min.js?v="+resourcesVersion,resources+"/styles/jquery-ui.min.css?v="+resourcesVersion,function(){return !!$.datepicker},function(){--al;if(al===0){am()}});ClientTools.requestResource(resources+"/scripts/external/jstz.js",null,function(){return !!window.jstz},function(){--al;if(al===0){am()}})}else{am()}};var aa=function(al){if(t){al();return}WebPlatform.makeClientWebsiteRequest({action:"listTimezones",onOk:function(am){if(!am.data){return}t=am.data;al()}})};var ah=function(an){var aq=[WebPlatform.Phrases["label.jan"],WebPlatform.Phrases["label.feb"],WebPlatform.Phrases["label.mar"],WebPlatform.Phrases["label.apr"],WebPlatform.Phrases["label.may_short"],WebPlatform.Phrases["label.jun"],WebPlatform.Phrases["label.jul"],WebPlatform.Phrases["label.aug"],WebPlatform.Phrases["label.sep"],WebPlatform.Phrases["label.oct"],WebPlatform.Phrases["label.nov"],WebPlatform.Phrases["label.dec"]];var ar=[WebPlatform.Phrases["label.sunday_short"],WebPlatform.Phrases["label.monday_short"],WebPlatform.Phrases["label.tuesday_short"],WebPlatform.Phrases["label.
90wednesday_short"],WebPlatform.Phrases["label.thursday_short"],WebPlatform.Phrases["label.friday_short"],WebPlatform.Phrases["label.saturday_short"]];var ap=an.getDate();var am=an.getMonth();var ao=an.getFullYear();var al=an.getDay();return ar[al]+", "+aq[am]+" "+ap+" "+ao};var i=function(al,am){return'<li><a data-action="selectService" data-id="%id%">'+(al?'<span class="service-img" style="background-image: url(%img%);"></span><div>':"<div>")+'<span class="option-title">%title%</span><span class="option-desc">%duration%</span>'+(am?'<span class="option-desc">%description%</span>':"")+"</div></a></li>"};var s=function(al,am){return'<li><a data-action="selectOperator" data-id="%id%">'+(al?'<span class="operator-img" style="background-image: url(%img%);"></span><div>':"<div>")+'<span class="option-title">%title%</span>'+(am?'<span class="option-desc">%description%</span>':"")+"</div></a></li>"};var J=function(an,am){for(var al=0;al<am.length;al++){if(am[al].id===parseInt(an)){return am[al]}}return null};var e=function(am,an){if(U&&v){var al=new Date(am,an-1,1);af(al,"onChangeMonth",null,false)}};var D=function(){var al=Y.datepicker("getDate");T(j[d(al)],al);l.text(ah(al));R()};var H=function(al,am){am=(am!=null)?am:true;return al.getFullYear()+"-"+("0"+(al.getMonth()+1)).slice(-2)+"-"+("0"+al.getDate()).slice(-2)+(am?"T00:00:00.000Z":"")};var B=function(an){var ap=an.split(":");var al=parseInt(ap[0]);var ao=parseInt(ap[1]);var am=al>=12?"PM":"AM";al=al%12||12;al=("0"+al).slice(-2);ao=("0"+ao).slice(-2);return al+":"+ao+" "+am};var d=function(al){return U+"-"+v+"_"+al.getFullYear()+"-"+al.getMonth()};var x=function(){if(v!==-1){return J(v,r).duration}if(ai.autoAssign){return ai.operators[0].duration}return J(U,ai.operators).duration};var M=function(at,ar){var aq=WebPlatform.dateFormat==="dd/mm/yy";var an=at.split(" ");var ap=an[0].split(":");var am=parseInt(ap[0]);var ao=parseInt(ap[1]);var al=an[1];ao=parseInt(ao)+ar;if(ao>=60){am=Math.floor(ao/60)+am;ao%=60;if(!aq&&(am===12||(am>12&&parseInt(ap[0])<12))){al=(al==="AM")?"PM":"AM"}}if(!aq&&am>12){am%=12}return at+" - "+("0"+am).slice(-2)+":"+("0"+ao).slice(-2)+" "+(!aq?al:"")};var w=function(al){for(var am in al){if(al.hasOwnProperty(am)){return false}}return JSON.stringify(al)===JSON.stringify({})};var b=function(){aa(function(){var am=Q.find(".timezone-popup");var al=am.find(".tz-select");al.empty();var an;t.forEach(function(ao){an=(N===ao.id)?"class='selected'":"";al.append("<li "+an+' data-id="'+ao.id+'">'+ao.name+"</option>")});WebPlatform.Popups.showSimplePopup(am.html(),500,function(ap,ar){Q.find(".timezone-popup").show();var ao=ar.find(".tz-select");ao.find(".selected")[0].scrollIntoView();ao.on("click","li",function(){N=$(this).data("id");Q.find('span[data-role="current-timezone"]').text($(this).text());j={};af(Y.datepicker("getDate"));ap.close()});var aq=ar.find("[name='tz-search']");
90aq.focus();aq.on("keyup",function(){var at=aq.val();y(at,ao)})})})};var y=$.debounce(250,function(an,al){var am=al.find("li");am.removeClass("none");$.each(am,function(ao,ap){var aq=$(ap);if(aq.text().toLowerCase().indexOf(an.toLowerCase())===-1){aq.addClass("none")}})});var ak=function(){var al=Q.find('span[data-role="current-timezone"]');try{var an=new Date().toString().split(" ").splice(5);var ap=an.splice(0,1)[0]||"";if(ap){ap=" ("+ap.substr(0,ap.length-2)+":"+ap.substr(-2)+")"}var am=((an.join(" ")||"").replace(/[()]/g,""))||"Times in";al.text(am+ap)}catch(ao){Log.error(ao);var aq=window.jstz?jstz.determine().name():"Times in GMT";al.text(aq)}};var G=function(){ai.name=decodeURIComponent(ai.name);ai.description=!!ai.description?WebPlatform.escapeHtml(decodeURIComponent(ai.description)):"";ai.location=!!ai.location?decodeURIComponent(ai.location):"";Q.find(".booking-name-label").text(ai.name);Q.find(".book-description").html(ai.description.replace(/\n/g,"<br />"));if(window.ClientTools){var al=Q.find(".widget-form");ClientTools.setupFormFields(al);var am=al.find(".recaptcha-target");ad=am.length>0;if(ad){ClientTools.setupRecaptcha({ui:am,button:o})}}Y.datepicker({firstDay:1,minDate:new Date(),maxDate:"+5m",onSelect:D,onChangeMonthYear:e,beforeShowDay:function(an){if(aj.indexOf(H(an,false))!==-1){return[true,""]}return[false,""]},monthNames:[WebPlatform.Phrases["label.january"],WebPlatform.Phrases["label.february"],WebPlatform.Phrases["label.march"],WebPlatform.Phrases["label.april"],WebPlatform.Phrases["label.may"],WebPlatform.Phrases["label.june"],WebPlatform.Phrases["label.july"],WebPlatform.Phrases["label.august"],WebPlatform.Phrases["label.september"],WebPlatform.Phrases["label.october"],WebPlatform.Phrases["label.november"],WebPlatform.Phrases["label.december"]],dayNamesMin:[WebPlatform.Phrases["label.sunday_min"],WebPlatform.Phrases["label.monday_min"],WebPlatform.Phrases["label.tuesday_min"],WebPlatform.Phrases["label.wednesday_min"],WebPlatform.Phrases["label.thursday_min"],WebPlatform.Phrases["label.friday_min"],WebPlatform.Phrases["label.saturday_min"]]});if(ai.location===""){Q.find(".event-location").hide()}else{Q.find(".event-location").show();Q.find(".location").text(ai.location)}if(ai.autoAssign){Q.find(".operator").hide()}l.text(ah(Y.datepicker("getDate")));ac.on("click","li",function(){var an=$(this);ac.find("li").removeClass("active");an.addClass("active");c=an.data("time");O.text(M(an[0].childNodes[0].nodeValue,x()));L();p()});ak();Q.find(".back-button").click(K);Q.find(".change-timezone").click(b);Q.find('[data-role="hide-time"]').click(L);N=window.jstz?jstz.determine().name():"UTC";if(E.startWith==="service"){f=[Z,V,X,a,n];k();return}f=[V,Z,X,a,n];ag()};var R=function(){X.addClass("date-selected")};var L=function(){X.removeClass("date-selected")};var K=function(){L();var al=f.indexOf(q);if(al===-1){f.unshift((E.startWith==="service"?Z:V),q);al=f.indexOf(q)}q.addClass("none");q=f[al-1];q.removeClass("none");A()};var A=function(){var am=f.indexOf(q)+1;var al=f.length-1;var an=Q.find(".form-progress-wrapper");an.find("span").text(am+" of "+al);an.find(".success-bar").css("width",(am/al*100)+"%")};var k=function(){var at={};if(ai.autoAssign||E.startWith==="service"){for(var ar=0;ar<ai.operators.length;ar++){for(var ap=0;ap<ai.operators[ar].services.length;ap++){if(!at[ai.operators[ar].services[ap]]){var an=ai.operators[ar].services[ap];var am=J(an,r);if(am){at[an]=am}}}}}else{var ao=J(U,ai.operators);for(var ar=0;ar<ao.services.length;ar++){if(!at[ao.services[ar]]){var an=ao.services[ar];var am=J(an,r);if(am){at[an]=am}}}}m=Object.keys(at).length;if(m<=1){var al=f.indexOf(Z);if(al!==-1){f.splice(al,1)}if(m===1){C(Object.keys(at)[0])}else{if(m===0){C(-1)}}A();return}var aq=Z.find('ul[data-role="service-select"]');aq.empty();Z.removeClass("none");q=Z;if(f[0]===q){Z.find(".back-button").hide()}$.each(at,function(aw,au){var av=au.image?getThumbnailsFromBase(au.imageBase,"160x120")+au.image:"";aq.append(WebPlatform.escapeFormat(i(!!av,!!au.description),"id",aw,"title",au.name,"duration",au.duration+" min","img",av,"description",au.description))});aq.on("click",'a[data-action="selectService"]',function(){var au=$(this);au.parent("li").siblings("li").find("a").removeClass("active");au.addClass("active");C(au.data("id"))});A()};
90var C=function(am){Z.addClass("none");v=parseInt(am);if(v!==-1){var al=J(v,r);I.text(al.name)}else{I.text(ai.name)}if(E.startWith==="service"){ag();return}af()};var ag=function(){if(ai.autoAssign){var al=f.indexOf(V);if(al!==-1){f.splice(al,1)}u(-1);A();return}var ao={};if(E.startWith==="service"){for(var am=0;am<ai.operators.length;am++){if((v>0&&ai.operators[am].services.indexOf(v)!==-1)||(v===-1&&ai.operators[am].services.length===0)){var ap=ai.operators[am].id;if(!ao[ap]){ao[ap]=J(ap,ae)}}}}else{for(var am=0;am<ai.operators.length;am++){if(!ao[ai.operators[am].id]){var ap=ai.operators[am].id;ao[ai.operators[am].id]=J(ap,ae)}}}h=Object.keys(ao).length;var an=V.find('ul[data-role="operator-select"]');an.empty();if(h>1){V.removeClass("none");q=V;if(f[0]===q){V.find(".back-button").hide()}$.each(ao,function(at,ar){if(ar==null){return}var aq=ar.image?getThumbnailsFromBase(ar.imageBase,"160x120")+ar.image:"";an.append(WebPlatform.escapeFormat(s(!!aq,!!ar.description),"id",at,"title",ar.name,"description",ar.description||"","img",aq))});an.on("click",'a[data-action="selectOperator"]',function(){var aq=$(this);aq.parent("li").siblings("li").find("a").removeClass("active");aq.addClass("active");u(aq.data("id"))})}else{var al=f.indexOf(V);if(al!==-1){f.splice(al,1)}u(Object.keys(ao)[0])}A()};var u=function(am){V.addClass("none");U=parseInt(am);if(!ai.autoAssign){var al=J(U,ae);if(al==null){return}z.text(al.name)}if(E.startWith==="service"){af();return}k()};var af=function(am,an,aq,al){al=(al==null)?true:al;am=(am!=null)?am:new Date();aq=(aq!=null)?aq:dummy;X.removeClass("none");q=X;if(f[0]===q){X.find(".back-button").hide()}var ap=d(am);if(!j.hasOwnProperty(ap)){var ao={bookingId:ai.id,operatorId:U,serviceId:v,startDate:H(am,false),endDate:H(new Date(am.getFullYear(),am.getMonth()+1,0),false),timeZone:N};WebPlatform.makeClientWebsiteRequest({action:"getAvailableDates",data:{data:JSON.stringify(ao)},onOk:function(ar){j[ap]=ar.data;F(j[ap]);am=S(j[ap],am,w(ar.data),an);if(!an&&w(ar.data)){af(am,an,aq,al)}T(j[ap],am);aq()}})}else{F(j[ap]);am=S(j[ap],am,al);T(j[ap],am);aq()}A()};var F=function(al){aj=Object.keys(al);Y.datepicker("refresh")};var S=function(ap,at,ar,am){if(am==="onChangeMonth"){return at}var al=[];for(var an in ap){if(ap.hasOwnProperty(an)){al.push(an)}}if(!ar&&al.length===0){return at}var au;if(al.length===0&&g<=5){if(++g%3===0){Y.datepicker("setDate",at);l.text(ah(at));return at}if(at.getMonth()===11){return new Date(at.getFullYear()+1,0,1)}return new Date(at.getFullYear(),at.getMonth()+1,1)}al.sort();for(var aq=0;aq<al.length;aq++){au=new Date(at.getTime());var ao=al[aq].split("-");au.setFullYear(ao[0]);au.setMonth(parseInt(ao[1])-1);au.setDate(ao[2]);if(au.getMonth()===at.getMonth()){Y.datepicker("setDate",au);l.text(ah(au));break}}return au};var T=function(an,al){if(al==null){return}ac.empty();var am=WebPlatform.dateFormat==="dd/mm/yy";$.each(an[H(al,false)],function(ao,ar){var aq=am?ar.time:B(ar.time);var ap=!!ar.data?"<span>"+ar.data+" "+WebPlatform.Phrases["label.slots_left"]+"</span>":"";ac.append("<li data-time='"+ar.time+"'>"+aq+ap+"</li>")})};var p=function(){var al=[];if(!U){al.push("Please select operator.")}if(!v){al.push("Please select service.")}if(!Y.datepicker("getDate")){al.push("Please select date.")}if(!c){al.push("Please select time.")}if(al.length>0){WebPlatform.showClientError(al.join("<br>"),5000);return}X.addClass("none");a.removeClass("none");q=a;o.off("click");o.click(function(){P()});A()};var W=function(){if(ad&&window.ClientTools){ClientTools.resetRecaptcha(Q,o)}};var P=function(){if(o.hasClass("disabled")){return}var ar=n.find(".call-to-action.button");ar.addClass("none");if(ai.confirmation.title||!!ai.confirmation.buttonText){var ao=ai.confirmation;if(!!ao.title){n.find(".confirmation-title").text(ao.title)}if(!!ao.description){n.find(".confirmation-description").html(WebPlatform.escapeHtml(ao.description).replace(/\n/g,"<br />"))}if(ao.buttonLink){ar.removeClass("none");ar.attr("href",ao.buttonLink);ar.find(".cta-text").text(ao.buttonText)}}var al=Q.find(".widget-form .form-field").not('[data-type="section"]');var an=ClientTools.readFormFields(al);if(an.hasErrors){return}var am=H(Y.datepicker("getDate"),false);var ap={id:ai.id,operatorId:U,serviceId:v,date:am,time:c,timeZone:N};var aq={action:"reserveBooking",method:"post",data:{data:JSON.stringify(ap),values:an.values,form:Q.find('input[name="formid"]').val()},onOk:function(au){Q.find(".field-with-error").removeClass("field-with-error");
90if(au.data&&au.data.errors){var aw=au.data.errors;W();if(aw==="existing"){ClientTools.showMessageBox(WebPlatform.Phrases["label.contact_booked_error"],X,"before",true,10000);return}if(aw==="notice"){ClientTools.showMessageBox(WebPlatform.Phrases["label.booking_notice_error"],X,"before",true,10000);return}if(aw==="booked"){ClientTools.showMessageBox(WebPlatform.Phrases["label.already_booked_time_error"],X,"before",true,10000);K();return}for(var at=0;at<aw.length;++at){if(aw[at]){al.eq(at).addClass("field-invalid")}}return}a.addClass("none");WebPlatform.lastFormParams=params="name="+encodeURIComponent(ai.name)+"&desc="+encodeURIComponent(ai.description)+"&date="+encodeURIComponent(ap.date)+"&time="+encodeURIComponent(ap.time);if(ai.confirmation&&ai.confirmation.link){var av=ai.confirmation.link.toLowerCase().trim().indexOf("javascript:")!==0;if(av){window.location.href=ai.confirmation.link+(ai.confirmation.link.indexOf("?")<0?"?":"&")+params}else{window.location.href=ai.confirmation.link}return}if(ai.confirmation&&Object.keys(ai.confirmation).length===0){n.find(".call-to-action.button").hide()}Q.find(".call-to-action2").click(function(){WebPlatform.makeClientWebsiteRequest({action:"getBookingIcs",method:"get",data:{id:au.data.id,timeZone:N},onOk:function(ax){var ay=document.createElement("a");ay.download="event.ics";var az=new Blob([ax.data],{type:"text/plain;charset=UTF-8",encoding:"UTF-8"});ay.href=window.URL.createObjectURL(az);ay.click()}})});n.removeClass("none")},onNotOk:function(at){W();ClientTools.showMessageBox(at.message,o,"after",true,10000)}};if(an.file){WebPlatform.makeClientWebsiteRequestWithFile(aq,an.file)}else{WebPlatform.makeClientWebsiteRequest(aq)}};return{_init:function(){ab();delete this._init;return this}}._init()};WebPlatform.Widgets.Quiz=function(m){if(!m.container||!m.container.length){return null}var b=m.container,d=b.find(".widget-form"),j=d.find(".recaptcha-target"),i=b.find('[data-role="quiz-step"]'),c=b.find(".form-progress-wrapper");var g=function(n){return n.closest('[data-role="quiz-step"]')};var a=function(q){var s=function(){var u=q.find(".form-field");for(var t=0;t<u.length;++t){var A=u.eq(t);var y=A.data("type");if(y==="select"||y==="radio"||y==="checkbox"){var v=A.find("[data-skip]");var z=null;for(optionIdx=0;optionIdx<v.length;++optionIdx){var x=v.eq(optionIdx);if(x.is("input:checked")||x.is("option:selected")){z=x.data("skip")}if(z){return z}}}}var w=q.data("idx")+1;return i.eq(w).data("id")};var n=q.find(".form-field").not('[data-type="section"]');var r=ClientTools.readFormFields(n);if(r.hasErrors){f(n.filter(".field-invalid").eq(0));return}var o=s();if(o==="finish"){h();return}var p=l(o);p.data("back",q.data("id"))};var l=function(p){var o=i.filter('[data-id="'+p+'"]');if(o.length===0){return}i.addClass("none-soft");o.removeClass("none-soft").addClass("visited-step");var n=o.data("idx")||0;c.find(".success-bar").css("width",(((n+1)/i.length)*100)+"%");c.find(".steps-nav-wrapper a").filter(".active").removeClass("active").end().eq(n).addClass("active");c.find('[data-role="current-step"]').text(n+1);f(b);return o};var h=function(){var x=d.find('input[name="formid"]').val();var t=d.find(".visited-step");d.find(".field-invalid").removeClass("field-invalid");var s=$([]);var v=[];var p=[];var u=[];for(var w=0;w<t.length;++w){var n=t.eq(w);var r=n.find(".form-field").not('[data-type="section"]');var o=ClientTools.readFormFields(r);if(o.hasErrors){e(r);return}v.push.apply(v,o.values);s=s.add(r);p.push(n.data("id"));if(o.file){u.push(o.file)}}ClientTools.showLoader();var q={action:"submitForm",method:"post",data:{values:v,steps:JSON.stringify(p),form:x},onOk:function(K){var B=K.data;if(B.errors){for(var F=0;F<B.errors.length;++F){var D=B.errors[F];if(D!==null){s.eq(F).addClass("field-invalid").find(".field-error").text(D)}}e(s);ClientTools.hideLoader()}else{WebPlatform.Events.trigger(d,WebPlatform.Events.FORM_SUBMITTED,{formId:x,values:o.values});var J=B.result||{};if(J.url){WebPlatform.lastFormParams="";var A=d.data("passValues")===true;if(o.urlFields.length>0){o.urlFields.forEach(function(L){if((A||L.type==="hidden")&&L.value){if(WebPlatform.lastFormParams!==""){WebPlatform.lastFormParams+="&"}WebPlatform.lastFormParams+=encodeURIComponent(L.name)+"="+encodeURIComponent(L.value)}})}WebPlatform.delay(80,function(){var M=J.url.toLowerCase().trim().indexOf("javascript:")===0;
90if(M){ClientTools.hideLoader()}var L=!M&&WebPlatform.lastFormParams!=="";if(L){window.location.href=J.url+(J.url.indexOf("?")===-1?"?":"&")+WebPlatform.lastFormParams}else{window.location.href=J.url}})}else{var E=J.title||"Thank you!",G=J.description||"",y=J.withCTA===true,z=J.ctaText||"",C=J.ctaTarget||"";var I=b.find('[data-role="thank-you-message"]');if(E){I.find('[data-role="title"]').removeClass("none").text(E)}if(G){I.find('[data-role="description"]').removeClass("none").text(G)}if(y){var H=I.find('[data-role="cta"]');if(C){H.find('[data-role="cta-link"]').attr("href",C)}if(z){H.find('[data-role="cta-text"]').text(z)}H.removeClass("none")}t.add(c).addClass("none");I.removeClass("none");f(b);ClientTools.hideLoader()}}}};if(u.length===0){ClientTools.makeWebsiteRequest(q)}else{WebPlatform.makeClientWebsiteRequestWithFile(q,u)}};var f=function(n){WebPlatform.delay(50,function(){if(n[0].scrollIntoView){n[0].scrollIntoView({behavior:"smooth"})}})};var e=function(p){var s=p.filter(".field-invalid");for(var o=0;o<s.length;++o){var n=s.eq(o);var r=g(n);if(r.hasClass("visited-step")){var q=r.data("idx")||0;for(var o=q+1;o<i.length;++o){i.eq(o).removeClass("visited-step")}l(r.data("id"));break}}};var k=function(){ClientTools.setupFormFields(d);if(j.length>0){j.each(function(){var o=$(this);var p=o.closest('[data-role="quiz-step"]').find(".next-button");ClientTools.setupRecaptcha({ui:o,button:p})})}var n=b.find(".nps-wrapper a, .select-wrapper a").click(function(){var s=$(this);var q=s.find("input")[0];q.checked=!q.checked;var t=s.closest(".form-field");t.find(".active").removeClass("active");t.find("input:checked").each(function(){$(this).parent().addClass("active")});var r=g(t);var p=r.find(".next-button").length===0;if(p){var o=r.find(".form-field");var u=0;o.each(function(){if($(this).find(":checked").length>0){++u}});if(u===o.length){a(r)}}});b.find('[data-role="submit"]').click(function(){if($(this).hasClass("disabled")){return}h()});b.find('[data-role="next"]').click(function(){var o=$(this);if(o.hasClass("disabled")){return}a(g(o))});b.find('[data-role="back"]').click(function(){var p=g($(this));var o=p.data("back")||"";if(l(o)){p.removeClass("visited-step")}})};return{_init:function(){k();delete this._init;return this}}._init()};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.