移除未使用到的静态资源

This commit is contained in:
2020-04-04 17:00:12 +08:00
parent 755fa1c64c
commit b0121fea31
94 changed files with 3 additions and 6730 deletions
-17
View File
@@ -1,17 +0,0 @@
;(function(window){'use strict';var docElem=window.document.documentElement;function getViewportH(){var client=docElem['clientHeight'],inner=window['innerHeight'];if(client<inner)
return inner;else
return client;}
function scrollY(){return window.pageYOffset||docElem.scrollTop;}
function getOffset(el){var offsetTop=0,offsetLeft=0;do{if(!isNaN(el.offsetTop)){offsetTop+=el.offsetTop;}
if(!isNaN(el.offsetLeft)){offsetLeft+=el.offsetLeft;}}while(el=el.offsetParent)
return{top:offsetTop,left:offsetLeft}}
function inViewport(el,h){var elH=el.offsetHeight,scrolled=scrollY(),viewed=scrolled+ getViewportH(),elTop=getOffset(el).top,elBottom=elTop+ elH,h=h||0;return(elTop+ elH*h)<=viewed&&(elBottom- elH*h)>=scrolled;}
function extend(a,b){for(var key in b){if(b.hasOwnProperty(key)){a[key]=b[key];}}
return a;}
function AnimOnScroll(el,options){this.el=el;this.options=extend(this.defaults,options);this._init();}
AnimOnScroll.prototype={defaults:{minDuration:0,maxDuration:0,viewportFactor:0},_init:function(){this.items=Array.prototype.slice.call(document.querySelectorAll('#'+ this.el.id+' > li'));this.itemsCount=this.items.length;this.itemsRenderedCount=0;this.didScroll=false;var self=this;imagesLoaded(this.el,function(){new Masonry(self.el,{itemSelector:'li',transitionDuration:0});if(Modernizr.cssanimations){self.items.forEach(function(el,i){if(inViewport(el)){self._checkTotalRendered();classie.add(el,'shown');}});window.addEventListener('scroll',function(){self._onScrollFn();},false);window.addEventListener('resize',function(){self._resizeHandler();},false);}});},_onScrollFn:function(){var self=this;if(!this.didScroll){this.didScroll=true;setTimeout(function(){self._scrollPage();},60);}},_scrollPage:function(){var self=this;this.items.forEach(function(el,i){if(!classie.has(el,'shown')&&!classie.has(el,'animate')&&inViewport(el,self.options.viewportFactor)){setTimeout(function(){var perspY=scrollY()+ getViewportH()/ 2;
self.el.style.WebkitPerspectiveOrigin='50% '+ perspY+'px';self.el.style.MozPerspectiveOrigin='50% '+ perspY+'px';self.el.style.perspectiveOrigin='50% '+ perspY+'px';self._checkTotalRendered();if(self.options.minDuration&&self.options.maxDuration){var randDuration=(Math.random()*(self.options.maxDuration- self.options.minDuration)+ self.options.minDuration)+'s';el.style.WebkitAnimationDuration=randDuration;el.style.MozAnimationDuration=randDuration;el.style.animationDuration=randDuration;}
classie.add(el,'animate');},25);}});this.didScroll=false;},_resizeHandler:function(){var self=this;function delayed(){self._scrollPage();self.resizeTimeout=null;}
if(this.resizeTimeout){clearTimeout(this.resizeTimeout);}
this.resizeTimeout=setTimeout(delayed,1000);},_checkTotalRendered:function(){++this.itemsRenderedCount;if(this.itemsRenderedCount===this.itemsCount){window.removeEventListener('scroll',this._onScrollFn);}}}
window.AnimOnScroll=AnimOnScroll;})(window);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-62
View File
@@ -1,62 +0,0 @@
(function($){$.fn.wizard=function(args){return new Wizard(this,args);};$.fn.wizard.logging=false;var WizardCard=function(wizard,card,index,prev,next){this.wizard=wizard;this.index=index;this.prev=prev;this.next=next;this.el=card;this.title=card.find("h3").first().text();this.name=card.data("cardname")||this.title;this.nav=this._createNavElement(this.title,index);this._disabled=false;this._loaded=false;this._events={};};WizardCard.prototype={select:function(){this.log("selecting");if(!this.isSelected()){this.nav.addClass("active");this.el.show();if(!this._loaded){this.trigger("loaded");this.reload();}
this.trigger("selected");}
var w=this.wizard;w.backButton.toggleClass("disabled",this.index==0);if(this.index>=w._cards.length-1){this.log("on last card, changing next button to submit");w.changeNextButton(w.args.buttons.submitText,"btn-success");w._readyToSubmit=true;w.trigger("readySubmit");}
else{w._readyToSubmit=false;w.changeNextButton(w.args.buttons.nextText,"btn-primary");}
return this;},_createNavElement:function(name,i){var li=$('<li class="wizard-nav-item"></li>');var a=$('<a class="wizard-nav-link"></a>');a.data("navindex",i);li.append(a);a.append('<i class="icon-chevron-right"></i>')
a.append(name);return li;},markVisited:function(){this.log("marking as visited");this.nav.addClass("already-visited");this.trigger("markVisited");return this;},unmarkVisited:function(){this.log("unmarking as visited");this.nav.removeClass("already-visited");this.trigger("unmarkVisited");return this;},deselect:function(){this.nav.removeClass("active");this.el.hide();this.trigger("deselect");return this;},enable:function(){this.log("enabling");this.nav.addClass("active");this._disabled=false;this.trigger("enabled");return this;},disable:function(hideCard){this.log("disabling");this._disabled=true;this.nav.removeClass("active already-visited");if(hideCard){this.el.hide();}
this.trigger("disabled");return this;},isDisabled:function(){return this._disabled;},alreadyVisited:function(){return this.nav.hasClass("already-visited");},isSelected:function(){return this.nav.hasClass("active");},reload:function(){this._loaded=true;this.trigger("reload");return this;},on:function(){return this.wizard.on.apply(this,arguments);},trigger:function(){this.callListener("on"+arguments[0]);return this.wizard.trigger.apply(this,arguments);},toggleAlert:function(msg,toggle){this.log("toggling alert to: "+ toggle);toggle=typeof(toggle)=="undefined"?true:toggle;if(toggle){this.trigger("showAlert");}
else{this.trigger("hideAlert");}
var div;var alert=this.el.children("h3").first().next("div.alert");if(alert.length==0){if(!toggle){return this;}
this.log("couldn't find existing alert div, creating one");div=$("<div />");div.addClass("alert");div.addClass("hide");div.insertAfter(this.el.find("h3").first());}
else{this.log("found existing alert div");div=alert.first();}
if(toggle){if(msg!=null){this.log("setting alert msg to",msg);div.html(msg);}
div.show();}
else{div.hide();}
return this;},callListener:function(name){name=name.toLowerCase();this.log("looking for listener "+ name);var listener=window[this.el.data(name)];if(listener){this.log("calling listener "+ name);var wizard=this.wizard;try{var vret=listener(this);}
catch(e){this.log("exception calling listener "+ name+": ",e);}}
else{this.log("didn't find listener "+ name);}},problem:function(toggle){this.nav.find("a").toggleClass("wizard-step-error",toggle);},validate:function(){var failures=false;var self=this;this.el.find("[data-validate]").each(function(i,el){self.log("validating individiual inputs");el=$(el);var v=el.data("validate");if(!v){return;}
var ret={status:true,title:"Error",msg:""};var vret=window[v](el);$.extend(ret,vret);if(!ret.status){failures=true;el.parent(".control-group").toggleClass("error",true);self.wizard.errorPopover(el,ret.msg);}
else{el.parent(".control-group").toggleClass("error",false);try{el.popover("destroy");}
catch(e){el.popover("hide");}}});this.log("after validating inputs, failures is",failures);var cardValidator=window[this.el.data("validate")];if(cardValidator){this.log("running html-embedded card validator");var cardValidated=cardValidator(this);if(typeof(cardValidated)=="undefined"||cardValidated==null){cardValidated=true;}
if(!cardValidated)failures=true;this.log("after running html-embedded card validator, failures\
is",failures);}
this.log("running listener validator");var listenerValidated=this.trigger("validate");if(typeof(listenerValidated)=="undefined"||listenerValidated==null){listenerValidated=true;}
if(!listenerValidated)failures=true;this.log("after running listener validator, failures is",failures);var validated=!failures;if(validated){this.log("validated, calling listeners");this.trigger("validated");}
else{this.log("invalid");this.trigger("invalid");}
return validated;},log:function(){if(!window.console||!$.fn.wizard.logging){return;}
var prepend="card '"+this.name+"': ";var args=[prepend];args.push.apply(args,arguments);console.log.apply(console,args);},isActive:function(){return this.nav.hasClass("active");}};Wizard=function(markup,args){var wizard_template=['<div class="modal wizard-modal" role="dialog">','<div class="wizard-modal-header modal-header">','<button class="wizard-close close" type="button">x</button>','<h3 class="wizard-title"></h3>','<span class="wizard-subtitle"></span>','</div>','<div class="pull-left wizard-steps">','<div class="wizard-nav-container">','<ul class="nav nav-list" style="padding-bottom:30px;">','</ul>','</div>','<div class="wizard-progress-container">','<div class="progress progress-striped">','<div class="progress-bar progress-bar-primary" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">','<span class="sr-only">0% Complete</span>','</div>','</div>','</div>','</div>','<form>','<div class="wizard-cards">','<div class="wizard-card-container">','</div>','<div class="wizard-modal-footer">','<div class="wizard-buttons-container">','<button class="btn wizard-cancel wizard-close" type="button">Cancel</button>','<div class="btn-group-single pull-right">','<button class="btn wizard-back" type="button">Back</button>','<button class="btn btn-primary wizard-next" type="button">Next</button>','</div>','</div>','</div>','</div>','</form>','</div>'];this.args={submitUrl:"",width:750,showCancel:false,progressBarCurrent:false,increaseHeight:0,buttons:{cancelText:"Cancel",nextText:"Next",backText:"Back",submitText:"Submit",submittingText:"Submitting...",}};$.extend(this.args,args||{});this.markup=$(markup);this.submitCards=this.markup.find(".wizard-error,.wizard-failure,.wizard-success,.wizard-loading");this.el=$(wizard_template.join("\n"));this.el.find(".wizard-card-container").append(this.markup.find(".wizard-card")).append(this.submitCards);$("body").append(this.el);this.closeButton=this.el.find("button.wizard-close");this.footer=this.el.find(".wizard-modal-footer");this.cancelButton=this.footer.find(".wizard-cancel");this.backButton=this.footer.find(".wizard-back");this.nextButton=this.footer.find(".wizard-next");this.progress=this.el.find(".progress");this._cards=[];this.cards={};this._readyToSubmit=false;this.percentComplete=0;this._submitting=false;this._events={};this._firstShow=true;this._createCards();this.nextButton.click(this,this._handleNextClick);this.backButton.click(this,this._handleBackClick);this.cancelButton.text(this.args.buttons.cancelText);this.backButton.text(this.args.buttons.backText);this.nextButton.text(this.args.buttons.nextText);var baseHeight=360;var navHeight=baseHeight+ this.args.increaseHeight;this.el.find(".wizard-nav-container").css("height",navHeight);this.el.find(".wizard-steps").css("height",(navHeight+65)+"px");this.el.find(".wizard-card").css("height",(navHeight-60)+"px");this.submitCards.css("height",(navHeight-60)+"px");this.el.css("margin-top",-(this.el.height()/ 2));
this.el.css("width",this.args.width);this.el.css("margin-left",-(this.args.width/2));if($.fn.slimScroll&&false){var slimScrollArgs={position:"left",height:"360px",size:"8px",distance:"5px",railVisible:true,disableFadeOut:true,};$.extend(slimScrollArgs,this.args.slimScroll||{});this.el.find(".wizard-nav-container").slimScroll(slimScrollArgs);}
var self=this;this.closeButton.click(function(){self.reset();self.close();self.trigger("closed");});this.el.find(".wizard-steps").on("click","li.already-visited a.wizard-nav-link",this,function(event){var index=parseInt($(event.target).data("navindex"));event.data.setCard(index);});var title=this.markup.children("h1").first();if(title.length){this.setTitle(title.text());}
this.on("submit",this._defaultSubmit);};Wizard.prototype={errorPopover:function(el,msg){this.log("launching popover on",el);var popover=el.popover({content:msg,placement:"top",trigger:"manual"}).popover("show").next(".popover");popover.addClass("error-popover");return popover;},destroyPopover:function(pop){pop=$(pop);pop.parent(".control-group").toggleClass("error",false);var el=pop.prev();try{el.popover("destroy");}
catch(e){el.popover("hide");}},hidePopovers:function(el){this.log("hiding all popovers");var self=this;this.el.find(".error-popover").each(function(i,popover){self.destroyPopover(popover);});},eachCard:function(fn){$.each(this._cards,fn);return this;},getActiveCard:function(){this.log("getting active card");var currentCard=null;$.each(this._cards,function(i,card){if(card.isActive()){currentCard=card;return false;}});if(currentCard){this.log("found active card",currentCard);}
else{this.log("couldn't find an active card");}
return currentCard;},setTitle:function(title){this.log("setting title to",title);this.el.find(".wizard-title").first().text(title);return this;},setSubtitle:function(title){this.log("setting subtitle to",title);this.el.find(".wizard-subtitle").first().text(title);return this;},changeNextButton:function(text,cls){this.log("changing next button, text: "+ text,"class: "+ cls);if(typeof(cls)!="undefined"){this.nextButton.removeClass("btn-success btn-primary");}
if(cls){this.nextButton.addClass(cls);}
this.nextButton.text(text);return this;},hide:function(){this.log("hiding");this.el.modal("hide");return this;},close:function(){this.log("closing");this.el.modal("hide");return this;},show:function(modalOptions){this.log("showing");if(this._firstShow){this.setCard(0);this._firstShow=false;}
if(this.args.showCancel){this.cancelButton.show();}
this.el.modal(modalOptions);return this;},on:function(name,fn){this.log("adding listener to event "+ name);this._events[name]=fn;return this;},trigger:function(){var name=arguments[0];var args=Array.prototype.slice.call(arguments);args.shift();args.unshift(this);this.log("firing event "+ name);var handler=this._events[name];var ret=null;if(typeof(handler)=="function"){this.log("found event handler, calling "+ name);try{ret=handler.apply(this,args);}
catch(e){this.log("event handler "+ name+" had an exception");}}
else{this.log("couldn't find an event handler for "+ name);}
return ret;},reset:function(){this.log("resetting");this.updateProgressBar(0);this.hideSubmitCards();this.setCard(0);this.lockCards();this.enableNextButton();this.showButtons();this.hidePopovers();this.trigger("reset");return this;},log:function(){if(!window.console||!$.fn.wizard.logging){return;}
var prepend="wizard "+this.el.id+": ";var args=[prepend];args.push.apply(args,arguments);console.log.apply(console,args);},_abstractIncrementStep:function(direction,getNext){var current=this.getActiveCard();var next;if(current){this.log("searching for valid next card");while(true){next=getNext(current);if(next){this.log("looking at card",next.index);if(next.isDisabled()){this.log("card "+ next.index+" is disabled/locked, continuing");current=next;continue;}
else{return this.setCard(current.index+direction);}}
else{this.log("next card is not defined, breaking");break;}}}
else{this.log("current card is undefined");}},incrementCard:function(){this.log("incrementing card");var card=this._abstractIncrementStep(1,function(current){return current.next;});this.trigger("incrementCard");return card;},decrementCard:function(){this.log("decrementing card");var card=this._abstractIncrementStep(-1,function(current){return current.prev;});this.trigger("decrementCard");return card;},setCard:function(i){this.log("setting card to "+ i);this.hideSubmitCards();var currentCard=this.getActiveCard();if(this._submitting){this.log("we're submitting the wizard already, can't change cards");return currentCard;}
var newCard=this._cards[i];if(newCard){if(newCard.isDisabled()){this.log("new card is currently disabled, returning");return currentCard;}
if(currentCard){if(i>currentCard.index){var cardToValidate=currentCard;var ok=false;while(cardToValidate.index!=newCard.index){if(cardToValidate.index!=currentCard.index){cardToValidate.prev.deselect();cardToValidate.prev.markVisited();cardToValidate.select();}
ok=cardToValidate.validate();if(!ok){return cardToValidate;}
cardToValidate=cardToValidate.next;}
cardToValidate.prev.deselect();cardToValidate.prev.markVisited();}
currentCard.deselect();currentCard.markVisited();}
newCard.select();if(this.args.progressBarCurrent){this.percentComplete=i*100.0/this._cards.length;this.updateProgressBar(this.percentComplete);}
else{var lastPercent=this.percentComplete;this.percentComplete=i*100.0/this._cards.length;this.percentComplete=Math.max(lastPercent,this.percentComplete);this.updateProgressBar(this.percentComplete);}
return newCard;}
else{this.log("couldn't find card "+ i);}},updateProgressBar:function(percent){this.log("updating progress to "+ percent+"%");var progressBar=this.progress.find(".progress-bar");progressBar.css({width:percent+"%"});progressBar.find(".sr-only").html(parseInt(percent)+"% Complete");progressBar.attr('aria-valuenow',parseInt(percent));this.percentComplete=percent;this.trigger("progressBar",percent);if(percent==100){this.log("progress is 100, animating progress bar");this.progress.addClass("active");}
else if(percent==0){this.log("progress is 0, disabling animation");this.progress.removeClass("active");}},getNextCard:function(){var currentCard=this.getActiveCard();if(currentCard)return currentCard.next;},lockCards:function(){this.log("locking nav cards");this.eachCard(function(i,card){card.unmarkVisited();});return this;},disableCards:function(){this.log("disabling all nav cards");this.eachCard(function(i,card){card.disable();});return this;},enableCards:function(){this.log("enabling all nav cards");this.eachCard(function(i,card){card.enable();});return this;},hideCards:function(){this.log("hiding cards");this.eachCard(function(i,card){card.deselect();});this.hideSubmitCards();return this;},hideButtons:function(){this.log("hiding buttons");this.cancelButton.hide();this.nextButton.hide();this.backButton.hide();return this;},showButtons:function(){this.log("showing buttons");if(this.args.showCancel){this.cancelButton.show();}
this.nextButton.show();this.backButton.show();return this;},getCard:function(el){var cardDOMEl=$(el).parents(".wizard-card").first()[0];if(cardDOMEl){var foundCard=null;this.eachCard(function(i,card){if(cardDOMEl==card.el[0]){foundCard=card;return false;}
return true;});return foundCard;}
else{return null;}},_createCards:function(){var prev=null;var next=null;var currentCard=null;var wizard=this;var self=this;var cards=this.el.find(".wizard-cards .wizard-card");$.each(cards,function(i,card){card=$(card);prev=currentCard;currentCard=new WizardCard(wizard,card,i,prev,next);self._cards.push(currentCard);if(currentCard.name){self.cards[currentCard.name]=currentCard;}
if(prev){prev.next=currentCard;}
self.el.find(".wizard-steps .nav-list").append(currentCard.nav);});},showSubmitCard:function(name){this.log("showing "+name+" submit card");var card=this.el.find(".wizard-"+name);if(card.length){this.hideCards();this.el.find(".wizard-"+name).show();}
else{this.log("couldn't find submit card "+name);}},hideSubmitCard:function(name){this.log("hiding "+name+" submit card");this.el.find(".wizard-"+name).hide();},hideSubmitCards:function(){var wizard=this;$.each(["success","error","failure","loading"],function(i,name){wizard.hideSubmitCard(name);});},enableNextButton:function(){this.log("enabling next button");this.nextButton.removeAttr("disabled");return this;},disableNextButton:function(){this.log("disabling next button");this.nextButton.attr("disabled","disabled");return this;},serializeArray:function(){var form=this.el.children("form").first();return form.serializeArray();},serialize:function(){var form=this.el.children("form").first();return form.serialize();},submitSuccess:function(){this.log("submit success");this._submitting=false;this.showSubmitCard("success");this.trigger("submitSuccess");},submitFailure:function(){this.log("submit failure");this._submitting=false;this.showSubmitCard("failure");this.trigger("submitFailure");},submitError:function(){this.log("submit error");this._submitting=false;this.showSubmitCard("error");this.trigger("submitError");},_submit:function(){this.log("submitting wizard");this._submitting=true;this.lockCards();this.cancelButton.hide();this.backButton.hide();this.showSubmitCard("loading");this.updateProgressBar(100);this.changeNextButton(this.args.buttons.submittingText,false);this.disableNextButton();var ret=this.trigger("submit");this.trigger("loading");},_onNextClick:function(){this.log("handling 'next' button click");var currentCard=this.getActiveCard();if(this._readyToSubmit&&currentCard.validate()){this._submit();}
else{currentCard=this.incrementCard();}},_onBackClick:function(){this.log("handling 'back' button click");var currentCard=this.decrementCard();},_handleNextClick:function(event){var wizard=event.data;wizard._onNextClick.call(wizard);},_handleBackClick:function(event){var wizard=event.data;wizard._onBackClick.call(wizard);},_defaultSubmit:function(wizard){$.ajax({type:"POST",url:wizard.args.submitUrl,data:wizard.serialize(),dataType:"json",success:function(resp){wizard.submitSuccess();wizard.hideButtons();wizard.updateProgressBar(0);},error:function(){wizard.submitFailure();wizard.hideButtons();},});}};}(window.jQuery));
-6
View File
@@ -1,6 +0,0 @@
(function($){'use strict';var readFileIntoDataUrl=function(fileInfo){var loader=$.Deferred(),fReader=new FileReader();fReader.onload=function(e){loader.resolve(e.target.result);};fReader.onerror=loader.reject;fReader.onprogress=loader.notify;fReader.readAsDataURL(fileInfo);return loader.promise();};$.fn.cleanHtml=function(){var html=$(this).html();return html&&html.replace(/(<br>|\s|<div><br><\/div>|&nbsp;)*$/,'');};$.fn.wysiwyg=function(userOptions){var editor=this,selectedRange,options,toolbarBtnSelector,updateToolbar=function(){if(options.activeToolbarClass){$(options.toolbarSelector).find(toolbarBtnSelector).each(function(){var command=$(this).data(options.commandRole);if(document.queryCommandState(command)){$(this).addClass(options.activeToolbarClass);}else{$(this).removeClass(options.activeToolbarClass);}});}},execCommand=function(commandWithArgs,valueArg){var commandArr=commandWithArgs.split(' '),command=commandArr.shift(),args=commandArr.join(' ')+(valueArg||'');document.execCommand(command,0,args);updateToolbar();},bindHotkeys=function(hotKeys){$.each(hotKeys,function(hotkey,command){editor.keydown(hotkey,function(e){if(editor.attr('contenteditable')&&editor.is(':visible')){e.preventDefault();e.stopPropagation();execCommand(command);}}).keyup(hotkey,function(e){if(editor.attr('contenteditable')&&editor.is(':visible')){e.preventDefault();e.stopPropagation();}});});},getCurrentRange=function(){var sel=window.getSelection();if(sel.getRangeAt&&sel.rangeCount){return sel.getRangeAt(0);}},saveSelection=function(){selectedRange=getCurrentRange();},restoreSelection=function(){var selection=window.getSelection();if(selectedRange){try{selection.removeAllRanges();}catch(ex){document.body.createTextRange().select();document.selection.empty();}
selection.addRange(selectedRange);}},insertFiles=function(files){editor.focus();$.each(files,function(idx,fileInfo){if(/^image\//.test(fileInfo.type)){$.when(readFileIntoDataUrl(fileInfo)).done(function(dataUrl){execCommand('insertimage',dataUrl);}).fail(function(e){options.fileUploadError("file-reader",e);});}else{options.fileUploadError("unsupported-file-type",fileInfo.type);}});},markSelection=function(input,color){restoreSelection();if(document.queryCommandSupported('hiliteColor')){document.execCommand('hiliteColor',0,color||'transparent');}
saveSelection();input.data(options.selectionMarker,color);},bindToolbar=function(toolbar,options){toolbar.find(toolbarBtnSelector).click(function(){restoreSelection();editor.focus();execCommand($(this).data(options.commandRole));saveSelection();});toolbar.find('[data-toggle=dropdown]').click(restoreSelection);toolbar.find('input[type=text][data-'+ options.commandRole+']').on('webkitspeechchange change',function(){var newValue=this.value;this.value='';restoreSelection();if(newValue){editor.focus();execCommand($(this).data(options.commandRole),newValue);}
saveSelection();}).on('focus',function(){var input=$(this);if(!input.data(options.selectionMarker)){markSelection(input,options.selectionColor);input.focus();}}).on('blur',function(){var input=$(this);if(input.data(options.selectionMarker)){markSelection(input,false);}});toolbar.find('input[type=file][data-'+ options.commandRole+']').change(function(){restoreSelection();if(this.type==='file'&&this.files&&this.files.length>0){insertFiles(this.files);}
saveSelection();this.value='';});},initFileDrops=function(){editor.on('dragenter dragover',false).on('drop',function(e){var dataTransfer=e.originalEvent.dataTransfer;e.stopPropagation();e.preventDefault();if(dataTransfer&&dataTransfer.files&&dataTransfer.files.length>0){insertFiles(dataTransfer.files);}});};options=$.extend({},$.fn.wysiwyg.defaults,userOptions);toolbarBtnSelector='a[data-'+ options.commandRole+'],button[data-'+ options.commandRole+'],input[type=button][data-'+ options.commandRole+']';bindHotkeys(options.hotKeys);if(options.dragAndDropImages){initFileDrops();}
bindToolbar($(options.toolbarSelector),options);editor.attr('contenteditable',true).on('mouseup keyup mouseout',function(){saveSelection();updateToolbar();});$(window).bind('touchend',function(e){var isInside=(editor.is(e.target)||editor.has(e.target).length>0),currentRange=getCurrentRange(),clear=currentRange&&(currentRange.startContainer===currentRange.endContainer&&currentRange.startOffset===currentRange.endOffset);if(!clear||isInside){saveSelection();updateToolbar();}});return this;};$.fn.wysiwyg.defaults={hotKeys:{'ctrl+b meta+b':'bold','ctrl+i meta+i':'italic','ctrl+u meta+u':'underline','ctrl+z meta+z':'undo','ctrl+y meta+y meta+shift+z':'redo','ctrl+l meta+l':'justifyleft','ctrl+r meta+r':'justifyright','ctrl+e meta+e':'justifycenter','ctrl+j meta+j':'justifyfull','shift+tab':'outdent','tab':'indent'},toolbarSelector:'[data-role=editor-toolbar]',commandRole:'edit',activeToolbarClass:'btn-info',selectionMarker:'edit-focus-marker',selectionColor:'darkgrey',dragAndDropImages:true,fileUploadError:function(reason,detail){console.log("File upload error",reason,detail);}};}(window.jQuery));
-697
View File
@@ -1,697 +0,0 @@
if(typeof jQuery==='undefined'){throw new Error('Bootstrap\'s JavaScript requires jQuery')}
+function($){'use strict';function transitionEnd(){var el=document.createElement('bootstrap')
var transEndEventNames={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'}
for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}
return false}
$.fn.emulateTransitionEnd=function(duration){var called=false
var $el=this
$(this).one('bsTransitionEnd',function(){called=true})
var callback=function(){if(!called)$($el).trigger($.support.transition.end)}
setTimeout(callback,duration)
return this}
$(function(){$.support.transition=transitionEnd()
if(!$.support.transition)return
$.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){if($(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}})}(jQuery);+function($){'use strict';var dismiss='[data-dismiss="alert"]'
var Alert=function(el){$(el).on('click',dismiss,this.close)}
Alert.VERSION='3.2.0'
Alert.prototype.close=function(e){var $this=$(this)
var selector=$this.attr('data-target')
if(!selector){selector=$this.attr('href')
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}
var $parent=$(selector)
if(e)e.preventDefault()
if(!$parent.length){$parent=$this.hasClass('alert')?$this:$this.parent()}
$parent.trigger(e=$.Event('close.bs.alert'))
if(e.isDefaultPrevented())return
$parent.removeClass('in')
function removeElement(){$parent.detach().trigger('closed.bs.alert').remove()}
$.support.transition&&$parent.hasClass('fade')?$parent.one('bsTransitionEnd',removeElement).emulateTransitionEnd(150):removeElement()}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.alert')
if(!data)$this.data('bs.alert',(data=new Alert(this)))
if(typeof option=='string')data[option].call($this)})}
var old=$.fn.alert
$.fn.alert=Plugin
$.fn.alert.Constructor=Alert
$.fn.alert.noConflict=function(){$.fn.alert=old
return this}
$(document).on('click.bs.alert.data-api',dismiss,Alert.prototype.close)}(jQuery);+function($){'use strict';var Button=function(element,options){this.$element=$(element)
this.options=$.extend({},Button.DEFAULTS,options)
this.isLoading=false}
Button.VERSION='3.2.0'
Button.DEFAULTS={loadingText:'loading...'}
Button.prototype.setState=function(state){var d='disabled'
var $el=this.$element
var val=$el.is('input')?'val':'html'
var data=$el.data()
state=state+'Text'
if(data.resetText==null)$el.data('resetText',$el[val]())
$el[val](data[state]==null?this.options[state]:data[state])
setTimeout($.proxy(function(){if(state=='loadingText'){this.isLoading=true
$el.addClass(d).attr(d,d)}else if(this.isLoading){this.isLoading=false
$el.removeClass(d).removeAttr(d)}},this),0)}
Button.prototype.toggle=function(){var changed=true
var $parent=this.$element.closest('[data-toggle="buttons"]')
if($parent.length){var $input=this.$element.find('input')
if($input.prop('type')=='radio'){if($input.prop('checked')&&this.$element.hasClass('active'))changed=false
else $parent.find('.active').removeClass('active')}
if(changed)$input.prop('checked',!this.$element.hasClass('active')).trigger('change')}
if(changed)this.$element.toggleClass('active')}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.button')
var options=typeof option=='object'&&option
if(!data)$this.data('bs.button',(data=new Button(this,options)))
if(option=='toggle')data.toggle()
else if(option)data.setState(option)})}
var old=$.fn.button
$.fn.button=Plugin
$.fn.button.Constructor=Button
$.fn.button.noConflict=function(){$.fn.button=old
return this}
$(document).on('click.bs.button.data-api','[data-toggle^="button"]',function(e){var $btn=$(e.target)
if(!$btn.hasClass('btn'))$btn=$btn.closest('.btn')
Plugin.call($btn,'toggle')
e.preventDefault()})}(jQuery);+function($){'use strict';var Carousel=function(element,options){this.$element=$(element).on('keydown.bs.carousel',$.proxy(this.keydown,this))
this.$indicators=this.$element.find('.carousel-indicators')
this.options=options
this.paused=this.sliding=this.interval=this.$active=this.$items=null
this.options.pause=='hover'&&this.$element.on('mouseenter.bs.carousel',$.proxy(this.pause,this)).on('mouseleave.bs.carousel',$.proxy(this.cycle,this))}
Carousel.VERSION='3.2.0'
Carousel.DEFAULTS={interval:5000,pause:'hover',wrap:true}
Carousel.prototype.keydown=function(e){switch(e.which){case 37:this.prev();break
case 39:this.next();break
default:return}
e.preventDefault()}
Carousel.prototype.cycle=function(e){e||(this.paused=false)
this.interval&&clearInterval(this.interval)
this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval))
return this}
Carousel.prototype.getItemIndex=function(item){this.$items=item.parent().children('.item')
return this.$items.index(item||this.$active)}
Carousel.prototype.to=function(pos){var that=this
var activeIndex=this.getItemIndex(this.$active=this.$element.find('.item.active'))
if(pos>(this.$items.length- 1)||pos<0)return
if(this.sliding)return this.$element.one('slid.bs.carousel',function(){that.to(pos)})
if(activeIndex==pos)return this.pause().cycle()
return this.slide(pos>activeIndex?'next':'prev',$(this.$items[pos]))}
Carousel.prototype.pause=function(e){e||(this.paused=true)
if(this.$element.find('.next, .prev').length&&$.support.transition){this.$element.trigger($.support.transition.end)
this.cycle(true)}
this.interval=clearInterval(this.interval)
return this}
Carousel.prototype.next=function(){if(this.sliding)return
return this.slide('next')}
Carousel.prototype.prev=function(){if(this.sliding)return
return this.slide('prev')}
Carousel.prototype.slide=function(type,next){var $active=this.$element.find('.item.active')
var $next=next||$active[type]()
var isCycling=this.interval
var direction=type=='next'?'left':'right'
var fallback=type=='next'?'first':'last'
var that=this
if(!$next.length){if(!this.options.wrap)return
$next=this.$element.find('.item')[fallback]()}
if($next.hasClass('active'))return(this.sliding=false)
var relatedTarget=$next[0]
var slideEvent=$.Event('slide.bs.carousel',{relatedTarget:relatedTarget,direction:direction})
this.$element.trigger(slideEvent)
if(slideEvent.isDefaultPrevented())return
this.sliding=true
isCycling&&this.pause()
if(this.$indicators.length){this.$indicators.find('.active').removeClass('active')
var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)])
$nextIndicator&&$nextIndicator.addClass('active')}
var slidEvent=$.Event('slid.bs.carousel',{relatedTarget:relatedTarget,direction:direction})
if($.support.transition&&this.$element.hasClass('slide')){$next.addClass(type)
$next[0].offsetWidth
$active.addClass(direction)
$next.addClass(direction)
$active.one('bsTransitionEnd',function(){$next.removeClass([type,direction].join(' ')).addClass('active')
$active.removeClass(['active',direction].join(' '))
that.sliding=false
setTimeout(function(){that.$element.trigger(slidEvent)},0)}).emulateTransitionEnd($active.css('transition-duration').slice(0,-1)*1000)}else{$active.removeClass('active')
$next.addClass('active')
this.sliding=false
this.$element.trigger(slidEvent)}
isCycling&&this.cycle()
return this}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.carousel')
var options=$.extend({},Carousel.DEFAULTS,$this.data(),typeof option=='object'&&option)
var action=typeof option=='string'?option:options.slide
if(!data)$this.data('bs.carousel',(data=new Carousel(this,options)))
if(typeof option=='number')data.to(option)
else if(action)data[action]()
else if(options.interval)data.pause().cycle()})}
var old=$.fn.carousel
$.fn.carousel=Plugin
$.fn.carousel.Constructor=Carousel
$.fn.carousel.noConflict=function(){$.fn.carousel=old
return this}
$(document).on('click.bs.carousel.data-api','[data-slide], [data-slide-to]',function(e){var href
var $this=$(this)
var $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''))
if(!$target.hasClass('carousel'))return
var options=$.extend({},$target.data(),$this.data())
var slideIndex=$this.attr('data-slide-to')
if(slideIndex)options.interval=false
Plugin.call($target,options)
if(slideIndex){$target.data('bs.carousel').to(slideIndex)}
e.preventDefault()})
$(window).on('load',function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this)
Plugin.call($carousel,$carousel.data())})})}(jQuery);+function($){'use strict';var Collapse=function(element,options){this.$element=$(element)
this.options=$.extend({},Collapse.DEFAULTS,options)
this.transitioning=null
if(this.options.parent)this.$parent=$(this.options.parent)
if(this.options.toggle)this.toggle()}
Collapse.VERSION='3.2.0'
Collapse.DEFAULTS={toggle:true}
Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass('width')
return hasWidth?'width':'height'}
Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass('in'))return
var startEvent=$.Event('show.bs.collapse')
this.$element.trigger(startEvent)
if(startEvent.isDefaultPrevented())return
var actives=this.$parent&&this.$parent.find('> .panel > .in')
if(actives&&actives.length){var hasData=actives.data('bs.collapse')
if(hasData&&hasData.transitioning)return
Plugin.call(actives,'hide')
hasData||actives.data('bs.collapse',null)}
var dimension=this.dimension()
this.$element.removeClass('collapse').addClass('collapsing')[dimension](0)
this.transitioning=1
var complete=function(){this.$element.removeClass('collapsing').addClass('collapse in')[dimension]('')
this.transitioning=0
this.$element.trigger('shown.bs.collapse')}
if(!$.support.transition)return complete.call(this)
var scrollSize=$.camelCase(['scroll',dimension].join('-'))
this.$element.one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])}
Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass('in'))return
var startEvent=$.Event('hide.bs.collapse')
this.$element.trigger(startEvent)
if(startEvent.isDefaultPrevented())return
var dimension=this.dimension()
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
this.$element.addClass('collapsing').removeClass('collapse').removeClass('in')
this.transitioning=1
var complete=function(){this.transitioning=0
this.$element.trigger('hidden.bs.collapse').removeClass('collapsing').addClass('collapse')}
if(!$.support.transition)return complete.call(this)
this.$element
[dimension](0).one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(350)}
Collapse.prototype.toggle=function(){this[this.$element.hasClass('in')?'hide':'show']()}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.collapse')
var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=='object'&&option)
if(!data&&options.toggle&&option=='show')option=!option
if(!data)$this.data('bs.collapse',(data=new Collapse(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.collapse
$.fn.collapse=Plugin
$.fn.collapse.Constructor=Collapse
$.fn.collapse.noConflict=function(){$.fn.collapse=old
return this}
$(document).on('click.bs.collapse.data-api','[data-toggle="collapse"]',function(e){var href
var $this=$(this)
var target=$this.attr('data-target')||e.preventDefault()||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')
var $target=$(target)
var data=$target.data('bs.collapse')
var option=data?'toggle':$this.data()
var parent=$this.attr('data-parent')
var $parent=parent&&$(parent)
if(!data||!data.transitioning){if($parent)$parent.find('[data-toggle="collapse"][data-parent="'+ parent+'"]').not($this).addClass('collapsed')
$this[$target.hasClass('in')?'addClass':'removeClass']('collapsed')}
Plugin.call($target,option)})}(jQuery);+function($){'use strict';var backdrop='.dropdown-backdrop'
var toggle='[data-toggle="dropdown"]'
var Dropdown=function(element){$(element).on('click.bs.dropdown',this.toggle)}
Dropdown.VERSION='3.2.0'
Dropdown.prototype.toggle=function(e){var $this=$(this)
if($this.is('.disabled, :disabled'))return
var $parent=getParent($this)
var isActive=$parent.hasClass('open')
clearMenus()
if(!isActive){if('ontouchstart'in document.documentElement&&!$parent.closest('.navbar-nav').length){$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click',clearMenus)}
var relatedTarget={relatedTarget:this}
$parent.trigger(e=$.Event('show.bs.dropdown',relatedTarget))
if(e.isDefaultPrevented())return
$this.trigger('focus')
$parent.toggleClass('open').trigger('shown.bs.dropdown',relatedTarget)}
return false}
Dropdown.prototype.keydown=function(e){if(!/(38|40|27)/.test(e.keyCode))return
var $this=$(this)
e.preventDefault()
e.stopPropagation()
if($this.is('.disabled, :disabled'))return
var $parent=getParent($this)
var isActive=$parent.hasClass('open')
if(!isActive||(isActive&&e.keyCode==27)){if(e.which==27)$parent.find(toggle).trigger('focus')
return $this.trigger('click')}
var desc=' li:not(.divider):visible a'
var $items=$parent.find('[role="menu"]'+ desc+', [role="listbox"]'+ desc)
if(!$items.length)return
var index=$items.index($items.filter(':focus'))
if(e.keyCode==38&&index>0)index--
if(e.keyCode==40&&index<$items.length- 1)index++
if(!~index)index=0
$items.eq(index).trigger('focus')}
function clearMenus(e){if(e&&e.which===3)return
$(backdrop).remove()
$(toggle).each(function(){var $parent=getParent($(this))
var relatedTarget={relatedTarget:this}
if(!$parent.hasClass('open'))return
$parent.trigger(e=$.Event('hide.bs.dropdown',relatedTarget))
if(e.isDefaultPrevented())return
$parent.removeClass('open').trigger('hidden.bs.dropdown',relatedTarget)})}
function getParent($this){var selector=$this.attr('data-target')
if(!selector){selector=$this.attr('href')
selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')}
var $parent=selector&&$(selector)
return $parent&&$parent.length?$parent:$this.parent()}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.dropdown')
if(!data)$this.data('bs.dropdown',(data=new Dropdown(this)))
if(typeof option=='string')data[option].call($this)})}
var old=$.fn.dropdown
$.fn.dropdown=Plugin
$.fn.dropdown.Constructor=Dropdown
$.fn.dropdown.noConflict=function(){$.fn.dropdown=old
return this}
$(document).on('click.bs.dropdown.data-api',clearMenus).on('click.bs.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('click.bs.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.bs.dropdown.data-api',toggle+', [role="menu"], [role="listbox"]',Dropdown.prototype.keydown)}(jQuery);+function($){'use strict';var Modal=function(element,options){this.options=options
this.$body=$(document.body)
this.$element=$(element)
this.$backdrop=this.isShown=null
this.scrollbarWidth=0
if(this.options.remote){this.$element.find('.modal-content').load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal')},this))}}
Modal.VERSION='3.2.0'
Modal.DEFAULTS={backdrop:true,keyboard:true,show:true}
Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)}
Modal.prototype.show=function(_relatedTarget){var that=this
var e=$.Event('show.bs.modal',{relatedTarget:_relatedTarget})
this.$element.trigger(e)
if(this.isShown||e.isDefaultPrevented())return
this.isShown=true
this.checkScrollbar()
this.$body.addClass('modal-open')
this.setScrollbar()
this.escape()
this.$element.on('click.dismiss.bs.modal','[data-dismiss="modal"]',$.proxy(this.hide,this))
this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade')
if(!that.$element.parent().length){that.$element.appendTo(that.$body)}
that.$element.show().scrollTop(0)
if(transition){that.$element[0].offsetWidth}
that.$element.addClass('in').attr('aria-hidden',false)
that.enforceFocus()
var e=$.Event('shown.bs.modal',{relatedTarget:_relatedTarget})
transition?that.$element.find('.modal-dialog').one('bsTransitionEnd',function(){that.$element.trigger('focus').trigger(e)}).emulateTransitionEnd(300):that.$element.trigger('focus').trigger(e)})}
Modal.prototype.hide=function(e){if(e)e.preventDefault()
e=$.Event('hide.bs.modal')
this.$element.trigger(e)
if(!this.isShown||e.isDefaultPrevented())return
this.isShown=false
this.$body.removeClass('modal-open')
this.resetScrollbar()
this.escape()
$(document).off('focusin.bs.modal')
this.$element.removeClass('in').attr('aria-hidden',true).off('click.dismiss.bs.modal')
$.support.transition&&this.$element.hasClass('fade')?this.$element.one('bsTransitionEnd',$.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()}
Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.trigger('focus')}},this))}
Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keyup.dismiss.bs.modal',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keyup.dismiss.bs.modal')}}
Modal.prototype.hideModal=function(){var that=this
this.$element.hide()
this.backdrop(function(){that.$element.trigger('hidden.bs.modal')})}
Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove()
this.$backdrop=null}
Modal.prototype.backdrop=function(callback){var that=this
var animate=this.$element.hasClass('fade')?'fade':''
if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate
this.$backdrop=$('<div class="modal-backdrop '+ animate+'" />').appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal',$.proxy(function(e){if(e.target!==e.currentTarget)return
this.options.backdrop=='static'?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this))
if(doAnimate)this.$backdrop[0].offsetWidth
this.$backdrop.addClass('in')
if(!callback)return
doAnimate?this.$backdrop.one('bsTransitionEnd',callback).emulateTransitionEnd(150):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass('in')
var callbackRemove=function(){that.removeBackdrop()
callback&&callback()}
$.support.transition&&this.$element.hasClass('fade')?this.$backdrop.one('bsTransitionEnd',callbackRemove).emulateTransitionEnd(150):callbackRemove()}else if(callback){callback()}}
Modal.prototype.checkScrollbar=function(){if(document.body.clientWidth>=window.innerWidth)return
this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar()}
Modal.prototype.setScrollbar=function(){var bodyPad=parseInt((this.$body.css('padding-right')||0),10)
if(this.scrollbarWidth)this.$body.css('padding-right',bodyPad+ this.scrollbarWidth)}
Modal.prototype.resetScrollbar=function(){this.$body.css('padding-right','')}
Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement('div')
scrollDiv.className='modal-scrollbar-measure'
this.$body.append(scrollDiv)
var scrollbarWidth=scrollDiv.offsetWidth- scrollDiv.clientWidth
this.$body[0].removeChild(scrollDiv)
return scrollbarWidth}
function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this)
var data=$this.data('bs.modal')
var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option=='object'&&option)
if(!data)$this.data('bs.modal',(data=new Modal(this,options)))
if(typeof option=='string')data[option](_relatedTarget)
else if(options.show)data.show(_relatedTarget)})}
var old=$.fn.modal
$.fn.modal=Plugin
$.fn.modal.Constructor=Modal
$.fn.modal.noConflict=function(){$.fn.modal=old
return this}
$(document).on('click.bs.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this)
var href=$this.attr('href')
var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,'')))
var option=$target.data('bs.modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data())
if($this.is('a'))e.preventDefault()
$target.one('show.bs.modal',function(showEvent){if(showEvent.isDefaultPrevented())return
$target.one('hidden.bs.modal',function(){$this.is(':visible')&&$this.trigger('focus')})})
Plugin.call($target,option,this)})}(jQuery);+function($){'use strict';var Tooltip=function(element,options){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null
this.init('tooltip',element,options)}
Tooltip.VERSION='3.2.0'
Tooltip.DEFAULTS={animation:true,placement:'top',selector:false,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:false,container:false,viewport:{selector:'body',padding:0}}
Tooltip.prototype.init=function(type,element,options){this.enabled=true
this.type=type
this.$element=$(element)
this.options=this.getOptions(options)
this.$viewport=this.options.viewport&&$(this.options.viewport.selector||this.options.viewport)
var triggers=this.options.trigger.split(' ')
for(var i=triggers.length;i--;){var trigger=triggers[i]
if(trigger=='click'){this.$element.on('click.'+ this.type,this.options.selector,$.proxy(this.toggle,this))}else if(trigger!='manual'){var eventIn=trigger=='hover'?'mouseenter':'focusin'
var eventOut=trigger=='hover'?'mouseleave':'focusout'
this.$element.on(eventIn+'.'+ this.type,this.options.selector,$.proxy(this.enter,this))
this.$element.on(eventOut+'.'+ this.type,this.options.selector,$.proxy(this.leave,this))}}
this.options.selector?(this._options=$.extend({},this.options,{trigger:'manual',selector:''})):this.fixTitle()}
Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS}
Tooltip.prototype.getOptions=function(options){options=$.extend({},this.getDefaults(),this.$element.data(),options)
if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}}
return options}
Tooltip.prototype.getDelegateOptions=function(){var options={}
var defaults=this.getDefaults()
this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value})
return options}
Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+ this.type)
if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions())
$(obj.currentTarget).data('bs.'+ this.type,self)}
clearTimeout(self.timeout)
self.hoverState='in'
if(!self.options.delay||!self.options.delay.show)return self.show()
self.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)}
Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+ this.type)
if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions())
$(obj.currentTarget).data('bs.'+ this.type,self)}
clearTimeout(self.timeout)
self.hoverState='out'
if(!self.options.delay||!self.options.delay.hide)return self.hide()
self.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)}
Tooltip.prototype.show=function(){var e=$.Event('show.bs.'+ this.type)
if(this.hasContent()&&this.enabled){this.$element.trigger(e)
var inDom=$.contains(document.documentElement,this.$element[0])
if(e.isDefaultPrevented()||!inDom)return
var that=this
var $tip=this.tip()
var tipId=this.getUID(this.type)
this.setContent()
$tip.attr('id',tipId)
this.$element.attr('aria-describedby',tipId)
if(this.options.animation)$tip.addClass('fade')
var placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement
var autoToken=/\s?auto?\s?/i
var autoPlace=autoToken.test(placement)
if(autoPlace)placement=placement.replace(autoToken,'')||'top'
$tip.detach().css({top:0,left:0,display:'block'}).addClass(placement).data('bs.'+ this.type,this)
this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element)
var pos=this.getPosition()
var actualWidth=$tip[0].offsetWidth
var actualHeight=$tip[0].offsetHeight
if(autoPlace){var orgPlacement=placement
var $parent=this.$element.parent()
var parentDim=this.getPosition($parent)
placement=placement=='bottom'&&pos.top+ pos.height+ actualHeight- parentDim.scroll>parentDim.height?'top':placement=='top'&&pos.top- parentDim.scroll- actualHeight<0?'bottom':placement=='right'&&pos.right+ actualWidth>parentDim.width?'left':placement=='left'&&pos.left- actualWidth<parentDim.left?'right':placement
$tip.removeClass(orgPlacement).addClass(placement)}
var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight)
this.applyPlacement(calculatedOffset,placement)
var complete=function(){that.$element.trigger('shown.bs.'+ that.type)
that.hoverState=null}
$.support.transition&&this.$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(150):complete()}}
Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip()
var width=$tip[0].offsetWidth
var height=$tip[0].offsetHeight
var marginTop=parseInt($tip.css('margin-top'),10)
var marginLeft=parseInt($tip.css('margin-left'),10)
if(isNaN(marginTop))marginTop=0
if(isNaN(marginLeft))marginLeft=0
offset.top=offset.top+ marginTop
offset.left=offset.left+ marginLeft
$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0)
$tip.addClass('in')
var actualWidth=$tip[0].offsetWidth
var actualHeight=$tip[0].offsetHeight
if(placement=='top'&&actualHeight!=height){offset.top=offset.top+ height- actualHeight}
var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight)
if(delta.left)offset.left+=delta.left
else offset.top+=delta.top
var arrowDelta=delta.left?delta.left*2- width+ actualWidth:delta.top*2- height+ actualHeight
var arrowPosition=delta.left?'left':'top'
var arrowOffsetPosition=delta.left?'offsetWidth':'offsetHeight'
$tip.offset(offset)
this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],arrowPosition)}
Tooltip.prototype.replaceArrow=function(delta,dimension,position){this.arrow().css(position,delta?(50*(1- delta/dimension)+'%'):'')}
Tooltip.prototype.setContent=function(){var $tip=this.tip()
var title=this.getTitle()
$tip.find('.tooltip-inner')[this.options.html?'html':'text'](title)
$tip.removeClass('fade in top bottom left right')}
Tooltip.prototype.hide=function(){var that=this
var $tip=this.tip()
var e=$.Event('hide.bs.'+ this.type)
this.$element.removeAttr('aria-describedby')
function complete(){if(that.hoverState!='in')$tip.detach()
that.$element.trigger('hidden.bs.'+ that.type)}
this.$element.trigger(e)
if(e.isDefaultPrevented())return
$tip.removeClass('in')
$.support.transition&&this.$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(150):complete()
this.hoverState=null
return this}
Tooltip.prototype.fixTitle=function(){var $e=this.$element
if($e.attr('title')||typeof($e.attr('data-original-title'))!='string'){$e.attr('data-original-title',$e.attr('title')||'').attr('title','')}}
Tooltip.prototype.hasContent=function(){return this.getTitle()}
Tooltip.prototype.getPosition=function($element){$element=$element||this.$element
var el=$element[0]
var isBody=el.tagName=='BODY'
return $.extend({},(typeof el.getBoundingClientRect=='function')?el.getBoundingClientRect():null,{scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop(),width:isBody?$(window).width():$element.outerWidth(),height:isBody?$(window).height():$element.outerHeight()},isBody?{top:0,left:0}:$element.offset())}
Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return placement=='bottom'?{top:pos.top+ pos.height,left:pos.left+ pos.width/2- actualWidth/2}:placement=='top'?{top:pos.top- actualHeight,left:pos.left+ pos.width/2- actualWidth/2}:placement=='left'?{top:pos.top+ pos.height/2- actualHeight/2,left:pos.left- actualWidth}:{top:pos.top+ pos.height/2- actualHeight/2,left:pos.left+ pos.width}}
Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0}
if(!this.$viewport)return delta
var viewportPadding=this.options.viewport&&this.options.viewport.padding||0
var viewportDimensions=this.getPosition(this.$viewport)
if(/right|left/.test(placement)){var topEdgeOffset=pos.top- viewportPadding- viewportDimensions.scroll
var bottomEdgeOffset=pos.top+ viewportPadding- viewportDimensions.scroll+ actualHeight
if(topEdgeOffset<viewportDimensions.top){delta.top=viewportDimensions.top- topEdgeOffset}else if(bottomEdgeOffset>viewportDimensions.top+ viewportDimensions.height){delta.top=viewportDimensions.top+ viewportDimensions.height- bottomEdgeOffset}}else{var leftEdgeOffset=pos.left- viewportPadding
var rightEdgeOffset=pos.left+ viewportPadding+ actualWidth
if(leftEdgeOffset<viewportDimensions.left){delta.left=viewportDimensions.left- leftEdgeOffset}else if(rightEdgeOffset>viewportDimensions.width){delta.left=viewportDimensions.left+ viewportDimensions.width- rightEdgeOffset}}
return delta}
Tooltip.prototype.getTitle=function(){var title
var $e=this.$element
var o=this.options
title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title)
return title}
Tooltip.prototype.getUID=function(prefix){do prefix+=~~(Math.random()*1000000)
while(document.getElementById(prefix))
return prefix}
Tooltip.prototype.tip=function(){return(this.$tip=this.$tip||$(this.options.template))}
Tooltip.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.tooltip-arrow'))}
Tooltip.prototype.validate=function(){if(!this.$element[0].parentNode){this.hide()
this.$element=null
this.options=null}}
Tooltip.prototype.enable=function(){this.enabled=true}
Tooltip.prototype.disable=function(){this.enabled=false}
Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled}
Tooltip.prototype.toggle=function(e){var self=this
if(e){self=$(e.currentTarget).data('bs.'+ this.type)
if(!self){self=new this.constructor(e.currentTarget,this.getDelegateOptions())
$(e.currentTarget).data('bs.'+ this.type,self)}}
self.tip().hasClass('in')?self.leave(self):self.enter(self)}
Tooltip.prototype.destroy=function(){clearTimeout(this.timeout)
this.hide().$element.off('.'+ this.type).removeData('bs.'+ this.type)}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.tooltip')
var options=typeof option=='object'&&option
if(!data&&option=='destroy')return
if(!data)$this.data('bs.tooltip',(data=new Tooltip(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.tooltip
$.fn.tooltip=Plugin
$.fn.tooltip.Constructor=Tooltip
$.fn.tooltip.noConflict=function(){$.fn.tooltip=old
return this}}(jQuery);+function($){'use strict';var Popover=function(element,options){this.init('popover',element,options)}
if(!$.fn.tooltip)throw new Error('Popover requires tooltip.js')
Popover.VERSION='3.2.0'
Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:'right',trigger:'click',content:'',template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'})
Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype)
Popover.prototype.constructor=Popover
Popover.prototype.getDefaults=function(){return Popover.DEFAULTS}
Popover.prototype.setContent=function(){var $tip=this.tip()
var title=this.getTitle()
var content=this.getContent()
$tip.find('.popover-title')[this.options.html?'html':'text'](title)
$tip.find('.popover-content').empty()[this.options.html?(typeof content=='string'?'html':'append'):'text'](content)
$tip.removeClass('fade top bottom left right in')
if(!$tip.find('.popover-title').html())$tip.find('.popover-title').hide()}
Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()}
Popover.prototype.getContent=function(){var $e=this.$element
var o=this.options
return $e.attr('data-content')||(typeof o.content=='function'?o.content.call($e[0]):o.content)}
Popover.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.arrow'))}
Popover.prototype.tip=function(){if(!this.$tip)this.$tip=$(this.options.template)
return this.$tip}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.popover')
var options=typeof option=='object'&&option
if(!data&&option=='destroy')return
if(!data)$this.data('bs.popover',(data=new Popover(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.popover
$.fn.popover=Plugin
$.fn.popover.Constructor=Popover
$.fn.popover.noConflict=function(){$.fn.popover=old
return this}}(jQuery);+function($){'use strict';function ScrollSpy(element,options){var process=$.proxy(this.process,this)
this.$body=$('body')
this.$scrollElement=$(element).is('body')?$(window):$(element)
this.options=$.extend({},ScrollSpy.DEFAULTS,options)
this.selector=(this.options.target||'')+' .nav li > a'
this.offsets=[]
this.targets=[]
this.activeTarget=null
this.scrollHeight=0
this.$scrollElement.on('scroll.bs.scrollspy',process)
this.refresh()
this.process()}
ScrollSpy.VERSION='3.2.0'
ScrollSpy.DEFAULTS={offset:10}
ScrollSpy.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)}
ScrollSpy.prototype.refresh=function(){var offsetMethod='offset'
var offsetBase=0
if(!$.isWindow(this.$scrollElement[0])){offsetMethod='position'
offsetBase=this.$scrollElement.scrollTop()}
this.offsets=[]
this.targets=[]
this.scrollHeight=this.getScrollHeight()
var self=this
this.$body.find(this.selector).map(function(){var $el=$(this)
var href=$el.data('target')||$el.attr('href')
var $href=/^#./.test(href)&&$(href)
return($href&&$href.length&&$href.is(':visible')&&[[$href[offsetMethod]().top+ offsetBase,href]])||null}).sort(function(a,b){return a[0]- b[0]}).each(function(){self.offsets.push(this[0])
self.targets.push(this[1])})}
ScrollSpy.prototype.process=function(){var scrollTop=this.$scrollElement.scrollTop()+ this.options.offset
var scrollHeight=this.getScrollHeight()
var maxScroll=this.options.offset+ scrollHeight- this.$scrollElement.height()
var offsets=this.offsets
var targets=this.targets
var activeTarget=this.activeTarget
var i
if(this.scrollHeight!=scrollHeight){this.refresh()}
if(scrollTop>=maxScroll){return activeTarget!=(i=targets[targets.length- 1])&&this.activate(i)}
if(activeTarget&&scrollTop<=offsets[0]){return activeTarget!=(i=targets[0])&&this.activate(i)}
for(i=offsets.length;i--;){activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(!offsets[i+ 1]||scrollTop<=offsets[i+ 1])&&this.activate(targets[i])}}
ScrollSpy.prototype.activate=function(target){this.activeTarget=target
$(this.selector).parentsUntil(this.options.target,'.active').removeClass('active')
var selector=this.selector+'[data-target="'+ target+'"],'+
this.selector+'[href="'+ target+'"]'
var active=$(selector).parents('li').addClass('active')
if(active.parent('.dropdown-menu').length){active=active.closest('li.dropdown').addClass('active')}
active.trigger('activate.bs.scrollspy')}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.scrollspy')
var options=typeof option=='object'&&option
if(!data)$this.data('bs.scrollspy',(data=new ScrollSpy(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.scrollspy
$.fn.scrollspy=Plugin
$.fn.scrollspy.Constructor=ScrollSpy
$.fn.scrollspy.noConflict=function(){$.fn.scrollspy=old
return this}
$(window).on('load.bs.scrollspy.data-api',function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this)
Plugin.call($spy,$spy.data())})})}(jQuery);+function($){'use strict';var Tab=function(element){this.element=$(element)}
Tab.VERSION='3.2.0'
Tab.prototype.show=function(){var $this=this.element
var $ul=$this.closest('ul:not(.dropdown-menu)')
var selector=$this.data('target')
if(!selector){selector=$this.attr('href')
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}
if($this.parent('li').hasClass('active'))return
var previous=$ul.find('.active:last a')[0]
var e=$.Event('show.bs.tab',{relatedTarget:previous})
$this.trigger(e)
if(e.isDefaultPrevented())return
var $target=$(selector)
this.activate($this.closest('li'),$ul)
this.activate($target,$target.parent(),function(){$this.trigger({type:'shown.bs.tab',relatedTarget:previous})})}
Tab.prototype.activate=function(element,container,callback){var $active=container.find('> .active')
var transition=callback&&$.support.transition&&$active.hasClass('fade')
function next(){$active.removeClass('active').find('> .dropdown-menu > .active').removeClass('active')
element.addClass('active')
if(transition){element[0].offsetWidth
element.addClass('in')}else{element.removeClass('fade')}
if(element.parent('.dropdown-menu')){element.closest('li.dropdown').addClass('active')}
callback&&callback()}
transition?$active.one('bsTransitionEnd',next).emulateTransitionEnd(150):next()
$active.removeClass('in')}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.tab')
if(!data)$this.data('bs.tab',(data=new Tab(this)))
if(typeof option=='string')data[option]()})}
var old=$.fn.tab
$.fn.tab=Plugin
$.fn.tab.Constructor=Tab
$.fn.tab.noConflict=function(){$.fn.tab=old
return this}
$(document).on('click.bs.tab.data-api','[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault()
Plugin.call($(this),'show')})}(jQuery);+function($){'use strict';var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options)
this.$target=$(this.options.target).on('scroll.bs.affix.data-api',$.proxy(this.checkPosition,this)).on('click.bs.affix.data-api',$.proxy(this.checkPositionWithEventLoop,this))
this.$element=$(element)
this.affixed=this.unpin=this.pinnedOffset=null
this.checkPosition()}
Affix.VERSION='3.2.0'
Affix.RESET='affix affix-top affix-bottom'
Affix.DEFAULTS={offset:0,target:window}
Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop=this.$target.scrollTop()
var position=this.$element.offset()
return(this.pinnedOffset=position.top- scrollTop)}
Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)}
Affix.prototype.checkPosition=function(){if(!this.$element.is(':visible'))return
var scrollHeight=$(document).height()
var scrollTop=this.$target.scrollTop()
var position=this.$element.offset()
var offset=this.options.offset
var offsetTop=offset.top
var offsetBottom=offset.bottom
if(typeof offset!='object')offsetBottom=offsetTop=offset
if(typeof offsetTop=='function')offsetTop=offset.top(this.$element)
if(typeof offsetBottom=='function')offsetBottom=offset.bottom(this.$element)
var affix=this.unpin!=null&&(scrollTop+ this.unpin<=position.top)?false:offsetBottom!=null&&(position.top+ this.$element.height()>=scrollHeight- offsetBottom)?'bottom':offsetTop!=null&&(scrollTop<=offsetTop)?'top':false
if(this.affixed===affix)return
if(this.unpin!=null)this.$element.css('top','')
var affixType='affix'+(affix?'-'+ affix:'')
var e=$.Event(affixType+'.bs.affix')
this.$element.trigger(e)
if(e.isDefaultPrevented())return
this.affixed=affix
this.unpin=affix=='bottom'?this.getPinnedOffset():null
this.$element.removeClass(Affix.RESET).addClass(affixType).trigger($.Event(affixType.replace('affix','affixed')))
if(affix=='bottom'){this.$element.offset({top:scrollHeight- this.$element.height()- offsetBottom})}}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.affix')
var options=typeof option=='object'&&option
if(!data)$this.data('bs.affix',(data=new Affix(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.affix
$.fn.affix=Plugin
$.fn.affix.Constructor=Affix
$.fn.affix.noConflict=function(){$.fn.affix=old
return this}
$(window).on('load',function(){$('[data-spy="affix"]').each(function(){var $spy=$(this)
var data=$spy.data()
data.offset=data.offset||{}
if(data.offsetBottom)data.offset.bottom=data.offsetBottom
if(data.offsetTop)data.offset.top=data.offsetTop
Plugin.call($spy,data)})})}(jQuery);
File diff suppressed because one or more lines are too long
-5
View File
@@ -1,5 +0,0 @@
(function(window){'use strict';function classReg(className){return new RegExp("(^|\\s+)"+ className+"(\\s+|$)");}
var hasClass,addClass,removeClass;if('classList'in document.documentElement){hasClass=function(elem,c){return elem.classList.contains(c);};addClass=function(elem,c){elem.classList.add(c);};removeClass=function(elem,c){elem.classList.remove(c);};}
else{hasClass=function(elem,c){return classReg(c).test(elem.className);};addClass=function(elem,c){if(!hasClass(elem,c)){elem.className=elem.className+' '+ c;}};removeClass=function(elem,c){elem.className=elem.className.replace(classReg(c),' ');};}
function toggleClass(elem,c){var fn=hasClass(elem,c)?removeClass:addClass;fn(elem,c);}
var classie={hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass,has:hasClass,add:addClass,remove:removeClass,toggle:toggleClass};if(typeof define==='function'&&define.amd){define(classie);}else{window.classie=classie;}})(window);
File diff suppressed because one or more lines are too long
@@ -1,122 +0,0 @@
var FixedHeader;(function(window,document,undefined){var factory=function($,DataTable){"use strict";FixedHeader=function(mTable,oInit){if(!this instanceof FixedHeader)
{alert("FixedHeader warning: FixedHeader must be initialised with the 'new' keyword.");return;}
var that=this;var oSettings={"aoCache":[],"oSides":{"top":true,"bottom":false,"left":0,"right":0},"oZIndexes":{"top":104,"bottom":103,"left":102,"right":101},"oCloneOnDraw":{"top":false,"bottom":false,"left":true,"right":true},"oMes":{"iTableWidth":0,"iTableHeight":0,"iTableLeft":0,"iTableRight":0,"iTableTop":0,"iTableBottom":0},"oOffset":{"top":0},"nTable":null,"bFooter":false,"bInitComplete":false};if($('body').hasClass('fixed-header')){oSettings.oOffset.top=50;}
this.fnGetSettings=function(){return oSettings;};this.fnUpdate=function(){this._fnUpdateClones();this._fnUpdatePositions();};this.fnPosition=function(){this._fnUpdatePositions();};var dt=$.fn.dataTable.Api?new $.fn.dataTable.Api(mTable).settings()[0]:mTable.fnSettings();dt._oPluginFixedHeader=this;this.fnInit(dt,oInit);};FixedHeader.prototype={fnInit:function(oDtSettings,oInit)
{var s=this.fnGetSettings();var that=this;this.fnInitSettings(s,oInit);if(oDtSettings.oScroll.sX!==""||oDtSettings.oScroll.sY!=="")
{alert("FixedHeader 2 is not supported with DataTables' scrolling mode at this time");return;}
s.nTable=oDtSettings.nTable;oDtSettings.aoDrawCallback.unshift({"fn":function(){FixedHeader.fnMeasure();that._fnUpdateClones.call(that);that._fnUpdatePositions.call(that);},"sName":"FixedHeader"});s.bFooter=($('>tfoot',s.nTable).length>0)?true:false;if(s.oSides.top)
{s.aoCache.push(that._fnCloneTable("fixedHeader","FixedHeader_Header",that._fnCloneThead));}
if(s.oSides.bottom)
{s.aoCache.push(that._fnCloneTable("fixedFooter","FixedHeader_Footer",that._fnCloneTfoot));}
if(s.oSides.left)
{s.aoCache.push(that._fnCloneTable("fixedLeft","FixedHeader_Left",that._fnCloneTLeft,s.oSides.left));}
if(s.oSides.right)
{s.aoCache.push(that._fnCloneTable("fixedRight","FixedHeader_Right",that._fnCloneTRight,s.oSides.right));}
FixedHeader.afnScroll.push(function(){that._fnUpdatePositions.call(that);});$(window).resize(function(){FixedHeader.fnMeasure();that._fnUpdateClones.call(that);that._fnUpdatePositions.call(that);});$(s.nTable).on('column-reorder.dt',function(){FixedHeader.fnMeasure();that._fnUpdateClones(true);that._fnUpdatePositions();}).on('column-visibility.dt',function(){FixedHeader.fnMeasure();that._fnUpdateClones(true);that._fnUpdatePositions();});FixedHeader.fnMeasure();that._fnUpdateClones();that._fnUpdatePositions();s.bInitComplete=true;},fnInitSettings:function(s,oInit)
{if(oInit!==undefined)
{if(oInit.top!==undefined){s.oSides.top=oInit.top;}
if(oInit.bottom!==undefined){s.oSides.bottom=oInit.bottom;}
if(typeof oInit.left=='boolean'){s.oSides.left=oInit.left?1:0;}
else if(oInit.left!==undefined){s.oSides.left=oInit.left;}
if(typeof oInit.right=='boolean'){s.oSides.right=oInit.right?1:0;}
else if(oInit.right!==undefined){s.oSides.right=oInit.right;}
if(oInit.zTop!==undefined){s.oZIndexes.top=oInit.zTop;}
if(oInit.zBottom!==undefined){s.oZIndexes.bottom=oInit.zBottom;}
if(oInit.zLeft!==undefined){s.oZIndexes.left=oInit.zLeft;}
if(oInit.zRight!==undefined){s.oZIndexes.right=oInit.zRight;}
if(oInit.offsetTop!==undefined){s.oOffset.top=oInit.offsetTop;}
if(oInit.alwaysCloneTop!==undefined){s.oCloneOnDraw.top=oInit.alwaysCloneTop;}
if(oInit.alwaysCloneBottom!==undefined){s.oCloneOnDraw.bottom=oInit.alwaysCloneBottom;}
if(oInit.alwaysCloneLeft!==undefined){s.oCloneOnDraw.left=oInit.alwaysCloneLeft;}
if(oInit.alwaysCloneRight!==undefined){s.oCloneOnDraw.right=oInit.alwaysCloneRight;}}},_fnCloneTable:function(sType,sClass,fnClone,iCells)
{var s=this.fnGetSettings();var nCTable;if($(s.nTable.parentNode).css('position')!="absolute")
{s.nTable.parentNode.style.position="relative";}
nCTable=s.nTable.cloneNode(false);nCTable.removeAttribute('id');var nDiv=document.createElement('div');nDiv.style.position="absolute";nDiv.style.top="0px";nDiv.style.left="0px";nDiv.className+=" FixedHeader_Cloned "+sType+" "+sClass;if(sType=="fixedHeader")
{nDiv.style.zIndex=s.oZIndexes.top;}
if(sType=="fixedFooter")
{nDiv.style.zIndex=s.oZIndexes.bottom;}
if(sType=="fixedLeft")
{nDiv.style.zIndex=s.oZIndexes.left;}
else if(sType=="fixedRight")
{nDiv.style.zIndex=s.oZIndexes.right;}
nCTable.style.margin="0";nDiv.appendChild(nCTable);document.body.appendChild(nDiv);return{"nNode":nCTable,"nWrapper":nDiv,"sType":sType,"sPosition":"","sTop":"","sLeft":"","fnClone":fnClone,"iCells":iCells};},_fnMeasure:function()
{var
s=this.fnGetSettings(),m=s.oMes,jqTable=$(s.nTable),oOffset=jqTable.offset(),iParentScrollTop=this._fnSumScroll(s.nTable.parentNode,'scrollTop'),iParentScrollLeft=this._fnSumScroll(s.nTable.parentNode,'scrollLeft');m.iTableWidth=jqTable.outerWidth();m.iTableHeight=jqTable.outerHeight();m.iTableLeft=oOffset.left+ s.nTable.parentNode.scrollLeft;m.iTableTop=oOffset.top+ iParentScrollTop;m.iTableRight=m.iTableLeft+ m.iTableWidth;m.iTableRight=FixedHeader.oDoc.iWidth- m.iTableLeft- m.iTableWidth;m.iTableBottom=FixedHeader.oDoc.iHeight- m.iTableTop- m.iTableHeight;},_fnSumScroll:function(n,side)
{var i=n[side];while(n=n.parentNode)
{if(n.nodeName=='HTML'||n.nodeName=='BODY')
{break;}
i=n[side];}
return i;},_fnUpdatePositions:function()
{var s=this.fnGetSettings();this._fnMeasure();for(var i=0,iLen=s.aoCache.length;i<iLen;i++)
{if(s.aoCache[i].sType=="fixedHeader")
{this._fnScrollFixedHeader(s.aoCache[i]);}
else if(s.aoCache[i].sType=="fixedFooter")
{this._fnScrollFixedFooter(s.aoCache[i]);}
else if(s.aoCache[i].sType=="fixedLeft")
{this._fnScrollHorizontalLeft(s.aoCache[i]);}
else
{this._fnScrollHorizontalRight(s.aoCache[i]);}}},_fnUpdateClones:function(full)
{var s=this.fnGetSettings();if(full){s.bInitComplete=false;}
for(var i=0,iLen=s.aoCache.length;i<iLen;i++)
{s.aoCache[i].fnClone.call(this,s.aoCache[i]);}
if(full){s.bInitComplete=true;}},_fnScrollHorizontalRight:function(oCache)
{var
s=this.fnGetSettings(),oMes=s.oMes,oWin=FixedHeader.oWin,oDoc=FixedHeader.oDoc,nTable=oCache.nWrapper,iFixedWidth=$(nTable).outerWidth();if(oWin.iScrollRight<oMes.iTableRight)
{this._fnUpdateCache(oCache,'sPosition','absolute','position',nTable.style);this._fnUpdateCache(oCache,'sTop',oMes.iTableTop+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',(oMes.iTableLeft+oMes.iTableWidth-iFixedWidth)+"px",'left',nTable.style);}
else if(oMes.iTableLeft<oDoc.iWidth-oWin.iScrollRight-iFixedWidth)
{this._fnUpdateCache(oCache,'sPosition','fixed','position',nTable.style);this._fnUpdateCache(oCache,'sTop',(oMes.iTableTop-oWin.iScrollTop)+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',(oWin.iWidth-iFixedWidth)+"px",'left',nTable.style);}
else
{this._fnUpdateCache(oCache,'sPosition','absolute','position',nTable.style);this._fnUpdateCache(oCache,'sTop',oMes.iTableTop+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',oMes.iTableLeft+"px",'left',nTable.style);}},_fnScrollHorizontalLeft:function(oCache)
{var
s=this.fnGetSettings(),oMes=s.oMes,oWin=FixedHeader.oWin,oDoc=FixedHeader.oDoc,nTable=oCache.nWrapper,iCellWidth=$(nTable).outerWidth();if(oWin.iScrollLeft<oMes.iTableLeft)
{this._fnUpdateCache(oCache,'sPosition','absolute','position',nTable.style);this._fnUpdateCache(oCache,'sTop',oMes.iTableTop+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',oMes.iTableLeft+"px",'left',nTable.style);}
else if(oWin.iScrollLeft<oMes.iTableLeft+oMes.iTableWidth-iCellWidth)
{this._fnUpdateCache(oCache,'sPosition','fixed','position',nTable.style);this._fnUpdateCache(oCache,'sTop',(oMes.iTableTop-oWin.iScrollTop)+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',"0px",'left',nTable.style);}
else
{this._fnUpdateCache(oCache,'sPosition','absolute','position',nTable.style);this._fnUpdateCache(oCache,'sTop',oMes.iTableTop+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',(oMes.iTableLeft+oMes.iTableWidth-iCellWidth)+"px",'left',nTable.style);}},_fnScrollFixedFooter:function(oCache)
{var
s=this.fnGetSettings(),oMes=s.oMes,oWin=FixedHeader.oWin,oDoc=FixedHeader.oDoc,nTable=oCache.nWrapper,iTheadHeight=$("thead",s.nTable).outerHeight(),iCellHeight=$(nTable).outerHeight();if(oWin.iScrollBottom<oMes.iTableBottom)
{this._fnUpdateCache(oCache,'sPosition','absolute','position',nTable.style);this._fnUpdateCache(oCache,'sTop',(oMes.iTableTop+oMes.iTableHeight-iCellHeight)+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',oMes.iTableLeft+"px",'left',nTable.style);}
else if(oWin.iScrollBottom<oMes.iTableBottom+oMes.iTableHeight-iCellHeight-iTheadHeight)
{this._fnUpdateCache(oCache,'sPosition','fixed','position',nTable.style);this._fnUpdateCache(oCache,'sTop',(oWin.iHeight-iCellHeight)+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',(oMes.iTableLeft-oWin.iScrollLeft)+"px",'left',nTable.style);}
else
{this._fnUpdateCache(oCache,'sPosition','absolute','position',nTable.style);this._fnUpdateCache(oCache,'sTop',(oMes.iTableTop+iCellHeight)+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',oMes.iTableLeft+"px",'left',nTable.style);}},_fnScrollFixedHeader:function(oCache)
{var
s=this.fnGetSettings(),oMes=s.oMes,oWin=FixedHeader.oWin,oDoc=FixedHeader.oDoc,nTable=oCache.nWrapper,iTbodyHeight=0,anTbodies=s.nTable.getElementsByTagName('tbody');for(var i=0;i<anTbodies.length;++i){iTbodyHeight+=anTbodies[i].offsetHeight;}
if(oMes.iTableTop>oWin.iScrollTop+ s.oOffset.top)
{this._fnUpdateCache(oCache,'sPosition',"absolute",'position',nTable.style);this._fnUpdateCache(oCache,'sTop',oMes.iTableTop+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',oMes.iTableLeft+"px",'left',nTable.style);}
else if(oWin.iScrollTop+ s.oOffset.top>oMes.iTableTop+iTbodyHeight)
{this._fnUpdateCache(oCache,'sPosition',"absolute",'position',nTable.style);this._fnUpdateCache(oCache,'sTop',(oMes.iTableTop+iTbodyHeight)+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',oMes.iTableLeft+"px",'left',nTable.style);}
else
{this._fnUpdateCache(oCache,'sPosition','fixed','position',nTable.style);this._fnUpdateCache(oCache,'sTop',s.oOffset.top+"px",'top',nTable.style);this._fnUpdateCache(oCache,'sLeft',(oMes.iTableLeft-oWin.iScrollLeft)+"px",'left',nTable.style);}},_fnUpdateCache:function(oCache,sCache,sSet,sProperty,oObj)
{if(oCache[sCache]!=sSet)
{oObj[sProperty]=sSet;oCache[sCache]=sSet;}},_fnClassUpdate:function(source,dest)
{var that=this;if(source.nodeName.toUpperCase()==="TR"||source.nodeName.toUpperCase()==="TH"||source.nodeName.toUpperCase()==="TD"||source.nodeName.toUpperCase()==="SPAN")
{dest.className=source.className;}
$(source).children().each(function(i){that._fnClassUpdate($(source).children()[i],$(dest).children()[i]);});},_fnCloneThead:function(oCache)
{var s=this.fnGetSettings();var nTable=oCache.nNode;if(s.bInitComplete&&!s.oCloneOnDraw.top)
{this._fnClassUpdate($('thead',s.nTable)[0],$('thead',nTable)[0]);return;}
var iDtWidth=$(s.nTable).outerWidth();oCache.nWrapper.style.width=iDtWidth+"px";nTable.style.width=iDtWidth+"px";while(nTable.childNodes.length>0)
{$('thead th',nTable).unbind('click');nTable.removeChild(nTable.childNodes[0]);}
var nThead=$('thead',s.nTable).clone(true)[0];nTable.appendChild(nThead);var a=[];var b=[];$("thead>tr th",s.nTable).each(function(i){a.push($(this).width());});$("thead>tr td",s.nTable).each(function(i){b.push($(this).width());});$("thead>tr th",s.nTable).each(function(i){$("thead>tr th:eq("+i+")",nTable).width(a[i]);$(this).width(a[i]);});$("thead>tr td",s.nTable).each(function(i){$("thead>tr td:eq("+i+")",nTable).width(b[i]);$(this).width(b[i]);});$('th.sorting, th.sorting_desc, th.sorting_asc',nTable).bind('click',function(){this.blur();});},_fnCloneTfoot:function(oCache)
{var s=this.fnGetSettings();var nTable=oCache.nNode;oCache.nWrapper.style.width=$(s.nTable).outerWidth()+"px";while(nTable.childNodes.length>0)
{nTable.removeChild(nTable.childNodes[0]);}
var nTfoot=$('tfoot',s.nTable).clone(true)[0];nTable.appendChild(nTfoot);$("tfoot:eq(0)>tr th",s.nTable).each(function(i){$("tfoot:eq(0)>tr th:eq("+i+")",nTable).width($(this).width());});$("tfoot:eq(0)>tr td",s.nTable).each(function(i){$("tfoot:eq(0)>tr td:eq("+i+")",nTable).width($(this).width());});},_fnCloneTLeft:function(oCache)
{var s=this.fnGetSettings();var nTable=oCache.nNode;var nBody=$('tbody',s.nTable)[0];while(nTable.childNodes.length>0)
{nTable.removeChild(nTable.childNodes[0]);}
nTable.appendChild($("thead",s.nTable).clone(true)[0]);nTable.appendChild($("tbody",s.nTable).clone(true)[0]);if(s.bFooter)
{nTable.appendChild($("tfoot",s.nTable).clone(true)[0]);}
var sSelector='gt('+(oCache.iCells- 1)+')';$('thead tr',nTable).each(function(k){$('th:'+ sSelector,this).remove();});$('tfoot tr',nTable).each(function(k){$('th:'+ sSelector,this).remove();});$('tbody tr',nTable).each(function(k){$('td:'+ sSelector,this).remove();});this.fnEqualiseHeights('thead',nBody.parentNode,nTable);this.fnEqualiseHeights('tbody',nBody.parentNode,nTable);this.fnEqualiseHeights('tfoot',nBody.parentNode,nTable);var iWidth=0;for(var i=0;i<oCache.iCells;i++){iWidth+=$('thead tr th:eq('+ i+')',s.nTable).outerWidth();}
nTable.style.width=iWidth+"px";oCache.nWrapper.style.width=iWidth+"px";},_fnCloneTRight:function(oCache)
{var s=this.fnGetSettings();var nBody=$('tbody',s.nTable)[0];var nTable=oCache.nNode;var iCols=$('tbody tr:eq(0) td',s.nTable).length;while(nTable.childNodes.length>0)
{nTable.removeChild(nTable.childNodes[0]);}
nTable.appendChild($("thead",s.nTable).clone(true)[0]);nTable.appendChild($("tbody",s.nTable).clone(true)[0]);if(s.bFooter)
{nTable.appendChild($("tfoot",s.nTable).clone(true)[0]);}
$('thead tr th:lt('+(iCols-oCache.iCells)+')',nTable).remove();$('tfoot tr th:lt('+(iCols-oCache.iCells)+')',nTable).remove();$('tbody tr',nTable).each(function(k){$('td:lt('+(iCols-oCache.iCells)+')',this).remove();});this.fnEqualiseHeights('thead',nBody.parentNode,nTable);this.fnEqualiseHeights('tbody',nBody.parentNode,nTable);this.fnEqualiseHeights('tfoot',nBody.parentNode,nTable);var iWidth=0;for(var i=0;i<oCache.iCells;i++){iWidth+=$('thead tr th:eq('+(iCols-1-i)+')',s.nTable).outerWidth();}
nTable.style.width=iWidth+"px";oCache.nWrapper.style.width=iWidth+"px";},"fnEqualiseHeights":function(parent,original,clone)
{var that=this;var originals=$(parent+' tr',original);var height;$(parent+' tr',clone).each(function(k){height=originals.eq(k).css('height');if(navigator.appName=='Microsoft Internet Explorer'){height=parseInt(height,10)+ 1;}
$(this).css('height',height);originals.eq(k).css('height',height);});}};FixedHeader.oWin={"iScrollTop":0,"iScrollRight":0,"iScrollBottom":0,"iScrollLeft":0,"iHeight":0,"iWidth":0};FixedHeader.oDoc={"iHeight":0,"iWidth":0};FixedHeader.afnScroll=[];FixedHeader.fnMeasure=function()
{var
jqWin=$(window),jqDoc=$(document),oWin=FixedHeader.oWin,oDoc=FixedHeader.oDoc;oDoc.iHeight=jqDoc.height();oDoc.iWidth=jqDoc.width();oWin.iHeight=jqWin.height();oWin.iWidth=jqWin.width();oWin.iScrollTop=jqWin.scrollTop();oWin.iScrollLeft=jqWin.scrollLeft();oWin.iScrollRight=oDoc.iWidth- oWin.iScrollLeft- oWin.iWidth;oWin.iScrollBottom=oDoc.iHeight- oWin.iScrollTop- oWin.iHeight;};FixedHeader.version="2.1.2";$(window).scroll(function(){FixedHeader.fnMeasure();for(var i=0,iLen=FixedHeader.afnScroll.length;i<iLen;i++){FixedHeader.afnScroll[i]();}});$.fn.dataTable.FixedHeader=FixedHeader;$.fn.DataTable.FixedHeader=FixedHeader;return FixedHeader;};if(typeof define==='function'&&define.amd){define(['jquery','datatables'],factory);}
else if(typeof exports==='object'){factory(require('jquery'),require('datatables'));}
else if(jQuery&&!jQuery.fn.dataTable.FixedHeader){factory(jQuery,jQuery.fn.dataTable);}})(window,document);
@@ -1,370 +0,0 @@
var TableTools;(function(window,document,undefined){var factory=function($,DataTable){"use strict";var ZeroClipboard_TableTools={version:"1.0.4-TableTools2",clients:{},moviePath:'',nextId:1,$:function(thingy){if(typeof(thingy)=='string'){thingy=document.getElementById(thingy);}
if(!thingy.addClass){thingy.hide=function(){this.style.display='none';};thingy.show=function(){this.style.display='';};thingy.addClass=function(name){this.removeClass(name);this.className+=' '+ name;};thingy.removeClass=function(name){this.className=this.className.replace(new RegExp("\\s*"+ name+"\\s*")," ").replace(/^\s+/,'').replace(/\s+$/,'');};thingy.hasClass=function(name){return!!this.className.match(new RegExp("\\s*"+ name+"\\s*"));};}
return thingy;},setMoviePath:function(path){this.moviePath=path;},dispatch:function(id,eventName,args){var client=this.clients[id];if(client){client.receiveEvent(eventName,args);}},register:function(id,client){this.clients[id]=client;},getDOMObjectPosition:function(obj){var info={left:0,top:0,width:obj.width?obj.width:obj.offsetWidth,height:obj.height?obj.height:obj.offsetHeight};if(obj.style.width!==""){info.width=obj.style.width.replace("px","");}
if(obj.style.height!==""){info.height=obj.style.height.replace("px","");}
while(obj){info.left+=obj.offsetLeft;info.top+=obj.offsetTop;obj=obj.offsetParent;}
return info;},Client:function(elem){this.handlers={};this.id=ZeroClipboard_TableTools.nextId++;this.movieId='ZeroClipboard_TableToolsMovie_'+ this.id;ZeroClipboard_TableTools.register(this.id,this);if(elem){this.glue(elem);}}};ZeroClipboard_TableTools.Client.prototype={id:0,ready:false,movie:null,clipText:'',fileName:'',action:'copy',handCursorEnabled:true,cssEffects:true,handlers:null,sized:false,glue:function(elem,title){this.domElement=ZeroClipboard_TableTools.$(elem);var zIndex=99;if(this.domElement.style.zIndex){zIndex=parseInt(this.domElement.style.zIndex,10)+ 1;}
var box=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);this.div=document.createElement('div');var style=this.div.style;style.position='absolute';style.left='0px';style.top='0px';style.width=(box.width)+'px';style.height=box.height+'px';style.zIndex=zIndex;if(typeof title!="undefined"&&title!==""){this.div.title=title;}
if(box.width!==0&&box.height!==0){this.sized=true;}
if(this.domElement){this.domElement.appendChild(this.div);this.div.innerHTML=this.getHTML(box.width,box.height).replace(/&/g,'&amp;');}},positionElement:function(){var box=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);var style=this.div.style;style.position='absolute';style.width=box.width+'px';style.height=box.height+'px';if(box.width!==0&&box.height!==0){this.sized=true;}else{return;}
var flash=this.div.childNodes[0];flash.width=box.width;flash.height=box.height;},getHTML:function(width,height){var html='';var flashvars='id='+ this.id+'&width='+ width+'&height='+ height;if(navigator.userAgent.match(/MSIE/)){var protocol=location.href.match(/^https/i)?'https://':'http://';html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard_TableTools.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';}
else{html+='<embed id="'+this.movieId+'" src="'+ZeroClipboard_TableTools.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';}
return html;},hide:function(){if(this.div){this.div.style.left='-2000px';}},show:function(){this.reposition();},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML='';var body=document.getElementsByTagName('body')[0];try{body.removeChild(this.div);}catch(e){}
this.domElement=null;this.div=null;}},reposition:function(elem){if(elem){this.domElement=ZeroClipboard_TableTools.$(elem);if(!this.domElement){this.hide();}}
if(this.domElement&&this.div){var box=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);var style=this.div.style;style.left=''+ box.left+'px';style.top=''+ box.top+'px';}},clearText:function(){this.clipText='';if(this.ready){this.movie.clearText();}},appendText:function(newText){this.clipText+=newText;if(this.ready){this.movie.appendText(newText);}},setText:function(newText){this.clipText=newText;if(this.ready){this.movie.setText(newText);}},setCharSet:function(charSet){this.charSet=charSet;if(this.ready){this.movie.setCharSet(charSet);}},setBomInc:function(bomInc){this.incBom=bomInc;if(this.ready){this.movie.setBomInc(bomInc);}},setFileName:function(newText){this.fileName=newText;if(this.ready){this.movie.setFileName(newText);}},setAction:function(newText){this.action=newText;if(this.ready){this.movie.setAction(newText);}},addEventListener:function(eventName,func){eventName=eventName.toString().toLowerCase().replace(/^on/,'');if(!this.handlers[eventName]){this.handlers[eventName]=[];}
this.handlers[eventName].push(func);},setHandCursor:function(enabled){this.handCursorEnabled=enabled;if(this.ready){this.movie.setHandCursor(enabled);}},setCSSEffects:function(enabled){this.cssEffects=!!enabled;},receiveEvent:function(eventName,args){var self;eventName=eventName.toString().toLowerCase().replace(/^on/,'');switch(eventName){case'load':this.movie=document.getElementById(this.movieId);if(!this.movie){self=this;setTimeout(function(){self.receiveEvent('load',null);},1);return;}
if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){self=this;setTimeout(function(){self.receiveEvent('load',null);},100);this.ready=true;return;}
this.ready=true;this.movie.clearText();this.movie.appendText(this.clipText);this.movie.setFileName(this.fileName);this.movie.setAction(this.action);this.movie.setCharSet(this.charSet);this.movie.setBomInc(this.incBom);this.movie.setHandCursor(this.handCursorEnabled);break;case'mouseover':if(this.domElement&&this.cssEffects){if(this.recoverActive){this.domElement.addClass('active');}}
break;case'mouseout':if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass('active')){this.domElement.removeClass('active');this.recoverActive=true;}}
break;case'mousedown':if(this.domElement&&this.cssEffects){this.domElement.addClass('active');}
break;case'mouseup':if(this.domElement&&this.cssEffects){this.domElement.removeClass('active');this.recoverActive=false;}
break;}
if(this.handlers[eventName]){for(var idx=0,len=this.handlers[eventName].length;idx<len;idx++){var func=this.handlers[eventName][idx];if(typeof(func)=='function'){func(this,args);}
else if((typeof(func)=='object')&&(func.length==2)){func[0][func[1]](this,args);}
else if(typeof(func)=='string'){window[func](this,args);}}}}};window.ZeroClipboard_TableTools=ZeroClipboard_TableTools;(function($,window,document){TableTools=function(oDT,oOpts)
{if(!this instanceof TableTools)
{alert("Warning: TableTools must be initialised with the keyword 'new'");}
var dtSettings=$.fn.dataTable.Api?new $.fn.dataTable.Api(oDT).settings()[0]:oDT.fnSettings();this.s={"that":this,"dt":dtSettings,"print":{"saveStart":-1,"saveLength":-1,"saveScroll":-1,"funcEnd":function(){}},"buttonCounter":0,"select":{"type":"","selected":[],"preRowSelect":null,"postSelected":null,"postDeselected":null,"all":false,"selectedClass":""},"custom":{},"swfPath":"","buttonSet":[],"master":false,"tags":{}};this.dom={"container":null,"table":null,"print":{"hidden":[],"message":null},"collection":{"collection":null,"background":null}};this.classes=$.extend(true,{},TableTools.classes);if(this.s.dt.bJUI)
{$.extend(true,this.classes,TableTools.classes_themeroller);}
this.fnSettings=function(){return this.s;};if(typeof oOpts=='undefined')
{oOpts={};}
TableTools._aInstances.push(this);this._fnConstruct(oOpts);return this;};TableTools.prototype={"fnGetSelected":function(filtered)
{var
out=[],data=this.s.dt.aoData,displayed=this.s.dt.aiDisplay,i,iLen;if(filtered)
{for(i=0,iLen=displayed.length;i<iLen;i++)
{if(data[displayed[i]]._DTTT_selected)
{out.push(data[displayed[i]].nTr);}}}
else
{for(i=0,iLen=data.length;i<iLen;i++)
{if(data[i]._DTTT_selected)
{out.push(data[i].nTr);}}}
return out;},"fnGetSelectedData":function()
{var out=[];var data=this.s.dt.aoData;var i,iLen;for(i=0,iLen=data.length;i<iLen;i++)
{if(data[i]._DTTT_selected)
{out.push(this.s.dt.oInstance.fnGetData(i));}}
return out;},"fnGetSelectedIndexes":function(filtered)
{var
out=[],data=this.s.dt.aoData,displayed=this.s.dt.aiDisplay,i,iLen;if(filtered)
{for(i=0,iLen=displayed.length;i<iLen;i++)
{if(data[displayed[i]]._DTTT_selected)
{out.push(displayed[i]);}}}
else
{for(i=0,iLen=data.length;i<iLen;i++)
{if(data[i]._DTTT_selected)
{out.push(i);}}}
return out;},"fnIsSelected":function(n)
{var pos=this.s.dt.oInstance.fnGetPosition(n);return(this.s.dt.aoData[pos]._DTTT_selected===true)?true:false;},"fnSelectAll":function(filtered)
{this._fnRowSelect(filtered?this.s.dt.aiDisplay:this.s.dt.aoData);},"fnSelectNone":function(filtered)
{this._fnRowDeselect(this.fnGetSelectedIndexes(filtered));},"fnSelect":function(n)
{if(this.s.select.type=="single")
{this.fnSelectNone();this._fnRowSelect(n);}
else
{this._fnRowSelect(n);}},"fnDeselect":function(n)
{this._fnRowDeselect(n);},"fnGetTitle":function(oConfig)
{var sTitle="";if(typeof oConfig.sTitle!='undefined'&&oConfig.sTitle!==""){sTitle=oConfig.sTitle;}else{var anTitle=document.getElementsByTagName('title');if(anTitle.length>0)
{sTitle=anTitle[0].innerHTML;}}
if("\u00A1".toString().length<4){return sTitle.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,"");}else{return sTitle.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g,"");}},"fnCalcColRatios":function(oConfig)
{var
aoCols=this.s.dt.aoColumns,aColumnsInc=this._fnColumnTargets(oConfig.mColumns),aColWidths=[],iWidth=0,iTotal=0,i,iLen;for(i=0,iLen=aColumnsInc.length;i<iLen;i++)
{if(aColumnsInc[i])
{iWidth=aoCols[i].nTh.offsetWidth;iTotal+=iWidth;aColWidths.push(iWidth);}}
for(i=0,iLen=aColWidths.length;i<iLen;i++)
{aColWidths[i]=aColWidths[i]/iTotal;}
return aColWidths.join('\t');},"fnGetTableData":function(oConfig)
{if(this.s.dt)
{return this._fnGetDataTablesData(oConfig);}},"fnSetText":function(clip,text)
{this._fnFlashSetText(clip,text);},"fnResizeButtons":function()
{for(var cli in ZeroClipboard_TableTools.clients)
{if(cli)
{var client=ZeroClipboard_TableTools.clients[cli];if(typeof client.domElement!='undefined'&&client.domElement.parentNode)
{client.positionElement();}}}},"fnResizeRequired":function()
{for(var cli in ZeroClipboard_TableTools.clients)
{if(cli)
{var client=ZeroClipboard_TableTools.clients[cli];if(typeof client.domElement!='undefined'&&client.domElement.parentNode==this.dom.container&&client.sized===false)
{return true;}}}
return false;},"fnPrint":function(bView,oConfig)
{if(oConfig===undefined)
{oConfig={};}
if(bView===undefined||bView)
{this._fnPrintStart(oConfig);}
else
{this._fnPrintEnd();}},"fnInfo":function(message,time){var info=$('<div/>').addClass(this.classes.print.info).html(message).appendTo('body');setTimeout(function(){info.fadeOut("normal",function(){info.remove();});},time);},"fnContainer":function(){return this.dom.container;},"_fnConstruct":function(oOpts)
{var that=this;this._fnCustomiseSettings(oOpts);this.dom.container=document.createElement(this.s.tags.container);this.dom.container.className=this.classes.container;if(this.s.select.type!='none')
{this._fnRowSelectConfig();}
this._fnButtonDefinations(this.s.buttonSet,this.dom.container);this.s.dt.aoDestroyCallback.push({"sName":"TableTools","fn":function(){$(that.s.dt.nTBody).off('click.DTTT_Select','tr');$(that.dom.container).empty();var idx=$.inArray(that,TableTools._aInstances);if(idx!==-1){TableTools._aInstances.splice(idx,1);}}});},"_fnCustomiseSettings":function(oOpts)
{if(typeof this.s.dt._TableToolsInit=='undefined')
{this.s.master=true;this.s.dt._TableToolsInit=true;}
this.dom.table=this.s.dt.nTable;this.s.custom=$.extend({},TableTools.DEFAULTS,oOpts);this.s.swfPath=this.s.custom.sSwfPath;if(typeof ZeroClipboard_TableTools!='undefined')
{ZeroClipboard_TableTools.moviePath=this.s.swfPath;}
this.s.select.type=this.s.custom.sRowSelect;this.s.select.preRowSelect=this.s.custom.fnPreRowSelect;this.s.select.postSelected=this.s.custom.fnRowSelected;this.s.select.postDeselected=this.s.custom.fnRowDeselected;if(this.s.custom.sSelectedClass)
{this.classes.select.row=this.s.custom.sSelectedClass;}
this.s.tags=this.s.custom.oTags;this.s.buttonSet=this.s.custom.aButtons;},"_fnButtonDefinations":function(buttonSet,wrapper)
{var buttonDef;for(var i=0,iLen=buttonSet.length;i<iLen;i++)
{if(typeof buttonSet[i]=="string")
{if(typeof TableTools.BUTTONS[buttonSet[i]]=='undefined')
{alert("TableTools: Warning - unknown button type: "+buttonSet[i]);continue;}
buttonDef=$.extend({},TableTools.BUTTONS[buttonSet[i]],true);}
else
{if(typeof TableTools.BUTTONS[buttonSet[i].sExtends]=='undefined')
{alert("TableTools: Warning - unknown button type: "+buttonSet[i].sExtends);continue;}
var o=$.extend({},TableTools.BUTTONS[buttonSet[i].sExtends],true);buttonDef=$.extend(o,buttonSet[i],true);}
var button=this._fnCreateButton(buttonDef,$(wrapper).hasClass(this.classes.collection.container));if(button){wrapper.appendChild(button);}}},"_fnCreateButton":function(oConfig,bCollectionButton)
{var nButton=this._fnButtonBase(oConfig,bCollectionButton);if(oConfig.sAction.match(/flash/))
{if(!this._fnHasFlash()){return false;}
this._fnFlashConfig(nButton,oConfig);}
else if(oConfig.sAction=="text")
{this._fnTextConfig(nButton,oConfig);}
else if(oConfig.sAction=="div")
{this._fnTextConfig(nButton,oConfig);}
else if(oConfig.sAction=="collection")
{this._fnTextConfig(nButton,oConfig);this._fnCollectionConfig(nButton,oConfig);}
return nButton;},"_fnButtonBase":function(o,bCollectionButton)
{var sTag,sLiner,sClass;if(bCollectionButton)
{sTag=o.sTag&&o.sTag!=="default"?o.sTag:this.s.tags.collection.button;sLiner=o.sLinerTag&&o.sLinerTag!=="default"?o.sLiner:this.s.tags.collection.liner;sClass=this.classes.collection.buttons.normal;}
else
{sTag=o.sTag&&o.sTag!=="default"?o.sTag:this.s.tags.button;sLiner=o.sLinerTag&&o.sLinerTag!=="default"?o.sLiner:this.s.tags.liner;sClass=this.classes.buttons.normal;}
var
nButton=document.createElement(sTag),nSpan=document.createElement(sLiner),masterS=this._fnGetMasterSettings();nButton.className=sClass+" "+o.sButtonClass;nButton.setAttribute('id',"ToolTables_"+this.s.dt.sInstance+"_"+masterS.buttonCounter);nButton.appendChild(nSpan);nSpan.innerHTML=o.sButtonText;masterS.buttonCounter++;return nButton;},"_fnGetMasterSettings":function()
{if(this.s.master)
{return this.s;}
else
{var instances=TableTools._aInstances;for(var i=0,iLen=instances.length;i<iLen;i++)
{if(this.dom.table==instances[i].s.dt.nTable)
{return instances[i].s;}}}},"_fnCollectionConfig":function(nButton,oConfig)
{var nHidden=document.createElement(this.s.tags.collection.container);nHidden.style.display="none";nHidden.className=this.classes.collection.container;oConfig._collection=nHidden;document.body.appendChild(nHidden);this._fnButtonDefinations(oConfig.aButtons,nHidden);},"_fnCollectionShow":function(nButton,oConfig)
{var
that=this,oPos=$(nButton).offset(),nHidden=oConfig._collection,iDivX=oPos.left,iDivY=oPos.top+ $(nButton).outerHeight(),iWinHeight=$(window).height(),iDocHeight=$(document).height(),iWinWidth=$(window).width(),iDocWidth=$(document).width();nHidden.style.position="absolute";nHidden.style.left=iDivX+"px";nHidden.style.top=iDivY+"px";nHidden.style.display="block";$(nHidden).css('opacity',0);var nBackground=document.createElement('div');nBackground.style.position="absolute";nBackground.style.left="0px";nBackground.style.top="0px";nBackground.style.height=((iWinHeight>iDocHeight)?iWinHeight:iDocHeight)+"px";nBackground.style.width=((iWinWidth>iDocWidth)?iWinWidth:iDocWidth)+"px";nBackground.className=this.classes.collection.background;$(nBackground).css('opacity',0);document.body.appendChild(nBackground);document.body.appendChild(nHidden);var iDivWidth=$(nHidden).outerWidth();var iDivHeight=$(nHidden).outerHeight();if(iDivX+ iDivWidth>iDocWidth)
{nHidden.style.left=(iDocWidth-iDivWidth)+"px";}
if(iDivY+ iDivHeight>iDocHeight)
{nHidden.style.top=(iDivY-iDivHeight-$(nButton).outerHeight())+"px";}
this.dom.collection.collection=nHidden;this.dom.collection.background=nBackground;setTimeout(function(){$(nHidden).animate({"opacity":1},500);$(nBackground).animate({"opacity":0.25},500);},10);this.fnResizeButtons();$(nBackground).click(function(){that._fnCollectionHide.call(that,null,null);});},"_fnCollectionHide":function(nButton,oConfig)
{if(oConfig!==null&&oConfig.sExtends=='collection')
{return;}
if(this.dom.collection.collection!==null)
{$(this.dom.collection.collection).animate({"opacity":0},500,function(e){this.style.display="none";});$(this.dom.collection.background).animate({"opacity":0},500,function(e){this.parentNode.removeChild(this);});this.dom.collection.collection=null;this.dom.collection.background=null;}},"_fnRowSelectConfig":function()
{if(this.s.master)
{var
that=this,i,iLen,dt=this.s.dt,aoOpenRows=this.s.dt.aoOpenRows;$(dt.nTable).addClass(this.classes.select.table);if(this.s.select.type==='os'){$(dt.nTBody).on('mousedown.DTTT_Select','tr',function(e){if(e.shiftKey){$(dt.nTBody).css('-moz-user-select','none').one('selectstart.DTTT_Select','tr',function(){return false;});}});$(dt.nTBody).on('mouseup.DTTT_Select','tr',function(e){$(dt.nTBody).css('-moz-user-select','');});}
$(dt.nTBody).on('click.DTTT_Select',this.s.custom.sRowSelector,function(e){var row=this.nodeName.toLowerCase()==='tr'?this:$(this).parents('tr')[0];var select=that.s.select;var pos=that.s.dt.oInstance.fnGetPosition(row);if(row.parentNode!=dt.nTBody){return;}
if(dt.oInstance.fnGetData(row)===null){return;}
if(select.type=='os'){if(e.ctrlKey||e.metaKey){if(that.fnIsSelected(row)){that._fnRowDeselect(row,e);}
else{that._fnRowSelect(row,e);}}
else if(e.shiftKey){var rowIdxs=that.s.dt.aiDisplay.slice();var idx1=$.inArray(select.lastRow,rowIdxs);var idx2=$.inArray(pos,rowIdxs);if(that.fnGetSelected().length===0||idx1===-1){rowIdxs.splice($.inArray(pos,rowIdxs)+1,rowIdxs.length);}
else{if(idx1>idx2){var tmp=idx2;idx2=idx1;idx1=tmp;}
rowIdxs.splice(idx2+1,rowIdxs.length);rowIdxs.splice(0,idx1);}
if(!that.fnIsSelected(row)){that._fnRowSelect(rowIdxs,e);}
else{rowIdxs.splice($.inArray(pos,rowIdxs),1);that._fnRowDeselect(rowIdxs,e);}}
else{if(that.fnIsSelected(row)&&that.fnGetSelected().length===1){that._fnRowDeselect(row,e);}
else{that.fnSelectNone();that._fnRowSelect(row,e);}}}
else if(that.fnIsSelected(row)){that._fnRowDeselect(row,e);}
else if(select.type=="single"){that.fnSelectNone();that._fnRowSelect(row,e);}
else if(select.type=="multi"){that._fnRowSelect(row,e);}
select.lastRow=pos;});dt.oApi._fnCallbackReg(dt,'aoRowCreatedCallback',function(tr,data,index){if(dt.aoData[index]._DTTT_selected){$(tr).addClass(that.classes.select.row);}},'TableTools-SelectAll');}},"_fnRowSelect":function(src,e)
{var
that=this,data=this._fnSelectData(src),firstTr=data.length===0?null:data[0].nTr,anSelected=[],i,len;for(i=0,len=data.length;i<len;i++)
{if(data[i].nTr)
{anSelected.push(data[i].nTr);}}
if(this.s.select.preRowSelect!==null&&!this.s.select.preRowSelect.call(this,e,anSelected,true))
{return;}
for(i=0,len=data.length;i<len;i++)
{data[i]._DTTT_selected=true;if(data[i].nTr)
{$(data[i].nTr).addClass(that.classes.select.row);}}
if(this.s.select.postSelected!==null)
{this.s.select.postSelected.call(this,anSelected);}
TableTools._fnEventDispatch(this,'select',anSelected,true);},"_fnRowDeselect":function(src,e)
{var
that=this,data=this._fnSelectData(src),firstTr=data.length===0?null:data[0].nTr,anDeselectedTrs=[],i,len;for(i=0,len=data.length;i<len;i++)
{if(data[i].nTr)
{anDeselectedTrs.push(data[i].nTr);}}
if(this.s.select.preRowSelect!==null&&!this.s.select.preRowSelect.call(this,e,anDeselectedTrs,false))
{return;}
for(i=0,len=data.length;i<len;i++)
{data[i]._DTTT_selected=false;if(data[i].nTr)
{$(data[i].nTr).removeClass(that.classes.select.row);}}
if(this.s.select.postDeselected!==null)
{this.s.select.postDeselected.call(this,anDeselectedTrs);}
TableTools._fnEventDispatch(this,'select',anDeselectedTrs,false);},"_fnSelectData":function(src)
{var out=[],pos,i,iLen;if(src.nodeName)
{pos=this.s.dt.oInstance.fnGetPosition(src);out.push(this.s.dt.aoData[pos]);}
else if(typeof src.length!=='undefined')
{for(i=0,iLen=src.length;i<iLen;i++)
{if(src[i].nodeName)
{pos=this.s.dt.oInstance.fnGetPosition(src[i]);out.push(this.s.dt.aoData[pos]);}
else if(typeof src[i]==='number')
{out.push(this.s.dt.aoData[src[i]]);}
else
{out.push(src[i]);}}
return out;}
else
{out.push(src);}
return out;},"_fnTextConfig":function(nButton,oConfig)
{var that=this;if(oConfig.fnInit!==null)
{oConfig.fnInit.call(this,nButton,oConfig);}
if(oConfig.sToolTip!=="")
{nButton.title=oConfig.sToolTip;}
$(nButton).hover(function(){if(oConfig.fnMouseover!==null)
{oConfig.fnMouseover.call(this,nButton,oConfig,null);}},function(){if(oConfig.fnMouseout!==null)
{oConfig.fnMouseout.call(this,nButton,oConfig,null);}});if(oConfig.fnSelect!==null)
{TableTools._fnEventListen(this,'select',function(n){oConfig.fnSelect.call(that,nButton,oConfig,n);});}
$(nButton).click(function(e){if(oConfig.fnClick!==null)
{oConfig.fnClick.call(that,nButton,oConfig,null,e);}
if(oConfig.fnComplete!==null)
{oConfig.fnComplete.call(that,nButton,oConfig,null,null);}
that._fnCollectionHide(nButton,oConfig);});},"_fnHasFlash":function()
{try{var fo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash');if(fo){return true;}}
catch(e){if(navigator.mimeTypes&&navigator.mimeTypes['application/x-shockwave-flash']!==undefined&&navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin){return true;}}
return false;},"_fnFlashConfig":function(nButton,oConfig)
{var that=this;var flash=new ZeroClipboard_TableTools.Client();if(oConfig.fnInit!==null)
{oConfig.fnInit.call(this,nButton,oConfig);}
flash.setHandCursor(true);if(oConfig.sAction=="flash_save")
{flash.setAction('save');flash.setCharSet((oConfig.sCharSet=="utf16le")?'UTF16LE':'UTF8');flash.setBomInc(oConfig.bBomInc);flash.setFileName(oConfig.sFileName.replace('*',this.fnGetTitle(oConfig)));}
else if(oConfig.sAction=="flash_pdf")
{flash.setAction('pdf');flash.setFileName(oConfig.sFileName.replace('*',this.fnGetTitle(oConfig)));}
else
{flash.setAction('copy');}
flash.addEventListener('mouseOver',function(client){if(oConfig.fnMouseover!==null)
{oConfig.fnMouseover.call(that,nButton,oConfig,flash);}});flash.addEventListener('mouseOut',function(client){if(oConfig.fnMouseout!==null)
{oConfig.fnMouseout.call(that,nButton,oConfig,flash);}});flash.addEventListener('mouseDown',function(client){if(oConfig.fnClick!==null)
{oConfig.fnClick.call(that,nButton,oConfig,flash);}});flash.addEventListener('complete',function(client,text){if(oConfig.fnComplete!==null)
{oConfig.fnComplete.call(that,nButton,oConfig,flash,text);}
that._fnCollectionHide(nButton,oConfig);});this._fnFlashGlue(flash,nButton,oConfig.sToolTip);},"_fnFlashGlue":function(flash,node,text)
{var that=this;var id=node.getAttribute('id');if(document.getElementById(id))
{flash.glue(node,text);}
else
{setTimeout(function(){that._fnFlashGlue(flash,node,text);},100);}},"_fnFlashSetText":function(clip,sData)
{var asData=this._fnChunkData(sData,8192);clip.clearText();for(var i=0,iLen=asData.length;i<iLen;i++)
{clip.appendText(asData[i]);}},"_fnColumnTargets":function(mColumns)
{var aColumns=[];var dt=this.s.dt;var i,iLen;if(typeof mColumns=="object")
{for(i=0,iLen=dt.aoColumns.length;i<iLen;i++)
{aColumns.push(false);}
for(i=0,iLen=mColumns.length;i<iLen;i++)
{aColumns[mColumns[i]]=true;}}
else if(mColumns=="visible")
{for(i=0,iLen=dt.aoColumns.length;i<iLen;i++)
{aColumns.push(dt.aoColumns[i].bVisible?true:false);}}
else if(mColumns=="hidden")
{for(i=0,iLen=dt.aoColumns.length;i<iLen;i++)
{aColumns.push(dt.aoColumns[i].bVisible?false:true);}}
else if(mColumns=="sortable")
{for(i=0,iLen=dt.aoColumns.length;i<iLen;i++)
{aColumns.push(dt.aoColumns[i].bSortable?true:false);}}
else
{for(i=0,iLen=dt.aoColumns.length;i<iLen;i++)
{aColumns.push(true);}}
return aColumns;},"_fnNewline":function(oConfig)
{if(oConfig.sNewLine=="auto")
{return navigator.userAgent.match(/Windows/)?"\r\n":"\n";}
else
{return oConfig.sNewLine;}},"_fnGetDataTablesData":function(oConfig)
{var i,iLen,j,jLen;var aRow,aData=[],sLoopData='',arr;var dt=this.s.dt,tr,child;var regex=new RegExp(oConfig.sFieldBoundary,"g");var aColumnsInc=this._fnColumnTargets(oConfig.mColumns);var bSelectedOnly=(typeof oConfig.bSelectedOnly!='undefined')?oConfig.bSelectedOnly:false;if(oConfig.bHeader)
{aRow=[];for(i=0,iLen=dt.aoColumns.length;i<iLen;i++)
{if(aColumnsInc[i])
{sLoopData=dt.aoColumns[i].sTitle.replace(/\n/g," ").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,"");sLoopData=this._fnHtmlDecode(sLoopData);aRow.push(this._fnBoundData(sLoopData,oConfig.sFieldBoundary,regex));}}
aData.push(aRow.join(oConfig.sFieldSeperator));}
var aSelected=this.fnGetSelected();bSelectedOnly=this.s.select.type!=="none"&&bSelectedOnly&&aSelected.length!==0;var api=$.fn.dataTable.Api;var aDataIndex=api?new api(dt).rows(oConfig.oSelectorOpts).indexes().flatten().toArray():dt.oInstance.$('tr',oConfig.oSelectorOpts).map(function(id,row){return bSelectedOnly&&$.inArray(row,aSelected)===-1?null:dt.oInstance.fnGetPosition(row);}).get();for(j=0,jLen=aDataIndex.length;j<jLen;j++)
{tr=dt.aoData[aDataIndex[j]].nTr;aRow=[];for(i=0,iLen=dt.aoColumns.length;i<iLen;i++)
{if(aColumnsInc[i])
{var mTypeData=dt.oApi._fnGetCellData(dt,aDataIndex[j],i,'display');if(oConfig.fnCellRender)
{sLoopData=oConfig.fnCellRender(mTypeData,i,tr,aDataIndex[j])+"";}
else if(typeof mTypeData=="string")
{sLoopData=mTypeData.replace(/\n/g," ");sLoopData=sLoopData.replace(/<img.*?\s+alt\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s>]+)).*?>/gi,'$1$2$3');sLoopData=sLoopData.replace(/<.*?>/g,"");}
else
{sLoopData=mTypeData+"";}
sLoopData=sLoopData.replace(/^\s+/,'').replace(/\s+$/,'');sLoopData=this._fnHtmlDecode(sLoopData);aRow.push(this._fnBoundData(sLoopData,oConfig.sFieldBoundary,regex));}}
aData.push(aRow.join(oConfig.sFieldSeperator));if(oConfig.bOpenRows)
{arr=$.grep(dt.aoOpenRows,function(o){return o.nParent===tr;});if(arr.length===1)
{sLoopData=this._fnBoundData($('td',arr[0].nTr).html(),oConfig.sFieldBoundary,regex);aData.push(sLoopData);}}}
if(oConfig.bFooter&&dt.nTFoot!==null)
{aRow=[];for(i=0,iLen=dt.aoColumns.length;i<iLen;i++)
{if(aColumnsInc[i]&&dt.aoColumns[i].nTf!==null)
{sLoopData=dt.aoColumns[i].nTf.innerHTML.replace(/\n/g," ").replace(/<.*?>/g,"");sLoopData=this._fnHtmlDecode(sLoopData);aRow.push(this._fnBoundData(sLoopData,oConfig.sFieldBoundary,regex));}}
aData.push(aRow.join(oConfig.sFieldSeperator));}
var _sLastData=aData.join(this._fnNewline(oConfig));return _sLastData;},"_fnBoundData":function(sData,sBoundary,regex)
{if(sBoundary==="")
{return sData;}
else
{return sBoundary+ sData.replace(regex,sBoundary+sBoundary)+ sBoundary;}},"_fnChunkData":function(sData,iSize)
{var asReturn=[];var iStrlen=sData.length;for(var i=0;i<iStrlen;i+=iSize)
{if(i+iSize<iStrlen)
{asReturn.push(sData.substring(i,i+iSize));}
else
{asReturn.push(sData.substring(i,iStrlen));}}
return asReturn;},"_fnHtmlDecode":function(sData)
{if(sData.indexOf('&')===-1)
{return sData;}
var n=document.createElement('div');return sData.replace(/&([^\s]*?);/g,function(match,match2){if(match.substr(1,1)==='#')
{return String.fromCharCode(Number(match2.substr(1)));}
else
{n.innerHTML=match;return n.childNodes[0].nodeValue;}});},"_fnPrintStart":function(oConfig)
{var that=this;var oSetDT=this.s.dt;this._fnPrintHideNodes(oSetDT.nTable);this.s.print.saveStart=oSetDT._iDisplayStart;this.s.print.saveLength=oSetDT._iDisplayLength;if(oConfig.bShowAll)
{oSetDT._iDisplayStart=0;oSetDT._iDisplayLength=-1;if(oSetDT.oApi._fnCalculateEnd){oSetDT.oApi._fnCalculateEnd(oSetDT);}
oSetDT.oApi._fnDraw(oSetDT);}
if(oSetDT.oScroll.sX!==""||oSetDT.oScroll.sY!=="")
{this._fnPrintScrollStart(oSetDT);$(this.s.dt.nTable).bind('draw.DTTT_Print',function(){that._fnPrintScrollStart(oSetDT);});}
var anFeature=oSetDT.aanFeatures;for(var cFeature in anFeature)
{if(cFeature!='i'&&cFeature!='t'&&cFeature.length==1)
{for(var i=0,iLen=anFeature[cFeature].length;i<iLen;i++)
{this.dom.print.hidden.push({"node":anFeature[cFeature][i],"display":"block"});anFeature[cFeature][i].style.display="none";}}}
$(document.body).addClass(this.classes.print.body);if(oConfig.sInfo!=="")
{this.fnInfo(oConfig.sInfo,3000);}
if(oConfig.sMessage)
{$('<div/>').addClass(this.classes.print.message).html(oConfig.sMessage).prependTo('body');}
this.s.print.saveScroll=$(window).scrollTop();window.scrollTo(0,0);$(document).bind("keydown.DTTT",function(e){if(e.keyCode==27)
{e.preventDefault();that._fnPrintEnd.call(that,e);}});},"_fnPrintEnd":function(e)
{var that=this;var oSetDT=this.s.dt;var oSetPrint=this.s.print;var oDomPrint=this.dom.print;this._fnPrintShowNodes();if(oSetDT.oScroll.sX!==""||oSetDT.oScroll.sY!=="")
{$(this.s.dt.nTable).unbind('draw.DTTT_Print');this._fnPrintScrollEnd();}
window.scrollTo(0,oSetPrint.saveScroll);$('div.'+this.classes.print.message).remove();$(document.body).removeClass('DTTT_Print');oSetDT._iDisplayStart=oSetPrint.saveStart;oSetDT._iDisplayLength=oSetPrint.saveLength;if(oSetDT.oApi._fnCalculateEnd){oSetDT.oApi._fnCalculateEnd(oSetDT);}
oSetDT.oApi._fnDraw(oSetDT);$(document).unbind("keydown.DTTT");},"_fnPrintScrollStart":function()
{var
oSetDT=this.s.dt,nScrollHeadInner=oSetDT.nScrollHead.getElementsByTagName('div')[0],nScrollHeadTable=nScrollHeadInner.getElementsByTagName('table')[0],nScrollBody=oSetDT.nTable.parentNode,nTheadSize,nTfootSize;nTheadSize=oSetDT.nTable.getElementsByTagName('thead');if(nTheadSize.length>0)
{oSetDT.nTable.removeChild(nTheadSize[0]);}
if(oSetDT.nTFoot!==null)
{nTfootSize=oSetDT.nTable.getElementsByTagName('tfoot');if(nTfootSize.length>0)
{oSetDT.nTable.removeChild(nTfootSize[0]);}}
nTheadSize=oSetDT.nTHead.cloneNode(true);oSetDT.nTable.insertBefore(nTheadSize,oSetDT.nTable.childNodes[0]);if(oSetDT.nTFoot!==null)
{nTfootSize=oSetDT.nTFoot.cloneNode(true);oSetDT.nTable.insertBefore(nTfootSize,oSetDT.nTable.childNodes[1]);}
if(oSetDT.oScroll.sX!=="")
{oSetDT.nTable.style.width=$(oSetDT.nTable).outerWidth()+"px";nScrollBody.style.width=$(oSetDT.nTable).outerWidth()+"px";nScrollBody.style.overflow="visible";}
if(oSetDT.oScroll.sY!=="")
{nScrollBody.style.height=$(oSetDT.nTable).outerHeight()+"px";nScrollBody.style.overflow="visible";}},"_fnPrintScrollEnd":function()
{var
oSetDT=this.s.dt,nScrollBody=oSetDT.nTable.parentNode;if(oSetDT.oScroll.sX!=="")
{nScrollBody.style.width=oSetDT.oApi._fnStringToCss(oSetDT.oScroll.sX);nScrollBody.style.overflow="auto";}
if(oSetDT.oScroll.sY!=="")
{nScrollBody.style.height=oSetDT.oApi._fnStringToCss(oSetDT.oScroll.sY);nScrollBody.style.overflow="auto";}},"_fnPrintShowNodes":function()
{var anHidden=this.dom.print.hidden;for(var i=0,iLen=anHidden.length;i<iLen;i++)
{anHidden[i].node.style.display=anHidden[i].display;}
anHidden.splice(0,anHidden.length);},"_fnPrintHideNodes":function(nNode)
{var anHidden=this.dom.print.hidden;var nParent=nNode.parentNode;var nChildren=nParent.childNodes;for(var i=0,iLen=nChildren.length;i<iLen;i++)
{if(nChildren[i]!=nNode&&nChildren[i].nodeType==1)
{var sDisplay=$(nChildren[i]).css("display");if(sDisplay!="none")
{anHidden.push({"node":nChildren[i],"display":sDisplay});nChildren[i].style.display="none";}}}
if(nParent.nodeName.toUpperCase()!="BODY")
{this._fnPrintHideNodes(nParent);}}};TableTools._aInstances=[];TableTools._aListeners=[];TableTools.fnGetMasters=function()
{var a=[];for(var i=0,iLen=TableTools._aInstances.length;i<iLen;i++)
{if(TableTools._aInstances[i].s.master)
{a.push(TableTools._aInstances[i]);}}
return a;};TableTools.fnGetInstance=function(node)
{if(typeof node!='object')
{node=document.getElementById(node);}
for(var i=0,iLen=TableTools._aInstances.length;i<iLen;i++)
{if(TableTools._aInstances[i].s.master&&TableTools._aInstances[i].dom.table==node)
{return TableTools._aInstances[i];}}
return null;};TableTools._fnEventListen=function(that,type,fn)
{TableTools._aListeners.push({"that":that,"type":type,"fn":fn});};TableTools._fnEventDispatch=function(that,type,node,selected)
{var listeners=TableTools._aListeners;for(var i=0,iLen=listeners.length;i<iLen;i++)
{if(that.dom.table==listeners[i].that.dom.table&&listeners[i].type==type)
{listeners[i].fn(node,selected);}}};TableTools.buttonBase={"sAction":"text","sTag":"default","sLinerTag":"default","sButtonClass":"DTTT_button_text","sButtonText":"Button text","sTitle":"","sToolTip":"","sCharSet":"utf8","bBomInc":false,"sFileName":"*.csv","sFieldBoundary":"","sFieldSeperator":"\t","sNewLine":"auto","mColumns":"all","bHeader":true,"bFooter":true,"bOpenRows":false,"bSelectedOnly":false,"oSelectorOpts":undefined,"fnMouseover":null,"fnMouseout":null,"fnClick":null,"fnSelect":null,"fnComplete":null,"fnInit":null,"fnCellRender":null};TableTools.BUTTONS={"csv":$.extend({},TableTools.buttonBase,{"sAction":"flash_save","sButtonClass":"DTTT_button_csv","sButtonText":"CSV","sFieldBoundary":'"',"sFieldSeperator":",","fnClick":function(nButton,oConfig,flash){this.fnSetText(flash,this.fnGetTableData(oConfig));}}),"xls":$.extend({},TableTools.buttonBase,{"sAction":"flash_save","sCharSet":"utf16le","bBomInc":true,"sButtonClass":"DTTT_button_xls","sButtonText":"Excel","fnClick":function(nButton,oConfig,flash){this.fnSetText(flash,this.fnGetTableData(oConfig));}}),"copy":$.extend({},TableTools.buttonBase,{"sAction":"flash_copy","sButtonClass":"DTTT_button_copy","sButtonText":"Copy","fnClick":function(nButton,oConfig,flash){this.fnSetText(flash,this.fnGetTableData(oConfig));},"fnComplete":function(nButton,oConfig,flash,text){var lines=text.split('\n').length;if(oConfig.bHeader)lines--;if(this.s.dt.nTFoot!==null&&oConfig.bFooter)lines--;var plural=(lines==1)?"":"s";this.fnInfo('<h6>Table copied</h6>'+'<p>Copied '+lines+' row'+plural+' to the clipboard.</p>',1500);}}),"pdf":$.extend({},TableTools.buttonBase,{"sAction":"flash_pdf","sNewLine":"\n","sFileName":"*.pdf","sButtonClass":"DTTT_button_pdf","sButtonText":"PDF","sPdfOrientation":"portrait","sPdfSize":"A4","sPdfMessage":"","fnClick":function(nButton,oConfig,flash){this.fnSetText(flash,"title:"+ this.fnGetTitle(oConfig)+"\n"+"message:"+ oConfig.sPdfMessage+"\n"+"colWidth:"+ this.fnCalcColRatios(oConfig)+"\n"+"orientation:"+ oConfig.sPdfOrientation+"\n"+"size:"+ oConfig.sPdfSize+"\n"+"--/TableToolsOpts--\n"+
this.fnGetTableData(oConfig));}}),"print":$.extend({},TableTools.buttonBase,{"sInfo":"<h6>Print view</h6><p>Please use your browser's print function to "+"print this table. Press escape when finished.</p>","sMessage":null,"bShowAll":true,"sToolTip":"View print view","sButtonClass":"DTTT_button_print","sButtonText":"Print","fnClick":function(nButton,oConfig){this.fnPrint(true,oConfig);}}),"text":$.extend({},TableTools.buttonBase),"select":$.extend({},TableTools.buttonBase,{"sButtonText":"Select button","fnSelect":function(nButton,oConfig){if(this.fnGetSelected().length!==0){$(nButton).removeClass(this.classes.buttons.disabled);}else{$(nButton).addClass(this.classes.buttons.disabled);}},"fnInit":function(nButton,oConfig){$(nButton).addClass(this.classes.buttons.disabled);}}),"select_single":$.extend({},TableTools.buttonBase,{"sButtonText":"Select button","fnSelect":function(nButton,oConfig){var iSelected=this.fnGetSelected().length;if(iSelected==1){$(nButton).removeClass(this.classes.buttons.disabled);}else{$(nButton).addClass(this.classes.buttons.disabled);}},"fnInit":function(nButton,oConfig){$(nButton).addClass(this.classes.buttons.disabled);}}),"select_all":$.extend({},TableTools.buttonBase,{"sButtonText":"Select all","fnClick":function(nButton,oConfig){this.fnSelectAll();},"fnSelect":function(nButton,oConfig){if(this.fnGetSelected().length==this.s.dt.fnRecordsDisplay()){$(nButton).addClass(this.classes.buttons.disabled);}else{$(nButton).removeClass(this.classes.buttons.disabled);}}}),"select_none":$.extend({},TableTools.buttonBase,{"sButtonText":"Deselect all","fnClick":function(nButton,oConfig){this.fnSelectNone();},"fnSelect":function(nButton,oConfig){if(this.fnGetSelected().length!==0){$(nButton).removeClass(this.classes.buttons.disabled);}else{$(nButton).addClass(this.classes.buttons.disabled);}},"fnInit":function(nButton,oConfig){$(nButton).addClass(this.classes.buttons.disabled);}}),"ajax":$.extend({},TableTools.buttonBase,{"sAjaxUrl":"/xhr.php","sButtonText":"Ajax button","fnClick":function(nButton,oConfig){var sData=this.fnGetTableData(oConfig);$.ajax({"url":oConfig.sAjaxUrl,"data":[{"name":"tableData","value":sData}],"success":oConfig.fnAjaxComplete,"dataType":"json","type":"POST","cache":false,"error":function(){alert("Error detected when sending table data to server");}});},"fnAjaxComplete":function(json){alert('Ajax complete');}}),"div":$.extend({},TableTools.buttonBase,{"sAction":"div","sTag":"div","sButtonClass":"DTTT_nonbutton","sButtonText":"Text button"}),"collection":$.extend({},TableTools.buttonBase,{"sAction":"collection","sButtonClass":"DTTT_button_collection","sButtonText":"Collection","fnClick":function(nButton,oConfig){this._fnCollectionShow(nButton,oConfig);}})};TableTools.buttons=TableTools.BUTTONS;TableTools.classes={"container":"DTTT_container","buttons":{"normal":"DTTT_button","disabled":"DTTT_disabled"},"collection":{"container":"DTTT_collection","background":"DTTT_collection_background","buttons":{"normal":"DTTT_button","disabled":"DTTT_disabled"}},"select":{"table":"DTTT_selectable","row":"DTTT_selected selected"},"print":{"body":"DTTT_Print","info":"DTTT_print_info","message":"DTTT_PrintMessage"}};TableTools.classes_themeroller={"container":"DTTT_container ui-buttonset ui-buttonset-multi","buttons":{"normal":"DTTT_button ui-button ui-state-default"},"collection":{"container":"DTTT_collection ui-buttonset ui-buttonset-multi"}};TableTools.DEFAULTS={"sSwfPath":"../swf/copy_csv_xls_pdf.swf","sRowSelect":"none","sRowSelector":"tr","sSelectedClass":null,"fnPreRowSelect":null,"fnRowSelected":null,"fnRowDeselected":null,"aButtons":["copy","csv","xls","pdf","print"],"oTags":{"container":"div","button":"a","liner":"span","collection":{"container":"div","button":"a","liner":"span"}}};TableTools.defaults=TableTools.DEFAULTS;TableTools.prototype.CLASS="TableTools";TableTools.version="2.2.2";if($.fn.dataTable.Api){$.fn.dataTable.Api.register('tabletools()',function(){var tt=null;if(this.context.length>0){tt=TableTools.fnGetInstance(this.context[0].nTable);}
return tt;});}
if(typeof $.fn.dataTable=="function"&&typeof $.fn.dataTableExt.fnVersionCheck=="function"&&$.fn.dataTableExt.fnVersionCheck('1.9.0'))
{$.fn.dataTableExt.aoFeatures.push({"fnInit":function(oDTSettings){var init=oDTSettings.oInit;var opts=init?init.tableTools||init.oTableTools||{}:{};return new TableTools(oDTSettings.oInstance,opts).dom.container;},"cFeature":"T","sFeature":"TableTools"});}
else
{alert("Warning: TableTools requires DataTables 1.9.0 or newer - www.datatables.net/download");}
$.fn.DataTable.TableTools=TableTools;})(jQuery,window,document);if(typeof $.fn.dataTable=="function"&&typeof $.fn.dataTableExt.fnVersionCheck=="function"&&$.fn.dataTableExt.fnVersionCheck('1.9.0'))
{$.fn.dataTableExt.aoFeatures.push({"fnInit":function(oDTSettings){var oOpts=typeof oDTSettings.oInit.oTableTools!='undefined'?oDTSettings.oInit.oTableTools:{};var oTT=new TableTools(oDTSettings.oInstance,oOpts);TableTools._aInstances.push(oTT);return oTT.dom.container;},"cFeature":"T","sFeature":"TableTools"});}
else
{alert("Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download");}
$.fn.dataTable.TableTools=TableTools;$.fn.DataTable.TableTools=TableTools;return TableTools;};if(typeof define==='function'&&define.amd){define(['jquery','datatables'],factory);}
else if(typeof exports==='object'){factory(require('jquery'),require('datatables'));}
else if(jQuery&&!jQuery.fn.dataTable.TableTools){factory(jQuery,jQuery.fn.dataTable);}})(window,document);
@@ -1,87 +0,0 @@
!function($){var DateRangePicker=function(element,options,cb){var hasOptions=typeof options=='object';var localeObject;this.startDate=moment().startOf('day');this.endDate=moment().startOf('day');this.minDate=false;this.maxDate=false;this.dateLimit=false;this.showDropdowns=false;this.showWeekNumbers=false;this.timePicker=false;this.timePickerIncrement=30;this.timePicker12Hour=true;this.ranges={};this.opens='right';this.buttonClasses=['btn','btn-small'];this.applyClass='btn-success';this.cancelClass='btn-default';this.format='MM/DD/YYYY';this.separator=' - ';this.locale={applyLabel:'Apply',cancelLabel:'Cancel',fromLabel:'From',toLabel:'To',weekLabel:'W',customRangeLabel:'Custom Range',daysOfWeek:moment()._lang._weekdaysMin.slice(),monthNames:moment()._lang._monthsShort.slice(),firstDay:0};this.cb=function(){};this.parentEl='body';this.element=$(element);if(this.element.hasClass('pull-right'))
this.opens='left';if(this.element.is('input')){this.element.on({click:$.proxy(this.show,this),focus:$.proxy(this.show,this)});}else{this.element.on('click',$.proxy(this.show,this));}
localeObject=this.locale;if(hasOptions){if(typeof options.locale=='object'){$.each(localeObject,function(property,value){localeObject[property]=options.locale[property]||value;});}
if(options.applyClass){this.applyClass=options.applyClass;}
if(options.cancelClass){this.cancelClass=options.cancelClass;}}
var DRPTemplate='<div class="daterangepicker dropdown-menu">'+'<div class="calendar left"></div>'+'<div class="calendar right"></div>'+'<div class="ranges">'+'<div class="range_inputs">'+'<div class="daterangepicker_start_input" style="float: left">'+'<label for="daterangepicker_start">'+ this.locale.fromLabel+'</label>'+'<input class="input-mini" type="text" name="daterangepicker_start" value="" disabled="disabled" />'+'</div>'+'<div class="daterangepicker_end_input" style="float: left; padding-left: 11px">'+'<label for="daterangepicker_end">'+ this.locale.toLabel+'</label>'+'<input class="input-mini" type="text" name="daterangepicker_end" value="" disabled="disabled" />'+'</div>'+'<button class="'+ this.applyClass+' applyBtn" disabled="disabled">'+ this.locale.applyLabel+'</button>&nbsp;'+'<button class="'+ this.cancelClass+' cancelBtn">'+ this.locale.cancelLabel+'</button>'+'</div>'+'</div>'+'</div>';this.parentEl=(hasOptions&&options.parentEl&&$(options.parentEl))||$(this.parentEl);this.container=$(DRPTemplate).appendTo(this.parentEl);if(hasOptions){if(typeof options.format=='string')
this.format=options.format;if(typeof options.separator=='string')
this.separator=options.separator;if(typeof options.startDate=='string')
this.startDate=moment(options.startDate,this.format);if(typeof options.endDate=='string')
this.endDate=moment(options.endDate,this.format);if(typeof options.minDate=='string')
this.minDate=moment(options.minDate,this.format);if(typeof options.maxDate=='string')
this.maxDate=moment(options.maxDate,this.format);if(typeof options.startDate=='object')
this.startDate=moment(options.startDate);if(typeof options.endDate=='object')
this.endDate=moment(options.endDate);if(typeof options.minDate=='object')
this.minDate=moment(options.minDate);if(typeof options.maxDate=='object')
this.maxDate=moment(options.maxDate);if(typeof options.ranges=='object'){for(var range in options.ranges){var start=moment(options.ranges[range][0]);var end=moment(options.ranges[range][1]);if(this.minDate&&start.isBefore(this.minDate))
start=moment(this.minDate);if(this.maxDate&&end.isAfter(this.maxDate))
end=moment(this.maxDate);if((this.minDate&&end.isBefore(this.minDate))||(this.maxDate&&start.isAfter(this.maxDate))){continue;}
this.ranges[range]=[start,end];}
var list='<ul>';for(var range in this.ranges){list+='<li>'+ range+'</li>';}
list+='<li>'+ this.locale.customRangeLabel+'</li>';list+='</ul>';this.container.find('.ranges').prepend(list);}
if(typeof options.dateLimit=='object')
this.dateLimit=options.dateLimit;if(typeof options.locale=='object'){if(typeof options.locale.firstDay=='number'){this.locale.firstDay=options.locale.firstDay;var iterator=options.locale.firstDay;while(iterator>0){this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());iterator--;}}}
if(typeof options.opens=='string')
this.opens=options.opens;if(typeof options.showWeekNumbers=='boolean'){this.showWeekNumbers=options.showWeekNumbers;}
if(typeof options.buttonClasses=='string'){this.buttonClasses=[options.buttonClasses];}
if(typeof options.buttonClasses=='object'){this.buttonClasses=options.buttonClasses;}
if(typeof options.showDropdowns=='boolean'){this.showDropdowns=options.showDropdowns;}
if(typeof options.timePicker=='boolean'){this.timePicker=options.timePicker;}
if(typeof options.timePickerIncrement=='number'){this.timePickerIncrement=options.timePickerIncrement;}
if(typeof options.timePicker12Hour=='boolean'){this.timePicker12Hour=options.timePicker12Hour;}}
if(!this.timePicker){this.startDate=this.startDate.startOf('day');this.endDate=this.endDate.startOf('day');}
var c=this.container;$.each(this.buttonClasses,function(idx,val){c.find('button').addClass(val);});if(this.opens=='right'){var left=this.container.find('.calendar.left');var right=this.container.find('.calendar.right');left.removeClass('left').addClass('right');right.removeClass('right').addClass('left');}
if(typeof options=='undefined'||typeof options.ranges=='undefined'){this.container.find('.calendar').show();this.move();}
if(typeof cb=='function')
this.cb=cb;this.container.addClass('opens'+ this.opens);if(!hasOptions||(typeof options.startDate=='undefined'&&typeof options.endDate=='undefined')){if($(this.element).is('input[type=text]')){var val=$(this.element).val();var split=val.split(this.separator);var start,end;if(split.length==2){start=moment(split[0],this.format);end=moment(split[1],this.format);}
if(start!=null&&end!=null){this.startDate=start;this.endDate=end;}}}
this.oldStartDate=this.startDate.clone();this.oldEndDate=this.endDate.clone();this.leftCalendar={month:moment([this.startDate.year(),this.startDate.month(),1,this.startDate.hour(),this.startDate.minute()]),calendar:[]};this.rightCalendar={month:moment([this.endDate.year(),this.endDate.month(),1,this.endDate.hour(),this.endDate.minute()]),calendar:[]};this.container.on('mousedown',$.proxy(this.mousedown,this));this.container.find('.calendar').on('click','.prev',$.proxy(this.clickPrev,this));this.container.find('.calendar').on('click','.next',$.proxy(this.clickNext,this));this.container.find('.ranges').on('click','button.applyBtn',$.proxy(this.clickApply,this));this.container.find('.ranges').on('click','button.cancelBtn',$.proxy(this.clickCancel,this));this.container.find('.ranges').on('click','.daterangepicker_start_input',$.proxy(this.showCalendars,this));this.container.find('.ranges').on('click','.daterangepicker_end_input',$.proxy(this.showCalendars,this));this.container.find('.calendar').on('click','td.available',$.proxy(this.clickDate,this));this.container.find('.calendar').on('mouseenter','td.available',$.proxy(this.enterDate,this));this.container.find('.calendar').on('mouseleave','td.available',$.proxy(this.updateView,this));this.container.find('.ranges').on('click','li',$.proxy(this.clickRange,this));this.container.find('.ranges').on('mouseenter','li',$.proxy(this.enterRange,this));this.container.find('.ranges').on('mouseleave','li',$.proxy(this.updateView,this));this.container.find('.calendar').on('change','select.yearselect',$.proxy(this.updateMonthYear,this));this.container.find('.calendar').on('change','select.monthselect',$.proxy(this.updateMonthYear,this));this.container.find('.calendar').on('change','select.hourselect',$.proxy(this.updateTime,this));this.container.find('.calendar').on('change','select.minuteselect',$.proxy(this.updateTime,this));this.container.find('.calendar').on('change','select.ampmselect',$.proxy(this.updateTime,this));this.element.on('keyup',$.proxy(this.updateFromControl,this));this.updateView();this.updateCalendars();};DateRangePicker.prototype={constructor:DateRangePicker,mousedown:function(e){e.stopPropagation();},updateView:function(){this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.format));this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.format));if(this.startDate.isSame(this.endDate)||this.startDate.isBefore(this.endDate)){this.container.find('button.applyBtn').removeAttr('disabled');}else{this.container.find('button.applyBtn').attr('disabled','disabled');}},updateFromControl:function(){if(!this.element.is('input'))return;if(!this.element.val().length)return;var dateString=this.element.val().split(this.separator);var start=moment(dateString[0],this.format);var end=moment(dateString[1],this.format);if(start==null||end==null)return;if(end.isBefore(start))return;this.startDate=start;this.endDate=end;this.notify();this.updateCalendars();},notify:function(){this.updateView();this.cb(this.startDate,this.endDate);},move:function(){var parentOffset={top:this.parentEl.offset().top-(this.parentEl.is('body')?0:this.parentEl.scrollTop()),left:this.parentEl.offset().left-(this.parentEl.is('body')?0:this.parentEl.scrollLeft())};if(this.opens=='left'){this.container.css({top:this.element.offset().top+ this.element.outerHeight()- parentOffset.top,right:$(window).width()- this.element.offset().left- this.element.outerWidth()- parentOffset.left,left:'auto'});if(this.container.offset().left<0){this.container.css({right:'auto',left:9});}}else{this.container.css({top:this.element.offset().top+ this.element.outerHeight()- parentOffset.top,left:this.element.offset().left- parentOffset.left,right:'auto'});if(this.container.offset().left+ this.container.outerWidth()>$(window).width()){this.container.css({left:'auto',right:0});}}},show:function(e){this.container.show();this.move();if(e){e.stopPropagation();e.preventDefault();}
$(document).on('mousedown',$.proxy(this.hide,this));this.element.trigger('shown',{target:e.target,picker:this});},hide:function(e){this.container.hide();if(!this.startDate.isSame(this.oldStartDate)||!this.endDate.isSame(this.oldEndDate))
this.notify();this.oldStartDate=this.startDate.clone();this.oldEndDate=this.endDate.clone();$(document).off('mousedown',this.hide);this.element.trigger('hidden',{picker:this});},enterRange:function(e){var label=e.target.innerHTML;if(label==this.locale.customRangeLabel){this.updateView();}else{var dates=this.ranges[label];this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.format));this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.format));}},showCalendars:function(){this.container.find('.calendar').show();this.move();},updateInputText:function(){if(this.element.is('input'))
this.element.val(this.startDate.format(this.format)+ this.separator+ this.endDate.format(this.format));},clickRange:function(e){var label=e.target.innerHTML;if(label==this.locale.customRangeLabel){this.showCalendars();}else{var dates=this.ranges[label];this.startDate=dates[0];this.endDate=dates[1];if(!this.timePicker){this.startDate.startOf('day');this.endDate.startOf('day');}
this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute());this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute());this.updateCalendars();this.updateInputText();this.container.find('.calendar').hide();this.hide();}},clickPrev:function(e){var cal=$(e.target).parents('.calendar');if(cal.hasClass('left')){this.leftCalendar.month.subtract('month',1);}else{this.rightCalendar.month.subtract('month',1);}
this.updateCalendars();},clickNext:function(e){var cal=$(e.target).parents('.calendar');if(cal.hasClass('left')){this.leftCalendar.month.add('month',1);}else{this.rightCalendar.month.add('month',1);}
this.updateCalendars();},enterDate:function(e){var title=$(e.target).attr('data-title');var row=title.substr(1,1);var col=title.substr(3,1);var cal=$(e.target).parents('.calendar');if(cal.hasClass('left')){this.container.find('input[name=daterangepicker_start]').val(this.leftCalendar.calendar[row][col].format(this.format));}else{this.container.find('input[name=daterangepicker_end]').val(this.rightCalendar.calendar[row][col].format(this.format));}},clickDate:function(e){var title=$(e.target).attr('data-title');var row=title.substr(1,1);var col=title.substr(3,1);var cal=$(e.target).parents('.calendar');if(cal.hasClass('left')){var startDate=this.leftCalendar.calendar[row][col];var endDate=this.endDate;if(typeof this.dateLimit=='object'){var maxDate=moment(startDate).add(this.dateLimit).startOf('day');if(endDate.isAfter(maxDate)){endDate=maxDate;}}}else{var startDate=this.startDate;var endDate=this.rightCalendar.calendar[row][col];if(typeof this.dateLimit=='object'){var minDate=moment(endDate).subtract(this.dateLimit).startOf('day');if(startDate.isBefore(minDate)){startDate=minDate;}}}
cal.find('td').removeClass('active');if(startDate.isSame(endDate)||startDate.isBefore(endDate)){$(e.target).addClass('active');this.startDate=startDate;this.endDate=endDate;}else if(startDate.isAfter(endDate)){$(e.target).addClass('active');this.startDate=startDate;this.endDate=moment(startDate).add('day',1).startOf('day');}
this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());this.updateCalendars();},clickApply:function(e){this.updateInputText();this.hide();},clickCancel:function(e){this.startDate=this.oldStartDate;this.endDate=this.oldEndDate;this.updateView();this.updateCalendars();this.hide();},updateMonthYear:function(e){var isLeft=$(e.target).closest('.calendar').hasClass('left');var cal=this.container.find('.calendar.left');if(!isLeft)
cal=this.container.find('.calendar.right');var month=parseInt(cal.find('.monthselect').val());var year=cal.find('.yearselect').val();if(isLeft){this.leftCalendar.month.month(month).year(year);}else{this.rightCalendar.month.month(month).year(year);}
this.updateCalendars();},updateTime:function(e){var isLeft=$(e.target).closest('.calendar').hasClass('left');var cal=this.container.find('.calendar.left');if(!isLeft)
cal=this.container.find('.calendar.right');var hour=parseInt(cal.find('.hourselect').val());var minute=parseInt(cal.find('.minuteselect').val());if(this.timePicker12Hour){var ampm=cal.find('.ampmselect').val();if(ampm=='PM'&&hour<12)
hour+=12;if(ampm=='AM'&&hour==12)
hour=0;}
if(isLeft){var start=this.startDate;start.hour(hour);start.minute(minute);this.startDate=start;this.leftCalendar.month.hour(hour).minute(minute);}else{var end=this.endDate;end.hour(hour);end.minute(minute);this.endDate=end;this.rightCalendar.month.hour(hour).minute(minute);}
this.updateCalendars();},updateCalendars:function(){this.leftCalendar.calendar=this.buildCalendar(this.leftCalendar.month.month(),this.leftCalendar.month.year(),this.leftCalendar.month.hour(),this.leftCalendar.month.minute(),'left');this.rightCalendar.calendar=this.buildCalendar(this.rightCalendar.month.month(),this.rightCalendar.month.year(),this.rightCalendar.month.hour(),this.rightCalendar.month.minute(),'right');this.container.find('.calendar.left').html(this.renderCalendar(this.leftCalendar.calendar,this.startDate,this.minDate,this.maxDate));this.container.find('.calendar.right').html(this.renderCalendar(this.rightCalendar.calendar,this.endDate,this.startDate,this.maxDate));this.container.find('.ranges li').removeClass('active');var customRange=true;var i=0;for(var range in this.ranges){if(this.timePicker){if(this.startDate.isSame(this.ranges[range][0])&&this.endDate.isSame(this.ranges[range][1])){customRange=false;this.container.find('.ranges li:eq('+ i+')').addClass('active');}}else{if(this.startDate.format('YYYY-MM-DD')==this.ranges[range][0].format('YYYY-MM-DD')&&this.endDate.format('YYYY-MM-DD')==this.ranges[range][1].format('YYYY-MM-DD')){customRange=false;this.container.find('.ranges li:eq('+ i+')').addClass('active');}}
i++;}
if(customRange)
this.container.find('.ranges li:last').addClass('active');},buildCalendar:function(month,year,hour,minute,side){var firstDay=moment([year,month,1]);var lastMonth=moment(firstDay).subtract('month',1).month();var lastYear=moment(firstDay).subtract('month',1).year();var daysInLastMonth=moment([lastYear,lastMonth]).daysInMonth();var dayOfWeek=firstDay.day();var calendar=[];for(var i=0;i<6;i++){calendar[i]=[];}
var startDay=daysInLastMonth- dayOfWeek+ this.locale.firstDay+ 1;if(startDay>daysInLastMonth)
startDay-=7;if(dayOfWeek==this.locale.firstDay)
startDay=daysInLastMonth- 6;var curDate=moment([lastYear,lastMonth,startDay,hour,minute]);for(var i=0,col=0,row=0;i<42;i++,col++,curDate=moment(curDate).add('day',1)){if(i>0&&col%7==0){col=0;row++;}
calendar[row][col]=curDate;}
return calendar;},renderDropdowns:function(selected,minDate,maxDate){var currentMonth=selected.month();var monthHtml='<select class="monthselect">';var inMinYear=false;var inMaxYear=false;for(var m=0;m<12;m++){if((!inMinYear||m>=minDate.month())&&(!inMaxYear||m<=maxDate.month())){monthHtml+="<option value='"+ m+"'"+
(m===currentMonth?" selected='selected'":"")+">"+ this.locale.monthNames[m]+"</option>";}}
monthHtml+="</select>";var currentYear=selected.year();var maxYear=(maxDate&&maxDate.year())||(currentYear+ 5);var minYear=(minDate&&minDate.year())||(currentYear- 50);var yearHtml='<select class="yearselect">'
for(var y=minYear;y<=maxYear;y++){yearHtml+='<option value="'+ y+'"'+
(y===currentYear?' selected="selected"':'')+'>'+ y+'</option>';}
yearHtml+='</select>';return monthHtml+ yearHtml;},renderCalendar:function(calendar,selected,minDate,maxDate){var html='<div class="calendar-date">';html+='<table class="table-condensed">';html+='<thead>';html+='<tr>';if(this.showWeekNumbers)
html+='<th></th>';if(!minDate||minDate.isBefore(calendar[1][1])){html+='<th class="prev available"><i class="icon-arrow-left glyphicon glyphicon-arrow-left"></i></th>';}else{html+='<th></th>';}
var dateHtml=this.locale.monthNames[calendar[1][1].month()]+ calendar[1][1].format(" YYYY");if(this.showDropdowns){dateHtml=this.renderDropdowns(calendar[1][1],minDate,maxDate);}
html+='<th colspan="5" style="width: auto">'+ dateHtml+'</th>';if(!maxDate||maxDate.isAfter(calendar[1][1])){html+='<th class="next available"><i class="icon-arrow-right glyphicon glyphicon-arrow-right"></i></th>';}else{html+='<th></th>';}
html+='</tr>';html+='<tr>';if(this.showWeekNumbers)
html+='<th class="week">'+ this.locale.weekLabel+'</th>';$.each(this.locale.daysOfWeek,function(index,dayOfWeek){html+='<th>'+ dayOfWeek+'</th>';});html+='</tr>';html+='</thead>';html+='<tbody>';for(var row=0;row<6;row++){html+='<tr>';if(this.showWeekNumbers)
html+='<td class="week">'+ calendar[row][0].week()+'</td>';for(var col=0;col<7;col++){var cname='available ';cname+=(calendar[row][col].month()==calendar[1][1].month())?'':'off';if((minDate&&calendar[row][col].isBefore(minDate))||(maxDate&&calendar[row][col].isAfter(maxDate))){cname=' off disabled ';}else if(calendar[row][col].format('YYYY-MM-DD')==selected.format('YYYY-MM-DD')){cname+=' active ';if(calendar[row][col].format('YYYY-MM-DD')==this.startDate.format('YYYY-MM-DD')){cname+=' start-date ';}
if(calendar[row][col].format('YYYY-MM-DD')==this.endDate.format('YYYY-MM-DD')){cname+=' end-date ';}}else if(calendar[row][col]>=this.startDate&&calendar[row][col]<=this.endDate){cname+=' in-range ';if(calendar[row][col].isSame(this.startDate)){cname+=' start-date ';}
if(calendar[row][col].isSame(this.endDate)){cname+=' end-date ';}}
var title='r'+ row+'c'+ col;html+='<td class="'+ cname.replace(/\s+/g,' ').replace(/^\s?(.*?)\s?$/,'$1')+'" data-title="'+ title+'">'+ calendar[row][col].date()+'</td>';}
html+='</tr>';}
html+='</tbody>';html+='</table>';html+='</div>';if(this.timePicker){html+='<div class="calendar-time">';html+='<select class="hourselect">';var start=0;var end=23;var selected_hour=selected.hour();if(this.timePicker12Hour){start=1;end=12;if(selected_hour>=12)
selected_hour-=12;if(selected_hour==0)
selected_hour=12;}
for(var i=start;i<=end;i++){if(i==selected_hour){html+='<option value="'+ i+'" selected="selected">'+ i+'</option>';}else{html+='<option value="'+ i+'">'+ i+'</option>';}}
html+='</select> : ';html+='<select class="minuteselect">';for(var i=0;i<60;i+=this.timePickerIncrement){var num=i;if(num<10)
num='0'+ num;if(i==selected.minute()){html+='<option value="'+ i+'" selected="selected">'+ num+'</option>';}else{html+='<option value="'+ i+'">'+ num+'</option>';}}
html+='</select> ';if(this.timePicker12Hour){html+='<select class="ampmselect">';if(selected.hour()>=12){html+='<option value="AM">AM</option><option value="PM" selected="selected">PM</option>';}else{html+='<option value="AM" selected="selected">AM</option><option value="PM">PM</option>';}
html+='</select>';}
html+='</div>';}
return html;}};$.fn.daterangepicker=function(options,cb){this.each(function(){var el=$(this);if(!el.data('daterangepicker'))
el.data('daterangepicker',new DateRangePicker(el,options,cb));});return this;};}(window.jQuery);
-138
View File
@@ -1,138 +0,0 @@
;(function(){function require(name){var module=require.modules[name];if(!module)throw new Error('failed to require "'+ name+'"');if(!('exports'in module)&&typeof module.definition==='function'){module.client=module.component=true;module.definition.call(this,module.exports={},module);delete module.definition;}
return module.exports;}
require.modules={};require.register=function(name,definition){require.modules[name]={definition:definition};};require.define=function(name,exports){require.modules[name]={exports:exports};};require.register("dropzone",function(exports,module){module.exports=require("dropzone/lib/dropzone.js");});require.register("dropzone/lib/dropzone.js",function(exports,module){(function(){var Dropzone,Emitter,camelize,contentLoaded,detectVerticalSquash,drawImageIOSFix,noop,without,__slice=[].slice,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child;};noop=function(){};Emitter=(function(){function Emitter(){}
Emitter.prototype.addEventListener=Emitter.prototype.on;Emitter.prototype.on=function(event,fn){this._callbacks=this._callbacks||{};if(!this._callbacks[event]){this._callbacks[event]=[];}
this._callbacks[event].push(fn);return this;};Emitter.prototype.emit=function(){var args,callback,callbacks,event,_i,_len;event=arguments[0],args=2<=arguments.length?__slice.call(arguments,1):[];this._callbacks=this._callbacks||{};callbacks=this._callbacks[event];if(callbacks){for(_i=0,_len=callbacks.length;_i<_len;_i++){callback=callbacks[_i];callback.apply(this,args);}}
return this;};Emitter.prototype.removeListener=Emitter.prototype.off;Emitter.prototype.removeAllListeners=Emitter.prototype.off;Emitter.prototype.removeEventListener=Emitter.prototype.off;Emitter.prototype.off=function(event,fn){var callback,callbacks,i,_i,_len;if(!this._callbacks||arguments.length===0){this._callbacks={};return this;}
callbacks=this._callbacks[event];if(!callbacks){return this;}
if(arguments.length===1){delete this._callbacks[event];return this;}
for(i=_i=0,_len=callbacks.length;_i<_len;i=++_i){callback=callbacks[i];if(callback===fn){callbacks.splice(i,1);break;}}
return this;};return Emitter;})();Dropzone=(function(_super){var extend,resolveOption;__extends(Dropzone,_super);Dropzone.prototype.Emitter=Emitter;Dropzone.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"];Dropzone.prototype.defaultOptions={url:null,method:"post",withCredentials:false,parallelUploads:2,uploadMultiple:false,maxFilesize:256,paramName:"file",createImageThumbnails:true,maxThumbnailFilesize:10,thumbnailWidth:100,thumbnailHeight:100,maxFiles:null,params:{},clickable:true,ignoreHiddenFiles:true,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:true,autoQueue:true,addRemoveLinks:false,previewsContainer:null,capture:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(file,done){return done();},init:function(){return noop;},forceFallback:false,fallback:function(){var child,messageElement,span,_i,_len,_ref;this.element.className=""+ this.element.className+" dz-browser-not-supported";_ref=this.element.getElementsByTagName("div");for(_i=0,_len=_ref.length;_i<_len;_i++){child=_ref[_i];if(/(^| )dz-message($| )/.test(child.className)){messageElement=child;child.className="dz-message";continue;}}
if(!messageElement){messageElement=Dropzone.createElement("<div class=\"dz-message\"><span></span></div>");this.element.appendChild(messageElement);}
span=messageElement.getElementsByTagName("span")[0];if(span){span.textContent=this.options.dictFallbackMessage;}
return this.element.appendChild(this.getFallbackForm());},resize:function(file){var info,srcRatio,trgRatio;info={srcX:0,srcY:0,srcWidth:file.width,srcHeight:file.height};srcRatio=file.width/file.height;info.optWidth=this.options.thumbnailWidth;info.optHeight=this.options.thumbnailHeight;if((info.optWidth==null)&&(info.optHeight==null)){info.optWidth=info.srcWidth;info.optHeight=info.srcHeight;}else if(info.optWidth==null){info.optWidth=srcRatio*info.optHeight;}else if(info.optHeight==null){info.optHeight=(1/srcRatio)*info.optWidth;}
trgRatio=info.optWidth/info.optHeight;if(file.height<info.optHeight||file.width<info.optWidth){info.trgHeight=info.srcHeight;info.trgWidth=info.srcWidth;}else{if(srcRatio>trgRatio){info.srcHeight=file.height;info.srcWidth=info.srcHeight*trgRatio;}else{info.srcWidth=file.width;info.srcHeight=info.srcWidth/trgRatio;}}
info.srcX=(file.width- info.srcWidth)/ 2;
info.srcY=(file.height- info.srcHeight)/ 2;
return info;},drop:function(e){return this.element.classList.remove("dz-drag-hover");},dragstart:noop,dragend:function(e){return this.element.classList.remove("dz-drag-hover");},dragenter:function(e){return this.element.classList.add("dz-drag-hover");},dragover:function(e){return this.element.classList.add("dz-drag-hover");},dragleave:function(e){return this.element.classList.remove("dz-drag-hover");},paste:noop,reset:function(){return this.element.classList.remove("dz-started");},addedfile:function(file){var node,removeFileEvent,removeLink,_i,_j,_k,_len,_len1,_len2,_ref,_ref1,_ref2,_results;if(this.element===this.previewsContainer){this.element.classList.add("dz-started");}
if(this.previewsContainer){file.previewElement=Dropzone.createElement(this.options.previewTemplate.trim());file.previewTemplate=file.previewElement;this.previewsContainer.appendChild(file.previewElement);_ref=file.previewElement.querySelectorAll("[data-dz-name]");for(_i=0,_len=_ref.length;_i<_len;_i++){node=_ref[_i];node.textContent=file.name;}
_ref1=file.previewElement.querySelectorAll("[data-dz-size]");for(_j=0,_len1=_ref1.length;_j<_len1;_j++){node=_ref1[_j];node.innerHTML=this.filesize(file.size);}
if(this.options.addRemoveLinks){file._removeLink=Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>"+ this.options.dictRemoveFile+"</a>");file.previewElement.appendChild(file._removeLink);}
removeFileEvent=(function(_this){return function(e){e.preventDefault();e.stopPropagation();if(file.status===Dropzone.UPLOADING){return Dropzone.confirm(_this.options.dictCancelUploadConfirmation,function(){return _this.removeFile(file);});}else{if(_this.options.dictRemoveFileConfirmation){return Dropzone.confirm(_this.options.dictRemoveFileConfirmation,function(){return _this.removeFile(file);});}else{return _this.removeFile(file);}}};})(this);_ref2=file.previewElement.querySelectorAll("[data-dz-remove]");_results=[];for(_k=0,_len2=_ref2.length;_k<_len2;_k++){removeLink=_ref2[_k];_results.push(removeLink.addEventListener("click",removeFileEvent));}
return _results;}},removedfile:function(file){var _ref;if(file.previewElement){if((_ref=file.previewElement)!=null){_ref.parentNode.removeChild(file.previewElement);}}
return this._updateMaxFilesReachedClass();},thumbnail:function(file,dataUrl){var thumbnailElement,_i,_len,_ref,_results;if(file.previewElement){file.previewElement.classList.remove("dz-file-preview");file.previewElement.classList.add("dz-image-preview");_ref=file.previewElement.querySelectorAll("[data-dz-thumbnail]");_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){thumbnailElement=_ref[_i];thumbnailElement.alt=file.name;_results.push(thumbnailElement.src=dataUrl);}
return _results;}},error:function(file,message){var node,_i,_len,_ref,_results;if(file.previewElement){file.previewElement.classList.add("dz-error");if(typeof message!=="String"&&message.error){message=message.error;}
_ref=file.previewElement.querySelectorAll("[data-dz-errormessage]");_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){node=_ref[_i];_results.push(node.textContent=message);}
return _results;}},errormultiple:noop,processing:function(file){if(file.previewElement){file.previewElement.classList.add("dz-processing");if(file._removeLink){return file._removeLink.textContent=this.options.dictCancelUpload;}}},processingmultiple:noop,uploadprogress:function(file,progress,bytesSent){var node,_i,_len,_ref,_results;if(file.previewElement){_ref=file.previewElement.querySelectorAll("[data-dz-uploadprogress]");_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){node=_ref[_i];if(node.nodeName==='PROGRESS'){_results.push(node.value=progress);}else{_results.push(node.style.width=""+ progress+"%");}}
return _results;}},totaluploadprogress:noop,sending:noop,sendingmultiple:noop,success:function(file){if(file.previewElement){return file.previewElement.classList.add("dz-success");}},successmultiple:noop,canceled:function(file){return this.emit("error",file,"Upload canceled.");},canceledmultiple:noop,complete:function(file){if(file._removeLink){return file._removeLink.textContent=this.options.dictRemoveFile;}},completemultiple:noop,maxfilesexceeded:noop,maxfilesreached:noop,queuecomplete:noop,previewTemplate:"<div class=\"dz-preview dz-file-preview\">\n <div class=\"dz-details\">\n <div class=\"dz-filename\"><span data-dz-name></span></div>\n <div class=\"dz-size\" data-dz-size></div>\n <img data-dz-thumbnail />\n </div>\n <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n <div class=\"dz-success-mark\"><span>✔</span></div>\n <div class=\"dz-error-mark\"><span>✘</span></div>\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n</div>"};extend=function(){var key,object,objects,target,val,_i,_len;target=arguments[0],objects=2<=arguments.length?__slice.call(arguments,1):[];for(_i=0,_len=objects.length;_i<_len;_i++){object=objects[_i];for(key in object){val=object[key];target[key]=val;}}
return target;};function Dropzone(element,options){var elementOptions,fallback,_ref;this.element=element;this.version=Dropzone.version;this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,"");this.clickableElements=[];this.listeners=[];this.files=[];if(typeof this.element==="string"){this.element=document.querySelector(this.element);}
if(!(this.element&&(this.element.nodeType!=null))){throw new Error("Invalid dropzone element.");}
if(this.element.dropzone){throw new Error("Dropzone already attached.");}
Dropzone.instances.push(this);this.element.dropzone=this;elementOptions=(_ref=Dropzone.optionsForElement(this.element))!=null?_ref:{};this.options=extend({},this.defaultOptions,elementOptions,options!=null?options:{});if(this.options.forceFallback||!Dropzone.isBrowserSupported()){return this.options.fallback.call(this);}
if(this.options.url==null){this.options.url=this.element.getAttribute("action");}
if(!this.options.url){throw new Error("No URL provided.");}
if(this.options.acceptedFiles&&this.options.acceptedMimeTypes){throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");}
if(this.options.acceptedMimeTypes){this.options.acceptedFiles=this.options.acceptedMimeTypes;delete this.options.acceptedMimeTypes;}
this.options.method=this.options.method.toUpperCase();if((fallback=this.getExistingFallback())&&fallback.parentNode){fallback.parentNode.removeChild(fallback);}
if(this.options.previewsContainer!==false){if(this.options.previewsContainer){this.previewsContainer=Dropzone.getElement(this.options.previewsContainer,"previewsContainer");}else{this.previewsContainer=this.element;}}
if(this.options.clickable){if(this.options.clickable===true){this.clickableElements=[this.element];}else{this.clickableElements=Dropzone.getElements(this.options.clickable,"clickable");}}
this.init();}
Dropzone.prototype.getAcceptedFiles=function(){var file,_i,_len,_ref,_results;_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(file.accepted){_results.push(file);}}
return _results;};Dropzone.prototype.getRejectedFiles=function(){var file,_i,_len,_ref,_results;_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(!file.accepted){_results.push(file);}}
return _results;};Dropzone.prototype.getFilesWithStatus=function(status){var file,_i,_len,_ref,_results;_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(file.status===status){_results.push(file);}}
return _results;};Dropzone.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(Dropzone.QUEUED);};Dropzone.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(Dropzone.UPLOADING);};Dropzone.prototype.getActiveFiles=function(){var file,_i,_len,_ref,_results;_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(file.status===Dropzone.UPLOADING||file.status===Dropzone.QUEUED){_results.push(file);}}
return _results;};Dropzone.prototype.init=function(){var eventName,noPropagation,setupHiddenFileInput,_i,_len,_ref,_ref1;if(this.element.tagName==="form"){this.element.setAttribute("enctype","multipart/form-data");}
if(this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")){this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><span>"+ this.options.dictDefaultMessage+"</span></div>"));}
if(this.clickableElements.length){setupHiddenFileInput=(function(_this){return function(){if(_this.hiddenFileInput){document.body.removeChild(_this.hiddenFileInput);}
_this.hiddenFileInput=document.createElement("input");_this.hiddenFileInput.setAttribute("type","file");if((_this.options.maxFiles==null)||_this.options.maxFiles>1){_this.hiddenFileInput.setAttribute("multiple","multiple");}
_this.hiddenFileInput.className="dz-hidden-input";if(_this.options.acceptedFiles!=null){_this.hiddenFileInput.setAttribute("accept",_this.options.acceptedFiles);}
if(_this.options.capture!=null){_this.hiddenFileInput.setAttribute("capture",_this.options.capture);}
_this.hiddenFileInput.style.visibility="hidden";_this.hiddenFileInput.style.position="absolute";_this.hiddenFileInput.style.top="0";_this.hiddenFileInput.style.left="0";_this.hiddenFileInput.style.height="0";_this.hiddenFileInput.style.width="0";document.body.appendChild(_this.hiddenFileInput);return _this.hiddenFileInput.addEventListener("change",function(){var file,files,_i,_len;files=_this.hiddenFileInput.files;if(files.length){for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];_this.addFile(file);}}
return setupHiddenFileInput();});};})(this);setupHiddenFileInput();}
this.URL=(_ref=window.URL)!=null?_ref:window.webkitURL;_ref1=this.events;for(_i=0,_len=_ref1.length;_i<_len;_i++){eventName=_ref1[_i];this.on(eventName,this.options[eventName]);}
this.on("uploadprogress",(function(_this){return function(){return _this.updateTotalUploadProgress();};})(this));this.on("removedfile",(function(_this){return function(){return _this.updateTotalUploadProgress();};})(this));this.on("canceled",(function(_this){return function(file){return _this.emit("complete",file);};})(this));this.on("complete",(function(_this){return function(file){if(_this.getUploadingFiles().length===0&&_this.getQueuedFiles().length===0){return setTimeout((function(){return _this.emit("queuecomplete");}),0);}};})(this));noPropagation=function(e){e.stopPropagation();if(e.preventDefault){return e.preventDefault();}else{return e.returnValue=false;}};this.listeners=[{element:this.element,events:{"dragstart":(function(_this){return function(e){return _this.emit("dragstart",e);};})(this),"dragenter":(function(_this){return function(e){noPropagation(e);return _this.emit("dragenter",e);};})(this),"dragover":(function(_this){return function(e){var efct;try{efct=e.dataTransfer.effectAllowed;}catch(_error){}
e.dataTransfer.dropEffect='move'===efct||'linkMove'===efct?'move':'copy';noPropagation(e);return _this.emit("dragover",e);};})(this),"dragleave":(function(_this){return function(e){return _this.emit("dragleave",e);};})(this),"drop":(function(_this){return function(e){noPropagation(e);return _this.drop(e);};})(this),"dragend":(function(_this){return function(e){return _this.emit("dragend",e);};})(this)}}];this.clickableElements.forEach((function(_this){return function(clickableElement){return _this.listeners.push({element:clickableElement,events:{"click":function(evt){if((clickableElement!==_this.element)||(evt.target===_this.element||Dropzone.elementInside(evt.target,_this.element.querySelector(".dz-message")))){return _this.hiddenFileInput.click();}}}});};})(this));this.enable();return this.options.init.call(this);};Dropzone.prototype.destroy=function(){var _ref;this.disable();this.removeAllFiles(true);if((_ref=this.hiddenFileInput)!=null?_ref.parentNode:void 0){this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);this.hiddenFileInput=null;}
delete this.element.dropzone;return Dropzone.instances.splice(Dropzone.instances.indexOf(this),1);};Dropzone.prototype.updateTotalUploadProgress=function(){var activeFiles,file,totalBytes,totalBytesSent,totalUploadProgress,_i,_len,_ref;totalBytesSent=0;totalBytes=0;activeFiles=this.getActiveFiles();if(activeFiles.length){_ref=this.getActiveFiles();for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];totalBytesSent+=file.upload.bytesSent;totalBytes+=file.upload.total;}
totalUploadProgress=100*totalBytesSent/totalBytes;}else{totalUploadProgress=100;}
return this.emit("totaluploadprogress",totalUploadProgress,totalBytes,totalBytesSent);};Dropzone.prototype._getParamName=function(n){if(typeof this.options.paramName==="function"){return this.options.paramName(n);}else{return""+ this.options.paramName+(this.options.uploadMultiple?"["+ n+"]":"");}};Dropzone.prototype.getFallbackForm=function(){var existingFallback,fields,fieldsString,form;if(existingFallback=this.getExistingFallback()){return existingFallback;}
fieldsString="<div class=\"dz-fallback\">";if(this.options.dictFallbackText){fieldsString+="<p>"+ this.options.dictFallbackText+"</p>";}
fieldsString+="<input type=\"file\" name=\""+(this._getParamName(0))+"\" "+(this.options.uploadMultiple?'multiple="multiple"':void 0)+" /><input type=\"submit\" value=\"Upload!\"></div>";fields=Dropzone.createElement(fieldsString);if(this.element.tagName!=="FORM"){form=Dropzone.createElement("<form action=\""+ this.options.url+"\" enctype=\"multipart/form-data\" method=\""+ this.options.method+"\"></form>");form.appendChild(fields);}else{this.element.setAttribute("enctype","multipart/form-data");this.element.setAttribute("method",this.options.method);}
return form!=null?form:fields;};Dropzone.prototype.getExistingFallback=function(){var fallback,getFallback,tagName,_i,_len,_ref;getFallback=function(elements){var el,_i,_len;for(_i=0,_len=elements.length;_i<_len;_i++){el=elements[_i];if(/(^| )fallback($| )/.test(el.className)){return el;}}};_ref=["div","form"];for(_i=0,_len=_ref.length;_i<_len;_i++){tagName=_ref[_i];if(fallback=getFallback(this.element.getElementsByTagName(tagName))){return fallback;}}};Dropzone.prototype.setupEventListeners=function(){var elementListeners,event,listener,_i,_len,_ref,_results;_ref=this.listeners;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){elementListeners=_ref[_i];_results.push((function(){var _ref1,_results1;_ref1=elementListeners.events;_results1=[];for(event in _ref1){listener=_ref1[event];_results1.push(elementListeners.element.addEventListener(event,listener,false));}
return _results1;})());}
return _results;};Dropzone.prototype.removeEventListeners=function(){var elementListeners,event,listener,_i,_len,_ref,_results;_ref=this.listeners;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){elementListeners=_ref[_i];_results.push((function(){var _ref1,_results1;_ref1=elementListeners.events;_results1=[];for(event in _ref1){listener=_ref1[event];_results1.push(elementListeners.element.removeEventListener(event,listener,false));}
return _results1;})());}
return _results;};Dropzone.prototype.disable=function(){var file,_i,_len,_ref,_results;this.clickableElements.forEach(function(element){return element.classList.remove("dz-clickable");});this.removeEventListeners();_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];_results.push(this.cancelUpload(file));}
return _results;};Dropzone.prototype.enable=function(){this.clickableElements.forEach(function(element){return element.classList.add("dz-clickable");});return this.setupEventListeners();};Dropzone.prototype.filesize=function(size){var string;if(size>=1024*1024*1024*1024/10){size=size/(1024*1024*1024*1024/10);string="TiB";}else if(size>=1024*1024*1024/10){size=size/(1024*1024*1024/10);string="GiB";}else if(size>=1024*1024/10){size=size/(1024*1024/10);string="MiB";}else if(size>=1024/10){size=size/(1024/10);string="KiB";}else{size=size*10;string="b";}
return"<strong>"+(Math.round(size)/ 10) + "</strong> " + string;
};Dropzone.prototype._updateMaxFilesReachedClass=function(){if((this.options.maxFiles!=null)&&this.getAcceptedFiles().length>=this.options.maxFiles){if(this.getAcceptedFiles().length===this.options.maxFiles){this.emit('maxfilesreached',this.files);}
return this.element.classList.add("dz-max-files-reached");}else{return this.element.classList.remove("dz-max-files-reached");}};Dropzone.prototype.drop=function(e){var files,items;if(!e.dataTransfer){return;}
this.emit("drop",e);files=e.dataTransfer.files;if(files.length){items=e.dataTransfer.items;if(items&&items.length&&(items[0].webkitGetAsEntry!=null)){this._addFilesFromItems(items);}else{this.handleFiles(files);}}};Dropzone.prototype.paste=function(e){var items,_ref;if((e!=null?(_ref=e.clipboardData)!=null?_ref.items:void 0:void 0)==null){return;}
this.emit("paste",e);items=e.clipboardData.items;if(items.length){return this._addFilesFromItems(items);}};Dropzone.prototype.handleFiles=function(files){var file,_i,_len,_results;_results=[];for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];_results.push(this.addFile(file));}
return _results;};Dropzone.prototype._addFilesFromItems=function(items){var entry,item,_i,_len,_results;_results=[];for(_i=0,_len=items.length;_i<_len;_i++){item=items[_i];if((item.webkitGetAsEntry!=null)&&(entry=item.webkitGetAsEntry())){if(entry.isFile){_results.push(this.addFile(item.getAsFile()));}else if(entry.isDirectory){_results.push(this._addFilesFromDirectory(entry,entry.name));}else{_results.push(void 0);}}else if(item.getAsFile!=null){if((item.kind==null)||item.kind==="file"){_results.push(this.addFile(item.getAsFile()));}else{_results.push(void 0);}}else{_results.push(void 0);}}
return _results;};Dropzone.prototype._addFilesFromDirectory=function(directory,path){var dirReader,entriesReader;dirReader=directory.createReader();entriesReader=(function(_this){return function(entries){var entry,_i,_len;for(_i=0,_len=entries.length;_i<_len;_i++){entry=entries[_i];if(entry.isFile){entry.file(function(file){if(_this.options.ignoreHiddenFiles&&file.name.substring(0,1)==='.'){return;}
file.fullPath=""+ path+"/"+ file.name;return _this.addFile(file);});}else if(entry.isDirectory){_this._addFilesFromDirectory(entry,""+ path+"/"+ entry.name);}}};})(this);return dirReader.readEntries(entriesReader,function(error){return typeof console!=="undefined"&&console!==null?typeof console.log==="function"?console.log(error):void 0:void 0;});};Dropzone.prototype.accept=function(file,done){if(file.size>this.options.maxFilesize*1024*1024){return done(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(file.size/1024/10.24)/ 100).replace("{{maxFilesize}}", this.options.maxFilesize));
}else if(!Dropzone.isValidFile(file,this.options.acceptedFiles)){return done(this.options.dictInvalidFileType);}else if((this.options.maxFiles!=null)&&this.getAcceptedFiles().length>=this.options.maxFiles){done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles));return this.emit("maxfilesexceeded",file);}else{return this.options.accept.call(this,file,done);}};Dropzone.prototype.addFile=function(file){file.upload={progress:0,total:file.size,bytesSent:0};this.files.push(file);file.status=Dropzone.ADDED;this.emit("addedfile",file);this._enqueueThumbnail(file);return this.accept(file,(function(_this){return function(error){if(error){file.accepted=false;_this._errorProcessing([file],error);}else{file.accepted=true;if(_this.options.autoQueue){_this.enqueueFile(file);}}
return _this._updateMaxFilesReachedClass();};})(this));};Dropzone.prototype.enqueueFiles=function(files){var file,_i,_len;for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];this.enqueueFile(file);}
return null;};Dropzone.prototype.enqueueFile=function(file){if(file.status===Dropzone.ADDED&&file.accepted===true){file.status=Dropzone.QUEUED;if(this.options.autoProcessQueue){return setTimeout(((function(_this){return function(){return _this.processQueue();};})(this)),0);}}else{throw new Error("This file can't be queued because it has already been processed or was rejected.");}};Dropzone.prototype._thumbnailQueue=[];Dropzone.prototype._processingThumbnail=false;Dropzone.prototype._enqueueThumbnail=function(file){if(this.options.createImageThumbnails&&file.type.match(/image.*/)&&file.size<=this.options.maxThumbnailFilesize*1024*1024){this._thumbnailQueue.push(file);return setTimeout(((function(_this){return function(){return _this._processThumbnailQueue();};})(this)),0);}};Dropzone.prototype._processThumbnailQueue=function(){if(this._processingThumbnail||this._thumbnailQueue.length===0){return;}
this._processingThumbnail=true;return this.createThumbnail(this._thumbnailQueue.shift(),(function(_this){return function(){_this._processingThumbnail=false;return _this._processThumbnailQueue();};})(this));};Dropzone.prototype.removeFile=function(file){if(file.status===Dropzone.UPLOADING){this.cancelUpload(file);}
this.files=without(this.files,file);this.emit("removedfile",file);if(this.files.length===0){return this.emit("reset");}};Dropzone.prototype.removeAllFiles=function(cancelIfNecessary){var file,_i,_len,_ref;if(cancelIfNecessary==null){cancelIfNecessary=false;}
_ref=this.files.slice();for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(file.status!==Dropzone.UPLOADING||cancelIfNecessary){this.removeFile(file);}}
return null;};Dropzone.prototype.createThumbnail=function(file,callback){var fileReader;fileReader=new FileReader;fileReader.onload=(function(_this){return function(){var img;if(file.type==="image/svg+xml"){_this.emit("thumbnail",file,fileReader.result);if(callback!=null){callback();}
return;}
img=document.createElement("img");img.onload=function(){var canvas,ctx,resizeInfo,thumbnail,_ref,_ref1,_ref2,_ref3;file.width=img.width;file.height=img.height;resizeInfo=_this.options.resize.call(_this,file);if(resizeInfo.trgWidth==null){resizeInfo.trgWidth=resizeInfo.optWidth;}
if(resizeInfo.trgHeight==null){resizeInfo.trgHeight=resizeInfo.optHeight;}
canvas=document.createElement("canvas");ctx=canvas.getContext("2d");canvas.width=resizeInfo.trgWidth;canvas.height=resizeInfo.trgHeight;drawImageIOSFix(ctx,img,(_ref=resizeInfo.srcX)!=null?_ref:0,(_ref1=resizeInfo.srcY)!=null?_ref1:0,resizeInfo.srcWidth,resizeInfo.srcHeight,(_ref2=resizeInfo.trgX)!=null?_ref2:0,(_ref3=resizeInfo.trgY)!=null?_ref3:0,resizeInfo.trgWidth,resizeInfo.trgHeight);thumbnail=canvas.toDataURL("image/png");_this.emit("thumbnail",file,thumbnail);if(callback!=null){return callback();}};return img.src=fileReader.result;};})(this);return fileReader.readAsDataURL(file);};Dropzone.prototype.processQueue=function(){var i,parallelUploads,processingLength,queuedFiles;parallelUploads=this.options.parallelUploads;processingLength=this.getUploadingFiles().length;i=processingLength;if(processingLength>=parallelUploads){return;}
queuedFiles=this.getQueuedFiles();if(!(queuedFiles.length>0)){return;}
if(this.options.uploadMultiple){return this.processFiles(queuedFiles.slice(0,parallelUploads- processingLength));}else{while(i<parallelUploads){if(!queuedFiles.length){return;}
this.processFile(queuedFiles.shift());i++;}}};Dropzone.prototype.processFile=function(file){return this.processFiles([file]);};Dropzone.prototype.processFiles=function(files){var file,_i,_len;for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];file.processing=true;file.status=Dropzone.UPLOADING;this.emit("processing",file);}
if(this.options.uploadMultiple){this.emit("processingmultiple",files);}
return this.uploadFiles(files);};Dropzone.prototype._getFilesWithXhr=function(xhr){var file,files;return files=(function(){var _i,_len,_ref,_results;_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(file.xhr===xhr){_results.push(file);}}
return _results;}).call(this);};Dropzone.prototype.cancelUpload=function(file){var groupedFile,groupedFiles,_i,_j,_len,_len1,_ref;if(file.status===Dropzone.UPLOADING){groupedFiles=this._getFilesWithXhr(file.xhr);for(_i=0,_len=groupedFiles.length;_i<_len;_i++){groupedFile=groupedFiles[_i];groupedFile.status=Dropzone.CANCELED;}
file.xhr.abort();for(_j=0,_len1=groupedFiles.length;_j<_len1;_j++){groupedFile=groupedFiles[_j];this.emit("canceled",groupedFile);}
if(this.options.uploadMultiple){this.emit("canceledmultiple",groupedFiles);}}else if((_ref=file.status)===Dropzone.ADDED||_ref===Dropzone.QUEUED){file.status=Dropzone.CANCELED;this.emit("canceled",file);if(this.options.uploadMultiple){this.emit("canceledmultiple",[file]);}}
if(this.options.autoProcessQueue){return this.processQueue();}};resolveOption=function(){var args,option;option=arguments[0],args=2<=arguments.length?__slice.call(arguments,1):[];if(typeof option==='function'){return option.apply(this,args);}
return option;};Dropzone.prototype.uploadFile=function(file){return this.uploadFiles([file]);};Dropzone.prototype.uploadFiles=function(files){var file,formData,handleError,headerName,headerValue,headers,i,input,inputName,inputType,key,method,option,progressObj,response,updateProgress,url,value,xhr,_i,_j,_k,_l,_len,_len1,_len2,_len3,_m,_ref,_ref1,_ref2,_ref3,_ref4,_ref5;xhr=new XMLHttpRequest();for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];file.xhr=xhr;}
method=resolveOption(this.options.method,files);url=resolveOption(this.options.url,files);xhr.open(method,url,true);xhr.withCredentials=!!this.options.withCredentials;response=null;handleError=(function(_this){return function(){var _j,_len1,_results;_results=[];for(_j=0,_len1=files.length;_j<_len1;_j++){file=files[_j];_results.push(_this._errorProcessing(files,response||_this.options.dictResponseError.replace("{{statusCode}}",xhr.status),xhr));}
return _results;};})(this);updateProgress=(function(_this){return function(e){var allFilesFinished,progress,_j,_k,_l,_len1,_len2,_len3,_results;if(e!=null){progress=100*e.loaded/e.total;for(_j=0,_len1=files.length;_j<_len1;_j++){file=files[_j];file.upload={progress:progress,total:e.total,bytesSent:e.loaded};}}else{allFilesFinished=true;progress=100;for(_k=0,_len2=files.length;_k<_len2;_k++){file=files[_k];if(!(file.upload.progress===100&&file.upload.bytesSent===file.upload.total)){allFilesFinished=false;}
file.upload.progress=progress;file.upload.bytesSent=file.upload.total;}
if(allFilesFinished){return;}}
_results=[];for(_l=0,_len3=files.length;_l<_len3;_l++){file=files[_l];_results.push(_this.emit("uploadprogress",file,progress,file.upload.bytesSent));}
return _results;};})(this);xhr.onload=(function(_this){return function(e){var _ref;if(files[0].status===Dropzone.CANCELED){return;}
if(xhr.readyState!==4){return;}
response=xhr.responseText;if(xhr.getResponseHeader("content-type")&&~xhr.getResponseHeader("content-type").indexOf("application/json")){try{response=JSON.parse(response);}catch(_error){e=_error;response="Invalid JSON response from server.";}}
updateProgress();if(!((200<=(_ref=xhr.status)&&_ref<300))){return handleError();}else{return _this._finished(files,response,e);}};})(this);xhr.onerror=(function(_this){return function(){if(files[0].status===Dropzone.CANCELED){return;}
return handleError();};})(this);progressObj=(_ref=xhr.upload)!=null?_ref:xhr;progressObj.onprogress=updateProgress;headers={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};if(this.options.headers){extend(headers,this.options.headers);}
for(headerName in headers){headerValue=headers[headerName];xhr.setRequestHeader(headerName,headerValue);}
formData=new FormData();if(this.options.params){_ref1=this.options.params;for(key in _ref1){value=_ref1[key];formData.append(key,value);}}
for(_j=0,_len1=files.length;_j<_len1;_j++){file=files[_j];this.emit("sending",file,xhr,formData);}
if(this.options.uploadMultiple){this.emit("sendingmultiple",files,xhr,formData);}
if(this.element.tagName==="FORM"){_ref2=this.element.querySelectorAll("input, textarea, select, button");for(_k=0,_len2=_ref2.length;_k<_len2;_k++){input=_ref2[_k];inputName=input.getAttribute("name");inputType=input.getAttribute("type");if(input.tagName==="SELECT"&&input.hasAttribute("multiple")){_ref3=input.options;for(_l=0,_len3=_ref3.length;_l<_len3;_l++){option=_ref3[_l];if(option.selected){formData.append(inputName,option.value);}}}else if(!inputType||((_ref4=inputType.toLowerCase())!=="checkbox"&&_ref4!=="radio")||input.checked){formData.append(inputName,input.value);}}}
for(i=_m=0,_ref5=files.length- 1;0<=_ref5?_m<=_ref5:_m>=_ref5;i=0<=_ref5?++_m:--_m){formData.append(this._getParamName(i),files[i],files[i].name);}
return xhr.send(formData);};Dropzone.prototype._finished=function(files,responseText,e){var file,_i,_len;for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];file.status=Dropzone.SUCCESS;this.emit("success",file,responseText,e);this.emit("complete",file);}
if(this.options.uploadMultiple){this.emit("successmultiple",files,responseText,e);this.emit("completemultiple",files);}
if(this.options.autoProcessQueue){return this.processQueue();}};Dropzone.prototype._errorProcessing=function(files,message,xhr){var file,_i,_len;for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];file.status=Dropzone.ERROR;this.emit("error",file,message,xhr);this.emit("complete",file);}
if(this.options.uploadMultiple){this.emit("errormultiple",files,message,xhr);this.emit("completemultiple",files);}
if(this.options.autoProcessQueue){return this.processQueue();}};return Dropzone;})(Emitter);Dropzone.version="3.12.0";Dropzone.options={};Dropzone.optionsForElement=function(element){if(element.getAttribute("id")){return Dropzone.options[camelize(element.getAttribute("id"))];}else{return void 0;}};Dropzone.instances=[];Dropzone.forElement=function(element){if(typeof element==="string"){element=document.querySelector(element);}
if((element!=null?element.dropzone:void 0)==null){throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");}
return element.dropzone;};Dropzone.autoDiscover=true;Dropzone.discover=function(){var checkElements,dropzone,dropzones,_i,_len,_results;if(document.querySelectorAll){dropzones=document.querySelectorAll(".dropzone");}else{dropzones=[];checkElements=function(elements){var el,_i,_len,_results;_results=[];for(_i=0,_len=elements.length;_i<_len;_i++){el=elements[_i];if(/(^| )dropzone($| )/.test(el.className)){_results.push(dropzones.push(el));}else{_results.push(void 0);}}
return _results;};checkElements(document.getElementsByTagName("div"));checkElements(document.getElementsByTagName("form"));}
_results=[];for(_i=0,_len=dropzones.length;_i<_len;_i++){dropzone=dropzones[_i];if(Dropzone.optionsForElement(dropzone)!==false){_results.push(new Dropzone(dropzone));}else{_results.push(void 0);}}
return _results;};Dropzone.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i];Dropzone.isBrowserSupported=function(){var capableBrowser,regex,_i,_len,_ref;capableBrowser=true;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector){if(!("classList"in document.createElement("a"))){capableBrowser=false;}else{_ref=Dropzone.blacklistedBrowsers;for(_i=0,_len=_ref.length;_i<_len;_i++){regex=_ref[_i];if(regex.test(navigator.userAgent)){capableBrowser=false;continue;}}}}else{capableBrowser=false;}
return capableBrowser;};without=function(list,rejectedItem){var item,_i,_len,_results;_results=[];for(_i=0,_len=list.length;_i<_len;_i++){item=list[_i];if(item!==rejectedItem){_results.push(item);}}
return _results;};camelize=function(str){return str.replace(/[\-_](\w)/g,function(match){return match.charAt(1).toUpperCase();});};Dropzone.createElement=function(string){var div;div=document.createElement("div");div.innerHTML=string;return div.childNodes[0];};Dropzone.elementInside=function(element,container){if(element===container){return true;}
while(element=element.parentNode){if(element===container){return true;}}
return false;};Dropzone.getElement=function(el,name){var element;if(typeof el==="string"){element=document.querySelector(el);}else if(el.nodeType!=null){element=el;}
if(element==null){throw new Error("Invalid `"+ name+"` option provided. Please provide a CSS selector or a plain HTML element.");}
return element;};Dropzone.getElements=function(els,name){var e,el,elements,_i,_j,_len,_len1,_ref;if(els instanceof Array){elements=[];try{for(_i=0,_len=els.length;_i<_len;_i++){el=els[_i];elements.push(this.getElement(el,name));}}catch(_error){e=_error;elements=null;}}else if(typeof els==="string"){elements=[];_ref=document.querySelectorAll(els);for(_j=0,_len1=_ref.length;_j<_len1;_j++){el=_ref[_j];elements.push(el);}}else if(els.nodeType!=null){elements=[els];}
if(!((elements!=null)&&elements.length)){throw new Error("Invalid `"+ name+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");}
return elements;};Dropzone.confirm=function(question,accepted,rejected){if(window.confirm(question)){return accepted();}else if(rejected!=null){return rejected();}};Dropzone.isValidFile=function(file,acceptedFiles){var baseMimeType,mimeType,validType,_i,_len;if(!acceptedFiles){return true;}
acceptedFiles=acceptedFiles.split(",");mimeType=file.type;baseMimeType=mimeType.replace(/\/.*$/,"");for(_i=0,_len=acceptedFiles.length;_i<_len;_i++){validType=acceptedFiles[_i];validType=validType.trim();if(validType.charAt(0)==="."){if(file.name.toLowerCase().indexOf(validType.toLowerCase(),file.name.length- validType.length)!==-1){return true;}}else if(/\/\*$/.test(validType)){if(baseMimeType===validType.replace(/\/.*$/,"")){return true;}}else{if(mimeType===validType){return true;}}}
return false;};if(typeof jQuery!=="undefined"&&jQuery!==null){jQuery.fn.dropzone=function(options){return this.each(function(){return new Dropzone(this,options);});};}
if(typeof module!=="undefined"&&module!==null){module.exports=Dropzone;}else{window.Dropzone=Dropzone;}
Dropzone.ADDED="added";Dropzone.QUEUED="queued";Dropzone.ACCEPTED=Dropzone.QUEUED;Dropzone.UPLOADING="uploading";Dropzone.PROCESSING=Dropzone.UPLOADING;Dropzone.CANCELED="canceled";Dropzone.ERROR="error";Dropzone.SUCCESS="success";detectVerticalSquash=function(img){var alpha,canvas,ctx,data,ey,ih,iw,py,ratio,sy;iw=img.naturalWidth;ih=img.naturalHeight;canvas=document.createElement("canvas");canvas.width=1;canvas.height=ih;ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);data=ctx.getImageData(0,0,1,ih).data;sy=0;ey=ih;py=ih;while(py>sy){alpha=data[(py- 1)*4+ 3];if(alpha===0){ey=py;}else{sy=py;}
py=(ey+ sy)>>1;}
ratio=py/ih;if(ratio===0){return 1;}else{return ratio;}};drawImageIOSFix=function(ctx,img,sx,sy,sw,sh,dx,dy,dw,dh){var vertSquashRatio;vertSquashRatio=detectVerticalSquash(img);return ctx.drawImage(img,sx,sy,sw,sh,dx,dy,dw,dh/vertSquashRatio);};contentLoaded=function(win,fn){var add,doc,done,init,poll,pre,rem,root,top;done=false;top=true;doc=win.document;root=doc.documentElement;add=(doc.addEventListener?"addEventListener":"attachEvent");rem=(doc.addEventListener?"removeEventListener":"detachEvent");pre=(doc.addEventListener?"":"on");init=function(e){if(e.type==="readystatechange"&&doc.readyState!=="complete"){return;}
(e.type==="load"?win:doc)[rem](pre+ e.type,init,false);if(!done&&(done=true)){return fn.call(win,e.type||e);}};poll=function(){var e;try{root.doScroll("left");}catch(_error){e=_error;setTimeout(poll,50);return;}
return init("poll");};if(doc.readyState!=="complete"){if(doc.createEventObject&&root.doScroll){try{top=!win.frameElement;}catch(_error){}
if(top){poll();}}
doc[add](pre+"DOMContentLoaded",init,false);doc[add](pre+"readystatechange",init,false);return win[add](pre+"load",init,false);}};Dropzone._autoDiscoverFunction=function(){if(Dropzone.autoDiscover){return Dropzone.discover();}};contentLoaded(window,Dropzone._autoDiscoverFunction);}).call(this);});if(typeof exports=="object"){module.exports=require("dropzone");}else if(typeof define=="function"&&define.amd){define([],function(){return require("dropzone");});}else{this["Dropzone"]=require("dropzone");}})()
File diff suppressed because one or more lines are too long
@@ -1,23 +0,0 @@
function downV3(event,g,context){context.initializeMouseDown(event,g,context);if(event.altKey||event.shiftKey){Dygraph.startZoom(event,g,context);}else{Dygraph.startPan(event,g,context);}}
function moveV3(event,g,context){if(context.isPanning){Dygraph.movePan(event,g,context);}else if(context.isZooming){Dygraph.moveZoom(event,g,context);}}
function upV3(event,g,context){if(context.isPanning){Dygraph.endPan(event,g,context);}else if(context.isZooming){Dygraph.endZoom(event,g,context);}}
function offsetToPercentage(g,offsetX,offsetY){var xOffset=g.toDomCoords(g.xAxisRange()[0],null)[0];var yar0=g.yAxisRange(0);var yOffset=g.toDomCoords(null,yar0[1])[1];var x=offsetX- xOffset;var y=offsetY- yOffset;var w=g.toDomCoords(g.xAxisRange()[1],null)[0]- xOffset;var h=g.toDomCoords(null,yar0[0])[1]- yOffset;var xPct=w==0?0:(x/w);var yPct=h==0?0:(y/h);return[xPct,(1-yPct)];}
function dblClickV3(event,g,context){if(!(event.offsetX&&event.offsetY)){event.offsetX=event.layerX- event.target.offsetLeft;event.offsetY=event.layerY- event.target.offsetTop;}
var percentages=offsetToPercentage(g,event.offsetX,event.offsetY);var xPct=percentages[0];var yPct=percentages[1];if(event.ctrlKey){zoom(g,-.25,xPct,yPct);}else{zoom(g,+.2,xPct,yPct);}}
var lastClickedGraph=null;function clickV3(event,g,context){lastClickedGraph=g;Dygraph.cancelEvent(event);}
function scrollV3(event,g,context){if(lastClickedGraph!=g){return;}
var normal=event.detail?event.detail*-1:event.wheelDelta/40;var percentage=normal/50;if(!(event.offsetX&&event.offsetY)){event.offsetX=event.layerX- event.target.offsetLeft;event.offsetY=event.layerY- event.target.offsetTop;}
var percentages=offsetToPercentage(g,event.offsetX,event.offsetY);var xPct=percentages[0];var yPct=percentages[1];zoom(g,percentage,xPct,yPct);Dygraph.cancelEvent(event);}
function zoom(g,zoomInPercentage,xBias,yBias){xBias=xBias||0.5;yBias=yBias||0.5;function adjustAxis(axis,zoomInPercentage,bias){var delta=axis[1]- axis[0];var increment=delta*zoomInPercentage;var foo=[increment*bias,increment*(1-bias)];return[axis[0]+ foo[0],axis[1]- foo[1]];}
var yAxes=g.yAxisRanges();var newYAxes=[];for(var i=0;i<yAxes.length;i++){newYAxes[i]=adjustAxis(yAxes[i],zoomInPercentage,yBias);}
g.updateOptions({dateWindow:adjustAxis(g.xAxisRange(),zoomInPercentage,xBias),valueRange:newYAxes[0]});}
var v4Active=false;var v4Canvas=null;function downV4(event,g,context){context.initializeMouseDown(event,g,context);v4Active=true;moveV4(event,g,context);}
var processed=[];function moveV4(event,g,context){var RANGE=7;if(v4Active){var canvasx=Dygraph.pageX(event)- Dygraph.findPosX(g.graphDiv);var canvasy=Dygraph.pageY(event)- Dygraph.findPosY(g.graphDiv);var rows=g.numRows();for(var row=0;row<rows;row++){var date=g.getValue(row,0);var x=g.toDomCoords(date,null)[0];var diff=Math.abs(canvasx- x);if(diff<RANGE){for(var col=1;col<3;col++){var vals=g.getValue(row,col);if(vals==null){continue;}
var val=vals[0];var y=g.toDomCoords(null,val)[1];var diff2=Math.abs(canvasy- y);if(diff2<RANGE){var found=false;for(var i in processed){var stored=processed[i];if(stored[0]==row&&stored[1]==col){found=true;break;}}
if(!found){processed.push([row,col]);drawV4(x,y);}
return;}}}}}}
function upV4(event,g,context){if(v4Active){v4Active=false;}}
function dblClickV4(event,g,context){restorePositioning(g);}
function drawV4(x,y){var ctx=v4Canvas;ctx.strokeStyle="#000000";ctx.fillStyle="#FFFF00";ctx.beginPath();ctx.arc(x,y,5,0,Math.PI*2,true);ctx.closePath();ctx.stroke();ctx.fill();}
function captureCanvas(canvas,area,g){v4Canvas=canvas;}
function restorePositioning(g){g.updateOptions({dateWindow:null,valueRange:null});}
File diff suppressed because one or more lines are too long
@@ -1,10 +0,0 @@
(function($,w,undefined){if(w.footable===undefined||w.footable===null)
throw new Error('Please check and make sure footable.js is included in the page and is loaded prior to this script.');var defaults={filter:{enabled:true,input:'.footable-filter',timeout:300,minimum:2,disableEnter:false,filterFunction:function(index){var $t=$(this),$table=$t.parents('table:first'),filter=$table.data('current-filter').toUpperCase(),text=$t.find('td').text();if(!$table.data('filter-text-only')){$t.find('td[data-value]').each(function(){text+=$(this).data('value');});}
return text.toUpperCase().indexOf(filter)>=0;}}};function Filter(){var p=this;p.name='Footable Filter';p.init=function(ft){p.footable=ft;if(ft.options.filter.enabled===true){if($(ft.table).data('filter')===false)return;ft.timers.register('filter');$(ft.table).unbind('.filtering').bind({'footable_initialized.filtering':function(e){var $table=$(ft.table);var data={'input':$table.data('filter')||ft.options.filter.input,'timeout':$table.data('filter-timeout')||ft.options.filter.timeout,'minimum':$table.data('filter-minimum')||ft.options.filter.minimum,'disableEnter':$table.data('filter-disable-enter')||ft.options.filter.disableEnter};if(data.disableEnter){$(data.input).keypress(function(event){if(window.event)
return(window.event.keyCode!==13);else
return(event.which!==13);});}
$table.bind('footable_clear_filter',function(){$(data.input).val('');p.clearFilter();});$table.bind('footable_filter',function(event,args){p.filter(args.filter);});$(data.input).keyup(function(eve){ft.timers.filter.stop();if(eve.which===27){$(data.input).val('');}
ft.timers.filter.start(function(){var val=$(data.input).val()||'';p.filter(val);},data.timeout);});},'footable_redrawn.filtering':function(e){var $table=$(ft.table),filter=$table.data('filter-string');if(filter){p.filter(filter);}}}).data('footable-filter',p);}};p.filter=function(filterString){var ft=p.footable,$table=$(ft.table),minimum=$table.data('filter-minimum')||ft.options.filter.minimum,clear=!filterString;var event=ft.raise('footable_filtering',{filter:filterString,clear:clear});if(event&&event.result===false)return;if(event.filter&&event.filter.length<minimum){return;}
if(event.clear){p.clearFilter();}else{var filters=event.filter.split(' ');$table.find('> tbody > tr').hide().addClass('footable-filtered');var rows=$table.find('> tbody > tr:not(.footable-row-detail)');$.each(filters,function(i,f){if(f&&f.length>0){$table.data('current-filter',f);rows=rows.filter(ft.options.filter.filterFunction);}});rows.each(function(){p.showRow(this,ft);$(this).removeClass('footable-filtered');});$table.data('filter-string',event.filter);ft.raise('footable_filtered',{filter:event.filter,clear:false});}};p.clearFilter=function(){var ft=p.footable,$table=$(ft.table);$table.find('> tbody > tr:not(.footable-row-detail)').removeClass('footable-filtered').each(function(){p.showRow(this,ft);});$table.removeData('filter-string');ft.raise('footable_filtered',{clear:true});};p.showRow=function(row,ft){var $row=$(row),$next=$row.next(),$table=$(ft.table);if($row.is(':visible'))return;if($table.hasClass('breakpoint')&&$row.hasClass('footable-detail-show')&&$next.hasClass('footable-row-detail')){$row.add($next).show();ft.createOrUpdateDetailRow(row);}
else $row.show();};}
w.footable.plugins.register(Filter,defaults);})(jQuery,window);
-34
View File
@@ -1,34 +0,0 @@
(function($,w,undefined){w.footable={options:{delay:100,breakpoints:{phone:480,tablet:1024},parsers:{alpha:function(cell){return $(cell).data('value')||$.trim($(cell).text());},numeric:function(cell){var val=$(cell).data('value')||$(cell).text().replace(/[^0-9.\-]/g,'');val=parseFloat(val);if(isNaN(val))val=0;return val;}},addRowToggle:true,calculateWidthOverride:null,toggleSelector:' > tbody > tr:not(.footable-row-detail)',columnDataSelector:'> thead > tr:last-child > th, > thead > tr:last-child > td',detailSeparator:':',toggleHTMLElement:'<span />',createGroupedDetail:function(data){var groups={'_none':{'name':null,'data':[]}};for(var i=0;i<data.length;i++){var groupid=data[i].group;if(groupid!==null){if(!(groupid in groups))
groups[groupid]={'name':data[i].groupName||data[i].group,'data':[]};groups[groupid].data.push(data[i]);}else{groups._none.data.push(data[i]);}}
return groups;},createDetail:function(element,data,createGroupedDetail,separatorChar,classes){var groups=createGroupedDetail(data);for(var group in groups){if(groups[group].data.length===0)continue;if(group!=='_none')element.append('<div class="'+ classes.detailInnerGroup+'">'+ groups[group].name+'</div>');for(var j=0;j<groups[group].data.length;j++){var separator=(groups[group].data[j].name)?separatorChar:'';element.append($('<div></div>').addClass(classes.detailInnerRow).append($('<div></div>').addClass(classes.detailInnerName).append(groups[group].data[j].name+ separator)).append($('<div></div>').addClass(classes.detailInnerValue).attr('data-bind-value',groups[group].data[j].bindName).append(groups[group].data[j].display)));}}},classes:{main:'footable',loading:'footable-loading',loaded:'footable-loaded',toggle:'footable-toggle',disabled:'footable-disabled',detail:'footable-row-detail',detailCell:'footable-row-detail-cell',detailInner:'footable-row-detail-inner',detailInnerRow:'footable-row-detail-row',detailInnerGroup:'footable-row-detail-group',detailInnerName:'footable-row-detail-name',detailInnerValue:'footable-row-detail-value',detailShow:'footable-detail-show'},triggers:{initialize:'footable_initialize',resize:'footable_resize',redraw:'footable_redraw',toggleRow:'footable_toggle_row',expandFirstRow:'footable_expand_first_row',expandAll:'footable_expand_all',collapseAll:'footable_collapse_all'},events:{alreadyInitialized:'footable_already_initialized',initializing:'footable_initializing',initialized:'footable_initialized',resizing:'footable_resizing',resized:'footable_resized',redrawn:'footable_redrawn',breakpoint:'footable_breakpoint',columnData:'footable_column_data',rowDetailUpdating:'footable_row_detail_updating',rowDetailUpdated:'footable_row_detail_updated',rowCollapsed:'footable_row_collapsed',rowExpanded:'footable_row_expanded',rowRemoved:'footable_row_removed',reset:'footable_reset'},debug:false,log:null},version:{major:0,minor:5,toString:function(){return w.footable.version.major+'.'+ w.footable.version.minor;},parse:function(str){var version=/(\d+)\.?(\d+)?\.?(\d+)?/.exec(str);return{major:parseInt(version[1],10)||0,minor:parseInt(version[2],10)||0,patch:parseInt(version[3],10)||0};}},plugins:{_validate:function(plugin){if(!$.isFunction(plugin)){if(w.footable.options.debug===true)console.error('Validation failed, expected type "function", received type "{0}".',typeof plugin);return false;}
var p=new plugin();if(typeof p['name']!=='string'){if(w.footable.options.debug===true)console.error('Validation failed, plugin does not implement a string property called "name".',p);return false;}
if(!$.isFunction(p['init'])){if(w.footable.options.debug===true)console.error('Validation failed, plugin "'+ p['name']+'" does not implement a function called "init".',p);return false;}
if(w.footable.options.debug===true)console.log('Validation succeeded for plugin "'+ p['name']+'".',p);return true;},registered:[],register:function(plugin,options){if(w.footable.plugins._validate(plugin)){w.footable.plugins.registered.push(plugin);if(typeof options==='object')$.extend(true,w.footable.options,options);}},load:function(instance){var loaded=[],registered,i;for(i=0;i<w.footable.plugins.registered.length;i++){try{registered=w.footable.plugins.registered[i];loaded.push(new registered(instance));}catch(err){if(w.footable.options.debug===true)console.error(err);}}
return loaded;},init:function(instance){for(var i=0;i<instance.plugins.length;i++){try{instance.plugins[i]['init'](instance);}catch(err){if(w.footable.options.debug===true)console.error(err);}}}}};var instanceCount=0;$.fn.footable=function(options){options=options||{};var o=$.extend(true,{},w.footable.options,options);return this.each(function(){instanceCount++;var footable=new Footable(this,o,instanceCount);$(this).data('footable',footable);});};function Timer(){var t=this;t.id=null;t.busy=false;t.start=function(code,milliseconds){if(t.busy){return;}
t.stop();t.id=setTimeout(function(){code();t.id=null;t.busy=false;},milliseconds);t.busy=true;};t.stop=function(){if(t.id!==null){clearTimeout(t.id);t.id=null;t.busy=false;}};}
function Footable(t,o,id){var ft=this;ft.id=id;ft.table=t;ft.options=o;ft.breakpoints=[];ft.breakpointNames='';ft.columns={};ft.plugins=w.footable.plugins.load(ft);var opt=ft.options,cls=opt.classes,evt=opt.events,trg=opt.triggers,indexOffset=0;ft.timers={resize:new Timer(),register:function(name){ft.timers[name]=new Timer();return ft.timers[name];}};ft.init=function(){var $window=$(w),$table=$(ft.table);w.footable.plugins.init(ft);if($table.hasClass(cls.loaded)){ft.raise(evt.alreadyInitialized);return;}
ft.raise(evt.initializing);$table.addClass(cls.loading);$table.find(opt.columnDataSelector).each(function(){var data=ft.getColumnData(this);ft.columns[data.index]=data;});for(var name in opt.breakpoints){ft.breakpoints.push({'name':name,'width':opt.breakpoints[name]});ft.breakpointNames+=(name+' ');}
ft.breakpoints.sort(function(a,b){return a['width']- b['width'];});$table.unbind(trg.initialize).bind(trg.initialize,function(){$table.removeData('footable_info');$table.data('breakpoint','');$table.trigger(trg.resize);$table.removeClass(cls.loading);$table.addClass(cls.loaded).addClass(cls.main);ft.raise(evt.initialized);}).unbind(trg.redraw).bind(trg.redraw,function(){ft.redraw();}).unbind(trg.resize).bind(trg.resize,function(){ft.resize();}).unbind(trg.expandFirstRow).bind(trg.expandFirstRow,function(){$table.find(opt.toggleSelector).first().not('.'+ cls.detailShow).trigger(trg.toggleRow);}).unbind(trg.expandAll).bind(trg.expandAll,function(){$table.find(opt.toggleSelector).not('.'+ cls.detailShow).trigger(trg.toggleRow);}).unbind(trg.collapseAll).bind(trg.collapseAll,function(){$table.find('.'+ cls.detailShow).trigger(trg.toggleRow);});$table.trigger(trg.initialize);$window.bind('resize.footable',function(){ft.timers.resize.stop();ft.timers.resize.start(function(){ft.raise(trg.resize);},opt.delay);});};ft.addRowToggle=function(){if(!opt.addRowToggle)return;var $table=$(ft.table),hasToggleColumn=false;$table.find('span.'+ cls.toggle).remove();for(var c in ft.columns){var col=ft.columns[c];if(col.toggle){hasToggleColumn=true;var selector='> tbody > tr:not(.'+ cls.detail+',.'+ cls.disabled+') > td:nth-child('+(parseInt(col.index,10)+ 1)+'),'+'> tbody > tr:not(.'+ cls.detail+',.'+ cls.disabled+') > th:nth-child('+(parseInt(col.index,10)+ 1)+')';$table.find(selector).not('.'+ cls.detailCell).prepend($(opt.toggleHTMLElement).addClass(cls.toggle));return;}}
if(!hasToggleColumn){$table.find('> tbody > tr:not(.'+ cls.detail+',.'+ cls.disabled+') > td:first-child').add('> tbody > tr:not(.'+ cls.detail+',.'+ cls.disabled+') > th:first-child').not('.'+ cls.detailCell).prepend($(opt.toggleHTMLElement).addClass(cls.toggle));}};ft.setColumnClasses=function(){var $table=$(ft.table);for(var c in ft.columns){var col=ft.columns[c];if(col.className!==null){var selector='',first=true;$.each(col.matches,function(m,match){if(!first)selector+=', ';selector+='> tbody > tr:not(.'+ cls.detail+') > td:nth-child('+(parseInt(match,10)+ 1)+')';first=false;});$table.find(selector).not('.'+ cls.detailCell).addClass(col.className);}}};ft.bindToggleSelectors=function(){var $table=$(ft.table);if(!ft.hasAnyBreakpointColumn())return;$table.find(opt.toggleSelector).unbind(trg.toggleRow).bind(trg.toggleRow,function(e){var $row=$(this).is('tr')?$(this):$(this).parents('tr:first');ft.toggleDetail($row);});$table.find(opt.toggleSelector).unbind('click.footable').bind('click.footable',function(e){if($table.is('.breakpoint')&&$(e.target).is('td,th,.'+ cls.toggle)){$(this).trigger(trg.toggleRow);}});};ft.parse=function(cell,column){var parser=opt.parsers[column.type]||opt.parsers.alpha;return parser(cell);};ft.getColumnData=function(th){var $th=$(th),hide=$th.data('hide'),index=$th.index();hide=hide||'';hide=jQuery.map(hide.split(','),function(a){return jQuery.trim(a);});var data={'index':index,'hide':{},'type':$th.data('type')||'alpha','name':$th.data('name')||$.trim($th.text()),'ignore':$th.data('ignore')||false,'toggle':$th.data('toggle')||false,'className':$th.data('class')||null,'matches':[],'names':{},'group':$th.data('group')||null,'groupName':null,'isEditable':$th.data('editable')};if(data.group!==null){var $group=$(ft.table).find('> thead > tr.footable-group-row > th[data-group="'+ data.group+'"], > thead > tr.footable-group-row > td[data-group="'+ data.group+'"]').first();data.groupName=ft.parse($group,{'type':'alpha'});}
var pcolspan=parseInt($th.prev().attr('colspan')||0,10);indexOffset+=pcolspan>1?pcolspan- 1:0;var colspan=parseInt($th.attr('colspan')||0,10),curindex=data.index+ indexOffset;if(colspan>1){var names=$th.data('names');names=names||'';names=names.split(',');for(var i=0;i<colspan;i++){data.matches.push(i+ curindex);if(i<names.length)data.names[i+ curindex]=names[i];}}else{data.matches.push(curindex);}
data.hide['default']=($th.data('hide')==="all")||($.inArray('default',hide)>=0);var hasBreakpoint=false;for(var name in opt.breakpoints){data.hide[name]=($th.data('hide')==="all")||($.inArray(name,hide)>=0);hasBreakpoint=hasBreakpoint||data.hide[name];}
data.hasBreakpoint=hasBreakpoint;var e=ft.raise(evt.columnData,{'column':{'data':data,'th':th}});return e.column.data;};ft.getViewportWidth=function(){return window.innerWidth||(document.body?document.body.offsetWidth:0);};ft.calculateWidth=function($table,info){if(jQuery.isFunction(opt.calculateWidthOverride)){return opt.calculateWidthOverride($table,info);}
if(info.viewportWidth<info.width)info.width=info.viewportWidth;if(info.parentWidth<info.width)info.width=info.parentWidth;return info;};ft.hasBreakpointColumn=function(breakpoint){for(var c in ft.columns){if(ft.columns[c].hide[breakpoint]){if(ft.columns[c].ignore){continue;}
return true;}}
return false;};ft.hasAnyBreakpointColumn=function(){for(var c in ft.columns){if(ft.columns[c].hasBreakpoint){return true;}}
return false;};ft.resize=function(){var $table=$(ft.table);if(!$table.is(':visible')){return;}
if(!ft.hasAnyBreakpointColumn()){$table.trigger(trg.redraw);return;}
var info={'width':$table.width(),'viewportWidth':ft.getViewportWidth(),'parentWidth':$table.parent().width()};info=ft.calculateWidth($table,info);var pinfo=$table.data('footable_info');$table.data('footable_info',info);ft.raise(evt.resizing,{'old':pinfo,'info':info});if(!pinfo||(pinfo&&pinfo.width&&pinfo.width!==info.width)){var current=null,breakpoint;for(var i=0;i<ft.breakpoints.length;i++){breakpoint=ft.breakpoints[i];if(breakpoint&&breakpoint.width&&info.width<=breakpoint.width){current=breakpoint;break;}}
var breakpointName=(current===null?'default':current['name']),hasBreakpointFired=ft.hasBreakpointColumn(breakpointName),previousBreakpoint=$table.data('breakpoint');$table.data('breakpoint',breakpointName).removeClass('default breakpoint').removeClass(ft.breakpointNames).addClass(breakpointName+(hasBreakpointFired?' breakpoint':''));if(breakpointName!==previousBreakpoint){$table.trigger(trg.redraw);ft.raise(evt.breakpoint,{'breakpoint':breakpointName,'info':info});}}
ft.raise(evt.resized,{'old':pinfo,'info':info});};ft.redraw=function(){ft.addRowToggle();ft.bindToggleSelectors();ft.setColumnClasses();var $table=$(ft.table),breakpointName=$table.data('breakpoint'),hasBreakpointFired=ft.hasBreakpointColumn(breakpointName);$table.find('> tbody > tr:not(.'+ cls.detail+')').data('detail_created',false).end().find('> thead > tr:last-child > th').each(function(){var data=ft.columns[$(this).index()],selector='',first=true;$.each(data.matches,function(m,match){if(!first){selector+=', ';}
var count=match+ 1;selector+='> tbody > tr:not(.'+ cls.detail+') > td:nth-child('+ count+')';selector+=', > tfoot > tr:not(.'+ cls.detail+') > td:nth-child('+ count+')';selector+=', > colgroup > col:nth-child('+ count+')';first=false;});selector+=', > thead > tr[data-group-row="true"] > th[data-group="'+ data.group+'"]';var $column=$table.find(selector).add(this);if(breakpointName!==''){if(data.hide[breakpointName]===false)$column.addClass('footable-visible').show();else $column.removeClass('footable-visible').hide();}
if($table.find('> thead > tr.footable-group-row').length===1){var $groupcols=$table.find('> thead > tr:last-child > th[data-group="'+ data.group+'"]:visible, > thead > tr:last-child > th[data-group="'+ data.group+'"]:visible'),$group=$table.find('> thead > tr.footable-group-row > th[data-group="'+ data.group+'"], > thead > tr.footable-group-row > td[data-group="'+ data.group+'"]'),groupspan=0;$.each($groupcols,function(){groupspan+=parseInt($(this).attr('colspan')||1,10);});if(groupspan>0)$group.attr('colspan',groupspan).show();else $group.hide();}}).end().find('> tbody > tr.'+ cls.detailShow).each(function(){ft.createOrUpdateDetailRow(this);});$table.find("[data-bind-name]").each(function(){ft.toggleInput(this);});$table.find('> tbody > tr.'+ cls.detailShow+':visible').each(function(){var $next=$(this).next();if($next.hasClass(cls.detail)){if(!hasBreakpointFired)$next.hide();else $next.show();}});$table.find('> thead > tr > th.footable-last-column, > tbody > tr > td.footable-last-column').removeClass('footable-last-column');$table.find('> thead > tr > th.footable-first-column, > tbody > tr > td.footable-first-column').removeClass('footable-first-column');$table.find('> thead > tr, > tbody > tr').find('> th.footable-visible:last, > td.footable-visible:last').addClass('footable-last-column').end().find('> th.footable-visible:first, > td.footable-visible:first').addClass('footable-first-column');ft.raise(evt.redrawn);};ft.toggleDetail=function(row){var $row=(row.jquery)?row:$(row),$next=$row.next();if($row.hasClass(cls.detailShow)){$row.removeClass(cls.detailShow);if($next.hasClass(cls.detail))$next.hide();ft.raise(evt.rowCollapsed,{'row':$row[0]});}else{ft.createOrUpdateDetailRow($row[0]);$row.addClass(cls.detailShow).next().show();ft.raise(evt.rowExpanded,{'row':$row[0]});}};ft.removeRow=function(row){var $row=(row.jquery)?row:$(row);if($row.hasClass(cls.detail)){$row=$row.prev();}
var $next=$row.next();if($row.data('detail_created')===true){$next.remove();}
$row.remove();ft.raise(evt.rowRemoved);};ft.appendRow=function(row){var $row=(row.jquery)?row:$(row);$(ft.table).find('tbody').append($row);ft.redraw();};ft.getColumnFromTdIndex=function(index){var result=null;for(var column in ft.columns){if($.inArray(index,ft.columns[column].matches)>=0){result=ft.columns[column];break;}}
return result;};ft.createOrUpdateDetailRow=function(actualRow){var $row=$(actualRow),$next=$row.next(),$detail,values=[];if($row.data('detail_created')===true)return true;if($row.is(':hidden'))return false;ft.raise(evt.rowDetailUpdating,{'row':$row,'detail':$next});$row.find('> td:hidden').each(function(){var index=$(this).index(),column=ft.getColumnFromTdIndex(index),name=column.name;if(column.ignore===true)return true;if(index in column.names)name=column.names[index];var bindName=$(this).attr("data-bind-name");if(bindName!=null&&$(this).is(':empty')){var bindValue=$('.'+ cls.detailInnerValue+'['+'data-bind-value="'+ bindName+'"]');$(this).html($(bindValue).contents().detach());}
var display;if(column.isEditable!==false&&(column.isEditable||$(this).find(":input").length>0)){if(bindName==null){bindName="bind-"+ $.now()+"-"+ index;$(this).attr("data-bind-name",bindName);}
display=$(this).contents().detach();}
if(!display)display=$(this).contents().clone(true,true);values.push({'name':name,'value':ft.parse(this,column),'display':display,'group':column.group,'groupName':column.groupName,'bindName':bindName});return true;});if(values.length===0)return false;var colspan=$row.find('> td:visible').length;var exists=$next.hasClass(cls.detail);if(!exists){$next=$('<tr class="'+ cls.detail+'"><td class="'+ cls.detailCell+'"><div class="'+ cls.detailInner+'"></div></td></tr>');$row.after($next);}
$next.find('> td:first').attr('colspan',colspan);$detail=$next.find('.'+ cls.detailInner).empty();opt.createDetail($detail,values,opt.createGroupedDetail,opt.detailSeparator,cls);$row.data('detail_created',true);ft.raise(evt.rowDetailUpdated,{'row':$row,'detail':$next});return!exists;};ft.raise=function(eventName,args){if(ft.options.debug===true&&$.isFunction(ft.options.log))ft.options.log(eventName,'event');args=args||{};var def={'ft':ft};$.extend(true,def,args);var e=$.Event(eventName,def);if(!e.ft){$.extend(true,e,def);}
$(ft.table).trigger(e);return e;};ft.reset=function(){var $table=$(ft.table);$table.removeData('footable_info').data('breakpoint','').removeClass(cls.loading).removeClass(cls.loaded);$table.find(opt.toggleSelector).unbind(trg.toggleRow).unbind('click.footable');$table.find('> tbody > tr').removeClass(cls.detailShow);$table.find('> tbody > tr.'+ cls.detail).remove();ft.raise(evt.reset);};ft.toggleInput=function(column){var bindName=$(column).attr("data-bind-name");if(bindName!=null){var bindValue=$('.'+ cls.detailInnerValue+'['+'data-bind-value="'+ bindName+'"]');if(bindValue!=null){if($(column).is(":visible")){if(!$(bindValue).is(':empty'))$(column).html($(bindValue).contents().detach());}else if(!$(column).is(':empty')){$(bindValue).html($(column).contents().detach());}}}};ft.init();return ft;}})(jQuery,window);
@@ -1,20 +0,0 @@
(function($,w,undefined){if(w.footable===undefined||w.footable===null)
throw new Error('Please check and make sure footable.js is included in the page and is loaded prior to this script.');var defaults={paginate:true,pageSize:10,pageNavigation:'.pagination',firstText:'&laquo;',previousText:'&lsaquo;',nextText:'&rsaquo;',lastText:'&raquo;',limitNavigation:0,limitPreviousText:'...',limitNextText:'...'};function pageInfo(ft){var $table=$(ft.table),data=$table.data();this.pageNavigation=data.pageNavigation||ft.options.pageNavigation;this.pageSize=data.pageSize||ft.options.pageSize;this.firstText=data.firstText||ft.options.firstText;this.previousText=data.previousText||ft.options.previousText;this.nextText=data.nextText||ft.options.nextText;this.lastText=data.lastText||ft.options.lastText;this.limitNavigation=parseInt(data.limitNavigation||ft.options.limitNavigation||defaults.limitNavigation,10);this.limitPreviousText=data.limitPreviousText||ft.options.limitPreviousText;this.limitNextText=data.limitNextText||ft.options.limitNextText;this.limit=this.limitNavigation>0;this.currentPage=data.currentPage||0;this.pages=[];this.control=false;}
function Paginate(){var p=this;p.name='Footable Paginate';p.init=function(ft){if(ft.options.paginate===true){if($(ft.table).data('page')===false)return;p.footable=ft;$(ft.table).unbind('.paging').bind({'footable_initialized.paging footable_row_removed.paging footable_redrawn.paging footable_sorted.paging footable_filtered.paging':function(){p.setupPaging();}}).data('footable-paging',p);}};p.setupPaging=function(){var ft=p.footable,$tbody=$(ft.table).find('> tbody');ft.pageInfo=new pageInfo(ft);p.createPages(ft,$tbody);p.createNavigation(ft,$tbody);p.fillPage(ft,$tbody,ft.pageInfo.currentPage);};p.createPages=function(ft,tbody){var pages=1;var info=ft.pageInfo;var pageCount=pages*info.pageSize;var page=[];var lastPage=[];info.pages=[];var rows=tbody.find('> tr:not(.footable-filtered,.footable-row-detail)');rows.each(function(i,row){page.push(row);if(i===pageCount- 1){info.pages.push(page);pages++;pageCount=pages*info.pageSize;page=[];}else if(i>=rows.length-(rows.length%info.pageSize)){lastPage.push(row);}});if(lastPage.length>0)info.pages.push(lastPage);if(info.currentPage>=info.pages.length)info.currentPage=info.pages.length- 1;if(info.currentPage<0)info.currentPage=0;if(info.pages.length===1){$(ft.table).addClass('no-paging');}else{$(ft.table).removeClass('no-paging');}};p.createNavigation=function(ft,tbody){var $nav=$(ft.table).find(ft.pageInfo.pageNavigation);if($nav.length===0){$nav=$(ft.pageInfo.pageNavigation);if($nav.parents('table:first').length>0&&$nav.parents('table:first')!==$(ft.table))return;if($nav.length>1&&ft.options.debug===true)console.error('More than one pagination control was found!');}
if($nav.length===0)return;if(!$nav.is('ul')){if($nav.find('ul:first').length===0){$nav.append('<ul />');}
$nav=$nav.find('ul');}
$nav.find('li').remove();var info=ft.pageInfo;info.control=$nav;if(info.pages.length>0){$nav.append('<li class="footable-page-arrow"><a data-page="first" href="#first">'+ ft.pageInfo.firstText+'</a>');$nav.append('<li class="footable-page-arrow"><a data-page="prev" href="#prev">'+ ft.pageInfo.previousText+'</a></li>');if(info.limit){$nav.append('<li class="footable-page-arrow"><a data-page="limit-prev" href="#limit-prev">'+ ft.pageInfo.limitPreviousText+'</a></li>');}
if(!info.limit){$.each(info.pages,function(i,page){if(page.length>0){$nav.append('<li class="footable-page"><a data-page="'+ i+'" href="#">'+(i+ 1)+'</a></li>');}});}
if(info.limit){$nav.append('<li class="footable-page-arrow"><a data-page="limit-next" href="#limit-next">'+ ft.pageInfo.limitNextText+'</a></li>');p.createLimited($nav,info,0);}
$nav.append('<li class="footable-page-arrow"><a data-page="next" href="#next">'+ ft.pageInfo.nextText+'</a></li>');$nav.append('<li class="footable-page-arrow"><a data-page="last" href="#last">'+ ft.pageInfo.lastText+'</a></li>');}
$nav.off('click','a[data-page]').on('click','a[data-page]',function(e){e.preventDefault();var page=$(this).data('page');var newPage=info.currentPage;if(page==='first'){newPage=0;}else if(page==='prev'){if(newPage>0)newPage--;}else if(page==='next'){if(newPage<info.pages.length- 1)newPage++;}else if(page==='last'){newPage=info.pages.length- 1;}else if(page==='limit-prev'){newPage=-1;var first=$nav.find('.footable-page:first a').data('page');p.createLimited($nav,info,first- info.limitNavigation);p.setPagingClasses($nav,info.currentPage,info.pages.length);}else if(page==='limit-next'){newPage=-1;var last=$nav.find('.footable-page:last a').data('page');p.createLimited($nav,info,last+ 1);p.setPagingClasses($nav,info.currentPage,info.pages.length);}else{newPage=page;}
if(newPage>=0){if(info.limit&&info.currentPage!=newPage){var start=newPage;while(start%info.limitNavigation!==0){start-=1;}
p.createLimited($nav,info,start);}
p.paginate(ft,newPage);}});p.setPagingClasses($nav,info.currentPage,info.pages.length);};p.createLimited=function(nav,info,start){start=start||0;nav.find('li.footable-page').remove();var i,page,$prev=nav.find('li.footable-page-arrow > a[data-page="limit-prev"]').parent(),$next=nav.find('li.footable-page-arrow > a[data-page="limit-next"]').parent();for(i=info.pages.length- 1;i>=0;i--){page=info.pages[i];if(i>=start&&i<start+ info.limitNavigation&&page.length>0){$prev.after('<li class="footable-page"><a data-page="'+ i+'" href="#">'+(i+ 1)+'</a></li>');}}
if(start===0){$prev.hide();}
else{$prev.show();}
if(start+ info.limitNavigation>=info.pages.length){$next.hide();}
else{$next.show();}};p.paginate=function(ft,newPage){var info=ft.pageInfo;if(info.currentPage!==newPage){var $tbody=$(ft.table).find('> tbody');var event=ft.raise('footable_paging',{page:newPage,size:info.pageSize});if(event&&event.result===false)return;p.fillPage(ft,$tbody,newPage);info.control.find('li').removeClass('active disabled');p.setPagingClasses(info.control,info.currentPage,info.pages.length);}};p.setPagingClasses=function(nav,currentPage,pageCount){nav.find('li.footable-page > a[data-page='+ currentPage+']').parent().addClass('active');if(currentPage>=pageCount- 1){nav.find('li.footable-page-arrow > a[data-page="next"]').parent().addClass('disabled');nav.find('li.footable-page-arrow > a[data-page="last"]').parent().addClass('disabled');}
if(currentPage<1){nav.find('li.footable-page-arrow > a[data-page="first"]').parent().addClass('disabled');nav.find('li.footable-page-arrow > a[data-page="prev"]').parent().addClass('disabled');}};p.fillPage=function(ft,tbody,pageNumber){ft.pageInfo.currentPage=pageNumber;$(ft.table).data('currentPage',pageNumber);tbody.find('> tr').hide();$(ft.pageInfo.pages[pageNumber]).each(function(){p.showRow(this,ft);});ft.raise('footable_page_filled');};p.showRow=function(row,ft){var $row=$(row),$next=$row.next(),$table=$(ft.table);if($table.hasClass('breakpoint')&&$row.hasClass('footable-detail-show')&&$next.hasClass('footable-row-detail')){$row.add($next).show();ft.createOrUpdateDetailRow(row);}
else $row.show();};}
w.footable.plugins.register(Paginate,defaults);})(jQuery,window);
-10
View File
@@ -1,10 +0,0 @@
(function($,w,undefined){if(w.footable===undefined||w.footable===null)
throw new Error('Please check and make sure footable.js is included in the page and is loaded prior to this script.');var defaults={sort:true,sorters:{alpha:function(a,b){if(typeof(a)==='string'){a=a.toLowerCase();}
if(typeof(b)==='string'){b=b.toLowerCase();}
if(a===b)return 0;if(a<b)return-1;return 1;},numeric:function(a,b){return a- b;}},classes:{sort:{sortable:'footable-sortable',sorted:'footable-sorted',descending:'footable-sorted-desc',indicator:'footable-sort-indicator'}},events:{sort:{sorting:'footable_sorting',sorted:'footable_sorted'}}};function Sort(){var p=this;p.name='Footable Sortable';p.init=function(ft){p.footable=ft;if(ft.options.sort===true){$(ft.table).unbind('.sorting').bind({'footable_initialized.sorting':function(e){var $table=$(ft.table),$tbody=$table.find('> tbody'),cls=ft.options.classes.sort,column,$th;if($table.data('sort')===false)return;$table.find('> thead > tr:last-child > th, > thead > tr:last-child > td').each(function(ec){var $th=$(this),column=ft.columns[$th.index()];if(column.sort.ignore!==true&&!$th.hasClass(cls.sortable)){$th.addClass(cls.sortable);$('<span />').addClass(cls.indicator).appendTo($th);}});$table.find('> thead > tr:last-child > th.'+ cls.sortable+', > thead > tr:last-child > td.'+ cls.sortable).unbind('click.footable').bind('click.footable',function(ec){ec.preventDefault();$th=$(this);var ascending=!$th.hasClass(cls.sorted);p.doSort($th.index(),ascending);return false;});var didSomeSorting=false;for(var c in ft.columns){column=ft.columns[c];if(column.sort.initial){var ascending=(column.sort.initial!=='descending');p.doSort(column.index,ascending);break;}}
if(didSomeSorting){ft.bindToggleSelectors();}},'footable_redrawn.sorting':function(e){var $table=$(ft.table),cls=ft.options.classes.sort;if($table.data('sorted')>=0){$table.find('> thead > tr:last-child > th').each(function(i){var $th=$(this);if($th.hasClass(cls.sorted)||$th.hasClass(cls.descending)){p.doSort(i);return;}});}},'footable_column_data.sorting':function(e){var $th=$(e.column.th);e.column.data.sort=e.column.data.sort||{};e.column.data.sort.initial=$th.data('sort-initial')||false;e.column.data.sort.ignore=$th.data('sort-ignore')||false;e.column.data.sort.selector=$th.data('sort-selector')||null;var match=$th.data('sort-match')||0;if(match>=e.column.data.matches.length)match=0;e.column.data.sort.match=e.column.data.matches[match];}}).data('footable-sort',p);}};p.doSort=function(columnIndex,ascending){var ft=p.footable;if($(ft.table).data('sort')===false)return;var $table=$(ft.table),$tbody=$table.find('> tbody'),column=ft.columns[columnIndex],$th=$table.find('> thead > tr:last-child > th:eq('+ columnIndex+')'),cls=ft.options.classes.sort,evt=ft.options.events.sort;ascending=(ascending===undefined)?$th.hasClass(cls.sorted):(ascending==='toggle')?!$th.hasClass(cls.sorted):ascending;if(column.sort.ignore===true)return true;var event=ft.raise(evt.sorting,{column:column,direction:ascending?'ASC':'DESC'});if(event&&event.result===false)return;$table.data('sorted',column.index);$table.find('> thead > tr:last-child > th, > thead > tr:last-child > td').not($th).removeClass(cls.sorted+' '+ cls.descending);if(ascending===undefined){ascending=$th.hasClass(cls.sorted);}
if(ascending){$th.removeClass(cls.descending).addClass(cls.sorted);}else{$th.removeClass(cls.sorted).addClass(cls.descending);}
p.sort(ft,$tbody,column,ascending);ft.bindToggleSelectors();ft.raise(evt.sorted,{column:column,direction:ascending?'ASC':'DESC'});};p.rows=function(ft,tbody,column){var rows=[];tbody.find('> tr').each(function(){var $row=$(this),$next=null;if($row.hasClass(ft.options.classes.detail))return true;if($row.next().hasClass(ft.options.classes.detail)){$next=$row.next().get(0);}
var row={'row':$row,'detail':$next};if(column!==undefined){row.value=ft.parse(this.cells[column.sort.match],column);}
rows.push(row);return true;}).detach();return rows;};p.sort=function(ft,tbody,column,ascending){var rows=p.rows(ft,tbody,column);var sorter=ft.options.sorters[column.type]||ft.options.sorters.alpha;rows.sort(function(a,b){if(ascending){return sorter(a.value,b.value);}else{return sorter(b.value,a.value);}});for(var j=0;j<rows.length;j++){tbody.append(rows[j].row);if(rows[j].detail!==null){tbody.append(rows[j].detail);}}};}
w.footable.plugins.register(Sort,defaults);})(jQuery,window);
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
var gdpData={"AF":16.63,"AL":11.58,"DZ":158.97,"AO":85.81,"AG":1.1,"AR":351.02,"AM":8.83,"AU":1219.72,"AT":366.26,"AZ":52.17,"BS":7.54,"BH":21.73,"BD":105.4,"BB":3.96,"BY":52.89,"BE":461.33,"CM":21.88,"CA":1563.66,"CV":1.57,"CI":22.38,"HR":59.92,"CY":22.75,"CZ":195.23,"DK":304.56,"DJ":1.14,"DM":0.38,"DO":50.87,"SV":21.8,"GQ":14.55,"ER":2.25,"EE":19.22,"ET":30.94,"FJ":3.15,"FI":231.98,"FR":2555.44,"GA":12.56,"GM":1.04,"GE":11.23,"DE":3305.9,"GH":18.06,"GR":305.01,"GD":0.65,"GT":40.77,"GN":4.34,"GW":0.83,"GY":2.2,"HT":6.5,"HN":15.34,"HK":226.49,"HU":132.28,"IS":12.77,"IN":1430.02,"ID":695.06,"IR":337.9,"IQ":84.14,"IE":204.14,"IL":201.25,"IT":2036.69,"JM":13.74,"JP":5390.9,"JO":27.13,"KZ":129.76,"KE":32.42,"KI":0.15,"KR":986.26,"UNDEFINED":5.73,"KW":117.32,"KG":4.44,"LA":6.34,"LV":23.39,"LB":39.15,"LS":1.8,"LR":0.98,"LY":77.91,"LT":35.73,"LU":52.43,"MK":9.58,"MG":8.33,"MW":5.04,"MY":218.95,"MV":1.43,"ML":9.08,"MT":7.8,"MR":3.49,"MU":9.43,"MX":1004.04,"MD":5.36,"MN":5.81,"ME":3.88,"MA":91.7,"MZ":10.21,"MM":35.65,"NA":11.45,"NP":15.11,"NL":770.31,"NZ":138,"NI":6.38,"NE":5.6,"NG":206.66,"NO":413.51,"OM":53.78,"PK":174.79,"PA":27.2,"PG":8.81,"PY":17.17,"PE":153.55,"PH":189.06,"PL":438.88,"PT":223.7,"QA":126.52,"RO":158.39,"RU":1476.91,"RW":5.69,"WS":0.55,"ST":0.19,"SA":434.44,"SN":12.66,"RS":38.92,"SC":0.92,"SL":1.9,"SG":217.38,"SK":86.26,"SI":46.44,"SB":0.67,"ZA":354.41,"ES":1374.78,"LK":48.24,"KN":0.56,"LC":1,"VC":0.58,"SD":65.93,"SR":3.3,"SZ":3.17,"SE":444.59,"CH":522.44,"SY":59.63,"TW":426.98,"TJ":5.58,"TZ":22.43,"TH":312.61,"TL":0.62,"TG":3.07,"TO":0.3,"TT":21.2,"TN":43.86,"TR":729.05,"TM":0,"UG":17.12,"UA":136.56,"AE":239.65,"GB":2258.57,"US":14624.18,"UY":40.71,"UZ":37.72,"VU":0.72,"VE":285.21,"VN":101.99,"YE":30.02,"ZM":15.69,"ZW":5.57};
-60
View File
@@ -1,60 +0,0 @@
var Hogan={};(function(Hogan,useArrayBuffer){Hogan.Template=function(renderFunc,text,compiler,options){this.r=renderFunc||this.r;this.c=compiler;this.options=options;this.text=text||'';this.buf=(useArrayBuffer)?[]:'';}
Hogan.Template.prototype={r:function(context,partials,indent){return'';},v:hoganEscape,t:coerceToString,render:function render(context,partials,indent){return this.ri([context],partials||{},indent);},ri:function(context,partials,indent){return this.r(context,partials,indent);},rp:function(name,context,partials,indent){var partial=partials[name];if(!partial){return'';}
if(this.c&&typeof partial=='string'){partial=this.c.compile(partial,this.options);}
return partial.ri(context,partials,indent);},rs:function(context,partials,section){var tail=context[context.length- 1];if(!isArray(tail)){section(context,partials,this);return;}
for(var i=0;i<tail.length;i++){context.push(tail[i]);section(context,partials,this);context.pop();}},s:function(val,ctx,partials,inverted,start,end,tags){var pass;if(isArray(val)&&val.length===0){return false;}
if(typeof val=='function'){val=this.ls(val,ctx,partials,inverted,start,end,tags);}
pass=(val==='')||!!val;if(!inverted&&pass&&ctx){ctx.push((typeof val=='object')?val:ctx[ctx.length- 1]);}
return pass;},d:function(key,ctx,partials,returnFound){var names=key.split('.'),val=this.f(names[0],ctx,partials,returnFound),cx=null;if(key==='.'&&isArray(ctx[ctx.length- 2])){return ctx[ctx.length- 1];}
for(var i=1;i<names.length;i++){if(val&&typeof val=='object'&&names[i]in val){cx=val;val=val[names[i]];}else{val='';}}
if(returnFound&&!val){return false;}
if(!returnFound&&typeof val=='function'){ctx.push(cx);val=this.lv(val,ctx,partials);ctx.pop();}
return val;},f:function(key,ctx,partials,returnFound){var val=false,v=null,found=false;for(var i=ctx.length- 1;i>=0;i--){v=ctx[i];if(v&&typeof v=='object'&&key in v){val=v[key];found=true;break;}}
if(!found){return(returnFound)?false:"";}
if(!returnFound&&typeof val=='function'){val=this.lv(val,ctx,partials);}
return val;},ho:function(val,cx,partials,text,tags){var compiler=this.c;var options=this.options;options.delimiters=tags;var text=val.call(cx,text);text=(text==null)?String(text):text.toString();this.b(compiler.compile(text,options).render(cx,partials));return false;},b:(useArrayBuffer)?function(s){this.buf.push(s);}:function(s){this.buf+=s;},fl:(useArrayBuffer)?function(){var r=this.buf.join('');this.buf=[];return r;}:function(){var r=this.buf;this.buf='';return r;},ls:function(val,ctx,partials,inverted,start,end,tags){var cx=ctx[ctx.length- 1],t=null;if(!inverted&&this.c&&val.length>0){return this.ho(val,cx,partials,this.text.substring(start,end),tags);}
t=val.call(cx);if(typeof t=='function'){if(inverted){return true;}else if(this.c){return this.ho(t,cx,partials,this.text.substring(start,end),tags);}}
return t;},lv:function(val,ctx,partials){var cx=ctx[ctx.length- 1];var result=val.call(cx);if(typeof result=='function'){result=coerceToString(result.call(cx));if(this.c&&~result.indexOf("{\u007B")){return this.c.compile(result,this.options).render(cx,partials);}}
return coerceToString(result);}};var rAmp=/&/g,rLt=/</g,rGt=/>/g,rApos=/\'/g,rQuot=/\"/g,hChars=/[&<>\"\']/;function coerceToString(val){return String((val===null||val===undefined)?'':val);}
function hoganEscape(str){str=coerceToString(str);return hChars.test(str)?str.replace(rAmp,'&amp;').replace(rLt,'&lt;').replace(rGt,'&gt;').replace(rApos,'&#39;').replace(rQuot,'&quot;'):str;}
var isArray=Array.isArray||function(a){return Object.prototype.toString.call(a)==='[object Array]';};})(typeof exports!=='undefined'?exports:Hogan);(function(Hogan){var rIsWhitespace=/\S/,rQuot=/\"/g,rNewline=/\n/g,rCr=/\r/g,rSlash=/\\/g,tagTypes={'#':1,'^':2,'/':3,'!':4,'>':5,'<':6,'=':7,'_v':8,'{':9,'&':10};Hogan.scan=function scan(text,delimiters){var len=text.length,IN_TEXT=0,IN_TAG_TYPE=1,IN_TAG=2,state=IN_TEXT,tagType=null,tag=null,buf='',tokens=[],seenTag=false,i=0,lineStart=0,otag='{{',ctag='}}';function addBuf(){if(buf.length>0){tokens.push(new String(buf));buf='';}}
function lineIsWhitespace(){var isAllWhitespace=true;for(var j=lineStart;j<tokens.length;j++){isAllWhitespace=(tokens[j].tag&&tagTypes[tokens[j].tag]<tagTypes['_v'])||(!tokens[j].tag&&tokens[j].match(rIsWhitespace)===null);if(!isAllWhitespace){return false;}}
return isAllWhitespace;}
function filterLine(haveSeenTag,noNewLine){addBuf();if(haveSeenTag&&lineIsWhitespace()){for(var j=lineStart,next;j<tokens.length;j++){if(!tokens[j].tag){if((next=tokens[j+1])&&next.tag=='>'){next.indent=tokens[j].toString()}
tokens.splice(j,1);}}}else if(!noNewLine){tokens.push({tag:'\n'});}
seenTag=false;lineStart=tokens.length;}
function changeDelimiters(text,index){var close='='+ ctag,closeIndex=text.indexOf(close,index),delimiters=trim(text.substring(text.indexOf('=',index)+ 1,closeIndex)).split(' ');otag=delimiters[0];ctag=delimiters[1];return closeIndex+ close.length- 1;}
if(delimiters){delimiters=delimiters.split(' ');otag=delimiters[0];ctag=delimiters[1];}
for(i=0;i<len;i++){if(state==IN_TEXT){if(tagChange(otag,text,i)){--i;addBuf();state=IN_TAG_TYPE;}else{if(text.charAt(i)=='\n'){filterLine(seenTag);}else{buf+=text.charAt(i);}}}else if(state==IN_TAG_TYPE){i+=otag.length- 1;tag=tagTypes[text.charAt(i+ 1)];tagType=tag?text.charAt(i+ 1):'_v';if(tagType=='='){i=changeDelimiters(text,i);state=IN_TEXT;}else{if(tag){i++;}
state=IN_TAG;}
seenTag=i;}else{if(tagChange(ctag,text,i)){tokens.push({tag:tagType,n:trim(buf),otag:otag,ctag:ctag,i:(tagType=='/')?seenTag- ctag.length:i+ otag.length});buf='';i+=ctag.length- 1;state=IN_TEXT;if(tagType=='{'){if(ctag=='}}'){i++;}else{cleanTripleStache(tokens[tokens.length- 1]);}}}else{buf+=text.charAt(i);}}}
filterLine(seenTag,true);return tokens;}
function cleanTripleStache(token){if(token.n.substr(token.n.length- 1)==='}'){token.n=token.n.substring(0,token.n.length- 1);}}
function trim(s){if(s.trim){return s.trim();}
return s.replace(/^\s*|\s*$/g,'');}
function tagChange(tag,text,index){if(text.charAt(index)!=tag.charAt(0)){return false;}
for(var i=1,l=tag.length;i<l;i++){if(text.charAt(index+ i)!=tag.charAt(i)){return false;}}
return true;}
function buildTree(tokens,kind,stack,customTags){var instructions=[],opener=null,token=null;while(tokens.length>0){token=tokens.shift();if(token.tag=='#'||token.tag=='^'||isOpener(token,customTags)){stack.push(token);token.nodes=buildTree(tokens,token.tag,stack,customTags);instructions.push(token);}else if(token.tag=='/'){if(stack.length===0){throw new Error('Closing tag without opener: /'+ token.n);}
opener=stack.pop();if(token.n!=opener.n&&!isCloser(token.n,opener.n,customTags)){throw new Error('Nesting error: '+ opener.n+' vs. '+ token.n);}
opener.end=token.i;return instructions;}else{instructions.push(token);}}
if(stack.length>0){throw new Error('missing closing tag: '+ stack.pop().n);}
return instructions;}
function isOpener(token,tags){for(var i=0,l=tags.length;i<l;i++){if(tags[i].o==token.n){token.tag='#';return true;}}}
function isCloser(close,open,tags){for(var i=0,l=tags.length;i<l;i++){if(tags[i].c==close&&tags[i].o==open){return true;}}}
Hogan.generate=function(tree,text,options){var code='var _=this;_.b(i=i||"");'+ walk(tree)+'return _.fl();';if(options.asString){return'function(c,p,i){'+ code+';}';}
return new Hogan.Template(new Function('c','p','i',code),text,Hogan,options);}
function esc(s){return s.replace(rSlash,'\\\\').replace(rQuot,'\\\"').replace(rNewline,'\\n').replace(rCr,'\\r');}
function chooseMethod(s){return(~s.indexOf('.'))?'d':'f';}
function walk(tree){var code='';for(var i=0,l=tree.length;i<l;i++){var tag=tree[i].tag;if(tag=='#'){code+=section(tree[i].nodes,tree[i].n,chooseMethod(tree[i].n),tree[i].i,tree[i].end,tree[i].otag+" "+ tree[i].ctag);}else if(tag=='^'){code+=invertedSection(tree[i].nodes,tree[i].n,chooseMethod(tree[i].n));}else if(tag=='<'||tag=='>'){code+=partial(tree[i]);}else if(tag=='{'||tag=='&'){code+=tripleStache(tree[i].n,chooseMethod(tree[i].n));}else if(tag=='\n'){code+=text('"\\n"'+(tree.length-1==i?'':' + i'));}else if(tag=='_v'){code+=variable(tree[i].n,chooseMethod(tree[i].n));}else if(tag===undefined){code+=text('"'+ esc(tree[i])+'"');}}
return code;}
function section(nodes,id,method,start,end,tags){return'if(_.s(_.'+ method+'("'+ esc(id)+'",c,p,1),'+'c,p,0,'+ start+','+ end+',"'+ tags+'")){'+'_.rs(c,p,'+'function(c,p,_){'+
walk(nodes)+'});c.pop();}';}
function invertedSection(nodes,id,method){return'if(!_.s(_.'+ method+'("'+ esc(id)+'",c,p,1),c,p,1,0,0,"")){'+
walk(nodes)+'};';}
function partial(tok){return'_.b(_.rp("'+ esc(tok.n)+'",c,p,"'+(tok.indent||'')+'"));';}
function tripleStache(id,method){return'_.b(_.t(_.'+ method+'("'+ esc(id)+'",c,p,0)));';}
function variable(id,method){return'_.b(_.v(_.'+ method+'("'+ esc(id)+'",c,p,0)));';}
function text(id){return'_.b('+ id+');';}
Hogan.parse=function(tokens,text,options){options=options||{};return buildTree(tokens,'',[],options.sectionTags||[]);},Hogan.cache={};Hogan.compile=function(text,options){options=options||{};var key=text+'||'+!!options.asString;var t=this.cache[key];if(t){return t;}
t=this.generate(this.parse(this.scan(text,options.delimiters),text,options),text,options);return this.cache[key]=t;};})(typeof exports!=='undefined'?exports:Hogan);
-22
View File
@@ -1,22 +0,0 @@
(function(window){'use strict';var $=window.jQuery;var console=window.console;var hasConsole=typeof console!=='undefined';function extend(a,b){for(var prop in b){a[prop]=b[prop];}
return a;}
var objToString=Object.prototype.toString;function isArray(obj){return objToString.call(obj)==='[object Array]';}
function makeArray(obj){var ary=[];if(isArray(obj)){ary=obj;}else if(typeof obj.length==='number'){for(var i=0,len=obj.length;i<len;i++){ary.push(obj[i]);}}else{ary.push(obj);}
return ary;}
function defineImagesLoaded(EventEmitter,eventie){function ImagesLoaded(elem,options,onAlways){if(!(this instanceof ImagesLoaded)){return new ImagesLoaded(elem,options);}
if(typeof elem==='string'){elem=document.querySelectorAll(elem);}
this.elements=makeArray(elem);this.options=extend({},this.options);if(typeof options==='function'){onAlways=options;}else{extend(this.options,options);}
if(onAlways){this.on('always',onAlways);}
this.getImages();if($){this.jqDeferred=new $.Deferred();}
var _this=this;setTimeout(function(){_this.check();});}
ImagesLoaded.prototype=new EventEmitter();ImagesLoaded.prototype.options={};ImagesLoaded.prototype.getImages=function(){this.images=[];for(var i=0,len=this.elements.length;i<len;i++){var elem=this.elements[i];if(elem.nodeName==='IMG'){this.addImage(elem);}
var childElems=elem.querySelectorAll('img');for(var j=0,jLen=childElems.length;j<jLen;j++){var img=childElems[j];this.addImage(img);}}};ImagesLoaded.prototype.addImage=function(img){var loadingImage=new LoadingImage(img);this.images.push(loadingImage);};ImagesLoaded.prototype.check=function(){var _this=this;var checkedCount=0;var length=this.images.length;this.hasAnyBroken=false;if(!length){this.complete();return;}
function onConfirm(image,message){if(_this.options.debug&&hasConsole){console.log('confirm',image,message);}
_this.progress(image);checkedCount++;if(checkedCount===length){_this.complete();}
return true;}
for(var i=0;i<length;i++){var loadingImage=this.images[i];loadingImage.on('confirm',onConfirm);loadingImage.check();}};ImagesLoaded.prototype.progress=function(image){this.hasAnyBroken=this.hasAnyBroken||!image.isLoaded;this.emit('progress',this,image);if(this.jqDeferred){this.jqDeferred.notify(this,image);}};ImagesLoaded.prototype.complete=function(){var eventName=this.hasAnyBroken?'fail':'done';this.isComplete=true;this.emit(eventName,this);this.emit('always',this);if(this.jqDeferred){var jqMethod=this.hasAnyBroken?'reject':'resolve';this.jqDeferred[jqMethod](this);}};if($){$.fn.imagesLoaded=function(options,callback){var instance=new ImagesLoaded(this,options,callback);return instance.jqDeferred.promise($(this));};}
var cache={};function LoadingImage(img){this.img=img;}
LoadingImage.prototype=new EventEmitter();LoadingImage.prototype.check=function(){var cached=cache[this.img.src];if(cached){this.useCached(cached);return;}
cache[this.img.src]=this;if(this.img.complete&&this.img.naturalWidth!==undefined){this.confirm(this.img.naturalWidth!==0,'naturalWidth');return;}
var proxyImage=this.proxyImage=new Image();eventie.bind(proxyImage,'load',this);eventie.bind(proxyImage,'error',this);proxyImage.src=this.img.src;};LoadingImage.prototype.useCached=function(cached){if(cached.isConfirmed){this.confirm(cached.isLoaded,'cached was confirmed');}else{var _this=this;cached.on('confirm',function(image){_this.confirm(image.isLoaded,'cache emitted confirmed');return true;});}};LoadingImage.prototype.confirm=function(isLoaded,message){this.isConfirmed=true;this.isLoaded=isLoaded;this.emit('confirm',this,message);};LoadingImage.prototype.handleEvent=function(event){var method='on'+ event.type;if(this[method]){this[method](event);}};LoadingImage.prototype.onload=function(){this.confirm(true,'onload');this.unbindProxyEvents();};LoadingImage.prototype.onerror=function(){this.confirm(false,'onerror');this.unbindProxyEvents();};LoadingImage.prototype.unbindProxyEvents=function(){eventie.unbind(this.proxyImage,'load',this);eventie.unbind(this.proxyImage,'error',this);};return ImagesLoaded;}
if(typeof define==='function'&&define.amd){define(['eventEmitter','eventie'],defineImagesLoaded);}else{window.imagesLoaded=defineImagesLoaded(window.EventEmitter,window.eventie);}})(window);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,5 +0,0 @@
(function(window,document,undefined){var factory=function($,DataTable){"use strict";$.extend(true,DataTable.defaults,{dom:"<'row'<'col-xs-6'l><'col-xs-6'f>r>"+"t"+"<'row'<'col-xs-6'i><'col-xs-6'p>>",renderer:'bootstrap'});$.extend(DataTable.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});DataTable.ext.renderer.pageButton.bootstrap=function(settings,host,idx,buttons,page,pages){var api=new DataTable.Api(settings);var classes=settings.oClasses;var lang=settings.oLanguage.oPaginate;var btnDisplay,btnClass;var attach=function(container,buttons){var i,ien,node,button;var clickHandler=function(e){e.preventDefault();if(e.data.action!=='ellipsis'){api.page(e.data.action).draw(false);}};for(i=0,ien=buttons.length;i<ien;i++){button=buttons[i];if($.isArray(button)){attach(container,button);}
else{btnDisplay='';btnClass='';switch(button){case'ellipsis':btnDisplay='&hellip;';btnClass='disabled';break;case'first':btnDisplay=lang.sFirst;btnClass=button+(page>0?'':' disabled');break;case'previous':btnDisplay='<i class="fa fa-chevron-left"></i>';btnClass=button+(page>0?'':' disabled');break;case'next':btnDisplay='<i class="fa fa-chevron-right"></i>';btnClass=button+(page<pages-1?'':' disabled');break;case'last':btnDisplay=lang.sLast;btnClass=button+(page<pages-1?'':' disabled');break;default:btnDisplay=button+ 1;btnClass=page===button?'active':'';break;}
if(btnDisplay){node=$('<li>',{'class':classes.sPageButton+' '+btnClass,'aria-controls':settings.sTableId,'tabindex':settings.iTabIndex,'id':idx===0&&typeof button==='string'?settings.sTableId+'_'+ button:null}).append($('<a>',{'href':'#'}).html(btnDisplay)).appendTo(container);settings.oApi._fnBindAction(node,{action:button},clickHandler);}}}};attach($(host).empty().html('<ul class="pagination pull-right"/>').children('ul'),buttons);};if(DataTable.TableTools){$.extend(true,DataTable.TableTools.classes,{"container":"DTTT btn-group","buttons":{"normal":"btn btn-primary","disabled":"disabled"},"collection":{"container":"DTTT_dropdown dropdown-menu","buttons":{"normal":"","disabled":"disabled"}},"print":{"info":"DTTT_print_info modal"},"select":{"row":"active"}});$.extend(true,DataTable.TableTools.DEFAULTS.oTags,{"collection":{"container":"ul","button":"li","liner":"a"}});}};if(typeof define==='function'&&define.amd){define(['jquery','datatables'],factory);}
else if(typeof exports==='object'){factory(require('jquery'),require('datatables'));}
else if(jQuery){factory(jQuery,jQuery.fn.dataTable);}})(window,document);
File diff suppressed because one or more lines are too long
-9
View File
@@ -1,9 +0,0 @@
/**!
* easyPieChart
* Lightweight plugin to render simple, animated and retina optimized pie charts
*
* @license
* @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
* @version 2.1.5
**/
!function(a,b){"object"==typeof exports?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));e.easing="string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?jQuery.easing[e.easing]:d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}});
-15
View File
@@ -1,15 +0,0 @@
/**
* jQuery Grid-A-Licious(tm) v3.01
*
* Terms of Use - jQuery Grid-A-Licious(tm)
* under the MIT (http://www.opensource.org/licenses/mit-license.php) License.
*
* Copyright 2008-2012 Andreas Pihlström (Suprb). All rights reserved.
* (http://suprb.com/apps/gridalicious/)
*
*/
// Debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
// Copy pasted from http://paulirish.com/2009/throttled-smartresize-jquery-event-handler/
(function(a,b){var c=function(a,b,c){var d;return function(){function h(){if(!c)a.apply(f,g);d=null}var f=this,g=arguments;if(d)clearTimeout(d);else if(c)a.apply(f,g);d=setTimeout(h,b||150)}};jQuery.fn[b]=function(a){return a?this.bind("resize",c(a)):this.trigger(b)}})(jQuery,"smartresize");(function(a){a.Gal=function(b,c){this.element=a(c);this._init(b)};a.Gal.settings={selector:".item",width:225,gutter:20,animate:false,animationOptions:{speed:200,duration:300,effect:"fadeInOnAppear",queue:true,complete:function(){}}};a.Gal.prototype={_init:function(b){var c=this;this.name=this._setName(5);this.gridArr=[];this.gridArrAppend=[];this.gridArrPrepend=[];this.setArr=false;this.setGrid=false;this.setOptions;this.cols=0;this.itemCount=0;this.prependCount=0;this.isPrepending=false;this.appendCount=0;this.resetCount=true;this.ifCallback=true;this.box=this.element;this.options=a.extend(true,{},a.Gal.settings,b);this.gridArr=a.makeArray(this.box.find(this.options.selector));this.isResizing=false;this.w=0;this.boxArr=[];this._setCols();this._renderGrid("append");a(this.box).addClass("gridalicious");a(window).smartresize(function(){c.resize()})},_setName:function(a,b){b=b?b:"";return a?this._setName(--a,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".charAt(Math.floor(Math.random()*60))+b):b},_setCols:function(){this.cols=Math.floor(this.box.width()/this.options.width);diff=(this.box.width()-this.cols*this.options.width-this.options.gutter)/this.cols;w=(this.options.width+diff)/this.box.width()*100;this.w=w;for(var b=0;b<this.cols;b++){var c=a("<div></div>").addClass("galcolumn").attr("id","item"+b+this.name).css({width:w+"%",paddingLeft:this.options.gutter,paddingBottom:this.options.gutter,"float":"left","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","-o-box-sizing":"border-box","box-sizing":"border-box"});this.box.append(c)}this.box.find(a("#clear"+this.name)).remove();var d=a("<div></div>").css({clear:"both",height:"0",width:"0",display:"block"}).attr("id","clear"+this.name);this.box.append(d)},_renderGrid:function(b,c,d,e){var f=[];var g=[];var h=[];var i=0;var j=this.prependCount;var k=this.appendCount;var l=this.options.gutter;var m=this.cols;var n=this.name;var o=0;var p=a(".galcolumn").width();if(c){g=c;if(b=="append"){k+=d;i=this.appendCount}if(b=="prepend"){this.isPrepending=true;i=Math.round(d%m);if(i<=0)i=m}if(b=="renderAfterPrepend"){k+=d;i=d}}else{g=this.gridArr;k=a(this.gridArr).size()}a.each(g,function(c,d){var e=a(d);var g="100%";if(e.hasClass("not-responsive")){g="auto"}e.css({marginBottom:l,zoom:"1",filter:"alpha(opacity=0)",opacity:"0"}).find("img, object, embed, iframe").css({width:g,height:"auto",display:"block","margin-left":"auto","margin-right":"auto"});if(b=="prepend"){i--;a("#item"+i+n).prepend(e);f.push(e);if(i==0)i=m}else{a("#item"+i+n).append(e);f.push(e);i++;if(i>=m)i=0;if(k>=m)k=k-m}});this.appendCount=k;this.itemCount=i;if(b=="append"||b=="prepend"){if(b=="prepend"){this._updateAfterPrepend(this.gridArr,g)}this._renderItem(f);this.isPrepending=false}else{this._renderItem(this.gridArr)}},_collectItems:function(){var b=[];a(this.box).find(this.options.selector).each(function(c){b.push(a(this))});return b},_renderItem:function(b){var c=this.options.animationOptions.speed;var d=this.options.animationOptions.effect;var e=this.options.animationOptions.duration;var f=this.options.animationOptions.queue;var g=this.options.animate;var h=this.options.animationOptions.complete;var i=0;var j=0;if(g===true&&!this.isResizing){if(f===true&&d=="fadeInOnAppear"){if(this.isPrepending)b.reverse();a.each(b,function(d,f){setTimeout(function(){a(f).animate({opacity:"1.0"},e);j++;if(j==b.length){h.call(undefined,b)}},i*c);i++})}else if(f===false&&d=="fadeInOnAppear"){if(this.isPrepending)b.reverse();a.each(b,function(c,d){a(d).animate({opacity:"1.0"},e);j++;if(j==b.length){if(this.ifCallback){h.call(undefined,b)}}})}if(f===true&&!d){a.each(b,function(c,d){a(d).css({opacity:"1",filter:"alpha(opacity=1)"});j++;if(j==b.length){if(this.ifCallback){h.call(undefined,b)}}})}}else{a.each(b,function(b,c){a(c).css({opacity:"1",filter:"alpha(opacity=1)"})});if(this.ifCallback){h.call(b)}}},_updateAfterPrepend:function(b,c){var d=this.gridArr;a.each(c,function(a,b){d.unshift(b)});this.gridArr=d},resize:function(){this.box.find(a(".galcolumn")).remove();this._setCols();this.ifCallback=false;this.isResizing=true;this._renderGrid("append");this.ifCallback=true;this.isResizing=false},append:function(b){var c=this.gridArr;var d=this.gridArrPrepend;a.each(b,function(a,b){c.push(b);d.push(b)});this._renderGrid("append",b,a(b).size())},prepend:function(b){this.ifCallback=false;this._renderGrid("prepend",b,a(b).size());this.ifCallback=true}};a.fn.gridalicious=function(b,c){if(typeof b==="string"){this.each(function(){var d=a.data(this,"gridalicious");d[b].apply(d,[c])})}else{this.each(function(){a.data(this,"gridalicious",new a.Gal(b,this))})}return this}})(jQuery)
@@ -1,9 +0,0 @@
(function(jQuery){jQuery.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",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",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":"\"",",":"<",".":">","/":"?","\\":"|"}};function keyHandler(handleObj){if(typeof handleObj.data!=="string"){return;}
var origHandler=handleObj.handler,keys=handleObj.data.toLowerCase().split(" "),textAcceptingInputTypes=["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color"];handleObj.handler=function(event){if(this!==event.target&&(/textarea|select/i.test(event.target.nodeName)||jQuery.inArray(event.target.type,textAcceptingInputTypes)>-1)){return;}
var special=event.type!=="keypress"&&jQuery.hotkeys.specialKeys[event.which],character=String.fromCharCode(event.which).toLowerCase(),key,modif="",possible={};if(event.altKey&&special!=="alt"){modif+="alt+";}
if(event.ctrlKey&&special!=="ctrl"){modif+="ctrl+";}
if(event.metaKey&&!event.ctrlKey&&special!=="meta"){modif+="meta+";}
if(event.shiftKey&&special!=="shift"){modif+="shift+";}
if(special){possible[modif+ special]=true;}else{possible[modif+ character]=true;possible[modif+ jQuery.hotkeys.shiftNums[character]]=true;if(modif==="shift+"){possible[jQuery.hotkeys.shiftNums[character]]=true;}}
for(var i=0,l=keys.length;i<l;i++){if(possible[keys[i]]){return origHandler.apply(this,arguments);}}};}
jQuery.each(["keydown","keyup","keypress"],function(){jQuery.event.special[this]={add:keyHandler};});})(jQuery);
File diff suppressed because one or more lines are too long
-23
View File
@@ -1,23 +0,0 @@
(function($){"use strict";var k={},max=Math.max,min=Math.min;k.c={};k.c.d=$(document);k.c.t=function(e){return e.originalEvent.touches.length- 1;};k.o=function(){var s=this;this.o=null;this.$=null;this.i=null;this.g=null;this.v=null;this.cv=null;this.x=0;this.y=0;this.w=0;this.h=0;this.$c=null;this.c=null;this.t=0;this.isInit=false;this.fgColor=null;this.pColor=null;this.dH=null;this.cH=null;this.eH=null;this.rH=null;this.scale=1;this.relative=false;this.relativeWidth=false;this.relativeHeight=false;this.$div=null;this.run=function(){var cf=function(e,conf){var k;for(k in conf){s.o[k]=conf[k];}
s.init();s._configure()._draw();};if(this.$.data('kontroled'))return;this.$.data('kontroled',true);this.extend();this.o=$.extend({min:this.$.data('min')||0,max:this.$.data('max')||100,stopper:true,readOnly:this.$.data('readonly'),cursor:(this.$.data('cursor')===true&&30)||this.$.data('cursor')||0,thickness:this.$.data('thickness')||0.35,lineCap:this.$.data('linecap')||'butt',width:this.$.data('width')||200,height:this.$.data('height')||200,displayInput:this.$.data('displayinput')==null||this.$.data('displayinput'),displayPrevious:this.$.data('displayprevious'),fgColor:this.$.data('fgcolor')||'#87CEEB',inputColor:this.$.data('inputcolor')||this.$.data('fgcolor')||'#87CEEB',font:this.$.data('font')||'Arial',fontWeight:this.$.data('font-weight')||'bold',inline:false,step:this.$.data('step')||1,draw:null,change:null,cancel:null,release:null,error:null},this.o);if(this.$.is('fieldset')){this.v={};this.i=this.$.find('input')
this.i.each(function(k){var $this=$(this);s.i[k]=$this;s.v[k]=$this.val();$this.bind('change',function(){var val={};val[k]=$this.val();s.val(val);});});this.$.find('legend').remove();}else{this.i=this.$;this.v=this.$.val();(this.v=='')&&(this.v=this.o.min);this.$.bind('change',function(){s.val(s._validate(s.$.val()));});}
(!this.o.displayInput)&&this.$.hide();this.$c=$(document.createElement('canvas'));if(typeof G_vmlCanvasManager!=='undefined'){G_vmlCanvasManager.initElement(this.$c[0]);}
this.c=this.$c[0].getContext?this.$c[0].getContext('2d'):null;if(!this.c){this.o.error&&this.o.error();return;}
this.scale=(window.devicePixelRatio||1)/
(this.c.webkitBackingStorePixelRatio||this.c.mozBackingStorePixelRatio||this.c.msBackingStorePixelRatio||this.c.oBackingStorePixelRatio||this.c.backingStorePixelRatio||1);this.relativeWidth=((this.o.width%1!==0)&&this.o.width.indexOf('%'));this.relativeHeight=((this.o.height%1!==0)&&this.o.height.indexOf('%'));this.relative=(this.relativeWidth||this.relativeHeight);this.$div=$('<div style="'
+(this.o.inline?'display:inline;':'')
+'"></div>');this.$.wrap(this.$div).before(this.$c);this.$div=this.$.parent();this._carve();if(this.v instanceof Object){this.cv={};this.copy(this.v,this.cv);}else{this.cv=this.v;}
this.$.bind("configure",cf).parent().bind("configure",cf);this._listen()._configure()._xy().init();this.isInit=true;this._draw();return this;};this._carve=function(){if(this.relative){var w=this.relativeWidth?this.$div.parent().width()*parseInt(this.o.width)/ 100
:this.$div.parent().width(),h=this.relativeHeight?this.$div.parent().height()*parseInt(this.o.height)/ 100
:this.$div.parent().height();this.w=this.h=Math.min(w,h);}else{this.w=this.o.width;this.h=this.o.height;}
this.$div.css({'width':this.w+'px','height':this.h+'px'});this.$c.attr({width:this.w,height:this.h});if(this.scale!==1){this.$c[0].width=this.$c[0].width*this.scale;this.$c[0].height=this.$c[0].height*this.scale;this.$c.width(this.w);this.$c.height(this.h);}
return this;}
this._draw=function(){var d=true;s.g=s.c;s.clear();s.dH&&(d=s.dH());(d!==false)&&s.draw();};this._touch=function(e){var touchMove=function(e){var v=s.xy2val(e.originalEvent.touches[s.t].pageX,e.originalEvent.touches[s.t].pageY);if(v==s.cv)return;if(s.cH&&(s.cH(v)===false))return;s.change(s._validate(v));s._draw();};this.t=k.c.t(e);touchMove(e);k.c.d.bind("touchmove.k",touchMove).bind("touchend.k",function(){k.c.d.unbind('touchmove.k touchend.k');if(s.rH&&(s.rH(s.cv)===false))return;s.val(s.cv);});return this;};this._mouse=function(e){var mouseMove=function(e){var v=s.xy2val(e.pageX,e.pageY);if(v==s.cv)return;if(s.cH&&(s.cH(v)===false))return;s.change(s._validate(v));s._draw();};mouseMove(e);k.c.d.bind("mousemove.k",mouseMove).bind("keyup.k",function(e){if(e.keyCode===27){k.c.d.unbind("mouseup.k mousemove.k keyup.k");if(s.eH&&(s.eH()===false))return;s.cancel();}}).bind("mouseup.k",function(e){k.c.d.unbind('mousemove.k mouseup.k keyup.k');if(s.rH&&(s.rH(s.cv)===false))return;s.val(s.cv);});return this;};this._xy=function(){var o=this.$c.offset();this.x=o.left;this.y=o.top;return this;};this._listen=function(){if(!this.o.readOnly){this.$c.bind("mousedown",function(e){e.preventDefault();s._xy()._mouse(e);}).bind("touchstart",function(e){e.preventDefault();s._xy()._touch(e);});if(this.relative){$(window).resize(function(){s._carve().init();s._draw();});}
this.listen();}else{this.$.attr('readonly','readonly');}
return this;};this._configure=function(){if(this.o.draw)this.dH=this.o.draw;if(this.o.change)this.cH=this.o.change;if(this.o.cancel)this.eH=this.o.cancel;if(this.o.release)this.rH=this.o.release;if(this.o.displayPrevious){this.pColor=this.h2rgba(this.o.fgColor,"0.4");this.fgColor=this.h2rgba(this.o.fgColor,"0.6");}else{this.fgColor=this.o.fgColor;}
return this;};this._clear=function(){this.$c[0].width=this.$c[0].width;};this._validate=function(v){return(~~(((v<0)?-0.5:0.5)+(v/this.o.step)))*this.o.step;};this.listen=function(){};this.extend=function(){};this.init=function(){};this.change=function(v){};this.val=function(v){};this.xy2val=function(x,y){};this.draw=function(){};this.clear=function(){this._clear();};this.h2rgba=function(h,a){var rgb;h=h.substring(1,7)
rgb=[parseInt(h.substring(0,2),16),parseInt(h.substring(2,4),16),parseInt(h.substring(4,6),16)];return"rgba("+ rgb[0]+","+ rgb[1]+","+ rgb[2]+","+ a+")";};this.copy=function(f,t){for(var i in f){t[i]=f[i];}};};k.Dial=function(){k.o.call(this);this.startAngle=null;this.xy=null;this.radius=null;this.lineWidth=null;this.cursorExt=null;this.w2=null;this.PI2=2*Math.PI;this.extend=function(){this.o=$.extend({bgColor:this.$.data('bgcolor')||'#EEEEEE',angleOffset:this.$.data('angleoffset')||0,angleArc:this.$.data('anglearc')||360,inline:true},this.o);};this.val=function(v){if(null!=v){this.cv=this.o.stopper?max(min(v,this.o.max),this.o.min):v;this.v=this.cv;this.$.val(this.v);this._draw();}else{return this.v;}};this.xy2val=function(x,y){var a,ret;a=Math.atan2(x-(this.x+ this.w2),-(y- this.y- this.w2))- this.angleOffset;if(this.angleArc!=this.PI2&&(a<0)&&(a>-0.5)){a=0;}else if(a<0){a+=this.PI2;}
ret=~~(0.5+(a*(this.o.max- this.o.min)/ this.angleArc))
+ this.o.min;this.o.stopper&&(ret=max(min(ret,this.o.max),this.o.min));return ret;};this.listen=function(){var s=this,mw=function(e){e.preventDefault();var ori=e.originalEvent,deltaX=ori.detail||ori.wheelDeltaX,deltaY=ori.detail||ori.wheelDeltaY,v=parseInt(s.$.val())+(deltaX>0||deltaY>0?s.o.step:deltaX<0||deltaY<0?-s.o.step:0);if(s.cH&&(s.cH(v)===false))return;s.val(v);},kval,to,m=1,kv={37:-s.o.step,38:s.o.step,39:s.o.step,40:-s.o.step};this.$.bind("keydown",function(e){var kc=e.keyCode;if(kc>=96&&kc<=105){kc=e.keyCode=kc- 48;}
kval=parseInt(String.fromCharCode(kc));if(isNaN(kval)){(kc!==13)&&(kc!==8)&&(kc!==9)&&(kc!==189)&&e.preventDefault();if($.inArray(kc,[37,38,39,40])>-1){e.preventDefault();var v=parseInt(s.$.val())+ kv[kc]*m;s.o.stopper&&(v=max(min(v,s.o.max),s.o.min));s.change(v);s._draw();to=window.setTimeout(function(){m*=2;},30);}}}).bind("keyup",function(e){if(isNaN(kval)){if(to){window.clearTimeout(to);to=null;m=1;s.val(s.$.val());}}else{(s.$.val()>s.o.max&&s.$.val(s.o.max))||(s.$.val()<s.o.min&&s.$.val(s.o.min));}});this.$c.bind("mousewheel DOMMouseScroll",mw);this.$.bind("mousewheel DOMMouseScroll",mw)};this.init=function(){if(this.v<this.o.min||this.v>this.o.max)this.v=this.o.min;this.$.val(this.v);this.w2=this.w/2;this.cursorExt=this.o.cursor/100;this.xy=this.w2*this.scale;this.lineWidth=this.xy*this.o.thickness;this.lineCap=this.o.lineCap;this.radius=this.xy- this.lineWidth/2;this.o.angleOffset&&(this.o.angleOffset=isNaN(this.o.angleOffset)?0:this.o.angleOffset);this.o.angleArc&&(this.o.angleArc=isNaN(this.o.angleArc)?this.PI2:this.o.angleArc);this.angleOffset=this.o.angleOffset*Math.PI/180;this.angleArc=this.o.angleArc*Math.PI/180;this.startAngle=1.5*Math.PI+ this.angleOffset;this.endAngle=1.5*Math.PI+ this.angleOffset+ this.angleArc;var s=max(String(Math.abs(this.o.max)).length,String(Math.abs(this.o.min)).length,2)+ 2;this.o.displayInput&&this.i.css({'width':((this.w/2+ 4)>>0)+'px','height':((this.w/3)>>0)+'px','position':'absolute','vertical-align':'middle','margin-top':((this.w/3)>>0)+'px','margin-left':'-'+((this.w*3/4+ 2)>>0)+'px','border':0,'background':'none','font':this.o.fontWeight+' '+((this.w/s)>>0)+'px '+ this.o.font,'text-align':'center','color':this.o.inputColor||this.o.fgColor,'padding':'0px','-webkit-appearance':'none'})||this.i.css({'width':'0px','visibility':'hidden'});};this.change=function(v){this.cv=v;this.$.val(v);};this.angle=function(v){return(v- this.o.min)*this.angleArc/(this.o.max- this.o.min);};this.draw=function(){var c=this.g,a=this.angle(this.cv),sat=this.startAngle,eat=sat+ a,sa,ea,r=1;c.lineWidth=this.lineWidth;c.lineCap=this.lineCap;this.o.cursor&&(sat=eat- this.cursorExt)&&(eat=eat+ this.cursorExt);c.beginPath();c.strokeStyle=this.o.bgColor;c.arc(this.xy,this.xy,this.radius,this.endAngle,this.startAngle,true);c.stroke();if(this.o.displayPrevious){ea=this.startAngle+ this.angle(this.v);sa=this.startAngle;this.o.cursor&&(sa=ea- this.cursorExt)&&(ea=ea+ this.cursorExt);c.beginPath();c.strokeStyle=this.pColor;c.arc(this.xy,this.xy,this.radius,sa,ea,false);c.stroke();r=(this.cv==this.v);}
c.beginPath();c.strokeStyle=r?this.o.fgColor:this.fgColor;c.arc(this.xy,this.xy,this.radius,sat,eat,false);c.stroke();};this.cancel=function(){this.val(this.v);};};$.fn.dial=$.fn.knob=function(o){return this.each(function(){var d=new k.Dial();d.o=o;d.$=$(this);d.run();}).parent();};})(jQuery);
File diff suppressed because one or more lines are too long
-7
View File
@@ -1,7 +0,0 @@
/*
Masked Input plugin for jQuery
Copyright (c) 2007-2013 Josh Bush (digitalbush.com)
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
Version: 1.3.1
*/
(function(e){function t(){var e=document.createElement("input"),t="onpaste";return e.setAttribute(t,""),"function"==typeof e[t]?"paste":"input"}var n,a=t()+".mask",r=navigator.userAgent,i=/iphone/i.test(r),o=/android/i.test(r);e.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn",placeholder:"_"},e.fn.extend({caret:function(e,t){var n;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof e?(t="number"==typeof t?t:e,this.each(function(){this.setSelectionRange?this.setSelectionRange(e,t):this.createTextRange&&(n=this.createTextRange(),n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select())})):(this[0].setSelectionRange?(e=this[0].selectionStart,t=this[0].selectionEnd):document.selection&&document.selection.createRange&&(n=document.selection.createRange(),e=0-n.duplicate().moveStart("character",-1e5),t=e+n.text.length),{begin:e,end:t})},unmask:function(){return this.trigger("unmask")},mask:function(t,r){var c,l,s,u,f,h;return!t&&this.length>0?(c=e(this[0]),c.data(e.mask.dataName)()):(r=e.extend({placeholder:e.mask.placeholder,completed:null},r),l=e.mask.definitions,s=[],u=h=t.length,f=null,e.each(t.split(""),function(e,t){"?"==t?(h--,u=e):l[t]?(s.push(RegExp(l[t])),null===f&&(f=s.length-1)):s.push(null)}),this.trigger("unmask").each(function(){function c(e){for(;h>++e&&!s[e];);return e}function d(e){for(;--e>=0&&!s[e];);return e}function m(e,t){var n,a;if(!(0>e)){for(n=e,a=c(t);h>n;n++)if(s[n]){if(!(h>a&&s[n].test(R[a])))break;R[n]=R[a],R[a]=r.placeholder,a=c(a)}b(),x.caret(Math.max(f,e))}}function p(e){var t,n,a,i;for(t=e,n=r.placeholder;h>t;t++)if(s[t]){if(a=c(t),i=R[t],R[t]=n,!(h>a&&s[a].test(i)))break;n=i}}function g(e){var t,n,a,r=e.which;8===r||46===r||i&&127===r?(t=x.caret(),n=t.begin,a=t.end,0===a-n&&(n=46!==r?d(n):a=c(n-1),a=46===r?c(a):a),k(n,a),m(n,a-1),e.preventDefault()):27==r&&(x.val(S),x.caret(0,y()),e.preventDefault())}function v(t){var n,a,i,l=t.which,u=x.caret();t.ctrlKey||t.altKey||t.metaKey||32>l||l&&(0!==u.end-u.begin&&(k(u.begin,u.end),m(u.begin,u.end-1)),n=c(u.begin-1),h>n&&(a=String.fromCharCode(l),s[n].test(a)&&(p(n),R[n]=a,b(),i=c(n),o?setTimeout(e.proxy(e.fn.caret,x,i),0):x.caret(i),r.completed&&i>=h&&r.completed.call(x))),t.preventDefault())}function k(e,t){var n;for(n=e;t>n&&h>n;n++)s[n]&&(R[n]=r.placeholder)}function b(){x.val(R.join(""))}function y(e){var t,n,a=x.val(),i=-1;for(t=0,pos=0;h>t;t++)if(s[t]){for(R[t]=r.placeholder;pos++<a.length;)if(n=a.charAt(pos-1),s[t].test(n)){R[t]=n,i=t;break}if(pos>a.length)break}else R[t]===a.charAt(pos)&&t!==u&&(pos++,i=t);return e?b():u>i+1?(x.val(""),k(0,h)):(b(),x.val(x.val().substring(0,i+1))),u?t:f}var x=e(this),R=e.map(t.split(""),function(e){return"?"!=e?l[e]?r.placeholder:e:void 0}),S=x.val();x.data(e.mask.dataName,function(){return e.map(R,function(e,t){return s[t]&&e!=r.placeholder?e:null}).join("")}),x.attr("readonly")||x.one("unmask",function(){x.unbind(".mask").removeData(e.mask.dataName)}).bind("focus.mask",function(){clearTimeout(n);var e;S=x.val(),e=y(),n=setTimeout(function(){b(),e==t.length?x.caret(0,e):x.caret(e)},10)}).bind("blur.mask",function(){y(),x.val()!=S&&x.change()}).bind("keydown.mask",g).bind("keypress.mask",v).bind(a,function(){setTimeout(function(){var e=y(!0);x.caret(e),r.completed&&e==x.val().length&&r.completed.call(x)},0)}),y()}))}})})(jQuery);
@@ -1,52 +0,0 @@
;(function($,window,document,undefined)
{var hasTouch='ontouchstart'in window;var hasPointerEvents=(function()
{var el=document.createElement('div'),docEl=document.documentElement;if(!('pointerEvents'in el.style)){return false;}
el.style.pointerEvents='auto';el.style.pointerEvents='x';docEl.appendChild(el);var supports=window.getComputedStyle&&window.getComputedStyle(el,'').pointerEvents==='auto';docEl.removeChild(el);return!!supports;})();var eStart=hasTouch?'touchstart':'mousedown',eMove=hasTouch?'touchmove':'mousemove',eEnd=hasTouch?'touchend':'mouseup';eCancel=hasTouch?'touchcancel':'mouseup';var defaults={listNodeName:'ol',itemNodeName:'li',rootClass:'dd',listClass:'dd-list',itemClass:'dd-item',dragClass:'dd-dragel',handleClass:'dd-handle',collapsedClass:'dd-collapsed',placeClass:'dd-placeholder',noDragClass:'dd-nodrag',emptyClass:'dd-empty',expandBtnHTML:'<button data-action="expand" type="button">Expand</button>',collapseBtnHTML:'<button data-action="collapse" type="button">Collapse</button>',group:0,maxDepth:5,threshold:20};function Plugin(element,options)
{this.w=$(window);this.el=$(element);this.options=$.extend({},defaults,options);this.init();}
Plugin.prototype={init:function()
{var list=this;list.reset();list.el.data('nestable-group',this.options.group);list.placeEl=$('<div class="'+ list.options.placeClass+'"/>');$.each(this.el.find(list.options.itemNodeName),function(k,el){list.setParent($(el));});list.el.on('click','button',function(e){if(list.dragEl||(!hasTouch&&e.button!==0)){return;}
var target=$(e.currentTarget),action=target.data('action'),item=target.parent(list.options.itemNodeName);if(action==='collapse'){list.collapseItem(item);}
if(action==='expand'){list.expandItem(item);}});var onStartEvent=function(e)
{var handle=$(e.target);if(!handle.hasClass(list.options.handleClass)){if(handle.closest('.'+ list.options.noDragClass).length){return;}
handle=handle.closest('.'+ list.options.handleClass);}
if(!handle.length||list.dragEl||(!hasTouch&&e.button!==0)||(hasTouch&&e.touches.length!==1)){return;}
e.preventDefault();list.dragStart(hasTouch?e.touches[0]:e);};var onMoveEvent=function(e)
{if(list.dragEl){e.preventDefault();list.dragMove(hasTouch?e.touches[0]:e);}};var onEndEvent=function(e)
{if(list.dragEl){e.preventDefault();list.dragStop(hasTouch?e.touches[0]:e);}};if(hasTouch){list.el[0].addEventListener(eStart,onStartEvent,false);window.addEventListener(eMove,onMoveEvent,false);window.addEventListener(eEnd,onEndEvent,false);window.addEventListener(eCancel,onEndEvent,false);}else{list.el.on(eStart,onStartEvent);list.w.on(eMove,onMoveEvent);list.w.on(eEnd,onEndEvent);}},serialize:function()
{var data,depth=0,list=this;step=function(level,depth)
{var array=[],items=level.children(list.options.itemNodeName);items.each(function()
{var li=$(this),item=$.extend({},li.data()),sub=li.children(list.options.listNodeName);if(sub.length){item.children=step(sub,depth+ 1);}
array.push(item);});return array;};data=step(list.el.find(list.options.listNodeName).first(),depth);return data;},serialise:function()
{return this.serialize();},reset:function()
{this.mouse={offsetX:0,offsetY:0,startX:0,startY:0,lastX:0,lastY:0,nowX:0,nowY:0,distX:0,distY:0,dirAx:0,dirX:0,dirY:0,lastDirX:0,lastDirY:0,distAxX:0,distAxY:0};this.moving=false;this.dragEl=null;this.dragRootEl=null;this.dragDepth=0;this.hasNewRoot=false;this.pointEl=null;},expandItem:function(li)
{li.removeClass(this.options.collapsedClass);li.children('[data-action="expand"]').hide();li.children('[data-action="collapse"]').show();li.children(this.options.listNodeName).show();},collapseItem:function(li)
{var lists=li.children(this.options.listNodeName);if(lists.length){li.addClass(this.options.collapsedClass);li.children('[data-action="collapse"]').hide();li.children('[data-action="expand"]').show();li.children(this.options.listNodeName).hide();}},expandAll:function()
{var list=this;list.el.find(list.options.itemNodeName).each(function(){list.expandItem($(this));});},collapseAll:function()
{var list=this;list.el.find(list.options.itemNodeName).each(function(){list.collapseItem($(this));});},setParent:function(li)
{if(li.children(this.options.listNodeName).length){li.prepend($(this.options.expandBtnHTML));li.prepend($(this.options.collapseBtnHTML));}
li.children('[data-action="expand"]').hide();},unsetParent:function(li)
{li.removeClass(this.options.collapsedClass);li.children('[data-action]').remove();li.children(this.options.listNodeName).remove();},dragStart:function(e)
{var mouse=this.mouse,target=$(e.target),dragItem=target.closest(this.options.itemNodeName);this.placeEl.css('height',dragItem.height());mouse.offsetX=e.offsetX!==undefined?e.offsetX:e.pageX- target.offset().left;mouse.offsetY=e.offsetY!==undefined?e.offsetY:e.pageY- target.offset().top;mouse.startX=mouse.lastX=e.pageX;mouse.startY=mouse.lastY=e.pageY;this.dragRootEl=this.el;this.dragEl=$(document.createElement(this.options.listNodeName)).addClass(this.options.listClass+' '+ this.options.dragClass);this.dragEl.css('width',dragItem.width());dragItem.after(this.placeEl);dragItem[0].parentNode.removeChild(dragItem[0]);dragItem.appendTo(this.dragEl);$(document.body).append(this.dragEl);this.dragEl.css({'left':e.pageX- mouse.offsetX,'top':e.pageY- mouse.offsetY});var i,depth,items=this.dragEl.find(this.options.itemNodeName);for(i=0;i<items.length;i++){depth=$(items[i]).parents(this.options.listNodeName).length;if(depth>this.dragDepth){this.dragDepth=depth;}}},dragStop:function(e)
{var el=this.dragEl.children(this.options.itemNodeName).first();el[0].parentNode.removeChild(el[0]);this.placeEl.replaceWith(el);this.dragEl.remove();this.el.trigger('change');if(this.hasNewRoot){this.dragRootEl.trigger('change');}
this.reset();},dragMove:function(e)
{var list,parent,prev,next,depth,opt=this.options,mouse=this.mouse;this.dragEl.css({'left':e.pageX- mouse.offsetX,'top':e.pageY- mouse.offsetY});mouse.lastX=mouse.nowX;mouse.lastY=mouse.nowY;mouse.nowX=e.pageX;mouse.nowY=e.pageY;mouse.distX=mouse.nowX- mouse.lastX;mouse.distY=mouse.nowY- mouse.lastY;mouse.lastDirX=mouse.dirX;mouse.lastDirY=mouse.dirY;mouse.dirX=mouse.distX===0?0:mouse.distX>0?1:-1;mouse.dirY=mouse.distY===0?0:mouse.distY>0?1:-1;var newAx=Math.abs(mouse.distX)>Math.abs(mouse.distY)?1:0;if(!mouse.moving){mouse.dirAx=newAx;mouse.moving=true;return;}
if(mouse.dirAx!==newAx){mouse.distAxX=0;mouse.distAxY=0;}else{mouse.distAxX+=Math.abs(mouse.distX);if(mouse.dirX!==0&&mouse.dirX!==mouse.lastDirX){mouse.distAxX=0;}
mouse.distAxY+=Math.abs(mouse.distY);if(mouse.dirY!==0&&mouse.dirY!==mouse.lastDirY){mouse.distAxY=0;}}
mouse.dirAx=newAx;if(mouse.dirAx&&mouse.distAxX>=opt.threshold){mouse.distAxX=0;prev=this.placeEl.prev(opt.itemNodeName);if(mouse.distX>0&&prev.length&&!prev.hasClass(opt.collapsedClass)){list=prev.find(opt.listNodeName).last();depth=this.placeEl.parents(opt.listNodeName).length;if(depth+ this.dragDepth<=opt.maxDepth){if(!list.length){list=$('<'+ opt.listNodeName+'/>').addClass(opt.listClass);list.append(this.placeEl);prev.append(list);this.setParent(prev);}else{list=prev.children(opt.listNodeName).last();list.append(this.placeEl);}}}
if(mouse.distX<0){next=this.placeEl.next(opt.itemNodeName);if(!next.length){parent=this.placeEl.parent();this.placeEl.closest(opt.itemNodeName).after(this.placeEl);if(!parent.children().length){this.unsetParent(parent.parent());}}}}
var isEmpty=false;if(!hasPointerEvents){this.dragEl[0].style.visibility='hidden';}
this.pointEl=$(document.elementFromPoint(e.pageX- document.body.scrollLeft,e.pageY-(window.pageYOffset||document.documentElement.scrollTop)));if(!hasPointerEvents){this.dragEl[0].style.visibility='visible';}
if(this.pointEl.hasClass(opt.handleClass)){this.pointEl=this.pointEl.parent(opt.itemNodeName);}
if(this.pointEl.hasClass(opt.emptyClass)){isEmpty=true;}
else if(!this.pointEl.length||!this.pointEl.hasClass(opt.itemClass)){return;}
var pointElRoot=this.pointEl.closest('.'+ opt.rootClass),isNewRoot=this.dragRootEl.data('nestable-id')!==pointElRoot.data('nestable-id');if(!mouse.dirAx||isNewRoot||isEmpty){if(isNewRoot&&opt.group!==pointElRoot.data('nestable-group')){return;}
depth=this.dragDepth- 1+ this.pointEl.parents(opt.listNodeName).length;if(depth>opt.maxDepth){return;}
var before=e.pageY<(this.pointEl.offset().top+ this.pointEl.height()/ 2);
parent=this.placeEl.parent();if(isEmpty){list=$(document.createElement(opt.listNodeName)).addClass(opt.listClass);list.append(this.placeEl);this.pointEl.replaceWith(list);}
else if(before){this.pointEl.before(this.placeEl);}
else{this.pointEl.after(this.placeEl);}
if(!parent.children().length){this.unsetParent(parent.parent());}
if(!this.dragRootEl.find(opt.itemNodeName).length){this.dragRootEl.append('<div class="'+ opt.emptyClass+'"/>');}
if(isNewRoot){this.dragRootEl=pointElRoot;this.hasNewRoot=this.el[0]!==this.dragRootEl[0];}}}};$.fn.nestable=function(params)
{var lists=this,retval=this;lists.each(function()
{var plugin=$(this).data("nestable");if(!plugin){$(this).data("nestable",new Plugin(this,params));$(this).data("nestable-id",new Date().getTime());}else{if(typeof params==='string'&&typeof plugin[params]==='function'){retval=plugin[params]();}}});return retval||lists;};})(window.jQuery||window.Zepto,window,document);
@@ -1,68 +0,0 @@
(function($,UNDEF){$.fn.noUiSlider=function(options){var namespace='.nui',all=$(document),actions={start:'mousedown'+ namespace+' touchstart'+ namespace,move:'mousemove'+ namespace+' touchmove'+ namespace,end:'mouseup'+ namespace+' touchend'+ namespace},$VAL=$.fn.val,clsList=['noUi-base','noUi-origin','noUi-handle','noUi-input','noUi-active','noUi-state-tap','noUi-target','-lower','-upper','noUi-connect','noUi-vertical','noUi-horizontal','handles','noUi-background','noUi-z-index'],stdCls={base:[clsList[0]],origin:[clsList[1]],handle:[clsList[2]]},percentage={to:function(range,value){value=range[0]<0?value+ Math.abs(range[0]):value- range[0];return(value*100)/ this.len(range); },from:function(range,value){return(value*100)/ this.len(range); },is:function(range,value){return((value*this.len(range))/ 100) + range[0]; },len:function(range){return(range[0]>range[1]?range[0]- range[1]:range[1]- range[0]);}};if(window.navigator.msPointerEnabled){actions={start:'MSPointerDown'+ namespace,move:'MSPointerMove'+ namespace,end:'MSPointerUp'+ namespace};}
function stopPropagation(e){e.stopPropagation();}
function call(f,scope,args){if(!$.isArray(f)){f=[f];}
$.each(f,function(i,q){if(typeof q==="function"){q.call(scope,args);}});}
function blocked(e){return(e.data.base.data('target').is('[class*="noUi-state-"], [disabled]'));}
function fixEvent(e,preventDefault){if(preventDefault){e.preventDefault();}
var jQueryEvent=e,touch=e.type.indexOf('touch')===0,mouse=e.type.indexOf('mouse')===0,pointer=e.type.indexOf('MSPointer')===0,x,y;e=e.originalEvent;if(touch){x=e.changedTouches[0].pageX;y=e.changedTouches[0].pageY;}
if(mouse||pointer){if(!pointer&&window.pageXOffset===UNDEF){window.pageXOffset=document.documentElement.scrollLeft;window.pageYOffset=document.documentElement.scrollTop;}
x=e.clientX+ window.pageXOffset;y=e.clientY+ window.pageYOffset;}
return{pass:jQueryEvent.data,e:e,x:x,y:y};}
function getPercentage(a){return parseFloat(this.style[a]);}
function test(o,set){function num(e){return!isNaN(e)&&isFinite(e);}
function ser(r){return(r instanceof $||typeof r==='string'||r===false);}
var TESTS={"handles":{r:true,t:function(o,q){q=parseInt(q,10);return(q===1||q===2);}},"range":{r:true,t:function(o,q,w){if(q.length!==2){return false;}
q=[parseFloat(q[0]),parseFloat(q[1])];if(!num(q[0])||!num(q[1])){return false;}
if(w==="range"&&q[0]===q[1]){return false;}
if(q[1]<q[0]){return false;}
o[w]=q;return true;}},"start":{r:true,t:function(o,q,w){if(o.handles===1){if($.isArray(q)){q=q[0];}
q=parseFloat(q);o.start=[q];return num(q);}
return this.parent.range.t(o,q,w);}},"connect":{t:function(o,q){return(q===true||q===false||(q==='lower'&&o.handles===1)||(q==='upper'&&o.handles===1));}},"orientation":{t:function(o,q){return(q==="horizontal"||q==="vertical");}},"margin":{r:true,t:function(o,q,w){q=parseFloat(q);o[w]=q;return num(q);}},"serialization":{r:true,t:function(o,q){if(!q.resolution){o.serialization.resolution=0.01;}else{switch(q.resolution){case 1:case 0.1:case 0.01:case 0.001:case 0.0001:case 0.00001:break;default:return false;}}
if(!q.mark){o.serialization.mark='.';}else{return(q.mark==='.'||q.mark===',');}
if(q.to){if(o.handles===1){if(!$.isArray(q.to)){q.to=[q.to];}
o.serialization.to=q.to;return ser(q.to[0]);}
return(q.to.length===2&&ser(q.to[0])&&ser(q.to[1]));}
return false;}},"slide":{t:function(o,q){return typeof q==="function";}},"set":{t:function(o,q){return this.parent.slide.t(o,q);}},"step":{t:function(o,q,w){return this.parent.margin.t(o,q,w);}},"init":function(){var obj=this;$.each(obj,function(i,c){c.parent=obj;});delete this.init;return this;}},a=TESTS.init();$.each(a,function(i,v){if((v.r&&(!o[i]&&o[i]!==0))||((o[i]||o[i]===0)&&!v.t(o,o[i],i))){if(console&&console.log){console.log("Slider:\t\t\t",set,"\nOption:\t\t\t",i,"\nValue:\t\t\t",o[i]);}
$.error("Error on noUiSlider initialisation.");return false;}});}
function closest(value,to){return Math.round(value/to)*to;}
function format(value,target){value=value.toFixed(target.data('decimals'));return value.replace('.',target.data('mark'));}
function setHandle(handle,to,forgive){var nui=handle.data('nui').options,handles=handle.data('nui').base.data(clsList[12]),style=handle.data('nui').style,hLimit;if(!$.isNumeric(to)){return false;}
if(to===handle[0].gPct(style)){return false;}
to=to<0?0:to>100?100:to;if(nui.step&&!forgive){to=closest(to,percentage.from(nui.range,nui.step));}
if(to===handle[0].gPct(style)){return false;}
if(handle.siblings('.'+ clsList[1]).length&&!forgive&&handles){if(handle.data('nui').number){hLimit=handles[0][0].gPct(style)+ nui.margin;to=to<hLimit?hLimit:to;}else{hLimit=handles[1][0].gPct(style)- nui.margin;to=to>hLimit?hLimit:to;}
if(to===handle[0].gPct(style)){return false;}}
if(handle.data('nui').number===0&&to>95){handle.addClass(clsList[14]);}else{handle.removeClass(clsList[14]);}
handle.css(style,to+'%');handle.data('store').val(format(percentage.is(nui.range,to),handle.data('nui').target));return true;}
function store(handle,S){var i=handle.data('nui').number;if(S.to[i]instanceof $){return S.to[i].data({target:handle.data('nui').target,handle:handle}).on('change'+namespace+' blur'+namespace,function(){var arr=[null,null];arr[i]=$(this).val();$(this).data('target').val(arr,{trusted:false});}).on('change'+namespace,function(){call($(this).data('handle').data('nui').options.set,$(this).data('target'));});}
if(typeof S.to[i]==="string"){return $('<input type="hidden" class="'+clsList[3]+'" name="'+ S.to[i]+'">').appendTo(handle).change(stopPropagation);}
if(S.to[i]===false){return{val:function(a){if(a===UNDEF){return this.handleElement.data('nui-val');}
this.handleElement.data('nui-val',a);},hasClass:function(){return false;},handleElement:handle};}}
function move(event){event=fixEvent(event,true);if(!event){return;}
var base=event.pass.base,style=base.data('style'),proposal=event.x- event.pass.startEvent.x,baseSize=style==='left'?base.width():base.height();if(style==='top'){proposal=event.y- event.pass.startEvent.y;}
proposal=event.pass.position+((proposal*100)/ baseSize ); setHandle(event.pass.handle,proposal);call(base.data('options').slide,base.data('target'));}
function end(event){if(blocked(event)){return;}
var base=event.data.base,handle=event.data.handle;handle.children().removeClass(clsList[4]);all.off(actions.move);all.off(actions.end);$('body').off(namespace);base.data('target').change();call(handle.data('nui').options.set,base.data('target'));}
function start(event){if(blocked(event)){return;}
event=fixEvent(event,true);if(!event){return;}
var handle=event.pass.handle,position=handle[0].gPct(handle.data('nui').style);handle.children().addClass(clsList[4]);all.on(actions.move,{startEvent:event,position:position,base:event.pass.base,handle:handle},move);all.on(actions.end,{base:event.pass.base,handle:handle},end);$('body').on('selectstart'+ namespace,function(){return false;});}
function selfEnd(event){end({data:{base:event.data.base,handle:event.data.handle}});event.stopPropagation();}
function tap(event){if(blocked(event)||event.data.base.find('.'+ clsList[4]).length){return;}
event=fixEvent(event);if(!event){return;}
var i,handle,hCenter,base=event.pass.base,handles=event.pass.handles,style=base.data('style'),eventXY=event[style==='left'?'x':'y'],baseSize=style==='left'?base.width():base.height(),offset={handles:[],base:{left:base.offset().left,top:base.offset().top}};for(i=0;i<handles.length;i++){offset.handles.push({left:handles[i].offset().left,top:handles[i].offset().top});}
hCenter=handles.length===1?0:((offset.handles[0][style]+ offset.handles[1][style])/ 2 ); if(handles.length===1||eventXY<hCenter){handle=handles[0];}else{handle=handles[1];}
base.addClass(clsList[5]);setTimeout(function(){base.removeClass(clsList[5]);},300);setHandle(handle,(((eventXY- offset.base[style])*100)/ baseSize) );call([handle.data('nui').options.slide,handle.data('nui').options.set],base.data('target'));base.data('target').change();}
function create(){return this.each(function(index,target){target=$(target);target.addClass(clsList[6]);var i,style,decimals,handle,base=$('<div/>').appendTo(target),handles=[],cls={base:stdCls.base,origin:[stdCls.origin.concat([clsList[1]+ clsList[7]]),stdCls.origin.concat([clsList[1]+ clsList[8]])],handle:[stdCls.handle.concat([clsList[2]+ clsList[7]]),stdCls.handle.concat([clsList[2]+ clsList[8]])]};options=$.extend({handles:2,margin:0,orientation:"horizontal"},options)||{};if(!options.serialization){options.serialization={to:[false,false],resolution:0.01,mark:'.'};}
test(options,target);options.S=options.serialization;if(options.connect){if(options.connect==="lower"){cls.base.push(clsList[9],clsList[9]+ clsList[7]);cls.origin[0].push(clsList[13]);}else{cls.base.push(clsList[9]+ clsList[8],clsList[13]);cls.origin[0].push(clsList[9]);}}else{cls.base.push(clsList[13]);}
style=options.orientation==='vertical'?'top':'left';decimals=options.S.resolution.toString().split('.');decimals=decimals[0]==="1"?0:decimals[1].length;if(options.orientation==="vertical"){cls.base.push(clsList[10]);}else{cls.base.push(clsList[11]);}
base.addClass(cls.base.join(" ")).data('target',target);target.data({base:base,mark:options.S.mark,decimals:decimals});for(i=0;i<options.handles;i++){handle=$('<div><div/></i>').appendTo(base);handle.addClass(cls.origin[i].join(" "));handle.children().addClass(cls.handle[i].join(" "));handle.children().on(actions.start,{base:base,handle:handle},start).on(actions.end,{base:base,handle:handle},selfEnd);handle.data('nui',{target:target,decimals:decimals,options:options,base:base,style:style,number:i}).data('store',store(handle,options.S));handle[0].gPct=getPercentage;handles.push(handle);setHandle(handle,percentage.to(options.range,options.start[i]));}
base.data({options:options,handles:handles,style:style});target.data({handles:handles});base.on(actions.end,{base:base,handles:handles},tap);});}
function val(args,modifiers){if(args===UNDEF){var re=[];$.each($(this).data(clsList[12]),function(i,handle){re.push(handle.data('store').val());});return(re.length===1?re[0]:re);}
modifiers=modifiers===true?{trigger:true}:(modifiers||{});if(!$.isArray(args)){args=[args];}
return this.each(function(i,target){target=$(target);$.each($(this).data(clsList[12]),function(j,handle){if(args[j]===null||args[j]===UNDEF){return;}
var value,current,range=handle.data('nui').options.range,to=args[j],result;modifiers.trusted=true;if(modifiers.trusted===false||args.length===1){modifiers.trusted=false;}
if(args.length===2&&$.inArray(null,args)>=0){modifiers.trusted=false;}
if($.type(to)==="string"){to=to.replace(',','.');}
to=percentage.to(range,parseFloat(to));result=setHandle(handle,to,modifiers.trusted);if(modifiers.trigger){call(handle.data('nui').options.set,target);}
if(!result){value=handle.data('store').val();current=percentage.is(range,handle[0].gPct(handle.data('nui').style));if(value!==current){handle.data('store').val(format(current,target));}}});});}
$.fn.val=function(){return this.hasClass(clsList[6])?val.apply(this,arguments):$VAL.apply(this,arguments);};return create.apply(this,arguments);};}(jQuery));
File diff suppressed because one or more lines are too long
@@ -1,3 +0,0 @@
;(function($){$.pwstrength=function(password){var score=0,length=password.length,upperCase,lowerCase,digits,nonAlpha;if(length<5)score+=0;else if(length<8)score+=5;else if(length<16)score+=10;else score+=15;lowerCase=password.match(/[a-z]/g);if(lowerCase)score+=1;upperCase=password.match(/[A-Z]/g);if(upperCase)score+=5;if(upperCase&&lowerCase)score+=2;digits=password.match(/\d/g);if(digits&&digits.length>1)score+=5;nonAlpha=password.match(/\W/g)
if(nonAlpha)score+=(nonAlpha.length>1)?15:10;if(upperCase&&lowerCase&&digits&&nonAlpha)score+=15;if(password.match(/\s/))score+=10;if(score<15)return 0;if(score<20)return 1;if(score<35)return 2;if(score<50)return 3;return 4;};function updateIndicator(event){var strength=$.pwstrength($(this).val()),options=event.data,klass;klass=options.classes[strength];options.indicator.removeClass(options.indicator.data('pwclass'));options.indicator.data('pwclass',klass);options.indicator.addClass(klass);options.indicator.find(options.label).html(options.texts[strength]);}
$.fn.pwstrength=function(options){var options=$.extend({label:'.label',classes:['pw-very-weak','pw-weak','pw-mediocre','pw-strong','pw-very-strong'],texts:['very weak','weak','mediocre','strong','very strong']},options||{});options.indicator=$('#'+ this.data('indicator'));return this.keyup(options,updateIndicator);};})(jQuery);
-16
View File
@@ -1,16 +0,0 @@
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.3.3
*
*/
(function(e){e.fn.extend({slimScroll:function(g){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function u(d){if(r){d=d||window.event;
var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,e,g){k=!1;var f=d,h=b.outerHeight()-c.outerHeight();e&&(f=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),f=Math.min(Math.max(f,0),h),f=0<d?Math.ceil(f):Math.floor(f),c.css({top:f+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());
f=l*(b[0].scrollHeight-b.outerHeight());g&&(f=d,d=f/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),h),c.css({top:d+"px"}));b.scrollTop(f);b.trigger("slimscrolling",~~f);v();p()}function C(){window.addEventListener?(this.addEventListener("DOMMouseScroll",u,!1),this.addEventListener("mousewheel",u,!1)):document.attachEvent("onmousewheel",u)}function w(){s=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),30);c.css({height:s+"px"});var a=s==b.outerHeight()?"none":"block";c.css({display:a})}
function v(){w();clearTimeout(A);l==~~l?(k=a.allowPageScroll,B!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;B=l;s>=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&r||x||y||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var r,x,y,A,z,s,l,B,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+a.railClass);
w();if(e.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else if(!(e.isPlainObject(g)&&"destroy"in g)){a.height="auto"==a.height?b.parent().height():a.height;n=e("<div></div>").addClass(a.wrapperClass).css({position:"relative",
overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=e("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});h.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){r=!0;v();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
(m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-4
View File
@@ -1,4 +0,0 @@
var ModalEffects=(function(){function init(){var overlay=document.querySelector('.md-overlay');[].slice.call(document.querySelectorAll('.md-trigger')).forEach(function(el,i){var modal=document.querySelector('#'+ el.getAttribute('data-modal')),close=modal.querySelector('.md-close');function removeModal(hasPerspective){classie.remove(modal,'md-show');if(hasPerspective){classie.remove(document.documentElement,'md-perspective');}}
function removeModalHandler(){removeModal(classie.has(el,'md-setperspective'));}
el.addEventListener('click',function(ev){classie.add(modal,'md-show');overlay.removeEventListener('click',removeModalHandler);overlay.addEventListener('click',removeModalHandler);if(classie.has(el,'md-setperspective')){setTimeout(function(){classie.add(document.documentElement,'md-perspective');},25);}});close.addEventListener('click',function(ev){ev.stopPropagation();removeModalHandler();});$(document).keyup(function(e){if(e.keyCode==27){e.stopPropagation();removeModalHandler();}});});}
init();})();
File diff suppressed because one or more lines are too long
-24
View File
@@ -1,24 +0,0 @@
;window.Modernizr=(function(window,document,undefined){var version='2.8.3',Modernizr={},enableClasses=true,docElement=document.documentElement,mod='modernizr',modElem=document.createElement(mod),mStyle=modElem.style,inputElem,toString={}.toString,prefixes=' -webkit- -moz- -o- -ms- '.split(' '),omPrefixes='Webkit Moz O ms',cssomPrefixes=omPrefixes.split(' '),domPrefixes=omPrefixes.toLowerCase().split(' '),tests={},inputs={},attrs={},classes=[],slice=classes.slice,featureName,injectElementWithStyles=function(rule,callback,nodes,testnames){var style,ret,node,docOverflow,div=document.createElement('div'),body=document.body,fakeBody=body||document.createElement('body');if(parseInt(nodes,10)){while(nodes--){node=document.createElement('div');node.id=testnames?testnames[nodes]:mod+(nodes+ 1);div.appendChild(node);}}
style=['&#173;','<style id="s',mod,'">',rule,'</style>'].join('');div.id=mod;(body?div:fakeBody).innerHTML+=style;fakeBody.appendChild(div);if(!body){fakeBody.style.background='';fakeBody.style.overflow='hidden';docOverflow=docElement.style.overflow;docElement.style.overflow='hidden';docElement.appendChild(fakeBody);}
ret=callback(div,rule);if(!body){fakeBody.parentNode.removeChild(fakeBody);docElement.style.overflow=docOverflow;}else{div.parentNode.removeChild(div);}
return!!ret;},_hasOwnProperty=({}).hasOwnProperty,hasOwnProp;if(!is(_hasOwnProperty,'undefined')&&!is(_hasOwnProperty.call,'undefined')){hasOwnProp=function(object,property){return _hasOwnProperty.call(object,property);};}
else{hasOwnProp=function(object,property){return((property in object)&&is(object.constructor.prototype[property],'undefined'));};}
if(!Function.prototype.bind){Function.prototype.bind=function bind(that){var target=this;if(typeof target!="function"){throw new TypeError();}
var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var F=function(){};F.prototype=target.prototype;var self=new F();var result=target.apply(self,args.concat(slice.call(arguments)));if(Object(result)===result){return result;}
return self;}else{return target.apply(that,args.concat(slice.call(arguments)));}};return bound;};}
function setCss(str){mStyle.cssText=str;}
function setCssAll(str1,str2){return setCss(prefixes.join(str1+';')+(str2||''));}
function is(obj,type){return typeof obj===type;}
function contains(str,substr){return!!~(''+ str).indexOf(substr);}
function testProps(props,prefixed){for(var i in props){var prop=props[i];if(!contains(prop,"-")&&mStyle[prop]!==undefined){return prefixed=='pfx'?prop:true;}}
return false;}
function testDOMProps(props,obj,elem){for(var i in props){var item=obj[props[i]];if(item!==undefined){if(elem===false)return props[i];if(is(item,'function')){return item.bind(elem||obj);}
return item;}}
return false;}
function testPropsAll(prop,prefixed,elem){var ucProp=prop.charAt(0).toUpperCase()+ prop.slice(1),props=(prop+' '+ cssomPrefixes.join(ucProp+' ')+ ucProp).split(' ');if(is(prefixed,"string")||is(prefixed,"undefined")){return testProps(props,prefixed);}else{props=(prop+' '+(domPrefixes).join(ucProp+' ')+ ucProp).split(' ');return testDOMProps(props,prefixed,elem);}}tests['cssanimations']=function(){return testPropsAll('animationName');};tests['csstransforms3d']=function(){var ret=!!testPropsAll('perspective');if(ret&&'webkitPerspective'in docElement.style){injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}',function(node,rule){ret=node.offsetLeft===9&&node.offsetHeight===3;});}
return ret;};tests['csstransitions']=function(){return testPropsAll('transition');};for(var feature in tests){if(hasOwnProp(tests,feature)){featureName=feature.toLowerCase();Modernizr[featureName]=tests[feature]();classes.push((Modernizr[featureName]?'':'no-')+ featureName);}}
Modernizr.addTest=function(feature,test){if(typeof feature=='object'){for(var key in feature){if(hasOwnProp(feature,key)){Modernizr.addTest(key,feature[key]);}}}else{feature=feature.toLowerCase();if(Modernizr[feature]!==undefined){return Modernizr;}
test=typeof test=='function'?test():test;if(typeof enableClasses!=="undefined"&&enableClasses){docElement.className+=' '+(test?'':'no-')+ feature;}
Modernizr[feature]=test;}
return Modernizr;};setCss('');modElem=inputElem=null;Modernizr._version=version;Modernizr._prefixes=prefixes;Modernizr._domPrefixes=domPrefixes;Modernizr._cssomPrefixes=cssomPrefixes;Modernizr.testProp=function(prop){return testProps([prop]);};Modernizr.testAllProps=testPropsAll;Modernizr.testStyles=injectElementWithStyles;docElement.className=docElement.className.replace(/(^|\s)no-js(\s|$)/,'$1$2')+
(enableClasses?' js '+ classes.join(' '):'');return Modernizr;})(this,this.document);;
File diff suppressed because one or more lines are too long
-151
View File
@@ -1,151 +0,0 @@
(function(){var $,Morris,minutesSpecHelper,secondsSpecHelper,__slice=[].slice,__bind=function(fn,me){return function(){return fn.apply(me,arguments);};},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child;},__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++){if(i in this&&this[i]===item)return i;}return-1;};Morris=window.Morris={};$=jQuery;Morris.EventEmitter=(function(){function EventEmitter(){}
EventEmitter.prototype.on=function(name,handler){if(this.handlers==null){this.handlers={};}
if(this.handlers[name]==null){this.handlers[name]=[];}
this.handlers[name].push(handler);return this;};EventEmitter.prototype.fire=function(){var args,handler,name,_i,_len,_ref,_results;name=arguments[0],args=2<=arguments.length?__slice.call(arguments,1):[];if((this.handlers!=null)&&(this.handlers[name]!=null)){_ref=this.handlers[name];_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){handler=_ref[_i];_results.push(handler.apply(null,args));}
return _results;}};return EventEmitter;})();Morris.commas=function(num){var absnum,intnum,ret,strabsnum;if(num!=null){ret=num<0?"-":"";absnum=Math.abs(num);intnum=Math.floor(absnum).toFixed(0);ret+=intnum.replace(/(?=(?:\d{3})+$)(?!^)/g,',');strabsnum=absnum.toString();if(strabsnum.length>intnum.length){ret+=strabsnum.slice(intnum.length);}
return ret;}else{return'-';}};Morris.pad2=function(number){return(number<10?'0':'')+ number;};Morris.Grid=(function(_super){__extends(Grid,_super);function Grid(options){this.resizeHandler=__bind(this.resizeHandler,this);var _this=this;if(typeof options.element==='string'){this.el=$(document.getElementById(options.element));}else{this.el=$(options.element);}
if((this.el==null)||this.el.length===0){throw new Error("Graph container element not found");}
if(this.el.css('position')==='static'){this.el.css('position','relative');}
this.options=$.extend({},this.gridDefaults,this.defaults||{},options);if(typeof this.options.units==='string'){this.options.postUnits=options.units;}
this.raphael=new Raphael(this.el[0]);this.elementWidth=null;this.elementHeight=null;this.dirty=false;this.selectFrom=null;if(this.init){this.init();}
this.setData(this.options.data);this.el.bind('mousemove',function(evt){var left,offset,right,width,x;offset=_this.el.offset();x=evt.pageX- offset.left;if(_this.selectFrom){left=_this.data[_this.hitTest(Math.min(x,_this.selectFrom))]._x;right=_this.data[_this.hitTest(Math.max(x,_this.selectFrom))]._x;width=right- left;return _this.selectionRect.attr({x:left,width:width});}else{return _this.fire('hovermove',x,evt.pageY- offset.top);}});this.el.bind('mouseleave',function(evt){if(_this.selectFrom){_this.selectionRect.hide();_this.selectFrom=null;}
return _this.fire('hoverout');});this.el.bind('touchstart touchmove touchend',function(evt){var offset,touch;touch=evt.originalEvent.touches[0]||evt.originalEvent.changedTouches[0];offset=_this.el.offset();return _this.fire('hovermove',touch.pageX- offset.left,touch.pageY- offset.top);});this.el.bind('click',function(evt){var offset;offset=_this.el.offset();return _this.fire('gridclick',evt.pageX- offset.left,evt.pageY- offset.top);});if(this.options.rangeSelect){this.selectionRect=this.raphael.rect(0,0,0,this.el.innerHeight()).attr({fill:this.options.rangeSelectColor,stroke:false}).toBack().hide();this.el.bind('mousedown',function(evt){var offset;offset=_this.el.offset();return _this.startRange(evt.pageX- offset.left);});this.el.bind('mouseup',function(evt){var offset;offset=_this.el.offset();_this.endRange(evt.pageX- offset.left);return _this.fire('hovermove',evt.pageX- offset.left,evt.pageY- offset.top);});}
if(this.options.resize){$(window).bind('resize',function(evt){if(_this.timeoutId!=null){window.clearTimeout(_this.timeoutId);}
return _this.timeoutId=window.setTimeout(_this.resizeHandler,100);});}
this.el.css('-webkit-tap-highlight-color','rgba(0,0,0,0)');if(this.postInit){this.postInit();}}
Grid.prototype.gridDefaults={dateFormat:null,axes:true,grid:true,gridLineColor:'#aaa',gridStrokeWidth:0.5,gridTextColor:'#888',gridTextSize:12,gridTextFamily:'sans-serif',gridTextWeight:'normal',hideHover:false,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:true,postUnits:'',preUnits:'',ymax:'auto',ymin:'auto 0',goals:[],goalStrokeWidth:1.0,goalLineColors:['#666633','#999966','#cc6666','#663333'],events:[],eventStrokeWidth:1.0,eventLineColors:['#005a04','#ccffbb','#3a5f0b','#005502'],rangeSelect:null,rangeSelectColor:'#eef',resize:false};Grid.prototype.setData=function(data,redraw){var e,idx,index,maxGoal,minGoal,ret,row,step,total,y,ykey,ymax,ymin,yval,_ref;if(redraw==null){redraw=true;}
this.options.data=data;if((data==null)||data.length===0){this.data=[];this.raphael.clear();if(this.hover!=null){this.hover.hide();}
return;}
ymax=this.cumulative?0:null;ymin=this.cumulative?0:null;if(this.options.goals.length>0){minGoal=Math.min.apply(Math,this.options.goals);maxGoal=Math.max.apply(Math,this.options.goals);ymin=ymin!=null?Math.min(ymin,minGoal):minGoal;ymax=ymax!=null?Math.max(ymax,maxGoal):maxGoal;}
this.data=(function(){var _i,_len,_results;_results=[];for(index=_i=0,_len=data.length;_i<_len;index=++_i){row=data[index];ret={src:row};ret.label=row[this.options.xkey];if(this.options.parseTime){ret.x=Morris.parseDate(ret.label);if(this.options.dateFormat){ret.label=this.options.dateFormat(ret.x);}else if(typeof ret.label==='number'){ret.label=new Date(ret.label).toString();}}else{ret.x=index;if(this.options.xLabelFormat){ret.label=this.options.xLabelFormat(ret);}}
total=0;ret.y=(function(){var _j,_len1,_ref,_results1;_ref=this.options.ykeys;_results1=[];for(idx=_j=0,_len1=_ref.length;_j<_len1;idx=++_j){ykey=_ref[idx];yval=row[ykey];if(typeof yval==='string'){yval=parseFloat(yval);}
if((yval!=null)&&typeof yval!=='number'){yval=null;}
if(yval!=null){if(this.cumulative){total+=yval;}else{if(ymax!=null){ymax=Math.max(yval,ymax);ymin=Math.min(yval,ymin);}else{ymax=ymin=yval;}}}
if(this.cumulative&&(total!=null)){ymax=Math.max(total,ymax);ymin=Math.min(total,ymin);}
_results1.push(yval);}
return _results1;}).call(this);_results.push(ret);}
return _results;}).call(this);if(this.options.parseTime){this.data=this.data.sort(function(a,b){return(a.x>b.x)-(b.x>a.x);});}
this.xmin=this.data[0].x;this.xmax=this.data[this.data.length- 1].x;this.events=[];if(this.options.events.length>0){if(this.options.parseTime){this.events=(function(){var _i,_len,_ref,_results;_ref=this.options.events;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){e=_ref[_i];_results.push(Morris.parseDate(e));}
return _results;}).call(this);}else{this.events=this.options.events;}
this.xmax=Math.max(this.xmax,Math.max.apply(Math,this.events));this.xmin=Math.min(this.xmin,Math.min.apply(Math,this.events));}
if(this.xmin===this.xmax){this.xmin-=1;this.xmax+=1;}
this.ymin=this.yboundary('min',ymin);this.ymax=this.yboundary('max',ymax);if(this.ymin===this.ymax){if(ymin){this.ymin-=1;}
this.ymax+=1;}
if(((_ref=this.options.axes)===true||_ref==='both'||_ref==='y')||this.options.grid===true){if(this.options.ymax===this.gridDefaults.ymax&&this.options.ymin===this.gridDefaults.ymin){this.grid=this.autoGridLines(this.ymin,this.ymax,this.options.numLines);this.ymin=Math.min(this.ymin,this.grid[0]);this.ymax=Math.max(this.ymax,this.grid[this.grid.length- 1]);}else{step=(this.ymax- this.ymin)/ (this.options.numLines - 1);
this.grid=(function(){var _i,_ref1,_ref2,_results;_results=[];for(y=_i=_ref1=this.ymin,_ref2=this.ymax;step>0?_i<=_ref2:_i>=_ref2;y=_i+=step){_results.push(y);}
return _results;}).call(this);}}
this.dirty=true;if(redraw){return this.redraw();}};Grid.prototype.yboundary=function(boundaryType,currentValue){var boundaryOption,suggestedValue;boundaryOption=this.options["y"+ boundaryType];if(typeof boundaryOption==='string'){if(boundaryOption.slice(0,4)==='auto'){if(boundaryOption.length>5){suggestedValue=parseInt(boundaryOption.slice(5),10);if(currentValue==null){return suggestedValue;}
return Math[boundaryType](currentValue,suggestedValue);}else{if(currentValue!=null){return currentValue;}else{return 0;}}}else{return parseInt(boundaryOption,10);}}else{return boundaryOption;}};Grid.prototype.autoGridLines=function(ymin,ymax,nlines){var gmax,gmin,grid,smag,span,step,unit,y,ymag;span=ymax- ymin;ymag=Math.floor(Math.log(span)/ Math.log(10));
unit=Math.pow(10,ymag);gmin=Math.floor(ymin/unit)*unit;gmax=Math.ceil(ymax/unit)*unit;step=(gmax- gmin)/ (nlines - 1);
if(unit===1&&step>1&&Math.ceil(step)!==step){step=Math.ceil(step);gmax=gmin+ step*(nlines- 1);}
if(gmin<0&&gmax>0){gmin=Math.floor(ymin/step)*step;gmax=Math.ceil(ymax/step)*step;}
if(step<1){smag=Math.floor(Math.log(step)/ Math.log(10));
grid=(function(){var _i,_results;_results=[];for(y=_i=gmin;step>0?_i<=gmax:_i>=gmax;y=_i+=step){_results.push(parseFloat(y.toFixed(1- smag)));}
return _results;})();}else{grid=(function(){var _i,_results;_results=[];for(y=_i=gmin;step>0?_i<=gmax:_i>=gmax;y=_i+=step){_results.push(y);}
return _results;})();}
return grid;};Grid.prototype._calc=function(){var bottomOffsets,gridLine,h,i,w,yLabelWidths,_ref,_ref1;w=this.el.width();h=this.el.height();if(this.elementWidth!==w||this.elementHeight!==h||this.dirty){this.elementWidth=w;this.elementHeight=h;this.dirty=false;this.left=this.options.padding;this.right=this.elementWidth- this.options.padding;this.top=this.options.padding;this.bottom=this.elementHeight- this.options.padding;if((_ref=this.options.axes)===true||_ref==='both'||_ref==='y'){yLabelWidths=(function(){var _i,_len,_ref1,_results;_ref1=this.grid;_results=[];for(_i=0,_len=_ref1.length;_i<_len;_i++){gridLine=_ref1[_i];_results.push(this.measureText(this.yAxisFormat(gridLine)).width);}
return _results;}).call(this);this.left+=Math.max.apply(Math,yLabelWidths);}
if((_ref1=this.options.axes)===true||_ref1==='both'||_ref1==='x'){bottomOffsets=(function(){var _i,_ref2,_results;_results=[];for(i=_i=0,_ref2=this.data.length;0<=_ref2?_i<_ref2:_i>_ref2;i=0<=_ref2?++_i:--_i){_results.push(this.measureText(this.data[i].text,-this.options.xLabelAngle).height);}
return _results;}).call(this);this.bottom-=Math.max.apply(Math,bottomOffsets);}
this.width=Math.max(1,this.right- this.left);this.height=Math.max(1,this.bottom- this.top);this.dx=this.width/(this.xmax- this.xmin);this.dy=this.height/(this.ymax- this.ymin);if(this.calc){return this.calc();}}};Grid.prototype.transY=function(y){return this.bottom-(y- this.ymin)*this.dy;};Grid.prototype.transX=function(x){if(this.data.length===1){return(this.left+ this.right)/ 2;
}else{return this.left+(x- this.xmin)*this.dx;}};Grid.prototype.redraw=function(){this.raphael.clear();this._calc();this.drawGrid();this.drawGoals();this.drawEvents();if(this.draw){return this.draw();}};Grid.prototype.measureText=function(text,angle){var ret,tt;if(angle==null){angle=0;}
tt=this.raphael.text(100,100,text).attr('font-size',this.options.gridTextSize).attr('font-family',this.options.gridTextFamily).attr('font-weight',this.options.gridTextWeight).rotate(angle);ret=tt.getBBox();tt.remove();return ret;};Grid.prototype.yAxisFormat=function(label){return this.yLabelFormat(label);};Grid.prototype.yLabelFormat=function(label){if(typeof this.options.yLabelFormat==='function'){return this.options.yLabelFormat(label);}else{return""+ this.options.preUnits+(Morris.commas(label))+ this.options.postUnits;}};Grid.prototype.drawGrid=function(){var lineY,y,_i,_len,_ref,_ref1,_ref2,_results;if(this.options.grid===false&&((_ref=this.options.axes)!==true&&_ref!=='both'&&_ref!=='y')){return;}
_ref1=this.grid;_results=[];for(_i=0,_len=_ref1.length;_i<_len;_i++){lineY=_ref1[_i];y=this.transY(lineY);if((_ref2=this.options.axes)===true||_ref2==='both'||_ref2==='y'){this.drawYAxisLabel(this.left- this.options.padding/2,y,this.yAxisFormat(lineY));}
if(this.options.grid){_results.push(this.drawGridLine("M"+ this.left+","+ y+"H"+(this.left+ this.width)));}else{_results.push(void 0);}}
return _results;};Grid.prototype.drawGoals=function(){var color,goal,i,_i,_len,_ref,_results;_ref=this.options.goals;_results=[];for(i=_i=0,_len=_ref.length;_i<_len;i=++_i){goal=_ref[i];color=this.options.goalLineColors[i%this.options.goalLineColors.length];_results.push(this.drawGoal(goal,color));}
return _results;};Grid.prototype.drawEvents=function(){var color,event,i,_i,_len,_ref,_results;_ref=this.events;_results=[];for(i=_i=0,_len=_ref.length;_i<_len;i=++_i){event=_ref[i];color=this.options.eventLineColors[i%this.options.eventLineColors.length];_results.push(this.drawEvent(event,color));}
return _results;};Grid.prototype.drawGoal=function(goal,color){return this.raphael.path("M"+ this.left+","+(this.transY(goal))+"H"+ this.right).attr('stroke',color).attr('stroke-width',this.options.goalStrokeWidth);};Grid.prototype.drawEvent=function(event,color){return this.raphael.path("M"+(this.transX(event))+","+ this.bottom+"V"+ this.top).attr('stroke',color).attr('stroke-width',this.options.eventStrokeWidth);};Grid.prototype.drawYAxisLabel=function(xPos,yPos,text){return this.raphael.text(xPos,yPos,text).attr('font-size',this.options.gridTextSize).attr('font-family',this.options.gridTextFamily).attr('font-weight',this.options.gridTextWeight).attr('fill',this.options.gridTextColor).attr('text-anchor','end');};Grid.prototype.drawGridLine=function(path){return this.raphael.path(path).attr('stroke',this.options.gridLineColor).attr('stroke-width',this.options.gridStrokeWidth);};Grid.prototype.startRange=function(x){this.hover.hide();this.selectFrom=x;return this.selectionRect.attr({x:x,width:0}).show();};Grid.prototype.endRange=function(x){var end,start;if(this.selectFrom){start=Math.min(this.selectFrom,x);end=Math.max(this.selectFrom,x);this.options.rangeSelect.call(this.el,{start:this.data[this.hitTest(start)].x,end:this.data[this.hitTest(end)].x});return this.selectFrom=null;}};Grid.prototype.resizeHandler=function(){this.timeoutId=null;this.raphael.setSize(this.el.width(),this.el.height());return this.redraw();};return Grid;})(Morris.EventEmitter);Morris.parseDate=function(date){var isecs,m,msecs,n,o,offsetmins,p,q,r,ret,secs;if(typeof date==='number'){return date;}
m=date.match(/^(\d+) Q(\d)$/);n=date.match(/^(\d+)-(\d+)$/);o=date.match(/^(\d+)-(\d+)-(\d+)$/);p=date.match(/^(\d+) W(\d+)$/);q=date.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/);r=date.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/);if(m){return new Date(parseInt(m[1],10),parseInt(m[2],10)*3- 1,1).getTime();}else if(n){return new Date(parseInt(n[1],10),parseInt(n[2],10)- 1,1).getTime();}else if(o){return new Date(parseInt(o[1],10),parseInt(o[2],10)- 1,parseInt(o[3],10)).getTime();}else if(p){ret=new Date(parseInt(p[1],10),0,1);if(ret.getDay()!==4){ret.setMonth(0,1+((4- ret.getDay())+ 7)%7);}
return ret.getTime()+ parseInt(p[2],10)*604800000;}else if(q){if(!q[6]){return new Date(parseInt(q[1],10),parseInt(q[2],10)- 1,parseInt(q[3],10),parseInt(q[4],10),parseInt(q[5],10)).getTime();}else{offsetmins=0;if(q[6]!=='Z'){offsetmins=parseInt(q[8],10)*60+ parseInt(q[9],10);if(q[7]==='+'){offsetmins=0- offsetmins;}}
return Date.UTC(parseInt(q[1],10),parseInt(q[2],10)- 1,parseInt(q[3],10),parseInt(q[4],10),parseInt(q[5],10)+ offsetmins);}}else if(r){secs=parseFloat(r[6]);isecs=Math.floor(secs);msecs=Math.round((secs- isecs)*1000);if(!r[8]){return new Date(parseInt(r[1],10),parseInt(r[2],10)- 1,parseInt(r[3],10),parseInt(r[4],10),parseInt(r[5],10),isecs,msecs).getTime();}else{offsetmins=0;if(r[8]!=='Z'){offsetmins=parseInt(r[10],10)*60+ parseInt(r[11],10);if(r[9]==='+'){offsetmins=0- offsetmins;}}
return Date.UTC(parseInt(r[1],10),parseInt(r[2],10)- 1,parseInt(r[3],10),parseInt(r[4],10),parseInt(r[5],10)+ offsetmins,isecs,msecs);}}else{return new Date(parseInt(date,10),0,1).getTime();}};Morris.Hover=(function(){Hover.defaults={"class":'morris-hover morris-default-style'};function Hover(options){if(options==null){options={};}
this.options=$.extend({},Morris.Hover.defaults,options);this.el=$("<div class='"+ this.options["class"]+"'></div>");this.el.hide();this.options.parent.append(this.el);}
Hover.prototype.update=function(html,x,y){if(!html){return this.hide();}else{this.html(html);this.show();return this.moveTo(x,y);}};Hover.prototype.html=function(content){return this.el.html(content);};Hover.prototype.moveTo=function(x,y){var hoverHeight,hoverWidth,left,parentHeight,parentWidth,top;parentWidth=this.options.parent.innerWidth();parentHeight=this.options.parent.innerHeight();hoverWidth=this.el.outerWidth();hoverHeight=this.el.outerHeight();left=Math.min(Math.max(0,x- hoverWidth/2),parentWidth- hoverWidth);if(y!=null){top=y- hoverHeight- 10;if(top<0){top=y+ 10;if(top+ hoverHeight>parentHeight){top=parentHeight/2- hoverHeight/2;}}}else{top=parentHeight/2- hoverHeight/2;}
return this.el.css({left:left+"px",top:parseInt(top)+"px"});};Hover.prototype.show=function(){return this.el.show();};Hover.prototype.hide=function(){return this.el.hide();};return Hover;})();Morris.Line=(function(_super){__extends(Line,_super);function Line(options){this.hilight=__bind(this.hilight,this);this.onHoverOut=__bind(this.onHoverOut,this);this.onHoverMove=__bind(this.onHoverMove,this);this.onGridClick=__bind(this.onGridClick,this);if(!(this instanceof Morris.Line)){return new Morris.Line(options);}
Line.__super__.constructor.call(this,options);}
Line.prototype.init=function(){if(this.options.hideHover!=='always'){this.hover=new Morris.Hover({parent:this.el});this.on('hovermove',this.onHoverMove);this.on('hoverout',this.onHoverOut);return this.on('gridclick',this.onGridClick);}};Line.prototype.defaults={lineWidth:3,pointSize:4,lineColors:['#0b62a4','#7A92A3','#4da74d','#afd8f8','#edc240','#cb4b4b','#9440ed'],pointStrokeWidths:[1],pointStrokeColors:['#ffffff'],pointFillColors:[],smooth:true,xLabels:'auto',xLabelFormat:null,xLabelMargin:24,hideHover:false};Line.prototype.calc=function(){this.calcPoints();return this.generatePaths();};Line.prototype.calcPoints=function(){var row,y,_i,_len,_ref,_results;_ref=this.data;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){row=_ref[_i];row._x=this.transX(row.x);row._y=(function(){var _j,_len1,_ref1,_results1;_ref1=row.y;_results1=[];for(_j=0,_len1=_ref1.length;_j<_len1;_j++){y=_ref1[_j];if(y!=null){_results1.push(this.transY(y));}else{_results1.push(y);}}
return _results1;}).call(this);_results.push(row._ymax=Math.min.apply(Math,[this.bottom].concat((function(){var _j,_len1,_ref1,_results1;_ref1=row._y;_results1=[];for(_j=0,_len1=_ref1.length;_j<_len1;_j++){y=_ref1[_j];if(y!=null){_results1.push(y);}}
return _results1;})())));}
return _results;};Line.prototype.hitTest=function(x){var index,r,_i,_len,_ref;if(this.data.length===0){return null;}
_ref=this.data.slice(1);for(index=_i=0,_len=_ref.length;_i<_len;index=++_i){r=_ref[index];if(x<(r._x+ this.data[index]._x)/ 2) {
break;}}
return index;};Line.prototype.onGridClick=function(x,y){var index;index=this.hitTest(x);return this.fire('click',index,this.data[index].src,x,y);};Line.prototype.onHoverMove=function(x,y){var index;index=this.hitTest(x);return this.displayHoverForRow(index);};Line.prototype.onHoverOut=function(){if(this.options.hideHover!==false){return this.displayHoverForRow(null);}};Line.prototype.displayHoverForRow=function(index){var _ref;if(index!=null){(_ref=this.hover).update.apply(_ref,this.hoverContentForRow(index));return this.hilight(index);}else{this.hover.hide();return this.hilight();}};Line.prototype.hoverContentForRow=function(index){var content,j,row,y,_i,_len,_ref;row=this.data[index];content="<div class='morris-hover-row-label'>"+ row.label+"</div>";_ref=row.y;for(j=_i=0,_len=_ref.length;_i<_len;j=++_i){y=_ref[j];content+="<div class='morris-hover-point' style='color: "+(this.colorFor(row,j,'label'))+"'>\n "+ this.options.labels[j]+":\n "+(this.yLabelFormat(y))+"\n</div>";}
if(typeof this.options.hoverCallback==='function'){content=this.options.hoverCallback(index,this.options,content,row.src);}
return[content,row._x,row._ymax];};Line.prototype.generatePaths=function(){var coords,i,r,smooth;return this.paths=(function(){var _i,_ref,_ref1,_results;_results=[];for(i=_i=0,_ref=this.options.ykeys.length;0<=_ref?_i<_ref:_i>_ref;i=0<=_ref?++_i:--_i){smooth=typeof this.options.smooth==="boolean"?this.options.smooth:(_ref1=this.options.ykeys[i],__indexOf.call(this.options.smooth,_ref1)>=0);coords=(function(){var _j,_len,_ref2,_results1;_ref2=this.data;_results1=[];for(_j=0,_len=_ref2.length;_j<_len;_j++){r=_ref2[_j];if(r._y[i]!==void 0){_results1.push({x:r._x,y:r._y[i]});}}
return _results1;}).call(this);if(coords.length>1){_results.push(Morris.Line.createPath(coords,smooth,this.bottom));}else{_results.push(null);}}
return _results;}).call(this);};Line.prototype.draw=function(){var _ref;if((_ref=this.options.axes)===true||_ref==='both'||_ref==='x'){this.drawXAxis();}
this.drawSeries();if(this.options.hideHover===false){return this.displayHoverForRow(this.data.length- 1);}};Line.prototype.drawXAxis=function(){var drawLabel,l,labels,prevAngleMargin,prevLabelMargin,row,ypos,_i,_len,_results,_this=this;ypos=this.bottom+ this.options.padding/2;prevLabelMargin=null;prevAngleMargin=null;drawLabel=function(labelText,xpos){var label,labelBox,margin,offset,textBox;label=_this.drawXAxisLabel(_this.transX(xpos),ypos,labelText);textBox=label.getBBox();label.transform("r"+(-_this.options.xLabelAngle));labelBox=label.getBBox();label.transform("t0,"+(labelBox.height/2)+"...");if(_this.options.xLabelAngle!==0){offset=-0.5*textBox.width*Math.cos(_this.options.xLabelAngle*Math.PI/180.0);label.transform("t"+ offset+",0...");}
labelBox=label.getBBox();if(((prevLabelMargin==null)||prevLabelMargin>=labelBox.x+ labelBox.width||(prevAngleMargin!=null)&&prevAngleMargin>=labelBox.x)&&labelBox.x>=0&&(labelBox.x+ labelBox.width)<_this.el.width()){if(_this.options.xLabelAngle!==0){margin=1.25*_this.options.gridTextSize/Math.sin(_this.options.xLabelAngle*Math.PI/180.0);prevAngleMargin=labelBox.x- margin;}
return prevLabelMargin=labelBox.x- _this.options.xLabelMargin;}else{return label.remove();}};if(this.options.parseTime){if(this.data.length===1&&this.options.xLabels==='auto'){labels=[[this.data[0].label,this.data[0].x]];}else{labels=Morris.labelSeries(this.xmin,this.xmax,this.width,this.options.xLabels,this.options.xLabelFormat);}}else{labels=(function(){var _i,_len,_ref,_results;_ref=this.data;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){row=_ref[_i];_results.push([row.label,row.x]);}
return _results;}).call(this);}
labels.reverse();_results=[];for(_i=0,_len=labels.length;_i<_len;_i++){l=labels[_i];_results.push(drawLabel(l[0],l[1]));}
return _results;};Line.prototype.drawSeries=function(){var i,_i,_j,_ref,_ref1,_results;this.seriesPoints=[];for(i=_i=_ref=this.options.ykeys.length- 1;_ref<=0?_i<=0:_i>=0;i=_ref<=0?++_i:--_i){this._drawLineFor(i);}
_results=[];for(i=_j=_ref1=this.options.ykeys.length- 1;_ref1<=0?_j<=0:_j>=0;i=_ref1<=0?++_j:--_j){_results.push(this._drawPointFor(i));}
return _results;};Line.prototype._drawPointFor=function(index){var circle,row,_i,_len,_ref,_results;this.seriesPoints[index]=[];_ref=this.data;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){row=_ref[_i];circle=null;if(row._y[index]!=null){circle=this.drawLinePoint(row._x,row._y[index],this.colorFor(row,index,'point'),index);}
_results.push(this.seriesPoints[index].push(circle));}
return _results;};Line.prototype._drawLineFor=function(index){var path;path=this.paths[index];if(path!==null){return this.drawLinePath(path,this.colorFor(null,index,'line'),index);}};Line.createPath=function(coords,smooth,bottom){var coord,g,grads,i,ix,lg,path,prevCoord,x1,x2,y1,y2,_i,_len;path="";if(smooth){grads=Morris.Line.gradients(coords);}
prevCoord={y:null};for(i=_i=0,_len=coords.length;_i<_len;i=++_i){coord=coords[i];if(coord.y!=null){if(prevCoord.y!=null){if(smooth){g=grads[i];lg=grads[i- 1];ix=(coord.x- prevCoord.x)/ 4;
x1=prevCoord.x+ ix;y1=Math.min(bottom,prevCoord.y+ ix*lg);x2=coord.x- ix;y2=Math.min(bottom,coord.y- ix*g);path+="C"+ x1+","+ y1+","+ x2+","+ y2+","+ coord.x+","+ coord.y;}else{path+="L"+ coord.x+","+ coord.y;}}else{if(!smooth||(grads[i]!=null)){path+="M"+ coord.x+","+ coord.y;}}}
prevCoord=coord;}
return path;};Line.gradients=function(coords){var coord,grad,i,nextCoord,prevCoord,_i,_len,_results;grad=function(a,b){return(a.y- b.y)/ (a.x - b.x);
};_results=[];for(i=_i=0,_len=coords.length;_i<_len;i=++_i){coord=coords[i];if(coord.y!=null){nextCoord=coords[i+ 1]||{y:null};prevCoord=coords[i- 1]||{y:null};if((prevCoord.y!=null)&&(nextCoord.y!=null)){_results.push(grad(prevCoord,nextCoord));}else if(prevCoord.y!=null){_results.push(grad(prevCoord,coord));}else if(nextCoord.y!=null){_results.push(grad(coord,nextCoord));}else{_results.push(null);}}else{_results.push(null);}}
return _results;};Line.prototype.hilight=function(index){var i,_i,_j,_ref,_ref1;if(this.prevHilight!==null&&this.prevHilight!==index){for(i=_i=0,_ref=this.seriesPoints.length- 1;0<=_ref?_i<=_ref:_i>=_ref;i=0<=_ref?++_i:--_i){if(this.seriesPoints[i][this.prevHilight]){this.seriesPoints[i][this.prevHilight].animate(this.pointShrinkSeries(i));}}}
if(index!==null&&this.prevHilight!==index){for(i=_j=0,_ref1=this.seriesPoints.length- 1;0<=_ref1?_j<=_ref1:_j>=_ref1;i=0<=_ref1?++_j:--_j){if(this.seriesPoints[i][index]){this.seriesPoints[i][index].animate(this.pointGrowSeries(i));}}}
return this.prevHilight=index;};Line.prototype.colorFor=function(row,sidx,type){if(typeof this.options.lineColors==='function'){return this.options.lineColors.call(this,row,sidx,type);}else if(type==='point'){return this.options.pointFillColors[sidx%this.options.pointFillColors.length]||this.options.lineColors[sidx%this.options.lineColors.length];}else{return this.options.lineColors[sidx%this.options.lineColors.length];}};Line.prototype.drawXAxisLabel=function(xPos,yPos,text){return this.raphael.text(xPos,yPos,text).attr('font-size',this.options.gridTextSize).attr('font-family',this.options.gridTextFamily).attr('font-weight',this.options.gridTextWeight).attr('fill',this.options.gridTextColor);};Line.prototype.drawLinePath=function(path,lineColor,lineIndex){return this.raphael.path(path).attr('stroke',lineColor).attr('stroke-width',this.lineWidthForSeries(lineIndex));};Line.prototype.drawLinePoint=function(xPos,yPos,pointColor,lineIndex){return this.raphael.circle(xPos,yPos,this.pointSizeForSeries(lineIndex)).attr('fill',pointColor).attr('stroke-width',this.pointStrokeWidthForSeries(lineIndex)).attr('stroke',this.pointStrokeColorForSeries(lineIndex));};Line.prototype.pointStrokeWidthForSeries=function(index){return this.options.pointStrokeWidths[index%this.options.pointStrokeWidths.length];};Line.prototype.pointStrokeColorForSeries=function(index){return this.options.pointStrokeColors[index%this.options.pointStrokeColors.length];};Line.prototype.lineWidthForSeries=function(index){if(this.options.lineWidth instanceof Array){return this.options.lineWidth[index%this.options.lineWidth.length];}else{return this.options.lineWidth;}};Line.prototype.pointSizeForSeries=function(index){if(this.options.pointSize instanceof Array){return this.options.pointSize[index%this.options.pointSize.length];}else{return this.options.pointSize;}};Line.prototype.pointGrowSeries=function(index){return Raphael.animation({r:this.pointSizeForSeries(index)+ 3},25,'linear');};Line.prototype.pointShrinkSeries=function(index){return Raphael.animation({r:this.pointSizeForSeries(index)},25,'linear');};return Line;})(Morris.Grid);Morris.labelSeries=function(dmin,dmax,pxwidth,specName,xLabelFormat){var d,d0,ddensity,name,ret,s,spec,t,_i,_len,_ref;ddensity=200*(dmax- dmin)/ pxwidth;
d0=new Date(dmin);spec=Morris.LABEL_SPECS[specName];if(spec===void 0){_ref=Morris.AUTO_LABEL_ORDER;for(_i=0,_len=_ref.length;_i<_len;_i++){name=_ref[_i];s=Morris.LABEL_SPECS[name];if(ddensity>=s.span){spec=s;break;}}}
if(spec===void 0){spec=Morris.LABEL_SPECS["second"];}
if(xLabelFormat){spec=$.extend({},spec,{fmt:xLabelFormat});}
d=spec.start(d0);ret=[];while((t=d.getTime())<=dmax){if(t>=dmin){ret.push([spec.fmt(d),t]);}
spec.incr(d);}
return ret;};minutesSpecHelper=function(interval){return{span:interval*60*1000,start:function(d){return new Date(d.getFullYear(),d.getMonth(),d.getDate(),d.getHours());},fmt:function(d){return""+(Morris.pad2(d.getHours()))+":"+(Morris.pad2(d.getMinutes()));},incr:function(d){return d.setUTCMinutes(d.getUTCMinutes()+ interval);}};};secondsSpecHelper=function(interval){return{span:interval*1000,start:function(d){return new Date(d.getFullYear(),d.getMonth(),d.getDate(),d.getHours(),d.getMinutes());},fmt:function(d){return""+(Morris.pad2(d.getHours()))+":"+(Morris.pad2(d.getMinutes()))+":"+(Morris.pad2(d.getSeconds()));},incr:function(d){return d.setUTCSeconds(d.getUTCSeconds()+ interval);}};};Morris.LABEL_SPECS={"decade":{span:172800000000,start:function(d){return new Date(d.getFullYear()- d.getFullYear()%10,0,1);},fmt:function(d){return""+(d.getFullYear());},incr:function(d){return d.setFullYear(d.getFullYear()+ 10);}},"year":{span:17280000000,start:function(d){return new Date(d.getFullYear(),0,1);},fmt:function(d){return""+(d.getFullYear());},incr:function(d){return d.setFullYear(d.getFullYear()+ 1);}},"month":{span:2419200000,start:function(d){return new Date(d.getFullYear(),d.getMonth(),1);},fmt:function(d){return""+(d.getFullYear())+"-"+(Morris.pad2(d.getMonth()+ 1));},incr:function(d){return d.setMonth(d.getMonth()+ 1);}},"week":{span:604800000,start:function(d){return new Date(d.getFullYear(),d.getMonth(),d.getDate());},fmt:function(d){return""+(d.getFullYear())+"-"+(Morris.pad2(d.getMonth()+ 1))+"-"+(Morris.pad2(d.getDate()));},incr:function(d){return d.setDate(d.getDate()+ 7);}},"day":{span:86400000,start:function(d){return new Date(d.getFullYear(),d.getMonth(),d.getDate());},fmt:function(d){return""+(d.getFullYear())+"-"+(Morris.pad2(d.getMonth()+ 1))+"-"+(Morris.pad2(d.getDate()));},incr:function(d){return d.setDate(d.getDate()+ 1);}},"hour":minutesSpecHelper(60),"30min":minutesSpecHelper(30),"15min":minutesSpecHelper(15),"10min":minutesSpecHelper(10),"5min":minutesSpecHelper(5),"minute":minutesSpecHelper(1),"30sec":secondsSpecHelper(30),"15sec":secondsSpecHelper(15),"10sec":secondsSpecHelper(10),"5sec":secondsSpecHelper(5),"second":secondsSpecHelper(1)};Morris.AUTO_LABEL_ORDER=["decade","year","month","week","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"];Morris.Area=(function(_super){var areaDefaults;__extends(Area,_super);areaDefaults={fillOpacity:'auto',behaveLikeLine:false};function Area(options){var areaOptions;if(!(this instanceof Morris.Area)){return new Morris.Area(options);}
areaOptions=$.extend({},areaDefaults,options);this.cumulative=!areaOptions.behaveLikeLine;if(areaOptions.fillOpacity==='auto'){areaOptions.fillOpacity=areaOptions.behaveLikeLine?.8:1;}
Area.__super__.constructor.call(this,areaOptions);}
Area.prototype.calcPoints=function(){var row,total,y,_i,_len,_ref,_results;_ref=this.data;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){row=_ref[_i];row._x=this.transX(row.x);total=0;row._y=(function(){var _j,_len1,_ref1,_results1;_ref1=row.y;_results1=[];for(_j=0,_len1=_ref1.length;_j<_len1;_j++){y=_ref1[_j];if(this.options.behaveLikeLine){_results1.push(this.transY(y));}else{total+=y||0;_results1.push(this.transY(total));}}
return _results1;}).call(this);_results.push(row._ymax=Math.max.apply(Math,row._y));}
return _results;};Area.prototype.drawSeries=function(){var i,range,_i,_j,_k,_len,_ref,_ref1,_results,_results1,_results2;this.seriesPoints=[];if(this.options.behaveLikeLine){range=(function(){_results=[];for(var _i=0,_ref=this.options.ykeys.length- 1;0<=_ref?_i<=_ref:_i>=_ref;0<=_ref?_i++:_i--){_results.push(_i);}
return _results;}).apply(this);}else{range=(function(){_results1=[];for(var _j=_ref1=this.options.ykeys.length- 1;_ref1<=0?_j<=0:_j>=0;_ref1<=0?_j++:_j--){_results1.push(_j);}
return _results1;}).apply(this);}
_results2=[];for(_k=0,_len=range.length;_k<_len;_k++){i=range[_k];this._drawFillFor(i);this._drawLineFor(i);_results2.push(this._drawPointFor(i));}
return _results2;};Area.prototype._drawFillFor=function(index){var path;path=this.paths[index];if(path!==null){path=path+("L"+(this.transX(this.xmax))+","+ this.bottom+"L"+(this.transX(this.xmin))+","+ this.bottom+"Z");return this.drawFilledPath(path,this.fillForSeries(index));}};Area.prototype.fillForSeries=function(i){var color;color=Raphael.rgb2hsl(this.colorFor(this.data[i],i,'line'));return Raphael.hsl(color.h,this.options.behaveLikeLine?color.s*0.9:color.s*0.75,Math.min(0.98,this.options.behaveLikeLine?color.l*1.2:color.l*1.25));};Area.prototype.drawFilledPath=function(path,fill){return this.raphael.path(path).attr('fill',fill).attr('fill-opacity',this.options.fillOpacity).attr('stroke','none');};return Area;})(Morris.Line);Morris.Bar=(function(_super){__extends(Bar,_super);function Bar(options){this.onHoverOut=__bind(this.onHoverOut,this);this.onHoverMove=__bind(this.onHoverMove,this);this.onGridClick=__bind(this.onGridClick,this);if(!(this instanceof Morris.Bar)){return new Morris.Bar(options);}
Bar.__super__.constructor.call(this,$.extend({},options,{parseTime:false}));}
Bar.prototype.init=function(){this.cumulative=this.options.stacked;if(this.options.hideHover!=='always'){this.hover=new Morris.Hover({parent:this.el});this.on('hovermove',this.onHoverMove);this.on('hoverout',this.onHoverOut);return this.on('gridclick',this.onGridClick);}};Bar.prototype.defaults={barSizeRatio:0.75,barGap:3,barColors:['#0b62a4','#7a92a3','#4da74d','#afd8f8','#edc240','#cb4b4b','#9440ed'],barOpacity:1.0,barRadius:[0,0,0,0],xLabelMargin:50};Bar.prototype.calc=function(){var _ref;this.calcBars();if(this.options.hideHover===false){return(_ref=this.hover).update.apply(_ref,this.hoverContentForRow(this.data.length- 1));}};Bar.prototype.calcBars=function(){var idx,row,y,_i,_len,_ref,_results;_ref=this.data;_results=[];for(idx=_i=0,_len=_ref.length;_i<_len;idx=++_i){row=_ref[idx];row._x=this.left+ this.width*(idx+ 0.5)/ this.data.length;
_results.push(row._y=(function(){var _j,_len1,_ref1,_results1;_ref1=row.y;_results1=[];for(_j=0,_len1=_ref1.length;_j<_len1;_j++){y=_ref1[_j];if(y!=null){_results1.push(this.transY(y));}else{_results1.push(null);}}
return _results1;}).call(this));}
return _results;};Bar.prototype.draw=function(){var _ref;if((_ref=this.options.axes)===true||_ref==='both'||_ref==='x'){this.drawXAxis();}
return this.drawSeries();};Bar.prototype.drawXAxis=function(){var i,label,labelBox,margin,offset,prevAngleMargin,prevLabelMargin,row,textBox,ypos,_i,_ref,_results;ypos=this.bottom+(this.options.xAxisLabelTopPadding||this.options.padding/2);prevLabelMargin=null;prevAngleMargin=null;_results=[];for(i=_i=0,_ref=this.data.length;0<=_ref?_i<_ref:_i>_ref;i=0<=_ref?++_i:--_i){row=this.data[this.data.length- 1- i];label=this.drawXAxisLabel(row._x,ypos,row.label);textBox=label.getBBox();label.transform("r"+(-this.options.xLabelAngle));labelBox=label.getBBox();label.transform("t0,"+(labelBox.height/2)+"...");if(this.options.xLabelAngle!==0){offset=-0.5*textBox.width*Math.cos(this.options.xLabelAngle*Math.PI/180.0);label.transform("t"+ offset+",0...");}
if(((prevLabelMargin==null)||prevLabelMargin>=labelBox.x+ labelBox.width||(prevAngleMargin!=null)&&prevAngleMargin>=labelBox.x)&&labelBox.x>=0&&(labelBox.x+ labelBox.width)<this.el.width()){if(this.options.xLabelAngle!==0){margin=1.25*this.options.gridTextSize/Math.sin(this.options.xLabelAngle*Math.PI/180.0);prevAngleMargin=labelBox.x- margin;}
_results.push(prevLabelMargin=labelBox.x- this.options.xLabelMargin);}else{_results.push(label.remove());}}
return _results;};Bar.prototype.drawSeries=function(){var barWidth,bottom,groupWidth,idx,lastTop,left,leftPadding,numBars,row,sidx,size,spaceLeft,top,ypos,zeroPos;groupWidth=this.width/this.options.data.length;numBars=this.options.stacked?1:this.options.ykeys.length;barWidth=(groupWidth*this.options.barSizeRatio- this.options.barGap*(numBars- 1))/ numBars;
if(this.options.barSize){barWidth=Math.min(barWidth,this.options.barSize);}
spaceLeft=groupWidth- barWidth*numBars- this.options.barGap*(numBars- 1);leftPadding=spaceLeft/2;zeroPos=this.ymin<=0&&this.ymax>=0?this.transY(0):null;return this.bars=(function(){var _i,_len,_ref,_results;_ref=this.data;_results=[];for(idx=_i=0,_len=_ref.length;_i<_len;idx=++_i){row=_ref[idx];lastTop=0;_results.push((function(){var _j,_len1,_ref1,_results1;_ref1=row._y;_results1=[];for(sidx=_j=0,_len1=_ref1.length;_j<_len1;sidx=++_j){ypos=_ref1[sidx];if(ypos!==null){if(zeroPos){top=Math.min(ypos,zeroPos);bottom=Math.max(ypos,zeroPos);}else{top=ypos;bottom=this.bottom;}
left=this.left+ idx*groupWidth+ leftPadding;if(!this.options.stacked){left+=sidx*(barWidth+ this.options.barGap);}
size=bottom- top;if(this.options.verticalGridCondition&&this.options.verticalGridCondition(row.x)){this.drawBar(this.left+ idx*groupWidth,this.top,groupWidth,Math.abs(this.top- this.bottom),this.options.verticalGridColor,this.options.verticalGridOpacity,this.options.barRadius);}
if(this.options.stacked){top-=lastTop;}
this.drawBar(left,top,barWidth,size,this.colorFor(row,sidx,'bar'),this.options.barOpacity,this.options.barRadius);_results1.push(lastTop+=size);}else{_results1.push(null);}}
return _results1;}).call(this));}
return _results;}).call(this);};Bar.prototype.colorFor=function(row,sidx,type){var r,s;if(typeof this.options.barColors==='function'){r={x:row.x,y:row.y[sidx],label:row.label};s={index:sidx,key:this.options.ykeys[sidx],label:this.options.labels[sidx]};return this.options.barColors.call(this,r,s,type);}else{return this.options.barColors[sidx%this.options.barColors.length];}};Bar.prototype.hitTest=function(x){if(this.data.length===0){return null;}
x=Math.max(Math.min(x,this.right),this.left);return Math.min(this.data.length- 1,Math.floor((x- this.left)/ (this.width / this.data.length)));
};Bar.prototype.onGridClick=function(x,y){var index;index=this.hitTest(x);return this.fire('click',index,this.data[index].src,x,y);};Bar.prototype.onHoverMove=function(x,y){var index,_ref;index=this.hitTest(x);return(_ref=this.hover).update.apply(_ref,this.hoverContentForRow(index));};Bar.prototype.onHoverOut=function(){if(this.options.hideHover!==false){return this.hover.hide();}};Bar.prototype.hoverContentForRow=function(index){var content,j,row,x,y,_i,_len,_ref;row=this.data[index];content="<div class='morris-hover-row-label'>"+ row.label+"</div>";_ref=row.y;for(j=_i=0,_len=_ref.length;_i<_len;j=++_i){y=_ref[j];content+="<div class='morris-hover-point' style='color: "+(this.colorFor(row,j,'label'))+"'>\n "+ this.options.labels[j]+":\n "+(this.yLabelFormat(y))+"\n</div>";}
if(typeof this.options.hoverCallback==='function'){content=this.options.hoverCallback(index,this.options,content,row.src);}
x=this.left+(index+ 0.5)*this.width/this.data.length;return[content,x];};Bar.prototype.drawXAxisLabel=function(xPos,yPos,text){var label;return label=this.raphael.text(xPos,yPos,text).attr('font-size',this.options.gridTextSize).attr('font-family',this.options.gridTextFamily).attr('font-weight',this.options.gridTextWeight).attr('fill',this.options.gridTextColor);};Bar.prototype.drawBar=function(xPos,yPos,width,height,barColor,opacity,radiusArray){var maxRadius,path;maxRadius=Math.max.apply(Math,radiusArray);if(maxRadius===0||maxRadius>height){path=this.raphael.rect(xPos,yPos,width,height);}else{path=this.raphael.path(this.roundedRect(xPos,yPos,width,height,radiusArray));}
return path.attr('fill',barColor).attr('fill-opacity',opacity).attr('stroke','none');};Bar.prototype.roundedRect=function(x,y,w,h,r){if(r==null){r=[0,0,0,0];}
return["M",x,r[0]+ y,"Q",x,y,x+ r[0],y,"L",x+ w- r[1],y,"Q",x+ w,y,x+ w,y+ r[1],"L",x+ w,y+ h- r[2],"Q",x+ w,y+ h,x+ w- r[2],y+ h,"L",x+ r[3],y+ h,"Q",x,y+ h,x,y+ h- r[3],"Z"];};return Bar;})(Morris.Grid);Morris.Donut=(function(_super){__extends(Donut,_super);Donut.prototype.defaults={colors:['#0B62A4','#3980B5','#679DC6','#95BBD7','#B0CCE1','#095791','#095085','#083E67','#052C48','#042135'],backgroundColor:'#FFFFFF',labelColor:'#000000',formatter:Morris.commas,resize:false};function Donut(options){this.resizeHandler=__bind(this.resizeHandler,this);this.select=__bind(this.select,this);this.click=__bind(this.click,this);var _this=this;if(!(this instanceof Morris.Donut)){return new Morris.Donut(options);}
this.options=$.extend({},this.defaults,options);if(typeof options.element==='string'){this.el=$(document.getElementById(options.element));}else{this.el=$(options.element);}
if(this.el===null||this.el.length===0){throw new Error("Graph placeholder not found.");}
if(options.data===void 0||options.data.length===0){return;}
this.raphael=new Raphael(this.el[0]);if(this.options.resize){$(window).bind('resize',function(evt){if(_this.timeoutId!=null){window.clearTimeout(_this.timeoutId);}
return _this.timeoutId=window.setTimeout(_this.resizeHandler,100);});}
this.setData(options.data);}
Donut.prototype.redraw=function(){var C,cx,cy,i,idx,last,max_value,min,next,seg,total,value,w,_i,_j,_k,_len,_len1,_len2,_ref,_ref1,_ref2,_results;this.raphael.clear();cx=this.el.width()/ 2;
cy=this.el.height()/ 2;
w=(Math.min(cx,cy)- 10)/ 3;
total=0;_ref=this.values;for(_i=0,_len=_ref.length;_i<_len;_i++){value=_ref[_i];total+=value;}
min=5/(2*w);C=1.9999*Math.PI- min*this.data.length;last=0;idx=0;this.segments=[];_ref1=this.values;for(i=_j=0,_len1=_ref1.length;_j<_len1;i=++_j){value=_ref1[i];next=last+ min+ C*(value/total);seg=new Morris.DonutSegment(cx,cy,w*2,w,last,next,this.data[i].color||this.options.colors[idx%this.options.colors.length],this.options.backgroundColor,idx,this.raphael);seg.render();this.segments.push(seg);seg.on('hover',this.select);seg.on('click',this.click);last=next;idx+=1;}
this.text1=this.drawEmptyDonutLabel(cx,cy- 10,this.options.labelColor,15,800);this.text2=this.drawEmptyDonutLabel(cx,cy+ 10,this.options.labelColor,14);max_value=Math.max.apply(Math,this.values);idx=0;_ref2=this.values;_results=[];for(_k=0,_len2=_ref2.length;_k<_len2;_k++){value=_ref2[_k];if(value===max_value){this.select(idx);break;}
_results.push(idx+=1);}
return _results;};Donut.prototype.setData=function(data){var row;this.data=data;this.values=(function(){var _i,_len,_ref,_results;_ref=this.data;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){row=_ref[_i];_results.push(parseFloat(row.value));}
return _results;}).call(this);return this.redraw();};Donut.prototype.click=function(idx){return this.fire('click',idx,this.data[idx]);};Donut.prototype.select=function(idx){var row,s,segment,_i,_len,_ref;_ref=this.segments;for(_i=0,_len=_ref.length;_i<_len;_i++){s=_ref[_i];s.deselect();}
segment=this.segments[idx];segment.select();row=this.data[idx];return this.setLabels(row.label,this.options.formatter(row.value,row));};Donut.prototype.setLabels=function(label1,label2){var inner,maxHeightBottom,maxHeightTop,maxWidth,text1bbox,text1scale,text2bbox,text2scale;inner=(Math.min(this.el.width()/ 2, this.el.height() / 2) - 10) * 2 / 3;
maxWidth=1.8*inner;maxHeightTop=inner/2;maxHeightBottom=inner/3;this.text1.attr({text:label1,transform:''});text1bbox=this.text1.getBBox();text1scale=Math.min(maxWidth/text1bbox.width,maxHeightTop/text1bbox.height);this.text1.attr({transform:"S"+ text1scale+","+ text1scale+","+(text1bbox.x+ text1bbox.width/2)+","+(text1bbox.y+ text1bbox.height)});this.text2.attr({text:label2,transform:''});text2bbox=this.text2.getBBox();text2scale=Math.min(maxWidth/text2bbox.width,maxHeightBottom/text2bbox.height);return this.text2.attr({transform:"S"+ text2scale+","+ text2scale+","+(text2bbox.x+ text2bbox.width/2)+","+ text2bbox.y});};Donut.prototype.drawEmptyDonutLabel=function(xPos,yPos,color,fontSize,fontWeight){var text;text=this.raphael.text(xPos,yPos,'').attr('font-size',fontSize).attr('fill',color);if(fontWeight!=null){text.attr('font-weight',fontWeight);}
return text;};Donut.prototype.resizeHandler=function(){this.timeoutId=null;this.raphael.setSize(this.el.width(),this.el.height());return this.redraw();};return Donut;})(Morris.EventEmitter);Morris.DonutSegment=(function(_super){__extends(DonutSegment,_super);function DonutSegment(cx,cy,inner,outer,p0,p1,color,backgroundColor,index,raphael){this.cx=cx;this.cy=cy;this.inner=inner;this.outer=outer;this.color=color;this.backgroundColor=backgroundColor;this.index=index;this.raphael=raphael;this.deselect=__bind(this.deselect,this);this.select=__bind(this.select,this);this.sin_p0=Math.sin(p0);this.cos_p0=Math.cos(p0);this.sin_p1=Math.sin(p1);this.cos_p1=Math.cos(p1);this.is_long=(p1- p0)>Math.PI?1:0;this.path=this.calcSegment(this.inner+ 3,this.inner+ this.outer- 5);this.selectedPath=this.calcSegment(this.inner+ 3,this.inner+ this.outer);this.hilight=this.calcArc(this.inner);}
DonutSegment.prototype.calcArcPoints=function(r){return[this.cx+ r*this.sin_p0,this.cy+ r*this.cos_p0,this.cx+ r*this.sin_p1,this.cy+ r*this.cos_p1];};DonutSegment.prototype.calcSegment=function(r1,r2){var ix0,ix1,iy0,iy1,ox0,ox1,oy0,oy1,_ref,_ref1;_ref=this.calcArcPoints(r1),ix0=_ref[0],iy0=_ref[1],ix1=_ref[2],iy1=_ref[3];_ref1=this.calcArcPoints(r2),ox0=_ref1[0],oy0=_ref1[1],ox1=_ref1[2],oy1=_ref1[3];return("M"+ ix0+","+ iy0)+("A"+ r1+","+ r1+",0,"+ this.is_long+",0,"+ ix1+","+ iy1)+("L"+ ox1+","+ oy1)+("A"+ r2+","+ r2+",0,"+ this.is_long+",1,"+ ox0+","+ oy0)+"Z";};DonutSegment.prototype.calcArc=function(r){var ix0,ix1,iy0,iy1,_ref;_ref=this.calcArcPoints(r),ix0=_ref[0],iy0=_ref[1],ix1=_ref[2],iy1=_ref[3];return("M"+ ix0+","+ iy0)+("A"+ r+","+ r+",0,"+ this.is_long+",0,"+ ix1+","+ iy1);};DonutSegment.prototype.render=function(){var _this=this;this.arc=this.drawDonutArc(this.hilight,this.color);return this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return _this.fire('hover',_this.index);},function(){return _this.fire('click',_this.index);});};DonutSegment.prototype.drawDonutArc=function(path,color){return this.raphael.path(path).attr({stroke:color,'stroke-width':2,opacity:0});};DonutSegment.prototype.drawDonutSegment=function(path,fillColor,strokeColor,hoverFunction,clickFunction){return this.raphael.path(path).attr({fill:fillColor,stroke:strokeColor,'stroke-width':3}).hover(hoverFunction).click(clickFunction);};DonutSegment.prototype.select=function(){if(!this.selected){this.seg.animate({path:this.selectedPath},150,'<>');this.arc.animate({opacity:1},150,'<>');return this.selected=true;}};DonutSegment.prototype.deselect=function(){if(this.selected){this.seg.animate({path:this.path},150,'<>');this.arc.animate({opacity:0},150,'<>');return this.selected=false;}};return DonutSegment;})(Morris.EventEmitter);}).call(this);
-11
View File
@@ -1,11 +0,0 @@
;(function(window){'use strict';var docElem=window.document.documentElement,support={animations:Modernizr.cssanimations},animEndEventNames={'WebkitAnimation':'webkitAnimationEnd','OAnimation':'oAnimationEnd','msAnimation':'MSAnimationEnd','animation':'animationend'},animEndEventName=animEndEventNames[Modernizr.prefixed('animation')];function extend(a,b){for(var key in b){if(b.hasOwnProperty(key)){a[key]=b[key];}}
return a;}
function NotificationFx(options){this.options=extend({},this.options);extend(this.options,options);this._init();}
NotificationFx.prototype.options={wrapper:document.body,message:'yo!',layout:'growl',effect:'slide',type:'error',ttl:6000,onClose:function(){return false;},onOpen:function(){return false;}}
NotificationFx.prototype._init=function(){this.ntf=document.createElement('div');this.ntf.className='ns-box ns-'+ this.options.layout+' ns-effect-'+ this.options.effect+' ns-type-'+ this.options.type;var strinner='<div class="ns-box-inner">';strinner+=this.options.message;strinner+='</div>';strinner+='<span class="ns-close"></span></div>';this.ntf.innerHTML=strinner;this.options.wrapper.insertBefore(this.ntf,this.options.wrapper.firstChild);var self=this;this.dismissttl=setTimeout(function(){if(self.active){self.dismiss();}},this.options.ttl);this._initEvents();}
NotificationFx.prototype._initEvents=function(){var self=this;this.ntf.querySelector('.ns-close').addEventListener('click',function(){self.dismiss();});}
NotificationFx.prototype.show=function(){this.active=true;classie.remove(this.ntf,'ns-hide');classie.add(this.ntf,'ns-show');this.options.onOpen();}
NotificationFx.prototype.dismiss=function(){var self=this;this.active=false;clearTimeout(this.dismissttl);classie.remove(this.ntf,'ns-show');setTimeout(function(){classie.add(self.ntf,'ns-hide');self.options.onClose();},25);var onEndAnimationFn=function(ev){if(support.animations){if(ev.target!==self.ntf)return false;this.removeEventListener(animEndEventName,onEndAnimationFn);}
self.options.wrapper.removeChild(this);};if(support.animations){this.ntf.addEventListener(animEndEventName,onEndAnimationFn);}
else{onEndAnimationFn();}}
window.NotificationFx=NotificationFx;})(window);
-10
View File
@@ -1,10 +0,0 @@
/* Rainbow v1.1.8 rainbowco.de | included languages: generic, javascript */
window.Rainbow=function(){function q(a){var b,c=a.getAttribute&&a.getAttribute("data-language")||0;if(!c){a=a.attributes;for(b=0;b<a.length;++b)if("data-language"===a[b].nodeName)return a[b].nodeValue}return c}function B(a){var b=q(a)||q(a.parentNode);if(!b){var c=/\blang(?:uage)?-(\w+)/;(a=a.className.match(c)||a.parentNode.className.match(c))&&(b=a[1])}return b}function C(a,b){for(var c in e[d]){c=parseInt(c,10);if(a==c&&b==e[d][c]?0:a<=c&&b>=e[d][c])delete e[d][c],delete j[d][c];if(a>=c&&a<e[d][c]||
b>c&&b<e[d][c])return!0}return!1}function r(a,b){return'<span class="'+a.replace(/\./g," ")+(l?" "+l:"")+'">'+b+"</span>"}function s(a,b,c,h){var f=a.exec(c);if(f){++t;!b.name&&"string"==typeof b.matches[0]&&(b.name=b.matches[0],delete b.matches[0]);var k=f[0],i=f.index,u=f[0].length+i,g=function(){function f(){s(a,b,c,h)}t%100>0?f():setTimeout(f,0)};if(C(i,u))g();else{var m=v(b.matches),l=function(a,c,h){if(a>=c.length)h(k);else{var d=f[c[a]];if(d){var e=b.matches[c[a]],i=e.language,g=e.name&&e.matches?
e.matches:e,j=function(b,d,e){var i;i=0;var g;for(g=1;g<c[a];++g)f[g]&&(i=i+f[g].length);d=e?r(e,d):d;k=k.substr(0,i)+k.substr(i).replace(b,d);l(++a,c,h)};i?n(d,i,function(a){j(d,a)}):typeof e==="string"?j(d,d,e):w(d,g.length?g:[g],function(a){j(d,a,e.matches?e.name:0)})}else l(++a,c,h)}};l(0,m,function(a){b.name&&(a=r(b.name,a));if(!j[d]){j[d]={};e[d]={}}j[d][i]={replace:f[0],"with":a};e[d][i]=u;g()})}}else h()}function v(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort(function(a,
b){return b-a})}function w(a,b,c){function h(b,k){k<b.length?s(b[k].pattern,b[k],a,function(){h(b,++k)}):D(a,function(a){delete j[d];delete e[d];--d;c(a)})}++d;h(b,0)}function D(a,b){function c(a,b,h,e){if(h<b.length){++x;var g=b[h],l=j[d][g],a=a.substr(0,g)+a.substr(g).replace(l.replace,l["with"]),g=function(){c(a,b,++h,e)};0<x%250?g():setTimeout(g,0)}else e(a)}var h=v(j[d]);c(a,h,0,b)}function n(a,b,c){var d=m[b]||[],f=m[y]||[],b=z[b]?d:d.concat(f);w(a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&(?![\w\#]+;)/g,
"&amp;"),b,c)}function o(a,b,c){if(b<a.length){var d=a[b],f=B(d);return!(-1<(" "+d.className+" ").indexOf(" rainbow "))&&f?(f=f.toLowerCase(),d.className+=d.className?" rainbow":"rainbow",n(d.innerHTML,f,function(k){d.innerHTML=k;j={};e={};p&&p(d,f);setTimeout(function(){o(a,++b,c)},0)})):o(a,++b,c)}c&&c()}function A(a,b){var a=a&&"function"==typeof a.getElementsByTagName?a:document,c=a.getElementsByTagName("pre"),d=a.getElementsByTagName("code"),f,e=[];for(f=0;f<d.length;++f)e.push(d[f]);for(f=0;f<
c.length;++f)c[f].getElementsByTagName("code").length||e.push(c[f]);o(e,0,b)}var j={},e={},m={},z={},d=0,y=0,t=0,x=0,l,p;return{extend:function(a,b,c){1==arguments.length&&(b=a,a=y);z[a]=c;m[a]=b.concat(m[a]||[])},b:function(a){p=a},a:function(a){l=a},color:function(a,b,c){if("string"==typeof a)return n(a,b,c);if("function"==typeof a)return A(0,a);A(a,b)}}}();window.addEventListener?window.addEventListener("load",Rainbow.color,!1):window.attachEvent("onload",Rainbow.color);Rainbow.onHighlight=Rainbow.b;
Rainbow.addClass=Rainbow.a;Rainbow.extend([{matches:{1:{name:"keyword.operator",pattern:/\=/g},2:{name:"string",matches:{name:"constant.character.escape",pattern:/\\('|"){1}/g}}},pattern:/(\(|\s|\[|\=|:)(('|")([^\\\1]|\\.)*?(\3))/gm},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|(\/\/|\#)[\s\S]*?$/gm},{name:"constant.numeric",pattern:/\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi},{matches:{1:"keyword"},pattern:/\b(and|array|as|bool(ean)?|c(atch|har|lass|onst)|d(ef|elete|o(uble)?)|e(cho|lse(if)?|xit|xtends|xcept)|f(inally|loat|or(each)?|unction)|global|if|import|int(eger)?|long|new|object|or|pr(int|ivate|otected)|public|return|self|st(ring|ruct|atic)|switch|th(en|is|row)|try|(un)?signed|var|void|while)(?=\(|\b)/gi},
{name:"constant.language",pattern:/true|false|null/g},{name:"keyword.operator",pattern:/\+|\!|\-|&(gt|lt|amp);|\||\*|\=/g},{matches:{1:"function.call"},pattern:/(\w+?)(?=\()/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(function)\s(.*?)(?=\()/g}]);Rainbow.extend("javascript",[{name:"selector",pattern:/(\s|^)\$(?=\.|\()/g},{name:"support",pattern:/\b(window|document)\b/g},{matches:{1:"support.property"},pattern:/\.(length|node(Name|Value))\b/g},{matches:{1:"support.function"},pattern:/(setTimeout|setInterval)(?=\()/g},{matches:{1:"support.method"},pattern:/\.(getAttribute|push|getElementById|getElementsByClassName|log|setTimeout|setInterval)(?=\()/g},{matches:{1:"support.tag.script",2:[{name:"string",pattern:/('|")(.*?)(\1)/g},{name:"entity.tag.script",
pattern:/(\w+)/g}],3:"support.tag.script"},pattern:/(&lt;\/?)(script.*?)(&gt;)/g},{name:"string.regexp",matches:{1:"string.regexp.open",2:{name:"constant.regexp.escape",pattern:/\\(.){1}/g},3:"string.regexp.close",4:"string.regexp.modifier"},pattern:/(\/)(?!\*)(.+)(\/)([igm]{0,3})/g},{matches:{1:"storage",3:"entity.function"},pattern:/(var)?(\s|^)(.*)(?=\s?=\s?function\()/g},{matches:{1:"keyword",2:"entity.function"},pattern:/(new)\s+(.*)(?=\()/g},{name:"entity.function",pattern:/(\w+)(?=:\s{0,}function)/g}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-54
View File
@@ -1,54 +0,0 @@
$(function(){
$('.addCart').click(function(){
event.preventDefault();
var $img = $('.'+$(this).attr('data-src'));
var target = $('.'+$(this).attr('data-target'));
var goods_id = $(this).attr('data-id');
var num = $("."+$(this).attr('data-num')).val();
num = num ? num : 1;
var src = $img.attr('src');
var $showg = $('<img id="cart_dh" style="display:none; border:1px solid #aaa; z-index:99999;" width="200" height="200" src="'+src+'" />').prependTo("body");
$showg.css({
'width' : 200,
'height': 200,
'position' : 'absolute',
"left":$img.offset().left+16,
"top":$img.offset().top+9,
'opacity' : 1
}).show();
$showg.animate({
width: 1,
height: 1,
top: target.offset().top,
left: target.offset().left,
opacity: 0
},500,function(){
$('img#cart_dh').remove();
$.ajax({
url : BASE_URL + '/cart/add.html',
data : {'id':goods_id,'num':num},
type : 'post',
success : function(data){
target.find('.badge').html(data.num);
},
dataType : 'json'
})
});
});
var cartCountBadge = $('.CartBtn');
if (typeof cartCountBadge == 'object') {
setCartCount();
}
function setCartCount(){
$.ajax({
url : BASE_URL + '/cart/count.html',
type : 'post',
success : function(data){
cartCountBadge.find('.badge').html(data.info);
},
dataType : 'json'
});
}
})
-38
View File
@@ -1,38 +0,0 @@
(function(global){"use strict";var requestInterval,cancelInterval;(function(){var raf=global.requestAnimationFrame||global.webkitRequestAnimationFrame||global.mozRequestAnimationFrame||global.oRequestAnimationFrame||global.msRequestAnimationFrame,caf=global.cancelAnimationFrame||global.webkitCancelAnimationFrame||global.mozCancelAnimationFrame||global.oCancelAnimationFrame||global.msCancelAnimationFrame;if(raf&&caf){requestInterval=function(fn,delay){var handle={value:null};function loop(){handle.value=raf(loop);fn();}
loop();return handle;};cancelInterval=function(handle){caf(handle.value);};}
else{requestInterval=setInterval;cancelInterval=clearInterval;}}());var KEYFRAME=500,STROKE=0.08,TAU=2.0*Math.PI,TWO_OVER_SQRT_2=2.0/Math.sqrt(2);function circle(ctx,x,y,r){ctx.beginPath();ctx.arc(x,y,r,0,TAU,false);ctx.fill();}
function line(ctx,ax,ay,bx,by){ctx.beginPath();ctx.moveTo(ax,ay);ctx.lineTo(bx,by);ctx.stroke();}
function puff(ctx,t,cx,cy,rx,ry,rmin,rmax){var c=Math.cos(t*TAU),s=Math.sin(t*TAU);rmax-=rmin;circle(ctx,cx- s*rx,cy+ c*ry+ rmax*0.5,rmin+(1- c*0.5)*rmax);}
function puffs(ctx,t,cx,cy,rx,ry,rmin,rmax){var i;for(i=5;i--;)
puff(ctx,t+ i/5,cx,cy,rx,ry,rmin,rmax);}
function cloud(ctx,t,cx,cy,cw,s,color){t/=30000;var a=cw*0.21,b=cw*0.12,c=cw*0.24,d=cw*0.28;ctx.fillStyle=color;puffs(ctx,t,cx,cy,a,b,c,d);ctx.globalCompositeOperation='destination-out';puffs(ctx,t,cx,cy,a,b,c- s,d- s);ctx.globalCompositeOperation='source-over';}
function sun(ctx,t,cx,cy,cw,s,color){t/=120000;var a=cw*0.25- s*0.5,b=cw*0.32+ s*0.5,c=cw*0.50- s*0.5,i,p,cos,sin;ctx.strokeStyle=color;ctx.lineWidth=s;ctx.lineCap="round";ctx.lineJoin="round";ctx.beginPath();ctx.arc(cx,cy,a,0,TAU,false);ctx.stroke();for(i=8;i--;){p=(t+ i/8)*TAU;cos=Math.cos(p);sin=Math.sin(p);line(ctx,cx+ cos*b,cy+ sin*b,cx+ cos*c,cy+ sin*c);}}
function moon(ctx,t,cx,cy,cw,s,color){t/=15000;var a=cw*0.29- s*0.5,b=cw*0.05,c=Math.cos(t*TAU),p=c*TAU/-16;ctx.strokeStyle=color;ctx.lineWidth=s;ctx.lineCap="round";ctx.lineJoin="round";cx+=c*b;ctx.beginPath();ctx.arc(cx,cy,a,p+ TAU/8,p+ TAU*7/8,false);ctx.arc(cx+ Math.cos(p)*a*TWO_OVER_SQRT_2,cy+ Math.sin(p)*a*TWO_OVER_SQRT_2,a,p+ TAU*5/8,p+ TAU*3/8,true);ctx.closePath();ctx.stroke();}
function rain(ctx,t,cx,cy,cw,s,color){t/=1350;var a=cw*0.16,b=TAU*11/12,c=TAU*7/12,i,p,x,y;ctx.fillStyle=color;for(i=4;i--;){p=(t+ i/4)%1;x=cx+((i- 1.5)/ 1.5) * (i === 1 || i === 2 ? -1 : 1) * a;
y=cy+ p*p*cw;ctx.beginPath();ctx.moveTo(x,y- s*1.5);ctx.arc(x,y,s*0.75,b,c,false);ctx.fill();}}
function sleet(ctx,t,cx,cy,cw,s,color){t/=750;var a=cw*0.1875,b=TAU*11/12,c=TAU*7/12,i,p,x,y;ctx.strokeStyle=color;ctx.lineWidth=s*0.5;ctx.lineCap="round";ctx.lineJoin="round";for(i=4;i--;){p=(t+ i/4)%1;x=Math.floor(cx+((i- 1.5)/ 1.5) * (i === 1 || i === 2 ? -1 : 1) * a) + 0.5;
y=cy+ p*cw;line(ctx,x,y- s*1.5,x,y+ s*1.5);}}
function snow(ctx,t,cx,cy,cw,s,color){t/=3000;var a=cw*0.16,b=s*0.75,u=t*TAU*0.7,ux=Math.cos(u)*b,uy=Math.sin(u)*b,v=u+ TAU/3,vx=Math.cos(v)*b,vy=Math.sin(v)*b,w=u+ TAU*2/3,wx=Math.cos(w)*b,wy=Math.sin(w)*b,i,p,x,y;ctx.strokeStyle=color;ctx.lineWidth=s*0.5;ctx.lineCap="round";ctx.lineJoin="round";for(i=4;i--;){p=(t+ i/4)%1;x=cx+ Math.sin((p+ i/4)*TAU)*a;y=cy+ p*cw;line(ctx,x- ux,y- uy,x+ ux,y+ uy);line(ctx,x- vx,y- vy,x+ vx,y+ vy);line(ctx,x- wx,y- wy,x+ wx,y+ wy);}}
function fogbank(ctx,t,cx,cy,cw,s,color){t/=30000;var a=cw*0.21,b=cw*0.06,c=cw*0.21,d=cw*0.28;ctx.fillStyle=color;puffs(ctx,t,cx,cy,a,b,c,d);ctx.globalCompositeOperation='destination-out';puffs(ctx,t,cx,cy,a,b,c- s,d- s);ctx.globalCompositeOperation='source-over';}
var WIND_PATHS=[[-0.7500,-0.1800,-0.7219,-0.1527,-0.6971,-0.1225,-0.6739,-0.0910,-0.6516,-0.0588,-0.6298,-0.0262,-0.6083,0.0065,-0.5868,0.0396,-0.5643,0.0731,-0.5372,0.1041,-0.5033,0.1259,-0.4662,0.1406,-0.4275,0.1493,-0.3881,0.1530,-0.3487,0.1526,-0.3095,0.1488,-0.2708,0.1421,-0.2319,0.1342,-0.1943,0.1217,-0.1600,0.1025,-0.1290,0.0785,-0.1012,0.0509,-0.0764,0.0206,-0.0547,-0.0120,-0.0378,-0.0472,-0.0324,-0.0857,-0.0389,-0.1241,-0.0546,-0.1599,-0.0814,-0.1876,-0.1193,-0.1964,-0.1582,-0.1935,-0.1931,-0.1769,-0.2157,-0.1453,-0.2290,-0.1085,-0.2327,-0.0697,-0.2240,-0.0317,-0.2064,0.0033,-0.1853,0.0362,-0.1613,0.0672,-0.1350,0.0961,-0.1051,0.1213,-0.0706,0.1397,-0.0332,0.1512,0.0053,0.1580,0.0442,0.1624,0.0833,0.1636,0.1224,0.1615,0.1613,0.1565,0.1999,0.1500,0.2378,0.1402,0.2749,0.1279,0.3118,0.1147,0.3487,0.1015,0.3858,0.0892,0.4236,0.0787,0.4621,0.0715,0.5012,0.0702,0.5398,0.0766,0.5768,0.0890,0.6123,0.1055,0.6466,0.1244,0.6805,0.1440,0.7147,0.1630,0.7500,0.1800],[-0.7500,0.0000,-0.7033,0.0195,-0.6569,0.0399,-0.6104,0.0600,-0.5634,0.0789,-0.5155,0.0954,-0.4667,0.1089,-0.4174,0.1206,-0.3676,0.1299,-0.3174,0.1365,-0.2669,0.1398,-0.2162,0.1391,-0.1658,0.1347,-0.1157,0.1271,-0.0661,0.1169,-0.0170,0.1046,0.0316,0.0903,0.0791,0.0728,0.1259,0.0534,0.1723,0.0331,0.2188,0.0129,0.2656,-0.0064,0.3122,-0.0263,0.3586,-0.0466,0.4052,-0.0665,0.4525,-0.0847,0.5007,-0.1002,0.5497,-0.1130,0.5991,-0.1240,0.6491,-0.1325,0.6994,-0.1380,0.7500,-0.1400]],WIND_OFFSETS=[{start:0.36,end:0.11},{start:0.56,end:0.16}];function leaf(ctx,t,x,y,cw,s,color){var a=cw/8,b=a/3,c=2*b,d=(t%1)*TAU,e=Math.cos(d),f=Math.sin(d);ctx.fillStyle=color;ctx.strokeStyle=color;ctx.lineWidth=s;ctx.lineCap="round";ctx.lineJoin="round";ctx.beginPath();ctx.arc(x,y,a,d,d+ Math.PI,false);ctx.arc(x- b*e,y- b*f,c,d+ Math.PI,d,false);ctx.arc(x+ c*e,y+ c*f,b,d+ Math.PI,d,true);ctx.globalCompositeOperation='destination-out';ctx.fill();ctx.globalCompositeOperation='source-over';ctx.stroke();}
function swoosh(ctx,t,cx,cy,cw,s,index,total,color){t/=2500;var path=WIND_PATHS[index],a=(t+ index- WIND_OFFSETS[index].start)%total,c=(t+ index- WIND_OFFSETS[index].end)%total,e=(t+ index)%total,b,d,f,i;ctx.strokeStyle=color;ctx.lineWidth=s;ctx.lineCap="round";ctx.lineJoin="round";if(a<1){ctx.beginPath();a*=path.length/2- 1;b=Math.floor(a);a-=b;b*=2;b+=2;ctx.moveTo(cx+(path[b- 2]*(1- a)+ path[b]*a)*cw,cy+(path[b- 1]*(1- a)+ path[b+ 1]*a)*cw);if(c<1){c*=path.length/2- 1;d=Math.floor(c);c-=d;d*=2;d+=2;for(i=b;i!==d;i+=2)
ctx.lineTo(cx+ path[i]*cw,cy+ path[i+ 1]*cw);ctx.lineTo(cx+(path[d- 2]*(1- c)+ path[d]*c)*cw,cy+(path[d- 1]*(1- c)+ path[d+ 1]*c)*cw);}
else
for(i=b;i!==path.length;i+=2)
ctx.lineTo(cx+ path[i]*cw,cy+ path[i+ 1]*cw);ctx.stroke();}
else if(c<1){ctx.beginPath();c*=path.length/2- 1;d=Math.floor(c);c-=d;d*=2;d+=2;ctx.moveTo(cx+ path[0]*cw,cy+ path[1]*cw);for(i=2;i!==d;i+=2)
ctx.lineTo(cx+ path[i]*cw,cy+ path[i+ 1]*cw);ctx.lineTo(cx+(path[d- 2]*(1- c)+ path[d]*c)*cw,cy+(path[d- 1]*(1- c)+ path[d+ 1]*c)*cw);ctx.stroke();}
if(e<1){e*=path.length/2- 1;f=Math.floor(e);e-=f;f*=2;f+=2;leaf(ctx,t,cx+(path[f- 2]*(1- e)+ path[f]*e)*cw,cy+(path[f- 1]*(1- e)+ path[f+ 1]*e)*cw,cw,s,color);}}
var Skycons=function(opts){this.list=[];this.interval=null;this.color=opts&&opts.color?opts.color:"black";this.resizeClear=!!(opts&&opts.resizeClear);};Skycons.CLEAR_DAY=function(ctx,t,color){var w=ctx.canvas.width,h=ctx.canvas.height,s=Math.min(w,h);sun(ctx,t,w*0.5,h*0.5,s,s*STROKE,color);};Skycons.CLEAR_NIGHT=function(ctx,t,color){var w=ctx.canvas.width,h=ctx.canvas.height,s=Math.min(w,h);moon(ctx,t,w*0.5,h*0.5,s,s*STROKE,color);};Skycons.PARTLY_CLOUDY_DAY=function(ctx,t,color){var w=ctx.canvas.width,h=ctx.canvas.height,s=Math.min(w,h);sun(ctx,t,w*0.625,h*0.375,s*0.75,s*STROKE,color);cloud(ctx,t,w*0.375,h*0.625,s*0.75,s*STROKE,color);};Skycons.PARTLY_CLOUDY_NIGHT=function(ctx,t,color){var w=ctx.canvas.width,h=ctx.canvas.height,s=Math.min(w,h);moon(ctx,t,w*0.667,h*0.375,s*0.75,s*STROKE,color);cloud(ctx,t,w*0.375,h*0.625,s*0.75,s*STROKE,color);};Skycons.CLOUDY=function(ctx,t,color){var w=ctx.canvas.width,h=ctx.canvas.height,s=Math.min(w,h);cloud(ctx,t,w*0.5,h*0.5,s,s*STROKE,color);};Skycons.RAIN=function(ctx,t,color){var w=ctx.canvas.width,h=ctx.canvas.height,s=Math.min(w,h);rain(ctx,t,w*0.5,h*0.37,s*0.9,s*STROKE,color);cloud(ctx,t,w*0.5,h*0.37,s*0.9,s*STROKE,color);};Skycons.SLEET=function(ctx,t,color){var w=ctx.canvas.width,h=ctx.canvas.height,s=Math.min(w,h);sleet(ctx,t,w*0.5,h*0.37,s*0.9,s*STROKE,color);cloud(ctx,t,w*0.5,h*0.37,s*0.9,s*STROKE,color);};Skycons.SNOW=function(ctx,t,color){var w=ctx.canvas.width,h=ctx.canvas.height,s=Math.min(w,h);snow(ctx,t,w*0.5,h*0.37,s*0.9,s*STROKE,color);cloud(ctx,t,w*0.5,h*0.37,s*0.9,s*STROKE,color);};Skycons.WIND=function(ctx,t,color){var w=ctx.canvas.width,h=ctx.canvas.height,s=Math.min(w,h);swoosh(ctx,t,w*0.5,h*0.5,s,s*STROKE,0,2,color);swoosh(ctx,t,w*0.5,h*0.5,s,s*STROKE,1,2,color);};Skycons.FOG=function(ctx,t,color){var w=ctx.canvas.width,h=ctx.canvas.height,s=Math.min(w,h),k=s*STROKE;fogbank(ctx,t,w*0.5,h*0.32,s*0.75,k,color);t/=5000;var a=Math.cos((t)*TAU)*s*0.02,b=Math.cos((t+ 0.25)*TAU)*s*0.02,c=Math.cos((t+ 0.50)*TAU)*s*0.02,d=Math.cos((t+ 0.75)*TAU)*s*0.02,n=h*0.936,e=Math.floor(n- k*0.5)+ 0.5,f=Math.floor(n- k*2.5)+ 0.5;ctx.strokeStyle=color;ctx.lineWidth=k;ctx.lineCap="round";ctx.lineJoin="round";line(ctx,a+ w*0.2+ k*0.5,e,b+ w*0.8- k*0.5,e);line(ctx,c+ w*0.2+ k*0.5,f,d+ w*0.8- k*0.5,f);};Skycons.prototype={_determineDrawingFunction:function(draw){if(typeof draw==="string")
draw=Skycons[draw.toUpperCase().replace(/-/g,"_")]||null;return draw;},add:function(el,draw){var obj;if(typeof el==="string")
el=document.getElementById(el);if(el===null)
return;draw=this._determineDrawingFunction(draw);if(typeof draw!=="function")
return;obj={element:el,context:el.getContext("2d"),drawing:draw};this.list.push(obj);this.draw(obj,KEYFRAME);},set:function(el,draw){var i;if(typeof el==="string")
el=document.getElementById(el);for(i=this.list.length;i--;)
if(this.list[i].element===el){this.list[i].drawing=this._determineDrawingFunction(draw);this.draw(this.list[i],KEYFRAME);return;}
this.add(el,draw);},remove:function(el){var i;if(typeof el==="string")
el=document.getElementById(el);for(i=this.list.length;i--;)
if(this.list[i].element===el){this.list.splice(i,1);return;}},draw:function(obj,time){var canvas=obj.context.canvas;if(this.resizeClear)
canvas.width=canvas.width;else
obj.context.clearRect(0,0,canvas.width,canvas.height);obj.drawing(obj.context,time,this.color);},play:function(){var self=this;this.pause();this.interval=requestInterval(function(){var now=Date.now(),i;for(i=self.list.length;i--;)
self.draw(self.list[i],now);},1000/60);},pause:function(){var i;if(this.interval){cancelInterval(this.interval);this.interval=null;}}};global.Skycons=Skycons;}(this));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
jQuery(document).ready(function($){var $timeline_block=$('.cd-timeline-block');$timeline_block.each(function(){if($(this).offset().top>$(window).scrollTop()+$(window).height()*0.75){$(this).find('.cd-timeline-img, .cd-timeline-content').addClass('is-hidden');}});$(window).on('scroll',function(){$timeline_block.each(function(){if($(this).offset().top<=$(window).scrollTop()+$(window).height()*0.75&&$(this).find('.cd-timeline-img').hasClass('is-hidden')){$(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden').addClass('bounce-in');}});});});
File diff suppressed because one or more lines are too long
-250
View File
@@ -1,250 +0,0 @@
/**
* Unslider by @idiot and @damirfoy
* Contributors:
* - @ShamoX
*
*/
(function($, f) {
var Unslider = function() {
// Object clone
var _ = this;
// Set some options
_.o = {
speed: 500, // animation speed, false for no transition (integer or boolean)
delay: 3000, // delay between slides, false for no autoplay (integer or boolean)
init: 0, // init delay, false for no delay (integer or boolean)
pause: !f, // pause on hover (boolean)
loop: !f, // infinitely looping (boolean)
keys: f, // keyboard shortcuts (boolean)
dots: f, // display dots pagination (boolean)
arrows: f, // display prev/next arrows (boolean)
prev: '&larr;', // text or html inside prev button (string)
next: '&rarr;', // same as for prev option
fluid: f, // is it a percentage width? (boolean)
starting: f, // invoke before animation (function with argument)
complete: f, // invoke after animation (function with argument)
items: '>ul', // slides container selector
item: '>li', // slidable items selector
easing: 'swing',// easing function to use for animation
autoplay: true // enable autoplay on initialisation
};
_.init = function(el, o) {
// Check whether we're passing any options in to Unslider
_.o = $.extend(_.o, o);
_.el = el;
_.ul = el.find(_.o.items);
_.max = [el.outerWidth() | 0, el.outerHeight() | 0];
_.li = _.ul.find(_.o.item).each(function(index) {
var me = $(this),
width = me.outerWidth(),
height = me.outerHeight();
// Set the max values
if (width > _.max[0]) _.max[0] = width;
if (height > _.max[1]) _.max[1] = height;
});
// Cached vars
var o = _.o,
ul = _.ul,
li = _.li,
len = li.length;
// Current indeed
_.i = 0;
// Set the main element
el.css({width: _.max[0], height: li.first().outerHeight(), overflow: 'hidden'});
// Set the relative widths
ul.css({position: 'relative', left: 0, width: (len * 100) + '%'});
if(o.fluid) {
li.css({'float': 'left', width: (100 / len) + '%'});
} else {
li.css({'float': 'left', width: (_.max[0]) + 'px'});
}
// Autoslide
o.autoplay && setTimeout(function() {
if (o.delay | 0) {
_.play();
if (o.pause) {
el.on('mouseover mouseout', function(e) {
_.stop();
e.type == 'mouseout' && _.play();
});
};
};
}, o.init | 0);
// Keypresses
if (o.keys) {
$(document).keydown(function(e) {
var key = e.which;
if (key == 37)
_.prev(); // Left
else if (key == 39)
_.next(); // Right
else if (key == 27)
_.stop(); // Esc
});
};
// Dot pagination
o.dots && nav('dot');
// Arrows support
o.arrows && nav('arrow');
// Patch for fluid-width sliders. Screw those guys.
if (o.fluid) {
$(window).resize(function() {
_.r && clearTimeout(_.r);
_.r = setTimeout(function() {
var styl = {height: li.eq(_.i).outerHeight()},
width = el.outerWidth();
ul.css(styl);
styl['width'] = Math.min(Math.round((width / el.parent().width()) * 100), 100) + '%';
el.css(styl);
li.css({ width: width + 'px' });
}, 50);
}).resize();
};
// Move support
if ($.event.special['move'] || $.Event('move')) {
el.on('movestart', function(e) {
if ((e.distX > e.distY && e.distX < -e.distY) || (e.distX < e.distY && e.distX > -e.distY)) {
e.preventDefault();
}else{
el.data("left", _.ul.offset().left / el.width() * 100);
}
}).on('move', function(e) {
var left = 100 * e.distX / el.width();
var leftDelta = 100 * e.deltaX / el.width();
_.ul[0].style.left = parseInt(_.ul[0].style.left.replace("%", ""))+leftDelta+"%";
_.ul.data("left", left);
}).on('moveend', function(e) {
var left = _.ul.data("left");
if (Math.abs(left) > 30){
var i = left > 0 ? _.i-1 : _.i+1;
if (i < 0 || i >= len) i = _.i;
_.to(i);
}else{
_.to(_.i);
}
});
};
return _;
};
// Move Unslider to a slide index
_.to = function(index, callback) {
if (_.t) {
_.stop();
_.play();
}
var o = _.o,
el = _.el,
ul = _.ul,
li = _.li,
current = _.i,
target = li.eq(index);
$.isFunction(o.starting) && !callback && o.starting(el, li.eq(current));
// To slide or not to slide
if ((!target.length || index < 0) && o.loop == f) return;
// Check if it's out of bounds
if (!target.length) index = 0;
if (index < 0) index = li.length - 1;
target = li.eq(index);
var speed = callback ? 5 : o.speed | 0,
easing = o.easing,
obj = {height: target.outerHeight()};
if (!ul.queue('fx').length) {
// Handle those pesky dots
el.find('.dot').eq(index).addClass('active').siblings().removeClass('active');
el.animate(obj, speed, easing) && ul.animate($.extend({left: '-' + index + '00%'}, obj), speed, easing, function(data) {
_.i = index;
$.isFunction(o.complete) && !callback && o.complete(el, target);
});
};
};
// Autoplay functionality
_.play = function() {
_.t = setInterval(function() {
_.to(_.i + 1);
}, _.o.delay | 0);
};
// Stop autoplay
_.stop = function() {
_.t = clearInterval(_.t);
return _;
};
// Move to previous/next slide
_.next = function() {
return _.stop().to(_.i + 1);
};
_.prev = function() {
return _.stop().to(_.i - 1);
};
// Create dots and arrows
function nav(name, html) {
if (name == 'dot') {
html = '<ol class="dots">';
$.each(_.li, function(index) {
html += '<li class="' + (index == _.i ? name + ' active' : name) + '">' + ++index + '</li>';
});
html += '</ol>';
} else {
html = '<div class="';
html = html + name + 's">' + html + name + ' prev">' + _.o.prev + '</div>' + html + name + ' next">' + _.o.next + '</div></div>';
};
_.el.addClass('has-' + name + 's').append(html).find('.' + name).click(function() {
var me = $(this);
me.hasClass('dot') ? _.stop().to(me.index()) : me.hasClass('prev') ? _.prev() : _.next();
});
};
};
// Create a jQuery plugin
$.fn.unslider = function(o) {
var len = this.length;
// Enable multiple-slider support
return this.each(function(index) {
// Cache a copy of $(this), so it
var me = $(this),
key = 'unslider' + (len > 1 ? '-' + ++index : ''),
instance = (new Unslider).init(me, o);
// Invoke an Unslider instance
me.data(key, instance).data('key', key);
});
};
Unslider.version = "1.0.0";
})(jQuery, false);
-8
View File
@@ -1,8 +0,0 @@
var Wizard=function(element,options){var kids;this.$element=$(element);this.options=$.extend({},$.fn.wizard.defaults,options);this.currentStep=this.options.selectedItem.step;this.numSteps=this.$element.find('.steps li').length;this.$prevBtn=this.$element.find('button.btn-prev');this.$nextBtn=this.$element.find('button.btn-next');kids=this.$nextBtn.children().detach();this.nextText=$.trim(this.$nextBtn.text());this.$nextBtn.append(kids);this.$prevBtn.on('click',$.proxy(this.previous,this));this.$nextBtn.on('click',$.proxy(this.next,this));this.$element.on('click','li.complete',$.proxy(this.stepclicked,this));if(this.currentStep>1){this.selectedItem(this.options.selectedItem);}};Wizard.prototype={constructor:Wizard,setState:function(){var canMovePrev=(this.currentStep>1);var firstStep=(this.currentStep===1);var lastStep=(this.currentStep===this.numSteps);this.$prevBtn.attr('disabled',(firstStep===true||canMovePrev===false));var data=this.$nextBtn.data();if(data&&data.last){this.lastText=data.last;if(typeof this.lastText!=='undefined'){var text=(lastStep!==true)?this.nextText:this.lastText;var kids=this.$nextBtn.children().detach();this.$nextBtn.text(text).append(kids);}}
var $steps=this.$element.find('.steps li');$steps.removeClass('active').removeClass('complete');$steps.find('span.badge').removeClass('badge-primary').removeClass('badge-success');var prevSelector='.steps li:lt('+(this.currentStep- 1)+')';var $prevSteps=this.$element.find(prevSelector);$prevSteps.addClass('complete');$prevSteps.find('span.badge').addClass('badge-success');var currentSelector='.steps li:eq('+(this.currentStep- 1)+')';var $currentStep=this.$element.find(currentSelector);$currentStep.addClass('active');$currentStep.find('span.badge').addClass('badge-primary');var target=$currentStep.data().target;this.$element.find('.step-pane').removeClass('active');$(target).addClass('active');$('.wizard .steps').attr('style','margin-left: 0');var totalWidth=0;$('.wizard .steps > li').each(function(){totalWidth+=$(this).outerWidth();});var containerWidth=0;if($('.wizard .actions').length){containerWidth=$('.wizard').width()- $('.wizard .actions').outerWidth();}else{containerWidth=$('.wizard').width();}
if(totalWidth>containerWidth){var newMargin=totalWidth- containerWidth;$('.wizard .steps').attr('style','margin-left: -'+ newMargin+'px');if($('.wizard li.active').position().left<200){newMargin+=$('.wizard li.active').position().left- 200;if(newMargin<1){$('.wizard .steps').attr('style','margin-left: 0');}else{$('.wizard .steps').attr('style','margin-left: -'+ newMargin+'px');}}}
this.$element.trigger('changed');},stepclicked:function(e){var li=$(e.currentTarget);var index=this.$element.find('.steps li').index(li);var evt=$.Event('stepclick');this.$element.trigger(evt,{step:index+ 1});if(evt.isDefaultPrevented())return;this.currentStep=(index+ 1);this.setState();},previous:function(){var canMovePrev=(this.currentStep>1);if(canMovePrev){var e=$.Event('change');this.$element.trigger(e,{step:this.currentStep,direction:'previous'});if(e.isDefaultPrevented())return;this.currentStep-=1;this.setState();}},next:function(){var canMoveNext=(this.currentStep+ 1<=this.numSteps);var lastStep=(this.currentStep===this.numSteps);if(canMoveNext){var e=$.Event('change');this.$element.trigger(e,{step:this.currentStep,direction:'next'});if(e.isDefaultPrevented())return;this.currentStep+=1;this.setState();}
else if(lastStep){this.$element.trigger('finished');}},selectedItem:function(selectedItem){var retVal,step;if(selectedItem){step=selectedItem.step||-1;if(step>=1&&step<=this.numSteps){this.currentStep=step;this.setState();}
retVal=this;}
else{retVal={step:this.currentStep};}
return retVal;}};$.fn.wizard=function(option,value){var methodReturn;var $set=this.each(function(){var $this=$(this);var data=$this.data('wizard');var options=typeof option==='object'&&option;if(!data)$this.data('wizard',(data=new Wizard(this,options)));if(typeof option==='string')methodReturn=data[option](value);});return(methodReturn===undefined)?$set:methodReturn;};$.fn.wizard.defaults={selectedItem:{step:1}};$.fn.wizard.Constructor=Wizard;$(function(){$('body').on('mousedown.wizard.data-api','.wizard',function(){var $this=$(this);if($this.data('wizard'))return;$this.wizard($this.data());});});
-2
View File
@@ -1,2 +0,0 @@
/*! WOW - v0.1.9 - 2014-05-10
* Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c=function(a,b){return function(){return a.apply(b,arguments)}};a=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in a)d=a[c],null!=d&&(b[c]=d);return b},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a}(),b=this.WeakMap||(b=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),this.WOW=function(){function d(a){null==a&&(a={}),this.scrollCallback=c(this.scrollCallback,this),this.scrollHandler=c(this.scrollHandler,this),this.start=c(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new b}return d.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0},d.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():document.addEventListener("DOMContentLoaded",this.start)},d.prototype.start=function(){var a,b,c,d;if(this.boxes=this.element.getElementsByClassName(this.config.boxClass),this.boxes.length){if(this.disabled())return this.resetStyle();for(d=this.boxes,b=0,c=d.length;c>b;b++)a=d[b],this.applyStyle(a,!0);return window.addEventListener("scroll",this.scrollHandler,!1),window.addEventListener("resize",this.scrollHandler,!1),this.interval=setInterval(this.scrollCallback,50)}},d.prototype.stop=function(){return window.removeEventListener("scroll",this.scrollHandler,!1),window.removeEventListener("resize",this.scrollHandler,!1),null!=this.interval?clearInterval(this.interval):void 0},d.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass},d.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},d.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),d.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.setAttribute("style","visibility: visible;"));return e},d.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},d.prototype.vendors=["moz","webkit"],d.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},d.prototype.vendorCSS=function(a,b){var c,d,e,f,g,h;for(d=window.getComputedStyle(a),c=d.getPropertyCSSValue(b),h=this.vendors,f=0,g=h.length;g>f;f++)e=h[f],c=c||d.getPropertyCSSValue("-"+e+"-"+b);return c},d.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=window.getComputedStyle(a).getPropertyValue("animation-name")}return"none"===b?"":b},d.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},d.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},d.prototype.scrollHandler=function(){return this.scrolled=!0},d.prototype.scrollCallback=function(){var a;return this.scrolled&&(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),!this.boxes.length)?this.stop():void 0},d.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},d.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+this.element.clientHeight-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},d.prototype.util=function(){return this._util||(this._util=new a)},d.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},d}()}).call(this);
File diff suppressed because one or more lines are too long