THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

perf: Minify and concat js files

pull/92/head
Suwon Chae 4 years ago
parent
commit
638f32aa84
8 changed files with 495 additions and 29 deletions
  1. +2
    -24
      app/views/common/scripts.scala.html
  2. +1
    -5
      app/views/layout.scala.html
  3. +14
    -0
      minify-js.sh
  4. +6
    -0
      public/bootstrap/js/bootstrap.min.js
  5. BIN
      public/compiler.jar
  6. +218
    -0
      public/javascripts/yona-common.js
  7. +211
    -0
      public/javascripts/yona-layout.js
  8. +43
    -0
      public/javascripts/yona-lib.js

+ 2
- 24
app/views/common/scripts.scala.html View File

@ -55,32 +55,10 @@
}
<script type="text/javascript" src="@routes.Application.jsMessages()"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.tmpl.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.form.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.validate.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.zclip.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.placeholder.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.requestAs.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.search.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("bootstrap/js/bootstrap.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/yona-common.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("bootstrap/js/bootstrap-better-typeahead.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("bootstrap/js/bootstrap-switch.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/rgbcolor.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/humanize.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/validate.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/xss.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Attachments.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Files.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Mention.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Markdown.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Pagination.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ShortcutKey.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Dropdown.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Typeahead.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Dialog.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Toast.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Tabs.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.OriginalMessage.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/yona-lib.js")"></script>
<script type="text/javascript">
$yobi.setScriptPath("@getJSPath");

+ 1
- 5
app/views/layout.scala.html View File

@ -35,14 +35,10 @@
<link rel="stylesheet" type="text/css" media="all" href="@routes.Assets.at("stylesheets/yobi.css")">
<link rel='stylesheet' href="@routes.Assets.at("javascripts/lib/nprogress/nprogress.css")"/>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/nprogress/nprogress.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/yona-layout.js")"></script>
<script type="text/javascript">
NProgress.configure({ minimum: 0.6 });
</script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery-1.9.0.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.browser.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.pjax.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Common.js")"></script>
</head>
<body class="@theme">

+ 14
- 0
minify-js.sh View File

@ -0,0 +1,14 @@
# yona-layout.js
CLOSURE_COMPILER="public/compiler.jar"
OUT_DIR="public/javascripts"
PUBLIC="public"
PUBLIC_JAVASCRIPTS="public/javascripts"
java -jar $CLOSURE_COMPILER --js $PUBLIC_JAVASCRIPTS/lib/nprogress/nprogress.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery-1.9.0.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.browser.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.pjax.js $PUBLIC_JAVASCRIPTS/common/yobi.Common.js --js_output_file $OUT_DIR/yona-layout.js
# yona-common.js
java -jar $CLOSURE_COMPILER --js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.tmpl.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.form.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.validate.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.requestAs.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.search.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.zclip.min.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.placeholder.min.js $PUBLIC/bootstrap/js/bootstrap.js $PUBLIC_JAVASCRIPTS/lib/rgbcolor.js $PUBLIC_JAVASCRIPTS/lib/humanize.js $PUBLIC_JAVASCRIPTS/lib/validate.js $PUBLIC_JAVASCRIPTS/lib/xss.js --js_output_file $OUT_DIR/yona-common.js
# yona-lib.js
java -jar $CLOSURE_COMPILER --js $PUBLIC_JAVASCRIPTS/common/yobi.Attachments.js $PUBLIC_JAVASCRIPTS/common/yobi.Files.js $PUBLIC_JAVASCRIPTS/common/yobi.Mention.js $PUBLIC_JAVASCRIPTS/common/yobi.Markdown.js $PUBLIC_JAVASCRIPTS/common/yobi.Pagination.js $PUBLIC_JAVASCRIPTS/common/yobi.ShortcutKey.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dropdown.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Typeahead.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dialog.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Toast.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Tabs.js $PUBLIC_JAVASCRIPTS/common/yobi.OriginalMessage.js --js_output_file $OUT_DIR/yona-lib.js

+ 6
- 0
public/bootstrap/js/bootstrap.min.js
File diff suppressed because it is too large
View File


BIN
public/compiler.jar View File


+ 218
- 0
public/javascripts/yona-common.js View File

@ -0,0 +1,218 @@
(function(a,b){function d(c,b,g,d){d={data:d||0===d||!1===d?d:b?b.data:{},_wrap:b?b._wrap:null,tmpl:null,parent:b||null,nodes:[],calls:r,nest:p,wrap:q,html:n,update:m};c&&a.extend(d,c,{nodes:[],parent:b});g&&(d.tmpl=g,d._ctnt=d._ctnt||d.tmpl(a,d),d.key=++C,(D.length?w:v)[C]=d);return d}function c(b,d,g){var f;g=g?a.map(g,function(a){return"string"===typeof a?b.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,'$1 _tmplitem="'+b.key+'" $2'):a:c(a,b,a._ctnt)}):b;if(d)return g;g=g.join("");g.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,
function(c,b,d,g){f=a(d).get();h(f);b&&(f=e(b).concat(f));g&&(f=f.concat(e(g)))});return f?f:e(g)}function e(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function g(c){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(c).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function(c,b,d,g,f,e,k){c=a.tmpl.tag[d];if(!c)throw"Unknown template tag: "+d;d=c._default||[];e&&!/\w$/.test(f)&&(f+=e,e="");f?(f=l(f),k=k?","+l(k)+")":e?")":"",k=e?-1<f.indexOf(".")?f+l(e):"("+f+").call($item"+k:f,e=e?k:"(typeof("+f+")==='function'?("+f+").call($item):("+f+"))"):e=k=d.$1||"null";g=l(g);return"');"+c[b?"close":"open"].split("$notnull_1").join(f?"typeof("+f+")!=='undefined' && ("+f+")!=null":"true").split("$1a").join(e).split("$1").join(k).split("$2").join(g||d.$2||"")+"__.push('"})+
"');}return __;")}function f(b,f){b._wrap=c(b,!0,a.isArray(f)?f:[u.test(f)?f:a(f).html()]).join("")}function l(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function h(c){function b(c){function g(a){a+=f;h=l[a]=l[a]||d(h,v[h.parent.key+f]||h.parent)}var e,k=c,h,A;if(A=c.getAttribute("_tmplitem")){for(;k.parentNode&&1===(k=k.parentNode).nodeType&&!(e=k.getAttribute("_tmplitem")););e!==A&&(k=k.parentNode?11===k.nodeType?0:k.getAttribute("_tmplitem")||0:0,(h=v[A])||(h=w[A],h=d(h,v[k]||
w[k]),h.key=++C,v[C]=h),z&&g(A));c.removeAttribute("_tmplitem")}else z&&(h=a.data(c,"tmplItem"))&&(g(h.key),v[h.key]=h,k=(k=a.data(c.parentNode,"tmplItem"))?k.key:0);if(h){for(e=h;e&&e.key!=k;)e.nodes.push(c),e=e.parent;delete h._ctnt;delete h._wrap;a.data(c,"tmplItem",h)}}var f="_"+z,g,e,l={},k,h,m;k=0;for(h=c.length;k<h;k++)if(1===(g=c[k]).nodeType){e=g.getElementsByTagName("*");for(m=e.length-1;0<=m;m--)b(e[m]);b(g)}}function r(a,c,b,f){if(!a)return D.pop();D.push({_:a,tmpl:c,item:this,data:b,
options:f})}function p(c,b,f){return a.tmpl(a.template(c),b,f,this)}function q(c,b){var f=c.options||{};f.wrapped=b;return a.tmpl(a.template(c.tmpl),c.data,f,c.item)}function n(c,b){var f=this._wrap;return a.map(a(a.isArray(f)?f.join(""):f).filter(c||"*"),function(a){if(b)a=a.innerText||a.textContent;else{var c;(c=a.outerHTML)||(c=document.createElement("div"),c.appendChild(a.cloneNode(!0)),c=c.innerHTML);a=c}return a})}function m(){var c=this.nodes;a.tmpl(null,null,null,this).insertBefore(c[0]);
a(c).remove()}var k=a.fn.domManip,u=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,v={},w={},y,H={key:0,data:{}},C=0,z=0,D=[];a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(c,b){a.fn[c]=function(f){var g=[];f=a(f);var d,e,k;d=1===this.length&&this[0].parentNode;y=v||{};if(d&&11===d.nodeType&&1===d.childNodes.length&&1===f.length)f[b](this[0]),g=this;else{e=0;for(k=f.length;e<k;e++)z=e,d=(0<e?this.clone(!0):this).get(),a(f[e])[b](d),g=
g.concat(d);z=0;g=this.pushStack(g,c,f.selector)}f=y;y=null;a.tmpl.complete(f);return g}});a.fn.extend({tmpl:function(c,b,f){return a.tmpl(this[0],c,b,f)},tmplItem:function(){return a.tmplItem(this[0])},template:function(c){return a.template(c,this[0])},domManip:function(c,b,f,g){if(c[0]&&a.isArray(c[0])){for(var d=a.makeArray(arguments),e=c[0],l=e.length,h=0,m;h<l&&!(m=a.data(e[h++],"tmplItem")););m&&z&&(d[2]=function(c){a.tmpl.afterManip(this,c,f)});k.apply(this,d)}else k.apply(this,arguments);
z=0;y||a.tmpl.complete(v);return this}});a.extend({tmpl:function(b,g,e,k){var l=!k;if(l)k=H,b=a.template[b]||a.template(null,b),w={};else if(!b)return b=k.tmpl,v[k.key]=k,k.nodes=[],k.wrapped&&f(k,k.wrapped),a(c(k,null,k.tmpl(a,k)));if(!b)return[];"function"===typeof g&&(g=g.call(k||{}));e&&e.wrapped&&f(e,e.wrapped);g=a.isArray(g)?a.map(g,function(a){return a?d(e,k,b,a):null}):[d(e,k,b,g)];return l?a(c(k,null,g)):g},tmplItem:function(c){var b;for(c instanceof a&&(c=c[0]);c&&1===c.nodeType&&!(b=a.data(c,
"tmplItem"))&&(c=c.parentNode););return b||H},template:function(c,b){return b?("string"===typeof b?b=g(b):b instanceof a&&(b=b[0]||{}),b.nodeType&&(b=a.data(b,"tmpl")||a.data(b,"tmpl",g(b.innerHTML))),"string"===typeof c?a.template[c]=b:b):c?"string"!==typeof c?a.template(null,c):a.template[c]||a.template(null,u.test(c)?c:a(c)):null},encode:function(c){return(""+c).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},
open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},
"!":{open:""}},complete:function(c){v={}},afterManip:function(c,b,f){var g=11===b.nodeType?a.makeArray(b.childNodes):1===b.nodeType?[b]:[];f.call(c,b);h(g);z++}})})(jQuery);!function(a){a(function(){var b=a.support,d;a:{d=document.createElement("bootstrap");var c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},e;for(e in c)if(void 0!==d.style[e]){d=c[e];break a}d=void 0}b.transition=d&&{end:d}})}(window.jQuery);
!function(a){var b=function(c){a(c).on("click",'[data-dismiss="alert"]',this.close)};b.prototype.close=function(c){function b(){d.trigger("closed").remove()}var g=a(this),f=g.attr("data-target"),d;f||(f=(f=g.attr("href"))&&f.replace(/.*(?=#[^\s]*$)/,""));d=a(f);c&&c.preventDefault();d.length||(d=g.hasClass("alert")?g:g.parent());d.trigger(c=a.Event("close"));c.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,b):b())};var d=a.fn.alert;
a.fn.alert=function(c){return this.each(function(){var d=a(this),g=d.data("alert");g||d.data("alert",g=new b(this));"string"==typeof c&&g[c].call(d)})};a.fn.alert.Constructor=b;a.fn.alert.noConflict=function(){a.fn.alert=d;return this};a(document).on("click.alert.data-api",'[data-dismiss="alert"]',b.prototype.close)}(window.jQuery);
!function(a){var b=function(c,b){this.$element=a(c);this.options=a.extend({},a.fn.button.defaults,b)};b.prototype.setState=function(c){var a=this.$element,b=a.data(),f=a.is("input")?"val":"html";c+="Text";b.resetText||a.data("resetText",a[f]());a[f](b[c]||this.options[c]);setTimeout(function(){"loadingText"==c?a.addClass("disabled").attr("disabled","disabled"):a.removeClass("disabled").removeAttr("disabled")},0)};b.prototype.toggle=function(){var c=this.$element.closest('[data-toggle="buttons-radio"]');
c&&c.find(".active").removeClass("active");this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),g=d.data("button"),f="object"==typeof c&&c;g||d.data("button",g=new b(this,f));"toggle"==c?g.toggle():c&&g.setState(c)})};a.fn.button.defaults={loadingText:"loading..."};a.fn.button.Constructor=b;a.fn.button.noConflict=function(){a.fn.button=d;return this};a(document).on("click.button.data-api","[data-toggle^=button]",function(c){c=a(c.target);
c.hasClass("btn")||(c=c.closest(".btn"));c.button("toggle")})}(window.jQuery);
!function(a){var b=function(c,b){this.$element=a(c);this.$indicators=this.$element.find(".carousel-indicators");this.options=b;"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(c){c||(this.paused=!1);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval));return this},getActiveIndex:function(){this.$active=
this.$element.find(".item.active");this.$items=this.$active.parent().children();return this.$items.index(this.$active)},to:function(c){var b=this.getActiveIndex(),d=this;if(!(c>this.$items.length-1||0>c))return this.sliding?this.$element.one("slid",function(){d.to(c)}):b==c?this.pause().cycle():this.slide(c>b?"next":"prev",a(this.$items[c]))},pause:function(c){c||(this.paused=!0);this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),
this.cycle(!0));clearInterval(this.interval);this.interval=null;return this},next:function(){if(!this.sliding)return this.slide("next")},prev:function(){if(!this.sliding)return this.slide("prev")},slide:function(c,b){var d=this.$element.find(".item.active"),f=b||d[c](),l=this.interval,h="next"==c?"left":"right",r="next"==c?"first":"last",p=this;this.sliding=!0;l&&this.pause();f=f.length?f:this.$element.find(".item")[r]();r=a.Event("slide",{relatedTarget:f[0],direction:h});if(!f.hasClass("active")){this.$indicators.length&&
(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var c=a(p.$indicators.children()[p.getActiveIndex()]);c&&c.addClass("active")}));if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(r);if(r.isDefaultPrevented())return;f.addClass(c);f[0].offsetWidth;d.addClass(h);f.addClass(h);this.$element.one(a.support.transition.end,function(){f.removeClass([c,h].join(" ")).addClass("active");d.removeClass(["active",h].join(" "));p.sliding=!1;
setTimeout(function(){p.$element.trigger("slid")},0)})}else{this.$element.trigger(r);if(r.isDefaultPrevented())return;d.removeClass("active");f.addClass("active");this.sliding=!1;this.$element.trigger("slid")}l&&this.cycle();return this}}};var d=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),g=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,"object"==typeof c&&c),l="string"==typeof c?c:f.slide;g||d.data("carousel",g=new b(this,f));if("number"==typeof c)g.to(c);
else if(l)g[l]();else f.interval&&g.pause().cycle()})};a.fn.carousel.defaults={interval:5E3,pause:"hover"};a.fn.carousel.Constructor=b;a.fn.carousel.noConflict=function(){a.fn.carousel=d;return this};a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(c){var b=a(this),d,f=a(b.attr("data-target")||(d=b.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));d=a.extend({},f.data(),b.data());var l;f.carousel(d);(l=b.attr("data-slide-to"))&&f.data("carousel").pause().to(l).cycle();
c.preventDefault()})}(window.jQuery);
!function(a){var b=function(c,b){this.$element=a(c);this.options=a.extend({},a.fn.collapse.defaults,b);this.options.parent&&(this.$parent=a(this.options.parent));this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){return this.$element.hasClass("width")?"width":"height"},show:function(){var c,b,d,f;if(!this.transitioning&&!this.$element.hasClass("in")){c=this.dimension();b=a.camelCase(["scroll",c].join("-"));if((d=this.$parent&&this.$parent.find("> .accordion-group > .in"))&&d.length){if((f=
d.data("collapse"))&&f.transitioning)return;d.collapse("hide");f||d.data("collapse",null)}this.$element[c](0);this.transition("addClass",a.Event("show"),"shown");a.support.transition&&this.$element[c](this.$element[0][b])}},hide:function(){var c;!this.transitioning&&this.$element.hasClass("in")&&(c=this.dimension(),this.reset(this.$element[c]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[c](0))},reset:function(c){var a=this.dimension();this.$element.removeClass("collapse")[a](c||
"auto")[0].offsetWidth;this.$element[null!==c?"addClass":"removeClass"]("collapse");return this},transition:function(c,b,d){var f=this,l=function(){"show"==b.type&&f.reset();f.transitioning=0;f.$element.trigger(d)};this.$element.trigger(b);b.isDefaultPrevented()||(this.transitioning=1,this.$element[c]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,l):l())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var d=a.fn.collapse;
a.fn.collapse=function(c){return this.each(function(){var d=a(this),g=d.data("collapse"),f=a.extend({},a.fn.collapse.defaults,d.data(),"object"==typeof c&&c);g||d.data("collapse",g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.collapse.defaults={toggle:!0};a.fn.collapse.Constructor=b;a.fn.collapse.noConflict=function(){a.fn.collapse=d;return this};a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(c){var b=a(this),d;c=b.attr("data-target")||c.preventDefault()||(d=b.attr("href"))&&
d.replace(/.*(?=#[^\s]+$)/,"");d=a(c).data("collapse")?"toggle":b.data();b[a(c).hasClass("in")?"addClass":"removeClass"]("collapsed");a(c).collapse(d)})}(window.jQuery);
!function(a){function b(){a("[data-toggle=dropdown]").each(function(){d(a(this)).removeClass("open")})}function d(c){var b=c.attr("data-target");b||(b=(b=c.attr("href"))&&/#/.test(b)&&b.replace(/.*(?=#[^\s]*$)/,""));(b=b&&a(b))&&b.length||(b=c.parent());return b}var c=function(c){var b=a(c).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){b.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(c){c=a(this);var f,e;if(!c.is(".disabled, :disabled"))return f=
d(c),e=f.hasClass("open"),b(),e||f.toggleClass("open"),c.focus(),!1},keydown:function(c){var b,e,h;if(/(38|40|27)/.test(c.keyCode)&&(b=a(this),c.preventDefault(),c.stopPropagation(),!b.is(".disabled, :disabled"))){e=d(b);h=e.hasClass("open");if(!h||h&&27==c.keyCode)return 27==c.which&&e.find("[data-toggle=dropdown]").focus(),b.click();b=a("[role=menu] li:not(.divider):visible a",e);b.length&&(e=b.index(b.filter(":focus")),38==c.keyCode&&0<e&&e--,40==c.keyCode&&e<b.length-1&&e++,~e||(e=0),b.eq(e).focus())}}};
var e=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this));"string"==typeof b&&e[b].call(d)})};a.fn.dropdown.Constructor=c;a.fn.dropdown.noConflict=function(){a.fn.dropdown=e;return this};a(document).on("click.dropdown.data-api",b).on("click.dropdown.data-api",".dropdown form",function(c){c.stopPropagation()}).on("click.dropdown-menu",function(c){c.stopPropagation()}).on("click.dropdown.data-api","[data-toggle=dropdown]",
c.prototype.toggle).on("keydown.dropdown.data-api","[data-toggle=dropdown], [role=menu]",c.prototype.keydown)}(window.jQuery);
!function(a){var b=function(c,b){this.options=b;this.$element=a(c).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this));this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var c=this,b=a.Event("show");this.$element.trigger(b);this.isShown||b.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var b=a.support.transition&&
c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body);c.$element.show();b&&c.$element[0].offsetWidth;c.$element.addClass("in").attr("aria-hidden",!1);c.enforceFocus();b?c.$element.one(a.support.transition.end,function(){c.$element.focus().trigger("shown")}):c.$element.focus().trigger("shown")}))},hide:function(c){c&&c.preventDefault();c=a.Event("hide");this.$element.trigger(c);this.isShown&&!c.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.modal"),
this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var c=this;a(document).on("focusin.modal",function(a){c.$element[0]===a.target||c.$element.has(a.target).length||c.$element.focus()})},escape:function(){var c=this;if(this.isShown&&this.options.keyboard)this.$element.on("keyup.dismiss.modal",function(a){27==a.which&&c.hide()});else this.isShown||this.$element.off("keyup.dismiss.modal")},
hideWithTransition:function(){var c=this,b=setTimeout(function(){c.$element.off(a.support.transition.end);c.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(b);c.hideModal()})},hideModal:function(){var c=this;this.$element.hide();this.backdrop(function(){c.removeBackdrop();c.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null},backdrop:function(c){var b=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&
this.options.backdrop){var d=a.support.transition&&b;this.$backdrop=a('<div class="modal-backdrop '+b+'" />').appendTo(document.body);this.$backdrop.click("static"==this.options.backdrop?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this));d&&this.$backdrop[0].offsetWidth;this.$backdrop.addClass("in");c&&(d?this.$backdrop.one(a.support.transition.end,c):c())}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?
this.$backdrop.one(a.support.transition.end,c):c()):c&&c()}};var d=a.fn.modal;a.fn.modal=function(c){return this.each(function(){var d=a(this),g=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),"object"==typeof c&&c);g||d.data("modal",g=new b(this,f));if("string"==typeof c)g[c]();else f.show&&g.show()})};a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0};a.fn.modal.Constructor=b;a.fn.modal.noConflict=function(){a.fn.modal=d;return this};a(document).on("click.modal.data-api",'[data-toggle="modal"]',
function(c){var b=a(this),d=b.attr("href"),f=a(b.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),d=f.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},f.data(),b.data());c.preventDefault();f.modal(d).one("hide",function(){b.focus()})})}(window.jQuery);
!function(a){var b=function(c,a){this.init("tooltip",c,a)};b.prototype={constructor:b,init:function(c,b,d){var f;this.type=c;this.$element=a(b);this.options=this.getOptions(d);this.enabled=!0;b=this.options.trigger.split(" ");for(d=b.length;d--;)if(f=b[d],"click"==f)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else"manual"!=f&&(c="hover"==f?"mouseenter":"focus",f="hover"==f?"mouseleave":"blur",this.$element.on(c+"."+this.type,this.options.selector,a.proxy(this.enter,
this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(c){c=a.extend({},a.fn[this.type].defaults,this.$element.data(),c);c.delay&&"number"==typeof c.delay&&(c.delay={show:c.delay,hide:c.delay});return c},enter:function(c){var b=a.fn[this.type].defaults,d={},f;this._options&&a.each(this._options,function(c,a){b[c]!=a&&(d[c]=a)},this);f=
a(c.currentTarget)[this.type](d).data(this.type);if(!f.options.delay||!f.options.delay.show)return f.show();clearTimeout(this.timeout);f.hoverState="in";this.timeout=setTimeout(function(){"in"==f.hoverState&&f.show()},f.options.delay.show)},leave:function(c){var b=a(c.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!b.options.delay||!b.options.delay.hide)return b.hide();b.hoverState="out";this.timeout=setTimeout(function(){"out"==b.hoverState&&
b.hide()},b.options.delay.hide)},show:function(){var c,b,d,f,l;b=a.Event("show");if(this.hasContent()&&this.enabled&&(this.$element.trigger(b),!b.isDefaultPrevented())){c=this.tip();this.setContent();this.options.animation&&c.addClass("fade");f="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement;c.detach().css({top:0,left:0,display:"block"});this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);b=
this.getPosition();d=c[0].offsetWidth;c=c[0].offsetHeight;switch(f){case "bottom":l={top:b.top+b.height,left:b.left+b.width/2-d/2};break;case "top":l={top:b.top-c,left:b.left+b.width/2-d/2};break;case "left":l={top:b.top+b.height/2-c/2,left:b.left-d};break;case "right":l={top:b.top+b.height/2-c/2,left:b.left+b.width}}this.applyPlacement(l,f);this.$element.trigger("shown")}},applyPlacement:function(c,a){var b=this.tip(),d=b[0].offsetWidth,l=b[0].offsetHeight,h,r,p;b.offset(c).addClass(a).addClass("in");
h=b[0].offsetWidth;r=b[0].offsetHeight;"top"==a&&r!=l&&(c.top=c.top+l-r,p=!0);"bottom"==a||"top"==a?(l=0,0>c.left&&(l=-2*c.left,c.left=0,b.offset(c),h=b[0].offsetWidth),this.replaceArrow(l-d+h,h,"left")):this.replaceArrow(r-l,r,"top");p&&b.offset(c)},replaceArrow:function(c,a,b){this.arrow().css(b,c?50*(1-c/a)+"%":"")},setContent:function(){var c=this.tip(),a=this.getTitle();c.find(".tooltip-inner")[this.options.html?"html":"text"](a);c.removeClass("fade in top bottom left right")},hide:function(){function c(){var c=
setTimeout(function(){b.off(a.support.transition.end).detach()},500);b.one(a.support.transition.end,function(){clearTimeout(c);b.detach()})}var b=this.tip(),d=a.Event("hide");this.$element.trigger(d);if(!d.isDefaultPrevented())return b.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?c():b.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var c=this.$element;(c.attr("title")||"string"!=typeof c.attr("data-original-title"))&&c.attr("data-original-title",c.attr("title")||
"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var c=this.$element[0];return a.extend({},"function"==typeof c.getBoundingClientRect?c.getBoundingClientRect():{width:c.offsetWidth,height:c.offsetHeight},this.$element.offset())},getTitle:function(){var c=this.$element,a=this.options;return c.attr("data-original-title")||("function"==typeof a.title?a.title.call(c[0]):a.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=
this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(c){c=c?a(c.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var d=a.fn.tooltip;
a.fn.tooltip=function(c){return this.each(function(){var d=a(this),g=d.data("tooltip"),f="object"==typeof c&&c;g||d.data("tooltip",g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.tooltip.Constructor=b;a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1};a.fn.tooltip.noConflict=function(){a.fn.tooltip=d;return this}}(window.jQuery);
!function(a){var b=function(c,a){this.init("popover",c,a)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var c=this.tip(),a=this.getTitle(),b=this.getContent();c.find(".popover-title")[this.options.html?"html":"text"](a);c.find(".popover-content")[this.options.html?"html":"text"](b);c.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var c=this.$element,a=this.options;
return("function"==typeof a.content?a.content.call(c[0]):a.content)||c.attr("data-content")},tip:function(){this.$tip||(this.$tip=a(this.options.template));return this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var d=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),g=d.data("popover"),f="object"==typeof c&&c;g||d.data("popover",g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.popover.Constructor=b;a.fn.popover.defaults=
a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'});a.fn.popover.noConflict=function(){a.fn.popover=d;return this}}(window.jQuery);
!function(a){function b(c,b){var d=a.proxy(this.process,this),f=a(c).is("body")?a(window):a(c),l;this.options=a.extend({},a.fn.scrollspy.defaults,b);this.$scrollElement=f.on("scroll.scroll-spy.data-api",d);this.selector=(this.options.target||(l=a(c).attr("href"))&&l.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.$body=a("body");this.refresh();this.process()}b.prototype={constructor:b,refresh:function(){var c=this;this.offsets=a([]);this.targets=a([]);this.$body.find(this.selector).map(function(){var b=
a(this),b=b.data("target")||b.attr("href"),d=/^#\w/.test(b)&&a(b);return d&&d.length&&[[d.position().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),b]]||null}).sort(function(c,a){return c[0]-a[0]}).each(function(){c.offsets.push(this[0]);c.targets.push(this[1])})},process:function(){var c=this.$scrollElement.scrollTop()+this.options.offset,a=(this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight)-this.$scrollElement.height(),b=this.offsets,d=this.targets,l=this.activeTarget,
h;if(c>=a)return l!=(h=d.last()[0])&&this.activate(h);for(h=b.length;h--;)l!=d[h]&&c>=b[h]&&(!b[h+1]||c<=b[h+1])&&this.activate(d[h])},activate:function(c){this.activeTarget=c;a(this.selector).parent(".active").removeClass("active");c=a(this.selector+'[data-target="'+c+'"],'+this.selector+'[href="'+c+'"]').parent("li").addClass("active");c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active"));c.trigger("activate")}};var d=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=
a(this),g=d.data("scrollspy"),f="object"==typeof c&&c;g||d.data("scrollspy",g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.scrollspy.Constructor=b;a.fn.scrollspy.defaults={offset:10};a.fn.scrollspy.noConflict=function(){a.fn.scrollspy=d;return this};a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var c=a(this);c.scrollspy(c.data())})})}(window.jQuery);
!function(a){var b=function(c){this.element=a(c)};b.prototype={constructor:b,show:function(){var c=this.element,b=c.closest("ul:not(.dropdown-menu)"),d=c.attr("data-target"),f,l;d||(d=(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]*$)/,""));c.parent("li").hasClass("active")||(f=b.find(".active:last a")[0],l=a.Event("show",{relatedTarget:f}),c.trigger(l),l.isDefaultPrevented()||(d=a(d),this.activate(c.parent("li"),b),this.activate(d,d.parent(),function(){c.trigger({type:"shown",relatedTarget:f})})))},activate:function(c,
b,d){function f(){l.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");c.addClass("active");h?(c[0].offsetWidth,c.addClass("in")):c.removeClass("fade");c.parent(".dropdown-menu")&&c.closest("li.dropdown").addClass("active");d&&d()}var l=b.find("> .active"),h=d&&a.support.transition&&l.hasClass("fade");h?l.one(a.support.transition.end,f):f();l.removeClass("in")}};var d=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),g=d.data("tab");g||d.data("tab",
g=new b(this));if("string"==typeof c)g[c]()})};a.fn.tab.Constructor=b;a.fn.tab.noConflict=function(){a.fn.tab=d;return this};a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(c){c.preventDefault();a(this).tab("show")})}(window.jQuery);
!function(a){var b=function(c,b){this.$element=a(c);this.options=a.extend({},a.fn.typeahead.defaults,b);this.matcher=this.options.matcher||this.matcher;this.sorter=this.options.sorter||this.sorter;this.highlighter=this.options.highlighter||this.highlighter;this.updater=this.options.updater||this.updater;this.source=this.options.source;this.$menu=a(this.options.menu);this.shown=!1;this.listen()};b.prototype={constructor:b,select:function(){var c=this.$menu.find(".active").attr("data-value");this.$element.val(this.updater(c)).change();
return this.hide()},updater:function(c){return c},show:function(){var c=a.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});this.$menu.insertAfter(this.$element).css({top:c.top+c.height,left:c.left}).show();this.shown=!0;return this},hide:function(){this.$menu.hide();this.shown=!1;return this},lookup:function(c){this.query=this.$element.val();return!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(c=a.isFunction(this.source)?this.source(this.query,
a.proxy(this.process,this)):this.source)?this.process(c):this},process:function(c){var b=this;c=a.grep(c,function(c){return b.matcher(c)});c=this.sorter(c);return c.length?this.render(c.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(c){return~c.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(c){for(var a=[],b=[],d=[],l;l=c.shift();)l.toLowerCase().indexOf(this.query.toLowerCase())?~l.indexOf(this.query)?b.push(l):d.push(l):a.push(l);return a.concat(b,
d)},highlighter:function(c){var a=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return c.replace(new RegExp("("+a+")","ig"),function(a,c){return"<strong>"+c+"</strong>"})},render:function(c){var b=this;c=a(c).map(function(c,d){c=a(b.options.item).attr("data-value",d);c.find("a").html(b.highlighter(d));return c[0]});c.first().addClass("active");this.$menu.html(c);return this},next:function(c){c=this.$menu.find(".active").removeClass("active").next();c.length||(c=a(this.$menu.find("li")[0]));
c.addClass("active")},prev:function(c){c=this.$menu.find(".active").removeClass("active").prev();c.length||(c=this.$menu.find("li").last());c.addClass("active")},listen:function(){this.$element.on("focus",a.proxy(this.focus,this)).on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this));if(this.eventSupported("keydown"))this.$element.on("keydown",a.proxy(this.keydown,this));this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",
a.proxy(this.mouseenter,this)).on("mouseleave","li",a.proxy(this.mouseleave,this))},eventSupported:function(c){var a=c in this.$element;a||(this.$element.setAttribute(c,"return;"),a="function"===typeof this.$element[c]);return a},move:function(a){if(this.shown){switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault();this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()}},keydown:function(c){this.suppressKeyPressRepeat=~a.inArray(c.keyCode,
[40,38,9,13,27]);this.move(c)},keypress:function(a){this.suppressKeyPressRepeat||this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation();a.preventDefault()},focus:function(a){this.focused=!0},blur:function(a){this.focused=!1;!this.mousedover&&this.shown&&this.hide()},click:function(a){a.stopPropagation();a.preventDefault();
this.select();this.$element.focus()},mouseenter:function(c){this.mousedover=!0;this.$menu.find(".active").removeClass("active");a(c.currentTarget).addClass("active")},mouseleave:function(a){this.mousedover=!1;!this.focused&&this.shown&&this.hide()}};var d=a.fn.typeahead;a.fn.typeahead=function(c){return this.each(function(){var d=a(this),g=d.data("typeahead"),f="object"==typeof c&&c;g||d.data("typeahead",g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',
item:'<li><a href="#"></a></li>',minLength:1};a.fn.typeahead.Constructor=b;a.fn.typeahead.noConflict=function(){a.fn.typeahead=d;return this};a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(c){c=a(this);c.data("typeahead")||c.typeahead(c.data())})}(window.jQuery);
!function(a){var b=function(c,b){this.options=a.extend({},a.fn.affix.defaults,b);this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1)},this));this.$element=a(c);this.checkPosition()};b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),b=this.$window.scrollTop(),d=this.$element.offset(),f=this.options.offset,l=f.bottom,h=f.top;"object"!=
typeof f&&(l=h=f);"function"==typeof h&&(h=f.top());"function"==typeof l&&(l=f.bottom());c=null!=this.unpin&&b+this.unpin<=d.top?!1:null!=l&&d.top+this.$element.height()>=c-l?"bottom":null!=h&&b<=h?"top":!1;this.affixed!==c&&(this.affixed=c,this.unpin="bottom"==c?d.top-b:null,this.$element.removeClass("affix affix-top affix-bottom").addClass("affix"+(c?"-"+c:"")))}};var d=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),g=d.data("affix"),f="object"==typeof c&&c;g||d.data("affix",
g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.affix.Constructor=b;a.fn.affix.defaults={offset:0};a.fn.affix.noConflict=function(){a.fn.affix=d;return this};a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),b=c.data();b.offset=b.offset||{};b.offsetBottom&&(b.offset.bottom=b.offsetBottom);b.offsetTop&&(b.offset.top=b.offsetTop);c.affix(b)})})}(window.jQuery);(function(){var a=this,b=a.humanize,d={};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=d),exports.humanize=d):("function"===typeof define&&define.amd&&define("humanize",function(){return d}),a.humanize=d);d.noConflict=function(){a.humanize=b;return this};d.pad=function(a,c,b,d){a+="";b?1<b.length&&(b=b.charAt(0)):b=" ";if("right"===(void 0===d?"left":"right"))for(;a.length<c;)a+=b;else for(;a.length<c;)a=b+a;return a};d.time=function(){return(new Date).getTime()/
1E3};var c=[0,0,31,59,90,120,151,181,212,243,273,304,334],e=[0,0,31,60,91,121,152,182,213,244,274,305,335];d.date=function(a,b){var l=void 0===b?new Date:b instanceof Date?new Date(b):new Date(1E3*b),h=/\\?([a-z])/gi,r=function(a,c){return n[a]?n[a]():c},p="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),q="January February March April May June July August September October November December".split(" "),n={d:function(){return d.pad(n.j(),2,"0")},D:function(){return n.l().slice(0,
3)},j:function(){return l.getDate()},l:function(){return p[n.w()]},N:function(){return n.w()||7},S:function(){var a=n.j();return 4<a&&21>a?"th":{1:"st",2:"nd",3:"rd"}[a%10]||"th"},w:function(){return l.getDay()},z:function(){return(n.L()?e[n.n()]:c[n.n()])+n.j()-1},W:function(){var a=n.z()-n.N()+1.5;return d.pad(1+Math.floor(Math.abs(a)/7)+(3.5<a%7?1:0),2,"0")},F:function(){return q[l.getMonth()]},m:function(){return d.pad(n.n(),2,"0")},M:function(){return n.F().slice(0,3)},n:function(){return l.getMonth()+
1},t:function(){return(new Date(n.Y(),n.n(),0)).getDate()},L:function(){return 1===(new Date(n.Y(),1,29)).getMonth()?1:0},o:function(){var a=n.n(),c=n.W();return n.Y()+(12===a&&9>c?-1:1===a&&9<c)},Y:function(){return l.getFullYear()},y:function(){return String(n.Y()).slice(-2)},a:function(){return 11<l.getHours()?"pm":"am"},A:function(){return n.a().toUpperCase()},B:function(){var a=l.getTime()/1E3,c=a%86400+3600;0>c&&(c+=86400);c=c/86.4%1E3;return 0>a?Math.ceil(c):Math.floor(c)},g:function(){return n.G()%
12||12},G:function(){return l.getHours()},h:function(){return d.pad(n.g(),2,"0")},H:function(){return d.pad(n.G(),2,"0")},i:function(){return d.pad(l.getMinutes(),2,"0")},s:function(){return d.pad(l.getSeconds(),2,"0")},u:function(){return d.pad(1E3*l.getMilliseconds(),6,"0")},O:function(){var a=l.getTimezoneOffset(),c=Math.abs(a);return(0<a?"-":"+")+d.pad(100*Math.floor(c/60)+c%60,4,"0")},P:function(){var a=n.O();return a.substr(0,3)+":"+a.substr(3,2)},Z:function(){return 60*-l.getTimezoneOffset()},
c:function(){return"Y-m-d\\TH:i:sP".replace(h,r)},r:function(){return"D, d M Y H:i:s O".replace(h,r)},U:function(){return l.getTime()/1E3||0}};return a.replace(h,r)};d.numberFormat=function(a,c,b,d){c=isNaN(c)?2:Math.abs(c);b=void 0===b?".":b;d=void 0===d?",":d;var e=0>a?"-":"";a=Math.abs(+a||0);var p=parseInt(a.toFixed(c),10)+"",q=3<p.length?p.length%3:0;return e+(q?p.substr(0,q)+d:"")+p.substr(q).replace(/(\d{3})(?=\d)/g,"$1"+d)+(c?b+Math.abs(a-p).toFixed(c).slice(2):"")};d.naturalDay=function(a,
c){a=void 0===a?d.time():a;c=void 0===c?"Y-m-d":c;var b=new Date,b=(new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()/1E3;return a<b&&a>=b-86400?"yesterday":a>=b&&a<b+86400?"today":a>=b+86400&&a<b+172800?"tomorrow":d.date(c,a)};d.relativeTime=function(a){a=void 0===a?d.time():a;var c=d.time(),b=c-a;if(2>b&&-2<b)return(0<=b?"just ":"")+"now";if(60>b&&-60<b)return 0<=b?Math.floor(b)+" seconds ago":"in "+Math.floor(-b)+" seconds";if(120>b&&-120<b)return 0<=b?"about a minute ago":"in about a minute";
if(3600>b&&-3600<b)return 0<=b?Math.floor(b/60)+" minutes ago":"in "+Math.floor(-b/60)+" minutes";if(7200>b&&-7200<b)return 0<=b?"about an hour ago":"in about an hour";if(86400>b&&-86400<b)return 0<=b?Math.floor(b/3600)+" hours ago":"in "+Math.floor(-b/3600)+" hours";if(172800>b&&-172800<b)return 0<=b?"1 day ago":"in 1 day";if(2505600>b&&-2505600<b)return 0<=b?Math.floor(b/86400)+" days ago":"in "+Math.floor(-b/86400)+" days";if(5184E3>b&&-5184E3<b)return 0<=b?"about a month ago":"in about a month";
var b=parseInt(d.date("Y",c),10),e=parseInt(d.date("Y",a),10),c=12*b+parseInt(d.date("n",c),10);a=12*e+parseInt(d.date("n",a),10);a=c-a;if(12>a&&-12<a)return 0<=a?a+" months ago":"in "+-a+" months";b-=e;return 2>b&&-2<b?0<=b?"a year ago":"in a year":0<=b?b+" years ago":"in "+-b+" years"};d.ordinal=function(a){a=parseInt(a,10);a=isNaN(a)?0:a;var c=0>a?"-":"";a=Math.abs(a);return c+a+(4<a&&21>a?"th":{1:"st",2:"nd",3:"rd"}[a%10]||"th")};d.filesize=function(a,c,b,e,r){c=void 0===c?1024:c;b=isNaN(b)?2:
Math.abs(b);e=void 0===e?".":e;r=void 0===r?",":r;if(0>=a)return"0 bytes";var p=[1],q="bytes Kb Mb Gb Tb Pb".split(" ");if(a<c)return d.numberFormat(a,0)+" "+q[0];for(var n=1;n<q.length;n++)if(p[n]=p[n-1]*c,a<p[n])return d.numberFormat(a/p[n-1],b,e,r)+" "+q[n-1];return d.numberFormat(a/p[q.length-1],b,e,r)+" "+q[q.length-1]};d.linebreaks=function(a){a=a.replace(/^([\n|\r]*)/,"");a=a.replace(/([\n|\r]*)$/,"");a=a.replace(/(\r\n|\n|\r)/g,"\n");a=a.replace(/(\n{2,})/g,"</p><p>");a=a.replace(/\n/g,"<br />");
return"<p>"+a+"</p>"};d.nl2br=function(a){return a.replace(/(\r\n|\n|\r)/g,"<br />")};d.truncatechars=function(a,c){return a.length<=c?a:a.substr(0,c)+"\u2026"};d.truncatewords=function(a,c){var b=a.split(" ");return b.length<c?a:b.slice(0,c).join(" ")+"\u2026"}}).call(this);(function(a){function b(c){var b=c.data;c.isDefaultPrevented()||(c.preventDefault(),a(this).ajaxSubmit(b))}function d(c){var b=c.target,d=a(b);if(!d.is(":submit,input:image")){b=d.closest(":submit");if(0===b.length)return;b=b[0]}var e=this;e.clk=b;"image"==b.type&&(void 0!==c.offsetX?(e.clk_x=c.offsetX,e.clk_y=c.offsetY):"function"==typeof a.fn.offset?(d=d.offset(),e.clk_x=c.pageX-d.left,e.clk_y=c.pageY-d.top):(e.clk_x=c.pageX-b.offsetLeft,e.clk_y=c.pageY-b.offsetTop));setTimeout(function(){e.clk=
e.clk_x=e.clk_y=null},100)}function c(){if(a.fn.ajaxSubmit.debug){var c="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(c):window.opera&&window.opera.postError&&window.opera.postError(c)}}var e,g;e=void 0!==a("<input type='file'/>").get(0).files;(g=void 0!==window.FormData)&&-1<navigator.userAgent.toLowerCase().indexOf("trident")&&(g=g&&-1<location.protocol.toLowerCase().indexOf("https"));a.fn.ajaxSubmit=function(b){function d(c){for(var k=
new FormData,e=0;e<c.length;e++)k.append(c[e].name,c[e].value);if(b.extraData)for(var g in b.extraData)b.extraData.hasOwnProperty(g)&&k.append(g,b.extraData[g]);b.data=null;c=a.extend(!0,{},a.ajaxSettings,b,{contentType:!1,processData:!1,cache:!1,type:"POST"});b.uploadProgress&&(c.xhr=function(){var a=jQuery.ajaxSettings.xhr();a.upload&&(a.upload.onprogress=function(a){var c=0,d=a.loaded||a.position,k=a.total;a.lengthComputable&&(c=Math.ceil(d/k*100));b.uploadProgress(a,d,k,c)});return a});c.data=
null;var l=c.beforeSend;c.beforeSend=function(a,c){c.data=k;l&&l.call(c,a,b)};a.ajax(c)}function h(d){function k(){function b(){try{var a=(v.contentWindow?v.contentWindow.document:v.contentDocument?v.contentDocument:v.document).readyState;c("state = "+a);a&&"uninitialized"==a.toLowerCase()&&setTimeout(b,50)}catch(d){c("Server abort: ",d," (",d.name,")"),e(2),B&&clearTimeout(B),B=void 0}}var d=q.attr("target"),f=q.attr("action");g.setAttribute("target",n);r||g.setAttribute("method","POST");f!=h.url&&
g.setAttribute("action",h.url);h.skipEncodingOverride||r&&!/post/i.test(r)||q.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});h.timeout&&(B=setTimeout(function(){E=!0;e(1)},h.timeout));var l=[];try{if(h.extraData)for(var p in h.extraData)h.extraData.hasOwnProperty(p)&&l.push(a('<input type="hidden" name="'+p+'">').attr("value",h.extraData[p]).appendTo(g)[0]);h.iframeTarget||(u.appendTo("body"),v.attachEvent?v.attachEvent("onload",e):v.addEventListener("load",e,!1));setTimeout(b,
15);g.submit()}finally{g.setAttribute("action",f),d?g.setAttribute("target",d):q.removeAttr("target"),a(l).remove()}}function e(b){if(!t.aborted&&!G){try{x=v.contentWindow?v.contentWindow.document:v.contentDocument?v.contentDocument:v.document}catch(d){c("cannot access response document: ",d),b=2}if(1===b&&t)t.abort("timeout");else if(2==b&&t)t.abort("server abort");else if(x&&x.location.href!=h.iframeSrc||E){v.detachEvent?v.detachEvent("onload",e):v.removeEventListener("load",e,!1);b="success";var f;
try{if(E)throw"timeout";var k="xml"==h.dataType||x.XMLDocument||a.isXMLDoc(x);c("isXml="+k);if(!k&&window.opera&&(null===x.body||!x.body.innerHTML)&&--K){c("requeing onLoad callback, DOM not available");setTimeout(e,250);return}var g=x.body?x.body:x.documentElement;t.responseText=g?g.innerHTML:null;t.responseXML=x.XMLDocument?x.XMLDocument:x;k&&(h.dataType="xml");t.getResponseHeader=function(a){return{"content-type":h.dataType}[a]};g&&(t.status=Number(g.getAttribute("status"))||t.status,t.statusText=
g.getAttribute("statusText")||t.statusText);var l=(h.dataType||"").toLowerCase(),m=/(json|script|text)/.test(l);if(m||h.textarea){var n=x.getElementsByTagName("textarea")[0];if(n)t.responseText=n.value,t.status=Number(n.getAttribute("status"))||t.status,t.statusText=n.getAttribute("statusText")||t.statusText;else if(m){var r=x.getElementsByTagName("pre")[0],y=x.getElementsByTagName("body")[0];r?t.responseText=r.textContent?r.textContent:r.innerText:y&&(t.responseText=y.textContent?y.textContent:y.innerText)}}else"xml"==
l&&!t.responseXML&&t.responseText&&(t.responseXML=J(t.responseText));try{F=I(t,l,h)}catch(d){b="parsererror",t.error=f=d||b}}catch(d){c("error caught: ",d),b="error",t.error=f=d||b}t.aborted&&(c("upload aborted"),b=null);t.status&&(b=200<=t.status&&300>t.status||304===t.status?"success":"error");"success"===b?(h.success&&h.success.call(h.context,F,"success",t),p&&a.event.trigger("ajaxSuccess",[t,h])):b&&(void 0===f&&(f=t.statusText),h.error&&h.error.call(h.context,t,b,f),p&&a.event.trigger("ajaxError",
[t,h,f]));p&&a.event.trigger("ajaxComplete",[t,h]);p&&!--a.active&&a.event.trigger("ajaxStop");h.complete&&h.complete.call(h.context,t,b);G=!0;h.timeout&&clearTimeout(B);setTimeout(function(){h.iframeTarget||u.remove();t.responseXML=null},100)}}}var g=q[0],l,h,p,n,u,v,t,w,E,B;w=!!a.fn.prop;if(a(":input[name=submit],:input[id=submit]",g).length)alert('Error: Form elements must not have name or id of "submit".');else{if(d)for(l=0;l<m.length;l++)d=a(m[l]),w?d.prop("disabled",!1):d.removeAttr("disabled");
h=a.extend(!0,{},a.ajaxSettings,b);h.context=h.context||h;n="jqFormIO"+(new Date).getTime();h.iframeTarget?(u=a(h.iframeTarget),(d=u.attr("name"))?n=d:u.attr("name",n)):(u=a('<iframe name="'+n+'" src="'+h.iframeSrc+'" />'),u.css({position:"absolute",top:"-1000px",left:"-1000px"}));v=u[0];t={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(b){var d="timeout"===b?"timeout":
"aborted";c("aborting upload... "+d);this.aborted=1;u.attr("src",h.iframeSrc);t.error=d;h.error&&h.error.call(h.context,t,d,b);p&&a.event.trigger("ajaxError",[t,h,d]);h.complete&&h.complete.call(h.context,t,d)}};(p=h.global)&&0===a.active++&&a.event.trigger("ajaxStart");p&&a.event.trigger("ajaxSend",[t,h]);if(h.beforeSend&&!1===h.beforeSend.call(h.context,t,h))h.global&&a.active--;else if(!t.aborted){(w=g.clk)&&(d=w.name)&&!w.disabled&&(h.extraData=h.extraData||{},h.extraData[d]=w.value,"image"==
w.type&&(h.extraData[d+".x"]=g.clk_x,h.extraData[d+".y"]=g.clk_y));w=a("meta[name=csrf-token]").attr("content");(d=a("meta[name=csrf-param]").attr("content"))&&w&&(h.extraData=h.extraData||{},h.extraData[d]=w);h.forceSync?k():setTimeout(k,10);var F,x,K=50,G,J=a.parseXML||function(a,b){window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml");return b&&b.documentElement&&"parsererror"!=b.documentElement.nodeName?b:null},
L=a.parseJSON||function(a){return window.eval("("+a+")")},I=function(b,c,d){var f=b.getResponseHeader("content-type")||"",k="xml"===c||!c&&0<=f.indexOf("xml");b=k?b.responseXML:b.responseText;k&&"parsererror"===b.documentElement.nodeName&&a.error&&a.error("parsererror");d&&d.dataFilter&&(b=d.dataFilter(b,c));"string"===typeof b&&("json"===c||!c&&0<=f.indexOf("json")?b=L(b):("script"===c||!c&&0<=f.indexOf("javascript"))&&a.globalEval(b));return b}}}}if(!this.length)return c("ajaxSubmit: skipping submit process - no element selected"),
this;var r,p,q=this;"function"==typeof b&&(b={success:b});r=this.attr("method");p=this.attr("action");(p=(p="string"===typeof p?a.trim(p):"")||window.location.href||"")&&(p=(p.match(/^([^#]+)/)||[])[1]);b=a.extend(!0,{url:p,success:a.ajaxSettings.success,type:r||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},b);p={};this.trigger("form-pre-serialize",[this,b,p]);if(p.veto)return c("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(b.beforeSerialize&&
!1===b.beforeSerialize(this,b))return c("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var n=b.traditional;void 0===n&&(n=a.ajaxSettings.traditional);var m=[],k,u=this.formToArray(b.semantic,m);b.data&&(b.extraData=b.data,k=a.param(b.data,n));if(b.beforeSubmit&&!1===b.beforeSubmit(u,this,b))return c("ajaxSubmit: submit aborted via beforeSubmit callback"),this;this.trigger("form-submit-validate",[u,this,b,p]);if(p.veto)return c("ajaxSubmit: submit vetoed via form-submit-validate trigger"),
this;p=a.param(u,n);k&&(p=p?p+"&"+k:k);"GET"==b.type.toUpperCase()?(b.url+=(0<=b.url.indexOf("?")?"&":"?")+p,b.data=null):b.data=p;var v=[];b.resetForm&&v.push(function(){q.resetForm()});b.clearForm&&v.push(function(){q.clearForm(b.includeHidden)});if(!b.dataType&&b.target){var w=b.success||function(){};v.push(function(c){var d=b.replaceTarget?"replaceWith":"html";a(b.target)[d](c).each(w,arguments)})}else b.success&&v.push(b.success);b.success=function(a,c,d){for(var k=b.context||b,e=0,g=v.length;e<
g;e++)v[e].apply(k,[a,c,d||q,q])};k=0<a("input:file:enabled[value]",this).length;p="multipart/form-data"==q.attr("enctype")||"multipart/form-data"==q.attr("encoding");n=e&&g;c("fileAPI :"+n);!1!==b.iframe&&(b.iframe||(k||p)&&!n)?b.closeKeepAlive?a.get(b.closeKeepAlive,function(){h(u)}):h(u):(k||p)&&n?d(u):a.ajax(b);for(k=0;k<m.length;k++)m[k]=null;this.trigger("form-submit-notify",[this,b]);return this};a.fn.ajaxForm=function(f){f=f||{};f.delegation=f.delegation&&a.isFunction(a.fn.on);if(!f.delegation&&
0===this.length){var e=this.selector,g=this.context;if(!a.isReady&&e)return c("DOM not ready, queuing ajaxForm"),a(function(){a(e,g).ajaxForm(f)}),this;c("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return f.delegation?(a(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,d).on("submit.form-plugin",this.selector,f,b).on("click.form-plugin",this.selector,f,d),this):this.ajaxFormUnbind().bind("submit.form-plugin",
f,b).bind("click.form-plugin",f,d)};a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};a.fn.formToArray=function(b,c){var d=[];if(0===this.length)return d;var g=this[0],p=b?g.getElementsByTagName("*"):g.elements;if(!p)return d;var q,n,m,k,u,v;q=0;for(v=p.length;q<v;q++)if(u=p[q],m=u.name)if(b&&g.clk&&"image"==u.type)u.disabled||g.clk!=u||(d.push({name:m,value:a(u).val(),type:u.type}),d.push({name:m+".x",value:g.clk_x},{name:m+".y",value:g.clk_y}));else if((k=
a.fieldValue(u,!0))&&k.constructor==Array)for(c&&c.push(u),n=0,u=k.length;n<u;n++)d.push({name:m,value:k[n]});else if(e&&"file"==u.type&&!u.disabled)if(c&&c.push(u),k=u.files,k.length)for(n=0;n<k.length;n++)d.push({name:m,value:k[n],type:u.type});else d.push({name:m,value:"",type:u.type});else null!==k&&"undefined"!=typeof k&&(c&&c.push(u),d.push({name:m,value:k,type:u.type,required:u.required}));!b&&g.clk&&(p=a(g.clk),q=p[0],(m=q.name)&&!q.disabled&&"image"==q.type&&(d.push({name:m,value:p.val()}),
d.push({name:m+".x",value:g.clk_x},{name:m+".y",value:g.clk_y})));return d};a.fn.formSerialize=function(b){return a.param(this.formToArray(b))};a.fn.fieldSerialize=function(b){var c=[];this.each(function(){var d=this.name;if(d){var e=a.fieldValue(this,b);if(e&&e.constructor==Array)for(var g=0,q=e.length;g<q;g++)c.push({name:d,value:e[g]});else null!==e&&"undefined"!=typeof e&&c.push({name:this.name,value:e})}});return a.param(c)};a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;d<e;d++){var g=
a.fieldValue(this[d],b);null===g||"undefined"==typeof g||g.constructor==Array&&!g.length||(g.constructor==Array?a.merge(c,g):c.push(g))}return c};a.fieldValue=function(b,c){var d=b.name,e=b.type,g=b.tagName.toLowerCase();void 0===c&&(c=!0);if(c&&(!d||b.disabled||"reset"==e||"button"==e||("checkbox"==e||"radio"==e)&&!b.checked||("submit"==e||"image"==e)&&b.form&&b.form.clk!=b||"select"==g&&-1==b.selectedIndex))return null;if("select"==g){var q=b.selectedIndex;if(0>q)return null;for(var d=[],g=b.options,
n=(e="select-one"==e)?q+1:g.length,q=e?q:0;q<n;q++){var m=g[q];if(m.selected){var k=m.value;k||(k=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value);if(e)return k;d.push(k)}}return d}return a(b).val()};a.fn.clearForm=function(b){return this.each(function(){a("input,select,textarea",this).clearFields(b)})};a.fn.clearFields=a.fn.clearInputs=function(b){var c=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var d=
this.type,e=this.tagName.toLowerCase();c.test(d)||"textarea"==e?this.value="":"checkbox"==d||"radio"==d?this.checked=!1:"select"==e?this.selectedIndex=-1:b&&(!0===b&&/hidden/.test(d)||"string"==typeof b&&a(this).is(b))&&(this.value="")})};a.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})};a.fn.enable=function(a){void 0===a&&(a=!0);return this.each(function(){this.disabled=!a})};a.fn.selected=function(b){void 0===
b&&(b=!0);return this.each(function(){var c=this.type;"checkbox"==c||"radio"==c?this.checked=b:"option"==this.tagName.toLowerCase()&&(c=a(this).parent("select"),b&&c[0]&&"select-one"==c[0].type&&c.find("option").selected(!1),this.selected=b)})};a.fn.ajaxSubmit.debug=!1})(jQuery);(function(a,b,d){function c(a){var b={},c=/^jQuery\d+$/;d.each(a.attributes,function(a,d){d.specified&&!c.test(d.name)&&(b[d.name]=d.value)});return b}function e(a,c){var e=d(this);if(this.value==e.attr("placeholder")&&e.hasClass("placeholder"))if(e.data("placeholder-password")){e=e.hide().next().show().attr("id",e.removeAttr("id").data("placeholder-id"));if(!0===a)return e[0].value=c;e.focus()}else this.value="",e.removeClass("placeholder"),this==b.activeElement&&this.select()}function g(){var a,
b=d(this),g=this.id;if(""==this.value){if("password"==this.type){if(!b.data("placeholder-textinput")){try{a=b.clone().attr({type:"text"})}catch(f){a=d("<input>").attr(d.extend(c(this),{type:"text"}))}a.removeAttr("name").data({"placeholder-password":!0,"placeholder-id":g}).bind("focus.placeholder",e);b.data({"placeholder-textinput":a,"placeholder-id":g}).before(a)}b=b.removeAttr("id").hide().prev().attr("id",g).show()}b.addClass("placeholder");b[0].value=b.attr("placeholder")}else b.removeClass("placeholder")}
var f="placeholder"in b.createElement("input"),l="placeholder"in b.createElement("textarea"),h=d.fn,r=d.valHooks;f&&l?(h=h.placeholder=function(){return this},h.input=h.textarea=!0):(h=h.placeholder=function(){this.filter((f?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":e,"blur.placeholder":g}).data("placeholder-enabled",!0).trigger("blur.placeholder");return this},h.input=f,h.textarea=l,h={get:function(a){var b=d(a);return b.data("placeholder-enabled")&&b.hasClass("placeholder")?
"":a.value},set:function(a,c){var f=d(a);if(!f.data("placeholder-enabled"))return a.value=c;""==c?(a.value=c,a!=b.activeElement&&g.call(a)):f.hasClass("placeholder")?e.call(a,!0,c)||(a.value=c):a.value=c;return f}},f||(r.input=h),l||(r.textarea=h),d(function(){d(b).delegate("form","submit.placeholder",function(){var a=d(".placeholder",this).each(e);setTimeout(function(){a.each(g)},10)})}),d(a).bind("beforeunload.placeholder",function(){d(".placeholder").each(function(){this.value=""})}))})(this,document,
jQuery);!function(a){var b=function(a,b){this.init(a,b);this.options=this._htData;this.on=this._attachCustomEvent;this.off=this._detachCustomEvent};b.prototype={constructor:b,init:function(b,d){var g=a(b);this._htData=this._getRequestOptions(g,d||{});this._htHandlers={};if("get"!==this._htData.sMethod||"a"!==el.tagName.toLowerCase())return"function"===typeof this._htData.fOnLoad&&this._attachCustomEvent("load",d.fOnLoad),"function"===typeof this._htData.fOnError&&this._attachCustomEvent("error",d.fOnError),
g.css("cursor","pointer"),g.on("click keydown",a.proxy(this._onClickTarget,this)),{options:this._htData,on:this._attachCustomEvent,off:this._detachCustomEvent}},_onClickTarget:function(a){if(("keydown"!==a.type||13===a.keyCode)&&this._htData)return this._sendRequest(this._htData),a.preventDefault(),a.stopPropagation(),!1},_sendRequest:function(b){var d={method:b.sMethod,success:a.proxy(this._onSuccessRequest,this),error:a.proxy(this._onErrorRequest,this),cache:!1,dataType:"text"};b.htAjaxOpt instanceof
Object&&(d=a.extend(d,b.htAjaxOpt));if(!1===this._fireEvent("beforeRequest",d))return!1;a.ajax(b.sHref,d)},_getRequestOptions:function(b,d){var g=a(b);return{sMethod:d.sMethod||g.data("request-method")||"get",sHref:d.sHref||g.data("request-uri")||g.attr("href"),fOnLoad:d.fOnLoad||void 0,fOnError:d.fOnError||void 0}},_onSuccessRequest:function(a,b,d){!1!==this._fireEvent("load",{oRes:a,oXHR:d,sStatus:b})&&(a=d.getResponseHeader("Location"),204===d.status&&a?document.location.href=a:document.location.reload())},
_onErrorRequest:function(a){this._fireEvent("error",{oXHR:a});switch(a.status){case 200:document.location.reload();break;case 204:document.location.href=a.getResponseHeader("Location")}},_attachCustomEvent:function(a,b){if("object"===typeof a)for(var d in a)this._htHandlers[d]=this._htHandlers[d]||[],this._htHandlers[d].push(a[d]);else this._htHandlers[a]=this._htHandlers[a]||[],this._htHandlers[a].push(b)},_detachCustomEvent:function(a,b){if(b){var d=this._htHandlers[a],d=d?d.indexOf(b):-1;-1<d&&
this._htHandlers[a].splice(d,1)}else this._htHandlers[a]=[]},_fireEvent:function(a,b){var d=this._htHandlers[a];if(!1!==d instanceof Array){var f=void 0;d.forEach(function(a){f=f||a(b)});return f}}};var d=a.fn.requestAs;a.fn.requestAs=function(c){return this.each(function(){var d=a(this),g=d.data("requestAs");g||d.data("requestAs",g=new b(this,c));if("string"==typeof c)g[c]()})};a.fn.requestAs.noConflict=function(){a.fn.requestAs=d;return this};a(document).ready(function(){a("[data-request-method]").requestAs()})}(window.jQuery);!function(a){var b=function(b,c){this.$element=a(b);this.options=a.extend({},a.fn.search.defaults,c);this.item=this.options.item||this.$element.data("items");this.items=a('[data-item="'+this.item+'"]');this.lookup();this.searchTimer};b.prototype={constructor:b,lookup:function(){this.$element.on("keyup",a.proxy(this.keyup,this));this.$element.on("keydown",a.proxy(this.kedown,this))},keyup:function(){this.searchTimer=setTimeout(a.proxy(this.search,this),this.options.delay,this.$element.val().toLowerCase())},
keydown:function(){clearTimeout(this.searchTimer)},search:function(b){var c=this;a.trim(b)?this.items.each(function(e,g){c.matcher(b,g)?a(g).show():a(g).hide()}):this.items.show()},matcher:function(b,c){return-1!==a(c).data("value").toLowerCase().indexOf(b)}};a.fn.search=function(d){return this.each(function(){var c=a(this),e=c.data("search"),g="object"==typeof d&&d;e||c.data("search",e=new b(this,g));if("string"==typeof d)e[d]()})};a.fn.search.defaults={items:"",delay:200};a(document).on("focus",
'[data-toggle="item-search"]',function(b){b=a(this);b.data("search")||b.search(b.data())})}(window.jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(this.length){var d=a.data(this[0],"validator");if(d)return d;this.attr("novalidate","novalidate");d=new a.validator(b,this[0]);a.data(this[0],"validator",d);d.settings.onsubmit&&(b=this.find("input, button"),b.filter(".cancel").click(function(){d.cancelSubmit=!0}),d.settings.submitHandler&&b.filter(":submit").click(function(){d.submitButton=this}),this.submit(function(b){function e(){if(d.settings.submitHandler){if(d.submitButton)var b=a("<input type='hidden'/>").attr("name",
d.submitButton.name).val(d.submitButton.value).appendTo(d.currentForm);d.settings.submitHandler.call(d,d.currentForm);d.submitButton&&b.remove();return!1}return!0}d.settings.debug&&b.preventDefault();if(d.cancelSubmit)return d.cancelSubmit=!1,e();if(d.form())return d.pendingRequest?(d.formSubmitted=!0,!1):e();d.focusInvalid();return!1}));return d}b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(a(this[0]).is("form"))return this.validate().form();
var b=!0,d=a(this[0].form).validate();this.each(function(){b&=d.element(this)});return b},removeAttrs:function(b){var d={},c=this;a.each(b.split(/\s/),function(a,b){d[b]=c.attr(b);c.removeAttr(b)});return d},rules:function(b,d){var c=this[0];if(b){var e=a.data(c.form,"validator").settings,g=e.rules,f=a.validator.staticRules(c);switch(b){case "add":a.extend(f,a.validator.normalizeRule(d));g[c.name]=f;d.messages&&(e.messages[c.name]=a.extend(e.messages[c.name],d.messages));break;case "remove":if(!d)return delete g[c.name],
f;var l={};a.each(d.split(/\s/),function(a,b){l[b]=f[b];delete f[b]});return l}}c=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(c),a.validator.classRules(c),a.validator.attributeRules(c),a.validator.staticRules(c)),c);c.required&&(e=c.required,delete c.required,c=a.extend({required:e},c));return c}});a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+b.value)},filled:function(b){return!!a.trim(""+b.value)},unchecked:function(a){return!a.checked}});a.validator=function(b,d){this.settings=
a.extend(!0,{},a.validator.defaults,b);this.currentForm=d;this.init()};a.validator.format=function(b,d){if(1==arguments.length)return function(){var c=a.makeArray(arguments);c.unshift(b);return a.validator.format.apply(this,c)};2<arguments.length&&d.constructor!=Array&&(d=a.makeArray(arguments).slice(1));d.constructor!=Array&&(d=[d]);a.each(d,function(a,d){b=b.replace(new RegExp("\\{"+a+"\\}","g"),d)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",
errorElement:"label",focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a,d){this.lastActive=a;this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(a)).hide())},onfocusout:function(a,d){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(a,
d){(a.name in this.submitted||a==this.lastElement)&&this.element(a)},onclick:function(a,d){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,d,c){"radio"===b.type?this.findByName(b.name).addClass(d).removeClass(c):a(b).addClass(d).removeClass(c)},unhighlight:function(b,d,c){"radio"===b.type?this.findByName(b.name).removeClass(d).addClass(c):a(b).removeClass(d).addClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,
b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),
minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,
"");c.settings[d]&&c.settings[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var d=this.groups={};a.each(this.settings.groups,function(b,c){a.each(c.split(/\s/),function(a,c){d[c]=b})});var c=
this.settings.rules;a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)});a(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",b).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",
b);this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,d=this.currentElements=this.elements();d[a];a++)this.check(d[a]);return this.valid()},element:function(b){this.lastElement=
b=this.validationTargetFor(this.clean(b));this.prepareElement(b);this.currentElements=a(b);var d=this.check(b);d?delete this.invalid[b.name]:this.invalid[b.name]=!0;this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers));this.showErrors();return d},showErrors:function(b){if(b){a.extend(this.errorMap,b);this.errorList=[];for(var d in b)this.errorList.push({message:b[d],element:this.findByName(d)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?
this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var d=0,c;for(c in a)d++;return d},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0==
this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1==a.grep(this.errorList,function(a){return a.element.name==b.name}).length&&b},elements:function(){var b=this,d={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
b.settings.debug&&window.console&&console.error("%o has no name assigned",this);return this.name in d||!b.objectLength(a(this).rules())?!1:d[this.name]=!0})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(b){b=this.validationTargetFor(this.clean(b));var d=a(b).rules(),c=!1,e;for(e in d){var g={method:e,parameters:d[e]};try{var f=a.validator.methods[e].call(this,b.value.replace(/\r/g,""),b,g.parameters);if("dependency-mismatch"==f)c=!0;else{c=!1;if("pending"==f){this.toHide=this.toHide.not(this.errorsFor(b));return}if(!f)return this.formatAndAdd(b,g),!1}}catch(l){throw this.settings.debug&&window.console&&console.log("exception occured when checking element "+
b.id+", check the '"+g.method+"' method",l),l;}}if(!c)return this.objectLength(d)&&this.successList.push(b),!0},customMetaMessage:function(b,d){if(a.metadata){var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]}},customMessage:function(a,d){var c=this.settings.messages[a];return c&&(c.constructor==String?c:c[d])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,
d){return this.findDefined(this.customMessage(b.name,d),this.customMetaMessage(b,d),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[d],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(a,d){var c=this.defaultMessage(a,d.method),e=/\$?\{(\d+)\}/g;"function"==typeof c?c=c.call(this,d.parameters,a):e.test(c)&&(c=jQuery.format(c.replace(e,"{$1}"),d.parameters));this.errorList.push({message:c,element:a});this.errorMap[a.name]=c;this.submitted[a.name]=
c},addWrapper:function(a){this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper)));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var d=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,d.element,this.settings.errorClass,this.settings.validClass);this.showLabel(d.element,d.message)}this.errorList.length&&(this.toShow=this.toShow.add(this.containers));if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);
if(this.settings.unhighlight)for(a=0,d=this.validElements();d[a];a++)this.settings.unhighlight.call(this,d[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,d){var c=this.errorsFor(b);c.length?(c.removeClass(this.settings.validClass).addClass(this.settings.errorClass),
c.attr("generated")&&c.html(d)):(c=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(b),generated:!0}).addClass(this.settings.errorClass).html(d||""),this.settings.wrapper&&(c=c.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(c).length||(this.settings.errorPlacement?this.settings.errorPlacement(c,a(b)):c.insertAfter(b)));!d&&this.settings.success&&(c.text(""),"string"==typeof this.settings.success?c.addClass(this.settings.success):this.settings.success(c));
this.toShow=this.toShow.add(c)},errorsFor:function(b){var d=this.idOrName(b);return this.errors().filter(function(){return a(this).attr("for")==d})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){this.checkable(a)&&(a=this.findByName(a.name).not(this.settings.ignore)[0]);return a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){var d=this.currentForm;return a(document.getElementsByName(b)).map(function(a,
e){return e.form==d&&e.name==b&&e||null})},getLength:function(b,d){switch(d.nodeName.toLowerCase()){case "select":return a("option:selected",d).length;case "input":if(this.checkable(d))return this.findByName(d.name).filter(":checked").length}return b.length},depend:function(a,d){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,d):!0},dependTypes:{"boolean":function(a,d){return a},string:function(b,d){return!!a(b,d.form).length},"function":function(a,d){return a(d)}},optional:function(b){return!a.validator.methods.required.call(this,
a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,d){this.pendingRequest--;0>this.pendingRequest&&(this.pendingRequest=0);delete this.pending[b.name];d&&0==this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!d&&0==this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},
previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},dateDE:{dateDE:!0},number:{number:!0},numberDE:{numberDE:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,d){b.constructor==String?this.classRuleSettings[b]=d:a.extend(this.classRuleSettings,b)},classRules:function(b){var d=
{};(b=a(b).attr("class"))&&a.each(b.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(d,a.validator.classRuleSettings[this])});return d},attributeRules:function(b){var d={};b=a(b);for(var c in a.validator.methods){var e;(e="required"===c&&"function"===typeof a.fn.prop?b.prop(c):b.attr(c))?d[c]=e:b[0].getAttribute("type")===c&&(d[c]=!0)}d.maxlength&&/-1|2147483647|524288/.test(d.maxlength)&&delete d.maxlength;return d},metadataRules:function(b){if(!a.metadata)return{};var d=a.data(b.form,
"validator").settings.meta;return d?a(b).metadata()[d]:a(b).metadata()},staticRules:function(b){var d={},c=a.data(b.form,"validator");c.settings.rules&&(d=a.validator.normalizeRule(c.settings.rules[b.name])||{});return d},normalizeRules:function(b,d){a.each(b,function(c,e){if(!1===e)delete b[c];else if(e.param||e.depends){var g=!0;switch(typeof e.depends){case "string":g=!!a(e.depends,d.form).length;break;case "function":g=e.depends.call(d,d)}g?b[c]=void 0!==e.param?e.param:!0:delete b[c]}});a.each(b,
function(c,e){b[c]=a.isFunction(e)?e(d):e});a.each(["minlength","maxlength","min","max"],function(){b[this]&&(b[this]=Number(b[this]))});a.each(["rangelength","range"],function(){b[this]&&(b[this]=[Number(b[this][0]),Number(b[this][1])])});a.validator.autoCreateRanges&&(b.min&&b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),b.minlength&&b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength));b.messages&&delete b.messages;return b},normalizeRule:function(b){if("string"==
typeof b){var d={};a.each(b.split(/\s/),function(){d[this]=!0});b=d}return b},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=void 0!=c?c:a.validator.messages[b];3>d.length&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,d,c){if(!this.depend(c,d))return"dependency-mismatch";switch(d.nodeName.toLowerCase()){case "select":return(b=a(d).val())&&0<b.length;case "input":if(this.checkable(d))return 0<this.getLength(b,d);default:return 0<
a.trim(b).length}},remote:function(b,d,c){if(this.optional(d))return"dependency-mismatch";var e=this.previousValue(d);this.settings.messages[d.name]||(this.settings.messages[d.name]={});e.originalMessage=this.settings.messages[d.name].remote;this.settings.messages[d.name].remote=e.message;c="string"==typeof c&&{url:c}||c;if(this.pending[d.name])return"pending";if(e.old===b)return e.valid;e.old=b;var g=this;this.startRequest(d);var f={};f[d.name]=b;a.ajax(a.extend(!0,{url:c,mode:"abort",port:"validate"+
d.name,dataType:"json",data:f,success:function(c){g.settings.messages[d.name].remote=e.originalMessage;var f=!0===c;if(f){var r=g.formSubmitted;g.prepareElement(d);g.formSubmitted=r;g.successList.push(d);g.showErrors()}else r={},c=c||g.defaultMessage(d,"remote"),r[d.name]=e.message=a.isFunction(c)?c(b):c,g.showErrors(r);e.valid=f;g.stopRequest(d,f)}},c));return"pending"},minlength:function(b,d,c){return this.optional(d)||this.getLength(a.trim(b),d)>=c},maxlength:function(b,d,c){return this.optional(d)||
this.getLength(a.trim(b),d)<=c},rangelength:function(b,d,c){b=this.getLength(a.trim(b),d);return this.optional(d)||b>=c[0]&&b<=c[1]},min:function(a,d,c){return this.optional(d)||a>=c},max:function(a,d,c){return this.optional(d)||a<=c},range:function(a,d,c){return this.optional(d)||a>=c[0]&&a<=c[1]},email:function(a,d){return this.optional(d)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)},
url:function(a,d){return this.optional(d)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
date:function(a,d){return this.optional(d)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,d){return this.optional(d)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,d){return this.optional(d)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,d){return this.optional(d)||/^\d+$/.test(a)},creditcard:function(a,d){if(this.optional(d))return"dependency-mismatch";if(/[^0-9 -]+/.test(a))return!1;var c=0,e=0,g=!1;a=a.replace(/\D/g,"");for(var f=a.length-1;0<=f;f--)e=
a.charAt(f),e=parseInt(e,10),g&&9<(e*=2)&&(e-=9),c+=e,g=!g;return 0==c%10},accept:function(a,d,c){c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(d)||a.match(new RegExp(".("+c+")$","i"))},equalTo:function(b,d,c){c=a(c).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(d).valid()});return b==c.val()}}});a.format=a.validator.format})(jQuery);
(function(a){var b={};if(a.ajaxPrefilter)a.ajaxPrefilter(function(a,d,g){d=a.port;"abort"==a.mode&&(b[d]&&b[d].abort(),b[d]=g)});else{var d=a.ajax;a.ajax=function(c){var e=("port"in c?c:a.ajaxSettings).port;return"abort"==("mode"in c?c:a.ajaxSettings).mode?(b[e]&&b[e].abort(),b[e]=d.apply(this,arguments)):d.apply(this,arguments)}}})(jQuery);(function(a){a.fn.zclip=function(b){if("object"==typeof b&&!b.length){var d=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:!0,setHandCursor:!0,setCSSEffects:!0},b);return this.each(function(){var b=a(this);if(b.is(":visible")&&("string"==typeof d.copy||a.isFunction(d.copy))){ZeroClipboard.setMoviePath(d.path);var e=new ZeroClipboard.Client;a.isFunction(d.copy)&&b.bind("zClip_copy",d.copy);a.isFunction(d.beforeCopy)&&b.bind("zClip_beforeCopy",d.beforeCopy);a.isFunction(d.afterCopy)&&
b.bind("zClip_afterCopy",d.afterCopy);e.setHandCursor(d.setHandCursor);e.setCSSEffects(d.setCSSEffects);e.addEventListener("mouseOver",function(a){b.trigger("mouseenter")});e.addEventListener("mouseOut",function(a){b.trigger("mouseleave")});e.addEventListener("mouseDown",function(g){b.trigger("mousedown");a.isFunction(d.copy)?e.setText(b.triggerHandler("zClip_copy")):e.setText(d.copy);a.isFunction(d.beforeCopy)&&b.trigger("zClip_beforeCopy")});e.addEventListener("complete",function(e,f){a.isFunction(d.afterCopy)?
b.trigger("zClip_afterCopy"):(500<f.length&&(f=f.substr(0,500)+"...\n\n("+(f.length-500)+" characters not shown)"),b.removeClass("hover"),alert("Copied text to clipboard:\n\n "+f));d.clickAfter&&b.trigger("click")});e.glue(b[0],b.parent()[0]);a(window).bind("load resize",function(){e.reposition()})}})}if("string"==typeof b)return this.each(function(){var c=a(this);b=b.toLowerCase();var d=c.data("zclipId"),d=a("#"+d+".zclip");"remove"==b?(d.remove(),c.removeClass("active hover")):"hide"==b?(d.hide(),
c.removeClass("active hover")):"show"==b&&d.show()})}})(jQuery);
var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){"string"==typeof a&&(a=document.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){for(var d=this.className.split(/\s+/),c=-1,e=0;e<d.length;e++)d[e]==a&&(c=e,e=d.length);-1<c&&(d.splice(c,1),this.className=d.join(" "));return this},a.hasClass=
function(a){return!!this.className.match(new RegExp("\\s*"+a+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,d){(a=this.clients[a])&&a.receiveEvent(b,d)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a,b){var d={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};a&&a!=b&&(d.left+=a.offsetLeft,d.top+=a.offsetTop);return d},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId=
"ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);a&&this.glue(a)}};
ZeroClipboard.Client.prototype={id:0,ready:!1,movie:null,clipText:"",handCursorEnabled:!0,cssEffects:!0,handlers:null,glue:function(a,b,d){this.domElement=ZeroClipboard.$(a);a=99;this.domElement.style.zIndex&&(a=parseInt(this.domElement.style.zIndex,10)+1);"string"==typeof b?b=ZeroClipboard.$(b):"undefined"==typeof b&&(b=document.getElementsByTagName("body")[0]);var c=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div");this.div.className="zclip";this.div.id=
"zclip-"+this.movieId;$(this.domElement).data("zclipId","zclip-"+this.movieId);var e=this.div.style;e.position="absolute";e.left=""+c.left+"px";e.top=""+c.top+"px";e.width=""+c.width+"px";e.height=""+c.height+"px";e.zIndex=a;if("object"==typeof d)for(addedStyle in d)e[addedStyle]=d[addedStyle];b.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(a,b){var d="",c="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var e=location.href.match(/^https/i)?
"https://":"http://",d=d+('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+a+'" height="'+b+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.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="'+
c+'"/><param name="wmode" value="transparent"/></object>');else d+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+c+'" wmode="transparent" />';return d},hide:function(){this.div&&(this.div.style.left=
"-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.div=this.domElement=null}},reposition:function(a){a&&((this.domElement=ZeroClipboard.$(a))||this.hide());if(this.domElement&&this.div){a=ZeroClipboard.getDOMObjectPosition(this.domElement);var b=this.div.style;b.left=""+a.left+"px";b.top=""+a.top+"px"}},setText:function(a){this.clipText=
a;this.ready&&this.movie.setText(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=document.getElementById(this.movieId);if(!this.movie){var d=this;setTimeout(function(){d.receiveEvent("load",
null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){d=this;setTimeout(function(){d.receiveEvent("load",null)},100);this.ready=!0;return}this.ready=!0;try{this.movie.setText(this.clipText)}catch(f){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(f){}break;case "mouseover":this.domElement&&this.cssEffects&&(this.domElement.addClass("hover"),this.recoverActive&&this.domElement.addClass("active"));break;case "mouseout":this.domElement&&
this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0),this.domElement.removeClass("hover"));break;case "mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var c=0,e=this.handlers[a].length;c<e;c++){var g=this.handlers[a][c];if("function"==typeof g)g(this,
b);else if("object"==typeof g&&2==g.length)g[0][g[1]](this,b);else if("string"==typeof g)window[g](this,b)}}};/*
Use it if you like it
*/
function RGBColor(a){this.ok=!1;"#"==a.charAt(0)&&(a=a.substr(1,6));a=a.replace(/ /g,"");a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",
darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",
gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",
lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",
oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",
slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},d;for(d in b)a==d&&(a=b[d]);var c=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,
example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}];for(d=0;d<c.length;d++){var e=c[d].process,g=c[d].re.exec(a);g&&(channels=e(g),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=0>this.r||isNaN(this.r)?0:255<this.r?255:this.r;this.g=0>this.g||isNaN(this.g)?0:
255<this.g?255:this.g;this.b=0>this.b||isNaN(this.b)?0:255<this.b?255:this.b;this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.