(function(b){vara=function(f){varc={toolbar:null,scroller:null},d=function(h){if(("ontouchstart"inwindow)&&typeofh==="function"){h.call()}},e={listen:function(){if(c.scroller){c.scroller.addEventListener("touchend",e._touchEnd);c.scroller.addEventListener("scroll",e._endScroll)}if(c.toolbar){c.toolbar.addEventListener("touchmove",e._touchMove)}e._touchEnd();e._endScroll()},noListen:function(){if(c.scroller){c.scroller.removeEventListener("touchend",e._touchEnd);c.scroller.removeEventListener("scroll",e._endScroll)}if(c.toolbar){c.toolbar.removeEventListener("touchmove",e._touchMove)}},_touchMove:function(h){h.preventDefault()},_touchEnd:function(){c.listenForScroll=true},_endScroll:function(){if(c.listenForScroll){varh=parseInt(b.getComputedStyle(c.scroller).height,10);if((c.scroller.scrollTop+h)===h){c.scroller.scrollTop=1;c.listenForScroll=false}else{if(c.scroller.scrollTop+h===c.scroller.scrollHeight){c.scroller.scrollTop=c.scroller.scrollTop-1}}}else{c.listenForScroll=false}}},g=function(h){d(function(){c=h;e.listen()})};this.on=function(){d(function(){e.noListen();e.listen()})};this.off=function(){d(e.noListen)};g(f)};if((typeofmodule!=="undefined")&&module.exports){module.exports=a}if(typeofender==="undefined"){this.AppScroll=a}if((typeofdefine==="function")&&define.amd){define("AppScroll",[],function(){returna})}}).call(this,window);(function(global){functionMap(){this.data={}}Map.prototype={get:function(key){returnthis.data[key+"~"]},set:function(key,value){this.data[key+"~"]=value},"delete":function(key){deletethis.data[key+"~"]}};functionEventTarget(){this.listeners=newMap()}functionthrowError(e){setTimeout(function(){throwe},0)}EventTarget.prototype={dispatchEvent:function(event){event.target=this;vartype=String(event.type);varlisteners=this.listeners;vartypeListeners=listeners.get(type);if(!typeListeners){return}varlength=typeListeners.length;vari=-1;varlistener=null;while(++i<length){listener=typeListeners[i];try{listener.call(this,event)}catch(e){throwError(e)}}},addEventListener:function(type,callback){type=String(type);varlisteners=this.listeners;vartypeListeners=listeners.get(type);if(!typeListeners){typeListeners=[];listeners.set(type,typeListeners)}vari=typeListeners.length;while(--i>=0){if(typeListeners[i]===callback){return}}typeListeners.push(callback)},removeEventListener:function(type,callback){type=String(type);varlisteners=this.listeners;vartypeListeners=listeners.get(type);if(!typeListeners){return}varlength=typeListeners.length;varfiltered=[];vari=-1;while(++i<length){if(typeListeners[i]!==callback){filtered.push(typeListeners[i])}}if(filtered.length===0){listeners["delete"](type)}else{listeners.set(type,filtered)}}};functionEvent(type){this.type=type;this.target=null}functionMessageEvent(type,options){Event.call(this,type);this.data=options.data;this.lastEventId=options.lastEventId}MessageEvent.prototype=Event.prototype;varXHR=global.XMLHttpRequest;varXDR=global.XDomainRequest;varisCORSSupported=Boolean(XHR&&((newXHR()).withCredentials!==undefined));varisXHR=isCORSSupported;varTransport=isCORSSupported?XHR:XDR;varWAITING=-1;varCONNECTING=0;varOPEN=1;varCLOSED=2;varAFTER_CR=3;varFIELD_START=4;varFIELD=5;varVALUE_START=6;varVALUE=7;varcontentTypeRegExp=/^text\/event\-stream;?(\s*charset\=utf\-8)?$/i;varMINIMUM_DURATION=1000;varMAXIMUM_DURATION=18000000;functiongetDuration(value,def){varn=Number(value)||def;return(n<MINIMUM_DURATION?MINIMUM_DURATION:(n>MAXIMUM_DURATION?MAXIMUM_DURATION:n))}functionfire(that,f,event){try{if(typeoff==="function"){f.call(that,event)}}catch(e){throwError(e)}}functionEventSource(url,options){url=String(url);varwithCredentials=Boolean(isCORSSupported&&options&&options.withCredentials);varinitialRetry=getDuration(options?options.retry:NaN,1000);varheartbeatTimeout=getDuration(options?options.heartbeatTimeout:NaN,45000);varlastEventId=(options&&options.lastEventId&&String(options.lastEventId))||"";varthat=this;varretry=initialRetry;varwasActivity=false;varxhr=newTransport();vartimeout=0;vartimeout0=0;varcharOffset=0;varcurrentState=WAITING;vardataBuffer=[];varlastEventIdBuffer="";vareventTypeBuffer="";varonTimeout=null;varstate=FIELD_START;varfield="";varvalue="";options=null;functionclose(){currentState=CLOSED;if(xhr!==null){xhr.abort();xhr=null}if(timeout!==0){clearTimeout(timeout);timeout=0}if(timeout0!==0){clearTimeout(timeout0);timeout0=0}that.readyState=CLOSED}functiononProgress(isLoadEnd){varresponseText=currentState===OPEN||currentState===CONNECTING?xhr.responseText||"":"";varevent=null;varisWrongStatusCodeOrContentType=false;if(currentState===CONNECTING){varstatus=0;varstatusText="";varcontentType="";if(isXHR){try{status=Number(xhr.status||0);statusText=String(xhr.statusText||"");contentType=String(xhr.getResponseHeader("Content-Type")||"")}catch(error){status=0}}else{status=200;contentType=xhr.contentType}if(status===200&&contentTypeRegExp.test(contentType)){currentState=OPEN;wasActivity=true;retry=initialRetry;that.readyState=OPEN;event=newEvent("open");that.dispatchEvent(event);fire(that,that.onopen,event);if(currentState===CLOSED){return}}else{if(status!==0){varmessage="";if(status!==200){message="EventSource's response has a status "+status+" "+statusText.replace(/\s+/g," ")+" that is not 200. Aborting the connection."}else{message="EventSource's response has a Content-Type specifying an unsupported type: "+contentType.replace(/\s+/g," ")+". Aborting the connection."}setTimeout(function(){thrownewError(message)});isWrongStatusCodeOrContentType=true}}}if(currentState===OPEN){if(responseText.length>charOffset){wasActivity=true}vari=charOffset-1;varlength=responseText.length;varc="\n";while(++i<length){c=responseText[i];if(state===AFTER_CR&&c==="\n"){state=FIELD_START}else{if(state===AFTER_CR){state=FIELD_START}if(c==="\r"||c==="\n"){if(field==="data"){dataBuffer.push(value)}else{if(field==="id"){lastEventIdBuffer=value}else{if(field==="event"){eventTypeBuffer=value}else{if(field==="retry"){initialRetry=getDuration(value,initialRetry);retry=initialRetry}else{if(field==="heartbeatTimeout"){heartbeatTimeout=getDuration(value,heartbeatTimeout);if(timeout!==0){clearTimeout(timeout);timeout=setTimeout(onTimeout,heartbeatTimeout)}}}}}}value="";field="";if(state===FIELD_START){if(dataBuffer.length!==0){lastEventId=lastEventIdBuffer;if(eventTypeBuffer===""){eventTypeBuffer="message"}event=newMessageEvent(eventTypeBuffer,{data:dataBuffer.join("\n"),lastEventId:lastEventIdBuffer});that.dispatchEvent(event);if(eventTypeBuffer==="message"){fire(that,that.onmessage,event)}if(currentState===CLOSED){return}}dataBuffer.length=0;eventTypeBuffer=""}state=c==="\r"?AFTER_CR:FIELD_START}else{if(state===FIELD_START){state=FIELD}if(state===FIELD){if(c===":"){state=VALUE_START}else{field+=c}}else{if(state===VALUE_START){if(c!==" "){value+=c}state=VALUE}else{if(state===VALUE){value+=c}}}}}}charOffset=length}if((currentState===OPEN||currentState===CONNECTING)&&(isLoadEnd||isWrongStatusCodeOrContentType||(charOffset>1024*1024)||(timeout===0&&!wasActivity))){currentState=WAITING;xhr.abort();if(timeout!==0){clearTimeout(timeout);timeout=0}if(retry>initialRetry*16){retry=initialRetry*16}if(retry>MAXIMUM_DURATION){retry=MAXIMUM_DURATION}timeout=setTimeout(onTimeout,retry);retry=retry*2+1;that.readyState=CONNECTING;event=newEvent("error");that.dispatchEvent(event);fire(that,that.onerror,event)}else{if(timeout===0){wasActivity=false;timeout=setTimeout(onTimeout,heartbeatTimeout)}}}functiononProgress2(){onProgress(false)}functiononLoadEnd(){onProgress(true)}if(isXHR){timeout0=setTimeout(functionf(){if(xhr.readyState===3){onProgress2()}timeout0=setTimeout(f,500)},0)}onTimeout=function(){timeout=0;if(currentState!==WAITING){onProgress(false);return}if(isXHR&&(xhr.sendAsBinary!==undefined||xhr.onloadend===undefined)&&global.document&&global.document.readyState&&global.document.readyState!=="complete"){timeout=setTimeout(onTimeout,4);return}xhr.onload=xhr.onerror=onLoadEnd;if(isXHR){xhr.onabort=onLoadEnd;xhr.onreadystatechange=onProgress2}xhr.onprogress=onProgress2;wasActivity=false;timeout=setTimeout(onTimeout,heartbeatTimeout);charOffset=0;currentState=CONNECTING;dataBuffer.length=0;eventTypeBuffer="";lastEventIdBuffer=lastEventId;value="";field="";state=FIELD_START;vars=url.slice(0,5);if(s!=="data:"&&s!=="blob:"){s=url+((url.indexOf("?",0)===-1?"?":"&")+"lastEventId="+encodeURIComponent(lastEventId)+"&r="+String(Math.random()+1).slice(2))}else{s=url}xhr.open("GET",s,true);if(isXHR){xhr.withCredentials=withCredentials;xhr.responseType="text";xhr.setRequestHeader("Accept","text/event-stream")}xhr.send(null)};EventTarget.call(this);this.close=close;this.url=url;this.readyState=CONNECTING;this.withCredentials=withCredentials;this.onopen=null;this.onmessage=null;this.onerror=null;onTimeout()}functionF(){this.CONNECTING=CONNECTING;this.OPEN=OPEN;this.CLOSED=CLOSED}F.prototype=EventTarget.prototype;EventSource.prototype=newF();F.call(EventSource);if(Transport){global.NativeEventSource=global.EventSource;global.EventSource=EventSource}}(this));jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){returnjQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){returnh*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return-h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){returnh/2*f*f+a}return-h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){returnh*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){returnh*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){returnh/2*f*f*f+a}returnh/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){returnh*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return-h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){returnh/2*f*f*f*f+a}return-h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){returnh*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){returnh*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){returnh/2*f*f*f*f*f+a}returnh/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return-h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){returnh*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return-h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){returna}if(f==g){returna+h}if((f/=g/2)<1){returnh/2*Math.pow(2,10*(f-1))+a}returnh/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return-h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){returnh*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return-h/2*(Math.sqrt(1-f*f)-1)+a}returnh/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){vari=1.70158;varj=0;varg=l;if(h==0){returne}if((h/=k)==1){returne+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;vari=j/4}else{vari=j/(2*Math.PI)*Math.asin(l/g)}return-(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){vari=1.70158;varj=0;varg=l;if(h==0){returne}if((h/=k)==1){returne+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;vari=j/4}else{vari=j/(2*Math.PI)*Math.asin(l/g)}returng*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){vari=1.70158;varj=0;varg=l;if(h==0){returne}if((h/=k/2)==2){returne+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;vari=j/4}else{vari=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return-0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}returng*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}returni*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}returni*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){returni/2*(f*f*(((g*=(1.525))+1)*f-g))+a}returni/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){returnh-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){returnh*(7.5625*f*f)+a}else{if(f<(2/2.75)){returnh*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){returnh*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{returnh*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){returnjQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}returnjQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});(function($){$.fn.alterClass=function(removals,additions){varself=this;if(removals.indexOf("*")===-1){self.removeClass(removals);return!additions?self:self.addClass(additions)}varpatt=newRegExp("\\s"+removals.replace(/\*/g,"[A-Za-z0-9-_]+").split(" ").join("\\s|\\s")+"\\s","g");self.each(function(i,it){varcn=" "+it.className+" ";while(patt.test(cn)){cn=cn.replace(patt," ")}it.className=$.trim(cn)});return!additions?self:self.addClass(additions)}})(jQuery);jQuery.fn.fastClick=function(handler){this.click(function(ev){ev.preventDefault()});Hammer(this[0]).on("tap doubletap",handler);returnthis};(function(undefined){varroot=this;varSpeechRecognition=root.SpeechRecognition||root.webkitSpeechRecognition||root.mozSpeechRecognition||root.msSpeechRecognition||root.oSpeechRecognition;if(!SpeechRecognition){root.annyang=null;returnundefined}varcommandsList=[];varrecognition;varcallbacks={start:[],error:[],end:[],result:[],resultMatch:[],resultNoMatch:[],errorNetwork:[],errorPermissionBlocked:[],errorPermissionDenied:[]};varautoRestart;varlastStartedAt=0;vardebugState=false;vardebugStyle="font-weight: bold; color: #00f;";varoptionalParam=/\s*\((.*?)\)\s*/g;varoptionalRegex=/(\(\?:[^)]+\))\?/g;varnamedParam=/(\(\?)?:\w+/g;varsplatParam=/\*\w+/g;varescapeRegExp=/[\-{}\[\]+?.,\\\^$|#]/g;varcommandToRegExp=function(command){command=command.replace(escapeRegExp,"\\$&").replace(optionalParam,"(?:$1)?").replace(namedParam,function(match,optional){returnoptional?match:"([^\\s]+)"}).replace(splatParam,"(.*?)").replace(optionalRegex,"\\s*$1?\\s*");returnnewRegExp("^"+command+"$","i")};varinvokeCallbacks=function(callbacks){callbacks.forEach(function(callback){callback.callback.apply(callback.context)})};varinitIfNeeded=function(){if(recognition===undefined){root.annyang.init({},false)}};root.annyang={init:function(commands,resetCommands){if(resetCommands===undefined){resetCommands=true}else{resetCommands=!!resetCommands}try{if(recognition&&recognition.abort){recognition.abort()}recognition=newSpeechRecognition();recognition.maxAlternatives=5;recognition.continuous=true;recognition.lang="en-US"}catch(err){root.annyang=null;returnundefined}recognition.onstart=function(){invokeCallbacks(callbacks.start)};recognition.onerror=function(event){invokeCallbacks(callbacks.error);switch(event.error){case"network":invokeCallbacks(callbacks.errorNetwork);break;case"not-allowed":case"service-not-allowed":autoRestart=false;if(newDate().getTime()-lastStartedAt<200){invokeCallbacks(callbacks.errorPermissionBlocked)}else{invokeCallbacks(callbacks.errorPermissionDenied)}break}};recognition.onend=function(){invokeCallbacks(callbacks.end);if(autoRestart){vartimeSinceLastStart=newDate().getTime()-lastStartedAt;if(timeSinceLastStart<1000){setTimeout(root.annyang.start,1000-timeSinceLastStart)}else{root.annyang.start()}}};recognition.onresult=function(event){invokeCallbacks(callbacks.result);varresults=event.results[event.resultIndex];varcommandText;for(vari=0;i<results.length;i++){commandText=results[i].transcript.trim();if(debugState){root.console.log("Speech recognized: %c"+commandText,debugStyle)}for(varj=0,l=commandsList.length;j<l;j++){varresult=commandsList[j].command.exec(commandText);if(result){varparameters=result.slice(1);if(debugState){root.console.log("command matched: %c"+commandsList[j].originalPhrase,debugStyle);if(parameters.length){root.console.log("with parameters",parameters)}}commandsList[j].callback.apply(this,parameters);invokeCallbacks(callbacks.resultMatch);returntrue}}}invokeCallbacks(callbacks.resultNoMatch);returnfalse};if(resetCommands){commandsList=[]}if(commands.length){this.addCommands(commands)}},start:function(options){initIfNeeded();options=options||{};if(options.autoRestart!==undefined){autoRestart=!!options.autoRestart}else{autoRestart=true}lastStartedAt=newDate().getTime();recognition.start()},abort:function(){initIfNeeded();autoRestart=false;recognition.abort()},debug:function(newState){if(arguments.length>0){debugState=!!newState}else{debugState=true}},setLanguage:function(language){initIfNeeded();recognition.lang=language},setContinuous:function(cont){initIfNeeded();recognition.continuous=cont},addCommands:function(commands){varcb,command;initIfNeeded();for(varphraseincommands){if(commands.hasOwnProperty(phrase)){cb=root[commands[phrase]]||commands[phrase];if(typeofcb!=="function"){continue}command=commandToRegExp(phrase);commandsList.push({command:command,callback:cb,originalPhrase:phrase})}}if(debugState){root.console.log("Commands successfully loaded: %c"+commandsList.length,debugStyle)}},removeCommands:function(commandsToRemove){commandsToRemove=Array.isArray(commandsToRemove)?commandsToRemove:[commandsToRemove];commandsList=commandsList.filter(function(command){for(vari=0;i<commandsToRemove.length;i++){if(commandsToRemove[i]===command.originalPhrase){returnfalse}}returntrue})},addCallback:function(type,callback,context){if(callbacks[type]===undefined){return}varcb=root[callback]||callback;if(typeofcb!=="function"){return}callbacks[type].push({callback:cb,context:context||this})}}}).call(this);<?@include_once("../includes/common.php");?>